From 1b014b7e7b672dfbe5e218cb2976d2e1acf64de1 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Mon, 20 Jul 2026 12:39:27 +1000 Subject: [PATCH 01/37] [ffigen] Vibe coded prototype of transformer API --- pkgs/ffigen/lib/ffigen.dart | 1 + .../lib/src/code_generator/binding.dart | 3 + .../lib/src/code_generator/compound.dart | 2 + .../lib/src/code_generator/cpp_class.dart | 1 + .../lib/src/code_generator/enum_class.dart | 2 + pkgs/ffigen/lib/src/code_generator/func.dart | 9 +- .../ffigen/lib/src/code_generator/global.dart | 2 +- .../src/code_generator/objc_interface.dart | 2 +- .../lib/src/code_generator/objc_methods.dart | 1 + .../lib/src/code_generator/objc_protocol.dart | 2 +- .../lib/src/config_provider/config.dart | 5 + pkgs/ffigen/lib/src/header_parser/parser.dart | 8 + .../ffigen/lib/src/public_ast/public_ast.dart | 975 ++++++++++++++++++ .../lib/src/visitor/apply_config_filters.dart | 24 +- pkgs/ffigen/test/public_ast_visitor_test.dart | 92 ++ 15 files changed, 1112 insertions(+), 17 deletions(-) create mode 100644 pkgs/ffigen/lib/src/public_ast/public_ast.dart create mode 100644 pkgs/ffigen/test/public_ast_visitor_test.dart diff --git a/pkgs/ffigen/lib/ffigen.dart b/pkgs/ffigen/lib/ffigen.dart index 77e8b50f35..ff118d7f4c 100644 --- a/pkgs/ffigen/lib/ffigen.dart +++ b/pkgs/ffigen/lib/ffigen.dart @@ -56,3 +56,4 @@ export 'src/config_provider.dart' macSdkUri, xcodePath, xcodeUri; +export 'src/public_ast/public_ast.dart' hide Declaration; diff --git a/pkgs/ffigen/lib/src/code_generator/binding.dart b/pkgs/ffigen/lib/src/code_generator/binding.dart index 5b52c350b1..5ff573930a 100644 --- a/pkgs/ffigen/lib/src/code_generator/binding.dart +++ b/pkgs/ffigen/lib/src/code_generator/binding.dart @@ -32,6 +32,9 @@ abstract class Binding extends AstNode implements Declaration { final String? dartDoc; final bool isInternal; + /// Whether this binding was explicitly excluded by a user visitor or filter. + bool userDefinedIsExcluded = false; + /// Whether these bindings should be generated. /// /// Set by MarkBindingsVisitation. diff --git a/pkgs/ffigen/lib/src/code_generator/compound.dart b/pkgs/ffigen/lib/src/code_generator/compound.dart index 8cf60230e3..aa27b9156b 100644 --- a/pkgs/ffigen/lib/src/code_generator/compound.dart +++ b/pkgs/ffigen/lib/src/code_generator/compound.dart @@ -255,8 +255,10 @@ class CompoundMember extends AstNode { final String? dartDoc; final String originalName; final Type type; + bool userDefinedIsExcluded = false; final Symbol _symbol; + Symbol get symbol => _symbol; String get name => _symbol.name; CompoundMember({ diff --git a/pkgs/ffigen/lib/src/code_generator/cpp_class.dart b/pkgs/ffigen/lib/src/code_generator/cpp_class.dart index 24168d4b53..520b1f1ebf 100644 --- a/pkgs/ffigen/lib/src/code_generator/cpp_class.dart +++ b/pkgs/ffigen/lib/src/code_generator/cpp_class.dart @@ -23,6 +23,7 @@ class CppMethod extends AstNode with HasLocalScope { final bool isConstant; final bool isStatic; final CppMethodKind kind; + bool userDefinedIsExcluded = false; CppMethod({ required this.name, diff --git a/pkgs/ffigen/lib/src/code_generator/enum_class.dart b/pkgs/ffigen/lib/src/code_generator/enum_class.dart index a837962197..c5332f4143 100644 --- a/pkgs/ffigen/lib/src/code_generator/enum_class.dart +++ b/pkgs/ffigen/lib/src/code_generator/enum_class.dart @@ -307,8 +307,10 @@ class EnumConstant extends AstNode { final String? originalName; final String? dartDoc; final int value; + bool userDefinedIsExcluded = false; final Symbol _symbol; + Symbol get symbol => _symbol; String get name => _symbol.name; EnumConstant({ diff --git a/pkgs/ffigen/lib/src/code_generator/func.dart b/pkgs/ffigen/lib/src/code_generator/func.dart index a6932c7376..2db90dc4ae 100644 --- a/pkgs/ffigen/lib/src/code_generator/func.dart +++ b/pkgs/ffigen/lib/src/code_generator/func.dart @@ -43,12 +43,12 @@ import 'writer.dart'; /// ``` class Func extends LookUpBinding with HasLocalScope { final FunctionType functionType; - final bool exposeSymbolAddress; - final bool exposeFunctionTypedefs; - final bool isLeaf; + bool exposeSymbolAddress; + bool exposeFunctionTypedefs; + bool isLeaf; final bool objCReturnsRetained; final bool useNameForLookup; - final bool recordUse; + bool recordUse; final ApiAvailability? apiAvailability; @override @@ -289,6 +289,7 @@ class Parameter extends AstNode { final String originalName; Type type; final bool objCConsumed; + bool userDefinedIsExcluded = false; Symbol symbol; String get name => symbol.name; diff --git a/pkgs/ffigen/lib/src/code_generator/global.dart b/pkgs/ffigen/lib/src/code_generator/global.dart index 594077eaeb..265b8525d1 100644 --- a/pkgs/ffigen/lib/src/code_generator/global.dart +++ b/pkgs/ffigen/lib/src/code_generator/global.dart @@ -26,7 +26,7 @@ import 'writer.dart'; /// ``` class Global extends LookUpBinding with HasLocalScope { final Type type; - final bool exposeSymbolAddress; + bool exposeSymbolAddress; final bool constant; @override diff --git a/pkgs/ffigen/lib/src/code_generator/objc_interface.dart b/pkgs/ffigen/lib/src/code_generator/objc_interface.dart index a1cf384f95..2fb9fc915c 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_interface.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_interface.dart @@ -18,7 +18,7 @@ class ObjCInterface extends BindingType with ObjCMethods, HasLocalScope { ObjCInterface? superType; bool filled = false; - final String? module; + String? module; late final NoLookUpBinding classObject; late final ObjCInternalGlobal _isKindOfClass; late final ObjCMsgSendFunc _isKindOfClassMsgSend; diff --git a/pkgs/ffigen/lib/src/code_generator/objc_methods.dart b/pkgs/ffigen/lib/src/code_generator/objc_methods.dart index 9812afb4be..a06aa11b0e 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_methods.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_methods.dart @@ -183,6 +183,7 @@ class ObjCMethod extends AstNode with HasLocalScope { final String? dartDoc; final String originalName; Symbol symbol; + bool userDefinedIsExcluded = false; final String originalProtocolMethodName; Type returnType; final List _params; diff --git a/pkgs/ffigen/lib/src/code_generator/objc_protocol.dart b/pkgs/ffigen/lib/src/code_generator/objc_protocol.dart index 456922be6b..3941fdba27 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_protocol.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_protocol.dart @@ -16,7 +16,7 @@ class ObjCProtocol extends BindingType with ObjCMethods, HasLocalScope { @override final Context context; final superProtocols = []; - final String? module; + String? module; final Symbol loaderSymbol; late final ObjCProtocolGlobal _protocolPointer; late final ObjCInternalGlobal _conformsTo; diff --git a/pkgs/ffigen/lib/src/config_provider/config.dart b/pkgs/ffigen/lib/src/config_provider/config.dart index b45cac1199..8ac9a99907 100644 --- a/pkgs/ffigen/lib/src/config_provider/config.dart +++ b/pkgs/ffigen/lib/src/config_provider/config.dart @@ -9,12 +9,16 @@ import 'package:meta/meta.dart'; import '../code_generator.dart'; import '../ffigen.dart'; +import '../public_ast/public_ast.dart' show Visitor; import 'config_types.dart'; /// The generator that generates bindings for `dart:ffi` from C and Objective-C /// headers. // TODO: Add a code snippet example. final class FfiGenerator { + /// User custom visitors to modify/filter AST elements. + final List? visitors; + /// The configuration for header parsing of [FfiGenerator]. final Headers headers; @@ -88,6 +92,7 @@ final class FfiGenerator { final Uri? libclangDylib; const FfiGenerator({ + this.visitors, this.headers = const Headers(), this.enums = Enums.excludeAll, this.functions = Functions.excludeAll, diff --git a/pkgs/ffigen/lib/src/header_parser/parser.dart b/pkgs/ffigen/lib/src/header_parser/parser.dart index 61db077b41..c13210d8f6 100644 --- a/pkgs/ffigen/lib/src/header_parser/parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/parser.dart @@ -14,6 +14,7 @@ import '../code_generator/scope.dart'; import '../config_provider.dart'; import '../config_provider/utils.dart'; import '../context.dart'; +import '../public_ast/public_ast.dart' as public_ast; import '../strings.dart' as strings; import '../visitor/apply_config_filters.dart'; import '../visitor/ast.dart'; @@ -176,6 +177,13 @@ List transformBindings(List rawBindings, Context context) { visit(context, CopyMethodsFromSuperTypesVisitation(), allBindings); visit(context, FixOverriddenMethodsVisitation(context), allBindings); + // Execute Public AST visitors. + final publicAst = public_ast.PublicAst.fromBindings(allBindings.toList()); + publicAst.accept(public_ast.LegacyCallbacksVisitor(config)); + for (final v in config.visitors ?? const []) { + publicAst.accept(v); + } + final applyConfigFiltersVisitation = ApplyConfigFiltersVisitation(config); visit(context, applyConfigFiltersVisitation, allBindings); final directlyIncluded = applyConfigFiltersVisitation.directlyIncluded; diff --git a/pkgs/ffigen/lib/src/public_ast/public_ast.dart b/pkgs/ffigen/lib/src/public_ast/public_ast.dart new file mode 100644 index 0000000000..2ed1739408 --- /dev/null +++ b/pkgs/ffigen/lib/src/public_ast/public_ast.dart @@ -0,0 +1,975 @@ +// Copyright (c) 2026, 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 '../code_generator.dart' as ast; +import '../config_provider.dart'; + +/// User-facing Visitor for FFIgen's Public AST. +abstract class Visitor { + const Visitor(); + + void visitLibrary(PublicAst ast) { + for (final decl in ast.declarations) { + decl.accept(this); + } + } + + void visitStruct(Struct node) { + if (node.isExcluded) return; + for (final field in node.fields) { + field.accept(this); + } + } + + void visitUnion(Union node) { + if (node.isExcluded) return; + for (final field in node.fields) { + field.accept(this); + } + } + + void visitEnum(EnumClass node) { + if (node.isExcluded) return; + for (final constant in node.constants) { + constant.accept(this); + } + } + + void visitUnnamedEnumConstant(UnnamedEnumConstant node) {} + + void visitFunc(Func node) { + if (node.isExcluded) return; + for (final param in node.parameters) { + param.accept(this); + } + } + + void visitGlobal(Global node) {} + + void visitMacroConstant(MacroConstant node) {} + + void visitTypealias(Typealias node) {} + + void visitObjCInterface(ObjCInterface node) { + if (node.isExcluded) return; + for (final method in node.methods) { + method.accept(this); + } + } + + void visitObjCProtocol(ObjCProtocol node) { + if (node.isExcluded) return; + for (final method in node.methods) { + method.accept(this); + } + } + + void visitObjCCategory(ObjCCategory node) { + if (node.isExcluded) return; + for (final method in node.methods) { + method.accept(this); + } + } + + void visitCppClass(CppClass node) { + if (node.isExcluded) return; + for (final method in node.methods) { + method.accept(this); + } + for (final field in node.fields) { + field.accept(this); + } + } + + void visitField(Field node) {} + + void visitEnumConstant(EnumConstant node) {} + + void visitParameter(Parameter node) {} + + void visitObjCMethod(ObjCMethod node) {} + + void visitCppMethod(CppMethod node) {} +} + +typedef FfiVisitor = Visitor; + +/// Root AST container holding all top-level declarations. +class PublicAst { + final List declarations; + + PublicAst(this.declarations); + + factory PublicAst.fromBindings(List bindings) { + final decls = []; + for (final b in bindings) { + final shadow = _wrapBinding(b); + if (shadow != null) decls.add(shadow); + } + return PublicAst(decls); + } + + static Declaration? _wrapBinding(ast.Binding binding) { + return switch (binding) { + final ast.Struct s => Struct(s), + final ast.Union u => Union(u), + final ast.EnumClass e => EnumClass(e), + final ast.UnnamedEnumConstant c => UnnamedEnumConstant(c), + final ast.Func f => Func(f), + final ast.Global g => Global(g), + final ast.MacroConstant m => MacroConstant(m), + final ast.Typealias t => Typealias(t), + final ast.ObjCInterface i => ObjCInterface(i), + final ast.ObjCProtocol p => ObjCProtocol(p), + final ast.ObjCCategory c => ObjCCategory(c), + final ast.CppClass c => CppClass(c), + _ => null, + }; + } + + void accept(Visitor visitor) { + visitor.visitLibrary(this); + } +} + +typedef FfiAst = PublicAst; + +/// Abstract base for all public AST elements. +abstract class PublicElement { + void accept(Visitor visitor); +} + +/// Top-level declaration public AST element. +abstract class Declaration implements PublicElement { + String get originalName; + String get name; + set name(String value); + String get usr; + + bool get isExcluded; + set isExcluded(bool value); +} + +class Struct implements Declaration { + final ast.Struct _binding; + + Struct(this._binding); + + @override + String get originalName => _binding.originalName; + + @override + String get usr => _binding.usr; + + @override + String get name => _binding.symbol.oldName; + + @override + set name(String value) => _binding.symbol.oldName = value; + + @override + bool get isExcluded => _binding.userDefinedIsExcluded; + + @override + set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; + + int? get pack => _binding.pack; + set pack(int? value) => _binding.pack = value; + + List get fields => _binding.members.map(Field.new).toList(); + + @override + void accept(Visitor visitor) => visitor.visitStruct(this); +} + +class Union implements Declaration { + final ast.Union _binding; + + Union(this._binding); + + @override + String get originalName => _binding.originalName; + + @override + String get usr => _binding.usr; + + @override + String get name => _binding.symbol.oldName; + + @override + set name(String value) => _binding.symbol.oldName = value; + + @override + bool get isExcluded => _binding.userDefinedIsExcluded; + + @override + set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; + + List get fields => _binding.members.map(Field.new).toList(); + + @override + void accept(Visitor visitor) => visitor.visitUnion(this); +} + +class EnumClass implements Declaration { + final ast.EnumClass _binding; + + EnumClass(this._binding); + + @override + String get originalName => _binding.originalName; + + @override + String get usr => _binding.usr; + + @override + String get name => _binding.symbol.oldName; + + @override + set name(String value) => _binding.symbol.oldName = value; + + @override + bool get isExcluded => _binding.userDefinedIsExcluded; + + @override + set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; + + EnumStyle get style => _binding.style; + set style(EnumStyle value) => _binding.style = value; + + List get constants => + _binding.enumConstants.map(EnumConstant.new).toList(); + + @override + void accept(Visitor visitor) => visitor.visitEnum(this); +} + +class UnnamedEnumConstant implements Declaration { + final ast.UnnamedEnumConstant _binding; + + UnnamedEnumConstant(this._binding); + + @override + String get originalName => _binding.originalName; + + @override + String get usr => _binding.usr; + + @override + String get name => _binding.symbol.oldName; + + @override + set name(String value) => _binding.symbol.oldName = value; + + @override + bool get isExcluded => _binding.userDefinedIsExcluded; + + @override + set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; + + @override + void accept(Visitor visitor) => visitor.visitUnnamedEnumConstant(this); +} + +class Func implements Declaration { + final ast.Func _binding; + + Func(this._binding); + + @override + String get originalName => _binding.originalName; + + @override + String get usr => _binding.usr; + + @override + String get name => _binding.symbol.oldName; + + @override + set name(String value) => _binding.symbol.oldName = value; + + @override + bool get isExcluded => _binding.userDefinedIsExcluded; + + @override + set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; + + bool get exposeSymbolAddress => _binding.exposeSymbolAddress; + set exposeSymbolAddress(bool value) => _binding.exposeSymbolAddress = value; + + bool get exposeFunctionTypedefs => _binding.exposeFunctionTypedefs; + set exposeFunctionTypedefs(bool value) => + _binding.exposeFunctionTypedefs = value; + + bool get isLeaf => _binding.isLeaf; + set isLeaf(bool value) => _binding.isLeaf = value; + + bool get recordUse => _binding.recordUse; + set recordUse(bool value) => _binding.recordUse = value; + + List get parameters => + _binding.functionType.parameters.map(Parameter.new).toList(); + + @override + void accept(Visitor visitor) => visitor.visitFunc(this); +} + +class Global implements Declaration { + final ast.Global _binding; + + Global(this._binding); + + @override + String get originalName => _binding.originalName; + + @override + String get usr => _binding.usr; + + @override + String get name => _binding.symbol.oldName; + + @override + set name(String value) => _binding.symbol.oldName = value; + + @override + bool get isExcluded => _binding.userDefinedIsExcluded; + + @override + set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; + + bool get exposeSymbolAddress => _binding.exposeSymbolAddress; + set exposeSymbolAddress(bool value) => _binding.exposeSymbolAddress = value; + + @override + void accept(Visitor visitor) => visitor.visitGlobal(this); +} + +class MacroConstant implements Declaration { + final ast.MacroConstant _binding; + + MacroConstant(this._binding); + + @override + String get originalName => _binding.originalName; + + @override + String get usr => _binding.usr; + + @override + String get name => _binding.symbol.oldName; + + @override + set name(String value) => _binding.symbol.oldName = value; + + @override + bool get isExcluded => _binding.userDefinedIsExcluded; + + @override + set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; + + @override + void accept(Visitor visitor) => visitor.visitMacroConstant(this); +} + +class Typealias implements Declaration { + final ast.Typealias _binding; + + Typealias(this._binding); + + @override + String get originalName => _binding.originalName; + + @override + String get usr => _binding.usr; + + @override + String get name => _binding.symbol.oldName; + + @override + set name(String value) => _binding.symbol.oldName = value; + + @override + bool get isExcluded => _binding.userDefinedIsExcluded; + + @override + set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; + + @override + void accept(Visitor visitor) => visitor.visitTypealias(this); +} + +class ObjCInterface implements Declaration { + final ast.ObjCInterface _binding; + + ObjCInterface(this._binding); + + @override + String get originalName => _binding.originalName; + + @override + String get usr => _binding.usr; + + @override + String get name => _binding.symbol.oldName; + + @override + set name(String value) => _binding.symbol.oldName = value; + + @override + bool get isExcluded => _binding.userDefinedIsExcluded; + + @override + set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; + + String? get module => _binding.module; + set module(String? value) => _binding.module = value; + + List get methods => _binding.methods.map(ObjCMethod.new).toList(); + + @override + void accept(Visitor visitor) => visitor.visitObjCInterface(this); +} + +class ObjCProtocol implements Declaration { + final ast.ObjCProtocol _binding; + + ObjCProtocol(this._binding); + + @override + String get originalName => _binding.originalName; + + @override + String get usr => _binding.usr; + + @override + String get name => _binding.symbol.oldName; + + @override + set name(String value) => _binding.symbol.oldName = value; + + @override + bool get isExcluded => _binding.userDefinedIsExcluded; + + @override + set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; + + String? get module => _binding.module; + set module(String? value) => _binding.module = value; + + List get methods => _binding.methods.map(ObjCMethod.new).toList(); + + @override + void accept(Visitor visitor) => visitor.visitObjCProtocol(this); +} + +class ObjCCategory implements Declaration { + final ast.ObjCCategory _binding; + + ObjCCategory(this._binding); + + @override + String get originalName => _binding.originalName; + + @override + String get usr => _binding.usr; + + @override + String get name => _binding.symbol.oldName; + + @override + set name(String value) => _binding.symbol.oldName = value; + + @override + bool get isExcluded => _binding.userDefinedIsExcluded; + + @override + set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; + + List get methods => _binding.methods.map(ObjCMethod.new).toList(); + + @override + void accept(Visitor visitor) => visitor.visitObjCCategory(this); +} + +class CppClass implements Declaration { + final ast.CppClass _binding; + + CppClass(this._binding); + + @override + String get originalName => _binding.originalName; + + @override + String get usr => _binding.usr; + + @override + String get name => _binding.symbol.oldName; + + @override + set name(String value) => _binding.symbol.oldName = value; + + @override + bool get isExcluded => _binding.userDefinedIsExcluded; + + @override + set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; + + List get methods => _binding.methods.map(CppMethod.new).toList(); + + List get fields => _binding.fields.map(Field.new).toList(); + + @override + void accept(Visitor visitor) => visitor.visitCppClass(this); +} + +/// Member elements +class Field implements PublicElement { + final ast.CompoundMember _member; + + Field(this._member); + + String get originalName => _member.originalName; + + String get name => _member.symbol.oldName; + + set name(String value) => _member.symbol.oldName = value; + + bool get isExcluded => _member.userDefinedIsExcluded; + + set isExcluded(bool value) => _member.userDefinedIsExcluded = value; + + @override + void accept(Visitor visitor) => visitor.visitField(this); +} + +class EnumConstant implements PublicElement { + final ast.EnumConstant _constant; + + EnumConstant(this._constant); + + String? get originalName => _constant.originalName; + + String get name => _constant.symbol.oldName; + + set name(String value) => _constant.symbol.oldName = value; + + int get value => _constant.value; + + bool get isExcluded => _constant.userDefinedIsExcluded; + + set isExcluded(bool value) => _constant.userDefinedIsExcluded = value; + + @override + void accept(Visitor visitor) => visitor.visitEnumConstant(this); +} + +class Parameter implements PublicElement { + final ast.Parameter _param; + + Parameter(this._param); + + String get originalName => _param.originalName; + + String get name => _param.symbol.oldName; + + set name(String value) => _param.symbol.oldName = value; + + bool get isExcluded => _param.userDefinedIsExcluded; + + set isExcluded(bool value) => _param.userDefinedIsExcluded = value; + + @override + void accept(Visitor visitor) => visitor.visitParameter(this); +} + +class ObjCMethod implements PublicElement { + final ast.ObjCMethod _method; + + ObjCMethod(this._method); + + String get originalName => _method.originalName; + + String get name => _method.symbol.oldName; + + set name(String value) => _method.symbol.oldName = value; + + bool get isClassMethod => _method.isClassMethod; + + bool get isProperty => _method.isProperty; + + bool get isExcluded => _method.userDefinedIsExcluded; + + set isExcluded(bool value) => _method.userDefinedIsExcluded = value; + + @override + void accept(Visitor visitor) => visitor.visitObjCMethod(this); +} + +class CppMethod implements PublicElement { + final ast.CppMethod _method; + + CppMethod(this._method); + + String get originalName => _method.originalName; + + String get name => _method.name.oldName; + + set name(String value) => _method.name.oldName = value; + + bool get isExcluded => _method.userDefinedIsExcluded; + + set isExcluded(bool value) => _method.userDefinedIsExcluded = value; + + @override + void accept(Visitor visitor) => visitor.visitCppMethod(this); +} + +/// Built-in Helper Visitors +class IncludeAllVisitor extends Visitor { + const IncludeAllVisitor(); + + @override + void visitStruct(Struct node) => node.isExcluded = false; + + @override + void visitUnion(Union node) => node.isExcluded = false; + + @override + void visitEnum(EnumClass node) => node.isExcluded = false; + + @override + void visitFunc(Func node) => node.isExcluded = false; + + @override + void visitGlobal(Global node) => node.isExcluded = false; + + @override + void visitMacroConstant(MacroConstant node) => node.isExcluded = false; + + @override + void visitTypealias(Typealias node) => node.isExcluded = false; + + @override + void visitObjCInterface(ObjCInterface node) => node.isExcluded = false; + + @override + void visitObjCProtocol(ObjCProtocol node) => node.isExcluded = false; + + @override + void visitObjCCategory(ObjCCategory node) => node.isExcluded = false; + + @override + void visitCppClass(CppClass node) => node.isExcluded = false; +} + +class ExcludeAllVisitor extends Visitor { + const ExcludeAllVisitor(); + + @override + void visitStruct(Struct node) => node.isExcluded = true; + + @override + void visitUnion(Union node) => node.isExcluded = true; + + @override + void visitEnum(EnumClass node) => node.isExcluded = true; + + @override + void visitFunc(Func node) => node.isExcluded = true; + + @override + void visitGlobal(Global node) => node.isExcluded = true; + + @override + void visitMacroConstant(MacroConstant node) => node.isExcluded = true; + + @override + void visitTypealias(Typealias node) => node.isExcluded = true; + + @override + void visitObjCInterface(ObjCInterface node) => node.isExcluded = true; + + @override + void visitObjCProtocol(ObjCProtocol node) => node.isExcluded = true; + + @override + void visitObjCCategory(ObjCCategory node) => node.isExcluded = true; + + @override + void visitCppClass(CppClass node) => node.isExcluded = true; +} + +class IncludeSetVisitor extends Visitor { + final Set names; + + const IncludeSetVisitor(this.names); + + void _check(Declaration node) { + node.isExcluded = !names.contains(node.originalName); + } + + @override + void visitStruct(Struct node) => _check(node); + @override + void visitUnion(Union node) => _check(node); + @override + void visitEnum(EnumClass node) => _check(node); + @override + void visitFunc(Func node) => _check(node); + @override + void visitGlobal(Global node) => _check(node); + @override + void visitMacroConstant(MacroConstant node) => _check(node); + @override + void visitTypealias(Typealias node) => _check(node); + @override + void visitObjCInterface(ObjCInterface node) => _check(node); + @override + void visitObjCProtocol(ObjCProtocol node) => _check(node); + @override + void visitObjCCategory(ObjCCategory node) => _check(node); + @override + void visitCppClass(CppClass node) => _check(node); +} + +class RenameMapVisitor extends Visitor { + final Map renames; + + const RenameMapVisitor(this.renames); + + void _rename(Declaration node) { + if (renames.containsKey(node.originalName)) { + node.name = renames[node.originalName]!; + } + } + + @override + void visitStruct(Struct node) => _rename(node); + @override + void visitUnion(Union node) => _rename(node); + @override + void visitEnum(EnumClass node) => _rename(node); + @override + void visitFunc(Func node) => _rename(node); + @override + void visitGlobal(Global node) => _rename(node); + @override + void visitMacroConstant(MacroConstant node) => _rename(node); + @override + void visitTypealias(Typealias node) => _rename(node); + @override + void visitObjCInterface(ObjCInterface node) => _rename(node); + @override + void visitObjCProtocol(ObjCProtocol node) => _rename(node); + @override + void visitObjCCategory(ObjCCategory node) => _rename(node); + @override + void visitCppClass(CppClass node) => _rename(node); +} + +class LegacyCallbacksVisitor extends Visitor { + final Config config; + + const LegacyCallbacksVisitor(this.config); + + @override + void visitStruct(Struct node) { + if (!config.structs.include(node._binding)) { + node.isExcluded = true; + return; + } + node.name = config.structs.rename(node._binding); + final pack = config.structs.packingOverride(node._binding); + if (pack != null) { + node.pack = pack.value; + } + for (final field in node.fields) { + if (!config.structs.includeMember(node._binding, field.originalName)) { + field.isExcluded = true; + } else { + field.name = config.structs.renameMember( + node._binding, + field.originalName, + ); + } + } + } + + @override + void visitUnion(Union node) { + if (!config.unions.include(node._binding)) { + node.isExcluded = true; + return; + } + node.name = config.unions.rename(node._binding); + for (final field in node.fields) { + if (!config.unions.includeMember(node._binding, field.originalName)) { + field.isExcluded = true; + } else { + field.name = config.unions.renameMember( + node._binding, + field.originalName, + ); + } + } + } + + @override + void visitEnum(EnumClass node) { + if (!config.enums.include(node._binding)) { + node.isExcluded = true; + return; + } + node.name = config.enums.rename(node._binding); + node.style = config.enums.style(node._binding, node.style); + for (final c in node.constants) { + if (c.originalName != null && + !config.enums.includeMember(node._binding, c.originalName!)) { + c.isExcluded = true; + } else if (c.originalName != null) { + c.name = config.enums.renameMember(node._binding, c.originalName!); + } + } + } + + @override + void visitFunc(Func node) { + if (!config.functions.include(node._binding)) { + node.isExcluded = true; + return; + } + node.name = config.functions.rename(node._binding); + if (config.functions.includeSymbolAddress(node._binding)) { + node.exposeSymbolAddress = true; + } + if (config.functions.includeTypedef(node._binding)) { + node.exposeFunctionTypedefs = true; + } + if (config.functions.isLeaf(node._binding)) { + node.isLeaf = true; + } + if (config.functions.recordUse(node._binding)) { + node.recordUse = true; + } + } + + @override + void visitGlobal(Global node) { + if (!config.globals.include(node._binding)) { + node.isExcluded = true; + return; + } + node.name = config.globals.rename(node._binding); + if (config.globals.includeSymbolAddress(node._binding)) { + node.exposeSymbolAddress = true; + } + } + + @override + void visitMacroConstant(MacroConstant node) { + if (!config.macros.include(node._binding)) { + node.isExcluded = true; + } else { + node.name = config.macros.rename(node._binding); + } + } + + @override + void visitTypealias(Typealias node) { + if (!config.typedefs.include(node._binding)) { + node.isExcluded = true; + return; + } else { + node.name = config.typedefs.rename(node._binding); + } + } + + @override + void visitUnnamedEnumConstant(UnnamedEnumConstant node) { + if (!config.unnamedEnums.include(node._binding)) { + node.isExcluded = true; + } else { + node.name = config.unnamedEnums.rename(node._binding); + } + } + + @override + void visitObjCInterface(ObjCInterface node) { + final objcInterfaces = config.objectiveC?.interfaces; + if (objcInterfaces == null || !objcInterfaces.include(node._binding)) { + node.isExcluded = true; + return; + } + node.name = objcInterfaces.rename(node._binding); + final mod = objcInterfaces.module(node._binding); + if (mod != null) node.module = mod; + for (final method in node.methods) { + if (!objcInterfaces.includeMember(node._binding, method.originalName)) { + method.isExcluded = true; + } else { + method.name = objcInterfaces.renameMember( + node._binding, + method.originalName, + ); + } + } + } + + @override + void visitObjCProtocol(ObjCProtocol node) { + final objcProtocols = config.objectiveC?.protocols; + if (objcProtocols == null || !objcProtocols.include(node._binding)) { + node.isExcluded = true; + return; + } + node.name = objcProtocols.rename(node._binding); + final mod = objcProtocols.module(node._binding); + if (mod != null) node.module = mod; + for (final method in node.methods) { + if (!objcProtocols.includeMember(node._binding, method.originalName)) { + method.isExcluded = true; + } else { + method.name = objcProtocols.renameMember( + node._binding, + method.originalName, + ); + } + } + } + + @override + void visitObjCCategory(ObjCCategory node) { + final objcCategories = config.objectiveC?.categories; + if (objcCategories == null || !objcCategories.include(node._binding)) { + node.isExcluded = true; + return; + } + node.name = objcCategories.rename(node._binding); + for (final method in node.methods) { + if (!objcCategories.includeMember(node._binding, method.originalName)) { + method.isExcluded = true; + } else { + method.name = objcCategories.renameMember( + node._binding, + method.originalName, + ); + } + } + } + + @override + void visitObjCMethod(ObjCMethod node) { + // Member exclusion/renaming handled in parent ObjCInterface/ObjCCategory/ObjCProtocol. + } + + @override + void visitCppClass(CppClass node) { + final cppClasses = config.cpp?.classes; + if (cppClasses == null || !cppClasses.include(node._binding)) { + node.isExcluded = true; + return; + } + node.name = cppClasses.rename(node._binding); + } +} diff --git a/pkgs/ffigen/lib/src/visitor/apply_config_filters.dart b/pkgs/ffigen/lib/src/visitor/apply_config_filters.dart index fedcd169cf..24c5c4e262 100644 --- a/pkgs/ffigen/lib/src/visitor/apply_config_filters.dart +++ b/pkgs/ffigen/lib/src/visitor/apply_config_filters.dart @@ -17,7 +17,7 @@ class ApplyConfigFiltersVisitation extends Visitation { node.visitChildren(visitor); if (node.originalName == '') return; if (config.importedTypesByUsr.containsKey(node.usr)) return; - if (filters.include(node)) directlyIncluded.add(node); + if (!node.userDefinedIsExcluded) directlyIncluded.add(node); } @override @@ -50,13 +50,15 @@ class ApplyConfigFiltersVisitation extends Visitation { void visitObjCInterface(ObjCInterface node) { if (node.unavailable) return; final objcInterfaces = config.objectiveC?.interfaces; - if (objcInterfaces == null) return; node.filterMethods( (m) => - !m.unavailable && objcInterfaces.includeMember(node, m.originalName), + !m.userDefinedIsExcluded && + !m.unavailable && + (objcInterfaces == null || + objcInterfaces.includeMember(node, m.originalName)), ); - _visitImpl(node, objcInterfaces); + _visitImpl(node, objcInterfaces ?? const Declarations()); // If this node is included, include all its super types. if (directlyIncluded.contains(node)) { @@ -69,32 +71,34 @@ class ApplyConfigFiltersVisitation extends Visitation { @override void visitObjCCategory(ObjCCategory node) { final objcCategories = config.objectiveC?.categories; - if (objcCategories == null) return; node.filterMethods((m) { + if (m.userDefinedIsExcluded) return false; if (m.unavailable) return false; if (node.shouldCopyMethodToInterface(m)) return false; - return objcCategories.includeMember(node, m.originalName); + return objcCategories == null || + objcCategories.includeMember(node, m.originalName); }); - _visitImpl(node, objcCategories); + _visitImpl(node, objcCategories ?? const Declarations()); } @override void visitObjCProtocol(ObjCProtocol node) { if (node.unavailable) return; final objcProtocols = config.objectiveC?.protocols; - if (objcProtocols == null) return; node.filterMethods((m) { // TODO(https://github.com/dart-lang/native/issues/1149): Support class // methods on protocols if there's a use case. For now filter them. We // filter here instead of during parsing so that these methods are still // copied to any interfaces that implement the protocol. + if (m.userDefinedIsExcluded) return false; if (m.unavailable) return false; if (m.isClassMethod) return false; - return objcProtocols.includeMember(node, m.originalName); + return objcProtocols == null || + objcProtocols.includeMember(node, m.originalName); }); - _visitImpl(node, objcProtocols); + _visitImpl(node, objcProtocols ?? const Declarations()); } @override diff --git a/pkgs/ffigen/test/public_ast_visitor_test.dart b/pkgs/ffigen/test/public_ast_visitor_test.dart new file mode 100644 index 0000000000..1f73b4c162 --- /dev/null +++ b/pkgs/ffigen/test/public_ast_visitor_test.dart @@ -0,0 +1,92 @@ +// Copyright (c) 2026, 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 'package:ffigen/ffigen.dart'; +import 'package:ffigen/src/code_generator.dart' as code_gen; +import 'package:ffigen/src/header_parser.dart' as parser; +import 'package:test/test.dart'; + +import 'test_utils.dart'; + +class CustomRenamerVisitor extends Visitor { + @override + void visitFunc(Func node) { + if (node.originalName == 'func1') { + node.name = 'myCustomFunc'; + } + } + + @override + void visitStruct(Struct node) { + if (node.originalName == 'StructA') { + node.name = 'MyStructA'; + } + super.visitStruct(node); + } + + @override + void visitField(Field node) { + if (node.originalName == 'foo') { + node.name = 'bar'; + } + } +} + +class CustomExcluderVisitor extends Visitor { + @override + void visitFunc(Func node) { + if (node.originalName == 'func2') { + node.isExcluded = true; + } + } + + @override + void visitStruct(Struct node) { + if (node.originalName == 'StructB') { + node.isExcluded = true; + } + } +} + +class CustomLeafVisitor extends Visitor { + @override + void visitFunc(Func node) { + if (node.originalName == 'func1' || node.name == 'myCustomFunc') { + node.isLeaf = true; + } + } +} + +void main() { + group('Public AST Visitors Test', () { + test('Visitor renaming, excluding, and leaf setting', () { + final headerUri = Uri.file( + absPath('test/header_parser_tests/functions.h'), + ); + final generator = FfiGenerator( + headers: Headers(entryPoints: [headerUri]), + output: Output(dartFile: Uri.file('unused.dart')), + visitors: [ + const IncludeAllVisitor(), + CustomRenamerVisitor(), + CustomExcluderVisitor(), + CustomLeafVisitor(), + ], + ); + + final library = parser.parse(testContext(generator)); + + // Check that func1 was renamed to myCustomFunc and marked leaf + final customFunc = library.getBinding('myCustomFunc') as code_gen.Func; + expect(customFunc.name, 'myCustomFunc'); + expect(customFunc.isLeaf, isTrue); + + // Check that func2 was excluded + expect( + () => library.getBinding('func2'), + throwsA(isA()), + ); + }); + }); +} From 7044019377cf82b0ae269c8fa5fc14ec7a7816d9 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Mon, 20 Jul 2026 12:50:06 +1000 Subject: [PATCH 02/37] fix tests and migrate existing Dart API ffigen configs --- .../example/host_name/tool/ffigen.dart | 6 +- .../example/mini_audio/tool/ffigen.dart | 20 ++- .../example/sqlite/tool/ffigen.dart | 8 +- .../example/sqlite_no_link/tool/ffigen.dart | 5 +- .../example/sqlite_prebuilt/tool/ffigen.dart | 5 +- .../example/stb_image/tool/ffigen.dart | 8 +- pkgs/ffigen/example/add/tool/ffigen.dart | 2 +- .../example/objective_c/generate_code.dart | 7 +- .../ffigen/lib/src/public_ast/public_ast.dart | 114 +++++++++++++++--- .../native_objc_test/deprecated_test.dart | 47 +++----- 10 files changed, 145 insertions(+), 77 deletions(-) diff --git a/pkgs/code_assets/example/host_name/tool/ffigen.dart b/pkgs/code_assets/example/host_name/tool/ffigen.dart index 3d191a6305..cb281fe0d2 100644 --- a/pkgs/code_assets/example/host_name/tool/ffigen.dart +++ b/pkgs/code_assets/example/host_name/tool/ffigen.dart @@ -8,12 +8,12 @@ import 'package:ffigen/ffigen.dart'; void main() { final packageRoot = Platform.script.resolve('../'); - final functions = Functions.includeSet({'gethostname'}); + const visitors = [IncludeSetVisitor({'gethostname'})]; final FfiGenerator generator; if (Platform.isWindows) { generator = FfiGenerator( headers: Headers(entryPoints: [packageRoot.resolve('src/windows.h')]), - functions: functions, + visitors: visitors, output: Output( dartFile: packageRoot.resolve('lib/src/third_party/windows.dart'), preamble: ''' @@ -27,7 +27,7 @@ void main() { } else { generator = FfiGenerator( headers: Headers(entryPoints: [packageRoot.resolve('src/unix.h')]), - functions: functions, + visitors: visitors, output: Output( dartFile: packageRoot.resolve('lib/src/third_party/unix.dart'), preamble: ''' diff --git a/pkgs/code_assets/example/mini_audio/tool/ffigen.dart b/pkgs/code_assets/example/mini_audio/tool/ffigen.dart index 980d449568..06cc1549f0 100644 --- a/pkgs/code_assets/example/mini_audio/tool/ffigen.dart +++ b/pkgs/code_assets/example/mini_audio/tool/ffigen.dart @@ -12,21 +12,17 @@ void main() { headers: Headers( entryPoints: [packageRoot.resolve('third_party/miniaudio.h')], ), - functions: Functions( - include: (decl) => { + visitors: const [ + IncludeSetVisitor({ 'ma_engine_init', 'ma_engine_play_sound', 'ma_engine_uninit', - }.contains(decl.originalName), - recordUse: (_) => true, - ), - structs: Structs( - include: (decl) => {'ma_engine'}.contains(decl.originalName), - ), - enums: Enums( - include: (decl) => {'ma_result'}.contains(decl.originalName), - silenceWarning: true, - ), + 'ma_engine', + 'ma_result', + }), + RecordUseVisitor(), + ], + enums: const Enums(silenceWarning: true), output: Output( dartFile: packageRoot.resolve('lib/src/third_party/miniaudio.g.dart'), recordUseMapping: packageRoot.resolve( diff --git a/pkgs/code_assets/example/sqlite/tool/ffigen.dart b/pkgs/code_assets/example/sqlite/tool/ffigen.dart index 034b15b38a..2d79ac7521 100644 --- a/pkgs/code_assets/example/sqlite/tool/ffigen.dart +++ b/pkgs/code_assets/example/sqlite/tool/ffigen.dart @@ -12,10 +12,10 @@ void main() { headers: Headers( entryPoints: [packageRoot.resolve('third_party/sqlite/sqlite3.h')], ), - functions: Functions( - include: (decl) => {'sqlite3_libversion'}.contains(decl.originalName), - recordUse: (_) => true, - ), + visitors: const [ + IncludeSetVisitor({'sqlite3_libversion'}), + RecordUseVisitor(), + ], output: Output( dartFile: packageRoot.resolve('lib/src/third_party/sqlite3.g.dart'), recordUseMapping: packageRoot.resolve( diff --git a/pkgs/code_assets/example/sqlite_no_link/tool/ffigen.dart b/pkgs/code_assets/example/sqlite_no_link/tool/ffigen.dart index 96e9d1a029..7dd3809c45 100644 --- a/pkgs/code_assets/example/sqlite_no_link/tool/ffigen.dart +++ b/pkgs/code_assets/example/sqlite_no_link/tool/ffigen.dart @@ -12,7 +12,10 @@ void main() { headers: Headers( entryPoints: [packageRoot.resolve('third_party/sqlite/sqlite3.h')], ), - functions: Functions.includeSet({'sqlite3_libversion'}), + visitors: const [ + IncludeSetVisitor({'sqlite3_libversion'}), + RecordUseVisitor(), + ], output: Output( dartFile: packageRoot.resolve('lib/src/third_party/sqlite3.g.dart'), preamble: ''' diff --git a/pkgs/code_assets/example/sqlite_prebuilt/tool/ffigen.dart b/pkgs/code_assets/example/sqlite_prebuilt/tool/ffigen.dart index 96e9d1a029..7dd3809c45 100644 --- a/pkgs/code_assets/example/sqlite_prebuilt/tool/ffigen.dart +++ b/pkgs/code_assets/example/sqlite_prebuilt/tool/ffigen.dart @@ -12,7 +12,10 @@ void main() { headers: Headers( entryPoints: [packageRoot.resolve('third_party/sqlite/sqlite3.h')], ), - functions: Functions.includeSet({'sqlite3_libversion'}), + visitors: const [ + IncludeSetVisitor({'sqlite3_libversion'}), + RecordUseVisitor(), + ], output: Output( dartFile: packageRoot.resolve('lib/src/third_party/sqlite3.g.dart'), preamble: ''' diff --git a/pkgs/code_assets/example/stb_image/tool/ffigen.dart b/pkgs/code_assets/example/stb_image/tool/ffigen.dart index a1ed4b0a3b..1ce1a1e9f8 100644 --- a/pkgs/code_assets/example/stb_image/tool/ffigen.dart +++ b/pkgs/code_assets/example/stb_image/tool/ffigen.dart @@ -12,10 +12,10 @@ void main() { headers: Headers( entryPoints: [packageRoot.resolve('third_party/stb_image.h')], ), - functions: Functions( - include: (decl) => {'stbi_info'}.contains(decl.originalName), - recordUse: (_) => true, - ), + visitors: const [ + IncludeSetVisitor({'stbi_info'}), + RecordUseVisitor(), + ], output: Output( dartFile: packageRoot.resolve('lib/src/third_party/stb_image.g.dart'), recordUseMapping: packageRoot.resolve( diff --git a/pkgs/ffigen/example/add/tool/ffigen.dart b/pkgs/ffigen/example/add/tool/ffigen.dart index e87def4258..ba9e79feb5 100644 --- a/pkgs/ffigen/example/add/tool/ffigen.dart +++ b/pkgs/ffigen/example/add/tool/ffigen.dart @@ -9,7 +9,7 @@ FfiGenerator getConfig(Uri packageRoot) { return FfiGenerator( output: Output(dartFile: packageRoot.resolve('lib/add.g.dart')), headers: Headers(entryPoints: [packageRoot.resolve('src/add.h')]), - functions: Functions.includeSet({'add'}), + visitors: [const IncludeSetVisitor({'add'})], ); } diff --git a/pkgs/ffigen/example/objective_c/generate_code.dart b/pkgs/ffigen/example/objective_c/generate_code.dart index f4091a58e9..1b916a7265 100644 --- a/pkgs/ffigen/example/objective_c/generate_code.dart +++ b/pkgs/ffigen/example/objective_c/generate_code.dart @@ -21,11 +21,8 @@ final config = FfiGenerator( // To tell FFIgen to generate Objective-C bindings, rather than C bindings, // set the objectiveC field to a non-null value. - objectiveC: ObjectiveC( - // The interfaces field is used to tell FFIgen which interfaces to generate - // bindings for. There's also a protocols and a categories field. - interfaces: Interfaces.includeSet({'AVAudioPlayer'}), - ), + objectiveC: const ObjectiveC(), + visitors: const [IncludeSetVisitor({'AVAudioPlayer'})], output: Output( // The Dart file where the bindings will be generated. diff --git a/pkgs/ffigen/lib/src/public_ast/public_ast.dart b/pkgs/ffigen/lib/src/public_ast/public_ast.dart index 2ed1739408..c0202d4824 100644 --- a/pkgs/ffigen/lib/src/public_ast/public_ast.dart +++ b/pkgs/ffigen/lib/src/public_ast/public_ast.dart @@ -733,6 +733,29 @@ class IncludeSetVisitor extends Visitor { void visitCppClass(CppClass node) => _check(node); } +class RecordUseVisitor extends Visitor { + const RecordUseVisitor(); + + @override + void visitFunc(Func node) { + node.recordUse = true; + } +} + +class ExposeSymbolAddressVisitor extends Visitor { + const ExposeSymbolAddressVisitor(); + + @override + void visitFunc(Func node) { + node.exposeSymbolAddress = true; + } + + @override + void visitGlobal(Global node) { + node.exposeSymbolAddress = true; + } +} + class RenameMapVisitor extends Visitor { final Map renames; @@ -779,7 +802,10 @@ class LegacyCallbacksVisitor extends Visitor { node.isExcluded = true; return; } - node.name = config.structs.rename(node._binding); + final renamed = config.structs.rename(node._binding); + if (renamed != node.originalName) { + node.name = renamed; + } final pack = config.structs.packingOverride(node._binding); if (pack != null) { node.pack = pack.value; @@ -788,10 +814,13 @@ class LegacyCallbacksVisitor extends Visitor { if (!config.structs.includeMember(node._binding, field.originalName)) { field.isExcluded = true; } else { - field.name = config.structs.renameMember( + final fieldRenamed = config.structs.renameMember( node._binding, field.originalName, ); + if (fieldRenamed != field.originalName) { + field.name = fieldRenamed; + } } } } @@ -802,15 +831,21 @@ class LegacyCallbacksVisitor extends Visitor { node.isExcluded = true; return; } - node.name = config.unions.rename(node._binding); + final renamed = config.unions.rename(node._binding); + if (renamed != node.originalName) { + node.name = renamed; + } for (final field in node.fields) { if (!config.unions.includeMember(node._binding, field.originalName)) { field.isExcluded = true; } else { - field.name = config.unions.renameMember( + final fieldRenamed = config.unions.renameMember( node._binding, field.originalName, ); + if (fieldRenamed != field.originalName) { + field.name = fieldRenamed; + } } } } @@ -821,14 +856,20 @@ class LegacyCallbacksVisitor extends Visitor { node.isExcluded = true; return; } - node.name = config.enums.rename(node._binding); + final renamed = config.enums.rename(node._binding); + if (renamed != node.originalName) { + node.name = renamed; + } node.style = config.enums.style(node._binding, node.style); for (final c in node.constants) { if (c.originalName != null && !config.enums.includeMember(node._binding, c.originalName!)) { c.isExcluded = true; } else if (c.originalName != null) { - c.name = config.enums.renameMember(node._binding, c.originalName!); + final cRenamed = config.enums.renameMember(node._binding, c.originalName!); + if (cRenamed != c.originalName) { + c.name = cRenamed; + } } } } @@ -839,7 +880,10 @@ class LegacyCallbacksVisitor extends Visitor { node.isExcluded = true; return; } - node.name = config.functions.rename(node._binding); + final renamed = config.functions.rename(node._binding); + if (renamed != node.originalName) { + node.name = renamed; + } if (config.functions.includeSymbolAddress(node._binding)) { node.exposeSymbolAddress = true; } @@ -860,7 +904,10 @@ class LegacyCallbacksVisitor extends Visitor { node.isExcluded = true; return; } - node.name = config.globals.rename(node._binding); + final renamed = config.globals.rename(node._binding); + if (renamed != node.originalName) { + node.name = renamed; + } if (config.globals.includeSymbolAddress(node._binding)) { node.exposeSymbolAddress = true; } @@ -871,7 +918,10 @@ class LegacyCallbacksVisitor extends Visitor { if (!config.macros.include(node._binding)) { node.isExcluded = true; } else { - node.name = config.macros.rename(node._binding); + final renamed = config.macros.rename(node._binding); + if (renamed != node.originalName) { + node.name = renamed; + } } } @@ -879,9 +929,11 @@ class LegacyCallbacksVisitor extends Visitor { void visitTypealias(Typealias node) { if (!config.typedefs.include(node._binding)) { node.isExcluded = true; - return; } else { - node.name = config.typedefs.rename(node._binding); + final renamed = config.typedefs.rename(node._binding); + if (renamed != node.originalName) { + node.name = renamed; + } } } @@ -890,7 +942,10 @@ class LegacyCallbacksVisitor extends Visitor { if (!config.unnamedEnums.include(node._binding)) { node.isExcluded = true; } else { - node.name = config.unnamedEnums.rename(node._binding); + final renamed = config.unnamedEnums.rename(node._binding); + if (renamed != node.originalName) { + node.name = renamed; + } } } @@ -901,17 +956,23 @@ class LegacyCallbacksVisitor extends Visitor { node.isExcluded = true; return; } - node.name = objcInterfaces.rename(node._binding); + final renamed = objcInterfaces.rename(node._binding); + if (renamed != node.originalName) { + node.name = renamed; + } final mod = objcInterfaces.module(node._binding); if (mod != null) node.module = mod; for (final method in node.methods) { if (!objcInterfaces.includeMember(node._binding, method.originalName)) { method.isExcluded = true; } else { - method.name = objcInterfaces.renameMember( + final methodRenamed = objcInterfaces.renameMember( node._binding, method.originalName, ); + if (methodRenamed != method.originalName) { + method.name = methodRenamed; + } } } } @@ -923,17 +984,23 @@ class LegacyCallbacksVisitor extends Visitor { node.isExcluded = true; return; } - node.name = objcProtocols.rename(node._binding); + final renamed = objcProtocols.rename(node._binding); + if (renamed != node.originalName) { + node.name = renamed; + } final mod = objcProtocols.module(node._binding); if (mod != null) node.module = mod; for (final method in node.methods) { if (!objcProtocols.includeMember(node._binding, method.originalName)) { method.isExcluded = true; } else { - method.name = objcProtocols.renameMember( + final methodRenamed = objcProtocols.renameMember( node._binding, method.originalName, ); + if (methodRenamed != method.originalName) { + method.name = methodRenamed; + } } } } @@ -945,15 +1012,21 @@ class LegacyCallbacksVisitor extends Visitor { node.isExcluded = true; return; } - node.name = objcCategories.rename(node._binding); + final renamed = objcCategories.rename(node._binding); + if (renamed != node.originalName) { + node.name = renamed; + } for (final method in node.methods) { if (!objcCategories.includeMember(node._binding, method.originalName)) { method.isExcluded = true; } else { - method.name = objcCategories.renameMember( + final methodRenamed = objcCategories.renameMember( node._binding, method.originalName, ); + if (methodRenamed != method.originalName) { + method.name = methodRenamed; + } } } } @@ -970,6 +1043,9 @@ class LegacyCallbacksVisitor extends Visitor { node.isExcluded = true; return; } - node.name = cppClasses.rename(node._binding); + final renamed = cppClasses.rename(node._binding); + if (renamed != node.originalName) { + node.name = renamed; + } } } diff --git a/pkgs/ffigen/test/native_objc_test/deprecated_test.dart b/pkgs/ffigen/test/native_objc_test/deprecated_test.dart index 2b86a6fc69..e48c04dfd0 100644 --- a/pkgs/ffigen/test/native_objc_test/deprecated_test.dart +++ b/pkgs/ffigen/test/native_objc_test/deprecated_test.dart @@ -45,35 +45,28 @@ String bindingsForVersion({Versions? iosVers, Versions? macosVers}) { ], ), objectiveC: ObjectiveC( - interfaces: Interfaces( - include: (decl) => { - 'DeprecatedInterfaceMethods', - 'DeprecatedInterface', - }.contains(decl.originalName), - ), - protocols: Protocols( - include: (decl) => { - 'DeprecatedProtocolMethods', - 'DeprecatedProtocol', - }.contains(decl.originalName), - ), - categories: Categories( - include: (decl) => { - 'DeprecatedCategoryMethods', - 'DeprecatedCategory', - }.contains(decl.originalName), - includeTransitive: false, - ), externalVersions: ExternalVersions(ios: iosVers, macos: macosVers), ), - functions: Functions.includeSet({'normalFunction', 'deprecatedFunction'}), - structs: Structs.includeSet({'NormalStruct', 'DeprecatedStruct'}), - unions: Unions.includeSet({'NormalUnion', 'DeprecatedUnion'}), - enums: Enums.includeSet({'NormalEnum', 'DeprecatedEnum'}), - unnamedEnums: UnnamedEnums.includeSet({ - 'normalUnnamedEnum', - 'deprecatedUnnamedEnum', - }), + visitors: [ + const IncludeSetVisitor({ + 'DeprecatedInterfaceMethods', + 'DeprecatedInterface', + 'DeprecatedProtocolMethods', + 'DeprecatedProtocol', + 'DeprecatedCategoryMethods', + 'DeprecatedCategory', + 'normalFunction', + 'deprecatedFunction', + 'NormalStruct', + 'DeprecatedStruct', + 'NormalUnion', + 'DeprecatedUnion', + 'NormalEnum', + 'DeprecatedEnum', + 'normalUnnamedEnum', + 'deprecatedUnnamedEnum', + }), + ], ).generate(logger: createTestLogger()); final file = path.join( packagePathForTests, From 39c2a1b13e02f2935044c338e79357ea899d8f5b Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Mon, 20 Jul 2026 13:11:00 +1000 Subject: [PATCH 03/37] nits --- pkgs/ffigen/example/add/tool/ffigen.dart | 4 +- .../example/objective_c/generate_code.dart | 4 +- pkgs/ffigen/hook/build.dart | 2 + pkgs/ffigen/lib/ffigen.dart | 2 +- .../ffigen/lib/src/public_ast/public_ast.dart | 88 ++++++++++++------- 5 files changed, 63 insertions(+), 37 deletions(-) diff --git a/pkgs/ffigen/example/add/tool/ffigen.dart b/pkgs/ffigen/example/add/tool/ffigen.dart index ba9e79feb5..210acdb2c3 100644 --- a/pkgs/ffigen/example/add/tool/ffigen.dart +++ b/pkgs/ffigen/example/add/tool/ffigen.dart @@ -9,7 +9,9 @@ FfiGenerator getConfig(Uri packageRoot) { return FfiGenerator( output: Output(dartFile: packageRoot.resolve('lib/add.g.dart')), headers: Headers(entryPoints: [packageRoot.resolve('src/add.h')]), - visitors: [const IncludeSetVisitor({'add'})], + visitors: [ + const IncludeSetVisitor({'add'}), + ], ); } diff --git a/pkgs/ffigen/example/objective_c/generate_code.dart b/pkgs/ffigen/example/objective_c/generate_code.dart index 1b916a7265..fa5143d73b 100644 --- a/pkgs/ffigen/example/objective_c/generate_code.dart +++ b/pkgs/ffigen/example/objective_c/generate_code.dart @@ -22,7 +22,9 @@ final config = FfiGenerator( // To tell FFIgen to generate Objective-C bindings, rather than C bindings, // set the objectiveC field to a non-null value. objectiveC: const ObjectiveC(), - visitors: const [IncludeSetVisitor({'AVAudioPlayer'})], + visitors: const [ + IncludeSetVisitor({'AVAudioPlayer'}), + ], output: Output( // The Dart file where the bindings will be generated. diff --git a/pkgs/ffigen/hook/build.dart b/pkgs/ffigen/hook/build.dart index 4c1f5b4555..eb4b9bd781 100644 --- a/pkgs/ffigen/hook/build.dart +++ b/pkgs/ffigen/hook/build.dart @@ -127,6 +127,8 @@ void main(List args) async { // flags, so we need to use the CustomBuilder again. final mFiles = _findFiles(objcTestDir, '.m') .where((uri) => !uri.pathSegments.last.contains('swift_class_test')) + .where((uri) => !uri.pathSegments.last.contains('sdk_variable_test')) + .where((uri) => !uri.pathSegments.last.contains('_bindings.')) .toList(); final hFiles = _findFiles(objcTestDir, '.h'); diff --git a/pkgs/ffigen/lib/ffigen.dart b/pkgs/ffigen/lib/ffigen.dart index ff118d7f4c..17b5857086 100644 --- a/pkgs/ffigen/lib/ffigen.dart +++ b/pkgs/ffigen/lib/ffigen.dart @@ -56,4 +56,4 @@ export 'src/config_provider.dart' macSdkUri, xcodePath, xcodeUri; -export 'src/public_ast/public_ast.dart' hide Declaration; +export 'src/public_ast/public_ast.dart'; diff --git a/pkgs/ffigen/lib/src/public_ast/public_ast.dart b/pkgs/ffigen/lib/src/public_ast/public_ast.dart index c0202d4824..c2c8001a5a 100644 --- a/pkgs/ffigen/lib/src/public_ast/public_ast.dart +++ b/pkgs/ffigen/lib/src/public_ast/public_ast.dart @@ -97,12 +97,12 @@ typedef FfiVisitor = Visitor; /// Root AST container holding all top-level declarations. class PublicAst { - final List declarations; + final List declarations; PublicAst(this.declarations); factory PublicAst.fromBindings(List bindings) { - final decls = []; + final decls = []; for (final b in bindings) { final shadow = _wrapBinding(b); if (shadow != null) decls.add(shadow); @@ -110,7 +110,7 @@ class PublicAst { return PublicAst(decls); } - static Declaration? _wrapBinding(ast.Binding binding) { + static Decl? _wrapBinding(ast.Binding binding) { return switch (binding) { final ast.Struct s => Struct(s), final ast.Union u => Union(u), @@ -135,13 +135,13 @@ class PublicAst { typedef FfiAst = PublicAst; -/// Abstract base for all public AST elements. -abstract class PublicElement { +/// Abstract base for all public AST nodes. +abstract class AstNode { void accept(Visitor visitor); } /// Top-level declaration public AST element. -abstract class Declaration implements PublicElement { +abstract class Decl implements AstNode { String get originalName; String get name; set name(String value); @@ -151,7 +151,7 @@ abstract class Declaration implements PublicElement { set isExcluded(bool value); } -class Struct implements Declaration { +class Struct implements Decl { final ast.Struct _binding; Struct(this._binding); @@ -183,7 +183,7 @@ class Struct implements Declaration { void accept(Visitor visitor) => visitor.visitStruct(this); } -class Union implements Declaration { +class Union implements Decl { final ast.Union _binding; Union(this._binding); @@ -212,7 +212,7 @@ class Union implements Declaration { void accept(Visitor visitor) => visitor.visitUnion(this); } -class EnumClass implements Declaration { +class EnumClass implements Decl { final ast.EnumClass _binding; EnumClass(this._binding); @@ -245,13 +245,14 @@ class EnumClass implements Declaration { void accept(Visitor visitor) => visitor.visitEnum(this); } -class UnnamedEnumConstant implements Declaration { +class UnnamedEnumConstant implements Decl { final ast.UnnamedEnumConstant _binding; UnnamedEnumConstant(this._binding); @override - String get originalName => _binding.originalName; + String get originalName => + _binding.originalName.isNotEmpty ? _binding.originalName : _binding.name; @override String get usr => _binding.usr; @@ -272,7 +273,7 @@ class UnnamedEnumConstant implements Declaration { void accept(Visitor visitor) => visitor.visitUnnamedEnumConstant(this); } -class Func implements Declaration { +class Func implements Decl { final ast.Func _binding; Func(this._binding); @@ -315,7 +316,7 @@ class Func implements Declaration { void accept(Visitor visitor) => visitor.visitFunc(this); } -class Global implements Declaration { +class Global implements Decl { final ast.Global _binding; Global(this._binding); @@ -345,13 +346,14 @@ class Global implements Declaration { void accept(Visitor visitor) => visitor.visitGlobal(this); } -class MacroConstant implements Declaration { +class MacroConstant implements Decl { final ast.MacroConstant _binding; MacroConstant(this._binding); @override - String get originalName => _binding.originalName; + String get originalName => + _binding.originalName.isNotEmpty ? _binding.originalName : _binding.name; @override String get usr => _binding.usr; @@ -372,7 +374,7 @@ class MacroConstant implements Declaration { void accept(Visitor visitor) => visitor.visitMacroConstant(this); } -class Typealias implements Declaration { +class Typealias implements Decl { final ast.Typealias _binding; Typealias(this._binding); @@ -399,7 +401,7 @@ class Typealias implements Declaration { void accept(Visitor visitor) => visitor.visitTypealias(this); } -class ObjCInterface implements Declaration { +class ObjCInterface implements Decl { final ast.ObjCInterface _binding; ObjCInterface(this._binding); @@ -431,7 +433,7 @@ class ObjCInterface implements Declaration { void accept(Visitor visitor) => visitor.visitObjCInterface(this); } -class ObjCProtocol implements Declaration { +class ObjCProtocol implements Decl { final ast.ObjCProtocol _binding; ObjCProtocol(this._binding); @@ -463,7 +465,7 @@ class ObjCProtocol implements Declaration { void accept(Visitor visitor) => visitor.visitObjCProtocol(this); } -class ObjCCategory implements Declaration { +class ObjCCategory implements Decl { final ast.ObjCCategory _binding; ObjCCategory(this._binding); @@ -492,7 +494,7 @@ class ObjCCategory implements Declaration { void accept(Visitor visitor) => visitor.visitObjCCategory(this); } -class CppClass implements Declaration { +class CppClass implements Decl { final ast.CppClass _binding; CppClass(this._binding); @@ -524,7 +526,7 @@ class CppClass implements Declaration { } /// Member elements -class Field implements PublicElement { +class Field implements AstNode { final ast.CompoundMember _member; Field(this._member); @@ -543,7 +545,7 @@ class Field implements PublicElement { void accept(Visitor visitor) => visitor.visitField(this); } -class EnumConstant implements PublicElement { +class EnumConstant implements AstNode { final ast.EnumConstant _constant; EnumConstant(this._constant); @@ -564,7 +566,7 @@ class EnumConstant implements PublicElement { void accept(Visitor visitor) => visitor.visitEnumConstant(this); } -class Parameter implements PublicElement { +class Parameter implements AstNode { final ast.Parameter _param; Parameter(this._param); @@ -583,7 +585,7 @@ class Parameter implements PublicElement { void accept(Visitor visitor) => visitor.visitParameter(this); } -class ObjCMethod implements PublicElement { +class ObjCMethod implements AstNode { final ast.ObjCMethod _method; ObjCMethod(this._method); @@ -606,7 +608,7 @@ class ObjCMethod implements PublicElement { void accept(Visitor visitor) => visitor.visitObjCMethod(this); } -class CppMethod implements PublicElement { +class CppMethod implements AstNode { final ast.CppMethod _method; CppMethod(this._method); @@ -659,6 +661,10 @@ class IncludeAllVisitor extends Visitor { @override void visitObjCCategory(ObjCCategory node) => node.isExcluded = false; + @override + void visitUnnamedEnumConstant(UnnamedEnumConstant node) => + node.isExcluded = false; + @override void visitCppClass(CppClass node) => node.isExcluded = false; } @@ -696,6 +702,10 @@ class ExcludeAllVisitor extends Visitor { @override void visitObjCCategory(ObjCCategory node) => node.isExcluded = true; + @override + void visitUnnamedEnumConstant(UnnamedEnumConstant node) => + node.isExcluded = true; + @override void visitCppClass(CppClass node) => node.isExcluded = true; } @@ -705,7 +715,7 @@ class IncludeSetVisitor extends Visitor { const IncludeSetVisitor(this.names); - void _check(Declaration node) { + void _check(Decl node) { node.isExcluded = !names.contains(node.originalName); } @@ -716,6 +726,8 @@ class IncludeSetVisitor extends Visitor { @override void visitEnum(EnumClass node) => _check(node); @override + void visitUnnamedEnumConstant(UnnamedEnumConstant node) => _check(node); + @override void visitFunc(Func node) => _check(node); @override void visitGlobal(Global node) => _check(node); @@ -761,7 +773,7 @@ class RenameMapVisitor extends Visitor { const RenameMapVisitor(this.renames); - void _rename(Declaration node) { + void _rename(Decl node) { if (renames.containsKey(node.originalName)) { node.name = renames[node.originalName]!; } @@ -774,6 +786,8 @@ class RenameMapVisitor extends Visitor { @override void visitEnum(EnumClass node) => _rename(node); @override + void visitUnnamedEnumConstant(UnnamedEnumConstant node) => _rename(node); + @override void visitFunc(Func node) => _rename(node); @override void visitGlobal(Global node) => _rename(node); @@ -866,7 +880,10 @@ class LegacyCallbacksVisitor extends Visitor { !config.enums.includeMember(node._binding, c.originalName!)) { c.isExcluded = true; } else if (c.originalName != null) { - final cRenamed = config.enums.renameMember(node._binding, c.originalName!); + final cRenamed = config.enums.renameMember( + node._binding, + c.originalName!, + ); if (cRenamed != c.originalName) { c.name = cRenamed; } @@ -965,13 +982,14 @@ class LegacyCallbacksVisitor extends Visitor { for (final method in node.methods) { if (!objcInterfaces.includeMember(node._binding, method.originalName)) { method.isExcluded = true; - } else { + } else if (objcInterfaces.renameMember != + Declarations.useMemberOriginalName) { final methodRenamed = objcInterfaces.renameMember( node._binding, method.originalName, ); if (methodRenamed != method.originalName) { - method.name = methodRenamed; + method.name = methodRenamed.split(':').first; } } } @@ -993,13 +1011,14 @@ class LegacyCallbacksVisitor extends Visitor { for (final method in node.methods) { if (!objcProtocols.includeMember(node._binding, method.originalName)) { method.isExcluded = true; - } else { + } else if (objcProtocols.renameMember != + Declarations.useMemberOriginalName) { final methodRenamed = objcProtocols.renameMember( node._binding, method.originalName, ); if (methodRenamed != method.originalName) { - method.name = methodRenamed; + method.name = methodRenamed.split(':').first; } } } @@ -1019,13 +1038,14 @@ class LegacyCallbacksVisitor extends Visitor { for (final method in node.methods) { if (!objcCategories.includeMember(node._binding, method.originalName)) { method.isExcluded = true; - } else { + } else if (objcCategories.renameMember != + Declarations.useMemberOriginalName) { final methodRenamed = objcCategories.renameMember( node._binding, method.originalName, ); if (methodRenamed != method.originalName) { - method.name = methodRenamed; + method.name = methodRenamed.split(':').first; } } } From bd69dfe30fd860aa699c5a5e37269b4720b8396e Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Tue, 21 Jul 2026 14:57:53 +1000 Subject: [PATCH 04/37] fix tests --- pkgs/ffigen/hook/build.dart | 1 - .../lib/src/code_generator/binding.dart | 2 +- .../lib/src/code_generator/compound.dart | 2 +- .../lib/src/code_generator/cpp_class.dart | 2 +- .../lib/src/code_generator/enum_class.dart | 2 +- pkgs/ffigen/lib/src/code_generator/func.dart | 2 +- .../lib/src/code_generator/objc_category.dart | 3 +- .../lib/src/code_generator/objc_methods.dart | 2 +- .../lib/src/config_provider/config.dart | 5 +- .../lib/src/config_provider/config_types.dart | 16 ++- pkgs/ffigen/lib/src/header_parser/parser.dart | 5 +- .../ffigen/lib/src/public_ast/public_ast.dart | 116 ++++++++---------- .../lib/src/visitor/apply_config_filters.dart | 48 ++++++-- .../ffigen/lib/src/visitor/list_bindings.dart | 23 +++- .../native_objc_test/deprecated_test.dart | 1 + 15 files changed, 128 insertions(+), 102 deletions(-) diff --git a/pkgs/ffigen/hook/build.dart b/pkgs/ffigen/hook/build.dart index eb4b9bd781..9ad39beda6 100644 --- a/pkgs/ffigen/hook/build.dart +++ b/pkgs/ffigen/hook/build.dart @@ -128,7 +128,6 @@ void main(List args) async { final mFiles = _findFiles(objcTestDir, '.m') .where((uri) => !uri.pathSegments.last.contains('swift_class_test')) .where((uri) => !uri.pathSegments.last.contains('sdk_variable_test')) - .where((uri) => !uri.pathSegments.last.contains('_bindings.')) .toList(); final hFiles = _findFiles(objcTestDir, '.h'); diff --git a/pkgs/ffigen/lib/src/code_generator/binding.dart b/pkgs/ffigen/lib/src/code_generator/binding.dart index 5ff573930a..0e027d498d 100644 --- a/pkgs/ffigen/lib/src/code_generator/binding.dart +++ b/pkgs/ffigen/lib/src/code_generator/binding.dart @@ -33,7 +33,7 @@ abstract class Binding extends AstNode implements Declaration { final bool isInternal; /// Whether this binding was explicitly excluded by a user visitor or filter. - bool userDefinedIsExcluded = false; + bool? userDefinedIsExcluded; /// Whether these bindings should be generated. /// diff --git a/pkgs/ffigen/lib/src/code_generator/compound.dart b/pkgs/ffigen/lib/src/code_generator/compound.dart index aa27b9156b..ee83bbda0f 100644 --- a/pkgs/ffigen/lib/src/code_generator/compound.dart +++ b/pkgs/ffigen/lib/src/code_generator/compound.dart @@ -255,7 +255,7 @@ class CompoundMember extends AstNode { final String? dartDoc; final String originalName; final Type type; - bool userDefinedIsExcluded = false; + bool? userDefinedIsExcluded; final Symbol _symbol; Symbol get symbol => _symbol; diff --git a/pkgs/ffigen/lib/src/code_generator/cpp_class.dart b/pkgs/ffigen/lib/src/code_generator/cpp_class.dart index 520b1f1ebf..8fdf72e8c4 100644 --- a/pkgs/ffigen/lib/src/code_generator/cpp_class.dart +++ b/pkgs/ffigen/lib/src/code_generator/cpp_class.dart @@ -23,7 +23,7 @@ class CppMethod extends AstNode with HasLocalScope { final bool isConstant; final bool isStatic; final CppMethodKind kind; - bool userDefinedIsExcluded = false; + bool? userDefinedIsExcluded; CppMethod({ required this.name, diff --git a/pkgs/ffigen/lib/src/code_generator/enum_class.dart b/pkgs/ffigen/lib/src/code_generator/enum_class.dart index c5332f4143..9a23889415 100644 --- a/pkgs/ffigen/lib/src/code_generator/enum_class.dart +++ b/pkgs/ffigen/lib/src/code_generator/enum_class.dart @@ -307,7 +307,7 @@ class EnumConstant extends AstNode { final String? originalName; final String? dartDoc; final int value; - bool userDefinedIsExcluded = false; + bool? userDefinedIsExcluded; final Symbol _symbol; Symbol get symbol => _symbol; diff --git a/pkgs/ffigen/lib/src/code_generator/func.dart b/pkgs/ffigen/lib/src/code_generator/func.dart index 2db90dc4ae..2ee495b7c2 100644 --- a/pkgs/ffigen/lib/src/code_generator/func.dart +++ b/pkgs/ffigen/lib/src/code_generator/func.dart @@ -289,7 +289,7 @@ class Parameter extends AstNode { final String originalName; Type type; final bool objCConsumed; - bool userDefinedIsExcluded = false; + bool? userDefinedIsExcluded; Symbol symbol; String get name => symbol.name; diff --git a/pkgs/ffigen/lib/src/code_generator/objc_category.dart b/pkgs/ffigen/lib/src/code_generator/objc_category.dart index 9dc5235389..99eec4feda 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_category.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_category.dart @@ -37,8 +37,9 @@ class ObjCCategory extends NoLookUpBinding with ObjCMethods, HasLocalScope { } bool shouldCopyMethodToInterface(ObjCMethod method) { + if (parent.isObjCImport) return false; if (originalName.isEmpty) return true; - return method.returnsInstanceType && !parent.isObjCImport; + return method.returnsInstanceType; } @override diff --git a/pkgs/ffigen/lib/src/code_generator/objc_methods.dart b/pkgs/ffigen/lib/src/code_generator/objc_methods.dart index a06aa11b0e..d8d76783cb 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_methods.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_methods.dart @@ -183,7 +183,7 @@ class ObjCMethod extends AstNode with HasLocalScope { final String? dartDoc; final String originalName; Symbol symbol; - bool userDefinedIsExcluded = false; + bool? userDefinedIsExcluded; final String originalProtocolMethodName; Type returnType; final List _params; diff --git a/pkgs/ffigen/lib/src/config_provider/config.dart b/pkgs/ffigen/lib/src/config_provider/config.dart index 8ac9a99907..1ec3f18482 100644 --- a/pkgs/ffigen/lib/src/config_provider/config.dart +++ b/pkgs/ffigen/lib/src/config_provider/config.dart @@ -614,7 +614,10 @@ final class Categories extends Declarations { this.includeTransitive = true, }); - static const excludeAll = Categories(include: Declarations.excludeAll); + static const excludeAll = Categories( + include: Declarations.excludeAll, + includeTransitive: false, + ); static const includeAll = Categories(include: Declarations.includeAll); diff --git a/pkgs/ffigen/lib/src/config_provider/config_types.dart b/pkgs/ffigen/lib/src/config_provider/config_types.dart index 0d356ac7a0..11a8b7397a 100644 --- a/pkgs/ffigen/lib/src/config_provider/config_types.dart +++ b/pkgs/ffigen/lib/src/config_provider/config_types.dart @@ -352,20 +352,26 @@ class YamlMemberIncluder { }) : _memberIncluderFull = memberIncluderFull ?? {}, _memberIncluderMatchers = memberIncluderMatchers ?? []; - bool shouldInclude(String declaration, String member) { + bool shouldInclude( + String declaration, + String member, [ + bool excludeAllByDefault = false, + ]) { // Full matches take priority. final fullMatch = _memberIncluderFull[declaration]; - if (fullMatch != null) return fullMatch.shouldInclude(member); + if (fullMatch != null) { + return fullMatch.shouldInclude(member, excludeAllByDefault); + } // Check regex matchers. for (final (re, includer) in _memberIncluderMatchers) { if (quiver.matchesFull(re, declaration)) { - return includer.shouldInclude(member); + return includer.shouldInclude(member, excludeAllByDefault); } } - // By default, include all members. - return true; + // By default, include all members unless excludeAllByDefault is true. + return !excludeAllByDefault; } } diff --git a/pkgs/ffigen/lib/src/header_parser/parser.dart b/pkgs/ffigen/lib/src/header_parser/parser.dart index c13210d8f6..f2dfd337c0 100644 --- a/pkgs/ffigen/lib/src/header_parser/parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/parser.dart @@ -187,9 +187,8 @@ List transformBindings(List rawBindings, Context context) { final applyConfigFiltersVisitation = ApplyConfigFiltersVisitation(config); visit(context, applyConfigFiltersVisitation, allBindings); final directlyIncluded = applyConfigFiltersVisitation.directlyIncluded; - final included = directlyIncluded.union( - applyConfigFiltersVisitation.indirectlyIncluded, - ); + final indirectlyIncluded = applyConfigFiltersVisitation.indirectlyIncluded; + final included = directlyIncluded.union(indirectlyIncluded); final byValueCompounds = visit( context, diff --git a/pkgs/ffigen/lib/src/public_ast/public_ast.dart b/pkgs/ffigen/lib/src/public_ast/public_ast.dart index c2c8001a5a..98c1112d82 100644 --- a/pkgs/ffigen/lib/src/public_ast/public_ast.dart +++ b/pkgs/ffigen/lib/src/public_ast/public_ast.dart @@ -169,7 +169,7 @@ class Struct implements Decl { set name(String value) => _binding.symbol.oldName = value; @override - bool get isExcluded => _binding.userDefinedIsExcluded; + bool get isExcluded => _binding.userDefinedIsExcluded ?? false; @override set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; @@ -201,7 +201,7 @@ class Union implements Decl { set name(String value) => _binding.symbol.oldName = value; @override - bool get isExcluded => _binding.userDefinedIsExcluded; + bool get isExcluded => _binding.userDefinedIsExcluded ?? false; @override set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; @@ -230,7 +230,7 @@ class EnumClass implements Decl { set name(String value) => _binding.symbol.oldName = value; @override - bool get isExcluded => _binding.userDefinedIsExcluded; + bool get isExcluded => _binding.userDefinedIsExcluded ?? false; @override set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; @@ -264,7 +264,7 @@ class UnnamedEnumConstant implements Decl { set name(String value) => _binding.symbol.oldName = value; @override - bool get isExcluded => _binding.userDefinedIsExcluded; + bool get isExcluded => _binding.userDefinedIsExcluded ?? false; @override set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; @@ -291,7 +291,7 @@ class Func implements Decl { set name(String value) => _binding.symbol.oldName = value; @override - bool get isExcluded => _binding.userDefinedIsExcluded; + bool get isExcluded => _binding.userDefinedIsExcluded ?? false; @override set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; @@ -334,7 +334,7 @@ class Global implements Decl { set name(String value) => _binding.symbol.oldName = value; @override - bool get isExcluded => _binding.userDefinedIsExcluded; + bool get isExcluded => _binding.userDefinedIsExcluded ?? false; @override set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; @@ -365,7 +365,7 @@ class MacroConstant implements Decl { set name(String value) => _binding.symbol.oldName = value; @override - bool get isExcluded => _binding.userDefinedIsExcluded; + bool get isExcluded => _binding.userDefinedIsExcluded ?? false; @override set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; @@ -392,7 +392,7 @@ class Typealias implements Decl { set name(String value) => _binding.symbol.oldName = value; @override - bool get isExcluded => _binding.userDefinedIsExcluded; + bool get isExcluded => _binding.userDefinedIsExcluded ?? false; @override set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; @@ -419,7 +419,7 @@ class ObjCInterface implements Decl { set name(String value) => _binding.symbol.oldName = value; @override - bool get isExcluded => _binding.userDefinedIsExcluded; + bool get isExcluded => _binding.userDefinedIsExcluded ?? false; @override set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; @@ -451,7 +451,7 @@ class ObjCProtocol implements Decl { set name(String value) => _binding.symbol.oldName = value; @override - bool get isExcluded => _binding.userDefinedIsExcluded; + bool get isExcluded => _binding.userDefinedIsExcluded ?? false; @override set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; @@ -483,7 +483,7 @@ class ObjCCategory implements Decl { set name(String value) => _binding.symbol.oldName = value; @override - bool get isExcluded => _binding.userDefinedIsExcluded; + bool get isExcluded => _binding.userDefinedIsExcluded ?? false; @override set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; @@ -512,7 +512,7 @@ class CppClass implements Decl { set name(String value) => _binding.symbol.oldName = value; @override - bool get isExcluded => _binding.userDefinedIsExcluded; + bool get isExcluded => _binding.userDefinedIsExcluded ?? false; @override set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; @@ -537,7 +537,7 @@ class Field implements AstNode { set name(String value) => _member.symbol.oldName = value; - bool get isExcluded => _member.userDefinedIsExcluded; + bool get isExcluded => _member.userDefinedIsExcluded ?? false; set isExcluded(bool value) => _member.userDefinedIsExcluded = value; @@ -558,7 +558,7 @@ class EnumConstant implements AstNode { int get value => _constant.value; - bool get isExcluded => _constant.userDefinedIsExcluded; + bool get isExcluded => _constant.userDefinedIsExcluded ?? false; set isExcluded(bool value) => _constant.userDefinedIsExcluded = value; @@ -577,7 +577,7 @@ class Parameter implements AstNode { set name(String value) => _param.symbol.oldName = value; - bool get isExcluded => _param.userDefinedIsExcluded; + bool get isExcluded => _param.userDefinedIsExcluded ?? false; set isExcluded(bool value) => _param.userDefinedIsExcluded = value; @@ -600,7 +600,7 @@ class ObjCMethod implements AstNode { bool get isProperty => _method.isProperty; - bool get isExcluded => _method.userDefinedIsExcluded; + bool get isExcluded => _method.userDefinedIsExcluded ?? false; set isExcluded(bool value) => _method.userDefinedIsExcluded = value; @@ -619,7 +619,7 @@ class CppMethod implements AstNode { set name(String value) => _method.name.oldName = value; - bool get isExcluded => _method.userDefinedIsExcluded; + bool get isExcluded => _method.userDefinedIsExcluded ?? false; set isExcluded(bool value) => _method.userDefinedIsExcluded = value; @@ -812,10 +812,8 @@ class LegacyCallbacksVisitor extends Visitor { @override void visitStruct(Struct node) { - if (!config.structs.include(node._binding)) { - node.isExcluded = true; - return; - } + if (node._binding.isInternal) return; + if (!config.structs.include(node._binding)) return; final renamed = config.structs.rename(node._binding); if (renamed != node.originalName) { node.name = renamed; @@ -841,10 +839,8 @@ class LegacyCallbacksVisitor extends Visitor { @override void visitUnion(Union node) { - if (!config.unions.include(node._binding)) { - node.isExcluded = true; - return; - } + if (node._binding.isInternal) return; + if (!config.unions.include(node._binding)) return; final renamed = config.unions.rename(node._binding); if (renamed != node.originalName) { node.name = renamed; @@ -866,10 +862,8 @@ class LegacyCallbacksVisitor extends Visitor { @override void visitEnum(EnumClass node) { - if (!config.enums.include(node._binding)) { - node.isExcluded = true; - return; - } + if (node._binding.isInternal) return; + if (!config.enums.include(node._binding)) return; final renamed = config.enums.rename(node._binding); if (renamed != node.originalName) { node.name = renamed; @@ -893,10 +887,8 @@ class LegacyCallbacksVisitor extends Visitor { @override void visitFunc(Func node) { - if (!config.functions.include(node._binding)) { - node.isExcluded = true; - return; - } + if (node._binding.isInternal) return; + if (!config.functions.include(node._binding)) return; final renamed = config.functions.rename(node._binding); if (renamed != node.originalName) { node.name = renamed; @@ -917,10 +909,8 @@ class LegacyCallbacksVisitor extends Visitor { @override void visitGlobal(Global node) { - if (!config.globals.include(node._binding)) { - node.isExcluded = true; - return; - } + if (node._binding.isInternal) return; + if (!config.globals.include(node._binding)) return; final renamed = config.globals.rename(node._binding); if (renamed != node.originalName) { node.name = renamed; @@ -932,45 +922,39 @@ class LegacyCallbacksVisitor extends Visitor { @override void visitMacroConstant(MacroConstant node) { - if (!config.macros.include(node._binding)) { - node.isExcluded = true; - } else { - final renamed = config.macros.rename(node._binding); - if (renamed != node.originalName) { - node.name = renamed; - } + if (node._binding.isInternal) return; + if (!config.macros.include(node._binding)) return; + final renamed = config.macros.rename(node._binding); + if (renamed != node.originalName) { + node.name = renamed; } } @override void visitTypealias(Typealias node) { - if (!config.typedefs.include(node._binding)) { - node.isExcluded = true; - } else { - final renamed = config.typedefs.rename(node._binding); - if (renamed != node.originalName) { - node.name = renamed; - } + if (node._binding.isInternal) return; + if (!config.typedefs.include(node._binding)) return; + final renamed = config.typedefs.rename(node._binding); + if (renamed != node.originalName) { + node.name = renamed; } } @override void visitUnnamedEnumConstant(UnnamedEnumConstant node) { - if (!config.unnamedEnums.include(node._binding)) { - node.isExcluded = true; - } else { - final renamed = config.unnamedEnums.rename(node._binding); - if (renamed != node.originalName) { - node.name = renamed; - } + if (node._binding.isInternal) return; + if (!config.unnamedEnums.include(node._binding)) return; + final renamed = config.unnamedEnums.rename(node._binding); + if (renamed != node.originalName) { + node.name = renamed; } } @override void visitObjCInterface(ObjCInterface node) { + if (node._binding.isInternal) return; final objcInterfaces = config.objectiveC?.interfaces; if (objcInterfaces == null || !objcInterfaces.include(node._binding)) { - node.isExcluded = true; return; } final renamed = objcInterfaces.rename(node._binding); @@ -997,11 +981,9 @@ class LegacyCallbacksVisitor extends Visitor { @override void visitObjCProtocol(ObjCProtocol node) { + if (node._binding.isInternal) return; final objcProtocols = config.objectiveC?.protocols; - if (objcProtocols == null || !objcProtocols.include(node._binding)) { - node.isExcluded = true; - return; - } + if (objcProtocols == null || !objcProtocols.include(node._binding)) return; final renamed = objcProtocols.rename(node._binding); if (renamed != node.originalName) { node.name = renamed; @@ -1026,9 +1008,9 @@ class LegacyCallbacksVisitor extends Visitor { @override void visitObjCCategory(ObjCCategory node) { + if (node._binding.isInternal) return; final objcCategories = config.objectiveC?.categories; if (objcCategories == null || !objcCategories.include(node._binding)) { - node.isExcluded = true; return; } final renamed = objcCategories.rename(node._binding); @@ -1058,11 +1040,9 @@ class LegacyCallbacksVisitor extends Visitor { @override void visitCppClass(CppClass node) { + if (node._binding.isInternal) return; final cppClasses = config.cpp?.classes; - if (cppClasses == null || !cppClasses.include(node._binding)) { - node.isExcluded = true; - return; - } + if (cppClasses == null) return; final renamed = cppClasses.rename(node._binding); if (renamed != node.originalName) { node.name = renamed; diff --git a/pkgs/ffigen/lib/src/visitor/apply_config_filters.dart b/pkgs/ffigen/lib/src/visitor/apply_config_filters.dart index 24c5c4e262..c3ee8ab662 100644 --- a/pkgs/ffigen/lib/src/visitor/apply_config_filters.dart +++ b/pkgs/ffigen/lib/src/visitor/apply_config_filters.dart @@ -17,7 +17,10 @@ class ApplyConfigFiltersVisitation extends Visitation { node.visitChildren(visitor); if (node.originalName == '') return; if (config.importedTypesByUsr.containsKey(node.usr)) return; - if (!node.userDefinedIsExcluded) directlyIncluded.add(node); + if (node.userDefinedIsExcluded == true) return; + if (node.userDefinedIsExcluded == false || filters.include(node)) { + directlyIncluded.add(node); + } } @override @@ -35,7 +38,12 @@ class ApplyConfigFiltersVisitation extends Visitation { @override void visitCppClass(CppClass node) { final cppClasses = config.cpp?.classes; - if (cppClasses == null) return; + if (cppClasses == null) { + if (node.userDefinedIsExcluded == false) { + directlyIncluded.add(node); + } + return; + } _visitImpl(node, cppClasses); } @@ -50,15 +58,21 @@ class ApplyConfigFiltersVisitation extends Visitation { void visitObjCInterface(ObjCInterface node) { if (node.unavailable) return; final objcInterfaces = config.objectiveC?.interfaces; + if (objcInterfaces == null) { + if (node.userDefinedIsExcluded == false) { + directlyIncluded.add(node); + } + return; + } node.filterMethods( (m) => - !m.userDefinedIsExcluded && + m.userDefinedIsExcluded != true && !m.unavailable && - (objcInterfaces == null || + (m.userDefinedIsExcluded == false || objcInterfaces.includeMember(node, m.originalName)), ); - _visitImpl(node, objcInterfaces ?? const Declarations()); + _visitImpl(node, objcInterfaces); // If this node is included, include all its super types. if (directlyIncluded.contains(node)) { @@ -71,34 +85,46 @@ class ApplyConfigFiltersVisitation extends Visitation { @override void visitObjCCategory(ObjCCategory node) { final objcCategories = config.objectiveC?.categories; + if (objcCategories == null) { + if (node.userDefinedIsExcluded == false) { + directlyIncluded.add(node); + } + return; + } node.filterMethods((m) { - if (m.userDefinedIsExcluded) return false; + if (m.userDefinedIsExcluded == true) return false; if (m.unavailable) return false; if (node.shouldCopyMethodToInterface(m)) return false; - return objcCategories == null || + return m.userDefinedIsExcluded == false || objcCategories.includeMember(node, m.originalName); }); - _visitImpl(node, objcCategories ?? const Declarations()); + _visitImpl(node, objcCategories); } @override void visitObjCProtocol(ObjCProtocol node) { if (node.unavailable) return; final objcProtocols = config.objectiveC?.protocols; + if (objcProtocols == null) { + if (node.userDefinedIsExcluded == false) { + directlyIncluded.add(node); + } + return; + } node.filterMethods((m) { // TODO(https://github.com/dart-lang/native/issues/1149): Support class // methods on protocols if there's a use case. For now filter them. We // filter here instead of during parsing so that these methods are still // copied to any interfaces that implement the protocol. - if (m.userDefinedIsExcluded) return false; + if (m.userDefinedIsExcluded == true) return false; if (m.unavailable) return false; if (m.isClassMethod) return false; - return objcProtocols == null || + return m.userDefinedIsExcluded == false || objcProtocols.includeMember(node, m.originalName); }); - _visitImpl(node, objcProtocols ?? const Declarations()); + _visitImpl(node, objcProtocols); } @override diff --git a/pkgs/ffigen/lib/src/visitor/list_bindings.dart b/pkgs/ffigen/lib/src/visitor/list_bindings.dart index 0fefb1cd34..72587c4a5b 100644 --- a/pkgs/ffigen/lib/src/visitor/list_bindings.dart +++ b/pkgs/ffigen/lib/src/visitor/list_bindings.dart @@ -35,7 +35,7 @@ class ListBindingsVisitation extends Visitation { } bool _shouldInclude(Binding node, _IncludeBehavior behavior) { - if (node.isObjCImport) return false; + if (node.isObjCImport || node.userDefinedIsExcluded == true) return false; switch (behavior) { case _IncludeBehavior.configOnly: return includes.contains(node); @@ -88,12 +88,15 @@ class ListBindingsVisitation extends Visitation { } @override - void visitObjCCategory(ObjCCategory node) => _visitImpl( - node, - config.objectiveC?.categories.includeTransitive ?? false + void visitObjCCategory(ObjCCategory node) { + final parentIncluded = includes.contains(node.parent); + final behavior = + (config.objectiveC?.categories.includeTransitive ?? false) && + parentIncluded ? _IncludeBehavior.configOrDirectTransitive - : _IncludeBehavior.configOnly, - ); + : _IncludeBehavior.configOnly; + _visitImpl(node, behavior); + } @override void visitObjCProtocol(ObjCProtocol node) { @@ -115,6 +118,14 @@ class ListBindingsVisitation extends Visitation { } } + @override + void visitStruct(Struct node) => + _visitImpl(node, _IncludeBehavior.configOrTransitive); + + @override + void visitUnion(Union node) => + _visitImpl(node, _IncludeBehavior.configOrTransitive); + @override void visitTypealias(Typealias node) { _visitImpl( diff --git a/pkgs/ffigen/test/native_objc_test/deprecated_test.dart b/pkgs/ffigen/test/native_objc_test/deprecated_test.dart index e48c04dfd0..fa44dd26cf 100644 --- a/pkgs/ffigen/test/native_objc_test/deprecated_test.dart +++ b/pkgs/ffigen/test/native_objc_test/deprecated_test.dart @@ -45,6 +45,7 @@ String bindingsForVersion({Versions? iosVers, Versions? macosVers}) { ], ), objectiveC: ObjectiveC( + categories: const Categories(includeTransitive: false), externalVersions: ExternalVersions(ios: iosVers, macos: macosVers), ), visitors: [ From 66b3ab2b2f1aed0284c05655765bffbb400f8106 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Thu, 23 Jul 2026 19:19:48 +1000 Subject: [PATCH 05/37] Delete old API, and migrate a bunch more configs --- .../ffinative/lib/generated_bindings.dart | 1 - .../libclang-example/generated_bindings.dart | 5856 ++++--- .../objective_c/avf_audio_bindings.dart | 137 +- .../lib/generated/a_shared_b_gen.dart | 13 + .../example/swift/swift_api_bindings.dart | 2 +- pkgs/ffigen/lib/ffigen.dart | 4 - .../lib/src/code_generator/binding.dart | 2 +- .../lib/src/code_generator/compound.dart | 1 + .../lib/src/code_generator/enum_class.dart | 1 + .../lib/src/code_generator/func_type.dart | 3 +- .../ffigen/lib/src/code_generator/global.dart | 7 + .../lib/src/code_generator/objc_block.dart | 17 +- .../code_generator/objc_built_in_types.dart | 24 +- .../lib/src/code_generator/objc_category.dart | 1 + .../src/code_generator/objc_interface.dart | 36 +- .../lib/src/code_generator/objc_protocol.dart | 54 +- .../lib/src/config_provider/config.dart | 373 +- .../lib/src/config_provider/config_types.dart | 38 +- .../lib/src/config_provider/yaml_config.dart | 509 +- pkgs/ffigen/lib/src/header_parser/parser.dart | 16 +- .../sub_parsers/classdecl_parser.dart | 18 +- .../sub_parsers/compounddecl_parser.dart | 20 +- .../sub_parsers/enumdecl_parser.dart | 9 +- .../sub_parsers/functiondecl_parser.dart | 12 +- .../sub_parsers/macro_parser.dart | 4 +- .../sub_parsers/objccategorydecl_parser.dart | 13 +- .../sub_parsers/objcinterfacedecl_parser.dart | 33 +- .../sub_parsers/objcprotocoldecl_parser.dart | 15 +- .../sub_parsers/typedefdecl_parser.dart | 5 +- .../sub_parsers/unnamed_enumdecl_parser.dart | 6 +- .../header_parser/sub_parsers/var_parser.dart | 34 +- .../ffigen/lib/src/public_ast/public_ast.dart | 263 +- .../lib/src/visitor/apply_config_filters.dart | 85 +- .../src/visitor/fill_method_dependencies.dart | 8 + .../ffigen/lib/src/visitor/list_bindings.dart | 14 +- .../lib/src/visitor/opaque_compounds.dart | 2 +- .../code_generator_test.dart | 9 +- .../decl_decl_collision_test.dart | 7 +- .../decl_symbol_address_collision_test.dart | 7 +- .../reserved_keyword_collision_test.dart | 11 +- ...expected_opaque_dependencies_bindings.dart | 48 +- .../function_n_struct_test.dart | 9 +- .../header_parser_tests/globals_test.dart | 9 +- .../header_parser_tests/record_use_test.dart | 20 +- .../test/header_parser_tests/sort_test.dart | 8 +- .../static_const_test.dart | 2 +- .../_expected_cjson_bindings.dart | 1295 -- .../_expected_sqlite_bindings.dart | 14427 ---------------- .../large_objc_test.dart | 139 +- .../large_integration_tests/large_test.dart | 72 +- .../native_cpp_test/verify_bindings_test.dart | 12 +- .../block_annotation_test.dart | 8 +- .../block_annotation_test_bindings.dart | 224 +- .../category_test_bindings.dart | 1197 +- .../native_objc_test/category_test_bindings.m | 77 - .../property_test_bindings.dart | 13 +- .../protocol_test_bindings.dart | 37 + .../sdk_variable_test_bindings.dart | 5236 +++++- pkgs/ffigen/test/test_utils.dart | 6 +- .../test/unit_tests/config_util_test.dart | 50 +- .../objc_inheritance_edge_case_test.dart | 6 +- pkgs/ffigen/tool/generate_code.dart | 189 + pkgs/ffigen/tool/libclang_config.yaml | 147 - .../tool/ffigen.dart | 10 +- pkgs/jni/ffigen.yaml | 165 - .../third_party/global_env_extensions.dart | 541 +- .../third_party/jni_bindings_generated.dart | 208 +- pkgs/jni/tool/generate_ffi_bindings.dart | 239 +- pkgs/objective_c/ffigen_c.yaml | 51 - pkgs/objective_c/ffigen_objc.yaml | 192 - pkgs/objective_c/ffigen_runtime.yaml | 71 - .../lib/src/c_bindings_generated.dart | 18 + .../src/objective_c_bindings_exported.dart | 19 + .../src/objective_c_bindings_generated.dart | 12518 +++++++++----- .../src/objective_c_bindings_generated.m | 72 +- .../test/interface_lists_test.dart | 8 +- pkgs/objective_c/tool/generate_code.dart | 650 +- 77 files changed, 19476 insertions(+), 26187 deletions(-) delete mode 100644 pkgs/ffigen/test/native_objc_test/category_test_bindings.m create mode 100644 pkgs/ffigen/tool/generate_code.dart delete mode 100644 pkgs/ffigen/tool/libclang_config.yaml delete mode 100644 pkgs/jni/ffigen.yaml delete mode 100644 pkgs/objective_c/ffigen_c.yaml delete mode 100644 pkgs/objective_c/ffigen_objc.yaml delete mode 100644 pkgs/objective_c/ffigen_runtime.yaml diff --git a/pkgs/ffigen/example/ffinative/lib/generated_bindings.dart b/pkgs/ffigen/example/ffinative/lib/generated_bindings.dart index 04ba758de0..1df75ba58a 100644 --- a/pkgs/ffigen/example/ffinative/lib/generated_bindings.dart +++ b/pkgs/ffigen/example/ffinative/lib/generated_bindings.dart @@ -24,7 +24,6 @@ external ffi.Pointer divide(int a, int b); @ffi.Native Function(ffi.Float, ffi.Float)>() external ffi.Pointer dividePrecision(double a, double b); -/// Version of the native C library @ffi.Native>() external final ffi.Pointer library_version; diff --git a/pkgs/ffigen/example/libclang-example/generated_bindings.dart b/pkgs/ffigen/example/libclang-example/generated_bindings.dart index 207c7c3e0d..6bba59bdc5 100644 --- a/pkgs/ffigen/example/libclang-example/generated_bindings.dart +++ b/pkgs/ffigen/example/libclang-example/generated_bindings.dart @@ -32,11 +32,11 @@ class LibClang { } late final _clang_CXCursorSet_containsPtr = - _lookup>( - 'clang_CXCursorSet_contains', - ); + _lookup< + ffi.NativeFunction + >('clang_CXCursorSet_contains'); late final _clang_CXCursorSet_contains = _clang_CXCursorSet_containsPtr - .asFunction(); + .asFunction(); /// Inserts a CXCursor into a CXCursorSet. /// @@ -46,11 +46,11 @@ class LibClang { } late final _clang_CXCursorSet_insertPtr = - _lookup>( - 'clang_CXCursorSet_insert', - ); + _lookup< + ffi.NativeFunction + >('clang_CXCursorSet_insert'); late final _clang_CXCursorSet_insert = _clang_CXCursorSet_insertPtr - .asFunction(); + .asFunction(); /// Gets the general options associated with a CXIndex. /// @@ -61,12 +61,11 @@ class LibClang { } late final _clang_CXIndex_getGlobalOptionsPtr = - _lookup>( + _lookup>( 'clang_CXIndex_getGlobalOptions', ); late final _clang_CXIndex_getGlobalOptions = - _clang_CXIndex_getGlobalOptionsPtr - .asFunction(); + _clang_CXIndex_getGlobalOptionsPtr.asFunction(); /// Sets general options associated with a CXIndex. /// @@ -84,12 +83,12 @@ class LibClang { } late final _clang_CXIndex_setGlobalOptionsPtr = - _lookup>( + _lookup>( 'clang_CXIndex_setGlobalOptions', ); late final _clang_CXIndex_setGlobalOptions = _clang_CXIndex_setGlobalOptionsPtr - .asFunction(); + .asFunction(); /// Sets the invocation emission path option in a CXIndex. /// @@ -105,11 +104,11 @@ class LibClang { late final _clang_CXIndex_setInvocationEmissionPathOptionPtr = _lookup< - ffi.NativeFunction + ffi.NativeFunction)> >('clang_CXIndex_setInvocationEmissionPathOption'); late final _clang_CXIndex_setInvocationEmissionPathOption = _clang_CXIndex_setInvocationEmissionPathOptionPtr - .asFunction(); + .asFunction)>(); /// Determine if a C++ constructor is a converting constructor. int clang_CXXConstructor_isConvertingConstructor(CXCursor C) { @@ -117,12 +116,12 @@ class LibClang { } late final _clang_CXXConstructor_isConvertingConstructorPtr = - _lookup< - ffi.NativeFunction - >('clang_CXXConstructor_isConvertingConstructor'); + _lookup>( + 'clang_CXXConstructor_isConvertingConstructor', + ); late final _clang_CXXConstructor_isConvertingConstructor = _clang_CXXConstructor_isConvertingConstructorPtr - .asFunction(); + .asFunction(); /// Determine if a C++ constructor is a copy constructor. int clang_CXXConstructor_isCopyConstructor(CXCursor C) { @@ -130,12 +129,12 @@ class LibClang { } late final _clang_CXXConstructor_isCopyConstructorPtr = - _lookup>( + _lookup>( 'clang_CXXConstructor_isCopyConstructor', ); late final _clang_CXXConstructor_isCopyConstructor = _clang_CXXConstructor_isCopyConstructorPtr - .asFunction(); + .asFunction(); /// Determine if a C++ constructor is the default constructor. int clang_CXXConstructor_isDefaultConstructor(CXCursor C) { @@ -143,12 +142,12 @@ class LibClang { } late final _clang_CXXConstructor_isDefaultConstructorPtr = - _lookup< - ffi.NativeFunction - >('clang_CXXConstructor_isDefaultConstructor'); + _lookup>( + 'clang_CXXConstructor_isDefaultConstructor', + ); late final _clang_CXXConstructor_isDefaultConstructor = _clang_CXXConstructor_isDefaultConstructorPtr - .asFunction(); + .asFunction(); /// Determine if a C++ constructor is a move constructor. int clang_CXXConstructor_isMoveConstructor(CXCursor C) { @@ -156,12 +155,12 @@ class LibClang { } late final _clang_CXXConstructor_isMoveConstructorPtr = - _lookup>( + _lookup>( 'clang_CXXConstructor_isMoveConstructor', ); late final _clang_CXXConstructor_isMoveConstructor = _clang_CXXConstructor_isMoveConstructorPtr - .asFunction(); + .asFunction(); /// Determine if a C++ field is declared 'mutable'. int clang_CXXField_isMutable(CXCursor C) { @@ -169,11 +168,11 @@ class LibClang { } late final _clang_CXXField_isMutablePtr = - _lookup>( + _lookup>( 'clang_CXXField_isMutable', ); late final _clang_CXXField_isMutable = _clang_CXXField_isMutablePtr - .asFunction(); + .asFunction(); /// Determine if a C++ member function or member function template is /// declared 'const'. @@ -182,11 +181,11 @@ class LibClang { } late final _clang_CXXMethod_isConstPtr = - _lookup>( + _lookup>( 'clang_CXXMethod_isConst', ); late final _clang_CXXMethod_isConst = _clang_CXXMethod_isConstPtr - .asFunction(); + .asFunction(); /// Determine if a C++ method is declared '= default'. int clang_CXXMethod_isDefaulted(CXCursor C) { @@ -194,11 +193,11 @@ class LibClang { } late final _clang_CXXMethod_isDefaultedPtr = - _lookup>( + _lookup>( 'clang_CXXMethod_isDefaulted', ); late final _clang_CXXMethod_isDefaulted = _clang_CXXMethod_isDefaultedPtr - .asFunction(); + .asFunction(); /// Determine if a C++ member function or member function template is /// pure virtual. @@ -207,11 +206,11 @@ class LibClang { } late final _clang_CXXMethod_isPureVirtualPtr = - _lookup>( + _lookup>( 'clang_CXXMethod_isPureVirtual', ); late final _clang_CXXMethod_isPureVirtual = _clang_CXXMethod_isPureVirtualPtr - .asFunction(); + .asFunction(); /// Determine if a C++ member function or member function template is /// declared 'static'. @@ -220,11 +219,11 @@ class LibClang { } late final _clang_CXXMethod_isStaticPtr = - _lookup>( + _lookup>( 'clang_CXXMethod_isStatic', ); late final _clang_CXXMethod_isStatic = _clang_CXXMethod_isStaticPtr - .asFunction(); + .asFunction(); /// Determine if a C++ member function or member function template is /// explicitly declared 'virtual' or if it overrides a virtual method from @@ -234,11 +233,11 @@ class LibClang { } late final _clang_CXXMethod_isVirtualPtr = - _lookup>( + _lookup>( 'clang_CXXMethod_isVirtual', ); late final _clang_CXXMethod_isVirtual = _clang_CXXMethod_isVirtualPtr - .asFunction(); + .asFunction(); /// Determine if a C++ record is abstract, i.e. whether a class or struct /// has a pure virtual member function. @@ -247,11 +246,11 @@ class LibClang { } late final _clang_CXXRecord_isAbstractPtr = - _lookup>( + _lookup>( 'clang_CXXRecord_isAbstract', ); late final _clang_CXXRecord_isAbstract = _clang_CXXRecord_isAbstractPtr - .asFunction(); + .asFunction(); /// If cursor is a statement declaration tries to evaluate the /// statement and if its variable, tries to evaluate its initializer, @@ -261,11 +260,11 @@ class LibClang { } late final _clang_Cursor_EvaluatePtr = - _lookup>( + _lookup>( 'clang_Cursor_Evaluate', ); late final _clang_Cursor_Evaluate = _clang_Cursor_EvaluatePtr - .asFunction(); + .asFunction(); /// Retrieve the argument cursor of a function or method. /// @@ -277,11 +276,11 @@ class LibClang { } late final _clang_Cursor_getArgumentPtr = - _lookup>( + _lookup>( 'clang_Cursor_getArgument', ); late final _clang_Cursor_getArgument = _clang_Cursor_getArgumentPtr - .asFunction(); + .asFunction(); /// Given a cursor that represents a documentable entity (e.g., /// declaration), return the associated \paragraph; otherwise return the @@ -291,12 +290,12 @@ class LibClang { } late final _clang_Cursor_getBriefCommentTextPtr = - _lookup>( + _lookup>( 'clang_Cursor_getBriefCommentText', ); late final _clang_Cursor_getBriefCommentText = _clang_Cursor_getBriefCommentTextPtr - .asFunction(); + .asFunction(); /// Retrieve the CXStrings representing the mangled symbols of the C++ /// constructor or destructor at the cursor. @@ -305,11 +304,11 @@ class LibClang { } late final _clang_Cursor_getCXXManglingsPtr = - _lookup>( + _lookup Function(CXCursor)>>( 'clang_Cursor_getCXXManglings', ); late final _clang_Cursor_getCXXManglings = _clang_Cursor_getCXXManglingsPtr - .asFunction(); + .asFunction Function(CXCursor)>(); /// Given a cursor that represents a declaration, return the associated /// comment's source range. The range may include multiple consecutive comments @@ -319,11 +318,11 @@ class LibClang { } late final _clang_Cursor_getCommentRangePtr = - _lookup>( + _lookup>( 'clang_Cursor_getCommentRange', ); late final _clang_Cursor_getCommentRange = _clang_Cursor_getCommentRangePtr - .asFunction(); + .asFunction(); /// Retrieve the CXString representing the mangled name of the cursor. CXString clang_Cursor_getMangling(CXCursor arg0) { @@ -331,11 +330,11 @@ class LibClang { } late final _clang_Cursor_getManglingPtr = - _lookup>( + _lookup>( 'clang_Cursor_getMangling', ); late final _clang_Cursor_getMangling = _clang_Cursor_getManglingPtr - .asFunction(); + .asFunction(); /// Given a CXCursor_ModuleImportDecl cursor, return the associated module. CXModule clang_Cursor_getModule(CXCursor C) { @@ -343,11 +342,11 @@ class LibClang { } late final _clang_Cursor_getModulePtr = - _lookup>( + _lookup>( 'clang_Cursor_getModule', ); late final _clang_Cursor_getModule = _clang_Cursor_getModulePtr - .asFunction(); + .asFunction(); /// Retrieve the number of non-variadic arguments associated with a given /// cursor. @@ -359,11 +358,11 @@ class LibClang { } late final _clang_Cursor_getNumArgumentsPtr = - _lookup>( + _lookup>( 'clang_Cursor_getNumArguments', ); late final _clang_Cursor_getNumArguments = _clang_Cursor_getNumArgumentsPtr - .asFunction(); + .asFunction(); /// Returns the number of template args of a function decl representing a /// template specialization. @@ -384,12 +383,12 @@ class LibClang { } late final _clang_Cursor_getNumTemplateArgumentsPtr = - _lookup>( + _lookup>( 'clang_Cursor_getNumTemplateArguments', ); late final _clang_Cursor_getNumTemplateArguments = _clang_Cursor_getNumTemplateArgumentsPtr - .asFunction(); + .asFunction(); /// Given a cursor that represents an Objective-C method or parameter /// declaration, return the associated Objective-C qualifiers for the return @@ -400,12 +399,12 @@ class LibClang { } late final _clang_Cursor_getObjCDeclQualifiersPtr = - _lookup>( + _lookup>( 'clang_Cursor_getObjCDeclQualifiers', ); late final _clang_Cursor_getObjCDeclQualifiers = _clang_Cursor_getObjCDeclQualifiersPtr - .asFunction(); + .asFunction(); /// Retrieve the CXStrings representing the mangled symbols of the ObjC /// class interface or implementation at the cursor. @@ -414,11 +413,11 @@ class LibClang { } late final _clang_Cursor_getObjCManglingsPtr = - _lookup>( + _lookup Function(CXCursor)>>( 'clang_Cursor_getObjCManglings', ); late final _clang_Cursor_getObjCManglings = _clang_Cursor_getObjCManglingsPtr - .asFunction(); + .asFunction Function(CXCursor)>(); /// Given a cursor that represents a property declaration, return the /// associated property attributes. The bits are formed from @@ -430,12 +429,12 @@ class LibClang { } late final _clang_Cursor_getObjCPropertyAttributesPtr = - _lookup>( - 'clang_Cursor_getObjCPropertyAttributes', - ); + _lookup< + ffi.NativeFunction + >('clang_Cursor_getObjCPropertyAttributes'); late final _clang_Cursor_getObjCPropertyAttributes = _clang_Cursor_getObjCPropertyAttributesPtr - .asFunction(); + .asFunction(); /// Given a cursor that represents a property declaration, return the /// name of the method that implements the getter. @@ -444,12 +443,12 @@ class LibClang { } late final _clang_Cursor_getObjCPropertyGetterNamePtr = - _lookup>( + _lookup>( 'clang_Cursor_getObjCPropertyGetterName', ); late final _clang_Cursor_getObjCPropertyGetterName = _clang_Cursor_getObjCPropertyGetterNamePtr - .asFunction(); + .asFunction(); /// Given a cursor that represents a property declaration, return the /// name of the method that implements the setter, if any. @@ -458,12 +457,12 @@ class LibClang { } late final _clang_Cursor_getObjCPropertySetterNamePtr = - _lookup>( + _lookup>( 'clang_Cursor_getObjCPropertySetterName', ); late final _clang_Cursor_getObjCPropertySetterName = _clang_Cursor_getObjCPropertySetterNamePtr - .asFunction(); + .asFunction(); /// If the cursor points to a selector identifier in an Objective-C /// method or message expression, this returns the selector index. @@ -479,12 +478,12 @@ class LibClang { } late final _clang_Cursor_getObjCSelectorIndexPtr = - _lookup>( + _lookup>( 'clang_Cursor_getObjCSelectorIndex', ); late final _clang_Cursor_getObjCSelectorIndex = _clang_Cursor_getObjCSelectorIndexPtr - .asFunction(); + .asFunction(); /// Return the offset of the field represented by the Cursor. /// @@ -502,11 +501,11 @@ class LibClang { } late final _clang_Cursor_getOffsetOfFieldPtr = - _lookup>( + _lookup>( 'clang_Cursor_getOffsetOfField', ); late final _clang_Cursor_getOffsetOfField = _clang_Cursor_getOffsetOfFieldPtr - .asFunction(); + .asFunction(); /// Given a cursor that represents a declaration, return the associated /// comment text, including comment markers. @@ -515,12 +514,12 @@ class LibClang { } late final _clang_Cursor_getRawCommentTextPtr = - _lookup>( + _lookup>( 'clang_Cursor_getRawCommentText', ); late final _clang_Cursor_getRawCommentText = _clang_Cursor_getRawCommentTextPtr - .asFunction(); + .asFunction(); /// Given a cursor pointing to an Objective-C message or property /// reference, or C++ method call, returns the CXType of the receiver. @@ -529,11 +528,11 @@ class LibClang { } late final _clang_Cursor_getReceiverTypePtr = - _lookup>( + _lookup>( 'clang_Cursor_getReceiverType', ); late final _clang_Cursor_getReceiverType = _clang_Cursor_getReceiverTypePtr - .asFunction(); + .asFunction(); /// Retrieve a range for a piece that forms the cursors spelling name. /// Most of the times there is only one range for the complete spelling but for @@ -553,12 +552,14 @@ class LibClang { } late final _clang_Cursor_getSpellingNameRangePtr = - _lookup>( - 'clang_Cursor_getSpellingNameRange', - ); + _lookup< + ffi.NativeFunction< + CXSourceRange Function(CXCursor, ffi.UnsignedInt, ffi.UnsignedInt) + > + >('clang_Cursor_getSpellingNameRange'); late final _clang_Cursor_getSpellingNameRange = _clang_Cursor_getSpellingNameRangePtr - .asFunction(); + .asFunction(); /// Returns the storage class for a function or variable declaration. /// @@ -569,11 +570,11 @@ class LibClang { } late final _clang_Cursor_getStorageClassPtr = - _lookup>( + _lookup>( 'clang_Cursor_getStorageClass', ); late final _clang_Cursor_getStorageClass = _clang_Cursor_getStorageClassPtr - .asFunction(); + .asFunction(); /// Retrieve the kind of the I'th template argument of the CXCursor C. /// @@ -599,12 +600,12 @@ class LibClang { } late final _clang_Cursor_getTemplateArgumentKindPtr = - _lookup>( - 'clang_Cursor_getTemplateArgumentKind', - ); + _lookup< + ffi.NativeFunction + >('clang_Cursor_getTemplateArgumentKind'); late final _clang_Cursor_getTemplateArgumentKind = _clang_Cursor_getTemplateArgumentKindPtr - .asFunction(); + .asFunction(); /// Retrieve a CXType representing the type of a TemplateArgument of a /// function decl representing a template specialization. @@ -627,12 +628,12 @@ class LibClang { } late final _clang_Cursor_getTemplateArgumentTypePtr = - _lookup>( + _lookup>( 'clang_Cursor_getTemplateArgumentType', ); late final _clang_Cursor_getTemplateArgumentType = _clang_Cursor_getTemplateArgumentTypePtr - .asFunction(); + .asFunction(); /// Retrieve the value of an Integral TemplateArgument (of a function /// decl representing a template specialization) as an unsigned long long. @@ -655,11 +656,13 @@ class LibClang { late final _clang_Cursor_getTemplateArgumentUnsignedValuePtr = _lookup< - ffi.NativeFunction + ffi.NativeFunction< + ffi.UnsignedLongLong Function(CXCursor, ffi.UnsignedInt) + > >('clang_Cursor_getTemplateArgumentUnsignedValue'); late final _clang_Cursor_getTemplateArgumentUnsignedValue = _clang_Cursor_getTemplateArgumentUnsignedValuePtr - .asFunction(); + .asFunction(); /// Retrieve the value of an Integral TemplateArgument (of a function /// decl representing a template specialization) as a signed long long. @@ -681,12 +684,12 @@ class LibClang { } late final _clang_Cursor_getTemplateArgumentValuePtr = - _lookup>( - 'clang_Cursor_getTemplateArgumentValue', - ); + _lookup< + ffi.NativeFunction + >('clang_Cursor_getTemplateArgumentValue'); late final _clang_Cursor_getTemplateArgumentValue = _clang_Cursor_getTemplateArgumentValuePtr - .asFunction(); + .asFunction(); /// Returns the translation unit that a cursor originated from. CXTranslationUnit clang_Cursor_getTranslationUnit(CXCursor arg0) { @@ -694,12 +697,12 @@ class LibClang { } late final _clang_Cursor_getTranslationUnitPtr = - _lookup>( + _lookup>( 'clang_Cursor_getTranslationUnit', ); late final _clang_Cursor_getTranslationUnit = _clang_Cursor_getTranslationUnitPtr - .asFunction(); + .asFunction(); /// Determine whether the given cursor has any attributes. int clang_Cursor_hasAttrs(CXCursor C) { @@ -707,11 +710,11 @@ class LibClang { } late final _clang_Cursor_hasAttrsPtr = - _lookup>( + _lookup>( 'clang_Cursor_hasAttrs', ); late final _clang_Cursor_hasAttrs = _clang_Cursor_hasAttrsPtr - .asFunction(); + .asFunction(); /// Determine whether the given cursor represents an anonymous /// tag or namespace @@ -720,11 +723,11 @@ class LibClang { } late final _clang_Cursor_isAnonymousPtr = - _lookup>( + _lookup>( 'clang_Cursor_isAnonymous', ); late final _clang_Cursor_isAnonymous = _clang_Cursor_isAnonymousPtr - .asFunction(); + .asFunction(); /// Determine whether the given cursor represents an anonymous record /// declaration. @@ -733,12 +736,12 @@ class LibClang { } late final _clang_Cursor_isAnonymousRecordDeclPtr = - _lookup>( + _lookup>( 'clang_Cursor_isAnonymousRecordDecl', ); late final _clang_Cursor_isAnonymousRecordDecl = _clang_Cursor_isAnonymousRecordDeclPtr - .asFunction(); + .asFunction(); /// Returns non-zero if the cursor specifies a Record member that is a /// bitfield. @@ -747,11 +750,11 @@ class LibClang { } late final _clang_Cursor_isBitFieldPtr = - _lookup>( + _lookup>( 'clang_Cursor_isBitField', ); late final _clang_Cursor_isBitField = _clang_Cursor_isBitFieldPtr - .asFunction(); + .asFunction(); /// Given a cursor pointing to a C++ method call or an Objective-C /// message, returns non-zero if the method/message is "dynamic", meaning: @@ -767,11 +770,11 @@ class LibClang { } late final _clang_Cursor_isDynamicCallPtr = - _lookup>( + _lookup>( 'clang_Cursor_isDynamicCall', ); late final _clang_Cursor_isDynamicCall = _clang_Cursor_isDynamicCallPtr - .asFunction(); + .asFunction(); /// Returns non-zero if the given cursor points to a symbol marked with /// external_source_symbol attribute. @@ -794,11 +797,25 @@ class LibClang { } late final _clang_Cursor_isExternalSymbolPtr = - _lookup>( - 'clang_Cursor_isExternalSymbol', - ); + _lookup< + ffi.NativeFunction< + ffi.UnsignedInt Function( + CXCursor, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >('clang_Cursor_isExternalSymbol'); late final _clang_Cursor_isExternalSymbol = _clang_Cursor_isExternalSymbolPtr - .asFunction(); + .asFunction< + int Function( + CXCursor, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); /// Determine whether a CXCursor that is a function declaration, is an /// inline declaration. @@ -807,12 +824,11 @@ class LibClang { } late final _clang_Cursor_isFunctionInlinedPtr = - _lookup>( + _lookup>( 'clang_Cursor_isFunctionInlined', ); late final _clang_Cursor_isFunctionInlined = - _clang_Cursor_isFunctionInlinedPtr - .asFunction(); + _clang_Cursor_isFunctionInlinedPtr.asFunction(); /// Determine whether the given cursor represents an inline namespace /// declaration. @@ -821,12 +837,11 @@ class LibClang { } late final _clang_Cursor_isInlineNamespacePtr = - _lookup>( + _lookup>( 'clang_Cursor_isInlineNamespace', ); late final _clang_Cursor_isInlineNamespace = - _clang_Cursor_isInlineNamespacePtr - .asFunction(); + _clang_Cursor_isInlineNamespacePtr.asFunction(); /// Determine whether a CXCursor that is a macro, is a /// builtin one. @@ -835,11 +850,11 @@ class LibClang { } late final _clang_Cursor_isMacroBuiltinPtr = - _lookup>( + _lookup>( 'clang_Cursor_isMacroBuiltin', ); late final _clang_Cursor_isMacroBuiltin = _clang_Cursor_isMacroBuiltinPtr - .asFunction(); + .asFunction(); /// Determine whether a CXCursor that is a macro, is /// function like. @@ -848,12 +863,11 @@ class LibClang { } late final _clang_Cursor_isMacroFunctionLikePtr = - _lookup>( + _lookup>( 'clang_Cursor_isMacroFunctionLike', ); late final _clang_Cursor_isMacroFunctionLike = - _clang_Cursor_isMacroFunctionLikePtr - .asFunction(); + _clang_Cursor_isMacroFunctionLikePtr.asFunction(); /// Returns non-zero if \p cursor is null. int clang_Cursor_isNull(CXCursor cursor) { @@ -861,11 +875,11 @@ class LibClang { } late final _clang_Cursor_isNullPtr = - _lookup>( + _lookup>( 'clang_Cursor_isNull', ); late final _clang_Cursor_isNull = _clang_Cursor_isNullPtr - .asFunction(); + .asFunction(); /// Given a cursor that represents an Objective-C method or property /// declaration, return non-zero if the declaration was affected by "\@optional". @@ -875,11 +889,11 @@ class LibClang { } late final _clang_Cursor_isObjCOptionalPtr = - _lookup>( + _lookup>( 'clang_Cursor_isObjCOptional', ); late final _clang_Cursor_isObjCOptional = _clang_Cursor_isObjCOptionalPtr - .asFunction(); + .asFunction(); /// Returns non-zero if the given cursor is a variadic function or method. int clang_Cursor_isVariadic(CXCursor C) { @@ -887,11 +901,11 @@ class LibClang { } late final _clang_Cursor_isVariadicPtr = - _lookup>( + _lookup>( 'clang_Cursor_isVariadic', ); late final _clang_Cursor_isVariadic = _clang_Cursor_isVariadicPtr - .asFunction(); + .asFunction(); /// Determine if an enum declaration refers to a scoped enum. int clang_EnumDecl_isScoped(CXCursor C) { @@ -899,11 +913,11 @@ class LibClang { } late final _clang_EnumDecl_isScopedPtr = - _lookup>( + _lookup>( 'clang_EnumDecl_isScoped', ); late final _clang_EnumDecl_isScoped = _clang_EnumDecl_isScopedPtr - .asFunction(); + .asFunction(); /// Disposes the created Eval memory. void clang_EvalResult_dispose(CXEvalResult E) { @@ -911,11 +925,11 @@ class LibClang { } late final _clang_EvalResult_disposePtr = - _lookup>( + _lookup>( 'clang_EvalResult_dispose', ); late final _clang_EvalResult_dispose = _clang_EvalResult_disposePtr - .asFunction(); + .asFunction(); /// Returns the evaluation result as double if the /// kind is double. @@ -924,11 +938,11 @@ class LibClang { } late final _clang_EvalResult_getAsDoublePtr = - _lookup>( + _lookup>( 'clang_EvalResult_getAsDouble', ); late final _clang_EvalResult_getAsDouble = _clang_EvalResult_getAsDoublePtr - .asFunction(); + .asFunction(); /// Returns the evaluation result as integer if the /// kind is Int. @@ -937,11 +951,11 @@ class LibClang { } late final _clang_EvalResult_getAsIntPtr = - _lookup>( + _lookup>( 'clang_EvalResult_getAsInt', ); late final _clang_EvalResult_getAsInt = _clang_EvalResult_getAsIntPtr - .asFunction(); + .asFunction(); /// Returns the evaluation result as a long long integer if the /// kind is Int. This prevents overflows that may happen if the result is @@ -951,12 +965,12 @@ class LibClang { } late final _clang_EvalResult_getAsLongLongPtr = - _lookup>( + _lookup>( 'clang_EvalResult_getAsLongLong', ); late final _clang_EvalResult_getAsLongLong = _clang_EvalResult_getAsLongLongPtr - .asFunction(); + .asFunction(); /// Returns the evaluation result as a constant string if the /// kind is other than Int or float. User must not free this pointer, @@ -967,11 +981,11 @@ class LibClang { } late final _clang_EvalResult_getAsStrPtr = - _lookup>( + _lookup Function(CXEvalResult)>>( 'clang_EvalResult_getAsStr', ); late final _clang_EvalResult_getAsStr = _clang_EvalResult_getAsStrPtr - .asFunction(); + .asFunction Function(CXEvalResult)>(); /// Returns the evaluation result as an unsigned integer if /// the kind is Int and clang_EvalResult_isUnsignedInt is non-zero. @@ -980,12 +994,12 @@ class LibClang { } late final _clang_EvalResult_getAsUnsignedPtr = - _lookup>( + _lookup>( 'clang_EvalResult_getAsUnsigned', ); late final _clang_EvalResult_getAsUnsigned = _clang_EvalResult_getAsUnsignedPtr - .asFunction(); + .asFunction(); /// Returns the kind of the evaluated result. CXEvalResultKind clang_EvalResult_getKind(CXEvalResult E) { @@ -993,11 +1007,11 @@ class LibClang { } late final _clang_EvalResult_getKindPtr = - _lookup>( + _lookup>( 'clang_EvalResult_getKind', ); late final _clang_EvalResult_getKind = _clang_EvalResult_getKindPtr - .asFunction(); + .asFunction(); /// Returns a non-zero value if the kind is Int and the evaluation /// result resulted in an unsigned integer. @@ -1006,12 +1020,12 @@ class LibClang { } late final _clang_EvalResult_isUnsignedIntPtr = - _lookup>( + _lookup>( 'clang_EvalResult_isUnsignedInt', ); late final _clang_EvalResult_isUnsignedInt = _clang_EvalResult_isUnsignedIntPtr - .asFunction(); + .asFunction(); /// Returns non-zero if the \c file1 and \c file2 point to the same file, /// or they are both NULL. @@ -1020,11 +1034,11 @@ class LibClang { } late final _clang_File_isEqualPtr = - _lookup>( + _lookup>( 'clang_File_isEqual', ); late final _clang_File_isEqual = _clang_File_isEqualPtr - .asFunction(); + .asFunction(); /// Returns the real path name of \c file. /// @@ -1034,11 +1048,11 @@ class LibClang { } late final _clang_File_tryGetRealPathNamePtr = - _lookup>( + _lookup>( 'clang_File_tryGetRealPathName', ); late final _clang_File_tryGetRealPathName = _clang_File_tryGetRealPathNamePtr - .asFunction(); + .asFunction(); /// An indexing action/session, to be applied to one or multiple /// translation units. @@ -1049,11 +1063,11 @@ class LibClang { } late final _clang_IndexAction_createPtr = - _lookup>( + _lookup>( 'clang_IndexAction_create', ); late final _clang_IndexAction_create = _clang_IndexAction_createPtr - .asFunction(); + .asFunction(); /// Destroy the given index action. /// @@ -1064,11 +1078,11 @@ class LibClang { } late final _clang_IndexAction_disposePtr = - _lookup>( + _lookup>( 'clang_IndexAction_dispose', ); late final _clang_IndexAction_dispose = _clang_IndexAction_disposePtr - .asFunction(); + .asFunction(); /// Returns non-zero if the given source location is in the main file of /// the corresponding translation unit. @@ -1077,11 +1091,11 @@ class LibClang { } late final _clang_Location_isFromMainFilePtr = - _lookup>( + _lookup>( 'clang_Location_isFromMainFile', ); late final _clang_Location_isFromMainFile = _clang_Location_isFromMainFilePtr - .asFunction(); + .asFunction(); /// Returns non-zero if the given source location is in a system header. int clang_Location_isInSystemHeader(CXSourceLocation location) { @@ -1089,12 +1103,12 @@ class LibClang { } late final _clang_Location_isInSystemHeaderPtr = - _lookup>( + _lookup>( 'clang_Location_isInSystemHeader', ); late final _clang_Location_isInSystemHeader = _clang_Location_isInSystemHeaderPtr - .asFunction(); + .asFunction(); /// \param Module a module object. /// @@ -1104,11 +1118,11 @@ class LibClang { } late final _clang_Module_getASTFilePtr = - _lookup>( + _lookup>( 'clang_Module_getASTFile', ); late final _clang_Module_getASTFile = _clang_Module_getASTFilePtr - .asFunction(); + .asFunction(); /// \param Module a module object. /// @@ -1118,11 +1132,11 @@ class LibClang { } late final _clang_Module_getFullNamePtr = - _lookup>( + _lookup>( 'clang_Module_getFullName', ); late final _clang_Module_getFullName = _clang_Module_getFullNamePtr - .asFunction(); + .asFunction(); /// \param Module a module object. /// @@ -1133,11 +1147,11 @@ class LibClang { } late final _clang_Module_getNamePtr = - _lookup>( + _lookup>( 'clang_Module_getName', ); late final _clang_Module_getName = _clang_Module_getNamePtr - .asFunction(); + .asFunction(); /// \param Module a module object. /// @@ -1150,12 +1164,14 @@ class LibClang { } late final _clang_Module_getNumTopLevelHeadersPtr = - _lookup>( - 'clang_Module_getNumTopLevelHeaders', - ); + _lookup< + ffi.NativeFunction< + ffi.UnsignedInt Function(CXTranslationUnit, CXModule) + > + >('clang_Module_getNumTopLevelHeaders'); late final _clang_Module_getNumTopLevelHeaders = _clang_Module_getNumTopLevelHeadersPtr - .asFunction(); + .asFunction(); /// \param Module a module object. /// @@ -1166,11 +1182,11 @@ class LibClang { } late final _clang_Module_getParentPtr = - _lookup>( + _lookup>( 'clang_Module_getParent', ); late final _clang_Module_getParent = _clang_Module_getParentPtr - .asFunction(); + .asFunction(); /// \param Module a module object. /// @@ -1186,12 +1202,14 @@ class LibClang { } late final _clang_Module_getTopLevelHeaderPtr = - _lookup>( - 'clang_Module_getTopLevelHeader', - ); + _lookup< + ffi.NativeFunction< + CXFile Function(CXTranslationUnit, CXModule, ffi.UnsignedInt) + > + >('clang_Module_getTopLevelHeader'); late final _clang_Module_getTopLevelHeader = _clang_Module_getTopLevelHeaderPtr - .asFunction(); + .asFunction(); /// \param Module a module object. /// @@ -1201,11 +1219,11 @@ class LibClang { } late final _clang_Module_isSystemPtr = - _lookup>( + _lookup>( 'clang_Module_isSystem', ); late final _clang_Module_isSystem = _clang_Module_isSystemPtr - .asFunction(); + .asFunction(); /// Release a printing policy. void clang_PrintingPolicy_dispose(CXPrintingPolicy Policy) { @@ -1213,11 +1231,11 @@ class LibClang { } late final _clang_PrintingPolicy_disposePtr = - _lookup>( + _lookup>( 'clang_PrintingPolicy_dispose', ); late final _clang_PrintingPolicy_dispose = _clang_PrintingPolicy_disposePtr - .asFunction(); + .asFunction(); /// Get a property value for the given printing policy. int clang_PrintingPolicy_getProperty( @@ -1228,12 +1246,14 @@ class LibClang { } late final _clang_PrintingPolicy_getPropertyPtr = - _lookup>( - 'clang_PrintingPolicy_getProperty', - ); + _lookup< + ffi.NativeFunction< + ffi.UnsignedInt Function(CXPrintingPolicy, ffi.UnsignedInt) + > + >('clang_PrintingPolicy_getProperty'); late final _clang_PrintingPolicy_getProperty = _clang_PrintingPolicy_getPropertyPtr - .asFunction(); + .asFunction(); /// Set a property value for the given printing policy. void clang_PrintingPolicy_setProperty( @@ -1245,12 +1265,14 @@ class LibClang { } late final _clang_PrintingPolicy_setPropertyPtr = - _lookup>( - 'clang_PrintingPolicy_setProperty', - ); + _lookup< + ffi.NativeFunction< + ffi.Void Function(CXPrintingPolicy, ffi.UnsignedInt, ffi.UnsignedInt) + > + >('clang_PrintingPolicy_setProperty'); late final _clang_PrintingPolicy_setProperty = _clang_PrintingPolicy_setPropertyPtr - .asFunction(); + .asFunction(); /// Returns non-zero if \p range is null. int clang_Range_isNull(CXSourceRange range) { @@ -1258,11 +1280,11 @@ class LibClang { } late final _clang_Range_isNullPtr = - _lookup>( + _lookup>( 'clang_Range_isNull', ); late final _clang_Range_isNull = _clang_Range_isNullPtr - .asFunction(); + .asFunction(); /// Destroy the CXTargetInfo object. void clang_TargetInfo_dispose(CXTargetInfo Info) { @@ -1270,11 +1292,11 @@ class LibClang { } late final _clang_TargetInfo_disposePtr = - _lookup>( + _lookup>( 'clang_TargetInfo_dispose', ); late final _clang_TargetInfo_dispose = _clang_TargetInfo_disposePtr - .asFunction(); + .asFunction(); /// Get the pointer width of the target in bits. /// @@ -1284,12 +1306,12 @@ class LibClang { } late final _clang_TargetInfo_getPointerWidthPtr = - _lookup>( + _lookup>( 'clang_TargetInfo_getPointerWidth', ); late final _clang_TargetInfo_getPointerWidth = _clang_TargetInfo_getPointerWidthPtr - .asFunction(); + .asFunction(); /// Get the normalized target triple as a string. /// @@ -1299,11 +1321,11 @@ class LibClang { } late final _clang_TargetInfo_getTriplePtr = - _lookup>( + _lookup>( 'clang_TargetInfo_getTriple', ); late final _clang_TargetInfo_getTriple = _clang_TargetInfo_getTriplePtr - .asFunction(); + .asFunction(); /// Return the alignment of a type in bytes as per C++[expr.alignof] /// standard. @@ -1320,11 +1342,11 @@ class LibClang { } late final _clang_Type_getAlignOfPtr = - _lookup>( + _lookup>( 'clang_Type_getAlignOf', ); late final _clang_Type_getAlignOf = _clang_Type_getAlignOfPtr - .asFunction(); + .asFunction(); /// Retrieve the ref-qualifier kind of a function or method. /// @@ -1335,11 +1357,11 @@ class LibClang { } late final _clang_Type_getCXXRefQualifierPtr = - _lookup>( + _lookup>( 'clang_Type_getCXXRefQualifier', ); late final _clang_Type_getCXXRefQualifier = _clang_Type_getCXXRefQualifierPtr - .asFunction(); + .asFunction(); /// Return the class type of an member pointer type. /// @@ -1349,11 +1371,11 @@ class LibClang { } late final _clang_Type_getClassTypePtr = - _lookup>( + _lookup>( 'clang_Type_getClassType', ); late final _clang_Type_getClassType = _clang_Type_getClassTypePtr - .asFunction(); + .asFunction(); /// Return the type that was modified by this attributed type. /// @@ -1363,11 +1385,11 @@ class LibClang { } late final _clang_Type_getModifiedTypePtr = - _lookup>( + _lookup>( 'clang_Type_getModifiedType', ); late final _clang_Type_getModifiedType = _clang_Type_getModifiedTypePtr - .asFunction(); + .asFunction(); /// Retrieve the type named by the qualified-id. /// @@ -1377,11 +1399,11 @@ class LibClang { } late final _clang_Type_getNamedTypePtr = - _lookup>( + _lookup>( 'clang_Type_getNamedType', ); late final _clang_Type_getNamedType = _clang_Type_getNamedTypePtr - .asFunction(); + .asFunction(); /// Retrieve the nullability kind of a pointer type. CXTypeNullabilityKind clang_Type_getNullability(CXType T) { @@ -1389,11 +1411,11 @@ class LibClang { } late final _clang_Type_getNullabilityPtr = - _lookup>( + _lookup>( 'clang_Type_getNullability', ); late final _clang_Type_getNullability = _clang_Type_getNullabilityPtr - .asFunction(); + .asFunction(); /// Retrieve the number of protocol references associated with an ObjC object/id. /// @@ -1403,12 +1425,11 @@ class LibClang { } late final _clang_Type_getNumObjCProtocolRefsPtr = - _lookup>( + _lookup>( 'clang_Type_getNumObjCProtocolRefs', ); late final _clang_Type_getNumObjCProtocolRefs = - _clang_Type_getNumObjCProtocolRefsPtr - .asFunction(); + _clang_Type_getNumObjCProtocolRefsPtr.asFunction(); /// Retreive the number of type arguments associated with an ObjC object. /// @@ -1418,11 +1439,11 @@ class LibClang { } late final _clang_Type_getNumObjCTypeArgsPtr = - _lookup>( + _lookup>( 'clang_Type_getNumObjCTypeArgs', ); late final _clang_Type_getNumObjCTypeArgs = _clang_Type_getNumObjCTypeArgsPtr - .asFunction(); + .asFunction(); /// Returns the number of template arguments for given template /// specialization, or -1 if type \c T is not a template specialization. @@ -1431,12 +1452,11 @@ class LibClang { } late final _clang_Type_getNumTemplateArgumentsPtr = - _lookup>( + _lookup>( 'clang_Type_getNumTemplateArguments', ); late final _clang_Type_getNumTemplateArguments = - _clang_Type_getNumTemplateArgumentsPtr - .asFunction(); + _clang_Type_getNumTemplateArgumentsPtr.asFunction(); /// Returns the Objective-C type encoding for the specified CXType. CXString clang_Type_getObjCEncoding(CXType type) { @@ -1444,11 +1464,11 @@ class LibClang { } late final _clang_Type_getObjCEncodingPtr = - _lookup>( + _lookup>( 'clang_Type_getObjCEncoding', ); late final _clang_Type_getObjCEncoding = _clang_Type_getObjCEncodingPtr - .asFunction(); + .asFunction(); /// Retrieves the base type of the ObjCObjectType. /// @@ -1458,12 +1478,12 @@ class LibClang { } late final _clang_Type_getObjCObjectBaseTypePtr = - _lookup>( + _lookup>( 'clang_Type_getObjCObjectBaseType', ); late final _clang_Type_getObjCObjectBaseType = _clang_Type_getObjCObjectBaseTypePtr - .asFunction(); + .asFunction(); /// Retrieve the decl for a protocol reference for an ObjC object/id. /// @@ -1474,12 +1494,12 @@ class LibClang { } late final _clang_Type_getObjCProtocolDeclPtr = - _lookup>( + _lookup>( 'clang_Type_getObjCProtocolDecl', ); late final _clang_Type_getObjCProtocolDecl = _clang_Type_getObjCProtocolDeclPtr - .asFunction(); + .asFunction(); /// Retrieve a type argument associated with an ObjC object. /// @@ -1490,11 +1510,11 @@ class LibClang { } late final _clang_Type_getObjCTypeArgPtr = - _lookup>( + _lookup>( 'clang_Type_getObjCTypeArg', ); late final _clang_Type_getObjCTypeArg = _clang_Type_getObjCTypeArgPtr - .asFunction(); + .asFunction(); /// Return the offset of a field named S in a record of type T in bits /// as it would be returned by __offsetof__ as per C++11[18.2p4] @@ -1512,11 +1532,11 @@ class LibClang { } late final _clang_Type_getOffsetOfPtr = - _lookup>( - 'clang_Type_getOffsetOf', - ); + _lookup< + ffi.NativeFunction)> + >('clang_Type_getOffsetOf'); late final _clang_Type_getOffsetOf = _clang_Type_getOffsetOfPtr - .asFunction(); + .asFunction)>(); /// Return the size of a type in bytes as per C++[expr.sizeof] standard. /// @@ -1530,11 +1550,11 @@ class LibClang { } late final _clang_Type_getSizeOfPtr = - _lookup>( + _lookup>( 'clang_Type_getSizeOf', ); late final _clang_Type_getSizeOf = _clang_Type_getSizeOfPtr - .asFunction(); + .asFunction(); /// Returns the type template argument of a template class specialization /// at given index. @@ -1546,12 +1566,12 @@ class LibClang { } late final _clang_Type_getTemplateArgumentAsTypePtr = - _lookup>( + _lookup>( 'clang_Type_getTemplateArgumentAsType', ); late final _clang_Type_getTemplateArgumentAsType = _clang_Type_getTemplateArgumentAsTypePtr - .asFunction(); + .asFunction(); /// Determine if a typedef is 'transparent' tag. /// @@ -1564,12 +1584,11 @@ class LibClang { } late final _clang_Type_isTransparentTagTypedefPtr = - _lookup>( + _lookup>( 'clang_Type_isTransparentTagTypedef', ); late final _clang_Type_isTransparentTagTypedef = - _clang_Type_isTransparentTagTypedefPtr - .asFunction(); + _clang_Type_isTransparentTagTypedefPtr.asFunction(); /// Visit the fields of a particular type. /// @@ -1597,11 +1616,13 @@ class LibClang { } late final _clang_Type_visitFieldsPtr = - _lookup>( - 'clang_Type_visitFields', - ); + _lookup< + ffi.NativeFunction< + ffi.UnsignedInt Function(CXType, CXFieldVisitor, CXClientData) + > + >('clang_Type_visitFields'); late final _clang_Type_visitFields = _clang_Type_visitFieldsPtr - .asFunction(); + .asFunction(); /// Annotate the given set of tokens by providing cursors for each token /// that can be mapped to a specific entity within the abstract syntax tree. @@ -1641,11 +1662,25 @@ class LibClang { } late final _clang_annotateTokensPtr = - _lookup>( - 'clang_annotateTokens', - ); + _lookup< + ffi.NativeFunction< + ffi.Void Function( + CXTranslationUnit, + ffi.Pointer, + ffi.UnsignedInt, + ffi.Pointer, + ) + > + >('clang_annotateTokens'); late final _clang_annotateTokens = _clang_annotateTokensPtr - .asFunction(); + .asFunction< + void Function( + CXTranslationUnit, + ffi.Pointer, + int, + ffi.Pointer, + ) + >(); /// Perform code completion at a given location in a translation unit. /// @@ -1734,11 +1769,31 @@ class LibClang { } late final _clang_codeCompleteAtPtr = - _lookup>( - 'clang_codeCompleteAt', - ); + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + CXTranslationUnit, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ) + > + >('clang_codeCompleteAt'); late final _clang_codeCompleteAt = _clang_codeCompleteAtPtr - .asFunction(); + .asFunction< + ffi.Pointer Function( + CXTranslationUnit, + ffi.Pointer, + int, + int, + ffi.Pointer, + int, + int, + ) + >(); /// Returns the cursor kind for the container for the current code /// completion context. The container is only guaranteed to be set for @@ -1764,12 +1819,22 @@ class LibClang { } late final _clang_codeCompleteGetContainerKindPtr = - _lookup>( - 'clang_codeCompleteGetContainerKind', - ); + _lookup< + ffi.NativeFunction< + ffi.UnsignedInt Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >('clang_codeCompleteGetContainerKind'); late final _clang_codeCompleteGetContainerKind = _clang_codeCompleteGetContainerKindPtr - .asFunction(); + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); /// Returns the USR for the container for the current code completion /// context. If there is not a container for the current context, this @@ -1785,12 +1850,14 @@ class LibClang { } late final _clang_codeCompleteGetContainerUSRPtr = - _lookup>( - 'clang_codeCompleteGetContainerUSR', - ); + _lookup< + ffi.NativeFunction< + CXString Function(ffi.Pointer) + > + >('clang_codeCompleteGetContainerUSR'); late final _clang_codeCompleteGetContainerUSR = _clang_codeCompleteGetContainerUSRPtr - .asFunction(); + .asFunction)>(); /// Determines what completions are appropriate for the context /// the given code completion. @@ -1806,11 +1873,13 @@ class LibClang { } late final _clang_codeCompleteGetContextsPtr = - _lookup>( - 'clang_codeCompleteGetContexts', - ); + _lookup< + ffi.NativeFunction< + ffi.UnsignedLongLong Function(ffi.Pointer) + > + >('clang_codeCompleteGetContexts'); late final _clang_codeCompleteGetContexts = _clang_codeCompleteGetContextsPtr - .asFunction(); + .asFunction)>(); /// Retrieve a diagnostic associated with the given code completion. /// @@ -1827,12 +1896,19 @@ class LibClang { } late final _clang_codeCompleteGetDiagnosticPtr = - _lookup>( - 'clang_codeCompleteGetDiagnostic', - ); + _lookup< + ffi.NativeFunction< + CXDiagnostic Function( + ffi.Pointer, + ffi.UnsignedInt, + ) + > + >('clang_codeCompleteGetDiagnostic'); late final _clang_codeCompleteGetDiagnostic = _clang_codeCompleteGetDiagnosticPtr - .asFunction(); + .asFunction< + CXDiagnostic Function(ffi.Pointer, int) + >(); /// Determine the number of diagnostics produced prior to the /// location where code completion was performed. @@ -1843,12 +1919,14 @@ class LibClang { } late final _clang_codeCompleteGetNumDiagnosticsPtr = - _lookup>( - 'clang_codeCompleteGetNumDiagnostics', - ); + _lookup< + ffi.NativeFunction< + ffi.UnsignedInt Function(ffi.Pointer) + > + >('clang_codeCompleteGetNumDiagnostics'); late final _clang_codeCompleteGetNumDiagnostics = _clang_codeCompleteGetNumDiagnosticsPtr - .asFunction(); + .asFunction)>(); /// Returns the currently-entered selector for an Objective-C message /// send, formatted like "initWithFoo:bar:". Only guaranteed to return a @@ -1866,12 +1944,14 @@ class LibClang { } late final _clang_codeCompleteGetObjCSelectorPtr = - _lookup>( - 'clang_codeCompleteGetObjCSelector', - ); + _lookup< + ffi.NativeFunction< + CXString Function(ffi.Pointer) + > + >('clang_codeCompleteGetObjCSelector'); late final _clang_codeCompleteGetObjCSelector = _clang_codeCompleteGetObjCSelectorPtr - .asFunction(); + .asFunction)>(); /// Construct a USR for a specified Objective-C category. CXString clang_constructUSR_ObjCCategory( @@ -1882,12 +1962,16 @@ class LibClang { } late final _clang_constructUSR_ObjCCategoryPtr = - _lookup>( - 'clang_constructUSR_ObjCCategory', - ); + _lookup< + ffi.NativeFunction< + CXString Function(ffi.Pointer, ffi.Pointer) + > + >('clang_constructUSR_ObjCCategory'); late final _clang_constructUSR_ObjCCategory = _clang_constructUSR_ObjCCategoryPtr - .asFunction(); + .asFunction< + CXString Function(ffi.Pointer, ffi.Pointer) + >(); /// Construct a USR for a specified Objective-C class. CXString clang_constructUSR_ObjCClass(ffi.Pointer class_name) { @@ -1895,11 +1979,11 @@ class LibClang { } late final _clang_constructUSR_ObjCClassPtr = - _lookup>( + _lookup)>>( 'clang_constructUSR_ObjCClass', ); late final _clang_constructUSR_ObjCClass = _clang_constructUSR_ObjCClassPtr - .asFunction(); + .asFunction)>(); /// Construct a USR for a specified Objective-C instance variable and /// the USR for its containing class. @@ -1911,11 +1995,11 @@ class LibClang { } late final _clang_constructUSR_ObjCIvarPtr = - _lookup>( - 'clang_constructUSR_ObjCIvar', - ); + _lookup< + ffi.NativeFunction, CXString)> + >('clang_constructUSR_ObjCIvar'); late final _clang_constructUSR_ObjCIvar = _clang_constructUSR_ObjCIvarPtr - .asFunction(); + .asFunction, CXString)>(); /// Construct a USR for a specified Objective-C method and /// the USR for its containing class. @@ -1928,11 +2012,13 @@ class LibClang { } late final _clang_constructUSR_ObjCMethodPtr = - _lookup>( - 'clang_constructUSR_ObjCMethod', - ); + _lookup< + ffi.NativeFunction< + CXString Function(ffi.Pointer, ffi.UnsignedInt, CXString) + > + >('clang_constructUSR_ObjCMethod'); late final _clang_constructUSR_ObjCMethod = _clang_constructUSR_ObjCMethodPtr - .asFunction(); + .asFunction, int, CXString)>(); /// Construct a USR for a specified Objective-C property and the USR /// for its containing class. @@ -1944,12 +2030,12 @@ class LibClang { } late final _clang_constructUSR_ObjCPropertyPtr = - _lookup>( - 'clang_constructUSR_ObjCProperty', - ); + _lookup< + ffi.NativeFunction, CXString)> + >('clang_constructUSR_ObjCProperty'); late final _clang_constructUSR_ObjCProperty = _clang_constructUSR_ObjCPropertyPtr - .asFunction(); + .asFunction, CXString)>(); /// Construct a USR for a specified Objective-C protocol. CXString clang_constructUSR_ObjCProtocol( @@ -1959,12 +2045,12 @@ class LibClang { } late final _clang_constructUSR_ObjCProtocolPtr = - _lookup>( + _lookup)>>( 'clang_constructUSR_ObjCProtocol', ); late final _clang_constructUSR_ObjCProtocol = _clang_constructUSR_ObjCProtocolPtr - .asFunction(); + .asFunction)>(); /// Creates an empty CXCursorSet. CXCursorSet clang_createCXCursorSet() { @@ -1972,11 +2058,11 @@ class LibClang { } late final _clang_createCXCursorSetPtr = - _lookup>( + _lookup>( 'clang_createCXCursorSet', ); late final _clang_createCXCursorSet = _clang_createCXCursorSetPtr - .asFunction(); + .asFunction(); /// Provides a shared context for creating translation units. /// @@ -2024,9 +2110,11 @@ class LibClang { } late final _clang_createIndexPtr = - _lookup>('clang_createIndex'); + _lookup>( + 'clang_createIndex', + ); late final _clang_createIndex = _clang_createIndexPtr - .asFunction(); + .asFunction(); /// Same as \c clang_createTranslationUnit2, but returns /// the \c CXTranslationUnit instead of an error code. In case of an error this @@ -2040,11 +2128,13 @@ class LibClang { } late final _clang_createTranslationUnitPtr = - _lookup>( - 'clang_createTranslationUnit', - ); + _lookup< + ffi.NativeFunction< + CXTranslationUnit Function(CXIndex, ffi.Pointer) + > + >('clang_createTranslationUnit'); late final _clang_createTranslationUnit = _clang_createTranslationUnitPtr - .asFunction(); + .asFunction)>(); /// Create a translation unit from an AST file (\c -emit-ast). /// @@ -2063,11 +2153,23 @@ class LibClang { } late final _clang_createTranslationUnit2Ptr = - _lookup>( - 'clang_createTranslationUnit2', - ); + _lookup< + ffi.NativeFunction< + ffi.UnsignedInt Function( + CXIndex, + ffi.Pointer, + ffi.Pointer, + ) + > + >('clang_createTranslationUnit2'); late final _clang_createTranslationUnit2 = _clang_createTranslationUnit2Ptr - .asFunction(); + .asFunction< + int Function( + CXIndex, + ffi.Pointer, + ffi.Pointer, + ) + >(); /// Return the CXTranslationUnit for a given source file and the provided /// command line arguments one would pass to the compiler. @@ -2127,11 +2229,29 @@ class LibClang { late final _clang_createTranslationUnitFromSourceFilePtr = _lookup< - ffi.NativeFunction + ffi.NativeFunction< + CXTranslationUnit Function( + CXIndex, + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ffi.UnsignedInt, + ffi.Pointer, + ) + > >('clang_createTranslationUnitFromSourceFile'); late final _clang_createTranslationUnitFromSourceFile = _clang_createTranslationUnitFromSourceFilePtr - .asFunction(); + .asFunction< + CXTranslationUnit Function( + CXIndex, + ffi.Pointer, + int, + ffi.Pointer>, + int, + ffi.Pointer, + ) + >(); /// Returns a default set of code-completion options that can be /// passed to\c clang_codeCompleteAt(). @@ -2140,12 +2260,11 @@ class LibClang { } late final _clang_defaultCodeCompleteOptionsPtr = - _lookup>( + _lookup>( 'clang_defaultCodeCompleteOptions', ); late final _clang_defaultCodeCompleteOptions = - _clang_defaultCodeCompleteOptionsPtr - .asFunction(); + _clang_defaultCodeCompleteOptionsPtr.asFunction(); /// Retrieve the set of display options most similar to the /// default behavior of the clang compiler. @@ -2157,12 +2276,11 @@ class LibClang { } late final _clang_defaultDiagnosticDisplayOptionsPtr = - _lookup>( + _lookup>( 'clang_defaultDiagnosticDisplayOptions', ); late final _clang_defaultDiagnosticDisplayOptions = - _clang_defaultDiagnosticDisplayOptionsPtr - .asFunction(); + _clang_defaultDiagnosticDisplayOptionsPtr.asFunction(); /// Returns the set of flags that is suitable for parsing a translation /// unit that is being edited. @@ -2179,12 +2297,12 @@ class LibClang { } late final _clang_defaultEditingTranslationUnitOptionsPtr = - _lookup< - ffi.NativeFunction - >('clang_defaultEditingTranslationUnitOptions'); + _lookup>( + 'clang_defaultEditingTranslationUnitOptions', + ); late final _clang_defaultEditingTranslationUnitOptions = _clang_defaultEditingTranslationUnitOptionsPtr - .asFunction(); + .asFunction(); /// Returns the set of flags that is suitable for reparsing a translation /// unit. @@ -2199,11 +2317,11 @@ class LibClang { } late final _clang_defaultReparseOptionsPtr = - _lookup>( + _lookup>( 'clang_defaultReparseOptions', ); late final _clang_defaultReparseOptions = _clang_defaultReparseOptionsPtr - .asFunction(); + .asFunction(); /// Returns the set of flags that is suitable for saving a translation /// unit. @@ -2217,11 +2335,11 @@ class LibClang { } late final _clang_defaultSaveOptionsPtr = - _lookup>( + _lookup>( 'clang_defaultSaveOptions', ); late final _clang_defaultSaveOptions = _clang_defaultSaveOptionsPtr - .asFunction(); + .asFunction(); /// Disposes a CXCursorSet and releases its associated memory. void clang_disposeCXCursorSet(CXCursorSet cset) { @@ -2229,11 +2347,11 @@ class LibClang { } late final _clang_disposeCXCursorSetPtr = - _lookup>( + _lookup>( 'clang_disposeCXCursorSet', ); late final _clang_disposeCXCursorSet = _clang_disposeCXCursorSetPtr - .asFunction(); + .asFunction(); /// Free the memory associated with a \c CXPlatformAvailability structure. void clang_disposeCXPlatformAvailability( @@ -2243,24 +2361,26 @@ class LibClang { } late final _clang_disposeCXPlatformAvailabilityPtr = - _lookup>( - 'clang_disposeCXPlatformAvailability', - ); + _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer) + > + >('clang_disposeCXPlatformAvailability'); late final _clang_disposeCXPlatformAvailability = _clang_disposeCXPlatformAvailabilityPtr - .asFunction(); + .asFunction)>(); void clang_disposeCXTUResourceUsage(CXTUResourceUsage usage) { return _clang_disposeCXTUResourceUsage(usage); } late final _clang_disposeCXTUResourceUsagePtr = - _lookup>( + _lookup>( 'clang_disposeCXTUResourceUsage', ); late final _clang_disposeCXTUResourceUsage = _clang_disposeCXTUResourceUsagePtr - .asFunction(); + .asFunction(); /// Free the given set of code-completion results. void clang_disposeCodeCompleteResults( @@ -2270,12 +2390,14 @@ class LibClang { } late final _clang_disposeCodeCompleteResultsPtr = - _lookup>( - 'clang_disposeCodeCompleteResults', - ); + _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer) + > + >('clang_disposeCodeCompleteResults'); late final _clang_disposeCodeCompleteResults = _clang_disposeCodeCompleteResultsPtr - .asFunction(); + .asFunction)>(); /// Destroy a diagnostic. void clang_disposeDiagnostic(CXDiagnostic Diagnostic) { @@ -2283,11 +2405,11 @@ class LibClang { } late final _clang_disposeDiagnosticPtr = - _lookup>( + _lookup>( 'clang_disposeDiagnostic', ); late final _clang_disposeDiagnostic = _clang_disposeDiagnosticPtr - .asFunction(); + .asFunction(); /// Release a CXDiagnosticSet and all of its contained diagnostics. void clang_disposeDiagnosticSet(CXDiagnosticSet Diags) { @@ -2295,11 +2417,11 @@ class LibClang { } late final _clang_disposeDiagnosticSetPtr = - _lookup>( + _lookup>( 'clang_disposeDiagnosticSet', ); late final _clang_disposeDiagnosticSet = _clang_disposeDiagnosticSetPtr - .asFunction(); + .asFunction(); /// Destroy the given index. /// @@ -2310,11 +2432,11 @@ class LibClang { } late final _clang_disposeIndexPtr = - _lookup>( + _lookup>( 'clang_disposeIndex', ); late final _clang_disposeIndex = _clang_disposeIndexPtr - .asFunction(); + .asFunction(); /// Free the set of overridden cursors returned by \c /// clang_getOverriddenCursors(). @@ -2323,12 +2445,12 @@ class LibClang { } late final _clang_disposeOverriddenCursorsPtr = - _lookup>( + _lookup)>>( 'clang_disposeOverriddenCursors', ); late final _clang_disposeOverriddenCursors = _clang_disposeOverriddenCursorsPtr - .asFunction(); + .asFunction)>(); /// Destroy the given \c CXSourceRangeList. void clang_disposeSourceRangeList(ffi.Pointer ranges) { @@ -2336,11 +2458,11 @@ class LibClang { } late final _clang_disposeSourceRangeListPtr = - _lookup>( - 'clang_disposeSourceRangeList', - ); + _lookup< + ffi.NativeFunction)> + >('clang_disposeSourceRangeList'); late final _clang_disposeSourceRangeList = _clang_disposeSourceRangeListPtr - .asFunction(); + .asFunction)>(); /// Free the given string. void clang_disposeString(CXString string) { @@ -2348,11 +2470,11 @@ class LibClang { } late final _clang_disposeStringPtr = - _lookup>( + _lookup>( 'clang_disposeString', ); late final _clang_disposeString = _clang_disposeStringPtr - .asFunction(); + .asFunction(); /// Free the given string set. void clang_disposeStringSet(ffi.Pointer set) { @@ -2360,11 +2482,11 @@ class LibClang { } late final _clang_disposeStringSetPtr = - _lookup>( + _lookup)>>( 'clang_disposeStringSet', ); late final _clang_disposeStringSet = _clang_disposeStringSetPtr - .asFunction(); + .asFunction)>(); /// Free the given set of tokens. void clang_disposeTokens( @@ -2376,11 +2498,19 @@ class LibClang { } late final _clang_disposeTokensPtr = - _lookup>( - 'clang_disposeTokens', - ); + _lookup< + ffi.NativeFunction< + ffi.Void Function( + CXTranslationUnit, + ffi.Pointer, + ffi.UnsignedInt, + ) + > + >('clang_disposeTokens'); late final _clang_disposeTokens = _clang_disposeTokensPtr - .asFunction(); + .asFunction< + void Function(CXTranslationUnit, ffi.Pointer, int) + >(); /// Destroy the specified CXTranslationUnit object. void clang_disposeTranslationUnit(CXTranslationUnit arg0) { @@ -2388,22 +2518,22 @@ class LibClang { } late final _clang_disposeTranslationUnitPtr = - _lookup>( + _lookup>( 'clang_disposeTranslationUnit', ); late final _clang_disposeTranslationUnit = _clang_disposeTranslationUnitPtr - .asFunction(); + .asFunction(); void clang_enableStackTraces() { return _clang_enableStackTraces(); } late final _clang_enableStackTracesPtr = - _lookup>( + _lookup>( 'clang_enableStackTraces', ); late final _clang_enableStackTraces = _clang_enableStackTracesPtr - .asFunction(); + .asFunction(); /// Determine whether two cursors are equivalent. int clang_equalCursors(CXCursor arg0, CXCursor arg1) { @@ -2411,11 +2541,11 @@ class LibClang { } late final _clang_equalCursorsPtr = - _lookup>( + _lookup>( 'clang_equalCursors', ); late final _clang_equalCursors = _clang_equalCursorsPtr - .asFunction(); + .asFunction(); /// Determine whether two source locations, which must refer into /// the same translation unit, refer to exactly the same point in the source @@ -2428,11 +2558,13 @@ class LibClang { } late final _clang_equalLocationsPtr = - _lookup>( - 'clang_equalLocations', - ); + _lookup< + ffi.NativeFunction< + ffi.UnsignedInt Function(CXSourceLocation, CXSourceLocation) + > + >('clang_equalLocations'); late final _clang_equalLocations = _clang_equalLocationsPtr - .asFunction(); + .asFunction(); /// Determine whether two ranges are equivalent. /// @@ -2442,9 +2574,13 @@ class LibClang { } late final _clang_equalRangesPtr = - _lookup>('clang_equalRanges'); + _lookup< + ffi.NativeFunction< + ffi.UnsignedInt Function(CXSourceRange, CXSourceRange) + > + >('clang_equalRanges'); late final _clang_equalRanges = _clang_equalRangesPtr - .asFunction(); + .asFunction(); /// Determine whether two CXTypes represent the same type. /// @@ -2455,9 +2591,11 @@ class LibClang { } late final _clang_equalTypesPtr = - _lookup>('clang_equalTypes'); + _lookup>( + 'clang_equalTypes', + ); late final _clang_equalTypes = _clang_equalTypesPtr - .asFunction(); + .asFunction(); void clang_executeOnThread( ffi.Pointer)>> @@ -2469,11 +2607,27 @@ class LibClang { } late final _clang_executeOnThreadPtr = - _lookup>( - 'clang_executeOnThread', - ); + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer< + ffi.NativeFunction)> + >, + ffi.Pointer, + ffi.UnsignedInt, + ) + > + >('clang_executeOnThread'); late final _clang_executeOnThread = _clang_executeOnThreadPtr - .asFunction(); + .asFunction< + void Function( + ffi.Pointer< + ffi.NativeFunction)> + >, + ffi.Pointer, + int, + ) + >(); /// Find #import/#include directives in a specific file. /// @@ -2494,11 +2648,19 @@ class LibClang { } late final _clang_findIncludesInFilePtr = - _lookup>( - 'clang_findIncludesInFile', - ); + _lookup< + ffi.NativeFunction< + ffi.UnsignedInt Function( + CXTranslationUnit, + CXFile, + CXCursorAndRangeVisitor, + ) + > + >('clang_findIncludesInFile'); late final _clang_findIncludesInFile = _clang_findIncludesInFilePtr - .asFunction(); + .asFunction< + int Function(CXTranslationUnit, CXFile, CXCursorAndRangeVisitor) + >(); /// Find references of a declaration in a specific file. /// @@ -2523,11 +2685,13 @@ class LibClang { } late final _clang_findReferencesInFilePtr = - _lookup>( - 'clang_findReferencesInFile', - ); + _lookup< + ffi.NativeFunction< + ffi.UnsignedInt Function(CXCursor, CXFile, CXCursorAndRangeVisitor) + > + >('clang_findReferencesInFile'); late final _clang_findReferencesInFile = _clang_findReferencesInFilePtr - .asFunction(); + .asFunction(); /// Format the given diagnostic in a manner that is suitable for display. /// @@ -2547,11 +2711,11 @@ class LibClang { } late final _clang_formatDiagnosticPtr = - _lookup>( - 'clang_formatDiagnostic', - ); + _lookup< + ffi.NativeFunction + >('clang_formatDiagnostic'); late final _clang_formatDiagnostic = _clang_formatDiagnosticPtr - .asFunction(); + .asFunction(); /// Returns the address space of the given type. int clang_getAddressSpace(CXType T) { @@ -2559,11 +2723,11 @@ class LibClang { } late final _clang_getAddressSpacePtr = - _lookup>( + _lookup>( 'clang_getAddressSpace', ); late final _clang_getAddressSpace = _clang_getAddressSpacePtr - .asFunction(); + .asFunction(); /// Retrieve all ranges from all files that were skipped by the /// preprocessor. @@ -2577,11 +2741,13 @@ class LibClang { } late final _clang_getAllSkippedRangesPtr = - _lookup>( - 'clang_getAllSkippedRanges', - ); + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(CXTranslationUnit) + > + >('clang_getAllSkippedRanges'); late final _clang_getAllSkippedRanges = _clang_getAllSkippedRangesPtr - .asFunction(); + .asFunction Function(CXTranslationUnit)>(); /// Retrieve the type of a parameter of a function type. /// @@ -2592,9 +2758,11 @@ class LibClang { } late final _clang_getArgTypePtr = - _lookup>('clang_getArgType'); + _lookup>( + 'clang_getArgType', + ); late final _clang_getArgType = _clang_getArgTypePtr - .asFunction(); + .asFunction(); /// Return the element type of an array type. /// @@ -2604,11 +2772,11 @@ class LibClang { } late final _clang_getArrayElementTypePtr = - _lookup>( + _lookup>( 'clang_getArrayElementType', ); late final _clang_getArrayElementType = _clang_getArrayElementTypePtr - .asFunction(); + .asFunction(); /// Return the array size of a constant array. /// @@ -2618,11 +2786,11 @@ class LibClang { } late final _clang_getArraySizePtr = - _lookup>( + _lookup>( 'clang_getArraySize', ); late final _clang_getArraySize = _clang_getArraySizePtr - .asFunction(); + .asFunction(); /// Retrieve the character data associated with the given string. ffi.Pointer clang_getCString(CXString string) { @@ -2630,9 +2798,11 @@ class LibClang { } late final _clang_getCStringPtr = - _lookup>('clang_getCString'); + _lookup Function(CXString)>>( + 'clang_getCString', + ); late final _clang_getCString = _clang_getCStringPtr - .asFunction(); + .asFunction Function(CXString)>(); /// Return the memory usage of a translation unit. This object /// should be released with clang_disposeCXTUResourceUsage(). @@ -2641,11 +2811,11 @@ class LibClang { } late final _clang_getCXTUResourceUsagePtr = - _lookup>( - 'clang_getCXTUResourceUsage', - ); + _lookup< + ffi.NativeFunction + >('clang_getCXTUResourceUsage'); late final _clang_getCXTUResourceUsage = _clang_getCXTUResourceUsagePtr - .asFunction(); + .asFunction(); /// Returns the access control level for the referenced object. /// @@ -2657,11 +2827,11 @@ class LibClang { } late final _clang_getCXXAccessSpecifierPtr = - _lookup>( + _lookup>( 'clang_getCXXAccessSpecifier', ); late final _clang_getCXXAccessSpecifier = _clang_getCXXAccessSpecifierPtr - .asFunction(); + .asFunction(); /// Retrieve the canonical cursor corresponding to the given cursor. /// @@ -2690,11 +2860,11 @@ class LibClang { } late final _clang_getCanonicalCursorPtr = - _lookup>( + _lookup>( 'clang_getCanonicalCursor', ); late final _clang_getCanonicalCursor = _clang_getCanonicalCursorPtr - .asFunction(); + .asFunction(); /// Return the canonical type for a CXType. /// @@ -2707,11 +2877,11 @@ class LibClang { } late final _clang_getCanonicalTypePtr = - _lookup>( + _lookup>( 'clang_getCanonicalType', ); late final _clang_getCanonicalType = _clang_getCanonicalTypePtr - .asFunction(); + .asFunction(); /// Retrieve the child diagnostics of a CXDiagnostic. /// @@ -2722,11 +2892,11 @@ class LibClang { } late final _clang_getChildDiagnosticsPtr = - _lookup>( + _lookup>( 'clang_getChildDiagnostics', ); late final _clang_getChildDiagnostics = _clang_getChildDiagnosticsPtr - .asFunction(); + .asFunction(); /// Return a version string, suitable for showing to a user, but not /// intended to be parsed (the format is not guaranteed to be stable). @@ -2735,11 +2905,9 @@ class LibClang { } late final _clang_getClangVersionPtr = - _lookup>( - 'clang_getClangVersion', - ); + _lookup>('clang_getClangVersion'); late final _clang_getClangVersion = _clang_getClangVersionPtr - .asFunction(); + .asFunction(); /// Retrieve the annotation associated with the given completion string. /// @@ -2758,11 +2926,13 @@ class LibClang { } late final _clang_getCompletionAnnotationPtr = - _lookup>( - 'clang_getCompletionAnnotation', - ); + _lookup< + ffi.NativeFunction< + CXString Function(CXCompletionString, ffi.UnsignedInt) + > + >('clang_getCompletionAnnotation'); late final _clang_getCompletionAnnotation = _clang_getCompletionAnnotationPtr - .asFunction(); + .asFunction(); /// Determine the availability of the entity that this code-completion /// string refers to. @@ -2779,12 +2949,12 @@ class LibClang { } late final _clang_getCompletionAvailabilityPtr = - _lookup>( + _lookup>( 'clang_getCompletionAvailability', ); late final _clang_getCompletionAvailability = _clang_getCompletionAvailabilityPtr - .asFunction(); + .asFunction(); /// Retrieve the brief documentation comment attached to the declaration /// that corresponds to the given completion string. @@ -2795,12 +2965,12 @@ class LibClang { } late final _clang_getCompletionBriefCommentPtr = - _lookup>( + _lookup>( 'clang_getCompletionBriefComment', ); late final _clang_getCompletionBriefComment = _clang_getCompletionBriefCommentPtr - .asFunction(); + .asFunction(); /// Retrieve the completion string associated with a particular chunk /// within a completion string. @@ -2823,11 +2993,13 @@ class LibClang { late final _clang_getCompletionChunkCompletionStringPtr = _lookup< - ffi.NativeFunction + ffi.NativeFunction< + CXCompletionString Function(CXCompletionString, ffi.UnsignedInt) + > >('clang_getCompletionChunkCompletionString'); late final _clang_getCompletionChunkCompletionString = _clang_getCompletionChunkCompletionStringPtr - .asFunction(); + .asFunction(); /// Determine the kind of a particular chunk within a completion string. /// @@ -2846,11 +3018,13 @@ class LibClang { } late final _clang_getCompletionChunkKindPtr = - _lookup>( - 'clang_getCompletionChunkKind', - ); + _lookup< + ffi.NativeFunction< + ffi.UnsignedInt Function(CXCompletionString, ffi.UnsignedInt) + > + >('clang_getCompletionChunkKind'); late final _clang_getCompletionChunkKind = _clang_getCompletionChunkKindPtr - .asFunction(); + .asFunction(); /// Retrieve the text associated with a particular chunk within a /// completion string. @@ -2868,11 +3042,13 @@ class LibClang { } late final _clang_getCompletionChunkTextPtr = - _lookup>( - 'clang_getCompletionChunkText', - ); + _lookup< + ffi.NativeFunction< + CXString Function(CXCompletionString, ffi.UnsignedInt) + > + >('clang_getCompletionChunkText'); late final _clang_getCompletionChunkText = _clang_getCompletionChunkTextPtr - .asFunction(); + .asFunction(); /// Fix-its that *must* be applied before inserting the text for the /// corresponding completion. @@ -2930,11 +3106,25 @@ class LibClang { } late final _clang_getCompletionFixItPtr = - _lookup>( - 'clang_getCompletionFixIt', - ); + _lookup< + ffi.NativeFunction< + CXString Function( + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ffi.Pointer, + ) + > + >('clang_getCompletionFixIt'); late final _clang_getCompletionFixIt = _clang_getCompletionFixItPtr - .asFunction(); + .asFunction< + CXString Function( + ffi.Pointer, + int, + int, + ffi.Pointer, + ) + >(); /// Retrieve the number of annotations associated with the given /// completion string. @@ -2948,12 +3138,12 @@ class LibClang { } late final _clang_getCompletionNumAnnotationsPtr = - _lookup>( + _lookup>( 'clang_getCompletionNumAnnotations', ); late final _clang_getCompletionNumAnnotations = _clang_getCompletionNumAnnotationsPtr - .asFunction(); + .asFunction(); /// Retrieve the number of fix-its for the given completion index. /// @@ -2974,11 +3164,16 @@ class LibClang { } late final _clang_getCompletionNumFixItsPtr = - _lookup>( - 'clang_getCompletionNumFixIts', - ); + _lookup< + ffi.NativeFunction< + ffi.UnsignedInt Function( + ffi.Pointer, + ffi.UnsignedInt, + ) + > + >('clang_getCompletionNumFixIts'); late final _clang_getCompletionNumFixIts = _clang_getCompletionNumFixItsPtr - .asFunction(); + .asFunction, int)>(); /// Retrieve the parent context of the given completion string. /// @@ -3002,11 +3197,15 @@ class LibClang { } late final _clang_getCompletionParentPtr = - _lookup>( - 'clang_getCompletionParent', - ); + _lookup< + ffi.NativeFunction< + CXString Function(CXCompletionString, ffi.Pointer) + > + >('clang_getCompletionParent'); late final _clang_getCompletionParent = _clang_getCompletionParentPtr - .asFunction(); + .asFunction< + CXString Function(CXCompletionString, ffi.Pointer) + >(); /// Determine the priority of this code completion. /// @@ -3023,11 +3222,11 @@ class LibClang { } late final _clang_getCompletionPriorityPtr = - _lookup>( + _lookup>( 'clang_getCompletionPriority', ); late final _clang_getCompletionPriority = _clang_getCompletionPriorityPtr - .asFunction(); + .asFunction(); /// Map a source location to the cursor that describes the entity at that /// location in the source code. @@ -3047,9 +3246,13 @@ class LibClang { } late final _clang_getCursorPtr = - _lookup>('clang_getCursor'); + _lookup< + ffi.NativeFunction< + CXCursor Function(CXTranslationUnit, CXSourceLocation) + > + >('clang_getCursor'); late final _clang_getCursor = _clang_getCursorPtr - .asFunction(); + .asFunction(); /// Determine the availability of the entity that this cursor refers to, /// taking the current target platform into account. @@ -3062,11 +3265,11 @@ class LibClang { } late final _clang_getCursorAvailabilityPtr = - _lookup>( + _lookup>( 'clang_getCursorAvailability', ); late final _clang_getCursorAvailability = _clang_getCursorAvailabilityPtr - .asFunction(); + .asFunction(); /// Retrieve a completion string for an arbitrary declaration or macro /// definition cursor. @@ -3080,12 +3283,12 @@ class LibClang { } late final _clang_getCursorCompletionStringPtr = - _lookup>( + _lookup>( 'clang_getCursorCompletionString', ); late final _clang_getCursorCompletionString = _clang_getCursorCompletionStringPtr - .asFunction(); + .asFunction(); /// For a cursor that is either a reference to or a declaration /// of some entity, retrieve a cursor that describes the definition of @@ -3118,11 +3321,11 @@ class LibClang { } late final _clang_getCursorDefinitionPtr = - _lookup>( + _lookup>( 'clang_getCursorDefinition', ); late final _clang_getCursorDefinition = _clang_getCursorDefinitionPtr - .asFunction(); + .asFunction(); /// Retrieve the display name for the entity referenced by this cursor. /// @@ -3134,11 +3337,11 @@ class LibClang { } late final _clang_getCursorDisplayNamePtr = - _lookup>( + _lookup>( 'clang_getCursorDisplayName', ); late final _clang_getCursorDisplayName = _clang_getCursorDisplayNamePtr - .asFunction(); + .asFunction(); /// Retrieve the exception specification type associated with a given cursor. /// This is a value of type CXCursor_ExceptionSpecificationKind. @@ -3149,12 +3352,12 @@ class LibClang { } late final _clang_getCursorExceptionSpecificationTypePtr = - _lookup< - ffi.NativeFunction - >('clang_getCursorExceptionSpecificationType'); + _lookup>( + 'clang_getCursorExceptionSpecificationType', + ); late final _clang_getCursorExceptionSpecificationType = _clang_getCursorExceptionSpecificationTypePtr - .asFunction(); + .asFunction(); /// Retrieve the physical extent of the source construct referenced by /// the given cursor. @@ -3170,11 +3373,11 @@ class LibClang { } late final _clang_getCursorExtentPtr = - _lookup>( + _lookup>( 'clang_getCursorExtent', ); late final _clang_getCursorExtent = _clang_getCursorExtentPtr - .asFunction(); + .asFunction(); /// Retrieve the kind of the given cursor. CXCursorKind clang_getCursorKind(CXCursor arg0) { @@ -3182,11 +3385,11 @@ class LibClang { } late final _clang_getCursorKindPtr = - _lookup>( + _lookup>( 'clang_getCursorKind', ); late final _clang_getCursorKind = _clang_getCursorKindPtr - .asFunction(); + .asFunction(); /// \defgroup CINDEX_DEBUG Debugging facilities /// @@ -3199,11 +3402,11 @@ class LibClang { } late final _clang_getCursorKindSpellingPtr = - _lookup>( + _lookup>( 'clang_getCursorKindSpelling', ); late final _clang_getCursorKindSpelling = _clang_getCursorKindSpellingPtr - .asFunction(); + .asFunction(); /// Determine the "language" of the entity referred to by a given cursor. CXLanguageKind clang_getCursorLanguage(CXCursor cursor) { @@ -3211,11 +3414,11 @@ class LibClang { } late final _clang_getCursorLanguagePtr = - _lookup>( + _lookup>( 'clang_getCursorLanguage', ); late final _clang_getCursorLanguage = _clang_getCursorLanguagePtr - .asFunction(); + .asFunction(); /// Determine the lexical parent of the given cursor. /// @@ -3254,11 +3457,11 @@ class LibClang { } late final _clang_getCursorLexicalParentPtr = - _lookup>( + _lookup>( 'clang_getCursorLexicalParent', ); late final _clang_getCursorLexicalParent = _clang_getCursorLexicalParentPtr - .asFunction(); + .asFunction(); /// Determine the linkage of the entity referred to by a given cursor. CXLinkageKind clang_getCursorLinkage(CXCursor cursor) { @@ -3266,11 +3469,11 @@ class LibClang { } late final _clang_getCursorLinkagePtr = - _lookup>( + _lookup>( 'clang_getCursorLinkage', ); late final _clang_getCursorLinkage = _clang_getCursorLinkagePtr - .asFunction(); + .asFunction(); /// Retrieve the physical location of the source constructor referenced /// by the given cursor. @@ -3285,11 +3488,11 @@ class LibClang { } late final _clang_getCursorLocationPtr = - _lookup>( + _lookup>( 'clang_getCursorLocation', ); late final _clang_getCursorLocation = _clang_getCursorLocationPtr - .asFunction(); + .asFunction(); /// Determine the availability of the entity that this cursor refers to /// on any platforms for which availability information is known. @@ -3346,12 +3549,32 @@ class LibClang { } late final _clang_getCursorPlatformAvailabilityPtr = - _lookup>( - 'clang_getCursorPlatformAvailability', - ); + _lookup< + ffi.NativeFunction< + ffi.Int Function( + CXCursor, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ) + > + >('clang_getCursorPlatformAvailability'); late final _clang_getCursorPlatformAvailability = _clang_getCursorPlatformAvailabilityPtr - .asFunction(); + .asFunction< + int Function( + CXCursor, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ) + >(); /// Pretty print declarations. /// @@ -3370,11 +3593,11 @@ class LibClang { } late final _clang_getCursorPrettyPrintedPtr = - _lookup>( - 'clang_getCursorPrettyPrinted', - ); + _lookup< + ffi.NativeFunction + >('clang_getCursorPrettyPrinted'); late final _clang_getCursorPrettyPrinted = _clang_getCursorPrettyPrintedPtr - .asFunction(); + .asFunction(); /// Retrieve the default policy for the cursor. /// @@ -3385,11 +3608,11 @@ class LibClang { } late final _clang_getCursorPrintingPolicyPtr = - _lookup>( + _lookup>( 'clang_getCursorPrintingPolicy', ); late final _clang_getCursorPrintingPolicy = _clang_getCursorPrintingPolicyPtr - .asFunction(); + .asFunction(); /// Given a cursor that references something else, return the source range /// covering that reference. @@ -3416,12 +3639,14 @@ class LibClang { } late final _clang_getCursorReferenceNameRangePtr = - _lookup>( - 'clang_getCursorReferenceNameRange', - ); + _lookup< + ffi.NativeFunction< + CXSourceRange Function(CXCursor, ffi.UnsignedInt, ffi.UnsignedInt) + > + >('clang_getCursorReferenceNameRange'); late final _clang_getCursorReferenceNameRange = _clang_getCursorReferenceNameRangePtr - .asFunction(); + .asFunction(); /// For a cursor that is a reference, retrieve a cursor representing the /// entity that it references. @@ -3437,11 +3662,11 @@ class LibClang { } late final _clang_getCursorReferencedPtr = - _lookup>( + _lookup>( 'clang_getCursorReferenced', ); late final _clang_getCursorReferenced = _clang_getCursorReferencedPtr - .asFunction(); + .asFunction(); /// Retrieve the return type associated with a given cursor. /// @@ -3451,11 +3676,11 @@ class LibClang { } late final _clang_getCursorResultTypePtr = - _lookup>( + _lookup>( 'clang_getCursorResultType', ); late final _clang_getCursorResultType = _clang_getCursorResultTypePtr - .asFunction(); + .asFunction(); /// Determine the semantic parent of the given cursor. /// @@ -3493,11 +3718,11 @@ class LibClang { } late final _clang_getCursorSemanticParentPtr = - _lookup>( + _lookup>( 'clang_getCursorSemanticParent', ); late final _clang_getCursorSemanticParent = _clang_getCursorSemanticParentPtr - .asFunction(); + .asFunction(); /// Retrieve a name for the entity referenced by this cursor. CXString clang_getCursorSpelling(CXCursor arg0) { @@ -3505,11 +3730,11 @@ class LibClang { } late final _clang_getCursorSpellingPtr = - _lookup>( + _lookup>( 'clang_getCursorSpelling', ); late final _clang_getCursorSpelling = _clang_getCursorSpellingPtr - .asFunction(); + .asFunction(); /// Determine the "thread-local storage (TLS) kind" of the declaration /// referred to by a cursor. @@ -3518,11 +3743,11 @@ class LibClang { } late final _clang_getCursorTLSKindPtr = - _lookup>( + _lookup>( 'clang_getCursorTLSKind', ); late final _clang_getCursorTLSKind = _clang_getCursorTLSKindPtr - .asFunction(); + .asFunction(); /// Retrieve the type of a CXCursor (if any). CXType clang_getCursorType(CXCursor C) { @@ -3530,11 +3755,11 @@ class LibClang { } late final _clang_getCursorTypePtr = - _lookup>( + _lookup>( 'clang_getCursorType', ); late final _clang_getCursorType = _clang_getCursorTypePtr - .asFunction(); + .asFunction(); /// Retrieve a Unified Symbol Resolution (USR) for the entity referenced /// by the given cursor. @@ -3548,11 +3773,11 @@ class LibClang { } late final _clang_getCursorUSRPtr = - _lookup>( + _lookup>( 'clang_getCursorUSR', ); late final _clang_getCursorUSR = _clang_getCursorUSRPtr - .asFunction(); + .asFunction(); /// Describe the visibility of the entity referred to by a cursor. /// @@ -3568,11 +3793,11 @@ class LibClang { } late final _clang_getCursorVisibilityPtr = - _lookup>( + _lookup>( 'clang_getCursorVisibility', ); late final _clang_getCursorVisibility = _clang_getCursorVisibilityPtr - .asFunction(); + .asFunction(); /// Returns the Objective-C type encoding for the specified declaration. CXString clang_getDeclObjCTypeEncoding(CXCursor C) { @@ -3580,11 +3805,11 @@ class LibClang { } late final _clang_getDeclObjCTypeEncodingPtr = - _lookup>( + _lookup>( 'clang_getDeclObjCTypeEncoding', ); late final _clang_getDeclObjCTypeEncoding = _clang_getDeclObjCTypeEncodingPtr - .asFunction(); + .asFunction(); void clang_getDefinitionSpellingAndExtent( CXCursor arg0, @@ -3607,12 +3832,32 @@ class LibClang { } late final _clang_getDefinitionSpellingAndExtentPtr = - _lookup>( - 'clang_getDefinitionSpellingAndExtent', - ); + _lookup< + ffi.NativeFunction< + ffi.Void Function( + CXCursor, + ffi.Pointer>, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >('clang_getDefinitionSpellingAndExtent'); late final _clang_getDefinitionSpellingAndExtent = _clang_getDefinitionSpellingAndExtentPtr - .asFunction(); + .asFunction< + void Function( + CXCursor, + ffi.Pointer>, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); /// Retrieve a diagnostic associated with the given translation unit. /// @@ -3626,11 +3871,13 @@ class LibClang { } late final _clang_getDiagnosticPtr = - _lookup>( - 'clang_getDiagnostic', - ); + _lookup< + ffi.NativeFunction< + CXDiagnostic Function(CXTranslationUnit, ffi.UnsignedInt) + > + >('clang_getDiagnostic'); late final _clang_getDiagnostic = _clang_getDiagnosticPtr - .asFunction(); + .asFunction(); /// Retrieve the category number for this diagnostic. /// @@ -3645,11 +3892,11 @@ class LibClang { } late final _clang_getDiagnosticCategoryPtr = - _lookup>( + _lookup>( 'clang_getDiagnosticCategory', ); late final _clang_getDiagnosticCategory = _clang_getDiagnosticCategoryPtr - .asFunction(); + .asFunction(); /// Retrieve the name of a particular diagnostic category. This /// is now deprecated. Use clang_getDiagnosticCategoryText() @@ -3665,12 +3912,11 @@ class LibClang { } late final _clang_getDiagnosticCategoryNamePtr = - _lookup>( + _lookup>( 'clang_getDiagnosticCategoryName', ); late final _clang_getDiagnosticCategoryName = - _clang_getDiagnosticCategoryNamePtr - .asFunction(); + _clang_getDiagnosticCategoryNamePtr.asFunction(); /// Retrieve the diagnostic category text for a given diagnostic. /// @@ -3680,12 +3926,12 @@ class LibClang { } late final _clang_getDiagnosticCategoryTextPtr = - _lookup>( + _lookup>( 'clang_getDiagnosticCategoryText', ); late final _clang_getDiagnosticCategoryText = _clang_getDiagnosticCategoryTextPtr - .asFunction(); + .asFunction(); /// Retrieve the replacement information for a given fix-it. /// @@ -3719,11 +3965,19 @@ class LibClang { } late final _clang_getDiagnosticFixItPtr = - _lookup>( - 'clang_getDiagnosticFixIt', - ); + _lookup< + ffi.NativeFunction< + CXString Function( + CXDiagnostic, + ffi.UnsignedInt, + ffi.Pointer, + ) + > + >('clang_getDiagnosticFixIt'); late final _clang_getDiagnosticFixIt = _clang_getDiagnosticFixItPtr - .asFunction(); + .asFunction< + CXString Function(CXDiagnostic, int, ffi.Pointer) + >(); /// Retrieve a diagnostic associated with the given CXDiagnosticSet. /// @@ -3737,11 +3991,13 @@ class LibClang { } late final _clang_getDiagnosticInSetPtr = - _lookup>( - 'clang_getDiagnosticInSet', - ); + _lookup< + ffi.NativeFunction< + CXDiagnostic Function(CXDiagnosticSet, ffi.UnsignedInt) + > + >('clang_getDiagnosticInSet'); late final _clang_getDiagnosticInSet = _clang_getDiagnosticInSetPtr - .asFunction(); + .asFunction(); /// Retrieve the source location of the given diagnostic. /// @@ -3752,11 +4008,11 @@ class LibClang { } late final _clang_getDiagnosticLocationPtr = - _lookup>( + _lookup>( 'clang_getDiagnosticLocation', ); late final _clang_getDiagnosticLocation = _clang_getDiagnosticLocationPtr - .asFunction(); + .asFunction(); /// Determine the number of fix-it hints associated with the /// given diagnostic. @@ -3765,11 +4021,11 @@ class LibClang { } late final _clang_getDiagnosticNumFixItsPtr = - _lookup>( + _lookup>( 'clang_getDiagnosticNumFixIts', ); late final _clang_getDiagnosticNumFixIts = _clang_getDiagnosticNumFixItsPtr - .asFunction(); + .asFunction(); /// Determine the number of source ranges associated with the given /// diagnostic. @@ -3778,11 +4034,11 @@ class LibClang { } late final _clang_getDiagnosticNumRangesPtr = - _lookup>( + _lookup>( 'clang_getDiagnosticNumRanges', ); late final _clang_getDiagnosticNumRanges = _clang_getDiagnosticNumRangesPtr - .asFunction(); + .asFunction(); /// Retrieve the name of the command-line option that enabled this /// diagnostic. @@ -3802,11 +4058,13 @@ class LibClang { } late final _clang_getDiagnosticOptionPtr = - _lookup>( - 'clang_getDiagnosticOption', - ); + _lookup< + ffi.NativeFunction< + CXString Function(CXDiagnostic, ffi.Pointer) + > + >('clang_getDiagnosticOption'); late final _clang_getDiagnosticOption = _clang_getDiagnosticOptionPtr - .asFunction(); + .asFunction)>(); /// Retrieve a source range associated with the diagnostic. /// @@ -3824,11 +4082,13 @@ class LibClang { } late final _clang_getDiagnosticRangePtr = - _lookup>( - 'clang_getDiagnosticRange', - ); + _lookup< + ffi.NativeFunction< + CXSourceRange Function(CXDiagnostic, ffi.UnsignedInt) + > + >('clang_getDiagnosticRange'); late final _clang_getDiagnosticRange = _clang_getDiagnosticRangePtr - .asFunction(); + .asFunction(); /// Retrieve the complete set of diagnostics associated with a /// translation unit. @@ -3839,11 +4099,11 @@ class LibClang { } late final _clang_getDiagnosticSetFromTUPtr = - _lookup>( + _lookup>( 'clang_getDiagnosticSetFromTU', ); late final _clang_getDiagnosticSetFromTU = _clang_getDiagnosticSetFromTUPtr - .asFunction(); + .asFunction(); /// Determine the severity of the given diagnostic. CXDiagnosticSeverity clang_getDiagnosticSeverity(CXDiagnostic arg0) { @@ -3851,11 +4111,11 @@ class LibClang { } late final _clang_getDiagnosticSeverityPtr = - _lookup>( + _lookup>( 'clang_getDiagnosticSeverity', ); late final _clang_getDiagnosticSeverity = _clang_getDiagnosticSeverityPtr - .asFunction(); + .asFunction(); /// Retrieve the text of the given diagnostic. CXString clang_getDiagnosticSpelling(CXDiagnostic arg0) { @@ -3863,11 +4123,11 @@ class LibClang { } late final _clang_getDiagnosticSpellingPtr = - _lookup>( + _lookup>( 'clang_getDiagnosticSpelling', ); late final _clang_getDiagnosticSpelling = _clang_getDiagnosticSpellingPtr - .asFunction(); + .asFunction(); /// Return the element type of an array, complex, or vector type. /// @@ -3878,11 +4138,11 @@ class LibClang { } late final _clang_getElementTypePtr = - _lookup>( + _lookup>( 'clang_getElementType', ); late final _clang_getElementType = _clang_getElementTypePtr - .asFunction(); + .asFunction(); /// Retrieve the integer value of an enum constant declaration as an unsigned /// long long. @@ -3895,12 +4155,12 @@ class LibClang { } late final _clang_getEnumConstantDeclUnsignedValuePtr = - _lookup>( + _lookup>( 'clang_getEnumConstantDeclUnsignedValue', ); late final _clang_getEnumConstantDeclUnsignedValue = _clang_getEnumConstantDeclUnsignedValuePtr - .asFunction(); + .asFunction(); /// Retrieve the integer value of an enum constant declaration as a signed /// long long. @@ -3913,12 +4173,11 @@ class LibClang { } late final _clang_getEnumConstantDeclValuePtr = - _lookup>( + _lookup>( 'clang_getEnumConstantDeclValue', ); late final _clang_getEnumConstantDeclValue = - _clang_getEnumConstantDeclValuePtr - .asFunction(); + _clang_getEnumConstantDeclValuePtr.asFunction(); /// Retrieve the integer type of an enum declaration. /// @@ -3929,11 +4188,11 @@ class LibClang { } late final _clang_getEnumDeclIntegerTypePtr = - _lookup>( + _lookup>( 'clang_getEnumDeclIntegerType', ); late final _clang_getEnumDeclIntegerType = _clang_getEnumDeclIntegerTypePtr - .asFunction(); + .asFunction(); /// Retrieve the exception specification type associated with a function type. /// This is a value of type CXCursor_ExceptionSpecificationKind. @@ -3944,12 +4203,12 @@ class LibClang { } late final _clang_getExceptionSpecificationTypePtr = - _lookup>( + _lookup>( 'clang_getExceptionSpecificationType', ); late final _clang_getExceptionSpecificationType = _clang_getExceptionSpecificationTypePtr - .asFunction(); + .asFunction(); /// Retrieve the file, line, column, and offset represented by /// the given source location. @@ -3982,11 +4241,27 @@ class LibClang { } late final _clang_getExpansionLocationPtr = - _lookup>( - 'clang_getExpansionLocation', - ); + _lookup< + ffi.NativeFunction< + ffi.Void Function( + CXSourceLocation, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >('clang_getExpansionLocation'); late final _clang_getExpansionLocation = _clang_getExpansionLocationPtr - .asFunction(); + .asFunction< + void Function( + CXSourceLocation, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); /// Retrieve the bit width of a bit field declaration as an integer. /// @@ -3996,11 +4271,11 @@ class LibClang { } late final _clang_getFieldDeclBitWidthPtr = - _lookup>( + _lookup>( 'clang_getFieldDeclBitWidth', ); late final _clang_getFieldDeclBitWidth = _clang_getFieldDeclBitWidthPtr - .asFunction(); + .asFunction(); /// Retrieve a file handle within the given translation unit. /// @@ -4015,8 +4290,13 @@ class LibClang { } late final _clang_getFilePtr = - _lookup>('clang_getFile'); - late final _clang_getFile = _clang_getFilePtr.asFunction(); + _lookup< + ffi.NativeFunction< + CXFile Function(CXTranslationUnit, ffi.Pointer) + > + >('clang_getFile'); + late final _clang_getFile = _clang_getFilePtr + .asFunction)>(); /// Retrieve the buffer associated with the given file. /// @@ -4037,11 +4317,23 @@ class LibClang { } late final _clang_getFileContentsPtr = - _lookup>( - 'clang_getFileContents', - ); + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + CXTranslationUnit, + CXFile, + ffi.Pointer, + ) + > + >('clang_getFileContents'); late final _clang_getFileContents = _clang_getFileContentsPtr - .asFunction(); + .asFunction< + ffi.Pointer Function( + CXTranslationUnit, + CXFile, + ffi.Pointer, + ) + >(); /// Retrieve the file, line, column, and offset represented by /// the given source location. @@ -4075,11 +4367,27 @@ class LibClang { } late final _clang_getFileLocationPtr = - _lookup>( - 'clang_getFileLocation', - ); + _lookup< + ffi.NativeFunction< + ffi.Void Function( + CXSourceLocation, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >('clang_getFileLocation'); late final _clang_getFileLocation = _clang_getFileLocationPtr - .asFunction(); + .asFunction< + void Function( + CXSourceLocation, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); /// Retrieve the complete file and path name of the given file. CXString clang_getFileName(CXFile SFile) { @@ -4087,9 +4395,11 @@ class LibClang { } late final _clang_getFileNamePtr = - _lookup>('clang_getFileName'); + _lookup>( + 'clang_getFileName', + ); late final _clang_getFileName = _clang_getFileNamePtr - .asFunction(); + .asFunction(); /// Retrieve the last modification time of the given file. int clang_getFileTime(CXFile SFile) { @@ -4097,9 +4407,11 @@ class LibClang { } late final _clang_getFileTimePtr = - _lookup>('clang_getFileTime'); + _lookup>( + 'clang_getFileTime', + ); late final _clang_getFileTime = _clang_getFileTimePtr - .asFunction(); + .asFunction(); /// Retrieve the unique ID for the given \c file. /// @@ -4112,11 +4424,13 @@ class LibClang { } late final _clang_getFileUniqueIDPtr = - _lookup>( - 'clang_getFileUniqueID', - ); + _lookup< + ffi.NativeFunction< + ffi.Int Function(CXFile, ffi.Pointer) + > + >('clang_getFileUniqueID'); late final _clang_getFileUniqueID = _clang_getFileUniqueIDPtr - .asFunction(); + .asFunction)>(); /// Retrieve the calling convention associated with a function type. /// @@ -4126,12 +4440,11 @@ class LibClang { } late final _clang_getFunctionTypeCallingConvPtr = - _lookup>( + _lookup>( 'clang_getFunctionTypeCallingConv', ); late final _clang_getFunctionTypeCallingConv = - _clang_getFunctionTypeCallingConvPtr - .asFunction(); + _clang_getFunctionTypeCallingConvPtr.asFunction(); /// For cursors representing an iboutletcollection attribute, /// this function returns the collection element type. @@ -4140,12 +4453,12 @@ class LibClang { } late final _clang_getIBOutletCollectionTypePtr = - _lookup>( + _lookup>( 'clang_getIBOutletCollectionType', ); late final _clang_getIBOutletCollectionType = _clang_getIBOutletCollectionTypePtr - .asFunction(); + .asFunction(); /// Retrieve the file that is included by the given inclusion directive /// cursor. @@ -4154,11 +4467,11 @@ class LibClang { } late final _clang_getIncludedFilePtr = - _lookup>( + _lookup>( 'clang_getIncludedFile', ); late final _clang_getIncludedFile = _clang_getIncludedFilePtr - .asFunction(); + .asFunction(); /// Visit the set of preprocessor inclusions in a translation unit. /// The visitor function is called with the provided data for every included @@ -4173,11 +4486,15 @@ class LibClang { } late final _clang_getInclusionsPtr = - _lookup>( - 'clang_getInclusions', - ); + _lookup< + ffi.NativeFunction< + ffi.Void Function(CXTranslationUnit, CXInclusionVisitor, CXClientData) + > + >('clang_getInclusions'); late final _clang_getInclusions = _clang_getInclusionsPtr - .asFunction(); + .asFunction< + void Function(CXTranslationUnit, CXInclusionVisitor, CXClientData) + >(); /// Legacy API to retrieve the file, line, column, and offset represented /// by the given source location. @@ -4202,12 +4519,28 @@ class LibClang { } late final _clang_getInstantiationLocationPtr = - _lookup>( - 'clang_getInstantiationLocation', - ); + _lookup< + ffi.NativeFunction< + ffi.Void Function( + CXSourceLocation, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >('clang_getInstantiationLocation'); late final _clang_getInstantiationLocation = _clang_getInstantiationLocationPtr - .asFunction(); + .asFunction< + void Function( + CXSourceLocation, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); /// Retrieves the source location associated with a given file/line/column /// in a particular translation unit. @@ -4221,9 +4554,20 @@ class LibClang { } late final _clang_getLocationPtr = - _lookup>('clang_getLocation'); + _lookup< + ffi.NativeFunction< + CXSourceLocation Function( + CXTranslationUnit, + CXFile, + ffi.UnsignedInt, + ffi.UnsignedInt, + ) + > + >('clang_getLocation'); late final _clang_getLocation = _clang_getLocationPtr - .asFunction(); + .asFunction< + CXSourceLocation Function(CXTranslationUnit, CXFile, int, int) + >(); /// Retrieves the source location associated with a given character offset /// in a particular translation unit. @@ -4236,11 +4580,13 @@ class LibClang { } late final _clang_getLocationForOffsetPtr = - _lookup>( - 'clang_getLocationForOffset', - ); + _lookup< + ffi.NativeFunction< + CXSourceLocation Function(CXTranslationUnit, CXFile, ffi.UnsignedInt) + > + >('clang_getLocationForOffset'); late final _clang_getLocationForOffset = _clang_getLocationForOffsetPtr - .asFunction(); + .asFunction(); /// Given a CXFile header file, return the module that contains it, if one /// exists. @@ -4249,11 +4595,11 @@ class LibClang { } late final _clang_getModuleForFilePtr = - _lookup>( + _lookup>( 'clang_getModuleForFile', ); late final _clang_getModuleForFile = _clang_getModuleForFilePtr - .asFunction(); + .asFunction(); /// Retrieve the NULL cursor, which represents no entity. CXCursor clang_getNullCursor() { @@ -4261,11 +4607,9 @@ class LibClang { } late final _clang_getNullCursorPtr = - _lookup>( - 'clang_getNullCursor', - ); + _lookup>('clang_getNullCursor'); late final _clang_getNullCursor = _clang_getNullCursorPtr - .asFunction(); + .asFunction(); /// Retrieve a NULL (invalid) source location. CXSourceLocation clang_getNullLocation() { @@ -4273,11 +4617,11 @@ class LibClang { } late final _clang_getNullLocationPtr = - _lookup>( + _lookup>( 'clang_getNullLocation', ); late final _clang_getNullLocation = _clang_getNullLocationPtr - .asFunction(); + .asFunction(); /// Retrieve a NULL (invalid) source range. CXSourceRange clang_getNullRange() { @@ -4285,11 +4629,11 @@ class LibClang { } late final _clang_getNullRangePtr = - _lookup>( + _lookup>( 'clang_getNullRange', ); late final _clang_getNullRange = _clang_getNullRangePtr - .asFunction(); + .asFunction(); /// Retrieve the number of non-variadic parameters associated with a /// function type. @@ -4300,11 +4644,11 @@ class LibClang { } late final _clang_getNumArgTypesPtr = - _lookup>( + _lookup>( 'clang_getNumArgTypes', ); late final _clang_getNumArgTypes = _clang_getNumArgTypesPtr - .asFunction(); + .asFunction(); /// Retrieve the number of chunks in the given code-completion string. int clang_getNumCompletionChunks(CXCompletionString completion_string) { @@ -4312,11 +4656,11 @@ class LibClang { } late final _clang_getNumCompletionChunksPtr = - _lookup>( + _lookup>( 'clang_getNumCompletionChunks', ); late final _clang_getNumCompletionChunks = _clang_getNumCompletionChunksPtr - .asFunction(); + .asFunction(); /// Determine the number of diagnostics produced for the given /// translation unit. @@ -4325,11 +4669,11 @@ class LibClang { } late final _clang_getNumDiagnosticsPtr = - _lookup>( + _lookup>( 'clang_getNumDiagnostics', ); late final _clang_getNumDiagnostics = _clang_getNumDiagnosticsPtr - .asFunction(); + .asFunction(); /// Determine the number of diagnostics in a CXDiagnosticSet. int clang_getNumDiagnosticsInSet(CXDiagnosticSet Diags) { @@ -4337,11 +4681,11 @@ class LibClang { } late final _clang_getNumDiagnosticsInSetPtr = - _lookup>( + _lookup>( 'clang_getNumDiagnosticsInSet', ); late final _clang_getNumDiagnosticsInSet = _clang_getNumDiagnosticsInSetPtr - .asFunction(); + .asFunction(); /// Return the number of elements of an array or vector type. /// @@ -4352,11 +4696,11 @@ class LibClang { } late final _clang_getNumElementsPtr = - _lookup>( + _lookup>( 'clang_getNumElements', ); late final _clang_getNumElements = _clang_getNumElementsPtr - .asFunction(); + .asFunction(); /// Determine the number of overloaded declarations referenced by a /// \c CXCursor_OverloadedDeclRef cursor. @@ -4370,11 +4714,11 @@ class LibClang { } late final _clang_getNumOverloadedDeclsPtr = - _lookup>( + _lookup>( 'clang_getNumOverloadedDecls', ); late final _clang_getNumOverloadedDecls = _clang_getNumOverloadedDeclsPtr - .asFunction(); + .asFunction(); /// Retrieve a cursor for one of the overloaded declarations referenced /// by a \c CXCursor_OverloadedDeclRef cursor. @@ -4393,11 +4737,11 @@ class LibClang { } late final _clang_getOverloadedDeclPtr = - _lookup>( + _lookup>( 'clang_getOverloadedDecl', ); late final _clang_getOverloadedDecl = _clang_getOverloadedDeclPtr - .asFunction(); + .asFunction(); /// Determine the set of methods that are overridden by the given /// method. @@ -4449,11 +4793,23 @@ class LibClang { } late final _clang_getOverriddenCursorsPtr = - _lookup>( - 'clang_getOverriddenCursors', - ); + _lookup< + ffi.NativeFunction< + ffi.Void Function( + CXCursor, + ffi.Pointer>, + ffi.Pointer, + ) + > + >('clang_getOverriddenCursors'); late final _clang_getOverriddenCursors = _clang_getOverriddenCursorsPtr - .asFunction(); + .asFunction< + void Function( + CXCursor, + ffi.Pointer>, + ffi.Pointer, + ) + >(); /// For pointer types, returns the type of the pointee. CXType clang_getPointeeType(CXType T) { @@ -4461,11 +4817,11 @@ class LibClang { } late final _clang_getPointeeTypePtr = - _lookup>( + _lookup>( 'clang_getPointeeType', ); late final _clang_getPointeeType = _clang_getPointeeTypePtr - .asFunction(); + .asFunction(); /// Retrieve the file, line and column represented by the given source /// location, as specified in a # line directive. @@ -4515,11 +4871,25 @@ class LibClang { } late final _clang_getPresumedLocationPtr = - _lookup>( - 'clang_getPresumedLocation', - ); + _lookup< + ffi.NativeFunction< + ffi.Void Function( + CXSourceLocation, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >('clang_getPresumedLocation'); late final _clang_getPresumedLocation = _clang_getPresumedLocationPtr - .asFunction(); + .asFunction< + void Function( + CXSourceLocation, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); /// Retrieve a source range given the beginning and ending source /// locations. @@ -4528,9 +4898,13 @@ class LibClang { } late final _clang_getRangePtr = - _lookup>('clang_getRange'); + _lookup< + ffi.NativeFunction< + CXSourceRange Function(CXSourceLocation, CXSourceLocation) + > + >('clang_getRange'); late final _clang_getRange = _clang_getRangePtr - .asFunction(); + .asFunction(); /// Retrieve a source location representing the last character within a /// source range. @@ -4539,9 +4913,11 @@ class LibClang { } late final _clang_getRangeEndPtr = - _lookup>('clang_getRangeEnd'); + _lookup>( + 'clang_getRangeEnd', + ); late final _clang_getRangeEnd = _clang_getRangeEndPtr - .asFunction(); + .asFunction(); /// Retrieve a source location representing the first character within a /// source range. @@ -4550,11 +4926,11 @@ class LibClang { } late final _clang_getRangeStartPtr = - _lookup>( + _lookup>( 'clang_getRangeStart', ); late final _clang_getRangeStart = _clang_getRangeStartPtr - .asFunction(); + .asFunction(); /// Retrieve a remapping. /// @@ -4567,11 +4943,11 @@ class LibClang { } late final _clang_getRemappingsPtr = - _lookup>( + _lookup)>>( 'clang_getRemappings', ); late final _clang_getRemappings = _clang_getRemappingsPtr - .asFunction(); + .asFunction)>(); /// Retrieve a remapping. /// @@ -4589,12 +4965,19 @@ class LibClang { } late final _clang_getRemappingsFromFileListPtr = - _lookup>( - 'clang_getRemappingsFromFileList', - ); + _lookup< + ffi.NativeFunction< + CXRemapping Function( + ffi.Pointer>, + ffi.UnsignedInt, + ) + > + >('clang_getRemappingsFromFileList'); late final _clang_getRemappingsFromFileList = _clang_getRemappingsFromFileListPtr - .asFunction(); + .asFunction< + CXRemapping Function(ffi.Pointer>, int) + >(); /// Retrieve the return type associated with a function type. /// @@ -4604,11 +4987,11 @@ class LibClang { } late final _clang_getResultTypePtr = - _lookup>( + _lookup>( 'clang_getResultType', ); late final _clang_getResultType = _clang_getResultTypePtr - .asFunction(); + .asFunction(); /// Retrieve all ranges that were skipped by the preprocessor. /// @@ -4622,11 +5005,15 @@ class LibClang { } late final _clang_getSkippedRangesPtr = - _lookup>( - 'clang_getSkippedRanges', - ); + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(CXTranslationUnit, CXFile) + > + >('clang_getSkippedRanges'); late final _clang_getSkippedRanges = _clang_getSkippedRangesPtr - .asFunction(); + .asFunction< + ffi.Pointer Function(CXTranslationUnit, CXFile) + >(); /// Given a cursor that may represent a specialization or instantiation /// of a template, retrieve the cursor that represents the template that it @@ -4659,12 +5046,12 @@ class LibClang { } late final _clang_getSpecializedCursorTemplatePtr = - _lookup>( + _lookup>( 'clang_getSpecializedCursorTemplate', ); late final _clang_getSpecializedCursorTemplate = _clang_getSpecializedCursorTemplatePtr - .asFunction(); + .asFunction(); /// Retrieve the file, line, column, and offset represented by /// the given source location. @@ -4697,11 +5084,27 @@ class LibClang { } late final _clang_getSpellingLocationPtr = - _lookup>( - 'clang_getSpellingLocation', - ); + _lookup< + ffi.NativeFunction< + ffi.Void Function( + CXSourceLocation, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >('clang_getSpellingLocation'); late final _clang_getSpellingLocation = _clang_getSpellingLocationPtr - .asFunction(); + .asFunction< + void Function( + CXSourceLocation, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); /// Returns the human-readable null-terminated C string that represents /// the name of the memory category. This string should never be freed. @@ -4712,11 +5115,11 @@ class LibClang { } late final _clang_getTUResourceUsageNamePtr = - _lookup>( - 'clang_getTUResourceUsageName', - ); + _lookup< + ffi.NativeFunction Function(ffi.UnsignedInt)> + >('clang_getTUResourceUsageName'); late final _clang_getTUResourceUsageName = _clang_getTUResourceUsageNamePtr - .asFunction(); + .asFunction Function(int)>(); /// Given a cursor that represents a template, determine /// the cursor kind of the specializations would be generated by instantiating @@ -4738,11 +5141,11 @@ class LibClang { } late final _clang_getTemplateCursorKindPtr = - _lookup>( + _lookup>( 'clang_getTemplateCursorKind', ); late final _clang_getTemplateCursorKind = _clang_getTemplateCursorKindPtr - .asFunction(); + .asFunction(); /// Get the raw lexical token starting with the given location. /// @@ -4761,9 +5164,15 @@ class LibClang { } late final _clang_getTokenPtr = - _lookup>('clang_getToken'); + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(CXTranslationUnit, CXSourceLocation) + > + >('clang_getToken'); late final _clang_getToken = _clang_getTokenPtr - .asFunction(); + .asFunction< + ffi.Pointer Function(CXTranslationUnit, CXSourceLocation) + >(); /// Retrieve a source range that covers the given token. CXSourceRange clang_getTokenExtent(CXTranslationUnit arg0, CXToken arg1) { @@ -4771,11 +5180,11 @@ class LibClang { } late final _clang_getTokenExtentPtr = - _lookup>( - 'clang_getTokenExtent', - ); + _lookup< + ffi.NativeFunction + >('clang_getTokenExtent'); late final _clang_getTokenExtent = _clang_getTokenExtentPtr - .asFunction(); + .asFunction(); /// Determine the kind of the given token. CXTokenKind clang_getTokenKind(CXToken arg0) { @@ -4783,11 +5192,11 @@ class LibClang { } late final _clang_getTokenKindPtr = - _lookup>( + _lookup>( 'clang_getTokenKind', ); late final _clang_getTokenKind = _clang_getTokenKindPtr - .asFunction(); + .asFunction(); /// Retrieve the source location of the given token. CXSourceLocation clang_getTokenLocation( @@ -4798,11 +5207,13 @@ class LibClang { } late final _clang_getTokenLocationPtr = - _lookup>( - 'clang_getTokenLocation', - ); + _lookup< + ffi.NativeFunction< + CXSourceLocation Function(CXTranslationUnit, CXToken) + > + >('clang_getTokenLocation'); late final _clang_getTokenLocation = _clang_getTokenLocationPtr - .asFunction(); + .asFunction(); /// Determine the spelling of the given token. /// @@ -4813,11 +5224,11 @@ class LibClang { } late final _clang_getTokenSpellingPtr = - _lookup>( - 'clang_getTokenSpelling', - ); + _lookup< + ffi.NativeFunction + >('clang_getTokenSpelling'); late final _clang_getTokenSpelling = _clang_getTokenSpellingPtr - .asFunction(); + .asFunction(); /// Retrieve the cursor that represents the given translation unit. /// @@ -4828,12 +5239,12 @@ class LibClang { } late final _clang_getTranslationUnitCursorPtr = - _lookup>( + _lookup>( 'clang_getTranslationUnitCursor', ); late final _clang_getTranslationUnitCursor = _clang_getTranslationUnitCursorPtr - .asFunction(); + .asFunction(); /// Get the original translation unit source file name. CXString clang_getTranslationUnitSpelling(CXTranslationUnit CTUnit) { @@ -4841,12 +5252,12 @@ class LibClang { } late final _clang_getTranslationUnitSpellingPtr = - _lookup>( + _lookup>( 'clang_getTranslationUnitSpelling', ); late final _clang_getTranslationUnitSpelling = _clang_getTranslationUnitSpellingPtr - .asFunction(); + .asFunction(); /// Get target information for this translation unit. /// @@ -4856,12 +5267,12 @@ class LibClang { } late final _clang_getTranslationUnitTargetInfoPtr = - _lookup>( + _lookup>( 'clang_getTranslationUnitTargetInfo', ); late final _clang_getTranslationUnitTargetInfo = _clang_getTranslationUnitTargetInfoPtr - .asFunction(); + .asFunction(); /// Return the cursor for the declaration of the given type. CXCursor clang_getTypeDeclaration(CXType T) { @@ -4869,11 +5280,11 @@ class LibClang { } late final _clang_getTypeDeclarationPtr = - _lookup>( + _lookup>( 'clang_getTypeDeclaration', ); late final _clang_getTypeDeclaration = _clang_getTypeDeclarationPtr - .asFunction(); + .asFunction(); /// Retrieve the spelling of a given CXTypeKind. CXString clang_getTypeKindSpelling(CXTypeKind K) { @@ -4881,11 +5292,11 @@ class LibClang { } late final _clang_getTypeKindSpellingPtr = - _lookup>( + _lookup>( 'clang_getTypeKindSpelling', ); late final _clang_getTypeKindSpelling = _clang_getTypeKindSpellingPtr - .asFunction(); + .asFunction(); /// Pretty-print the underlying type using the rules of the /// language of the translation unit from which it came. @@ -4896,11 +5307,11 @@ class LibClang { } late final _clang_getTypeSpellingPtr = - _lookup>( + _lookup>( 'clang_getTypeSpelling', ); late final _clang_getTypeSpelling = _clang_getTypeSpellingPtr - .asFunction(); + .asFunction(); /// Retrieve the underlying type of a typedef declaration. /// @@ -4911,12 +5322,12 @@ class LibClang { } late final _clang_getTypedefDeclUnderlyingTypePtr = - _lookup>( + _lookup>( 'clang_getTypedefDeclUnderlyingType', ); late final _clang_getTypedefDeclUnderlyingType = _clang_getTypedefDeclUnderlyingTypePtr - .asFunction(); + .asFunction(); /// Returns the typedef name of the given type. CXString clang_getTypedefName(CXType CT) { @@ -4924,11 +5335,11 @@ class LibClang { } late final _clang_getTypedefNamePtr = - _lookup>( + _lookup>( 'clang_getTypedefName', ); late final _clang_getTypedefName = _clang_getTypedefNamePtr - .asFunction(); + .asFunction(); /// Compute a hash value for the given cursor. int clang_hashCursor(CXCursor arg0) { @@ -4936,9 +5347,11 @@ class LibClang { } late final _clang_hashCursorPtr = - _lookup>('clang_hashCursor'); + _lookup>( + 'clang_hashCursor', + ); late final _clang_hashCursor = _clang_hashCursorPtr - .asFunction(); + .asFunction(); /// Retrieve the CXSourceLocation represented by the given CXIdxLoc. CXSourceLocation clang_indexLoc_getCXSourceLocation(CXIdxLoc loc) { @@ -4946,12 +5359,12 @@ class LibClang { } late final _clang_indexLoc_getCXSourceLocationPtr = - _lookup>( + _lookup>( 'clang_indexLoc_getCXSourceLocation', ); late final _clang_indexLoc_getCXSourceLocation = _clang_indexLoc_getCXSourceLocationPtr - .asFunction(); + .asFunction(); /// Retrieve the CXIdxFile, file, line, column, and offset represented by /// the given CXIdxLoc. @@ -4978,12 +5391,30 @@ class LibClang { } late final _clang_indexLoc_getFileLocationPtr = - _lookup>( - 'clang_indexLoc_getFileLocation', - ); + _lookup< + ffi.NativeFunction< + ffi.Void Function( + CXIdxLoc, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >('clang_indexLoc_getFileLocation'); late final _clang_indexLoc_getFileLocation = _clang_indexLoc_getFileLocationPtr - .asFunction(); + .asFunction< + void Function( + CXIdxLoc, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); /// Index the given source file and the translation unit corresponding /// to that file via callbacks implemented through #IndexerCallbacks. @@ -5039,11 +5470,41 @@ class LibClang { } late final _clang_indexSourceFilePtr = - _lookup>( - 'clang_indexSourceFile', - ); + _lookup< + ffi.NativeFunction< + ffi.Int Function( + CXIndexAction, + CXClientData, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ffi.Pointer, + ffi.Pointer>, + ffi.Int, + ffi.Pointer, + ffi.UnsignedInt, + ffi.Pointer, + ffi.UnsignedInt, + ) + > + >('clang_indexSourceFile'); late final _clang_indexSourceFile = _clang_indexSourceFilePtr - .asFunction(); + .asFunction< + int Function( + CXIndexAction, + CXClientData, + ffi.Pointer, + int, + int, + ffi.Pointer, + ffi.Pointer>, + int, + ffi.Pointer, + int, + ffi.Pointer, + int, + ) + >(); /// Same as clang_indexSourceFile but requires a full command line /// for \c command_line_args including argv[0]. This is useful if the standard @@ -5079,11 +5540,41 @@ class LibClang { } late final _clang_indexSourceFileFullArgvPtr = - _lookup>( - 'clang_indexSourceFileFullArgv', - ); + _lookup< + ffi.NativeFunction< + ffi.Int Function( + CXIndexAction, + CXClientData, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ffi.Pointer, + ffi.Pointer>, + ffi.Int, + ffi.Pointer, + ffi.UnsignedInt, + ffi.Pointer, + ffi.UnsignedInt, + ) + > + >('clang_indexSourceFileFullArgv'); late final _clang_indexSourceFileFullArgv = _clang_indexSourceFileFullArgvPtr - .asFunction(); + .asFunction< + int Function( + CXIndexAction, + CXClientData, + ffi.Pointer, + int, + int, + ffi.Pointer, + ffi.Pointer>, + int, + ffi.Pointer, + int, + ffi.Pointer, + int, + ) + >(); /// Index the given translation unit via callbacks implemented through /// #IndexerCallbacks. @@ -5118,11 +5609,29 @@ class LibClang { } late final _clang_indexTranslationUnitPtr = - _lookup>( - 'clang_indexTranslationUnit', - ); + _lookup< + ffi.NativeFunction< + ffi.Int Function( + CXIndexAction, + CXClientData, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + CXTranslationUnit, + ) + > + >('clang_indexTranslationUnit'); late final _clang_indexTranslationUnit = _clang_indexTranslationUnitPtr - .asFunction(); + .asFunction< + int Function( + CXIndexAction, + CXClientData, + ffi.Pointer, + int, + int, + CXTranslationUnit, + ) + >(); ffi.Pointer clang_index_getCXXClassDeclInfo( ffi.Pointer arg0, @@ -5131,12 +5640,20 @@ class LibClang { } late final _clang_index_getCXXClassDeclInfoPtr = - _lookup>( - 'clang_index_getCXXClassDeclInfo', - ); + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ) + > + >('clang_index_getCXXClassDeclInfo'); late final _clang_index_getCXXClassDeclInfo = _clang_index_getCXXClassDeclInfoPtr - .asFunction(); + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ) + >(); /// For retrieving a custom CXIdxClientContainer attached to a /// container. @@ -5147,12 +5664,16 @@ class LibClang { } late final _clang_index_getClientContainerPtr = - _lookup>( - 'clang_index_getClientContainer', - ); + _lookup< + ffi.NativeFunction< + CXIdxClientContainer Function(ffi.Pointer) + > + >('clang_index_getClientContainer'); late final _clang_index_getClientContainer = _clang_index_getClientContainerPtr - .asFunction(); + .asFunction< + CXIdxClientContainer Function(ffi.Pointer) + >(); /// For retrieving a custom CXIdxClientEntity attached to an entity. CXIdxClientEntity clang_index_getClientEntity( @@ -5162,11 +5683,13 @@ class LibClang { } late final _clang_index_getClientEntityPtr = - _lookup>( - 'clang_index_getClientEntity', - ); + _lookup< + ffi.NativeFunction< + CXIdxClientEntity Function(ffi.Pointer) + > + >('clang_index_getClientEntity'); late final _clang_index_getClientEntity = _clang_index_getClientEntityPtr - .asFunction(); + .asFunction)>(); ffi.Pointer clang_index_getIBOutletCollectionAttrInfo(ffi.Pointer arg0) { @@ -5175,11 +5698,19 @@ class LibClang { late final _clang_index_getIBOutletCollectionAttrInfoPtr = _lookup< - ffi.NativeFunction + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ) + > >('clang_index_getIBOutletCollectionAttrInfo'); late final _clang_index_getIBOutletCollectionAttrInfo = _clang_index_getIBOutletCollectionAttrInfoPtr - .asFunction(); + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ) + >(); ffi.Pointer clang_index_getObjCCategoryDeclInfo( ffi.Pointer arg0, @@ -5188,12 +5719,20 @@ class LibClang { } late final _clang_index_getObjCCategoryDeclInfoPtr = - _lookup>( - 'clang_index_getObjCCategoryDeclInfo', - ); + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ) + > + >('clang_index_getObjCCategoryDeclInfo'); late final _clang_index_getObjCCategoryDeclInfo = _clang_index_getObjCCategoryDeclInfoPtr - .asFunction(); + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ) + >(); ffi.Pointer clang_index_getObjCContainerDeclInfo( ffi.Pointer arg0, @@ -5202,12 +5741,20 @@ class LibClang { } late final _clang_index_getObjCContainerDeclInfoPtr = - _lookup>( - 'clang_index_getObjCContainerDeclInfo', - ); + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ) + > + >('clang_index_getObjCContainerDeclInfo'); late final _clang_index_getObjCContainerDeclInfo = _clang_index_getObjCContainerDeclInfoPtr - .asFunction(); + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ) + >(); ffi.Pointer clang_index_getObjCInterfaceDeclInfo( ffi.Pointer arg0, @@ -5216,12 +5763,20 @@ class LibClang { } late final _clang_index_getObjCInterfaceDeclInfoPtr = - _lookup>( - 'clang_index_getObjCInterfaceDeclInfo', - ); + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ) + > + >('clang_index_getObjCInterfaceDeclInfo'); late final _clang_index_getObjCInterfaceDeclInfo = _clang_index_getObjCInterfaceDeclInfoPtr - .asFunction(); + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ) + >(); ffi.Pointer clang_index_getObjCPropertyDeclInfo( ffi.Pointer arg0, @@ -5230,12 +5785,20 @@ class LibClang { } late final _clang_index_getObjCPropertyDeclInfoPtr = - _lookup>( - 'clang_index_getObjCPropertyDeclInfo', - ); + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ) + > + >('clang_index_getObjCPropertyDeclInfo'); late final _clang_index_getObjCPropertyDeclInfo = _clang_index_getObjCPropertyDeclInfoPtr - .asFunction(); + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ) + >(); ffi.Pointer clang_index_getObjCProtocolRefListInfo(ffi.Pointer arg0) { @@ -5243,24 +5806,31 @@ class LibClang { } late final _clang_index_getObjCProtocolRefListInfoPtr = - _lookup>( - 'clang_index_getObjCProtocolRefListInfo', - ); + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ) + > + >('clang_index_getObjCProtocolRefListInfo'); late final _clang_index_getObjCProtocolRefListInfo = _clang_index_getObjCProtocolRefListInfoPtr - .asFunction(); + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ) + >(); int clang_index_isEntityObjCContainerKind(CXIdxEntityKind arg0) { return _clang_index_isEntityObjCContainerKind(arg0.value); } late final _clang_index_isEntityObjCContainerKindPtr = - _lookup>( + _lookup>( 'clang_index_isEntityObjCContainerKind', ); late final _clang_index_isEntityObjCContainerKind = - _clang_index_isEntityObjCContainerKindPtr - .asFunction(); + _clang_index_isEntityObjCContainerKindPtr.asFunction(); /// For setting a custom CXIdxClientContainer attached to a /// container. @@ -5272,12 +5842,19 @@ class LibClang { } late final _clang_index_setClientContainerPtr = - _lookup>( - 'clang_index_setClientContainer', - ); + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + CXIdxClientContainer, + ) + > + >('clang_index_setClientContainer'); late final _clang_index_setClientContainer = _clang_index_setClientContainerPtr - .asFunction(); + .asFunction< + void Function(ffi.Pointer, CXIdxClientContainer) + >(); /// For setting a custom CXIdxClientEntity attached to an entity. void clang_index_setClientEntity( @@ -5288,11 +5865,15 @@ class LibClang { } late final _clang_index_setClientEntityPtr = - _lookup>( - 'clang_index_setClientEntity', - ); + _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, CXIdxClientEntity) + > + >('clang_index_setClientEntity'); late final _clang_index_setClientEntity = _clang_index_setClientEntityPtr - .asFunction(); + .asFunction< + void Function(ffi.Pointer, CXIdxClientEntity) + >(); /// Determine whether the given cursor kind represents an attribute. int clang_isAttribute(CXCursorKind arg0) { @@ -5300,9 +5881,11 @@ class LibClang { } late final _clang_isAttributePtr = - _lookup>('clang_isAttribute'); + _lookup>( + 'clang_isAttribute', + ); late final _clang_isAttribute = _clang_isAttributePtr - .asFunction(); + .asFunction(); /// Determine whether a CXType has the "const" qualifier set, /// without looking through typedefs that may have added "const" at a @@ -5312,11 +5895,11 @@ class LibClang { } late final _clang_isConstQualifiedTypePtr = - _lookup>( + _lookup>( 'clang_isConstQualifiedType', ); late final _clang_isConstQualifiedType = _clang_isConstQualifiedTypePtr - .asFunction(); + .asFunction(); /// Determine whether the declaration pointed to by this cursor /// is also a definition of that entity. @@ -5325,11 +5908,11 @@ class LibClang { } late final _clang_isCursorDefinitionPtr = - _lookup>( + _lookup>( 'clang_isCursorDefinition', ); late final _clang_isCursorDefinition = _clang_isCursorDefinitionPtr - .asFunction(); + .asFunction(); /// Determine whether the given cursor kind represents a declaration. int clang_isDeclaration(CXCursorKind arg0) { @@ -5337,11 +5920,11 @@ class LibClang { } late final _clang_isDeclarationPtr = - _lookup>( + _lookup>( 'clang_isDeclaration', ); late final _clang_isDeclaration = _clang_isDeclarationPtr - .asFunction(); + .asFunction(); /// Determine whether the given cursor kind represents an expression. int clang_isExpression(CXCursorKind arg0) { @@ -5349,11 +5932,11 @@ class LibClang { } late final _clang_isExpressionPtr = - _lookup>( + _lookup>( 'clang_isExpression', ); late final _clang_isExpression = _clang_isExpressionPtr - .asFunction(); + .asFunction(); /// Determine whether the given header is guarded against /// multiple inclusions, either with the conventional @@ -5363,12 +5946,12 @@ class LibClang { } late final _clang_isFileMultipleIncludeGuardedPtr = - _lookup>( - 'clang_isFileMultipleIncludeGuarded', - ); + _lookup< + ffi.NativeFunction + >('clang_isFileMultipleIncludeGuarded'); late final _clang_isFileMultipleIncludeGuarded = _clang_isFileMultipleIncludeGuardedPtr - .asFunction(); + .asFunction(); /// Return 1 if the CXType is a variadic function type, and 0 otherwise. int clang_isFunctionTypeVariadic(CXType T) { @@ -5376,11 +5959,11 @@ class LibClang { } late final _clang_isFunctionTypeVariadicPtr = - _lookup>( + _lookup>( 'clang_isFunctionTypeVariadic', ); late final _clang_isFunctionTypeVariadic = _clang_isFunctionTypeVariadicPtr - .asFunction(); + .asFunction(); /// Determine whether the given cursor kind represents an invalid /// cursor. @@ -5389,9 +5972,11 @@ class LibClang { } late final _clang_isInvalidPtr = - _lookup>('clang_isInvalid'); + _lookup>( + 'clang_isInvalid', + ); late final _clang_isInvalid = _clang_isInvalidPtr - .asFunction(); + .asFunction(); /// Determine whether the given declaration is invalid. /// @@ -5404,11 +5989,11 @@ class LibClang { } late final _clang_isInvalidDeclarationPtr = - _lookup>( + _lookup>( 'clang_isInvalidDeclaration', ); late final _clang_isInvalidDeclaration = _clang_isInvalidDeclarationPtr - .asFunction(); + .asFunction(); /// Return 1 if the CXType is a POD (plain old data) type, and 0 /// otherwise. @@ -5417,9 +6002,11 @@ class LibClang { } late final _clang_isPODTypePtr = - _lookup>('clang_isPODType'); + _lookup>( + 'clang_isPODType', + ); late final _clang_isPODType = _clang_isPODTypePtr - .asFunction(); + .asFunction(); /// Determine whether the given cursor represents a preprocessing /// element, such as a preprocessor directive or macro instantiation. @@ -5428,11 +6015,11 @@ class LibClang { } late final _clang_isPreprocessingPtr = - _lookup>( + _lookup>( 'clang_isPreprocessing', ); late final _clang_isPreprocessing = _clang_isPreprocessingPtr - .asFunction(); + .asFunction(); /// Determine whether the given cursor kind represents a simple /// reference. @@ -5445,9 +6032,11 @@ class LibClang { } late final _clang_isReferencePtr = - _lookup>('clang_isReference'); + _lookup>( + 'clang_isReference', + ); late final _clang_isReference = _clang_isReferencePtr - .asFunction(); + .asFunction(); /// Determine whether a CXType has the "restrict" qualifier set, /// without looking through typedefs that may have added "restrict" at a @@ -5457,11 +6046,11 @@ class LibClang { } late final _clang_isRestrictQualifiedTypePtr = - _lookup>( + _lookup>( 'clang_isRestrictQualifiedType', ); late final _clang_isRestrictQualifiedType = _clang_isRestrictQualifiedTypePtr - .asFunction(); + .asFunction(); /// Determine whether the given cursor kind represents a statement. int clang_isStatement(CXCursorKind arg0) { @@ -5469,9 +6058,11 @@ class LibClang { } late final _clang_isStatementPtr = - _lookup>('clang_isStatement'); + _lookup>( + 'clang_isStatement', + ); late final _clang_isStatement = _clang_isStatementPtr - .asFunction(); + .asFunction(); /// Determine whether the given cursor kind represents a translation /// unit. @@ -5480,11 +6071,11 @@ class LibClang { } late final _clang_isTranslationUnitPtr = - _lookup>( + _lookup>( 'clang_isTranslationUnit', ); late final _clang_isTranslationUnit = _clang_isTranslationUnitPtr - .asFunction(); + .asFunction(); /// Determine whether the given cursor represents a currently /// unexposed piece of the AST (e.g., CXCursor_UnexposedStmt). @@ -5493,9 +6084,11 @@ class LibClang { } late final _clang_isUnexposedPtr = - _lookup>('clang_isUnexposed'); + _lookup>( + 'clang_isUnexposed', + ); late final _clang_isUnexposed = _clang_isUnexposedPtr - .asFunction(); + .asFunction(); /// Returns 1 if the base class specified by the cursor with kind /// CX_CXXBaseSpecifier is virtual. @@ -5504,11 +6097,11 @@ class LibClang { } late final _clang_isVirtualBasePtr = - _lookup>( + _lookup>( 'clang_isVirtualBase', ); late final _clang_isVirtualBase = _clang_isVirtualBasePtr - .asFunction(); + .asFunction(); /// Determine whether a CXType has the "volatile" qualifier set, /// without looking through typedefs that may have added "volatile" at @@ -5518,11 +6111,11 @@ class LibClang { } late final _clang_isVolatileQualifiedTypePtr = - _lookup>( + _lookup>( 'clang_isVolatileQualifiedType', ); late final _clang_isVolatileQualifiedType = _clang_isVolatileQualifiedTypePtr - .asFunction(); + .asFunction(); /// Deserialize a set of diagnostics from a Clang diagnostics bitcode /// file. @@ -5544,11 +6137,23 @@ class LibClang { } late final _clang_loadDiagnosticsPtr = - _lookup>( - 'clang_loadDiagnostics', - ); + _lookup< + ffi.NativeFunction< + CXDiagnosticSet Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >('clang_loadDiagnostics'); late final _clang_loadDiagnostics = _clang_loadDiagnosticsPtr - .asFunction(); + .asFunction< + CXDiagnosticSet Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); /// Same as \c clang_parseTranslationUnit2, but returns /// the \c CXTranslationUnit instead of an error code. In case of an error this @@ -5575,11 +6180,31 @@ class LibClang { } late final _clang_parseTranslationUnitPtr = - _lookup>( - 'clang_parseTranslationUnit', - ); + _lookup< + ffi.NativeFunction< + CXTranslationUnit Function( + CXIndex, + ffi.Pointer, + ffi.Pointer>, + ffi.Int, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ) + > + >('clang_parseTranslationUnit'); late final _clang_parseTranslationUnit = _clang_parseTranslationUnitPtr - .asFunction(); + .asFunction< + CXTranslationUnit Function( + CXIndex, + ffi.Pointer, + ffi.Pointer>, + int, + ffi.Pointer, + int, + int, + ) + >(); /// Parse the given source file and the translation unit corresponding /// to that file. @@ -5648,11 +6273,33 @@ class LibClang { } late final _clang_parseTranslationUnit2Ptr = - _lookup>( - 'clang_parseTranslationUnit2', - ); + _lookup< + ffi.NativeFunction< + ffi.UnsignedInt Function( + CXIndex, + ffi.Pointer, + ffi.Pointer>, + ffi.Int, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ffi.Pointer, + ) + > + >('clang_parseTranslationUnit2'); late final _clang_parseTranslationUnit2 = _clang_parseTranslationUnit2Ptr - .asFunction(); + .asFunction< + int Function( + CXIndex, + ffi.Pointer, + ffi.Pointer>, + int, + ffi.Pointer, + int, + int, + ffi.Pointer, + ) + >(); /// Same as clang_parseTranslationUnit2 but requires a full command line /// for \c command_line_args including argv[0]. This is useful if the standard @@ -5682,12 +6329,34 @@ class LibClang { } late final _clang_parseTranslationUnit2FullArgvPtr = - _lookup>( - 'clang_parseTranslationUnit2FullArgv', - ); + _lookup< + ffi.NativeFunction< + ffi.UnsignedInt Function( + CXIndex, + ffi.Pointer, + ffi.Pointer>, + ffi.Int, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ffi.Pointer, + ) + > + >('clang_parseTranslationUnit2FullArgv'); late final _clang_parseTranslationUnit2FullArgv = _clang_parseTranslationUnit2FullArgvPtr - .asFunction(); + .asFunction< + int Function( + CXIndex, + ffi.Pointer, + ffi.Pointer>, + int, + ffi.Pointer, + int, + int, + ffi.Pointer, + ) + >(); /// Dispose the remapping. void clang_remap_dispose(CXRemapping arg0) { @@ -5695,11 +6364,11 @@ class LibClang { } late final _clang_remap_disposePtr = - _lookup>( + _lookup>( 'clang_remap_dispose', ); late final _clang_remap_dispose = _clang_remap_disposePtr - .asFunction(); + .asFunction(); /// Get the original and the associated filename from the remapping. /// @@ -5717,11 +6386,25 @@ class LibClang { } late final _clang_remap_getFilenamesPtr = - _lookup>( - 'clang_remap_getFilenames', - ); + _lookup< + ffi.NativeFunction< + ffi.Void Function( + CXRemapping, + ffi.UnsignedInt, + ffi.Pointer, + ffi.Pointer, + ) + > + >('clang_remap_getFilenames'); late final _clang_remap_getFilenames = _clang_remap_getFilenamesPtr - .asFunction(); + .asFunction< + void Function( + CXRemapping, + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); /// Determine the number of remappings. int clang_remap_getNumFiles(CXRemapping arg0) { @@ -5729,11 +6412,11 @@ class LibClang { } late final _clang_remap_getNumFilesPtr = - _lookup>( + _lookup>( 'clang_remap_getNumFiles', ); late final _clang_remap_getNumFiles = _clang_remap_getNumFilesPtr - .asFunction(); + .asFunction(); /// Reparse the source files that produced this translation unit. /// @@ -5787,11 +6470,20 @@ class LibClang { } late final _clang_reparseTranslationUnitPtr = - _lookup>( - 'clang_reparseTranslationUnit', - ); + _lookup< + ffi.NativeFunction< + ffi.Int Function( + CXTranslationUnit, + ffi.UnsignedInt, + ffi.Pointer, + ffi.UnsignedInt, + ) + > + >('clang_reparseTranslationUnit'); late final _clang_reparseTranslationUnit = _clang_reparseTranslationUnitPtr - .asFunction(); + .asFunction< + int Function(CXTranslationUnit, int, ffi.Pointer, int) + >(); /// Saves a translation unit into a serialized representation of /// that translation unit on disk. @@ -5823,11 +6515,19 @@ class LibClang { } late final _clang_saveTranslationUnitPtr = - _lookup>( - 'clang_saveTranslationUnit', - ); + _lookup< + ffi.NativeFunction< + ffi.Int Function( + CXTranslationUnit, + ffi.Pointer, + ffi.UnsignedInt, + ) + > + >('clang_saveTranslationUnit'); late final _clang_saveTranslationUnit = _clang_saveTranslationUnitPtr - .asFunction(); + .asFunction< + int Function(CXTranslationUnit, ffi.Pointer, int) + >(); /// Sort the code-completion results in case-insensitive alphabetical /// order. @@ -5842,12 +6542,14 @@ class LibClang { } late final _clang_sortCodeCompletionResultsPtr = - _lookup>( - 'clang_sortCodeCompletionResults', - ); + _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.UnsignedInt) + > + >('clang_sortCodeCompletionResults'); late final _clang_sortCodeCompletionResults = _clang_sortCodeCompletionResultsPtr - .asFunction(); + .asFunction, int)>(); /// Suspend a translation unit in order to free memory associated with it. /// @@ -5859,11 +6561,11 @@ class LibClang { } late final _clang_suspendTranslationUnitPtr = - _lookup>( + _lookup>( 'clang_suspendTranslationUnit', ); late final _clang_suspendTranslationUnit = _clang_suspendTranslationUnitPtr - .asFunction(); + .asFunction(); /// Enable/disable crash recovery. /// @@ -5874,11 +6576,11 @@ class LibClang { } late final _clang_toggleCrashRecoveryPtr = - _lookup>( + _lookup>( 'clang_toggleCrashRecovery', ); late final _clang_toggleCrashRecovery = _clang_toggleCrashRecoveryPtr - .asFunction(); + .asFunction(); /// Tokenize the source code described by the given range into raw /// lexical tokens. @@ -5904,9 +6606,25 @@ class LibClang { } late final _clang_tokenizePtr = - _lookup>('clang_tokenize'); + _lookup< + ffi.NativeFunction< + ffi.Void Function( + CXTranslationUnit, + CXSourceRange, + ffi.Pointer>, + ffi.Pointer, + ) + > + >('clang_tokenize'); late final _clang_tokenize = _clang_tokenizePtr - .asFunction(); + .asFunction< + void Function( + CXTranslationUnit, + CXSourceRange, + ffi.Pointer>, + ffi.Pointer, + ) + >(); /// Visit the children of a particular cursor. /// @@ -5937,11 +6655,13 @@ class LibClang { } late final _clang_visitChildrenPtr = - _lookup>( - 'clang_visitChildren', - ); + _lookup< + ffi.NativeFunction< + ffi.UnsignedInt Function(CXCursor, CXCursorVisitor, CXClientData) + > + >('clang_visitChildren'); late final _clang_visitChildren = _clang_visitChildrenPtr - .asFunction(); + .asFunction(); late final addresses = _SymbolAddresses(this); } @@ -5949,772 +6669,1319 @@ class LibClang { class _SymbolAddresses { final LibClang _library; _SymbolAddresses(this._library); - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction + > get clang_CXCursorSet_contains => _library._clang_CXCursorSet_containsPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction + > get clang_CXCursorSet_insert => _library._clang_CXCursorSet_insertPtr; - ffi.Pointer> + ffi.Pointer> get clang_CXIndex_getGlobalOptions => _library._clang_CXIndex_getGlobalOptionsPtr; - ffi.Pointer> + ffi.Pointer> get clang_CXIndex_setGlobalOptions => _library._clang_CXIndex_setGlobalOptionsPtr; ffi.Pointer< - ffi.NativeFunction + ffi.NativeFunction)> > get clang_CXIndex_setInvocationEmissionPathOption => _library._clang_CXIndex_setInvocationEmissionPathOptionPtr; - ffi.Pointer< - ffi.NativeFunction - > + ffi.Pointer> get clang_CXXConstructor_isConvertingConstructor => _library._clang_CXXConstructor_isConvertingConstructorPtr; - ffi.Pointer> + ffi.Pointer> get clang_CXXConstructor_isCopyConstructor => _library._clang_CXXConstructor_isCopyConstructorPtr; - ffi.Pointer< - ffi.NativeFunction - > + ffi.Pointer> get clang_CXXConstructor_isDefaultConstructor => _library._clang_CXXConstructor_isDefaultConstructorPtr; - ffi.Pointer> + ffi.Pointer> get clang_CXXConstructor_isMoveConstructor => _library._clang_CXXConstructor_isMoveConstructorPtr; - ffi.Pointer> + ffi.Pointer> get clang_CXXField_isMutable => _library._clang_CXXField_isMutablePtr; - ffi.Pointer> + ffi.Pointer> get clang_CXXMethod_isConst => _library._clang_CXXMethod_isConstPtr; - ffi.Pointer> + ffi.Pointer> get clang_CXXMethod_isDefaulted => _library._clang_CXXMethod_isDefaultedPtr; - ffi.Pointer> + ffi.Pointer> get clang_CXXMethod_isPureVirtual => _library._clang_CXXMethod_isPureVirtualPtr; - ffi.Pointer> + ffi.Pointer> get clang_CXXMethod_isStatic => _library._clang_CXXMethod_isStaticPtr; - ffi.Pointer> + ffi.Pointer> get clang_CXXMethod_isVirtual => _library._clang_CXXMethod_isVirtualPtr; - ffi.Pointer> + ffi.Pointer> get clang_CXXRecord_isAbstract => _library._clang_CXXRecord_isAbstractPtr; - ffi.Pointer> + ffi.Pointer> get clang_Cursor_Evaluate => _library._clang_Cursor_EvaluatePtr; - ffi.Pointer> + ffi.Pointer> get clang_Cursor_getArgument => _library._clang_Cursor_getArgumentPtr; - ffi.Pointer> + ffi.Pointer> get clang_Cursor_getBriefCommentText => _library._clang_Cursor_getBriefCommentTextPtr; - ffi.Pointer> + ffi.Pointer Function(CXCursor)>> get clang_Cursor_getCXXManglings => _library._clang_Cursor_getCXXManglingsPtr; - ffi.Pointer> + ffi.Pointer> get clang_Cursor_getCommentRange => _library._clang_Cursor_getCommentRangePtr; - ffi.Pointer> + ffi.Pointer> get clang_Cursor_getMangling => _library._clang_Cursor_getManglingPtr; - ffi.Pointer> + ffi.Pointer> get clang_Cursor_getModule => _library._clang_Cursor_getModulePtr; - ffi.Pointer> + ffi.Pointer> get clang_Cursor_getNumArguments => _library._clang_Cursor_getNumArgumentsPtr; - ffi.Pointer> + ffi.Pointer> get clang_Cursor_getNumTemplateArguments => _library._clang_Cursor_getNumTemplateArgumentsPtr; - ffi.Pointer> + ffi.Pointer> get clang_Cursor_getObjCDeclQualifiers => _library._clang_Cursor_getObjCDeclQualifiersPtr; - ffi.Pointer> + ffi.Pointer Function(CXCursor)>> get clang_Cursor_getObjCManglings => _library._clang_Cursor_getObjCManglingsPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction + > get clang_Cursor_getObjCPropertyAttributes => _library._clang_Cursor_getObjCPropertyAttributesPtr; - ffi.Pointer> + ffi.Pointer> get clang_Cursor_getObjCPropertyGetterName => _library._clang_Cursor_getObjCPropertyGetterNamePtr; - ffi.Pointer> + ffi.Pointer> get clang_Cursor_getObjCPropertySetterName => _library._clang_Cursor_getObjCPropertySetterNamePtr; - ffi.Pointer> + ffi.Pointer> get clang_Cursor_getObjCSelectorIndex => _library._clang_Cursor_getObjCSelectorIndexPtr; - ffi.Pointer> + ffi.Pointer> get clang_Cursor_getOffsetOfField => _library._clang_Cursor_getOffsetOfFieldPtr; - ffi.Pointer> + ffi.Pointer> get clang_Cursor_getRawCommentText => _library._clang_Cursor_getRawCommentTextPtr; - ffi.Pointer> + ffi.Pointer> get clang_Cursor_getReceiverType => _library._clang_Cursor_getReceiverTypePtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + CXSourceRange Function(CXCursor, ffi.UnsignedInt, ffi.UnsignedInt) + > + > get clang_Cursor_getSpellingNameRange => _library._clang_Cursor_getSpellingNameRangePtr; - ffi.Pointer> + ffi.Pointer> get clang_Cursor_getStorageClass => _library._clang_Cursor_getStorageClassPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction + > get clang_Cursor_getTemplateArgumentKind => _library._clang_Cursor_getTemplateArgumentKindPtr; - ffi.Pointer> + ffi.Pointer> get clang_Cursor_getTemplateArgumentType => _library._clang_Cursor_getTemplateArgumentTypePtr; ffi.Pointer< - ffi.NativeFunction + ffi.NativeFunction > get clang_Cursor_getTemplateArgumentUnsignedValue => _library._clang_Cursor_getTemplateArgumentUnsignedValuePtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction + > get clang_Cursor_getTemplateArgumentValue => _library._clang_Cursor_getTemplateArgumentValuePtr; - ffi.Pointer> + ffi.Pointer> get clang_Cursor_getTranslationUnit => _library._clang_Cursor_getTranslationUnitPtr; - ffi.Pointer> + ffi.Pointer> get clang_Cursor_hasAttrs => _library._clang_Cursor_hasAttrsPtr; - ffi.Pointer> + ffi.Pointer> get clang_Cursor_isAnonymous => _library._clang_Cursor_isAnonymousPtr; - ffi.Pointer> + ffi.Pointer> get clang_Cursor_isAnonymousRecordDecl => _library._clang_Cursor_isAnonymousRecordDeclPtr; - ffi.Pointer> + ffi.Pointer> get clang_Cursor_isBitField => _library._clang_Cursor_isBitFieldPtr; - ffi.Pointer> + ffi.Pointer> get clang_Cursor_isDynamicCall => _library._clang_Cursor_isDynamicCallPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedInt Function( + CXCursor, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + > get clang_Cursor_isExternalSymbol => _library._clang_Cursor_isExternalSymbolPtr; - ffi.Pointer> + ffi.Pointer> get clang_Cursor_isFunctionInlined => _library._clang_Cursor_isFunctionInlinedPtr; - ffi.Pointer> + ffi.Pointer> get clang_Cursor_isInlineNamespace => _library._clang_Cursor_isInlineNamespacePtr; - ffi.Pointer> + ffi.Pointer> get clang_Cursor_isMacroBuiltin => _library._clang_Cursor_isMacroBuiltinPtr; - ffi.Pointer> + ffi.Pointer> get clang_Cursor_isMacroFunctionLike => _library._clang_Cursor_isMacroFunctionLikePtr; - ffi.Pointer> + ffi.Pointer> get clang_Cursor_isNull => _library._clang_Cursor_isNullPtr; - ffi.Pointer> + ffi.Pointer> get clang_Cursor_isObjCOptional => _library._clang_Cursor_isObjCOptionalPtr; - ffi.Pointer> + ffi.Pointer> get clang_Cursor_isVariadic => _library._clang_Cursor_isVariadicPtr; - ffi.Pointer> + ffi.Pointer> get clang_EnumDecl_isScoped => _library._clang_EnumDecl_isScopedPtr; - ffi.Pointer> + ffi.Pointer> get clang_EvalResult_dispose => _library._clang_EvalResult_disposePtr; - ffi.Pointer> + ffi.Pointer> get clang_EvalResult_getAsDouble => _library._clang_EvalResult_getAsDoublePtr; - ffi.Pointer> + ffi.Pointer> get clang_EvalResult_getAsInt => _library._clang_EvalResult_getAsIntPtr; - ffi.Pointer> + ffi.Pointer> get clang_EvalResult_getAsLongLong => _library._clang_EvalResult_getAsLongLongPtr; - ffi.Pointer> + ffi.Pointer Function(CXEvalResult)>> get clang_EvalResult_getAsStr => _library._clang_EvalResult_getAsStrPtr; - ffi.Pointer> + ffi.Pointer> get clang_EvalResult_getAsUnsigned => _library._clang_EvalResult_getAsUnsignedPtr; - ffi.Pointer> + ffi.Pointer> get clang_EvalResult_getKind => _library._clang_EvalResult_getKindPtr; - ffi.Pointer> + ffi.Pointer> get clang_EvalResult_isUnsignedInt => _library._clang_EvalResult_isUnsignedIntPtr; - ffi.Pointer> + ffi.Pointer> get clang_File_isEqual => _library._clang_File_isEqualPtr; - ffi.Pointer> + ffi.Pointer> get clang_File_tryGetRealPathName => _library._clang_File_tryGetRealPathNamePtr; - ffi.Pointer> + ffi.Pointer> get clang_IndexAction_create => _library._clang_IndexAction_createPtr; - ffi.Pointer> + ffi.Pointer> get clang_IndexAction_dispose => _library._clang_IndexAction_disposePtr; - ffi.Pointer> + ffi.Pointer> get clang_Location_isFromMainFile => _library._clang_Location_isFromMainFilePtr; - ffi.Pointer> + ffi.Pointer> get clang_Location_isInSystemHeader => _library._clang_Location_isInSystemHeaderPtr; - ffi.Pointer> + ffi.Pointer> get clang_Module_getASTFile => _library._clang_Module_getASTFilePtr; - ffi.Pointer> + ffi.Pointer> get clang_Module_getFullName => _library._clang_Module_getFullNamePtr; - ffi.Pointer> + ffi.Pointer> get clang_Module_getName => _library._clang_Module_getNamePtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction + > get clang_Module_getNumTopLevelHeaders => _library._clang_Module_getNumTopLevelHeadersPtr; - ffi.Pointer> + ffi.Pointer> get clang_Module_getParent => _library._clang_Module_getParentPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + CXFile Function(CXTranslationUnit, CXModule, ffi.UnsignedInt) + > + > get clang_Module_getTopLevelHeader => _library._clang_Module_getTopLevelHeaderPtr; - ffi.Pointer> + ffi.Pointer> get clang_Module_isSystem => _library._clang_Module_isSystemPtr; - ffi.Pointer> + ffi.Pointer> get clang_PrintingPolicy_dispose => _library._clang_PrintingPolicy_disposePtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedInt Function(CXPrintingPolicy, ffi.UnsignedInt) + > + > get clang_PrintingPolicy_getProperty => _library._clang_PrintingPolicy_getPropertyPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CXPrintingPolicy, ffi.UnsignedInt, ffi.UnsignedInt) + > + > get clang_PrintingPolicy_setProperty => _library._clang_PrintingPolicy_setPropertyPtr; - ffi.Pointer> + ffi.Pointer> get clang_Range_isNull => _library._clang_Range_isNullPtr; - ffi.Pointer> + ffi.Pointer> get clang_TargetInfo_dispose => _library._clang_TargetInfo_disposePtr; - ffi.Pointer> + ffi.Pointer> get clang_TargetInfo_getPointerWidth => _library._clang_TargetInfo_getPointerWidthPtr; - ffi.Pointer> + ffi.Pointer> get clang_TargetInfo_getTriple => _library._clang_TargetInfo_getTriplePtr; - ffi.Pointer> + ffi.Pointer> get clang_Type_getAlignOf => _library._clang_Type_getAlignOfPtr; - ffi.Pointer> + ffi.Pointer> get clang_Type_getCXXRefQualifier => _library._clang_Type_getCXXRefQualifierPtr; - ffi.Pointer> + ffi.Pointer> get clang_Type_getClassType => _library._clang_Type_getClassTypePtr; - ffi.Pointer> + ffi.Pointer> get clang_Type_getModifiedType => _library._clang_Type_getModifiedTypePtr; - ffi.Pointer> + ffi.Pointer> get clang_Type_getNamedType => _library._clang_Type_getNamedTypePtr; - ffi.Pointer> + ffi.Pointer> get clang_Type_getNullability => _library._clang_Type_getNullabilityPtr; - ffi.Pointer> + ffi.Pointer> get clang_Type_getNumObjCProtocolRefs => _library._clang_Type_getNumObjCProtocolRefsPtr; - ffi.Pointer> + ffi.Pointer> get clang_Type_getNumObjCTypeArgs => _library._clang_Type_getNumObjCTypeArgsPtr; - ffi.Pointer> + ffi.Pointer> get clang_Type_getNumTemplateArguments => _library._clang_Type_getNumTemplateArgumentsPtr; - ffi.Pointer> + ffi.Pointer> get clang_Type_getObjCEncoding => _library._clang_Type_getObjCEncodingPtr; - ffi.Pointer> + ffi.Pointer> get clang_Type_getObjCObjectBaseType => _library._clang_Type_getObjCObjectBaseTypePtr; - ffi.Pointer> + ffi.Pointer> get clang_Type_getObjCProtocolDecl => _library._clang_Type_getObjCProtocolDeclPtr; - ffi.Pointer> + ffi.Pointer> get clang_Type_getObjCTypeArg => _library._clang_Type_getObjCTypeArgPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction)> + > get clang_Type_getOffsetOf => _library._clang_Type_getOffsetOfPtr; - ffi.Pointer> + ffi.Pointer> get clang_Type_getSizeOf => _library._clang_Type_getSizeOfPtr; - ffi.Pointer> + ffi.Pointer> get clang_Type_getTemplateArgumentAsType => _library._clang_Type_getTemplateArgumentAsTypePtr; - ffi.Pointer> + ffi.Pointer> get clang_Type_isTransparentTagTypedef => _library._clang_Type_isTransparentTagTypedefPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedInt Function(CXType, CXFieldVisitor, CXClientData) + > + > get clang_Type_visitFields => _library._clang_Type_visitFieldsPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + CXTranslationUnit, + ffi.Pointer, + ffi.UnsignedInt, + ffi.Pointer, + ) + > + > get clang_annotateTokens => _library._clang_annotateTokensPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + CXTranslationUnit, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ) + > + > get clang_codeCompleteAt => _library._clang_codeCompleteAtPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedInt Function( + ffi.Pointer, + ffi.Pointer, + ) + > + > get clang_codeCompleteGetContainerKind => _library._clang_codeCompleteGetContainerKindPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction)> + > get clang_codeCompleteGetContainerUSR => _library._clang_codeCompleteGetContainerUSRPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLongLong Function(ffi.Pointer) + > + > get clang_codeCompleteGetContexts => _library._clang_codeCompleteGetContextsPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + CXDiagnostic Function(ffi.Pointer, ffi.UnsignedInt) + > + > get clang_codeCompleteGetDiagnostic => _library._clang_codeCompleteGetDiagnosticPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedInt Function(ffi.Pointer) + > + > get clang_codeCompleteGetNumDiagnostics => _library._clang_codeCompleteGetNumDiagnosticsPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction)> + > get clang_codeCompleteGetObjCSelector => _library._clang_codeCompleteGetObjCSelectorPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + CXString Function(ffi.Pointer, ffi.Pointer) + > + > get clang_constructUSR_ObjCCategory => _library._clang_constructUSR_ObjCCategoryPtr; - ffi.Pointer> + ffi.Pointer)>> get clang_constructUSR_ObjCClass => _library._clang_constructUSR_ObjCClassPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction, CXString)> + > get clang_constructUSR_ObjCIvar => _library._clang_constructUSR_ObjCIvarPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + CXString Function(ffi.Pointer, ffi.UnsignedInt, CXString) + > + > get clang_constructUSR_ObjCMethod => _library._clang_constructUSR_ObjCMethodPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction, CXString)> + > get clang_constructUSR_ObjCProperty => _library._clang_constructUSR_ObjCPropertyPtr; - ffi.Pointer> + ffi.Pointer)>> get clang_constructUSR_ObjCProtocol => _library._clang_constructUSR_ObjCProtocolPtr; - ffi.Pointer> + ffi.Pointer> get clang_createCXCursorSet => _library._clang_createCXCursorSetPtr; - ffi.Pointer> + ffi.Pointer> get clang_createIndex => _library._clang_createIndexPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + CXTranslationUnit Function(CXIndex, ffi.Pointer) + > + > get clang_createTranslationUnit => _library._clang_createTranslationUnitPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedInt Function( + CXIndex, + ffi.Pointer, + ffi.Pointer, + ) + > + > get clang_createTranslationUnit2 => _library._clang_createTranslationUnit2Ptr; ffi.Pointer< - ffi.NativeFunction + ffi.NativeFunction< + CXTranslationUnit Function( + CXIndex, + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ffi.UnsignedInt, + ffi.Pointer, + ) + > > get clang_createTranslationUnitFromSourceFile => _library._clang_createTranslationUnitFromSourceFilePtr; - ffi.Pointer> + ffi.Pointer> get clang_defaultCodeCompleteOptions => _library._clang_defaultCodeCompleteOptionsPtr; - ffi.Pointer> + ffi.Pointer> get clang_defaultDiagnosticDisplayOptions => _library._clang_defaultDiagnosticDisplayOptionsPtr; - ffi.Pointer< - ffi.NativeFunction - > + ffi.Pointer> get clang_defaultEditingTranslationUnitOptions => _library._clang_defaultEditingTranslationUnitOptionsPtr; - ffi.Pointer> + ffi.Pointer> get clang_defaultReparseOptions => _library._clang_defaultReparseOptionsPtr; - ffi.Pointer> + ffi.Pointer> get clang_defaultSaveOptions => _library._clang_defaultSaveOptionsPtr; - ffi.Pointer> + ffi.Pointer> get clang_disposeCXCursorSet => _library._clang_disposeCXCursorSetPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction)> + > get clang_disposeCXPlatformAvailability => _library._clang_disposeCXPlatformAvailabilityPtr; - ffi.Pointer> + ffi.Pointer> get clang_disposeCXTUResourceUsage => _library._clang_disposeCXTUResourceUsagePtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction)> + > get clang_disposeCodeCompleteResults => _library._clang_disposeCodeCompleteResultsPtr; - ffi.Pointer> + ffi.Pointer> get clang_disposeDiagnostic => _library._clang_disposeDiagnosticPtr; - ffi.Pointer> + ffi.Pointer> get clang_disposeDiagnosticSet => _library._clang_disposeDiagnosticSetPtr; - ffi.Pointer> + ffi.Pointer> get clang_disposeIndex => _library._clang_disposeIndexPtr; - ffi.Pointer> + ffi.Pointer)>> get clang_disposeOverriddenCursors => _library._clang_disposeOverriddenCursorsPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction)> + > get clang_disposeSourceRangeList => _library._clang_disposeSourceRangeListPtr; - ffi.Pointer> + ffi.Pointer> get clang_disposeString => _library._clang_disposeStringPtr; - ffi.Pointer> + ffi.Pointer)>> get clang_disposeStringSet => _library._clang_disposeStringSetPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + CXTranslationUnit, + ffi.Pointer, + ffi.UnsignedInt, + ) + > + > get clang_disposeTokens => _library._clang_disposeTokensPtr; - ffi.Pointer> + ffi.Pointer> get clang_disposeTranslationUnit => _library._clang_disposeTranslationUnitPtr; - ffi.Pointer> + ffi.Pointer> get clang_enableStackTraces => _library._clang_enableStackTracesPtr; - ffi.Pointer> + ffi.Pointer> get clang_equalCursors => _library._clang_equalCursorsPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedInt Function(CXSourceLocation, CXSourceLocation) + > + > get clang_equalLocations => _library._clang_equalLocationsPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction + > get clang_equalRanges => _library._clang_equalRangesPtr; - ffi.Pointer> + ffi.Pointer> get clang_equalTypes => _library._clang_equalTypesPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer< + ffi.NativeFunction)> + >, + ffi.Pointer, + ffi.UnsignedInt, + ) + > + > get clang_executeOnThread => _library._clang_executeOnThreadPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedInt Function( + CXTranslationUnit, + CXFile, + CXCursorAndRangeVisitor, + ) + > + > get clang_findIncludesInFile => _library._clang_findIncludesInFilePtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedInt Function(CXCursor, CXFile, CXCursorAndRangeVisitor) + > + > get clang_findReferencesInFile => _library._clang_findReferencesInFilePtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction + > get clang_formatDiagnostic => _library._clang_formatDiagnosticPtr; - ffi.Pointer> + ffi.Pointer> get clang_getAddressSpace => _library._clang_getAddressSpacePtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(CXTranslationUnit) + > + > get clang_getAllSkippedRanges => _library._clang_getAllSkippedRangesPtr; - ffi.Pointer> + ffi.Pointer> get clang_getArgType => _library._clang_getArgTypePtr; - ffi.Pointer> + ffi.Pointer> get clang_getArrayElementType => _library._clang_getArrayElementTypePtr; - ffi.Pointer> + ffi.Pointer> get clang_getArraySize => _library._clang_getArraySizePtr; - ffi.Pointer> + ffi.Pointer Function(CXString)>> get clang_getCString => _library._clang_getCStringPtr; - ffi.Pointer> + ffi.Pointer> get clang_getCXTUResourceUsage => _library._clang_getCXTUResourceUsagePtr; - ffi.Pointer> + ffi.Pointer> get clang_getCXXAccessSpecifier => _library._clang_getCXXAccessSpecifierPtr; - ffi.Pointer> + ffi.Pointer> get clang_getCanonicalCursor => _library._clang_getCanonicalCursorPtr; - ffi.Pointer> + ffi.Pointer> get clang_getCanonicalType => _library._clang_getCanonicalTypePtr; - ffi.Pointer> + ffi.Pointer> get clang_getChildDiagnostics => _library._clang_getChildDiagnosticsPtr; - ffi.Pointer> + ffi.Pointer> get clang_getClangVersion => _library._clang_getClangVersionPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction + > get clang_getCompletionAnnotation => _library._clang_getCompletionAnnotationPtr; - ffi.Pointer> + ffi.Pointer> get clang_getCompletionAvailability => _library._clang_getCompletionAvailabilityPtr; - ffi.Pointer> + ffi.Pointer> get clang_getCompletionBriefComment => _library._clang_getCompletionBriefCommentPtr; ffi.Pointer< - ffi.NativeFunction + ffi.NativeFunction< + CXCompletionString Function(CXCompletionString, ffi.UnsignedInt) + > > get clang_getCompletionChunkCompletionString => _library._clang_getCompletionChunkCompletionStringPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedInt Function(CXCompletionString, ffi.UnsignedInt) + > + > get clang_getCompletionChunkKind => _library._clang_getCompletionChunkKindPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction + > get clang_getCompletionChunkText => _library._clang_getCompletionChunkTextPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + CXString Function( + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ffi.Pointer, + ) + > + > get clang_getCompletionFixIt => _library._clang_getCompletionFixItPtr; - ffi.Pointer> + ffi.Pointer> get clang_getCompletionNumAnnotations => _library._clang_getCompletionNumAnnotationsPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedInt Function( + ffi.Pointer, + ffi.UnsignedInt, + ) + > + > get clang_getCompletionNumFixIts => _library._clang_getCompletionNumFixItsPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + CXString Function(CXCompletionString, ffi.Pointer) + > + > get clang_getCompletionParent => _library._clang_getCompletionParentPtr; - ffi.Pointer> + ffi.Pointer> get clang_getCompletionPriority => _library._clang_getCompletionPriorityPtr; - ffi.Pointer> get clang_getCursor => - _library._clang_getCursorPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction + > + get clang_getCursor => _library._clang_getCursorPtr; + ffi.Pointer> get clang_getCursorAvailability => _library._clang_getCursorAvailabilityPtr; - ffi.Pointer> + ffi.Pointer> get clang_getCursorCompletionString => _library._clang_getCursorCompletionStringPtr; - ffi.Pointer> + ffi.Pointer> get clang_getCursorDefinition => _library._clang_getCursorDefinitionPtr; - ffi.Pointer> + ffi.Pointer> get clang_getCursorDisplayName => _library._clang_getCursorDisplayNamePtr; - ffi.Pointer< - ffi.NativeFunction - > + ffi.Pointer> get clang_getCursorExceptionSpecificationType => _library._clang_getCursorExceptionSpecificationTypePtr; - ffi.Pointer> + ffi.Pointer> get clang_getCursorExtent => _library._clang_getCursorExtentPtr; - ffi.Pointer> + ffi.Pointer> get clang_getCursorKind => _library._clang_getCursorKindPtr; - ffi.Pointer> + ffi.Pointer> get clang_getCursorKindSpelling => _library._clang_getCursorKindSpellingPtr; - ffi.Pointer> + ffi.Pointer> get clang_getCursorLanguage => _library._clang_getCursorLanguagePtr; - ffi.Pointer> + ffi.Pointer> get clang_getCursorLexicalParent => _library._clang_getCursorLexicalParentPtr; - ffi.Pointer> + ffi.Pointer> get clang_getCursorLinkage => _library._clang_getCursorLinkagePtr; - ffi.Pointer> + ffi.Pointer> get clang_getCursorLocation => _library._clang_getCursorLocationPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + CXCursor, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ) + > + > get clang_getCursorPlatformAvailability => _library._clang_getCursorPlatformAvailabilityPtr; - ffi.Pointer> + ffi.Pointer> get clang_getCursorPrettyPrinted => _library._clang_getCursorPrettyPrintedPtr; - ffi.Pointer> + ffi.Pointer> get clang_getCursorPrintingPolicy => _library._clang_getCursorPrintingPolicyPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + CXSourceRange Function(CXCursor, ffi.UnsignedInt, ffi.UnsignedInt) + > + > get clang_getCursorReferenceNameRange => _library._clang_getCursorReferenceNameRangePtr; - ffi.Pointer> + ffi.Pointer> get clang_getCursorReferenced => _library._clang_getCursorReferencedPtr; - ffi.Pointer> + ffi.Pointer> get clang_getCursorResultType => _library._clang_getCursorResultTypePtr; - ffi.Pointer> + ffi.Pointer> get clang_getCursorSemanticParent => _library._clang_getCursorSemanticParentPtr; - ffi.Pointer> + ffi.Pointer> get clang_getCursorSpelling => _library._clang_getCursorSpellingPtr; - ffi.Pointer> + ffi.Pointer> get clang_getCursorTLSKind => _library._clang_getCursorTLSKindPtr; - ffi.Pointer> + ffi.Pointer> get clang_getCursorType => _library._clang_getCursorTypePtr; - ffi.Pointer> + ffi.Pointer> get clang_getCursorUSR => _library._clang_getCursorUSRPtr; - ffi.Pointer> + ffi.Pointer> get clang_getCursorVisibility => _library._clang_getCursorVisibilityPtr; - ffi.Pointer> + ffi.Pointer> get clang_getDeclObjCTypeEncoding => _library._clang_getDeclObjCTypeEncodingPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + CXCursor, + ffi.Pointer>, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + > get clang_getDefinitionSpellingAndExtent => _library._clang_getDefinitionSpellingAndExtentPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + CXDiagnostic Function(CXTranslationUnit, ffi.UnsignedInt) + > + > get clang_getDiagnostic => _library._clang_getDiagnosticPtr; - ffi.Pointer> + ffi.Pointer> get clang_getDiagnosticCategory => _library._clang_getDiagnosticCategoryPtr; - ffi.Pointer> + ffi.Pointer> get clang_getDiagnosticCategoryName => _library._clang_getDiagnosticCategoryNamePtr; - ffi.Pointer> + ffi.Pointer> get clang_getDiagnosticCategoryText => _library._clang_getDiagnosticCategoryTextPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + CXString Function( + CXDiagnostic, + ffi.UnsignedInt, + ffi.Pointer, + ) + > + > get clang_getDiagnosticFixIt => _library._clang_getDiagnosticFixItPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction + > get clang_getDiagnosticInSet => _library._clang_getDiagnosticInSetPtr; - ffi.Pointer> + ffi.Pointer> get clang_getDiagnosticLocation => _library._clang_getDiagnosticLocationPtr; - ffi.Pointer> + ffi.Pointer> get clang_getDiagnosticNumFixIts => _library._clang_getDiagnosticNumFixItsPtr; - ffi.Pointer> + ffi.Pointer> get clang_getDiagnosticNumRanges => _library._clang_getDiagnosticNumRangesPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction)> + > get clang_getDiagnosticOption => _library._clang_getDiagnosticOptionPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction + > get clang_getDiagnosticRange => _library._clang_getDiagnosticRangePtr; - ffi.Pointer> + ffi.Pointer> get clang_getDiagnosticSetFromTU => _library._clang_getDiagnosticSetFromTUPtr; - ffi.Pointer> + ffi.Pointer> get clang_getDiagnosticSeverity => _library._clang_getDiagnosticSeverityPtr; - ffi.Pointer> + ffi.Pointer> get clang_getDiagnosticSpelling => _library._clang_getDiagnosticSpellingPtr; - ffi.Pointer> + ffi.Pointer> get clang_getElementType => _library._clang_getElementTypePtr; - ffi.Pointer> + ffi.Pointer> get clang_getEnumConstantDeclUnsignedValue => _library._clang_getEnumConstantDeclUnsignedValuePtr; - ffi.Pointer> + ffi.Pointer> get clang_getEnumConstantDeclValue => _library._clang_getEnumConstantDeclValuePtr; - ffi.Pointer> + ffi.Pointer> get clang_getEnumDeclIntegerType => _library._clang_getEnumDeclIntegerTypePtr; - ffi.Pointer> + ffi.Pointer> get clang_getExceptionSpecificationType => _library._clang_getExceptionSpecificationTypePtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + CXSourceLocation, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + > get clang_getExpansionLocation => _library._clang_getExpansionLocationPtr; - ffi.Pointer> + ffi.Pointer> get clang_getFieldDeclBitWidth => _library._clang_getFieldDeclBitWidthPtr; - ffi.Pointer> get clang_getFile => - _library._clang_getFilePtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + CXFile Function(CXTranslationUnit, ffi.Pointer) + > + > + get clang_getFile => _library._clang_getFilePtr; + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + CXTranslationUnit, + CXFile, + ffi.Pointer, + ) + > + > get clang_getFileContents => _library._clang_getFileContentsPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + CXSourceLocation, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + > get clang_getFileLocation => _library._clang_getFileLocationPtr; - ffi.Pointer> + ffi.Pointer> get clang_getFileName => _library._clang_getFileNamePtr; - ffi.Pointer> + ffi.Pointer> get clang_getFileTime => _library._clang_getFileTimePtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction)> + > get clang_getFileUniqueID => _library._clang_getFileUniqueIDPtr; - ffi.Pointer> + ffi.Pointer> get clang_getFunctionTypeCallingConv => _library._clang_getFunctionTypeCallingConvPtr; - ffi.Pointer> + ffi.Pointer> get clang_getIBOutletCollectionType => _library._clang_getIBOutletCollectionTypePtr; - ffi.Pointer> + ffi.Pointer> get clang_getIncludedFile => _library._clang_getIncludedFilePtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CXTranslationUnit, CXInclusionVisitor, CXClientData) + > + > get clang_getInclusions => _library._clang_getInclusionsPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + CXSourceLocation, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + > get clang_getInstantiationLocation => _library._clang_getInstantiationLocationPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + CXSourceLocation Function( + CXTranslationUnit, + CXFile, + ffi.UnsignedInt, + ffi.UnsignedInt, + ) + > + > get clang_getLocation => _library._clang_getLocationPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + CXSourceLocation Function(CXTranslationUnit, CXFile, ffi.UnsignedInt) + > + > get clang_getLocationForOffset => _library._clang_getLocationForOffsetPtr; - ffi.Pointer> + ffi.Pointer> get clang_getModuleForFile => _library._clang_getModuleForFilePtr; - ffi.Pointer> + ffi.Pointer> get clang_getNullCursor => _library._clang_getNullCursorPtr; - ffi.Pointer> + ffi.Pointer> get clang_getNullLocation => _library._clang_getNullLocationPtr; - ffi.Pointer> + ffi.Pointer> get clang_getNullRange => _library._clang_getNullRangePtr; - ffi.Pointer> + ffi.Pointer> get clang_getNumArgTypes => _library._clang_getNumArgTypesPtr; - ffi.Pointer> + ffi.Pointer> get clang_getNumCompletionChunks => _library._clang_getNumCompletionChunksPtr; - ffi.Pointer> + ffi.Pointer> get clang_getNumDiagnostics => _library._clang_getNumDiagnosticsPtr; - ffi.Pointer> + ffi.Pointer> get clang_getNumDiagnosticsInSet => _library._clang_getNumDiagnosticsInSetPtr; - ffi.Pointer> + ffi.Pointer> get clang_getNumElements => _library._clang_getNumElementsPtr; - ffi.Pointer> + ffi.Pointer> get clang_getNumOverloadedDecls => _library._clang_getNumOverloadedDeclsPtr; - ffi.Pointer> + ffi.Pointer> get clang_getOverloadedDecl => _library._clang_getOverloadedDeclPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + CXCursor, + ffi.Pointer>, + ffi.Pointer, + ) + > + > get clang_getOverriddenCursors => _library._clang_getOverriddenCursorsPtr; - ffi.Pointer> + ffi.Pointer> get clang_getPointeeType => _library._clang_getPointeeTypePtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + CXSourceLocation, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + > get clang_getPresumedLocation => _library._clang_getPresumedLocationPtr; - ffi.Pointer> get clang_getRange => - _library._clang_getRangePtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + CXSourceRange Function(CXSourceLocation, CXSourceLocation) + > + > + get clang_getRange => _library._clang_getRangePtr; + ffi.Pointer> get clang_getRangeEnd => _library._clang_getRangeEndPtr; - ffi.Pointer> + ffi.Pointer> get clang_getRangeStart => _library._clang_getRangeStartPtr; - ffi.Pointer> + ffi.Pointer)>> get clang_getRemappings => _library._clang_getRemappingsPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + CXRemapping Function(ffi.Pointer>, ffi.UnsignedInt) + > + > get clang_getRemappingsFromFileList => _library._clang_getRemappingsFromFileListPtr; - ffi.Pointer> + ffi.Pointer> get clang_getResultType => _library._clang_getResultTypePtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(CXTranslationUnit, CXFile) + > + > get clang_getSkippedRanges => _library._clang_getSkippedRangesPtr; - ffi.Pointer> + ffi.Pointer> get clang_getSpecializedCursorTemplate => _library._clang_getSpecializedCursorTemplatePtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + CXSourceLocation, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + > get clang_getSpellingLocation => _library._clang_getSpellingLocationPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction Function(ffi.UnsignedInt)> + > get clang_getTUResourceUsageName => _library._clang_getTUResourceUsageNamePtr; - ffi.Pointer> + ffi.Pointer> get clang_getTemplateCursorKind => _library._clang_getTemplateCursorKindPtr; - ffi.Pointer> get clang_getToken => - _library._clang_getTokenPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(CXTranslationUnit, CXSourceLocation) + > + > + get clang_getToken => _library._clang_getTokenPtr; + ffi.Pointer< + ffi.NativeFunction + > get clang_getTokenExtent => _library._clang_getTokenExtentPtr; - ffi.Pointer> + ffi.Pointer> get clang_getTokenKind => _library._clang_getTokenKindPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction + > get clang_getTokenLocation => _library._clang_getTokenLocationPtr; - ffi.Pointer> + ffi.Pointer> get clang_getTokenSpelling => _library._clang_getTokenSpellingPtr; - ffi.Pointer> + ffi.Pointer> get clang_getTranslationUnitCursor => _library._clang_getTranslationUnitCursorPtr; - ffi.Pointer> + ffi.Pointer> get clang_getTranslationUnitSpelling => _library._clang_getTranslationUnitSpellingPtr; - ffi.Pointer> + ffi.Pointer> get clang_getTranslationUnitTargetInfo => _library._clang_getTranslationUnitTargetInfoPtr; - ffi.Pointer> + ffi.Pointer> get clang_getTypeDeclaration => _library._clang_getTypeDeclarationPtr; - ffi.Pointer> + ffi.Pointer> get clang_getTypeKindSpelling => _library._clang_getTypeKindSpellingPtr; - ffi.Pointer> + ffi.Pointer> get clang_getTypeSpelling => _library._clang_getTypeSpellingPtr; - ffi.Pointer> + ffi.Pointer> get clang_getTypedefDeclUnderlyingType => _library._clang_getTypedefDeclUnderlyingTypePtr; - ffi.Pointer> + ffi.Pointer> get clang_getTypedefName => _library._clang_getTypedefNamePtr; - ffi.Pointer> + ffi.Pointer> get clang_hashCursor => _library._clang_hashCursorPtr; - ffi.Pointer> + ffi.Pointer> get clang_indexLoc_getCXSourceLocation => _library._clang_indexLoc_getCXSourceLocationPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + CXIdxLoc, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + > get clang_indexLoc_getFileLocation => _library._clang_indexLoc_getFileLocationPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + CXIndexAction, + CXClientData, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ffi.Pointer, + ffi.Pointer>, + ffi.Int, + ffi.Pointer, + ffi.UnsignedInt, + ffi.Pointer, + ffi.UnsignedInt, + ) + > + > get clang_indexSourceFile => _library._clang_indexSourceFilePtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + CXIndexAction, + CXClientData, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ffi.Pointer, + ffi.Pointer>, + ffi.Int, + ffi.Pointer, + ffi.UnsignedInt, + ffi.Pointer, + ffi.UnsignedInt, + ) + > + > get clang_indexSourceFileFullArgv => _library._clang_indexSourceFileFullArgvPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + CXIndexAction, + CXClientData, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + CXTranslationUnit, + ) + > + > get clang_indexTranslationUnit => _library._clang_indexTranslationUnitPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer) + > + > get clang_index_getCXXClassDeclInfo => _library._clang_index_getCXXClassDeclInfoPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + CXIdxClientContainer Function(ffi.Pointer) + > + > get clang_index_getClientContainer => _library._clang_index_getClientContainerPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction)> + > get clang_index_getClientEntity => _library._clang_index_getClientEntityPtr; ffi.Pointer< - ffi.NativeFunction + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ) + > > get clang_index_getIBOutletCollectionAttrInfo => _library._clang_index_getIBOutletCollectionAttrInfoPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ) + > + > get clang_index_getObjCCategoryDeclInfo => _library._clang_index_getObjCCategoryDeclInfoPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ) + > + > get clang_index_getObjCContainerDeclInfo => _library._clang_index_getObjCContainerDeclInfoPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ) + > + > get clang_index_getObjCInterfaceDeclInfo => _library._clang_index_getObjCInterfaceDeclInfoPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ) + > + > get clang_index_getObjCPropertyDeclInfo => _library._clang_index_getObjCPropertyDeclInfoPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ) + > + > get clang_index_getObjCProtocolRefListInfo => _library._clang_index_getObjCProtocolRefListInfoPtr; - ffi.Pointer> + ffi.Pointer> get clang_index_isEntityObjCContainerKind => _library._clang_index_isEntityObjCContainerKindPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, CXIdxClientContainer) + > + > get clang_index_setClientContainer => _library._clang_index_setClientContainerPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, CXIdxClientEntity) + > + > get clang_index_setClientEntity => _library._clang_index_setClientEntityPtr; - ffi.Pointer> + ffi.Pointer> get clang_isAttribute => _library._clang_isAttributePtr; - ffi.Pointer> + ffi.Pointer> get clang_isConstQualifiedType => _library._clang_isConstQualifiedTypePtr; - ffi.Pointer> + ffi.Pointer> get clang_isCursorDefinition => _library._clang_isCursorDefinitionPtr; - ffi.Pointer> + ffi.Pointer> get clang_isDeclaration => _library._clang_isDeclarationPtr; - ffi.Pointer> + ffi.Pointer> get clang_isExpression => _library._clang_isExpressionPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction + > get clang_isFileMultipleIncludeGuarded => _library._clang_isFileMultipleIncludeGuardedPtr; - ffi.Pointer> + ffi.Pointer> get clang_isFunctionTypeVariadic => _library._clang_isFunctionTypeVariadicPtr; - ffi.Pointer> get clang_isInvalid => - _library._clang_isInvalidPtr; - ffi.Pointer> + ffi.Pointer> + get clang_isInvalid => _library._clang_isInvalidPtr; + ffi.Pointer> get clang_isInvalidDeclaration => _library._clang_isInvalidDeclarationPtr; - ffi.Pointer> get clang_isPODType => - _library._clang_isPODTypePtr; - ffi.Pointer> + ffi.Pointer> + get clang_isPODType => _library._clang_isPODTypePtr; + ffi.Pointer> get clang_isPreprocessing => _library._clang_isPreprocessingPtr; - ffi.Pointer> + ffi.Pointer> get clang_isReference => _library._clang_isReferencePtr; - ffi.Pointer> + ffi.Pointer> get clang_isRestrictQualifiedType => _library._clang_isRestrictQualifiedTypePtr; - ffi.Pointer> + ffi.Pointer> get clang_isStatement => _library._clang_isStatementPtr; - ffi.Pointer> + ffi.Pointer> get clang_isTranslationUnit => _library._clang_isTranslationUnitPtr; - ffi.Pointer> + ffi.Pointer> get clang_isUnexposed => _library._clang_isUnexposedPtr; - ffi.Pointer> + ffi.Pointer> get clang_isVirtualBase => _library._clang_isVirtualBasePtr; - ffi.Pointer> + ffi.Pointer> get clang_isVolatileQualifiedType => _library._clang_isVolatileQualifiedTypePtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + CXDiagnosticSet Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + > get clang_loadDiagnostics => _library._clang_loadDiagnosticsPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + CXTranslationUnit Function( + CXIndex, + ffi.Pointer, + ffi.Pointer>, + ffi.Int, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ) + > + > get clang_parseTranslationUnit => _library._clang_parseTranslationUnitPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedInt Function( + CXIndex, + ffi.Pointer, + ffi.Pointer>, + ffi.Int, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ffi.Pointer, + ) + > + > get clang_parseTranslationUnit2 => _library._clang_parseTranslationUnit2Ptr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedInt Function( + CXIndex, + ffi.Pointer, + ffi.Pointer>, + ffi.Int, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ffi.Pointer, + ) + > + > get clang_parseTranslationUnit2FullArgv => _library._clang_parseTranslationUnit2FullArgvPtr; - ffi.Pointer> + ffi.Pointer> get clang_remap_dispose => _library._clang_remap_disposePtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + CXRemapping, + ffi.UnsignedInt, + ffi.Pointer, + ffi.Pointer, + ) + > + > get clang_remap_getFilenames => _library._clang_remap_getFilenamesPtr; - ffi.Pointer> + ffi.Pointer> get clang_remap_getNumFiles => _library._clang_remap_getNumFilesPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + CXTranslationUnit, + ffi.UnsignedInt, + ffi.Pointer, + ffi.UnsignedInt, + ) + > + > get clang_reparseTranslationUnit => _library._clang_reparseTranslationUnitPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + CXTranslationUnit, + ffi.Pointer, + ffi.UnsignedInt, + ) + > + > get clang_saveTranslationUnit => _library._clang_saveTranslationUnitPtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.UnsignedInt) + > + > get clang_sortCodeCompletionResults => _library._clang_sortCodeCompletionResultsPtr; - ffi.Pointer> + ffi.Pointer> get clang_suspendTranslationUnit => _library._clang_suspendTranslationUnitPtr; - ffi.Pointer> + ffi.Pointer> get clang_toggleCrashRecovery => _library._clang_toggleCrashRecoveryPtr; - ffi.Pointer> get clang_tokenize => - _library._clang_tokenizePtr; - ffi.Pointer> + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + CXTranslationUnit, + CXSourceRange, + ffi.Pointer>, + ffi.Pointer, + ) + > + > + get clang_tokenize => _library._clang_tokenizePtr; + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedInt Function(CXCursor, CXCursorVisitor, CXClientData) + > + > get clang_visitChildren => _library._clang_visitChildrenPtr; } @@ -6869,6 +8136,46 @@ final class CXCodeCompleteResults extends ffi.Struct { ..ref.NumResults = NumResults; } +/// Flags that can be passed to \c clang_codeCompleteAt() to +/// modify its behavior. +/// +/// The enumerators in this enumeration can be bitwise-OR'd together to +/// provide multiple options to \c clang_codeCompleteAt(). +enum CXCodeComplete_Flags { + /// Whether to include macros within the set of code + /// completions returned. + CXCodeComplete_IncludeMacros(1), + + /// Whether to include code patterns for language constructs + /// within the set of code completions, e.g., for loops. + CXCodeComplete_IncludeCodePatterns(2), + + /// Whether to include brief documentation within the set of code + /// completions returned. + CXCodeComplete_IncludeBriefComments(4), + + /// Whether to speed up completion by omitting top- or namespace-level entities + /// defined in the preamble. There's no guarantee any particular entity is + /// omitted. This may be useful if the headers are indexed externally. + CXCodeComplete_SkipPreamble(8), + + /// Whether to include completions with small + /// fix-its, e.g. change '.' to '->' on member access, etc. + CXCodeComplete_IncludeCompletionsWithFixIts(16); + + final int value; + const CXCodeComplete_Flags(this.value); + + static CXCodeComplete_Flags fromValue(int value) => switch (value) { + 1 => CXCodeComplete_IncludeMacros, + 2 => CXCodeComplete_IncludeCodePatterns, + 4 => CXCodeComplete_IncludeBriefComments, + 8 => CXCodeComplete_SkipPreamble, + 16 => CXCodeComplete_IncludeCompletionsWithFixIts, + _ => throw ArgumentError('Unknown value for CXCodeComplete_Flags: $value'), + }; +} + /// Describes a single piece of text within a code-completion string. /// /// Each "chunk" within a code-completion string (\c CXCompletionString) is @@ -7044,6 +8351,136 @@ enum CXCompletionChunkKind { }; } +/// Bits that represent the context under which completion is occurring. +/// +/// The enumerators in this enumeration may be bitwise-OR'd together if multiple +/// contexts are occurring simultaneously. +enum CXCompletionContext { + /// The context for completions is unexposed, as only Clang results + /// should be included. (This is equivalent to having no context bits set.) + CXCompletionContext_Unexposed(0), + + /// Completions for any possible type should be included in the results. + CXCompletionContext_AnyType(1), + + /// Completions for any possible value (variables, function calls, etc.) + /// should be included in the results. + CXCompletionContext_AnyValue(2), + + /// Completions for values that resolve to an Objective-C object should + /// be included in the results. + CXCompletionContext_ObjCObjectValue(4), + + /// Completions for values that resolve to an Objective-C selector + /// should be included in the results. + CXCompletionContext_ObjCSelectorValue(8), + + /// Completions for values that resolve to a C++ class type should be + /// included in the results. + CXCompletionContext_CXXClassTypeValue(16), + + /// Completions for fields of the member being accessed using the dot + /// operator should be included in the results. + CXCompletionContext_DotMemberAccess(32), + + /// Completions for fields of the member being accessed using the arrow + /// operator should be included in the results. + CXCompletionContext_ArrowMemberAccess(64), + + /// Completions for properties of the Objective-C object being accessed + /// using the dot operator should be included in the results. + CXCompletionContext_ObjCPropertyAccess(128), + + /// Completions for enum tags should be included in the results. + CXCompletionContext_EnumTag(256), + + /// Completions for union tags should be included in the results. + CXCompletionContext_UnionTag(512), + + /// Completions for struct tags should be included in the results. + CXCompletionContext_StructTag(1024), + + /// Completions for C++ class names should be included in the results. + CXCompletionContext_ClassTag(2048), + + /// Completions for C++ namespaces and namespace aliases should be + /// included in the results. + CXCompletionContext_Namespace(4096), + + /// Completions for C++ nested name specifiers should be included in + /// the results. + CXCompletionContext_NestedNameSpecifier(8192), + + /// Completions for Objective-C interfaces (classes) should be included + /// in the results. + CXCompletionContext_ObjCInterface(16384), + + /// Completions for Objective-C protocols should be included in + /// the results. + CXCompletionContext_ObjCProtocol(32768), + + /// Completions for Objective-C categories should be included in + /// the results. + CXCompletionContext_ObjCCategory(65536), + + /// Completions for Objective-C instance messages should be included + /// in the results. + CXCompletionContext_ObjCInstanceMessage(131072), + + /// Completions for Objective-C class messages should be included in + /// the results. + CXCompletionContext_ObjCClassMessage(262144), + + /// Completions for Objective-C selector names should be included in + /// the results. + CXCompletionContext_ObjCSelectorName(524288), + + /// Completions for preprocessor macro names should be included in + /// the results. + CXCompletionContext_MacroName(1048576), + + /// Natural language completions should be included in the results. + CXCompletionContext_NaturalLanguage(2097152), + + /// #include file completions should be included in the results. + CXCompletionContext_IncludedFile(4194304), + + /// The current context is unknown, so set all contexts. + CXCompletionContext_Unknown(8388607); + + final int value; + const CXCompletionContext(this.value); + + static CXCompletionContext fromValue(int value) => switch (value) { + 0 => CXCompletionContext_Unexposed, + 1 => CXCompletionContext_AnyType, + 2 => CXCompletionContext_AnyValue, + 4 => CXCompletionContext_ObjCObjectValue, + 8 => CXCompletionContext_ObjCSelectorValue, + 16 => CXCompletionContext_CXXClassTypeValue, + 32 => CXCompletionContext_DotMemberAccess, + 64 => CXCompletionContext_ArrowMemberAccess, + 128 => CXCompletionContext_ObjCPropertyAccess, + 256 => CXCompletionContext_EnumTag, + 512 => CXCompletionContext_UnionTag, + 1024 => CXCompletionContext_StructTag, + 2048 => CXCompletionContext_ClassTag, + 4096 => CXCompletionContext_Namespace, + 8192 => CXCompletionContext_NestedNameSpecifier, + 16384 => CXCompletionContext_ObjCInterface, + 32768 => CXCompletionContext_ObjCProtocol, + 65536 => CXCompletionContext_ObjCCategory, + 131072 => CXCompletionContext_ObjCInstanceMessage, + 262144 => CXCompletionContext_ObjCClassMessage, + 524288 => CXCompletionContext_ObjCSelectorName, + 1048576 => CXCompletionContext_MacroName, + 2097152 => CXCompletionContext_NaturalLanguage, + 4194304 => CXCompletionContext_IncludedFile, + 8388607 => CXCompletionContext_Unknown, + _ => throw ArgumentError('Unknown value for CXCompletionContext: $value'), + }; +} + /// A single result of code completion. final class CXCompletionResult extends ffi.Struct { /// The kind of entity that this completion refers to. @@ -8244,10 +9681,134 @@ typedef DartCXCursorVisitorFunction = CXClientData client_data, ); +/// Describes the exception specification of a cursor. +/// +/// A negative value indicates that the cursor is not a function declaration. +enum CXCursor_ExceptionSpecificationKind { + /// The cursor has no exception specification. + CXCursor_ExceptionSpecificationKind_None(0), + + /// The cursor has exception specification throw() + CXCursor_ExceptionSpecificationKind_DynamicNone(1), + + /// The cursor has exception specification throw(T1, T2) + CXCursor_ExceptionSpecificationKind_Dynamic(2), + + /// The cursor has exception specification throw(...). + CXCursor_ExceptionSpecificationKind_MSAny(3), + + /// The cursor has exception specification basic noexcept. + CXCursor_ExceptionSpecificationKind_BasicNoexcept(4), + + /// The cursor has exception specification computed noexcept. + CXCursor_ExceptionSpecificationKind_ComputedNoexcept(5), + + /// The exception specification has not yet been evaluated. + CXCursor_ExceptionSpecificationKind_Unevaluated(6), + + /// The exception specification has not yet been instantiated. + CXCursor_ExceptionSpecificationKind_Uninstantiated(7), + + /// The exception specification has not been parsed yet. + CXCursor_ExceptionSpecificationKind_Unparsed(8), + + /// The cursor has a __declspec(nothrow) exception specification. + CXCursor_ExceptionSpecificationKind_NoThrow(9); + + final int value; + const CXCursor_ExceptionSpecificationKind(this.value); + + static CXCursor_ExceptionSpecificationKind fromValue(int value) => + switch (value) { + 0 => CXCursor_ExceptionSpecificationKind_None, + 1 => CXCursor_ExceptionSpecificationKind_DynamicNone, + 2 => CXCursor_ExceptionSpecificationKind_Dynamic, + 3 => CXCursor_ExceptionSpecificationKind_MSAny, + 4 => CXCursor_ExceptionSpecificationKind_BasicNoexcept, + 5 => CXCursor_ExceptionSpecificationKind_ComputedNoexcept, + 6 => CXCursor_ExceptionSpecificationKind_Unevaluated, + 7 => CXCursor_ExceptionSpecificationKind_Uninstantiated, + 8 => CXCursor_ExceptionSpecificationKind_Unparsed, + 9 => CXCursor_ExceptionSpecificationKind_NoThrow, + _ => throw ArgumentError( + 'Unknown value for CXCursor_ExceptionSpecificationKind: $value', + ), + }; +} + /// A single diagnostic, containing the diagnostic's severity, /// location, text, source ranges, and fix-it hints. typedef CXDiagnostic = ffi.Pointer; +/// Options to control the display of diagnostics. +/// +/// The values in this enum are meant to be combined to customize the +/// behavior of \c clang_formatDiagnostic(). +enum CXDiagnosticDisplayOptions { + /// Display the source-location information where the + /// diagnostic was located. + /// + /// When set, diagnostics will be prefixed by the file, line, and + /// (optionally) column to which the diagnostic refers. For example, + /// + /// \code + /// test.c:28: warning: extra tokens at end of #endif directive + /// \endcode + /// + /// This option corresponds to the clang flag \c -fshow-source-location. + CXDiagnostic_DisplaySourceLocation(1), + + /// If displaying the source-location information of the + /// diagnostic, also include the column number. + /// + /// This option corresponds to the clang flag \c -fshow-column. + CXDiagnostic_DisplayColumn(2), + + /// If displaying the source-location information of the + /// diagnostic, also include information about source ranges in a + /// machine-parsable format. + /// + /// This option corresponds to the clang flag + /// \c -fdiagnostics-print-source-range-info. + CXDiagnostic_DisplaySourceRanges(4), + + /// Display the option name associated with this diagnostic, if any. + /// + /// The option name displayed (e.g., -Wconversion) will be placed in brackets + /// after the diagnostic text. This option corresponds to the clang flag + /// \c -fdiagnostics-show-option. + CXDiagnostic_DisplayOption(8), + + /// Display the category number associated with this diagnostic, if any. + /// + /// The category number is displayed within brackets after the diagnostic text. + /// This option corresponds to the clang flag + /// \c -fdiagnostics-show-category=id. + CXDiagnostic_DisplayCategoryId(16), + + /// Display the category name associated with this diagnostic, if any. + /// + /// The category name is displayed within brackets after the diagnostic text. + /// This option corresponds to the clang flag + /// \c -fdiagnostics-show-category=name. + CXDiagnostic_DisplayCategoryName(32); + + final int value; + const CXDiagnosticDisplayOptions(this.value); + + static CXDiagnosticDisplayOptions fromValue(int value) => switch (value) { + 1 => CXDiagnostic_DisplaySourceLocation, + 2 => CXDiagnostic_DisplayColumn, + 4 => CXDiagnostic_DisplaySourceRanges, + 8 => CXDiagnostic_DisplayOption, + 16 => CXDiagnostic_DisplayCategoryId, + 32 => CXDiagnostic_DisplayCategoryName, + _ => throw ArgumentError( + 'Unknown value for CXDiagnosticDisplayOptions: $value', + ), + }; +} + /// A group of CXDiagnostics. typedef CXDiagnosticSet = ffi.Pointer; @@ -8523,6 +10084,18 @@ final class CXIdxDeclInfo extends ffi.Struct { external int flags; } +enum CXIdxDeclInfoFlags { + CXIdxDeclFlag_Skipped(1); + + final int value; + const CXIdxDeclInfoFlags(this.value); + + static CXIdxDeclInfoFlags fromValue(int value) => switch (value) { + 1 => CXIdxDeclFlag_Skipped, + _ => throw ArgumentError('Unknown value for CXIdxDeclInfoFlags: $value'), + }; +} + /// Extra C++ template information for an entity. This can apply to: /// CXIdxEntity_Function /// CXIdxEntity_CXXClass @@ -8929,6 +10502,45 @@ typedef CXIndex = ffi.Pointer; /// translation units. typedef CXIndexAction = ffi.Pointer; +enum CXIndexOptFlags { + /// Used to indicate that no special indexing options are needed. + CXIndexOpt_None(0), + + /// Used to indicate that IndexerCallbacks#indexEntityReference should + /// be invoked for only one reference of an entity per source file that does + /// not also include a declaration/definition of the entity. + CXIndexOpt_SuppressRedundantRefs(1), + + /// Function-local symbols should be indexed. If this is not set + /// function-local symbols will be ignored. + CXIndexOpt_IndexFunctionLocalSymbols(2), + + /// Implicit function/class template instantiations should be indexed. + /// If this is not set, implicit instantiations will be ignored. + CXIndexOpt_IndexImplicitTemplateInstantiations(4), + + /// Suppress all compiler warnings when parsing for indexing. + CXIndexOpt_SuppressWarnings(8), + + /// Skip a function/method body that was already parsed during an + /// indexing session associated with a \c CXIndexAction object. + /// Bodies in system headers are always skipped. + CXIndexOpt_SkipParsedBodiesInSession(16); + + final int value; + const CXIndexOptFlags(this.value); + + static CXIndexOptFlags fromValue(int value) => switch (value) { + 0 => CXIndexOpt_None, + 1 => CXIndexOpt_SuppressRedundantRefs, + 2 => CXIndexOpt_IndexFunctionLocalSymbols, + 4 => CXIndexOpt_IndexImplicitTemplateInstantiations, + 8 => CXIndexOpt_SuppressWarnings, + 16 => CXIndexOpt_SkipParsedBodiesInSession, + _ => throw ArgumentError('Unknown value for CXIndexOptFlags: $value'), + }; +} + /// Describe the "language" of the entity referred to by a cursor. enum CXLanguageKind { CXLanguage_Invalid(0), @@ -9018,6 +10630,105 @@ enum CXLoadDiag_Error { /// @{ typedef CXModule = ffi.Pointer; +enum CXNameRefFlags { + /// Include the nested-name-specifier, e.g. Foo:: in x.Foo::y, in the + /// range. + CXNameRange_WantQualifier(1), + + /// Include the explicit template arguments, e.g. \ in x.f, + /// in the range. + CXNameRange_WantTemplateArgs(2), + + /// If the name is non-contiguous, return the full spanning range. + /// + /// Non-contiguous names occur in Objective-C when a selector with two or more + /// parameters is used, or in C++ when using an operator: + /// \code + /// [object doSomething:here withValue:there]; // Objective-C + /// return some_vector[1]; // C++ + /// \endcode + CXNameRange_WantSinglePiece(4); + + final int value; + const CXNameRefFlags(this.value); + + static CXNameRefFlags fromValue(int value) => switch (value) { + 1 => CXNameRange_WantQualifier, + 2 => CXNameRange_WantTemplateArgs, + 4 => CXNameRange_WantSinglePiece, + _ => throw ArgumentError('Unknown value for CXNameRefFlags: $value'), + }; +} + +/// 'Qualifiers' written next to the return and parameter types in +/// Objective-C method declarations. +enum CXObjCDeclQualifierKind { + CXObjCDeclQualifier_None(0), + CXObjCDeclQualifier_In(1), + CXObjCDeclQualifier_Inout(2), + CXObjCDeclQualifier_Out(4), + CXObjCDeclQualifier_Bycopy(8), + CXObjCDeclQualifier_Byref(16), + CXObjCDeclQualifier_Oneway(32); + + final int value; + const CXObjCDeclQualifierKind(this.value); + + static CXObjCDeclQualifierKind fromValue(int value) => switch (value) { + 0 => CXObjCDeclQualifier_None, + 1 => CXObjCDeclQualifier_In, + 2 => CXObjCDeclQualifier_Inout, + 4 => CXObjCDeclQualifier_Out, + 8 => CXObjCDeclQualifier_Bycopy, + 16 => CXObjCDeclQualifier_Byref, + 32 => CXObjCDeclQualifier_Oneway, + _ => throw ArgumentError( + 'Unknown value for CXObjCDeclQualifierKind: $value', + ), + }; +} + +/// Property attributes for a \c CXCursor_ObjCPropertyDecl. +enum CXObjCPropertyAttrKind { + CXObjCPropertyAttr_noattr(0), + CXObjCPropertyAttr_readonly(1), + CXObjCPropertyAttr_getter(2), + CXObjCPropertyAttr_assign(4), + CXObjCPropertyAttr_readwrite(8), + CXObjCPropertyAttr_retain(16), + CXObjCPropertyAttr_copy(32), + CXObjCPropertyAttr_nonatomic(64), + CXObjCPropertyAttr_setter(128), + CXObjCPropertyAttr_atomic(256), + CXObjCPropertyAttr_weak(512), + CXObjCPropertyAttr_strong(1024), + CXObjCPropertyAttr_unsafe_unretained(2048), + CXObjCPropertyAttr_class(4096); + + final int value; + const CXObjCPropertyAttrKind(this.value); + + static CXObjCPropertyAttrKind fromValue(int value) => switch (value) { + 0 => CXObjCPropertyAttr_noattr, + 1 => CXObjCPropertyAttr_readonly, + 2 => CXObjCPropertyAttr_getter, + 4 => CXObjCPropertyAttr_assign, + 8 => CXObjCPropertyAttr_readwrite, + 16 => CXObjCPropertyAttr_retain, + 32 => CXObjCPropertyAttr_copy, + 64 => CXObjCPropertyAttr_nonatomic, + 128 => CXObjCPropertyAttr_setter, + 256 => CXObjCPropertyAttr_atomic, + 512 => CXObjCPropertyAttr_weak, + 1024 => CXObjCPropertyAttr_strong, + 2048 => CXObjCPropertyAttr_unsafe_unretained, + 4096 => CXObjCPropertyAttr_class, + _ => throw ArgumentError( + 'Unknown value for CXObjCPropertyAttrKind: $value', + ), + }; +} + /// Describes the availability of a given entity on a particular platform, e.g., /// a particular class might only be available on Mac OS 10.7 or newer. final class CXPlatformAvailability extends ffi.Struct { @@ -9152,6 +10863,24 @@ enum CXRefQualifierKind { /// A remapping of original source files and their translated files. typedef CXRemapping = ffi.Pointer; +/// Flags that control the reparsing of translation units. +/// +/// The enumerators in this enumeration type are meant to be bitwise +/// ORed together to specify which options should be used when +/// reparsing the translation unit. +enum CXReparse_Flags { + /// Used to indicate that no special reparsing options are needed. + CXReparse_None(0); + + final int value; + const CXReparse_Flags(this.value); + + static CXReparse_Flags fromValue(int value) => switch (value) { + 0 => CXReparse_None, + _ => throw ArgumentError('Unknown value for CXReparse_Flags: $value'), + }; +} + enum CXResult { /// Function returned successfully. CXResult_Success(0), @@ -9174,6 +10903,62 @@ enum CXResult { }; } +/// Describes the kind of error that occurred (if any) in a call to +/// \c clang_saveTranslationUnit(). +enum CXSaveError { + /// Indicates that no error occurred while saving a translation unit. + CXSaveError_None(0), + + /// Indicates that an unknown error occurred while attempting to save + /// the file. + /// + /// This error typically indicates that file I/O failed when attempting to + /// write the file. + CXSaveError_Unknown(1), + + /// Indicates that errors during translation prevented this attempt + /// to save the translation unit. + /// + /// Errors that prevent the translation unit from being saved can be + /// extracted using \c clang_getNumDiagnostics() and \c clang_getDiagnostic(). + CXSaveError_TranslationErrors(2), + + /// Indicates that the translation unit to be saved was somehow + /// invalid (e.g., NULL). + CXSaveError_InvalidTU(3); + + final int value; + const CXSaveError(this.value); + + static CXSaveError fromValue(int value) => switch (value) { + 0 => CXSaveError_None, + 1 => CXSaveError_Unknown, + 2 => CXSaveError_TranslationErrors, + 3 => CXSaveError_InvalidTU, + _ => throw ArgumentError('Unknown value for CXSaveError: $value'), + }; +} + +/// Flags that control how translation units are saved. +/// +/// The enumerators in this enumeration type are meant to be bitwise +/// ORed together to specify which options should be used when +/// saving the translation unit. +enum CXSaveTranslationUnit_Flags { + /// Used to indicate that no special saving options are needed. + CXSaveTranslationUnit_None(0); + + final int value; + const CXSaveTranslationUnit_Flags(this.value); + + static CXSaveTranslationUnit_Flags fromValue(int value) => switch (value) { + 0 => CXSaveTranslationUnit_None, + _ => throw ArgumentError( + 'Unknown value for CXSaveTranslationUnit_Flags: $value', + ), + }; +} + /// Identifies a specific source location within a translation /// unit. /// @@ -9487,6 +11272,152 @@ typedef CXTranslationUnit = ffi.Pointer; final class CXTranslationUnitImpl extends ffi.Opaque {} +/// Flags that control the creation of translation units. +/// +/// The enumerators in this enumeration type are meant to be bitwise +/// ORed together to specify which options should be used when +/// constructing the translation unit. +enum CXTranslationUnit_Flags { + /// Used to indicate that no special translation-unit options are + /// needed. + CXTranslationUnit_None(0), + + /// Used to indicate that the parser should construct a "detailed" + /// preprocessing record, including all macro definitions and instantiations. + /// + /// Constructing a detailed preprocessing record requires more memory + /// and time to parse, since the information contained in the record + /// is usually not retained. However, it can be useful for + /// applications that require more detailed information about the + /// behavior of the preprocessor. + CXTranslationUnit_DetailedPreprocessingRecord(1), + + /// Used to indicate that the translation unit is incomplete. + /// + /// When a translation unit is considered "incomplete", semantic + /// analysis that is typically performed at the end of the + /// translation unit will be suppressed. For example, this suppresses + /// the completion of tentative declarations in C and of + /// instantiation of implicitly-instantiation function templates in + /// C++. This option is typically used when parsing a header with the + /// intent of producing a precompiled header. + CXTranslationUnit_Incomplete(2), + + /// Used to indicate that the translation unit should be built with an + /// implicit precompiled header for the preamble. + /// + /// An implicit precompiled header is used as an optimization when a + /// particular translation unit is likely to be reparsed many times + /// when the sources aren't changing that often. In this case, an + /// implicit precompiled header will be built containing all of the + /// initial includes at the top of the main file (what we refer to as + /// the "preamble" of the file). In subsequent parses, if the + /// preamble or the files in it have not changed, \c + /// clang_reparseTranslationUnit() will re-use the implicit + /// precompiled header to improve parsing performance. + CXTranslationUnit_PrecompiledPreamble(4), + + /// Used to indicate that the translation unit should cache some + /// code-completion results with each reparse of the source file. + /// + /// Caching of code-completion results is a performance optimization that + /// introduces some overhead to reparsing but improves the performance of + /// code-completion operations. + CXTranslationUnit_CacheCompletionResults(8), + + /// Used to indicate that the translation unit will be serialized with + /// \c clang_saveTranslationUnit. + /// + /// This option is typically used when parsing a header with the intent of + /// producing a precompiled header. + CXTranslationUnit_ForSerialization(16), + + /// DEPRECATED: Enabled chained precompiled preambles in C++. + /// + /// Note: this is a *temporary* option that is available only while + /// we are testing C++ precompiled preamble support. It is deprecated. + CXTranslationUnit_CXXChainedPCH(32), + + /// Used to indicate that function/method bodies should be skipped while + /// parsing. + /// + /// This option can be used to search for declarations/definitions while + /// ignoring the usages. + CXTranslationUnit_SkipFunctionBodies(64), + + /// Used to indicate that brief documentation comments should be + /// included into the set of code completions returned from this translation + /// unit. + CXTranslationUnit_IncludeBriefCommentsInCodeCompletion(128), + + /// Used to indicate that the precompiled preamble should be created on + /// the first parse. Otherwise it will be created on the first reparse. This + /// trades runtime on the first parse (serializing the preamble takes time) for + /// reduced runtime on the second parse (can now reuse the preamble). + CXTranslationUnit_CreatePreambleOnFirstParse(256), + + /// Do not stop processing when fatal errors are encountered. + /// + /// When fatal errors are encountered while parsing a translation unit, + /// semantic analysis is typically stopped early when compiling code. A common + /// source for fatal errors are unresolvable include files. For the + /// purposes of an IDE, this is undesirable behavior and as much information + /// as possible should be reported. Use this flag to enable this behavior. + CXTranslationUnit_KeepGoing(512), + + /// Sets the preprocessor in a mode for parsing a single file only. + CXTranslationUnit_SingleFileParse(1024), + + /// Used in combination with CXTranslationUnit_SkipFunctionBodies to + /// constrain the skipping of function bodies to the preamble. + /// + /// The function bodies of the main file are not skipped. + CXTranslationUnit_LimitSkipFunctionBodiesToPreamble(2048), + + /// Used to indicate that attributed types should be included in CXType. + CXTranslationUnit_IncludeAttributedTypes(4096), + + /// Used to indicate that implicit attributes should be visited. + CXTranslationUnit_VisitImplicitAttributes(8192), + + /// Used to indicate that non-errors from included files should be ignored. + /// + /// If set, clang_getDiagnosticSetFromTU() will not report e.g. warnings from + /// included files anymore. This speeds up clang_getDiagnosticSetFromTU() for + /// the case where these warnings are not of interest, as for an IDE for + /// example, which typically shows only the diagnostics in the main file. + CXTranslationUnit_IgnoreNonErrorsFromIncludedFiles(16384), + + /// Tells the preprocessor not to skip excluded conditional blocks. + CXTranslationUnit_RetainExcludedConditionalBlocks(32768); + + final int value; + const CXTranslationUnit_Flags(this.value); + + static CXTranslationUnit_Flags fromValue(int value) => switch (value) { + 0 => CXTranslationUnit_None, + 1 => CXTranslationUnit_DetailedPreprocessingRecord, + 2 => CXTranslationUnit_Incomplete, + 4 => CXTranslationUnit_PrecompiledPreamble, + 8 => CXTranslationUnit_CacheCompletionResults, + 16 => CXTranslationUnit_ForSerialization, + 32 => CXTranslationUnit_CXXChainedPCH, + 64 => CXTranslationUnit_SkipFunctionBodies, + 128 => CXTranslationUnit_IncludeBriefCommentsInCodeCompletion, + 256 => CXTranslationUnit_CreatePreambleOnFirstParse, + 512 => CXTranslationUnit_KeepGoing, + 1024 => CXTranslationUnit_SingleFileParse, + 2048 => CXTranslationUnit_LimitSkipFunctionBodiesToPreamble, + 4096 => CXTranslationUnit_IncludeAttributedTypes, + 8192 => CXTranslationUnit_VisitImplicitAttributes, + 16384 => CXTranslationUnit_IgnoreNonErrorsFromIncludedFiles, + 32768 => CXTranslationUnit_RetainExcludedConditionalBlocks, + _ => throw ArgumentError( + 'Unknown value for CXTranslationUnit_Flags: $value', + ), + }; +} + /// The type of an element in the abstract syntax tree. final class CXType extends ffi.Struct { @ffi.UnsignedInt() @@ -9762,6 +11693,45 @@ enum CXTypeKind { } } +/// List the possible error codes for \c clang_Type_getSizeOf, +/// \c clang_Type_getAlignOf, \c clang_Type_getOffsetOf and +/// \c clang_Cursor_getOffsetOf. +/// +/// A value of this enumeration type can be returned if the target type is not +/// a valid argument to sizeof, alignof or offsetof. +enum CXTypeLayoutError { + /// Type is of kind CXType_Invalid. + CXTypeLayoutError_Invalid(-1), + + /// The type is an incomplete Type. + CXTypeLayoutError_Incomplete(-2), + + /// The type is a dependent Type. + CXTypeLayoutError_Dependent(-3), + + /// The type is not a constant size type. + CXTypeLayoutError_NotConstantSize(-4), + + /// The Field name is not valid for this record. + CXTypeLayoutError_InvalidFieldName(-5), + + /// The type is undeduced. + CXTypeLayoutError_Undeduced(-6); + + final int value; + const CXTypeLayoutError(this.value); + + static CXTypeLayoutError fromValue(int value) => switch (value) { + -1 => CXTypeLayoutError_Invalid, + -2 => CXTypeLayoutError_Incomplete, + -3 => CXTypeLayoutError_Dependent, + -4 => CXTypeLayoutError_NotConstantSize, + -5 => CXTypeLayoutError_InvalidFieldName, + -6 => CXTypeLayoutError_Undeduced, + _ => throw ArgumentError('Unknown value for CXTypeLayoutError: $value'), + }; +} + enum CXTypeNullabilityKind { /// Values of this type can never be null. CXTypeNullability_NonNull(0), @@ -10097,1523 +12067,3 @@ final class IndexerCallbacks extends ffi.Struct { ..ref.indexDeclaration = indexDeclaration ..ref.indexEntityReference = indexEntityReference; } - -typedef NativeClang_CXCursorSet_contains = - ffi.UnsignedInt Function(CXCursorSet cset, CXCursor cursor); -typedef DartClang_CXCursorSet_contains = - int Function(CXCursorSet cset, CXCursor cursor); -typedef NativeClang_CXCursorSet_insert = - ffi.UnsignedInt Function(CXCursorSet cset, CXCursor cursor); -typedef DartClang_CXCursorSet_insert = - int Function(CXCursorSet cset, CXCursor cursor); -typedef NativeClang_CXIndex_getGlobalOptions = - ffi.UnsignedInt Function(CXIndex); -typedef DartClang_CXIndex_getGlobalOptions = int Function(CXIndex); -typedef NativeClang_CXIndex_setGlobalOptions = - ffi.Void Function(CXIndex, ffi.UnsignedInt options); -typedef DartClang_CXIndex_setGlobalOptions = - void Function(CXIndex, int options); -typedef NativeClang_CXIndex_setInvocationEmissionPathOption = - ffi.Void Function(CXIndex, ffi.Pointer Path); -typedef DartClang_CXIndex_setInvocationEmissionPathOption = - void Function(CXIndex, ffi.Pointer Path); -typedef NativeClang_CXXConstructor_isConvertingConstructor = - ffi.UnsignedInt Function(CXCursor C); -typedef DartClang_CXXConstructor_isConvertingConstructor = - int Function(CXCursor C); -typedef NativeClang_CXXConstructor_isCopyConstructor = - ffi.UnsignedInt Function(CXCursor C); -typedef DartClang_CXXConstructor_isCopyConstructor = int Function(CXCursor C); -typedef NativeClang_CXXConstructor_isDefaultConstructor = - ffi.UnsignedInt Function(CXCursor C); -typedef DartClang_CXXConstructor_isDefaultConstructor = - int Function(CXCursor C); -typedef NativeClang_CXXConstructor_isMoveConstructor = - ffi.UnsignedInt Function(CXCursor C); -typedef DartClang_CXXConstructor_isMoveConstructor = int Function(CXCursor C); -typedef NativeClang_CXXField_isMutable = ffi.UnsignedInt Function(CXCursor C); -typedef DartClang_CXXField_isMutable = int Function(CXCursor C); -typedef NativeClang_CXXMethod_isConst = ffi.UnsignedInt Function(CXCursor C); -typedef DartClang_CXXMethod_isConst = int Function(CXCursor C); -typedef NativeClang_CXXMethod_isDefaulted = - ffi.UnsignedInt Function(CXCursor C); -typedef DartClang_CXXMethod_isDefaulted = int Function(CXCursor C); -typedef NativeClang_CXXMethod_isPureVirtual = - ffi.UnsignedInt Function(CXCursor C); -typedef DartClang_CXXMethod_isPureVirtual = int Function(CXCursor C); -typedef NativeClang_CXXMethod_isStatic = ffi.UnsignedInt Function(CXCursor C); -typedef DartClang_CXXMethod_isStatic = int Function(CXCursor C); -typedef NativeClang_CXXMethod_isVirtual = ffi.UnsignedInt Function(CXCursor C); -typedef DartClang_CXXMethod_isVirtual = int Function(CXCursor C); -typedef NativeClang_CXXRecord_isAbstract = ffi.UnsignedInt Function(CXCursor C); -typedef DartClang_CXXRecord_isAbstract = int Function(CXCursor C); -typedef NativeClang_Cursor_Evaluate = CXEvalResult Function(CXCursor C); -typedef DartClang_Cursor_Evaluate = CXEvalResult Function(CXCursor C); -typedef NativeClang_Cursor_getArgument = - CXCursor Function(CXCursor C, ffi.UnsignedInt i); -typedef DartClang_Cursor_getArgument = CXCursor Function(CXCursor C, int i); -typedef NativeClang_Cursor_getBriefCommentText = CXString Function(CXCursor C); -typedef DartClang_Cursor_getBriefCommentText = CXString Function(CXCursor C); -typedef NativeClang_Cursor_getCXXManglings = - ffi.Pointer Function(CXCursor); -typedef DartClang_Cursor_getCXXManglings = - ffi.Pointer Function(CXCursor); -typedef NativeClang_Cursor_getCommentRange = CXSourceRange Function(CXCursor C); -typedef DartClang_Cursor_getCommentRange = CXSourceRange Function(CXCursor C); -typedef NativeClang_Cursor_getMangling = CXString Function(CXCursor); -typedef DartClang_Cursor_getMangling = CXString Function(CXCursor); -typedef NativeClang_Cursor_getModule = CXModule Function(CXCursor C); -typedef DartClang_Cursor_getModule = CXModule Function(CXCursor C); -typedef NativeClang_Cursor_getNumArguments = ffi.Int Function(CXCursor C); -typedef DartClang_Cursor_getNumArguments = int Function(CXCursor C); -typedef NativeClang_Cursor_getNumTemplateArguments = - ffi.Int Function(CXCursor C); -typedef DartClang_Cursor_getNumTemplateArguments = int Function(CXCursor C); -typedef NativeClang_Cursor_getObjCDeclQualifiers = - ffi.UnsignedInt Function(CXCursor C); -typedef DartClang_Cursor_getObjCDeclQualifiers = int Function(CXCursor C); -typedef NativeClang_Cursor_getObjCManglings = - ffi.Pointer Function(CXCursor); -typedef DartClang_Cursor_getObjCManglings = - ffi.Pointer Function(CXCursor); -typedef NativeClang_Cursor_getObjCPropertyAttributes = - ffi.UnsignedInt Function(CXCursor C, ffi.UnsignedInt reserved); -typedef DartClang_Cursor_getObjCPropertyAttributes = - int Function(CXCursor C, int reserved); -typedef NativeClang_Cursor_getObjCPropertyGetterName = - CXString Function(CXCursor C); -typedef DartClang_Cursor_getObjCPropertyGetterName = - CXString Function(CXCursor C); -typedef NativeClang_Cursor_getObjCPropertySetterName = - CXString Function(CXCursor C); -typedef DartClang_Cursor_getObjCPropertySetterName = - CXString Function(CXCursor C); -typedef NativeClang_Cursor_getObjCSelectorIndex = ffi.Int Function(CXCursor); -typedef DartClang_Cursor_getObjCSelectorIndex = int Function(CXCursor); -typedef NativeClang_Cursor_getOffsetOfField = ffi.LongLong Function(CXCursor C); -typedef DartClang_Cursor_getOffsetOfField = int Function(CXCursor C); -typedef NativeClang_Cursor_getRawCommentText = CXString Function(CXCursor C); -typedef DartClang_Cursor_getRawCommentText = CXString Function(CXCursor C); -typedef NativeClang_Cursor_getReceiverType = CXType Function(CXCursor C); -typedef DartClang_Cursor_getReceiverType = CXType Function(CXCursor C); -typedef NativeClang_Cursor_getSpellingNameRange = - CXSourceRange Function( - CXCursor, - ffi.UnsignedInt pieceIndex, - ffi.UnsignedInt options, - ); -typedef DartClang_Cursor_getSpellingNameRange = - CXSourceRange Function(CXCursor, int pieceIndex, int options); -typedef NativeClang_Cursor_getStorageClass = ffi.UnsignedInt Function(CXCursor); -typedef DartClang_Cursor_getStorageClass = int Function(CXCursor); -typedef NativeClang_Cursor_getTemplateArgumentKind = - ffi.UnsignedInt Function(CXCursor C, ffi.UnsignedInt I); -typedef DartClang_Cursor_getTemplateArgumentKind = - int Function(CXCursor C, int I); -typedef NativeClang_Cursor_getTemplateArgumentType = - CXType Function(CXCursor C, ffi.UnsignedInt I); -typedef DartClang_Cursor_getTemplateArgumentType = - CXType Function(CXCursor C, int I); -typedef NativeClang_Cursor_getTemplateArgumentUnsignedValue = - ffi.UnsignedLongLong Function(CXCursor C, ffi.UnsignedInt I); -typedef DartClang_Cursor_getTemplateArgumentUnsignedValue = - int Function(CXCursor C, int I); -typedef NativeClang_Cursor_getTemplateArgumentValue = - ffi.LongLong Function(CXCursor C, ffi.UnsignedInt I); -typedef DartClang_Cursor_getTemplateArgumentValue = - int Function(CXCursor C, int I); -typedef NativeClang_Cursor_getTranslationUnit = - CXTranslationUnit Function(CXCursor); -typedef DartClang_Cursor_getTranslationUnit = - CXTranslationUnit Function(CXCursor); -typedef NativeClang_Cursor_hasAttrs = ffi.UnsignedInt Function(CXCursor C); -typedef DartClang_Cursor_hasAttrs = int Function(CXCursor C); -typedef NativeClang_Cursor_isAnonymous = ffi.UnsignedInt Function(CXCursor C); -typedef DartClang_Cursor_isAnonymous = int Function(CXCursor C); -typedef NativeClang_Cursor_isAnonymousRecordDecl = - ffi.UnsignedInt Function(CXCursor C); -typedef DartClang_Cursor_isAnonymousRecordDecl = int Function(CXCursor C); -typedef NativeClang_Cursor_isBitField = ffi.UnsignedInt Function(CXCursor C); -typedef DartClang_Cursor_isBitField = int Function(CXCursor C); -typedef NativeClang_Cursor_isDynamicCall = ffi.Int Function(CXCursor C); -typedef DartClang_Cursor_isDynamicCall = int Function(CXCursor C); -typedef NativeClang_Cursor_isExternalSymbol = - ffi.UnsignedInt Function( - CXCursor C, - ffi.Pointer language, - ffi.Pointer definedIn, - ffi.Pointer isGenerated, - ); -typedef DartClang_Cursor_isExternalSymbol = - int Function( - CXCursor C, - ffi.Pointer language, - ffi.Pointer definedIn, - ffi.Pointer isGenerated, - ); -typedef NativeClang_Cursor_isFunctionInlined = - ffi.UnsignedInt Function(CXCursor C); -typedef DartClang_Cursor_isFunctionInlined = int Function(CXCursor C); -typedef NativeClang_Cursor_isInlineNamespace = - ffi.UnsignedInt Function(CXCursor C); -typedef DartClang_Cursor_isInlineNamespace = int Function(CXCursor C); -typedef NativeClang_Cursor_isMacroBuiltin = - ffi.UnsignedInt Function(CXCursor C); -typedef DartClang_Cursor_isMacroBuiltin = int Function(CXCursor C); -typedef NativeClang_Cursor_isMacroFunctionLike = - ffi.UnsignedInt Function(CXCursor C); -typedef DartClang_Cursor_isMacroFunctionLike = int Function(CXCursor C); -typedef NativeClang_Cursor_isNull = ffi.Int Function(CXCursor cursor); -typedef DartClang_Cursor_isNull = int Function(CXCursor cursor); -typedef NativeClang_Cursor_isObjCOptional = - ffi.UnsignedInt Function(CXCursor C); -typedef DartClang_Cursor_isObjCOptional = int Function(CXCursor C); -typedef NativeClang_Cursor_isVariadic = ffi.UnsignedInt Function(CXCursor C); -typedef DartClang_Cursor_isVariadic = int Function(CXCursor C); -typedef NativeClang_EnumDecl_isScoped = ffi.UnsignedInt Function(CXCursor C); -typedef DartClang_EnumDecl_isScoped = int Function(CXCursor C); -typedef NativeClang_EvalResult_dispose = ffi.Void Function(CXEvalResult E); -typedef DartClang_EvalResult_dispose = void Function(CXEvalResult E); -typedef NativeClang_EvalResult_getAsDouble = - ffi.Double Function(CXEvalResult E); -typedef DartClang_EvalResult_getAsDouble = double Function(CXEvalResult E); -typedef NativeClang_EvalResult_getAsInt = ffi.Int Function(CXEvalResult E); -typedef DartClang_EvalResult_getAsInt = int Function(CXEvalResult E); -typedef NativeClang_EvalResult_getAsLongLong = - ffi.LongLong Function(CXEvalResult E); -typedef DartClang_EvalResult_getAsLongLong = int Function(CXEvalResult E); -typedef NativeClang_EvalResult_getAsStr = - ffi.Pointer Function(CXEvalResult E); -typedef DartClang_EvalResult_getAsStr = - ffi.Pointer Function(CXEvalResult E); -typedef NativeClang_EvalResult_getAsUnsigned = - ffi.UnsignedLongLong Function(CXEvalResult E); -typedef DartClang_EvalResult_getAsUnsigned = int Function(CXEvalResult E); -typedef NativeClang_EvalResult_getKind = - ffi.UnsignedInt Function(CXEvalResult E); -typedef DartClang_EvalResult_getKind = int Function(CXEvalResult E); -typedef NativeClang_EvalResult_isUnsignedInt = - ffi.UnsignedInt Function(CXEvalResult E); -typedef DartClang_EvalResult_isUnsignedInt = int Function(CXEvalResult E); -typedef NativeClang_File_isEqual = ffi.Int Function(CXFile file1, CXFile file2); -typedef DartClang_File_isEqual = int Function(CXFile file1, CXFile file2); -typedef NativeClang_File_tryGetRealPathName = CXString Function(CXFile file); -typedef DartClang_File_tryGetRealPathName = CXString Function(CXFile file); -typedef NativeClang_IndexAction_create = CXIndexAction Function(CXIndex CIdx); -typedef DartClang_IndexAction_create = CXIndexAction Function(CXIndex CIdx); -typedef NativeClang_IndexAction_dispose = ffi.Void Function(CXIndexAction); -typedef DartClang_IndexAction_dispose = void Function(CXIndexAction); -typedef NativeClang_Location_isFromMainFile = - ffi.Int Function(CXSourceLocation location); -typedef DartClang_Location_isFromMainFile = - int Function(CXSourceLocation location); -typedef NativeClang_Location_isInSystemHeader = - ffi.Int Function(CXSourceLocation location); -typedef DartClang_Location_isInSystemHeader = - int Function(CXSourceLocation location); -typedef NativeClang_Module_getASTFile = CXFile Function(CXModule Module); -typedef DartClang_Module_getASTFile = CXFile Function(CXModule Module); -typedef NativeClang_Module_getFullName = CXString Function(CXModule Module); -typedef DartClang_Module_getFullName = CXString Function(CXModule Module); -typedef NativeClang_Module_getName = CXString Function(CXModule Module); -typedef DartClang_Module_getName = CXString Function(CXModule Module); -typedef NativeClang_Module_getNumTopLevelHeaders = - ffi.UnsignedInt Function(CXTranslationUnit, CXModule Module); -typedef DartClang_Module_getNumTopLevelHeaders = - int Function(CXTranslationUnit, CXModule Module); -typedef NativeClang_Module_getParent = CXModule Function(CXModule Module); -typedef DartClang_Module_getParent = CXModule Function(CXModule Module); -typedef NativeClang_Module_getTopLevelHeader = - CXFile Function(CXTranslationUnit, CXModule Module, ffi.UnsignedInt Index); -typedef DartClang_Module_getTopLevelHeader = - CXFile Function(CXTranslationUnit, CXModule Module, int Index); -typedef NativeClang_Module_isSystem = ffi.Int Function(CXModule Module); -typedef DartClang_Module_isSystem = int Function(CXModule Module); -typedef NativeClang_PrintingPolicy_dispose = - ffi.Void Function(CXPrintingPolicy Policy); -typedef DartClang_PrintingPolicy_dispose = - void Function(CXPrintingPolicy Policy); -typedef NativeClang_PrintingPolicy_getProperty = - ffi.UnsignedInt Function(CXPrintingPolicy Policy, ffi.UnsignedInt Property); -typedef DartClang_PrintingPolicy_getProperty = - int Function(CXPrintingPolicy Policy, int Property); -typedef NativeClang_PrintingPolicy_setProperty = - ffi.Void Function( - CXPrintingPolicy Policy, - ffi.UnsignedInt Property, - ffi.UnsignedInt Value, - ); -typedef DartClang_PrintingPolicy_setProperty = - void Function(CXPrintingPolicy Policy, int Property, int Value); -typedef NativeClang_Range_isNull = ffi.Int Function(CXSourceRange range); -typedef DartClang_Range_isNull = int Function(CXSourceRange range); -typedef NativeClang_TargetInfo_dispose = ffi.Void Function(CXTargetInfo Info); -typedef DartClang_TargetInfo_dispose = void Function(CXTargetInfo Info); -typedef NativeClang_TargetInfo_getPointerWidth = - ffi.Int Function(CXTargetInfo Info); -typedef DartClang_TargetInfo_getPointerWidth = int Function(CXTargetInfo Info); -typedef NativeClang_TargetInfo_getTriple = CXString Function(CXTargetInfo Info); -typedef DartClang_TargetInfo_getTriple = CXString Function(CXTargetInfo Info); -typedef NativeClang_Type_getAlignOf = ffi.LongLong Function(CXType T); -typedef DartClang_Type_getAlignOf = int Function(CXType T); -typedef NativeClang_Type_getCXXRefQualifier = - ffi.UnsignedInt Function(CXType T); -typedef DartClang_Type_getCXXRefQualifier = int Function(CXType T); -typedef NativeClang_Type_getClassType = CXType Function(CXType T); -typedef DartClang_Type_getClassType = CXType Function(CXType T); -typedef NativeClang_Type_getModifiedType = CXType Function(CXType T); -typedef DartClang_Type_getModifiedType = CXType Function(CXType T); -typedef NativeClang_Type_getNamedType = CXType Function(CXType T); -typedef DartClang_Type_getNamedType = CXType Function(CXType T); -typedef NativeClang_Type_getNullability = ffi.UnsignedInt Function(CXType T); -typedef DartClang_Type_getNullability = int Function(CXType T); -typedef NativeClang_Type_getNumObjCProtocolRefs = - ffi.UnsignedInt Function(CXType T); -typedef DartClang_Type_getNumObjCProtocolRefs = int Function(CXType T); -typedef NativeClang_Type_getNumObjCTypeArgs = - ffi.UnsignedInt Function(CXType T); -typedef DartClang_Type_getNumObjCTypeArgs = int Function(CXType T); -typedef NativeClang_Type_getNumTemplateArguments = ffi.Int Function(CXType T); -typedef DartClang_Type_getNumTemplateArguments = int Function(CXType T); -typedef NativeClang_Type_getObjCEncoding = CXString Function(CXType type); -typedef DartClang_Type_getObjCEncoding = CXString Function(CXType type); -typedef NativeClang_Type_getObjCObjectBaseType = CXType Function(CXType T); -typedef DartClang_Type_getObjCObjectBaseType = CXType Function(CXType T); -typedef NativeClang_Type_getObjCProtocolDecl = - CXCursor Function(CXType T, ffi.UnsignedInt i); -typedef DartClang_Type_getObjCProtocolDecl = CXCursor Function(CXType T, int i); -typedef NativeClang_Type_getObjCTypeArg = - CXType Function(CXType T, ffi.UnsignedInt i); -typedef DartClang_Type_getObjCTypeArg = CXType Function(CXType T, int i); -typedef NativeClang_Type_getOffsetOf = - ffi.LongLong Function(CXType T, ffi.Pointer S); -typedef DartClang_Type_getOffsetOf = - int Function(CXType T, ffi.Pointer S); -typedef NativeClang_Type_getSizeOf = ffi.LongLong Function(CXType T); -typedef DartClang_Type_getSizeOf = int Function(CXType T); -typedef NativeClang_Type_getTemplateArgumentAsType = - CXType Function(CXType T, ffi.UnsignedInt i); -typedef DartClang_Type_getTemplateArgumentAsType = - CXType Function(CXType T, int i); -typedef NativeClang_Type_isTransparentTagTypedef = - ffi.UnsignedInt Function(CXType T); -typedef DartClang_Type_isTransparentTagTypedef = int Function(CXType T); -typedef NativeClang_Type_visitFields = - ffi.UnsignedInt Function( - CXType T, - CXFieldVisitor visitor, - CXClientData client_data, - ); -typedef DartClang_Type_visitFields = - int Function(CXType T, CXFieldVisitor visitor, CXClientData client_data); -typedef NativeClang_annotateTokens = - ffi.Void Function( - CXTranslationUnit TU, - ffi.Pointer Tokens, - ffi.UnsignedInt NumTokens, - ffi.Pointer Cursors, - ); -typedef DartClang_annotateTokens = - void Function( - CXTranslationUnit TU, - ffi.Pointer Tokens, - int NumTokens, - ffi.Pointer Cursors, - ); -typedef NativeClang_codeCompleteAt = - ffi.Pointer Function( - CXTranslationUnit TU, - ffi.Pointer complete_filename, - ffi.UnsignedInt complete_line, - ffi.UnsignedInt complete_column, - ffi.Pointer unsaved_files, - ffi.UnsignedInt num_unsaved_files, - ffi.UnsignedInt options, - ); -typedef DartClang_codeCompleteAt = - ffi.Pointer Function( - CXTranslationUnit TU, - ffi.Pointer complete_filename, - int complete_line, - int complete_column, - ffi.Pointer unsaved_files, - int num_unsaved_files, - int options, - ); -typedef NativeClang_codeCompleteGetContainerKind = - ffi.UnsignedInt Function( - ffi.Pointer Results, - ffi.Pointer IsIncomplete, - ); -typedef DartClang_codeCompleteGetContainerKind = - int Function( - ffi.Pointer Results, - ffi.Pointer IsIncomplete, - ); -typedef NativeClang_codeCompleteGetContainerUSR = - CXString Function(ffi.Pointer Results); -typedef DartClang_codeCompleteGetContainerUSR = - CXString Function(ffi.Pointer Results); -typedef NativeClang_codeCompleteGetContexts = - ffi.UnsignedLongLong Function(ffi.Pointer Results); -typedef DartClang_codeCompleteGetContexts = - int Function(ffi.Pointer Results); -typedef NativeClang_codeCompleteGetDiagnostic = - CXDiagnostic Function( - ffi.Pointer Results, - ffi.UnsignedInt Index, - ); -typedef DartClang_codeCompleteGetDiagnostic = - CXDiagnostic Function( - ffi.Pointer Results, - int Index, - ); -typedef NativeClang_codeCompleteGetNumDiagnostics = - ffi.UnsignedInt Function(ffi.Pointer Results); -typedef DartClang_codeCompleteGetNumDiagnostics = - int Function(ffi.Pointer Results); -typedef NativeClang_codeCompleteGetObjCSelector = - CXString Function(ffi.Pointer Results); -typedef DartClang_codeCompleteGetObjCSelector = - CXString Function(ffi.Pointer Results); -typedef NativeClang_constructUSR_ObjCCategory = - CXString Function( - ffi.Pointer class_name, - ffi.Pointer category_name, - ); -typedef DartClang_constructUSR_ObjCCategory = - CXString Function( - ffi.Pointer class_name, - ffi.Pointer category_name, - ); -typedef NativeClang_constructUSR_ObjCClass = - CXString Function(ffi.Pointer class_name); -typedef DartClang_constructUSR_ObjCClass = - CXString Function(ffi.Pointer class_name); -typedef NativeClang_constructUSR_ObjCIvar = - CXString Function(ffi.Pointer name, CXString classUSR); -typedef DartClang_constructUSR_ObjCIvar = - CXString Function(ffi.Pointer name, CXString classUSR); -typedef NativeClang_constructUSR_ObjCMethod = - CXString Function( - ffi.Pointer name, - ffi.UnsignedInt isInstanceMethod, - CXString classUSR, - ); -typedef DartClang_constructUSR_ObjCMethod = - CXString Function( - ffi.Pointer name, - int isInstanceMethod, - CXString classUSR, - ); -typedef NativeClang_constructUSR_ObjCProperty = - CXString Function(ffi.Pointer property, CXString classUSR); -typedef DartClang_constructUSR_ObjCProperty = - CXString Function(ffi.Pointer property, CXString classUSR); -typedef NativeClang_constructUSR_ObjCProtocol = - CXString Function(ffi.Pointer protocol_name); -typedef DartClang_constructUSR_ObjCProtocol = - CXString Function(ffi.Pointer protocol_name); -typedef NativeClang_createCXCursorSet = CXCursorSet Function(); -typedef DartClang_createCXCursorSet = CXCursorSet Function(); -typedef NativeClang_createIndex = - CXIndex Function( - ffi.Int excludeDeclarationsFromPCH, - ffi.Int displayDiagnostics, - ); -typedef DartClang_createIndex = - CXIndex Function(int excludeDeclarationsFromPCH, int displayDiagnostics); -typedef NativeClang_createTranslationUnit = - CXTranslationUnit Function( - CXIndex CIdx, - ffi.Pointer ast_filename, - ); -typedef DartClang_createTranslationUnit = - CXTranslationUnit Function( - CXIndex CIdx, - ffi.Pointer ast_filename, - ); -typedef NativeClang_createTranslationUnit2 = - ffi.UnsignedInt Function( - CXIndex CIdx, - ffi.Pointer ast_filename, - ffi.Pointer out_TU, - ); -typedef DartClang_createTranslationUnit2 = - int Function( - CXIndex CIdx, - ffi.Pointer ast_filename, - ffi.Pointer out_TU, - ); -typedef NativeClang_createTranslationUnitFromSourceFile = - CXTranslationUnit Function( - CXIndex CIdx, - ffi.Pointer source_filename, - ffi.Int num_clang_command_line_args, - ffi.Pointer> clang_command_line_args, - ffi.UnsignedInt num_unsaved_files, - ffi.Pointer unsaved_files, - ); -typedef DartClang_createTranslationUnitFromSourceFile = - CXTranslationUnit Function( - CXIndex CIdx, - ffi.Pointer source_filename, - int num_clang_command_line_args, - ffi.Pointer> clang_command_line_args, - int num_unsaved_files, - ffi.Pointer unsaved_files, - ); -typedef NativeClang_defaultCodeCompleteOptions = ffi.UnsignedInt Function(); -typedef DartClang_defaultCodeCompleteOptions = int Function(); -typedef NativeClang_defaultDiagnosticDisplayOptions = - ffi.UnsignedInt Function(); -typedef DartClang_defaultDiagnosticDisplayOptions = int Function(); -typedef NativeClang_defaultEditingTranslationUnitOptions = - ffi.UnsignedInt Function(); -typedef DartClang_defaultEditingTranslationUnitOptions = int Function(); -typedef NativeClang_defaultReparseOptions = - ffi.UnsignedInt Function(CXTranslationUnit TU); -typedef DartClang_defaultReparseOptions = int Function(CXTranslationUnit TU); -typedef NativeClang_defaultSaveOptions = - ffi.UnsignedInt Function(CXTranslationUnit TU); -typedef DartClang_defaultSaveOptions = int Function(CXTranslationUnit TU); -typedef NativeClang_disposeCXCursorSet = ffi.Void Function(CXCursorSet cset); -typedef DartClang_disposeCXCursorSet = void Function(CXCursorSet cset); -typedef NativeClang_disposeCXPlatformAvailability = - ffi.Void Function(ffi.Pointer availability); -typedef DartClang_disposeCXPlatformAvailability = - void Function(ffi.Pointer availability); -typedef NativeClang_disposeCXTUResourceUsage = - ffi.Void Function(CXTUResourceUsage usage); -typedef DartClang_disposeCXTUResourceUsage = - void Function(CXTUResourceUsage usage); -typedef NativeClang_disposeCodeCompleteResults = - ffi.Void Function(ffi.Pointer Results); -typedef DartClang_disposeCodeCompleteResults = - void Function(ffi.Pointer Results); -typedef NativeClang_disposeDiagnostic = - ffi.Void Function(CXDiagnostic Diagnostic); -typedef DartClang_disposeDiagnostic = void Function(CXDiagnostic Diagnostic); -typedef NativeClang_disposeDiagnosticSet = - ffi.Void Function(CXDiagnosticSet Diags); -typedef DartClang_disposeDiagnosticSet = void Function(CXDiagnosticSet Diags); -typedef NativeClang_disposeIndex = ffi.Void Function(CXIndex index); -typedef DartClang_disposeIndex = void Function(CXIndex index); -typedef NativeClang_disposeOverriddenCursors = - ffi.Void Function(ffi.Pointer overridden); -typedef DartClang_disposeOverriddenCursors = - void Function(ffi.Pointer overridden); -typedef NativeClang_disposeSourceRangeList = - ffi.Void Function(ffi.Pointer ranges); -typedef DartClang_disposeSourceRangeList = - void Function(ffi.Pointer ranges); -typedef NativeClang_disposeString = ffi.Void Function(CXString string); -typedef DartClang_disposeString = void Function(CXString string); -typedef NativeClang_disposeStringSet = - ffi.Void Function(ffi.Pointer set); -typedef DartClang_disposeStringSet = - void Function(ffi.Pointer set); -typedef NativeClang_disposeTokens = - ffi.Void Function( - CXTranslationUnit TU, - ffi.Pointer Tokens, - ffi.UnsignedInt NumTokens, - ); -typedef DartClang_disposeTokens = - void Function( - CXTranslationUnit TU, - ffi.Pointer Tokens, - int NumTokens, - ); -typedef NativeClang_disposeTranslationUnit = - ffi.Void Function(CXTranslationUnit); -typedef DartClang_disposeTranslationUnit = void Function(CXTranslationUnit); -typedef NativeClang_enableStackTraces = ffi.Void Function(); -typedef DartClang_enableStackTraces = void Function(); -typedef NativeClang_equalCursors = ffi.UnsignedInt Function(CXCursor, CXCursor); -typedef DartClang_equalCursors = int Function(CXCursor, CXCursor); -typedef NativeClang_equalLocations = - ffi.UnsignedInt Function(CXSourceLocation loc1, CXSourceLocation loc2); -typedef DartClang_equalLocations = - int Function(CXSourceLocation loc1, CXSourceLocation loc2); -typedef NativeClang_equalRanges = - ffi.UnsignedInt Function(CXSourceRange range1, CXSourceRange range2); -typedef DartClang_equalRanges = - int Function(CXSourceRange range1, CXSourceRange range2); -typedef NativeClang_equalTypes = ffi.UnsignedInt Function(CXType A, CXType B); -typedef DartClang_equalTypes = int Function(CXType A, CXType B); -typedef NativeClang_executeOnThread = - ffi.Void Function( - ffi.Pointer)>> - fn, - ffi.Pointer user_data, - ffi.UnsignedInt stack_size, - ); -typedef DartClang_executeOnThread = - void Function( - ffi.Pointer)>> - fn, - ffi.Pointer user_data, - int stack_size, - ); -typedef NativeClang_findIncludesInFile = - ffi.UnsignedInt Function( - CXTranslationUnit TU, - CXFile file, - CXCursorAndRangeVisitor visitor, - ); -typedef DartClang_findIncludesInFile = - int Function( - CXTranslationUnit TU, - CXFile file, - CXCursorAndRangeVisitor visitor, - ); -typedef NativeClang_findReferencesInFile = - ffi.UnsignedInt Function( - CXCursor cursor, - CXFile file, - CXCursorAndRangeVisitor visitor, - ); -typedef DartClang_findReferencesInFile = - int Function(CXCursor cursor, CXFile file, CXCursorAndRangeVisitor visitor); -typedef NativeClang_formatDiagnostic = - CXString Function(CXDiagnostic Diagnostic, ffi.UnsignedInt Options); -typedef DartClang_formatDiagnostic = - CXString Function(CXDiagnostic Diagnostic, int Options); -typedef NativeClang_getAddressSpace = ffi.UnsignedInt Function(CXType T); -typedef DartClang_getAddressSpace = int Function(CXType T); -typedef NativeClang_getAllSkippedRanges = - ffi.Pointer Function(CXTranslationUnit tu); -typedef DartClang_getAllSkippedRanges = - ffi.Pointer Function(CXTranslationUnit tu); -typedef NativeClang_getArgType = CXType Function(CXType T, ffi.UnsignedInt i); -typedef DartClang_getArgType = CXType Function(CXType T, int i); -typedef NativeClang_getArrayElementType = CXType Function(CXType T); -typedef DartClang_getArrayElementType = CXType Function(CXType T); -typedef NativeClang_getArraySize = ffi.LongLong Function(CXType T); -typedef DartClang_getArraySize = int Function(CXType T); -typedef NativeClang_getCString = - ffi.Pointer Function(CXString string); -typedef DartClang_getCString = ffi.Pointer Function(CXString string); -typedef NativeClang_getCXTUResourceUsage = - CXTUResourceUsage Function(CXTranslationUnit TU); -typedef DartClang_getCXTUResourceUsage = - CXTUResourceUsage Function(CXTranslationUnit TU); -typedef NativeClang_getCXXAccessSpecifier = ffi.UnsignedInt Function(CXCursor); -typedef DartClang_getCXXAccessSpecifier = int Function(CXCursor); -typedef NativeClang_getCanonicalCursor = CXCursor Function(CXCursor); -typedef DartClang_getCanonicalCursor = CXCursor Function(CXCursor); -typedef NativeClang_getCanonicalType = CXType Function(CXType T); -typedef DartClang_getCanonicalType = CXType Function(CXType T); -typedef NativeClang_getChildDiagnostics = - CXDiagnosticSet Function(CXDiagnostic D); -typedef DartClang_getChildDiagnostics = - CXDiagnosticSet Function(CXDiagnostic D); -typedef NativeClang_getClangVersion = CXString Function(); -typedef DartClang_getClangVersion = CXString Function(); -typedef NativeClang_getCompletionAnnotation = - CXString Function( - CXCompletionString completion_string, - ffi.UnsignedInt annotation_number, - ); -typedef DartClang_getCompletionAnnotation = - CXString Function( - CXCompletionString completion_string, - int annotation_number, - ); -typedef NativeClang_getCompletionAvailability = - ffi.UnsignedInt Function(CXCompletionString completion_string); -typedef DartClang_getCompletionAvailability = - int Function(CXCompletionString completion_string); -typedef NativeClang_getCompletionBriefComment = - CXString Function(CXCompletionString completion_string); -typedef DartClang_getCompletionBriefComment = - CXString Function(CXCompletionString completion_string); -typedef NativeClang_getCompletionChunkCompletionString = - CXCompletionString Function( - CXCompletionString completion_string, - ffi.UnsignedInt chunk_number, - ); -typedef DartClang_getCompletionChunkCompletionString = - CXCompletionString Function( - CXCompletionString completion_string, - int chunk_number, - ); -typedef NativeClang_getCompletionChunkKind = - ffi.UnsignedInt Function( - CXCompletionString completion_string, - ffi.UnsignedInt chunk_number, - ); -typedef DartClang_getCompletionChunkKind = - int Function(CXCompletionString completion_string, int chunk_number); -typedef NativeClang_getCompletionChunkText = - CXString Function( - CXCompletionString completion_string, - ffi.UnsignedInt chunk_number, - ); -typedef DartClang_getCompletionChunkText = - CXString Function(CXCompletionString completion_string, int chunk_number); -typedef NativeClang_getCompletionFixIt = - CXString Function( - ffi.Pointer results, - ffi.UnsignedInt completion_index, - ffi.UnsignedInt fixit_index, - ffi.Pointer replacement_range, - ); -typedef DartClang_getCompletionFixIt = - CXString Function( - ffi.Pointer results, - int completion_index, - int fixit_index, - ffi.Pointer replacement_range, - ); -typedef NativeClang_getCompletionNumAnnotations = - ffi.UnsignedInt Function(CXCompletionString completion_string); -typedef DartClang_getCompletionNumAnnotations = - int Function(CXCompletionString completion_string); -typedef NativeClang_getCompletionNumFixIts = - ffi.UnsignedInt Function( - ffi.Pointer results, - ffi.UnsignedInt completion_index, - ); -typedef DartClang_getCompletionNumFixIts = - int Function( - ffi.Pointer results, - int completion_index, - ); -typedef NativeClang_getCompletionParent = - CXString Function( - CXCompletionString completion_string, - ffi.Pointer kind, - ); -typedef DartClang_getCompletionParent = - CXString Function( - CXCompletionString completion_string, - ffi.Pointer kind, - ); -typedef NativeClang_getCompletionPriority = - ffi.UnsignedInt Function(CXCompletionString completion_string); -typedef DartClang_getCompletionPriority = - int Function(CXCompletionString completion_string); -typedef NativeClang_getCursor = - CXCursor Function(CXTranslationUnit, CXSourceLocation); -typedef DartClang_getCursor = - CXCursor Function(CXTranslationUnit, CXSourceLocation); -typedef NativeClang_getCursorAvailability = - ffi.UnsignedInt Function(CXCursor cursor); -typedef DartClang_getCursorAvailability = int Function(CXCursor cursor); -typedef NativeClang_getCursorCompletionString = - CXCompletionString Function(CXCursor cursor); -typedef DartClang_getCursorCompletionString = - CXCompletionString Function(CXCursor cursor); -typedef NativeClang_getCursorDefinition = CXCursor Function(CXCursor); -typedef DartClang_getCursorDefinition = CXCursor Function(CXCursor); -typedef NativeClang_getCursorDisplayName = CXString Function(CXCursor); -typedef DartClang_getCursorDisplayName = CXString Function(CXCursor); -typedef NativeClang_getCursorExceptionSpecificationType = - ffi.Int Function(CXCursor C); -typedef DartClang_getCursorExceptionSpecificationType = - int Function(CXCursor C); -typedef NativeClang_getCursorExtent = CXSourceRange Function(CXCursor); -typedef DartClang_getCursorExtent = CXSourceRange Function(CXCursor); -typedef NativeClang_getCursorKind = ffi.UnsignedInt Function(CXCursor); -typedef DartClang_getCursorKind = int Function(CXCursor); -typedef NativeClang_getCursorKindSpelling = - CXString Function(ffi.UnsignedInt Kind); -typedef DartClang_getCursorKindSpelling = CXString Function(int Kind); -typedef NativeClang_getCursorLanguage = - ffi.UnsignedInt Function(CXCursor cursor); -typedef DartClang_getCursorLanguage = int Function(CXCursor cursor); -typedef NativeClang_getCursorLexicalParent = CXCursor Function(CXCursor cursor); -typedef DartClang_getCursorLexicalParent = CXCursor Function(CXCursor cursor); -typedef NativeClang_getCursorLinkage = - ffi.UnsignedInt Function(CXCursor cursor); -typedef DartClang_getCursorLinkage = int Function(CXCursor cursor); -typedef NativeClang_getCursorLocation = CXSourceLocation Function(CXCursor); -typedef DartClang_getCursorLocation = CXSourceLocation Function(CXCursor); -typedef NativeClang_getCursorPlatformAvailability = - ffi.Int Function( - CXCursor cursor, - ffi.Pointer always_deprecated, - ffi.Pointer deprecated_message, - ffi.Pointer always_unavailable, - ffi.Pointer unavailable_message, - ffi.Pointer availability, - ffi.Int availability_size, - ); -typedef DartClang_getCursorPlatformAvailability = - int Function( - CXCursor cursor, - ffi.Pointer always_deprecated, - ffi.Pointer deprecated_message, - ffi.Pointer always_unavailable, - ffi.Pointer unavailable_message, - ffi.Pointer availability, - int availability_size, - ); -typedef NativeClang_getCursorPrettyPrinted = - CXString Function(CXCursor Cursor, CXPrintingPolicy Policy); -typedef DartClang_getCursorPrettyPrinted = - CXString Function(CXCursor Cursor, CXPrintingPolicy Policy); -typedef NativeClang_getCursorPrintingPolicy = - CXPrintingPolicy Function(CXCursor); -typedef DartClang_getCursorPrintingPolicy = CXPrintingPolicy Function(CXCursor); -typedef NativeClang_getCursorReferenceNameRange = - CXSourceRange Function( - CXCursor C, - ffi.UnsignedInt NameFlags, - ffi.UnsignedInt PieceIndex, - ); -typedef DartClang_getCursorReferenceNameRange = - CXSourceRange Function(CXCursor C, int NameFlags, int PieceIndex); -typedef NativeClang_getCursorReferenced = CXCursor Function(CXCursor); -typedef DartClang_getCursorReferenced = CXCursor Function(CXCursor); -typedef NativeClang_getCursorResultType = CXType Function(CXCursor C); -typedef DartClang_getCursorResultType = CXType Function(CXCursor C); -typedef NativeClang_getCursorSemanticParent = - CXCursor Function(CXCursor cursor); -typedef DartClang_getCursorSemanticParent = CXCursor Function(CXCursor cursor); -typedef NativeClang_getCursorSpelling = CXString Function(CXCursor); -typedef DartClang_getCursorSpelling = CXString Function(CXCursor); -typedef NativeClang_getCursorTLSKind = - ffi.UnsignedInt Function(CXCursor cursor); -typedef DartClang_getCursorTLSKind = int Function(CXCursor cursor); -typedef NativeClang_getCursorType = CXType Function(CXCursor C); -typedef DartClang_getCursorType = CXType Function(CXCursor C); -typedef NativeClang_getCursorUSR = CXString Function(CXCursor); -typedef DartClang_getCursorUSR = CXString Function(CXCursor); -typedef NativeClang_getCursorVisibility = - ffi.UnsignedInt Function(CXCursor cursor); -typedef DartClang_getCursorVisibility = int Function(CXCursor cursor); -typedef NativeClang_getDeclObjCTypeEncoding = CXString Function(CXCursor C); -typedef DartClang_getDeclObjCTypeEncoding = CXString Function(CXCursor C); -typedef NativeClang_getDefinitionSpellingAndExtent = - ffi.Void Function( - CXCursor, - ffi.Pointer> startBuf, - ffi.Pointer> endBuf, - ffi.Pointer startLine, - ffi.Pointer startColumn, - ffi.Pointer endLine, - ffi.Pointer endColumn, - ); -typedef DartClang_getDefinitionSpellingAndExtent = - void Function( - CXCursor, - ffi.Pointer> startBuf, - ffi.Pointer> endBuf, - ffi.Pointer startLine, - ffi.Pointer startColumn, - ffi.Pointer endLine, - ffi.Pointer endColumn, - ); -typedef NativeClang_getDiagnostic = - CXDiagnostic Function(CXTranslationUnit Unit, ffi.UnsignedInt Index); -typedef DartClang_getDiagnostic = - CXDiagnostic Function(CXTranslationUnit Unit, int Index); -typedef NativeClang_getDiagnosticCategory = - ffi.UnsignedInt Function(CXDiagnostic); -typedef DartClang_getDiagnosticCategory = int Function(CXDiagnostic); -typedef NativeClang_getDiagnosticCategoryName = - CXString Function(ffi.UnsignedInt Category); -typedef DartClang_getDiagnosticCategoryName = CXString Function(int Category); -typedef NativeClang_getDiagnosticCategoryText = CXString Function(CXDiagnostic); -typedef DartClang_getDiagnosticCategoryText = CXString Function(CXDiagnostic); -typedef NativeClang_getDiagnosticFixIt = - CXString Function( - CXDiagnostic Diagnostic, - ffi.UnsignedInt FixIt, - ffi.Pointer ReplacementRange, - ); -typedef DartClang_getDiagnosticFixIt = - CXString Function( - CXDiagnostic Diagnostic, - int FixIt, - ffi.Pointer ReplacementRange, - ); -typedef NativeClang_getDiagnosticInSet = - CXDiagnostic Function(CXDiagnosticSet Diags, ffi.UnsignedInt Index); -typedef DartClang_getDiagnosticInSet = - CXDiagnostic Function(CXDiagnosticSet Diags, int Index); -typedef NativeClang_getDiagnosticLocation = - CXSourceLocation Function(CXDiagnostic); -typedef DartClang_getDiagnosticLocation = - CXSourceLocation Function(CXDiagnostic); -typedef NativeClang_getDiagnosticNumFixIts = - ffi.UnsignedInt Function(CXDiagnostic Diagnostic); -typedef DartClang_getDiagnosticNumFixIts = - int Function(CXDiagnostic Diagnostic); -typedef NativeClang_getDiagnosticNumRanges = - ffi.UnsignedInt Function(CXDiagnostic); -typedef DartClang_getDiagnosticNumRanges = int Function(CXDiagnostic); -typedef NativeClang_getDiagnosticOption = - CXString Function(CXDiagnostic Diag, ffi.Pointer Disable); -typedef DartClang_getDiagnosticOption = - CXString Function(CXDiagnostic Diag, ffi.Pointer Disable); -typedef NativeClang_getDiagnosticRange = - CXSourceRange Function(CXDiagnostic Diagnostic, ffi.UnsignedInt Range); -typedef DartClang_getDiagnosticRange = - CXSourceRange Function(CXDiagnostic Diagnostic, int Range); -typedef NativeClang_getDiagnosticSetFromTU = - CXDiagnosticSet Function(CXTranslationUnit Unit); -typedef DartClang_getDiagnosticSetFromTU = - CXDiagnosticSet Function(CXTranslationUnit Unit); -typedef NativeClang_getDiagnosticSeverity = - ffi.UnsignedInt Function(CXDiagnostic); -typedef DartClang_getDiagnosticSeverity = int Function(CXDiagnostic); -typedef NativeClang_getDiagnosticSpelling = CXString Function(CXDiagnostic); -typedef DartClang_getDiagnosticSpelling = CXString Function(CXDiagnostic); -typedef NativeClang_getElementType = CXType Function(CXType T); -typedef DartClang_getElementType = CXType Function(CXType T); -typedef NativeClang_getEnumConstantDeclUnsignedValue = - ffi.UnsignedLongLong Function(CXCursor C); -typedef DartClang_getEnumConstantDeclUnsignedValue = int Function(CXCursor C); -typedef NativeClang_getEnumConstantDeclValue = - ffi.LongLong Function(CXCursor C); -typedef DartClang_getEnumConstantDeclValue = int Function(CXCursor C); -typedef NativeClang_getEnumDeclIntegerType = CXType Function(CXCursor C); -typedef DartClang_getEnumDeclIntegerType = CXType Function(CXCursor C); -typedef NativeClang_getExceptionSpecificationType = ffi.Int Function(CXType T); -typedef DartClang_getExceptionSpecificationType = int Function(CXType T); -typedef NativeClang_getExpansionLocation = - ffi.Void Function( - CXSourceLocation location, - ffi.Pointer file, - ffi.Pointer line, - ffi.Pointer column, - ffi.Pointer offset, - ); -typedef DartClang_getExpansionLocation = - void Function( - CXSourceLocation location, - ffi.Pointer file, - ffi.Pointer line, - ffi.Pointer column, - ffi.Pointer offset, - ); -typedef NativeClang_getFieldDeclBitWidth = ffi.Int Function(CXCursor C); -typedef DartClang_getFieldDeclBitWidth = int Function(CXCursor C); -typedef NativeClang_getFile = - CXFile Function(CXTranslationUnit tu, ffi.Pointer file_name); -typedef DartClang_getFile = - CXFile Function(CXTranslationUnit tu, ffi.Pointer file_name); -typedef NativeClang_getFileContents = - ffi.Pointer Function( - CXTranslationUnit tu, - CXFile file, - ffi.Pointer size, - ); -typedef DartClang_getFileContents = - ffi.Pointer Function( - CXTranslationUnit tu, - CXFile file, - ffi.Pointer size, - ); -typedef NativeClang_getFileLocation = - ffi.Void Function( - CXSourceLocation location, - ffi.Pointer file, - ffi.Pointer line, - ffi.Pointer column, - ffi.Pointer offset, - ); -typedef DartClang_getFileLocation = - void Function( - CXSourceLocation location, - ffi.Pointer file, - ffi.Pointer line, - ffi.Pointer column, - ffi.Pointer offset, - ); -typedef NativeClang_getFileName = CXString Function(CXFile SFile); -typedef DartClang_getFileName = CXString Function(CXFile SFile); -typedef NativeClang_getFileTime = ffi.Int64 Function(CXFile SFile); -typedef DartClang_getFileTime = int Function(CXFile SFile); -typedef NativeClang_getFileUniqueID = - ffi.Int Function(CXFile file, ffi.Pointer outID); -typedef DartClang_getFileUniqueID = - int Function(CXFile file, ffi.Pointer outID); -typedef NativeClang_getFunctionTypeCallingConv = - ffi.UnsignedInt Function(CXType T); -typedef DartClang_getFunctionTypeCallingConv = int Function(CXType T); -typedef NativeClang_getIBOutletCollectionType = CXType Function(CXCursor); -typedef DartClang_getIBOutletCollectionType = CXType Function(CXCursor); -typedef NativeClang_getIncludedFile = CXFile Function(CXCursor cursor); -typedef DartClang_getIncludedFile = CXFile Function(CXCursor cursor); -typedef NativeClang_getInclusions = - ffi.Void Function( - CXTranslationUnit tu, - CXInclusionVisitor visitor, - CXClientData client_data, - ); -typedef DartClang_getInclusions = - void Function( - CXTranslationUnit tu, - CXInclusionVisitor visitor, - CXClientData client_data, - ); -typedef NativeClang_getInstantiationLocation = - ffi.Void Function( - CXSourceLocation location, - ffi.Pointer file, - ffi.Pointer line, - ffi.Pointer column, - ffi.Pointer offset, - ); -typedef DartClang_getInstantiationLocation = - void Function( - CXSourceLocation location, - ffi.Pointer file, - ffi.Pointer line, - ffi.Pointer column, - ffi.Pointer offset, - ); -typedef NativeClang_getLocation = - CXSourceLocation Function( - CXTranslationUnit tu, - CXFile file, - ffi.UnsignedInt line, - ffi.UnsignedInt column, - ); -typedef DartClang_getLocation = - CXSourceLocation Function( - CXTranslationUnit tu, - CXFile file, - int line, - int column, - ); -typedef NativeClang_getLocationForOffset = - CXSourceLocation Function( - CXTranslationUnit tu, - CXFile file, - ffi.UnsignedInt offset, - ); -typedef DartClang_getLocationForOffset = - CXSourceLocation Function(CXTranslationUnit tu, CXFile file, int offset); -typedef NativeClang_getModuleForFile = - CXModule Function(CXTranslationUnit, CXFile); -typedef DartClang_getModuleForFile = - CXModule Function(CXTranslationUnit, CXFile); -typedef NativeClang_getNullCursor = CXCursor Function(); -typedef DartClang_getNullCursor = CXCursor Function(); -typedef NativeClang_getNullLocation = CXSourceLocation Function(); -typedef DartClang_getNullLocation = CXSourceLocation Function(); -typedef NativeClang_getNullRange = CXSourceRange Function(); -typedef DartClang_getNullRange = CXSourceRange Function(); -typedef NativeClang_getNumArgTypes = ffi.Int Function(CXType T); -typedef DartClang_getNumArgTypes = int Function(CXType T); -typedef NativeClang_getNumCompletionChunks = - ffi.UnsignedInt Function(CXCompletionString completion_string); -typedef DartClang_getNumCompletionChunks = - int Function(CXCompletionString completion_string); -typedef NativeClang_getNumDiagnostics = - ffi.UnsignedInt Function(CXTranslationUnit Unit); -typedef DartClang_getNumDiagnostics = int Function(CXTranslationUnit Unit); -typedef NativeClang_getNumDiagnosticsInSet = - ffi.UnsignedInt Function(CXDiagnosticSet Diags); -typedef DartClang_getNumDiagnosticsInSet = int Function(CXDiagnosticSet Diags); -typedef NativeClang_getNumElements = ffi.LongLong Function(CXType T); -typedef DartClang_getNumElements = int Function(CXType T); -typedef NativeClang_getNumOverloadedDecls = - ffi.UnsignedInt Function(CXCursor cursor); -typedef DartClang_getNumOverloadedDecls = int Function(CXCursor cursor); -typedef NativeClang_getOverloadedDecl = - CXCursor Function(CXCursor cursor, ffi.UnsignedInt index); -typedef DartClang_getOverloadedDecl = - CXCursor Function(CXCursor cursor, int index); -typedef NativeClang_getOverriddenCursors = - ffi.Void Function( - CXCursor cursor, - ffi.Pointer> overridden, - ffi.Pointer num_overridden, - ); -typedef DartClang_getOverriddenCursors = - void Function( - CXCursor cursor, - ffi.Pointer> overridden, - ffi.Pointer num_overridden, - ); -typedef NativeClang_getPointeeType = CXType Function(CXType T); -typedef DartClang_getPointeeType = CXType Function(CXType T); -typedef NativeClang_getPresumedLocation = - ffi.Void Function( - CXSourceLocation location, - ffi.Pointer filename, - ffi.Pointer line, - ffi.Pointer column, - ); -typedef DartClang_getPresumedLocation = - void Function( - CXSourceLocation location, - ffi.Pointer filename, - ffi.Pointer line, - ffi.Pointer column, - ); -typedef NativeClang_getRange = - CXSourceRange Function(CXSourceLocation begin, CXSourceLocation end); -typedef DartClang_getRange = - CXSourceRange Function(CXSourceLocation begin, CXSourceLocation end); -typedef NativeClang_getRangeEnd = - CXSourceLocation Function(CXSourceRange range); -typedef DartClang_getRangeEnd = CXSourceLocation Function(CXSourceRange range); -typedef NativeClang_getRangeStart = - CXSourceLocation Function(CXSourceRange range); -typedef DartClang_getRangeStart = - CXSourceLocation Function(CXSourceRange range); -typedef NativeClang_getRemappings = - CXRemapping Function(ffi.Pointer path); -typedef DartClang_getRemappings = - CXRemapping Function(ffi.Pointer path); -typedef NativeClang_getRemappingsFromFileList = - CXRemapping Function( - ffi.Pointer> filePaths, - ffi.UnsignedInt numFiles, - ); -typedef DartClang_getRemappingsFromFileList = - CXRemapping Function( - ffi.Pointer> filePaths, - int numFiles, - ); -typedef NativeClang_getResultType = CXType Function(CXType T); -typedef DartClang_getResultType = CXType Function(CXType T); -typedef NativeClang_getSkippedRanges = - ffi.Pointer Function(CXTranslationUnit tu, CXFile file); -typedef DartClang_getSkippedRanges = - ffi.Pointer Function(CXTranslationUnit tu, CXFile file); -typedef NativeClang_getSpecializedCursorTemplate = - CXCursor Function(CXCursor C); -typedef DartClang_getSpecializedCursorTemplate = CXCursor Function(CXCursor C); -typedef NativeClang_getSpellingLocation = - ffi.Void Function( - CXSourceLocation location, - ffi.Pointer file, - ffi.Pointer line, - ffi.Pointer column, - ffi.Pointer offset, - ); -typedef DartClang_getSpellingLocation = - void Function( - CXSourceLocation location, - ffi.Pointer file, - ffi.Pointer line, - ffi.Pointer column, - ffi.Pointer offset, - ); -typedef NativeClang_getTUResourceUsageName = - ffi.Pointer Function(ffi.UnsignedInt kind); -typedef DartClang_getTUResourceUsageName = - ffi.Pointer Function(int kind); -typedef NativeClang_getTemplateCursorKind = - ffi.UnsignedInt Function(CXCursor C); -typedef DartClang_getTemplateCursorKind = int Function(CXCursor C); -typedef NativeClang_getToken = - ffi.Pointer Function( - CXTranslationUnit TU, - CXSourceLocation Location, - ); -typedef DartClang_getToken = - ffi.Pointer Function( - CXTranslationUnit TU, - CXSourceLocation Location, - ); -typedef NativeClang_getTokenExtent = - CXSourceRange Function(CXTranslationUnit, CXToken); -typedef DartClang_getTokenExtent = - CXSourceRange Function(CXTranslationUnit, CXToken); -typedef NativeClang_getTokenKind = ffi.UnsignedInt Function(CXToken); -typedef DartClang_getTokenKind = int Function(CXToken); -typedef NativeClang_getTokenLocation = - CXSourceLocation Function(CXTranslationUnit, CXToken); -typedef DartClang_getTokenLocation = - CXSourceLocation Function(CXTranslationUnit, CXToken); -typedef NativeClang_getTokenSpelling = - CXString Function(CXTranslationUnit, CXToken); -typedef DartClang_getTokenSpelling = - CXString Function(CXTranslationUnit, CXToken); -typedef NativeClang_getTranslationUnitCursor = - CXCursor Function(CXTranslationUnit); -typedef DartClang_getTranslationUnitCursor = - CXCursor Function(CXTranslationUnit); -typedef NativeClang_getTranslationUnitSpelling = - CXString Function(CXTranslationUnit CTUnit); -typedef DartClang_getTranslationUnitSpelling = - CXString Function(CXTranslationUnit CTUnit); -typedef NativeClang_getTranslationUnitTargetInfo = - CXTargetInfo Function(CXTranslationUnit CTUnit); -typedef DartClang_getTranslationUnitTargetInfo = - CXTargetInfo Function(CXTranslationUnit CTUnit); -typedef NativeClang_getTypeDeclaration = CXCursor Function(CXType T); -typedef DartClang_getTypeDeclaration = CXCursor Function(CXType T); -typedef NativeClang_getTypeKindSpelling = CXString Function(ffi.UnsignedInt K); -typedef DartClang_getTypeKindSpelling = CXString Function(int K); -typedef NativeClang_getTypeSpelling = CXString Function(CXType CT); -typedef DartClang_getTypeSpelling = CXString Function(CXType CT); -typedef NativeClang_getTypedefDeclUnderlyingType = CXType Function(CXCursor C); -typedef DartClang_getTypedefDeclUnderlyingType = CXType Function(CXCursor C); -typedef NativeClang_getTypedefName = CXString Function(CXType CT); -typedef DartClang_getTypedefName = CXString Function(CXType CT); -typedef NativeClang_hashCursor = ffi.UnsignedInt Function(CXCursor); -typedef DartClang_hashCursor = int Function(CXCursor); -typedef NativeClang_indexLoc_getCXSourceLocation = - CXSourceLocation Function(CXIdxLoc loc); -typedef DartClang_indexLoc_getCXSourceLocation = - CXSourceLocation Function(CXIdxLoc loc); -typedef NativeClang_indexLoc_getFileLocation = - ffi.Void Function( - CXIdxLoc loc, - ffi.Pointer indexFile, - ffi.Pointer file, - ffi.Pointer line, - ffi.Pointer column, - ffi.Pointer offset, - ); -typedef DartClang_indexLoc_getFileLocation = - void Function( - CXIdxLoc loc, - ffi.Pointer indexFile, - ffi.Pointer file, - ffi.Pointer line, - ffi.Pointer column, - ffi.Pointer offset, - ); -typedef NativeClang_indexSourceFile = - ffi.Int Function( - CXIndexAction, - CXClientData client_data, - ffi.Pointer index_callbacks, - ffi.UnsignedInt index_callbacks_size, - ffi.UnsignedInt index_options, - ffi.Pointer source_filename, - ffi.Pointer> command_line_args, - ffi.Int num_command_line_args, - ffi.Pointer unsaved_files, - ffi.UnsignedInt num_unsaved_files, - ffi.Pointer out_TU, - ffi.UnsignedInt TU_options, - ); -typedef DartClang_indexSourceFile = - int Function( - CXIndexAction, - CXClientData client_data, - ffi.Pointer index_callbacks, - int index_callbacks_size, - int index_options, - ffi.Pointer source_filename, - ffi.Pointer> command_line_args, - int num_command_line_args, - ffi.Pointer unsaved_files, - int num_unsaved_files, - ffi.Pointer out_TU, - int TU_options, - ); -typedef NativeClang_indexSourceFileFullArgv = - ffi.Int Function( - CXIndexAction, - CXClientData client_data, - ffi.Pointer index_callbacks, - ffi.UnsignedInt index_callbacks_size, - ffi.UnsignedInt index_options, - ffi.Pointer source_filename, - ffi.Pointer> command_line_args, - ffi.Int num_command_line_args, - ffi.Pointer unsaved_files, - ffi.UnsignedInt num_unsaved_files, - ffi.Pointer out_TU, - ffi.UnsignedInt TU_options, - ); -typedef DartClang_indexSourceFileFullArgv = - int Function( - CXIndexAction, - CXClientData client_data, - ffi.Pointer index_callbacks, - int index_callbacks_size, - int index_options, - ffi.Pointer source_filename, - ffi.Pointer> command_line_args, - int num_command_line_args, - ffi.Pointer unsaved_files, - int num_unsaved_files, - ffi.Pointer out_TU, - int TU_options, - ); -typedef NativeClang_indexTranslationUnit = - ffi.Int Function( - CXIndexAction, - CXClientData client_data, - ffi.Pointer index_callbacks, - ffi.UnsignedInt index_callbacks_size, - ffi.UnsignedInt index_options, - CXTranslationUnit, - ); -typedef DartClang_indexTranslationUnit = - int Function( - CXIndexAction, - CXClientData client_data, - ffi.Pointer index_callbacks, - int index_callbacks_size, - int index_options, - CXTranslationUnit, - ); -typedef NativeClang_index_getCXXClassDeclInfo = - ffi.Pointer Function(ffi.Pointer); -typedef DartClang_index_getCXXClassDeclInfo = - ffi.Pointer Function(ffi.Pointer); -typedef NativeClang_index_getClientContainer = - CXIdxClientContainer Function(ffi.Pointer); -typedef DartClang_index_getClientContainer = - CXIdxClientContainer Function(ffi.Pointer); -typedef NativeClang_index_getClientEntity = - CXIdxClientEntity Function(ffi.Pointer); -typedef DartClang_index_getClientEntity = - CXIdxClientEntity Function(ffi.Pointer); -typedef NativeClang_index_getIBOutletCollectionAttrInfo = - ffi.Pointer Function( - ffi.Pointer, - ); -typedef DartClang_index_getIBOutletCollectionAttrInfo = - ffi.Pointer Function( - ffi.Pointer, - ); -typedef NativeClang_index_getObjCCategoryDeclInfo = - ffi.Pointer Function(ffi.Pointer); -typedef DartClang_index_getObjCCategoryDeclInfo = - ffi.Pointer Function(ffi.Pointer); -typedef NativeClang_index_getObjCContainerDeclInfo = - ffi.Pointer Function( - ffi.Pointer, - ); -typedef DartClang_index_getObjCContainerDeclInfo = - ffi.Pointer Function( - ffi.Pointer, - ); -typedef NativeClang_index_getObjCInterfaceDeclInfo = - ffi.Pointer Function( - ffi.Pointer, - ); -typedef DartClang_index_getObjCInterfaceDeclInfo = - ffi.Pointer Function( - ffi.Pointer, - ); -typedef NativeClang_index_getObjCPropertyDeclInfo = - ffi.Pointer Function(ffi.Pointer); -typedef DartClang_index_getObjCPropertyDeclInfo = - ffi.Pointer Function(ffi.Pointer); -typedef NativeClang_index_getObjCProtocolRefListInfo = - ffi.Pointer Function( - ffi.Pointer, - ); -typedef DartClang_index_getObjCProtocolRefListInfo = - ffi.Pointer Function( - ffi.Pointer, - ); -typedef NativeClang_index_isEntityObjCContainerKind = - ffi.Int Function(ffi.UnsignedInt); -typedef DartClang_index_isEntityObjCContainerKind = int Function(int); -typedef NativeClang_index_setClientContainer = - ffi.Void Function(ffi.Pointer, CXIdxClientContainer); -typedef DartClang_index_setClientContainer = - void Function(ffi.Pointer, CXIdxClientContainer); -typedef NativeClang_index_setClientEntity = - ffi.Void Function(ffi.Pointer, CXIdxClientEntity); -typedef DartClang_index_setClientEntity = - void Function(ffi.Pointer, CXIdxClientEntity); -typedef NativeClang_isAttribute = ffi.UnsignedInt Function(ffi.UnsignedInt); -typedef DartClang_isAttribute = int Function(int); -typedef NativeClang_isConstQualifiedType = ffi.UnsignedInt Function(CXType T); -typedef DartClang_isConstQualifiedType = int Function(CXType T); -typedef NativeClang_isCursorDefinition = ffi.UnsignedInt Function(CXCursor); -typedef DartClang_isCursorDefinition = int Function(CXCursor); -typedef NativeClang_isDeclaration = ffi.UnsignedInt Function(ffi.UnsignedInt); -typedef DartClang_isDeclaration = int Function(int); -typedef NativeClang_isExpression = ffi.UnsignedInt Function(ffi.UnsignedInt); -typedef DartClang_isExpression = int Function(int); -typedef NativeClang_isFileMultipleIncludeGuarded = - ffi.UnsignedInt Function(CXTranslationUnit tu, CXFile file); -typedef DartClang_isFileMultipleIncludeGuarded = - int Function(CXTranslationUnit tu, CXFile file); -typedef NativeClang_isFunctionTypeVariadic = ffi.UnsignedInt Function(CXType T); -typedef DartClang_isFunctionTypeVariadic = int Function(CXType T); -typedef NativeClang_isInvalid = ffi.UnsignedInt Function(ffi.UnsignedInt); -typedef DartClang_isInvalid = int Function(int); -typedef NativeClang_isInvalidDeclaration = ffi.UnsignedInt Function(CXCursor); -typedef DartClang_isInvalidDeclaration = int Function(CXCursor); -typedef NativeClang_isPODType = ffi.UnsignedInt Function(CXType T); -typedef DartClang_isPODType = int Function(CXType T); -typedef NativeClang_isPreprocessing = ffi.UnsignedInt Function(ffi.UnsignedInt); -typedef DartClang_isPreprocessing = int Function(int); -typedef NativeClang_isReference = ffi.UnsignedInt Function(ffi.UnsignedInt); -typedef DartClang_isReference = int Function(int); -typedef NativeClang_isRestrictQualifiedType = - ffi.UnsignedInt Function(CXType T); -typedef DartClang_isRestrictQualifiedType = int Function(CXType T); -typedef NativeClang_isStatement = ffi.UnsignedInt Function(ffi.UnsignedInt); -typedef DartClang_isStatement = int Function(int); -typedef NativeClang_isTranslationUnit = - ffi.UnsignedInt Function(ffi.UnsignedInt); -typedef DartClang_isTranslationUnit = int Function(int); -typedef NativeClang_isUnexposed = ffi.UnsignedInt Function(ffi.UnsignedInt); -typedef DartClang_isUnexposed = int Function(int); -typedef NativeClang_isVirtualBase = ffi.UnsignedInt Function(CXCursor); -typedef DartClang_isVirtualBase = int Function(CXCursor); -typedef NativeClang_isVolatileQualifiedType = - ffi.UnsignedInt Function(CXType T); -typedef DartClang_isVolatileQualifiedType = int Function(CXType T); -typedef NativeClang_loadDiagnostics = - CXDiagnosticSet Function( - ffi.Pointer file, - ffi.Pointer error, - ffi.Pointer errorString, - ); -typedef DartClang_loadDiagnostics = - CXDiagnosticSet Function( - ffi.Pointer file, - ffi.Pointer error, - ffi.Pointer errorString, - ); -typedef NativeClang_parseTranslationUnit = - CXTranslationUnit Function( - CXIndex CIdx, - ffi.Pointer source_filename, - ffi.Pointer> command_line_args, - ffi.Int num_command_line_args, - ffi.Pointer unsaved_files, - ffi.UnsignedInt num_unsaved_files, - ffi.UnsignedInt options, - ); -typedef DartClang_parseTranslationUnit = - CXTranslationUnit Function( - CXIndex CIdx, - ffi.Pointer source_filename, - ffi.Pointer> command_line_args, - int num_command_line_args, - ffi.Pointer unsaved_files, - int num_unsaved_files, - int options, - ); -typedef NativeClang_parseTranslationUnit2 = - ffi.UnsignedInt Function( - CXIndex CIdx, - ffi.Pointer source_filename, - ffi.Pointer> command_line_args, - ffi.Int num_command_line_args, - ffi.Pointer unsaved_files, - ffi.UnsignedInt num_unsaved_files, - ffi.UnsignedInt options, - ffi.Pointer out_TU, - ); -typedef DartClang_parseTranslationUnit2 = - int Function( - CXIndex CIdx, - ffi.Pointer source_filename, - ffi.Pointer> command_line_args, - int num_command_line_args, - ffi.Pointer unsaved_files, - int num_unsaved_files, - int options, - ffi.Pointer out_TU, - ); -typedef NativeClang_parseTranslationUnit2FullArgv = - ffi.UnsignedInt Function( - CXIndex CIdx, - ffi.Pointer source_filename, - ffi.Pointer> command_line_args, - ffi.Int num_command_line_args, - ffi.Pointer unsaved_files, - ffi.UnsignedInt num_unsaved_files, - ffi.UnsignedInt options, - ffi.Pointer out_TU, - ); -typedef DartClang_parseTranslationUnit2FullArgv = - int Function( - CXIndex CIdx, - ffi.Pointer source_filename, - ffi.Pointer> command_line_args, - int num_command_line_args, - ffi.Pointer unsaved_files, - int num_unsaved_files, - int options, - ffi.Pointer out_TU, - ); -typedef NativeClang_remap_dispose = ffi.Void Function(CXRemapping); -typedef DartClang_remap_dispose = void Function(CXRemapping); -typedef NativeClang_remap_getFilenames = - ffi.Void Function( - CXRemapping, - ffi.UnsignedInt index, - ffi.Pointer original, - ffi.Pointer transformed, - ); -typedef DartClang_remap_getFilenames = - void Function( - CXRemapping, - int index, - ffi.Pointer original, - ffi.Pointer transformed, - ); -typedef NativeClang_remap_getNumFiles = ffi.UnsignedInt Function(CXRemapping); -typedef DartClang_remap_getNumFiles = int Function(CXRemapping); -typedef NativeClang_reparseTranslationUnit = - ffi.Int Function( - CXTranslationUnit TU, - ffi.UnsignedInt num_unsaved_files, - ffi.Pointer unsaved_files, - ffi.UnsignedInt options, - ); -typedef DartClang_reparseTranslationUnit = - int Function( - CXTranslationUnit TU, - int num_unsaved_files, - ffi.Pointer unsaved_files, - int options, - ); -typedef NativeClang_saveTranslationUnit = - ffi.Int Function( - CXTranslationUnit TU, - ffi.Pointer FileName, - ffi.UnsignedInt options, - ); -typedef DartClang_saveTranslationUnit = - int Function( - CXTranslationUnit TU, - ffi.Pointer FileName, - int options, - ); -typedef NativeClang_sortCodeCompletionResults = - ffi.Void Function( - ffi.Pointer Results, - ffi.UnsignedInt NumResults, - ); -typedef DartClang_sortCodeCompletionResults = - void Function(ffi.Pointer Results, int NumResults); -typedef NativeClang_suspendTranslationUnit = - ffi.UnsignedInt Function(CXTranslationUnit); -typedef DartClang_suspendTranslationUnit = int Function(CXTranslationUnit); -typedef NativeClang_toggleCrashRecovery = - ffi.Void Function(ffi.UnsignedInt isEnabled); -typedef DartClang_toggleCrashRecovery = void Function(int isEnabled); -typedef NativeClang_tokenize = - ffi.Void Function( - CXTranslationUnit TU, - CXSourceRange Range, - ffi.Pointer> Tokens, - ffi.Pointer NumTokens, - ); -typedef DartClang_tokenize = - void Function( - CXTranslationUnit TU, - CXSourceRange Range, - ffi.Pointer> Tokens, - ffi.Pointer NumTokens, - ); -typedef NativeClang_visitChildren = - ffi.UnsignedInt Function( - CXCursor parent, - CXCursorVisitor visitor, - CXClientData client_data, - ); -typedef DartClang_visitChildren = - int Function( - CXCursor parent, - CXCursorVisitor visitor, - CXClientData client_data, - ); diff --git a/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart b/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart index 5a5a9df645..a61727d0d4 100644 --- a/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart +++ b/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart @@ -12,8 +12,27 @@ import 'package:ffi/ffi.dart' as pkg_ffi; const _$objcVersionCheck = objc.ObjCVersionCheck(9, 4); -/// WARNING: AVAudioFormat is a stub. To generate bindings for this class, include -/// AVAudioFormat in your config's objc-interfaces list. +enum AVAudioCommonFormat { + AVAudioOtherFormat(0), + AVAudioPCMFormatFloat32(1), + AVAudioPCMFormatFloat64(2), + AVAudioPCMFormatInt16(3), + AVAudioPCMFormatInt32(4); + + final int value; + const AVAudioCommonFormat(this.value); + + static AVAudioCommonFormat fromValue(int value) => switch (value) { + 0 => AVAudioOtherFormat, + 1 => AVAudioPCMFormatFloat32, + 2 => AVAudioPCMFormatFloat64, + 3 => AVAudioPCMFormatInt16, + 4 => AVAudioPCMFormatInt32, + _ => throw ArgumentError('Unknown value for AVAudioCommonFormat: $value'), + }; +} + +/// AVAudioFormat /// /// AVAudioFormat extension type AVAudioFormat._(objc.ObjCObject object$) @@ -745,8 +764,7 @@ extension AVAudioPlayer$Methods on AVAudioPlayer { } } -/// WARNING: AVAudioPlayerDelegate is a stub. To generate bindings for this class, include -/// AVAudioPlayerDelegate in your config's objc-protocols list. +/// AVAudioPlayerDelegate /// /// AVAudioPlayerDelegate extension type AVAudioPlayerDelegate._(objc.ObjCProtocol object$) @@ -762,8 +780,7 @@ extension type AVAudioPlayerDelegate._(objc.ObjCProtocol object$) }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); } -/// WARNING: CASpatialAudioExperience is a stub. To generate bindings for this class, include -/// CASpatialAudioExperience in your config's objc-interfaces list. +/// CASpatialAudioExperience /// /// CASpatialAudioExperience extension type CASpatialAudioExperience._(objc.ObjCObject object$) @@ -779,6 +796,26 @@ extension type CASpatialAudioExperience._(objc.ObjCObject object$) }) : object$ = objc.ObjCObject(other, retain: retain, release: release) {} } +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_AVAudioChannelLayout', +) +external ffi.Pointer _class_AVAudioChannelLayout_raw; +final _class_AVAudioChannelLayout = objc.getClass( + "AVAudioChannelLayout", + () => ffi.Native.addressOf>( + _class_AVAudioChannelLayout_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_AVAudioFormat', +) +external ffi.Pointer _class_AVAudioFormat_raw; +final _class_AVAudioFormat = objc.getClass( + "AVAudioFormat", + () => ffi.Native.addressOf>( + _class_AVAudioFormat_raw, + ).cast(), +); @ffi.Native>( symbol: 'OBJC_CLASS_\$_AVAudioPlayer', ) @@ -789,6 +826,16 @@ final _class_AVAudioPlayer = objc.getClass( _class_AVAudioPlayer_raw, ).cast(), ); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_CASpatialAudioExperience', +) +external ffi.Pointer _class_CASpatialAudioExperience_raw; +final _class_CASpatialAudioExperience = objc.getClass( + "CASpatialAudioExperience", + () => ffi.Native.addressOf>( + _class_CASpatialAudioExperience_raw, + ).cast(), +); final _objc_msgSend_151sglz = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -1087,6 +1134,23 @@ final _objc_msgSend_91o635 = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_e3qsqz = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); final _objc_msgSend_hwm8nu = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -1153,12 +1217,31 @@ final _objc_msgSend_xw2lbc = objc.msgSendPointer ffi.Pointer, ) >(); +@ffi.Native Function()>( + symbol: '_1uu024u_AVAudioPlayerDelegate', +) +external ffi.Pointer +_protocol_AVAudioPlayerDelegate_raw(); +final _protocol_AVAudioPlayerDelegate = objc.getProtocol( + "AVAudioPlayerDelegate", + _protocol_AVAudioPlayerDelegate_raw, +); late final _sel_alloc = objc.registerName("alloc"); late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); +late final _sel_audioPlayerDecodeErrorDidOccur_error_ = objc.registerName( + "audioPlayerDecodeErrorDidOccur:error:", +); +late final _sel_audioPlayerDidFinishPlaying_successfully_ = objc.registerName( + "audioPlayerDidFinishPlaying:successfully:", +); late final _sel_averagePowerForChannel_ = objc.registerName( "averagePowerForChannel:", ); late final _sel_channelAssignments = objc.registerName("channelAssignments"); +late final _sel_channelCount = objc.registerName("channelCount"); +late final _sel_channelLayout = objc.registerName("channelLayout"); +late final _sel_commonFormat = objc.registerName("commonFormat"); +late final _sel_conformsToProtocol_ = objc.registerName("conformsToProtocol:"); late final _sel_currentDevice = objc.registerName("currentDevice"); late final _sel_currentTime = objc.registerName("currentTime"); late final _sel_data = objc.registerName("data"); @@ -1166,8 +1249,25 @@ late final _sel_delegate = objc.registerName("delegate"); late final _sel_deviceCurrentTime = objc.registerName("deviceCurrentTime"); late final _sel_duration = objc.registerName("duration"); late final _sel_enableRate = objc.registerName("enableRate"); +late final _sel_encodeWithCoder_ = objc.registerName("encodeWithCoder:"); late final _sel_format = objc.registerName("format"); +late final _sel_formatDescription = objc.registerName("formatDescription"); late final _sel_init = objc.registerName("init"); +late final _sel_initStandardFormatWithSampleRate_channelLayout_ = objc + .registerName("initStandardFormatWithSampleRate:channelLayout:"); +late final _sel_initStandardFormatWithSampleRate_channels_ = objc.registerName( + "initStandardFormatWithSampleRate:channels:", +); +late final _sel_initWithCMAudioFormatDescription_ = objc.registerName( + "initWithCMAudioFormatDescription:", +); +late final _sel_initWithCoder_ = objc.registerName("initWithCoder:"); +late final _sel_initWithCommonFormat_sampleRate_channels_interleaved_ = objc + .registerName("initWithCommonFormat:sampleRate:channels:interleaved:"); +late final _sel_initWithCommonFormat_sampleRate_interleaved_channelLayout_ = + objc.registerName( + "initWithCommonFormat:sampleRate:interleaved:channelLayout:", + ); late final _sel_initWithContentsOfURL_error_ = objc.registerName( "initWithContentsOfURL:error:", ); @@ -1178,12 +1278,31 @@ late final _sel_initWithData_error_ = objc.registerName("initWithData:error:"); late final _sel_initWithData_fileTypeHint_error_ = objc.registerName( "initWithData:fileTypeHint:error:", ); +late final _sel_initWithLayoutTag_ = objc.registerName("initWithLayoutTag:"); +late final _sel_initWithLayout_ = objc.registerName("initWithLayout:"); +late final _sel_initWithSettings_ = objc.registerName("initWithSettings:"); +late final _sel_initWithStreamDescription_ = objc.registerName( + "initWithStreamDescription:", +); +late final _sel_initWithStreamDescription_channelLayout_ = objc.registerName( + "initWithStreamDescription:channelLayout:", +); late final _sel_intendedSpatialExperience = objc.registerName( "intendedSpatialExperience", ); +late final _sel_isEqual_ = objc.registerName("isEqual:"); +late final _sel_isInterleaved = objc.registerName("isInterleaved"); late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); late final _sel_isMeteringEnabled = objc.registerName("isMeteringEnabled"); late final _sel_isPlaying = objc.registerName("isPlaying"); +late final _sel_isStandard = objc.registerName("isStandard"); +late final _sel_layout = objc.registerName("layout"); +late final _sel_layoutTag = objc.registerName("layoutTag"); +late final _sel_layoutWithLayoutTag_ = objc.registerName( + "layoutWithLayoutTag:", +); +late final _sel_layoutWithLayout_ = objc.registerName("layoutWithLayout:"); +late final _sel_magicCookie = objc.registerName("magicCookie"); late final _sel_new = objc.registerName("new"); late final _sel_numberOfChannels = objc.registerName("numberOfChannels"); late final _sel_numberOfLoops = objc.registerName("numberOfLoops"); @@ -1196,6 +1315,7 @@ late final _sel_play = objc.registerName("play"); late final _sel_playAtTime_ = objc.registerName("playAtTime:"); late final _sel_prepareToPlay = objc.registerName("prepareToPlay"); late final _sel_rate = objc.registerName("rate"); +late final _sel_sampleRate = objc.registerName("sampleRate"); late final _sel_setChannelAssignments_ = objc.registerName( "setChannelAssignments:", ); @@ -1206,6 +1326,7 @@ late final _sel_setEnableRate_ = objc.registerName("setEnableRate:"); late final _sel_setIntendedSpatialExperience_ = objc.registerName( "setIntendedSpatialExperience:", ); +late final _sel_setMagicCookie_ = objc.registerName("setMagicCookie:"); late final _sel_setMeteringEnabled_ = objc.registerName("setMeteringEnabled:"); late final _sel_setNumberOfLoops_ = objc.registerName("setNumberOfLoops:"); late final _sel_setPan_ = objc.registerName("setPan:"); @@ -1216,6 +1337,10 @@ late final _sel_setVolume_fadeDuration_ = objc.registerName( ); late final _sel_settings = objc.registerName("settings"); late final _sel_stop = objc.registerName("stop"); +late final _sel_streamDescription = objc.registerName("streamDescription"); +late final _sel_supportsSecureCoding = objc.registerName( + "supportsSecureCoding", +); late final _sel_updateMeters = objc.registerName("updateMeters"); late final _sel_url = objc.registerName("url"); late final _sel_volume = objc.registerName("volume"); diff --git a/pkgs/ffigen/example/shared_bindings/lib/generated/a_shared_b_gen.dart b/pkgs/ffigen/example/shared_bindings/lib/generated/a_shared_b_gen.dart index 52838f927b..a718f8a86d 100644 --- a/pkgs/ffigen/example/shared_bindings/lib/generated/a_shared_b_gen.dart +++ b/pkgs/ffigen/example/shared_bindings/lib/generated/a_shared_b_gen.dart @@ -80,6 +80,19 @@ class NativeLibraryASharedB { ); late final _a_func5 = _a_func5Ptr .asFunction(); + + void base_func1(imp$1.BaseTypedef1 t1, imp$1.BaseTypedef2 t2) { + return _base_func1(t1, t2); + } + + late final _base_func1Ptr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(imp$1.BaseTypedef1, imp$1.BaseTypedef2) + > + >('base_func1'); + late final _base_func1 = _base_func1Ptr + .asFunction(); } enum A_Enum { diff --git a/pkgs/ffigen/example/swift/swift_api_bindings.dart b/pkgs/ffigen/example/swift/swift_api_bindings.dart index e528a7cd0a..5dde3c9b90 100644 --- a/pkgs/ffigen/example/swift/swift_api_bindings.dart +++ b/pkgs/ffigen/example/swift/swift_api_bindings.dart @@ -101,7 +101,7 @@ extension SwiftClass$Methods on SwiftClass { } @ffi.Native>( - symbol: 'OBJC_CLASS_\$_swift_module.SwiftClass', + symbol: 'OBJC_CLASS_\$__TtC12swift_module10SwiftClass', ) external ffi.Pointer _class_SwiftClass_raw; final _class_SwiftClass = objc.getClass( diff --git a/pkgs/ffigen/lib/ffigen.dart b/pkgs/ffigen/lib/ffigen.dart index 17b5857086..ce6a368d23 100644 --- a/pkgs/ffigen/lib/ffigen.dart +++ b/pkgs/ffigen/lib/ffigen.dart @@ -23,18 +23,15 @@ export 'src/config_provider.dart' CommentType, CompoundDependencies, Declaration, - Declarations, DynamicLibraryBindings, EnumStyle, Enums, ExternalVersions, FfiGenerator, Functions, - Globals, Headers, Integers, Interfaces, - Macros, NativeExternalBindings, ObjectiveC, Output, @@ -44,7 +41,6 @@ export 'src/config_provider.dart' SymbolFile, Typedefs, Unions, - UnnamedEnums, VarArgFunction, Version, Versions, diff --git a/pkgs/ffigen/lib/src/code_generator/binding.dart b/pkgs/ffigen/lib/src/code_generator/binding.dart index 0e027d498d..814a6a3a11 100644 --- a/pkgs/ffigen/lib/src/code_generator/binding.dart +++ b/pkgs/ffigen/lib/src/code_generator/binding.dart @@ -38,7 +38,7 @@ abstract class Binding extends AstNode implements Declaration { /// Whether these bindings should be generated. /// /// Set by MarkBindingsVisitation. - bool generateBindings = true; + bool generateBindings = false; Binding({ required this.usr, diff --git a/pkgs/ffigen/lib/src/code_generator/compound.dart b/pkgs/ffigen/lib/src/code_generator/compound.dart index ee83bbda0f..0420b9b304 100644 --- a/pkgs/ffigen/lib/src/code_generator/compound.dart +++ b/pkgs/ffigen/lib/src/code_generator/compound.dart @@ -146,6 +146,7 @@ abstract class Compound extends BindingType with HasLocalScope { @override bool get isObjCImport => + !(context.config.objectiveC?.generateForPackageObjectiveC ?? false) && context.objCBuiltInFunctions.getBuiltInCompoundName(originalName) != null; @override diff --git a/pkgs/ffigen/lib/src/code_generator/enum_class.dart b/pkgs/ffigen/lib/src/code_generator/enum_class.dart index 9a23889415..fb59808259 100644 --- a/pkgs/ffigen/lib/src/code_generator/enum_class.dart +++ b/pkgs/ffigen/lib/src/code_generator/enum_class.dart @@ -192,6 +192,7 @@ class EnumClass extends BindingType with HasLocalScope { @override bool get isObjCImport => + !(context.config.objectiveC?.generateForPackageObjectiveC ?? false) && context.objCBuiltInFunctions.isBuiltInEnum(originalName); @override diff --git a/pkgs/ffigen/lib/src/code_generator/func_type.dart b/pkgs/ffigen/lib/src/code_generator/func_type.dart index e21ba874fc..ba2e603671 100644 --- a/pkgs/ffigen/lib/src/code_generator/func_type.dart +++ b/pkgs/ffigen/lib/src/code_generator/func_type.dart @@ -82,7 +82,8 @@ class FunctionType extends Type with HasLocalScope { (p) => p.type.getNativeType(context), ); final returnTypeStr = returnType.getNativeType(context); - return '$returnTypeStr (*$varName)(${arg.join(', ')})'; + final argStr = arg.isEmpty ? 'void' : arg.join(', '); + return '$returnTypeStr (*$varName)($argStr)'; } @override diff --git a/pkgs/ffigen/lib/src/code_generator/global.dart b/pkgs/ffigen/lib/src/code_generator/global.dart index 265b8525d1..103bdda043 100644 --- a/pkgs/ffigen/lib/src/code_generator/global.dart +++ b/pkgs/ffigen/lib/src/code_generator/global.dart @@ -6,6 +6,7 @@ import '../visitor/ast.dart'; import 'binding.dart'; import 'binding_string.dart'; import 'compound.dart'; +import 'constant.dart'; import 'imports.dart'; import 'local_variables.dart'; import 'pointer.dart'; @@ -28,6 +29,7 @@ class Global extends LookUpBinding with HasLocalScope { final Type type; bool exposeSymbolAddress; final bool constant; + final Constant? constantValue; @override final bool loadFromNativeAsset; @@ -40,11 +42,16 @@ class Global extends LookUpBinding with HasLocalScope { super.dartDoc, this.exposeSymbolAddress = false, this.constant = false, + this.constantValue, this.loadFromNativeAsset = false, }) : super(symbol: Symbol(name, SymbolKind.field)); @override BindingString toBindingString(Writer w) { + if (!exposeSymbolAddress && constantValue != null) { + constantValue!.symbol = symbol; + return constantValue!.toBindingString(w); + } final s = StringBuffer(); final globalVarName = name; s.write(makeDartDoc(dartDoc)); diff --git a/pkgs/ffigen/lib/src/code_generator/objc_block.dart b/pkgs/ffigen/lib/src/code_generator/objc_block.dart index dab170be8b..73c06eb2cd 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_block.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_block.dart @@ -45,6 +45,7 @@ class ObjCBlock extends BindingType with HasLocalScope { returnType, renamedParams.map((a) => a.type), reduced: false, + returnsRetained: returnsRetained, ); final oldBlock = context.bindingsIndex.getSeenObjCBlock(usr); if (oldBlock != null) { @@ -56,6 +57,7 @@ class ObjCBlock extends BindingType with HasLocalScope { returnType, renamedParams.map((a) => a.type), reduced: true, + returnsRetained: returnsRetained, ); } return oldBlock; @@ -115,9 +117,11 @@ class ObjCBlock extends BindingType with HasLocalScope { Type returnType, Iterable argTypes, { required bool reduced, + bool returnsRetained = false, }) { final types = [returnType, ...argTypes].map((t) => _typeName(t, reduced)); - return 'ObjCBlock_${types.join('_')}'; + final name = 'ObjCBlock_${types.join('_')}'; + return returnsRetained ? '${name}_retained' : name; } static String _typeName(Type type, bool reduced) => @@ -127,7 +131,12 @@ class ObjCBlock extends BindingType with HasLocalScope { ); static final _illegalNameChar = RegExp(r'[^0-9a-zA-Z]'); static Type _reducedType(Type type) { - if (type.baseType != type) return _reducedType(type.baseType); + if (type is ObjCNullable) { + final reducedChild = _reducedType(type.child); + return reducedChild is ObjCNullable + ? reducedChild + : ObjCNullable(reducedChild); + } if (type.typealiasType != type) return _reducedType(type.typealiasType); return type; } @@ -141,9 +150,9 @@ class ObjCBlock extends BindingType with HasLocalScope { // with the same signature. Not intended to be human readable. return [ '${strings.synthUsrChar} objcBlock:', - '${returnType.cacheKey()} ${returnsRetained ? 'R' : ''}', + '${_reducedType(returnType).cacheKey()} ${returnsRetained ? 'R' : ''}', for (final param in params) - '${param.type.cacheKey()} ${param.objCConsumed ? 'C' : ''}', + '${_reducedType(param.type).cacheKey()} ${param.objCConsumed ? 'C' : ''}', ].join(' '); } diff --git a/pkgs/ffigen/lib/src/code_generator/objc_built_in_types.dart b/pkgs/ffigen/lib/src/code_generator/objc_built_in_types.dart index 194e77f1de..3da4a090ca 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_built_in_types.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_built_in_types.dart @@ -5,11 +5,11 @@ // Generated by package:objective_c's tool/generate_code.dart. const objCBuiltInInterfaces = { + 'DOBJCObservation': 'DOBJCObservation', 'DOBJCDartInputStreamAdapter': 'DartInputStreamAdapter', 'DOBJCDartInputStreamAdapterWeakHolder': 'DartInputStreamAdapterWeakHolder', - 'DOBJCObservation': 'DOBJCObservation', - 'DOBJCDartProtocolBuilder': 'DartProtocolBuilder', 'DOBJCDartProtocol': 'DartProtocol', + 'DOBJCDartProtocolBuilder': 'DartProtocolBuilder', 'NSArray': 'NSArray', 'NSAttributedString': 'NSAttributedString', 'NSAttributedStringMarkdownParsingOptions': @@ -17,6 +17,7 @@ const objCBuiltInInterfaces = { 'NSBundle': 'NSBundle', 'NSCharacterSet': 'NSCharacterSet', 'NSCoder': 'NSCoder', + 'NSConnection': 'NSConnection', 'NSData': 'NSData', 'NSDate': 'NSDate', 'NSDictionary': 'NSDictionary', @@ -39,10 +40,10 @@ const objCBuiltInInterfaces = { 'NSNull': 'NSNull', 'NSNumber': 'NSNumber', 'NSObject': 'NSObject', - 'NSOutputStream': 'NSOutputStream', 'NSOrderedCollectionChange': 'NSOrderedCollectionChange', 'NSOrderedCollectionDifference': 'NSOrderedCollectionDifference', 'NSOrderedSet': 'NSOrderedSet', + 'NSOutputStream': 'NSOutputStream', 'NSPort': 'NSPort', 'NSPortMessage': 'NSPortMessage', 'NSProgress': 'NSProgress', @@ -87,7 +88,15 @@ const objCBuiltInEnums = { 'NSDataSearchOptions', 'NSDataWritingOptions', 'NSDecodingFailurePolicy', + 'NSDirectoryEnumerationOptions', 'NSEnumerationOptions', + 'NSExpressionType', + 'NSFileManagerItemReplacementOptions', + 'NSFileManagerResumeSyncBehavior', + 'NSFileManagerUnmountOptions', + 'NSFileManagerUploadLocalVersionConflictPolicy', + 'NSFileVersionAddingOptions', + 'NSFileVersionReplacingOptions', 'NSItemProviderFileOptions', 'NSItemProviderRepresentationVisibility', 'NSKeyValueChange', @@ -96,17 +105,23 @@ const objCBuiltInEnums = { 'NSLinguisticTaggerOptions', 'NSLocaleLanguageDirection', 'NSOrderedCollectionDifferenceCalculationOptions', + 'NSPredicateOperatorType', 'NSPropertyListFormat', 'NSQualityOfService', + 'NSSearchPathDirectory', + 'NSSearchPathDomainMask', 'NSSortOptions', 'NSStreamEvent', 'NSStreamStatus', 'NSStringCompareOptions', 'NSStringEncodingConversionOptions', 'NSStringEnumerationOptions', + 'NSTimeZoneNameStyle', 'NSURLBookmarkCreationOptions', 'NSURLBookmarkResolutionOptions', 'NSURLHandleStatus', + 'NSURLRelationship', + 'NSVolumeEnumerationOptions', }; const objCBuiltInProtocols = { @@ -120,6 +135,7 @@ const objCBuiltInProtocols = { 'NSPortDelegate': 'NSPortDelegate', 'NSSecureCoding': 'NSSecureCoding', 'NSStreamDelegate': 'NSStreamDelegate', + 'NSURLHandleClient': 'NSURLHandleClient', 'Observer': 'Observer', }; @@ -138,7 +154,7 @@ const objCBuiltInCategories = { 'NSExtendedOrderedSet', 'NSExtendedSet', 'NSNumberCreation', - 'NSNumberIsFloat', 'NSNumberIsBool', + 'NSNumberIsFloat', 'NSStringExtensionMethods', }; diff --git a/pkgs/ffigen/lib/src/code_generator/objc_category.dart b/pkgs/ffigen/lib/src/code_generator/objc_category.dart index 99eec4feda..296c5089af 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_category.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_category.dart @@ -44,6 +44,7 @@ class ObjCCategory extends NoLookUpBinding with ObjCMethods, HasLocalScope { @override bool get isObjCImport => + !(context.config.objectiveC?.generateForPackageObjectiveC ?? false) && context.objCBuiltInFunctions.isBuiltInCategory(originalName); @override diff --git a/pkgs/ffigen/lib/src/code_generator/objc_interface.dart b/pkgs/ffigen/lib/src/code_generator/objc_interface.dart index 2fb9fc915c..ff1559c68d 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_interface.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_interface.dart @@ -18,8 +18,13 @@ class ObjCInterface extends BindingType with ObjCMethods, HasLocalScope { ObjCInterface? superType; bool filled = false; - String? module; - late final NoLookUpBinding classObject; + String? _module; + String? get module => _module; + set module(String? value) { + _module = value; + classObject = ObjCClassGlobal('_class_$originalName', originalName, value); + } + late NoLookUpBinding classObject; late final ObjCInternalGlobal _isKindOfClass; late final ObjCMsgSendFunc _isKindOfClassMsgSend; final protocols = []; @@ -34,7 +39,7 @@ class ObjCInterface extends BindingType with ObjCMethods, HasLocalScope { super.usr, required String super.originalName, String? name, - this.module, + String? module, super.dartDoc, required this.apiAvailability, required this.context, @@ -46,7 +51,7 @@ class ObjCInterface extends BindingType with ObjCMethods, HasLocalScope { name ?? originalName, ) { - classObject = ObjCClassGlobal('_class_$originalName', originalName, module); + this.module = module; _isKindOfClass = context.objCBuiltInFunctions.getSelObject( 'isKindOfClass:', ); @@ -68,8 +73,9 @@ class ObjCInterface extends BindingType with ObjCMethods, HasLocalScope { @override bool get isObjCImport => + !(context.config.objectiveC?.generateForPackageObjectiveC ?? false) && context.objCBuiltInFunctions.getBuiltInInterfaceName(originalName) != - null; + null; bool get unavailable => apiAvailability.availability == Availability.none; @@ -80,8 +86,7 @@ class ObjCInterface extends BindingType with ObjCMethods, HasLocalScope { s.write('\n'); if (generateAsStub) { s.write(''' -/// WARNING: $name is a stub. To generate bindings for this class, include -/// $originalName in your config's objc-interfaces list. +/// $name /// '''); } @@ -103,7 +108,10 @@ class ObjCInterface extends BindingType with ObjCMethods, HasLocalScope { final wrapObjType = ObjCBuiltInFunctions.objectBase.gen(context); final protos = [ wrapObjType, - ...[superType, ...protocols].nonNulls.map((p) => p.getDartType(context)), + if (superType != null) superType!.getDartType(context), + ...protocols + .where((p) => p.generateBindings || p.isObjCImport) + .map((p) => p.getDartType(context)), ]; s.write(''' @@ -184,8 +192,16 @@ ${generateInstanceMethodBindings(w, this)} PointerType(objCObjectType).getCType(context); @override - String getDartType(Context context) => - isObjCImport ? '${context.libs.prefix(objcPkgImport)}.$name' : name; + String getDartType(Context context) { + if (isObjCImport) { + context.libs.markUsed(objcPkgImport); + final builtinName = + context.objCBuiltInFunctions.getBuiltInInterfaceName(originalName) ?? + originalName; + return '${context.libs.prefix(objcPkgImport)}.$builtinName'; + } + return name; + } @override String getNativeType(Context context, {String varName = ''}) => 'id $varName'; diff --git a/pkgs/ffigen/lib/src/code_generator/objc_protocol.dart b/pkgs/ffigen/lib/src/code_generator/objc_protocol.dart index 3941fdba27..9b5e77c006 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_protocol.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_protocol.dart @@ -16,9 +16,19 @@ class ObjCProtocol extends BindingType with ObjCMethods, HasLocalScope { @override final Context context; final superProtocols = []; - String? module; final Symbol loaderSymbol; - late final ObjCProtocolGlobal _protocolPointer; + String? _module; + String? get module => _module; + set module(String? value) { + _module = value; + _protocolPointer = ObjCProtocolGlobal( + '_protocol_$originalName', + originalName, + value, + loaderSymbol, + ); + } + late ObjCProtocolGlobal _protocolPointer; late final ObjCInternalGlobal _conformsTo; late final ObjCMsgSendFunc _conformsToMsgSend; final ApiAvailability apiAvailability; @@ -30,7 +40,7 @@ class ObjCProtocol extends BindingType with ObjCMethods, HasLocalScope { super.usr, required String super.originalName, String? name, - this.module, + String? module, super.dartDoc, required this.apiAvailability, required this.context, @@ -46,12 +56,7 @@ class ObjCProtocol extends BindingType with ObjCMethods, HasLocalScope { name ?? originalName, ) { - _protocolPointer = ObjCProtocolGlobal( - '_protocol_$originalName', - originalName, - module, - loaderSymbol, - ); + this.module = module; _conformsTo = context.objCBuiltInFunctions.getSelObject( 'conformsToProtocol:', ); @@ -67,6 +72,7 @@ class ObjCProtocol extends BindingType with ObjCMethods, HasLocalScope { @override bool get isObjCImport => + !(context.config.objectiveC?.generateForPackageObjectiveC ?? false) && context.objCBuiltInFunctions.getBuiltInProtocolName(originalName) != null; bool get unavailable => apiAvailability.availability == Availability.none; @@ -103,7 +109,9 @@ class ObjCProtocol extends BindingType with ObjCMethods, HasLocalScope { final sp = [ protocolBase, - ...superProtocols.map((p) => p.getDartType(context)), + ...superProtocols + .where((p) => p.generateBindings || p.isObjCImport) + .map((p) => p.getDartType(context)), ]; s.write(''' extension type $name._($protocolBase object\$) implements ${sp.join(', ')} { @@ -337,7 +345,7 @@ ${generateInstanceMethodBindings(w, this)} @override BindingString? toObjCBindingString(Writer w) { - if (generateAsStub) return null; + if (generateAsStub || !generateBindings) return null; final mainString = ''' @@ -357,8 +365,16 @@ Protocol* ${loaderSymbol.name}(void) { return @protocol($originalName); } PointerType(objCObjectType).getCType(context); @override - String getDartType(Context context) => - isObjCImport ? '${context.libs.prefix(objcPkgImport)}.$name' : name; + String getDartType(Context context) { + if (isObjCImport) { + context.libs.markUsed(objcPkgImport); + final builtinName = + context.objCBuiltInFunctions.getBuiltInProtocolName(originalName) ?? + originalName; + return '${context.libs.prefix(objcPkgImport)}.$builtinName'; + } + return name; + } @override String getNativeType(Context context, {String varName = ''}) => 'id $varName'; @@ -442,11 +458,13 @@ Protocol* ${loaderSymbol.name}(void) { return @protocol($originalName); } void visitChildren(Visitor visitor, {bool typeGraphOnly = false}) { if (!typeGraphOnly) { super.visitChildren(visitor); - visitor.visit(loaderSymbol); - visitor.visit(_protocolPointer); - visitor.visit(_conformsTo); - visitor.visit(_conformsToMsgSend); - visitMethods(visitor); + if (!generateAsStub) { + visitor.visit(loaderSymbol); + visitor.visit(_protocolPointer); + visitor.visit(_conformsTo); + visitor.visit(_conformsToMsgSend); + visitMethods(visitor); + } visitor.visit(ffiImport); visitor.visit(objcPkgImport); } diff --git a/pkgs/ffigen/lib/src/config_provider/config.dart b/pkgs/ffigen/lib/src/config_provider/config.dart index 1ec3f18482..2fbd76f84f 100644 --- a/pkgs/ffigen/lib/src/config_provider/config.dart +++ b/pkgs/ffigen/lib/src/config_provider/config.dart @@ -28,15 +28,9 @@ final class FfiGenerator { /// Configuration for functions. final Functions functions; - /// Configuration for globals. - final Globals globals; - /// Configuration for integer types. final Integers integers; - /// Configuration for macro constants. - final Macros macros; - /// Configuration for structs. final Structs structs; @@ -54,9 +48,6 @@ final class FfiGenerator { /// Configuration for unions. final Unions unions; - /// Configuration for unnamed enum constants. - final UnnamedEnums unnamedEnums; - /// Objective-C specific configuration. /// /// If `null`, will only generate for C. @@ -94,16 +85,13 @@ final class FfiGenerator { const FfiGenerator({ this.visitors, this.headers = const Headers(), - this.enums = Enums.excludeAll, - this.functions = Functions.excludeAll, - this.globals = Globals.excludeAll, + this.enums = const Enums(), + this.functions = const Functions(), this.integers = const Integers(), - this.macros = Macros.excludeAll, - this.structs = Structs.excludeAll, + this.structs = const Structs(), this.cpp, - this.typedefs = Typedefs.excludeAll, - this.unions = Unions.excludeAll, - this.unnamedEnums = UnnamedEnums.excludeAll, + this.typedefs = const Typedefs(), + this.unions = const Unions(), this.objectiveC, required this.output, @Deprecated( @@ -155,172 +143,14 @@ final class Headers { }); } -/// Configuration for declarations. -final class Declarations { - /// Whether to include the given declaration. - /// - /// ```dart - /// // This includes `Foo`, and nothing else: - /// include: (Declaration decl) => decl.originalName == 'Foo' - /// ``` - final bool Function(Declaration declaration) include; - - /// A function to pass to [include] that excludes all declarations. - static bool excludeAll(Declaration declaration) => false; - - /// A function to pass to [include] that includes all declarations. - static bool includeAll(Declaration declaration) => true; - - /// Returns a function to pass to [include] that includes all declarations - /// whose `originalName`s are in [names]. - static bool Function(Declaration) includeSet(Set names) => - (Declaration decl) => names.contains(decl.originalName); - - /// Whether the member of the declaration should be included. - /// - /// Only used for [Categories], [Interfaces], and [Protocols] methods and - /// properties. For Objective-C methods, this is the method selector, eg - /// `"arrayWithObjects:count:"`. - /// - /// Note that using [includeMember] to include a member of a class doesn't - /// affect whether the class is included. You'll also need to set [include] - /// for the class (this will be fixed in a future version of the API). - /// - /// ```dart - /// // This includes `Foo.bar`, and no other methods of `Foo`: - /// includeMember: (Declaration declaration, String member) => - /// ``` - // TODO(https://github.com/dart-lang/native/issues/2770): Merge with include. - final bool Function(Declaration declaration, String member) includeMember; - - /// A function to pass to [includeMember] that includes all members of all - /// declarations. - static bool includeAllMembers(Declaration declaration, String member) => true; - - /// A function to pass to [includeMember] that includes specific members. - /// - /// The map key is the declaration's `originalName`, and the value is the set - /// of member names to include. If the declaration is not in the map, all its - /// members are included. - static bool Function(Declaration, String) includeMemberSet( - Map> members, - ) => - (Declaration decl, String member) => - members[decl.originalName]?.contains(member) ?? true; - - /// Whether the symbol address should be exposed for this declaration. - /// - /// The address is exposed as an FFI pointer. - final bool Function(Declaration declaration) includeSymbolAddress; - - /// Returns a new name for the declaration, to replace its `originalName`. - /// - /// ```dart - /// // This renames `Foo` to `Bar`, and nothing else: - /// rename: (Declaration decl) => - /// decl.originalName == 'Foo' ? 'Bar' : decl.originalName - /// ``` - final String Function(Declaration declaration) rename; - - /// A function to pass to [rename] that doesn't rename the declaration. - static String useOriginalName(Declaration declaration) => - declaration.originalName; - - /// A function to pass to [rename] that applies a rename map. - /// - /// The key of the map is the declaration's `originalName`, and the value is - /// the new name to use. If the declaration is not in the map, it is not - /// renamed. - static String Function(Declaration) renameWithMap( - Map renames, - ) => - (Declaration declaration) => - renames[declaration.originalName] ?? declaration.originalName; - - /// Returns a new name for the member of the declaration, to replace its - /// `originalName`. - /// - /// Used for struct/union fields, enum elements, function params, and - /// Objective-C interface/protocol/category methods/properties. - /// - /// ```dart - /// // This renames `Foo.bar` to `Foo.baz`, and nothing else: - /// rename: (Declaration decl, String member) { - /// if (decl.originalName == 'Foo' && member == 'baz') { - /// return 'baz'; - /// } - /// return member; - /// } - /// ``` - final String Function(Declaration declaration, String member) renameMember; - - /// A function to pass to [renameMember] that doesn't rename the member. - static String useMemberOriginalName(Declaration declaration, String member) => - member; - - /// A function to pass to [renameMember] that applies a rename map. - /// - /// The key of the map is the declaration's `originalName`, and the value is - /// a map from member name to renamed member name. If the declaration is not - /// in the map, or the member isn't in the declaration's map, the member is - /// not renamed. - static String Function(Declaration, String) renameMemberWithMap( - Map> renames, - ) => - (Declaration declaration, String member) => - renames[declaration.originalName]?[member] ?? member; - - const Declarations({ - this.include = excludeAll, - this.includeMember = includeAllMembers, - this.includeSymbolAddress = excludeAll, - this.rename = useOriginalName, - this.renameMember = useMemberOriginalName, - }); -} - /// Configuration for enum declarations. -final class Enums extends Declarations { - /// The [EnumStyle] to use for the given enum declaration. - /// - /// The `suggestedStyle` is a suggested [EnumStyle] based on the declaration - /// of the enum, if any. For example, Objective-C enums declared using - /// NS_OPTIONS are suggested to use [EnumStyle.intConstants]. - /// - /// ```dart - /// // This uses `intConstants` for `Foo`, and the default style otherwise: - /// style: (Declaration decl, EnumStyle? suggestedStyle) { - /// if (decl.originalName == 'Foo') { - /// return EnumStyle.intConstants; - /// } - /// return suggestedStyle ?? EnumStyle.dartEnum; - /// } - /// ``` - final EnumStyle Function(Declaration declaration, EnumStyle? suggestedStyle) - style; - - static EnumStyle _styleDefault( - Declaration declaration, - EnumStyle? suggestedStyle, - ) => suggestedStyle ?? EnumStyle.dartEnum; - +final class Enums { /// Whether to silence warning for enum integer type mimicking. final bool silenceWarning; const Enums({ - super.include, - super.rename, - super.renameMember, - this.style = _styleDefault, this.silenceWarning = false, }); - - static const excludeAll = Enums(include: Declarations.excludeAll); - - static const includeAll = Enums(include: Declarations.includeAll); - - static Enums includeSet(Set names) => - Enums(include: Declarations.includeSet(names)); } /// Configuration for how to generate enums. @@ -335,29 +165,7 @@ enum EnumStyle { } /// Configuration for function declarations. -final class Functions extends Declarations { - /// Whether to generate a typedef for a given function's native type. - final bool Function(Declaration declaration) includeTypedef; - - static bool _includeTypedefDefault(Declaration declaration) => false; - - /// Whether the given function is a leaf function. - /// - /// This corresponds to the `isLeaf` parameter of FFI's `lookupFunction`. - /// For more details, its documentation is here: - /// https://api.dart.dev/dart-ffi/DynamicLibraryExtension/lookupFunction.html - final bool Function(Declaration declaration) isLeaf; - - static bool _isLeafDefault(Declaration declaration) => false; - - /// Whether to add the `@RecordUse()` annotation to the given function. - /// - /// Experimental: The record uses feature needs to be enabled as experiment. - @experimental - final bool Function(Declaration declaration) recordUse; - - static bool _recordUseDefault(Declaration declaration) => false; - +final class Functions { /// Map from function's original name to [VarArgFunction]s. /// /// Dart doesn't support variadic functions. Instead, variadic functions are @@ -367,34 +175,8 @@ final class Functions extends Declarations { final Map> varArgs; const Functions({ - super.include, - super.includeSymbolAddress, - super.rename, - super.renameMember, - this.includeTypedef = _includeTypedefDefault, - this.isLeaf = _isLeafDefault, - this.recordUse = _recordUseDefault, this.varArgs = const >{}, }); - - static const excludeAll = Functions(include: Declarations.excludeAll); - - static const includeAll = Functions(include: Declarations.includeAll); - - static Functions includeSet(Set names) => - Functions(include: Declarations.includeSet(names)); -} - -/// Configuration for globals. -final class Globals extends Declarations { - const Globals({super.rename, super.include, super.includeSymbolAddress}); - - static const excludeAll = Globals(include: Declarations.excludeAll); - - static const includeAll = Globals(include: Declarations.includeAll); - - static Globals includeSet(Set names) => - Globals(include: Declarations.includeSet(names)); } /// Configuration for integer types. @@ -416,20 +198,8 @@ final class Integers { }); } -/// Configuration for macros. -final class Macros extends Declarations { - const Macros({super.rename, super.include}); - - static const excludeAll = Macros(include: Declarations.excludeAll); - - static const includeAll = Macros(include: Declarations.includeAll); - - static Macros includeSet(Set names) => - Macros(include: Declarations.includeSet(names)); -} - /// Configuration for struct declarations. -final class Structs extends Declarations { +final class Structs { /// Whether structs that are dependencies should be included. final CompoundDependencies dependencies; @@ -441,34 +211,18 @@ final class Structs extends Declarations { ) final List imported; - /// Whether, and how, to override struct packing for the given struct. - final PackingValue? Function(Declaration declaration) packingOverride; - - static PackingValue? _packingOverrideDefault(Declaration declaration) => null; - const Structs({ - super.include, - super.rename, - super.renameMember, this.dependencies = CompoundDependencies.opaque, @Deprecated( 'This field will change type. See ' 'https://github.com/dart-lang/native/issues/2595.', ) this.imported = const [], - this.packingOverride = _packingOverrideDefault, }); - - static const excludeAll = Structs(include: Declarations.excludeAll); - - static const includeAll = Structs(include: Declarations.includeAll); - - static Structs includeSet(Set names) => - Structs(include: Declarations.includeSet(names)); } /// Configuration for typedefs. -final class Typedefs extends Declarations { +final class Typedefs { /// Typedefs imported from other Dart files. @Deprecated( 'This field will change type. See ' @@ -483,8 +237,6 @@ final class Typedefs extends Declarations { final bool useSupportedTypedefs; const Typedefs({ - super.rename, - super.include, @Deprecated( 'This field will change type. See ' 'https://github.com/dart-lang/native/issues/2595.', @@ -493,36 +245,15 @@ final class Typedefs extends Declarations { this.includeUnused = false, this.useSupportedTypedefs = true, }); - - static const Typedefs excludeAll = Typedefs(include: Declarations.excludeAll); - - static const Typedefs includeAll = Typedefs(include: Declarations.includeAll); - - static Typedefs includeSet(Set names) => - Typedefs(include: Declarations.includeSet(names)); -} - -/// Configuration for C++ class declarations. -final class CppClasses extends Declarations { - const CppClasses({super.include, super.rename, super.renameMember}); - - static const excludeAll = CppClasses(include: Declarations.excludeAll); - static const includeAll = CppClasses(include: Declarations.includeAll); - - static CppClasses includeSet(Set names) => - CppClasses(include: Declarations.includeSet(names)); } /// Configuration for C++. final class Cpp { - /// Declaration filters for C++ classes. - final CppClasses classes; - - const Cpp({this.classes = CppClasses.excludeAll}); + const Cpp(); } /// Configuration for union declarations. -final class Unions extends Declarations { +final class Unions { /// Whether unions that are dependencies should be included. final CompoundDependencies dependencies; @@ -534,9 +265,6 @@ final class Unions extends Declarations { final List imported; const Unions({ - super.include, - super.rename, - super.renameMember, this.dependencies = CompoundDependencies.opaque, @Deprecated( 'This field will change type. See ' @@ -544,25 +272,6 @@ final class Unions extends Declarations { ) this.imported = const [], }); - - static const excludeAll = Unions(include: Declarations.excludeAll); - - static const includeAll = Unions(include: Declarations.includeAll); - - static Unions includeSet(Set names) => - Unions(include: Declarations.includeSet(names)); -} - -/// Configuration for unnamed enum constants. -final class UnnamedEnums extends Declarations { - const UnnamedEnums({super.include, super.rename, super.renameMember}); - - static const excludeAll = UnnamedEnums(include: Declarations.excludeAll); - - static const includeAll = UnnamedEnums(include: Declarations.includeAll); - - static UnnamedEnums includeSet(Set names) => - UnnamedEnums(include: Declarations.includeSet(names)); } /// Configuration for Objective-C. @@ -589,9 +298,9 @@ final class ObjectiveC { final ExternalVersions externalVersions; const ObjectiveC({ - this.categories = Categories.excludeAll, - this.interfaces = Interfaces.excludeAll, - this.protocols = Protocols.excludeAll, + this.categories = const Categories(), + this.interfaces = const Interfaces(), + this.protocols = const Protocols(), this.externalVersions = const ExternalVersions(), @Deprecated('Only for internal use.') this.generateForPackageObjectiveC = false, @@ -599,7 +308,7 @@ final class ObjectiveC { } /// Configuration for Objective-C categories. -final class Categories extends Declarations { +final class Categories { /// If enabled, Objective-C categories that are not explicitly included by /// the [Declarations], but extend interfaces that are included, /// will be code-genned as if they were included. If disabled, these @@ -607,82 +316,34 @@ final class Categories extends Declarations { final bool includeTransitive; const Categories({ - super.include, - super.includeMember, - super.rename, - super.renameMember, this.includeTransitive = true, }); - - static const excludeAll = Categories( - include: Declarations.excludeAll, - includeTransitive: false, - ); - - static const includeAll = Categories(include: Declarations.includeAll); - - static Categories includeSet(Set names) => - Categories(include: Declarations.includeSet(names)); } /// Configuration for Objective-C interfaces. -final class Interfaces extends Declarations { +final class Interfaces { /// If enabled, Objective-C interfaces that are not explicitly included by /// the [Declarations], but are transitively included by other bindings, /// will be code-genned as if they were included. If disabled, these /// transitively included interfaces will be generated as stubs instead. final bool includeTransitive; - /// The module that the Objective-C interface belongs to. - final String? Function(Declaration declaration) module; - const Interfaces({ - super.include, - super.includeMember, - super.rename, - super.renameMember, this.includeTransitive = false, - this.module = noModule, }); - - static const excludeAll = Interfaces(include: Declarations.excludeAll); - - static const includeAll = Interfaces(include: Declarations.includeAll); - - static Interfaces includeSet(Set names) => - Interfaces(include: Declarations.includeSet(names)); - - static String? noModule(Declaration declaration) => null; } /// Configuration for Objective-C protocols. -final class Protocols extends Declarations { +final class Protocols { /// If enabled, Objective-C protocols that are not explicitly included by /// the [Declarations], but are transitively included by other bindings, /// will be code-genned as if they were included. If disabled, these /// transitively included protocols will not be generated at all. final bool includeTransitive; - /// The module that the Objective-C protocol belongs to. - final String? Function(Declaration declaration) module; - const Protocols({ - super.include, - super.includeMember, - super.rename, - super.renameMember, this.includeTransitive = false, - this.module = noModule, }); - - static const excludeAll = Protocols(include: Declarations.excludeAll); - - static const includeAll = Protocols(include: Declarations.includeAll); - - static Protocols includeSet(Set names) => - Protocols(include: Declarations.includeSet(names)); - - static String? noModule(Declaration declaration) => null; } /// Configuration for outputting bindings. diff --git a/pkgs/ffigen/lib/src/config_provider/config_types.dart b/pkgs/ffigen/lib/src/config_provider/config_types.dart index 11a8b7397a..6ec968487f 100644 --- a/pkgs/ffigen/lib/src/config_provider/config_types.dart +++ b/pkgs/ffigen/lib/src/config_provider/config_types.dart @@ -127,34 +127,29 @@ final class YamlDeclarationFilters { _memberIncluder = memberIncluder ?? YamlMemberIncluder(); /// Applies renaming and returns the result. - String rename(Declaration declaration) => - _renamer.rename(declaration.originalName); + String rename(String name) => _renamer.rename(name); /// Applies member renaming and returns the result. - String renameMember(Declaration declaration, String member) => - _memberRenamer.rename(declaration.originalName, member); + String renameMember(String name, String member) => + _memberRenamer.rename(name, member); /// Checks if a name is allowed by a filter. - bool shouldInclude(Declaration declaration) => - _includer.shouldInclude(declaration.originalName, excludeAllByDefault); + bool shouldInclude(String name) => + _includer.shouldInclude(name, excludeAllByDefault); + + /// Checks if a name is explicitly included by an include pattern. + bool isExplicitlyIncluded(String name) => _includer.isExplicitlyIncluded(name); + + /// Checks if a name is explicitly excluded by an exclude pattern. + bool isExplicitlyExcluded(String name) => _includer.isExplicitlyExcluded(name); /// Checks if the symbol address should be included for this name. - bool shouldIncludeSymbolAddress(Declaration declaration) => - _symbolAddressIncluder.shouldInclude(declaration.originalName); + bool shouldIncludeSymbolAddress(String name) => + _symbolAddressIncluder.shouldInclude(name); /// Checks if a member is allowed by a filter. - bool shouldIncludeMember(Declaration declaration, String member) => - _memberIncluder.shouldInclude(declaration.originalName, member); - - Declarations configAdapter() { - return Declarations( - include: shouldInclude, - includeSymbolAddress: shouldIncludeSymbolAddress, - includeMember: shouldIncludeMember, - rename: rename, - renameMember: renameMember, - ); - } + bool shouldIncludeMember(String name, String member) => + _memberIncluder.shouldInclude(name, member, false); } /// Matches `$`, value can be accessed in group 1 of match. @@ -252,6 +247,9 @@ class YamlIncluder { // Otherwise, fall back to the default behavior for empty filters. return !excludeAllByDefault; } + + bool isExplicitlyIncluded(String name) => _include.matches(name); + bool isExplicitlyExcluded(String name) => _exclude.matches(name); } /// Handles `full/regexp` renaming logic. diff --git a/pkgs/ffigen/lib/src/config_provider/yaml_config.dart b/pkgs/ffigen/lib/src/config_provider/yaml_config.dart index f63ee2ff22..518d20fb78 100644 --- a/pkgs/ffigen/lib/src/config_provider/yaml_config.dart +++ b/pkgs/ffigen/lib/src/config_provider/yaml_config.dart @@ -12,6 +12,7 @@ import 'package:package_config/package_config_types.dart'; import 'package:yaml/yaml.dart'; import '../code_generator.dart'; +import '../public_ast/public_ast.dart' as public_ast; import '../strings.dart' as strings; import 'config.dart'; import 'config_spec.dart'; @@ -1226,122 +1227,400 @@ final class YamlConfig { ); } - FfiGenerator configAdapter() => FfiGenerator( - headers: Headers( - compilerOptions: compilerOpts, - entryPoints: entryPoints, - include: shouldIncludeHeader, - ignoreSourceErrors: ignoreSourceErrors, - ), - output: Output( - dartFile: output, - objectiveCFile: outputObjC, - symbolFile: symbolFile, - commentType: commentType, - preamble: preamble, - format: formatOutput, - style: ffiNativeConfig.enabled - ? NativeExternalBindings(assetId: ffiNativeConfig.assetId) - : DynamicLibraryBindings( - wrapperName: wrapperName, - wrapperDocComment: wrapperDocComment, - ), - ), - functions: Functions( - include: functionDecl.shouldInclude, - includeSymbolAddress: functionDecl.shouldIncludeSymbolAddress, - rename: functionDecl.rename, - renameMember: functionDecl.renameMember, - varArgs: varArgFunctions, - includeTypedef: shouldExposeFunctionTypedef, - isLeaf: isLeafFunction, - ), - structs: Structs( - include: _structDecl.shouldInclude, - rename: _structDecl.rename, - renameMember: _structDecl.renameMember, - dependencies: _structDependencies, - packingOverride: (decl) => - _structPackingOverride.getOverridenPackValue(decl.originalName), + FfiGenerator configAdapter() { + final yamlVisitor = YamlConfigAstVisitor( + functionDecl: _functionDecl, + structDecl: _structDecl, + unionDecl: _unionDecl, + enumClassDecl: _enumClassDecl, + unnamedEnumConstants: _unnamedEnumConstants, + globals: _globals, + macroDecl: _macroDecl, + typedefs: _typedefs, + objcInterfaces: _objcInterfaces, + objcProtocols: _objcProtocols, + objcCategories: _objcCategories, + exposeFunctionTypedefs: _exposeFunctionTypedefs, + leafFunctions: _leafFunctions, + enumsAsInt: _enumsAsInt, + structPackingOverride: _structPackingOverride, + objcInterfaceModules: _objcInterfaceModules, + objcProtocolModules: _objcProtocolModules, + ); + + return FfiGenerator( + visitors: [yamlVisitor], + headers: Headers( + compilerOptions: compilerOpts, + entryPoints: entryPoints, + include: shouldIncludeHeader, + ignoreSourceErrors: ignoreSourceErrors, + ), + output: Output( + dartFile: output, + objectiveCFile: outputObjC, + symbolFile: symbolFile, + commentType: commentType, + preamble: preamble, + format: formatOutput, + style: ffiNativeConfig.enabled + ? NativeExternalBindings(assetId: ffiNativeConfig.assetId) + : DynamicLibraryBindings( + wrapperName: wrapperName, + wrapperDocComment: wrapperDocComment, + ), + ), + functions: Functions( + varArgs: varArgFunctions, + ), + structs: Structs( + dependencies: _structDependencies, + // ignore: deprecated_member_use_from_same_package + imported: structTypeMappings.values.toList(), + ), + enums: Enums( + silenceWarning: silenceEnumWarning, + ), + unions: Unions( + dependencies: _unionDependencies, + // ignore: deprecated_member_use_from_same_package + imported: unionTypeMappings.values.toList(), + ), + typedefs: Typedefs( + useSupportedTypedefs: useSupportedTypedefs, + includeUnused: includeUnusedTypedefs, + // ignore: deprecated_member_use_from_same_package + imported: typedefTypeMappings.values.toList(), + ), + objectiveC: language == Language.objc + ? ObjectiveC( + interfaces: Interfaces( + includeTransitive: includeTransitiveObjCInterfaces, + ), + protocols: Protocols( + includeTransitive: includeTransitiveObjCProtocols, + ), + categories: Categories( + includeTransitive: includeTransitiveObjCCategories, + ), + externalVersions: externalVersions, + // ignore: deprecated_member_use_from_same_package + generateForPackageObjectiveC: generateForPackageObjectiveC, + ) + : null, // ignore: deprecated_member_use_from_same_package - imported: structTypeMappings.values.toList(), - ), - enums: Enums( - include: _enumClassDecl.shouldInclude, - rename: _enumClassDecl.rename, - renameMember: _enumClassDecl.renameMember, - silenceWarning: silenceEnumWarning, - style: (e, suggestedStyle) { - if (suggestedStyle != null) return suggestedStyle; - return switch (enumShouldBeInt(e)) { - true => EnumStyle.intConstants, - false => EnumStyle.dartEnum, - }; - }, - ), - unions: Unions( - include: _unionDecl.shouldInclude, - rename: _unionDecl.rename, - renameMember: _unionDecl.renameMember, - dependencies: _unionDependencies, + libraryImports: libraryImports.values.toList(), // ignore: deprecated_member_use_from_same_package - imported: unionTypeMappings.values.toList(), - ), - unnamedEnums: UnnamedEnums( - include: _unnamedEnumConstants.shouldInclude, - rename: _unnamedEnumConstants.rename, - ), - globals: Globals( - include: globals.shouldInclude, - includeSymbolAddress: globals.shouldIncludeSymbolAddress, - rename: globals.rename, - ), - macros: Macros(include: macroDecl.shouldInclude, rename: macroDecl.rename), - typedefs: Typedefs( - include: typedefs.shouldInclude, - rename: typedefs.rename, - useSupportedTypedefs: useSupportedTypedefs, - includeUnused: includeUnusedTypedefs, + importedTypesByUsr: usrTypeMappings, // ignore: deprecated_member_use_from_same_package - imported: typedefTypeMappings.values.toList(), - ), - objectiveC: language == Language.objc - ? ObjectiveC( - interfaces: Interfaces( - include: objcInterfaces.shouldInclude, - includeMember: objcInterfaces.shouldIncludeMember, - rename: objcInterfaces.rename, - renameMember: objcInterfaces.renameMember, - includeTransitive: includeTransitiveObjCInterfaces, - module: interfaceModule, - ), - protocols: Protocols( - include: objcProtocols.shouldInclude, - includeMember: objcProtocols.shouldIncludeMember, - rename: objcProtocols.rename, - renameMember: objcProtocols.renameMember, - includeTransitive: includeTransitiveObjCProtocols, - module: protocolModule, - ), - categories: Categories( - include: objcCategories.shouldInclude, - includeMember: objcCategories.shouldIncludeMember, - rename: objcCategories.rename, - renameMember: objcCategories.renameMember, - includeTransitive: includeTransitiveObjCCategories, - ), - externalVersions: externalVersions, - // ignore: deprecated_member_use_from_same_package - generateForPackageObjectiveC: generateForPackageObjectiveC, - ) - : null, - // ignore: deprecated_member_use_from_same_package - libraryImports: libraryImports.values.toList(), - // ignore: deprecated_member_use_from_same_package - importedTypesByUsr: usrTypeMappings, - // ignore: deprecated_member_use_from_same_package - integers: Integers(imported: nativeTypeMappings.values.toList()), - // ignore: deprecated_member_use_from_same_package - libclangDylib: libclangDylib, - ); + integers: Integers(imported: nativeTypeMappings.values.toList()), + // ignore: deprecated_member_use_from_same_package + libclangDylib: libclangDylib, + ); + } +} + +final class YamlConfigAstVisitor extends public_ast.Visitor { + final YamlDeclarationFilters _functionDecl; + final YamlDeclarationFilters _structDecl; + final YamlDeclarationFilters _unionDecl; + final YamlDeclarationFilters _enumClassDecl; + final YamlDeclarationFilters _unnamedEnumConstants; + final YamlDeclarationFilters _globals; + final YamlDeclarationFilters _macroDecl; + final YamlDeclarationFilters _typedefs; + final YamlDeclarationFilters _objcInterfaces; + final YamlDeclarationFilters _objcProtocols; + final YamlDeclarationFilters _objcCategories; + final YamlIncluder _exposeFunctionTypedefs; + final YamlIncluder _leafFunctions; + final YamlIncluder _enumsAsInt; + final StructPackingOverride _structPackingOverride; + final ObjCModules _objcInterfaceModules; + final ObjCModules _objcProtocolModules; + + YamlConfigAstVisitor({ + required YamlDeclarationFilters functionDecl, + required YamlDeclarationFilters structDecl, + required YamlDeclarationFilters unionDecl, + required YamlDeclarationFilters enumClassDecl, + required YamlDeclarationFilters unnamedEnumConstants, + required YamlDeclarationFilters globals, + required YamlDeclarationFilters macroDecl, + required YamlDeclarationFilters typedefs, + required YamlDeclarationFilters objcInterfaces, + required YamlDeclarationFilters objcProtocols, + required YamlDeclarationFilters objcCategories, + required YamlIncluder exposeFunctionTypedefs, + required YamlIncluder leafFunctions, + required YamlIncluder enumsAsInt, + required StructPackingOverride structPackingOverride, + required ObjCModules objcInterfaceModules, + required ObjCModules objcProtocolModules, + }) : _functionDecl = functionDecl, + _structDecl = structDecl, + _unionDecl = unionDecl, + _enumClassDecl = enumClassDecl, + _unnamedEnumConstants = unnamedEnumConstants, + _globals = globals, + _macroDecl = macroDecl, + _typedefs = typedefs, + _objcInterfaces = objcInterfaces, + _objcProtocols = objcProtocols, + _objcCategories = objcCategories, + _exposeFunctionTypedefs = exposeFunctionTypedefs, + _leafFunctions = leafFunctions, + _enumsAsInt = enumsAsInt, + _structPackingOverride = structPackingOverride, + _objcInterfaceModules = objcInterfaceModules, + _objcProtocolModules = objcProtocolModules; + + void _applyInclusion(public_ast.Decl node, YamlDeclarationFilters decl) { + if (decl.isExplicitlyIncluded(node.originalName)) { + node.isExcluded = false; + } else if (decl.isExplicitlyExcluded(node.originalName)) { + node.isExcluded = true; + } else if (decl.excludeAllByDefault) { + node.isExcluded = true; + } else { + node.isExcluded = false; + } + } + + @override + void visitStruct(public_ast.Struct node) { + _applyInclusion(node, _structDecl); + final renamed = _structDecl.rename(node.originalName); + if (renamed != node.originalName) { + node.name = renamed; + } + final pack = _structPackingOverride.getOverridenPackValue(node.originalName); + if (pack != null) { + node.pack = pack.value; + } + for (final field in node.fields) { + if (!_structDecl.shouldIncludeMember( + node.originalName, field.originalName)) { + field.isExcluded = true; + } else { + final fieldRenamed = _structDecl.renameMember( + node.originalName, + field.originalName, + ); + if (fieldRenamed != field.originalName) { + field.name = fieldRenamed; + } + } + } + } + + @override + void visitUnion(public_ast.Union node) { + _applyInclusion(node, _unionDecl); + final renamed = _unionDecl.rename(node.originalName); + if (renamed != node.originalName) { + node.name = renamed; + } + for (final field in node.fields) { + if (!_unionDecl.shouldIncludeMember( + node.originalName, field.originalName)) { + field.isExcluded = true; + } else { + final fieldRenamed = _unionDecl.renameMember( + node.originalName, + field.originalName, + ); + if (fieldRenamed != field.originalName) { + field.name = fieldRenamed; + } + } + } + } + + @override + void visitEnum(public_ast.EnumClass node) { + if (node.originalName.isEmpty) return; + _applyInclusion(node, _enumClassDecl); + final renamed = _enumClassDecl.rename(node.originalName); + if (renamed != node.originalName) { + node.name = renamed; + } + if (_enumsAsInt.shouldInclude(node.originalName)) { + node.style = EnumStyle.intConstants; + } + for (final constant in node.constants) { + if (constant.originalName != null && + !_enumClassDecl.shouldIncludeMember( + node.originalName, constant.originalName!)) { + constant.isExcluded = true; + } else if (constant.originalName != null) { + final constantRenamed = _enumClassDecl.renameMember( + node.originalName, + constant.originalName!, + ); + if (constantRenamed != constant.originalName) { + constant.name = constantRenamed; + } + } + } + } + + @override + void visitUnnamedEnumConstant(public_ast.UnnamedEnumConstant node) { + _applyInclusion(node, _unnamedEnumConstants); + final renamed = _unnamedEnumConstants.rename(node.originalName); + if (renamed != node.originalName) { + node.name = renamed; + } + } + + @override + void visitFunc(public_ast.Func node) { + _applyInclusion(node, _functionDecl); + final renamed = _functionDecl.rename(node.originalName); + if (renamed != node.originalName) { + node.name = renamed; + } + if (_functionDecl.shouldIncludeSymbolAddress(node.originalName)) { + node.exposeSymbolAddress = true; + } + if (_exposeFunctionTypedefs.shouldInclude(node.originalName)) { + node.exposeFunctionTypedefs = true; + } + if (_leafFunctions.shouldInclude(node.originalName)) { + node.isLeaf = true; + } + for (final p in node.parameters) { + final pRenamed = _functionDecl.renameMember( + node.originalName, + p.originalName, + ); + if (pRenamed != p.originalName) { + p.name = pRenamed; + } + } + } + + @override + void visitGlobal(public_ast.Global node) { + _applyInclusion(node, _globals); + final renamed = _globals.rename(node.originalName); + if (renamed != node.originalName) { + node.name = renamed; + } + if (_globals.shouldIncludeSymbolAddress(node.originalName)) { + node.exposeSymbolAddress = true; + } + } + + @override + void visitMacroConstant(public_ast.MacroConstant node) { + _applyInclusion(node, _macroDecl); + final renamed = _macroDecl.rename(node.originalName); + if (renamed != node.originalName) { + node.name = renamed; + } + } + + @override + void visitTypealias(public_ast.Typealias node) { + _applyInclusion(node, _typedefs); + final renamed = _typedefs.rename(node.originalName); + if (renamed != node.originalName) { + node.name = renamed; + } + } + + @override + void visitObjCInterface(public_ast.ObjCInterface node) { + _applyInclusion(node, _objcInterfaces); + final renamed = _objcInterfaces.rename(node.originalName); + if (renamed != node.originalName) { + node.name = renamed; + } + final mod = _objcInterfaceModules.getModule(node.originalName); + if (mod != null) node.module = mod; + for (final method in node.methods) { + if (!_objcInterfaces.shouldIncludeMember( + node.originalName, method.originalName)) { + method.isExcluded = true; + } else { + final methodRenamed = _objcInterfaces.renameMember( + node.originalName, + method.originalName, + ); + if (methodRenamed != method.originalName) { + _renameObjCMethod(method, methodRenamed); + } + } + } + } + + void _renameObjCMethod(public_ast.ObjCMethod method, String methodRenamed) { + final chunks = methodRenamed.split(':'); + if (chunks.length == method.parameters.length + 1 && + (chunks.length == 1 || chunks.last.isEmpty)) { + method.name = chunks.first; + for (var i = 1; i < method.parameters.length; i++) { + method.parameters[i].name = chunks[i]; + } + } else { + method.name = methodRenamed.replaceAll(':', '_'); + for (var i = 1; i < method.parameters.length; i++) { + method.parameters[i].name = method.parameters[i].originalName; + } + } + } + + @override + void visitObjCProtocol(public_ast.ObjCProtocol node) { + _applyInclusion(node, _objcProtocols); + final renamed = _objcProtocols.rename(node.originalName); + if (renamed != node.originalName) { + node.name = renamed; + } + final mod = _objcProtocolModules.getModule(node.originalName); + if (mod != null) node.module = mod; + for (final method in node.methods) { + if (!_objcProtocols.shouldIncludeMember( + node.originalName, method.originalName)) { + method.isExcluded = true; + } else { + final methodRenamed = _objcProtocols.renameMember( + node.originalName, + method.originalName, + ); + if (methodRenamed != method.originalName) { + _renameObjCMethod(method, methodRenamed); + } + } + } + } + + @override + void visitObjCCategory(public_ast.ObjCCategory node) { + if (node.originalName.isEmpty) return; + _applyInclusion(node, _objcCategories); + final renamed = _objcCategories.rename(node.originalName); + if (renamed != node.originalName) { + node.name = renamed; + } + for (final method in node.methods) { + if (!_objcCategories.shouldIncludeMember( + node.originalName, method.originalName)) { + method.isExcluded = true; + } else { + final methodRenamed = _objcCategories.renameMember( + node.originalName, + method.originalName, + ); + if (methodRenamed != method.originalName) { + _renameObjCMethod(method, methodRenamed); + } + } + } + } + + @override + void visitCppClass(public_ast.CppClass node) {} } diff --git a/pkgs/ffigen/lib/src/header_parser/parser.dart b/pkgs/ffigen/lib/src/header_parser/parser.dart index f2dfd337c0..f983ee5513 100644 --- a/pkgs/ffigen/lib/src/header_parser/parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/parser.dart @@ -179,7 +179,6 @@ List transformBindings(List rawBindings, Context context) { // Execute Public AST visitors. final publicAst = public_ast.PublicAst.fromBindings(allBindings.toList()); - publicAst.accept(public_ast.LegacyCallbacksVisitor(config)); for (final v in config.visitors ?? const []) { publicAst.accept(v); } @@ -215,12 +214,12 @@ List transformBindings(List rawBindings, Context context) { final semiFinalBindings = visit( context, ListBindingsVisitation(config, included, transitives, directTransitives), - included, + included.union(transitives), ).bindings; final finalBindings = visit( context, FillMethodDependenciesVisitation(context, semiFinalBindings), - semiFinalBindings, + semiFinalBindings.union(indirectlyIncluded), ).finalBindings; visit(context, MarkBindingsVisitation(finalBindings), allBindings); visit(context, MarkImportsVisitation(context), finalBindings); @@ -239,17 +238,6 @@ List transformBindings(List rawBindings, Context context) { _warnIfPrivateDeclaration(b, context.logger); } - // Override pack values according to config. We do this after declaration - // conflicts have been handled so that users can target the generated names. - for (final b in finalBindingsList) { - if (b is Struct) { - final pack = config.structs.packingOverride(b); - if (pack != null) { - b.pack = pack.value; - } - } - } - return finalBindingsList; } diff --git a/pkgs/ffigen/lib/src/header_parser/sub_parsers/classdecl_parser.dart b/pkgs/ffigen/lib/src/header_parser/sub_parsers/classdecl_parser.dart index 64d9f92041..06b0bb59b1 100644 --- a/pkgs/ffigen/lib/src/header_parser/sub_parsers/classdecl_parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/sub_parsers/classdecl_parser.dart @@ -4,7 +4,6 @@ import '../../code_generator.dart'; import '../../code_generator/scope.dart'; -import '../../config_provider/config_types.dart'; import '../../context.dart'; import '../clang_bindings/clang_bindings.dart' as clang_types; import '../utils.dart'; @@ -17,8 +16,7 @@ CppClass? parseClassDeclaration(Context context, clang_types.CXCursor cursor) { final logger = context.logger; // If C++ support is not configured, skip all C++ class cursors immediately. - final cppClasses = config.cpp?.classes; - if (cppClasses == null) return null; + if (config.cpp == null) return null; final usr = cursor.usr(); @@ -47,8 +45,6 @@ CppClass? parseClassDeclaration(Context context, clang_types.CXCursor cursor) { return null; } - final decl = Declaration(usr: usr, originalName: className); - logger.fine( '++++ Adding C++ Class: Name: $className, ${cursor.completeStringRepr()}', ); @@ -58,9 +54,9 @@ CppClass? parseClassDeclaration(Context context, clang_types.CXCursor cursor) { cursor.visitChildren((child) { final kind = clang.clang_getCursorKind(child); if (kind == clang_types.CXCursorKind.CXCursor_CXXMethod) { - _parseAnyMethod(context, child, decl, methods, CppMethodKind.method); + _parseAnyMethod(context, child, className, methods, CppMethodKind.method); } else if (kind == clang_types.CXCursorKind.CXCursor_Constructor) { - _parseAnyMethod(context, child, decl, methods, CppMethodKind.constructor); + _parseAnyMethod(context, child, className, methods, CppMethodKind.constructor); } }); @@ -72,7 +68,7 @@ CppClass? parseClassDeclaration(Context context, clang_types.CXCursor cursor) { availability: apiAvailability.dartDoc, ), originalName: className, - name: cppClasses.rename(decl), + name: className, context: context, methods: methods, fields: [], @@ -86,7 +82,7 @@ CppClass? parseClassDeclaration(Context context, clang_types.CXCursor cursor) { void _parseAnyMethod( Context context, clang_types.CXCursor cursor, - Declaration classDecl, + String className, List methods, CppMethodKind kind, ) { @@ -99,7 +95,7 @@ void _parseAnyMethod( kind == CppMethodKind.method && clang.clang_CXXMethod_isConst(cursor) != 0; - final parameters = _parseParameters(context, cursor, classDecl); + final parameters = _parseParameters(context, cursor); if (parameters == null) { logger.fine( ' ---- Skipping method $methodName due to unsupported parameter type', @@ -107,7 +103,6 @@ void _parseAnyMethod( return; } - final className = context.config.cpp!.classes.rename(classDecl); final symbol = switch (kind) { CppMethodKind.constructor => '${className}_new', CppMethodKind.method => '${className}_$methodName', @@ -132,7 +127,6 @@ void _parseAnyMethod( List? _parseParameters( Context context, clang_types.CXCursor cursor, - Declaration classDecl, ) { final logger = context.logger; var i = 0; diff --git a/pkgs/ffigen/lib/src/header_parser/sub_parsers/compounddecl_parser.dart b/pkgs/ffigen/lib/src/header_parser/sub_parsers/compounddecl_parser.dart index 23e01f33b1..16b5d21271 100644 --- a/pkgs/ffigen/lib/src/header_parser/sub_parsers/compounddecl_parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/sub_parsers/compounddecl_parser.dart @@ -3,8 +3,6 @@ // BSD-style license that can be found in the LICENSE file. import '../../code_generator.dart'; -import '../../config_provider/config.dart'; -import '../../config_provider/config_types.dart'; import '../../context.dart'; import '../../strings.dart' as strings; import '../clang_bindings/clang_bindings.dart' as clang_types; @@ -18,7 +16,6 @@ Compound? parseStructDeclaration( cursor, context, 'Struct', - context.config.structs, Struct.new, ); @@ -27,7 +24,6 @@ Compound? parseUnionDeclaration(clang_types.CXCursor cursor, Context context) => cursor, context, 'Union', - context.config.unions, Union.new, ); @@ -71,9 +67,6 @@ class _ParsedCompound { return maxChildAlignment > alignment; } - Declarations get compoundConfig => - compound is Struct ? context.config.structs : context.config.unions; - /// Returns pack value of a struct depending on config, returns null for no /// packing. int? get packValue { @@ -98,7 +91,6 @@ Compound? _parseCompoundDeclaration( clang_types.CXCursor cursor, Context context, String className, - Declarations configDecl, Compound Function({ String? usr, String? originalName, @@ -136,7 +128,6 @@ Compound? _parseCompoundDeclaration( return null; } - final decl = Declaration(usr: usr, originalName: declName); final Compound compound; if (declName.isEmpty) { cursor = context.cursorIndex.getDefinition(cursor); @@ -160,7 +151,7 @@ Compound? _parseCompoundDeclaration( compound = constructor( usr: usr, originalName: declName, - name: configDecl.rename(decl), + name: declName, dartDoc: getCursorDocComment( context, cursor, @@ -271,11 +262,6 @@ void _compoundMembersVisitor( _ParsedCompound parsed, ) { final context = parsed.context; - final compoundConf = parsed.compoundConfig; - final decl = Declaration( - usr: parsed.compound.usr, - originalName: parsed.compound.originalName, - ); try { switch (cursor.kind) { case clang_types.CXCursorKind.CXCursor_FieldDecl: @@ -315,7 +301,7 @@ void _compoundMembersVisitor( indent: nesting.length + commentPrefix.length, ), originalName: cursor.spelling(), - name: compoundConf.renameMember(decl, cursor.spelling()), + name: cursor.spelling(), type: mt, ), ); @@ -350,7 +336,7 @@ void _compoundMembersVisitor( indent: nesting.length + commentPrefix.length, ), originalName: spelling, - name: compoundConf.renameMember(decl, spelling), + name: spelling, type: mt, ), ); diff --git a/pkgs/ffigen/lib/src/header_parser/sub_parsers/enumdecl_parser.dart b/pkgs/ffigen/lib/src/header_parser/sub_parsers/enumdecl_parser.dart index ffd58fa9c5..7db69fbf08 100644 --- a/pkgs/ffigen/lib/src/header_parser/sub_parsers/enumdecl_parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/sub_parsers/enumdecl_parser.dart @@ -14,7 +14,6 @@ import 'unnamed_enumdecl_parser.dart'; /// Parses an enum declaration. EnumClass parseEnumDeclaration(clang_types.CXCursor cursor, Context context) { - final config = context.config; final logger = context.logger; EnumClass? enumClass; // Parse the cursor definition instead, if this is a forward declaration. @@ -55,7 +54,6 @@ EnumClass parseEnumDeclaration(clang_types.CXCursor cursor, Context context) { .where((c) => c.rawValue.startsWith('-')) .isNotEmpty; } else { - final decl = Declaration(usr: usr, originalName: enumName); logger.fine('++++ Adding Enum: ${cursor.completeStringRepr()}'); enumClass = EnumClass( usr: usr, @@ -65,7 +63,7 @@ EnumClass parseEnumDeclaration(clang_types.CXCursor cursor, Context context) { availability: apiAvailability.dartDoc, ), originalName: enumName, - name: config.enums.rename(decl), + name: enumName, nativeType: nativeType, context: context, apiAvailability: apiAvailability, @@ -84,7 +82,7 @@ EnumClass parseEnumDeclaration(clang_types.CXCursor cursor, Context context) { indent: nesting.length + commentPrefix.length, ), originalName: child.spelling(), - name: config.enums.renameMember(decl, child.spelling()), + name: child.spelling(), value: enumIntValue, ), ); @@ -107,8 +105,7 @@ EnumClass parseEnumDeclaration(clang_types.CXCursor cursor, Context context) { rethrow; } }); - final suggestedStyle = isNSOptions ? EnumStyle.intConstants : null; - enumClass.style = config.enums.style(decl, suggestedStyle); + enumClass.style = isNSOptions ? EnumStyle.intConstants : EnumStyle.dartEnum; context.bindingsIndex.addEnumToSeen(usr, enumClass); } diff --git a/pkgs/ffigen/lib/src/header_parser/sub_parsers/functiondecl_parser.dart b/pkgs/ffigen/lib/src/header_parser/sub_parsers/functiondecl_parser.dart index 6273de7be8..c34367a71b 100644 --- a/pkgs/ffigen/lib/src/header_parser/sub_parsers/functiondecl_parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/sub_parsers/functiondecl_parser.dart @@ -32,7 +32,6 @@ List parseFunctionDeclaration( return funcs; } - final decl = Declaration(usr: funcUsr, originalName: funcName); final cachedFunc = context.bindingsIndex.getSeenFunc(funcUsr); if (cachedFunc != null) { funcs.add(cachedFunc); @@ -48,7 +47,6 @@ List parseFunctionDeclaration( ) = parseParameters( context, cursor, - renameFn: (paramName) => config.functions.renameMember(decl, paramName), ); if (clang.clang_Cursor_isFunctionInlined(cursor) != 0 && @@ -120,7 +118,7 @@ List parseFunctionDeclaration( availability: apiAvailability.dartDoc, ), usr: usr, - name: config.functions.rename(decl) + (vaFunc?.postfix ?? ''), + name: funcName + (vaFunc?.postfix ?? ''), originalName: funcName, returnType: returnType, parameters: parameters, @@ -128,10 +126,10 @@ List parseFunctionDeclaration( for (final ta in vaFunc?.types ?? const []) Parameter(type: ta, name: 'va', objCConsumed: false), ], - exposeSymbolAddress: config.functions.includeSymbolAddress(decl), - exposeFunctionTypedefs: config.functions.includeTypedef(decl), - isLeaf: config.functions.isLeaf(decl), - recordUse: config.functions.recordUse(decl), + exposeSymbolAddress: false, + exposeFunctionTypedefs: false, + isLeaf: false, + recordUse: false, objCReturnsRetained: objCReturnsRetained, loadFromNativeAsset: config.output.style is NativeExternalBindings, apiAvailability: apiAvailability, diff --git a/pkgs/ffigen/lib/src/header_parser/sub_parsers/macro_parser.dart b/pkgs/ffigen/lib/src/header_parser/sub_parsers/macro_parser.dart index bc93a75224..86a9f0b8d3 100644 --- a/pkgs/ffigen/lib/src/header_parser/sub_parsers/macro_parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/sub_parsers/macro_parser.dart @@ -10,7 +10,6 @@ import 'package:logging/logging.dart'; import 'package:path/path.dart' as p; import '../../code_generator.dart'; -import '../../config_provider/config_types.dart'; import '../../context.dart'; import '../clang_bindings/clang_bindings.dart' as clang_types; import '../utils.dart'; @@ -23,7 +22,6 @@ void saveMacroDefinition(Context context, clang_types.CXCursor cursor) { return; } final originalMacroName = cursor.spelling(); - final decl = Declaration(usr: macroUsr, originalName: originalMacroName); if (clang.clang_Cursor_isMacroBuiltin(cursor) == 0 && clang.clang_Cursor_isMacroFunctionLike(cursor) == 0) { // Parse macro only if it's not builtin or function-like. @@ -31,7 +29,7 @@ void saveMacroDefinition(Context context, clang_types.CXCursor cursor) { "++++ Saved Macro '$originalMacroName' for later : " '${cursor.completeStringRepr()}', ); - final prefixedName = context.config.macros.rename(decl); + final prefixedName = originalMacroName; bindingsIndex.addMacroToSeen(macroUsr, prefixedName); _saveMacro(prefixedName, macroUsr, originalMacroName, context); } diff --git a/pkgs/ffigen/lib/src/header_parser/sub_parsers/objccategorydecl_parser.dart b/pkgs/ffigen/lib/src/header_parser/sub_parsers/objccategorydecl_parser.dart index 2c44e46d83..5856b770ad 100644 --- a/pkgs/ffigen/lib/src/header_parser/sub_parsers/objccategorydecl_parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/sub_parsers/objccategorydecl_parser.dart @@ -3,7 +3,6 @@ // BSD-style license that can be found in the LICENSE file. import '../../code_generator.dart'; -import '../../config_provider/config_types.dart'; import '../../context.dart'; import '../clang_bindings/clang_bindings.dart' as clang_types; import '../utils.dart'; @@ -15,8 +14,7 @@ ObjCCategory? parseObjCCategoryDeclaration( Context context, clang_types.CXCursor cursor, ) { - final objcCategories = context.config.objectiveC?.categories; - if (objcCategories == null) { + if (context.config.objectiveC == null) { return null; } @@ -24,8 +22,6 @@ ObjCCategory? parseObjCCategoryDeclaration( final usr = cursor.usr(); final name = cursor.spelling(); - final decl = Declaration(usr: usr, originalName: name); - final cachedCategory = context.bindingsIndex.getSeenObjCCategory(usr); if (cachedCategory != null) { return cachedCategory; @@ -62,7 +58,7 @@ ObjCCategory? parseObjCCategoryDeclaration( final category = ObjCCategory( usr: usr, originalName: name, - name: objcCategories.rename(decl), + name: name, parent: parentInterface, dartDoc: getCursorDocComment( context, @@ -88,8 +84,7 @@ ObjCCategory? parseObjCCategoryDeclaration( final (getter, setter) = parseObjCProperty( context, child, - decl, - objcCategories, + name, ); category.addMethod(getter); category.addMethod(setter); @@ -97,7 +92,7 @@ ObjCCategory? parseObjCCategoryDeclaration( case clang_types.CXCursorKind.CXCursor_ObjCInstanceMethodDecl: case clang_types.CXCursorKind.CXCursor_ObjCClassMethodDecl: category.addMethod( - parseObjCMethod(context, child, decl, objcCategories), + parseObjCMethod(context, child, name), ); break; } diff --git a/pkgs/ffigen/lib/src/header_parser/sub_parsers/objcinterfacedecl_parser.dart b/pkgs/ffigen/lib/src/header_parser/sub_parsers/objcinterfacedecl_parser.dart index eac6bb5ca7..4f93201c8a 100644 --- a/pkgs/ffigen/lib/src/header_parser/sub_parsers/objcinterfacedecl_parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/sub_parsers/objcinterfacedecl_parser.dart @@ -4,7 +4,6 @@ import '../../code_generator.dart'; import '../../config_provider/config.dart'; -import '../../config_provider/config_types.dart'; import '../../context.dart'; import '../clang_bindings/clang_bindings.dart' as clang_types; import '../utils.dart'; @@ -21,12 +20,10 @@ Type? parseObjCInterfaceDeclaration( if (cachedItf != null) return cachedItf; final name = cursor.spelling(); - final decl = Declaration(usr: usr, originalName: name); final apiAvailability = ApiAvailability.fromCursor(cursor, context); final config = context.config; - final objcInterfaces = config.objectiveC?.interfaces; - if (objcInterfaces == null) { + if (config.objectiveC == null) { return null; } @@ -39,8 +36,8 @@ Type? parseObjCInterfaceDeclaration( context: context, usr: usr, originalName: name, - name: objcInterfaces.rename(decl), - module: objcInterfaces.module(decl), + name: name, + module: null, dartDoc: getCursorDocComment( context, cursor, @@ -67,14 +64,11 @@ void fillObjCInterfaceMethodsIfNeeded( if (itf.filled) return; itf.filled = true; // Break cycles. - final objcInterfaces = context.config.objectiveC!.interfaces; - context.logger.fine( '++++ Filling ObjC interface: ' 'Name: ${itf.originalName}, ${cursor.completeStringRepr()}', ); - final itfDecl = Declaration(usr: itf.usr, originalName: itf.originalName); cursor.visitChildren((child) { switch (child.kind) { case clang_types.CXCursorKind.CXCursor_ObjCSuperClassRef: @@ -88,15 +82,14 @@ void fillObjCInterfaceMethodsIfNeeded( final (getter, setter) = parseObjCProperty( context, child, - itfDecl, - objcInterfaces, + itf.originalName, ); itf.addMethod(getter); itf.addMethod(setter); break; case clang_types.CXCursorKind.CXCursor_ObjCInstanceMethodDecl: case clang_types.CXCursorKind.CXCursor_ObjCClassMethodDecl: - itf.addMethod(parseObjCMethod(context, child, itfDecl, objcInterfaces)); + itf.addMethod(parseObjCMethod(context, child, itf.originalName)); break; } }); @@ -143,8 +136,7 @@ void _parseSuperType( (ObjCMethod?, ObjCMethod?) parseObjCProperty( Context context, clang_types.CXCursor cursor, - Declaration decl, - Declarations filters, + String declName, ) { final fieldName = cursor.spelling(); final fieldType = cursor.type().toCodeGenType(context); @@ -153,7 +145,7 @@ void _parseSuperType( if (fieldType.isIncompleteCompound) { context.logger.warning( - 'Property "$fieldName" in instance "${decl.originalName}" ' + 'Property "$fieldName" in instance "$declName" ' 'has incomplete type: $fieldType.', ); return (null, null); @@ -190,7 +182,7 @@ void _parseSuperType( final getter = ObjCMethod( context: context, originalName: getterName, - name: filters.renameMember(decl, getterName), + name: getterName, dartDoc: dartDoc ?? getterName, kind: ObjCMethodKind.propertyGetter, isClassMethod: isClassMethod, @@ -231,8 +223,7 @@ void _parseSuperType( ObjCMethod? parseObjCMethod( Context context, clang_types.CXCursor cursor, - Declaration itfDecl, - Declarations filters, + String declName, ) { final logger = context.logger; final methodName = cursor.spelling(); @@ -245,7 +236,7 @@ ObjCMethod? parseObjCMethod( if (returnType.isIncompleteCompound) { logger.warning( 'Method "$methodName" in instance ' - '"${itfDecl.originalName}" has incomplete ' + '"$declName" has incomplete ' 'return type: $returnType.', ); return null; @@ -269,7 +260,7 @@ ObjCMethod? parseObjCMethod( final p = _parseMethodParam( context, child, - itfDecl.originalName, + declName, methodName, ); if (p == null) { @@ -298,7 +289,7 @@ ObjCMethod? parseObjCMethod( return ObjCMethod( context: context, originalName: methodName, - name: filters.renameMember(itfDecl, methodName), + name: methodName, dartDoc: getCursorDocComment( context, cursor, diff --git a/pkgs/ffigen/lib/src/header_parser/sub_parsers/objcprotocoldecl_parser.dart b/pkgs/ffigen/lib/src/header_parser/sub_parsers/objcprotocoldecl_parser.dart index b5c1f22c33..1a6957b85f 100644 --- a/pkgs/ffigen/lib/src/header_parser/sub_parsers/objcprotocoldecl_parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/sub_parsers/objcprotocoldecl_parser.dart @@ -3,7 +3,6 @@ // BSD-style license that can be found in the LICENSE file. import '../../code_generator.dart'; -import '../../config_provider/config_types.dart'; import '../../context.dart'; import '../clang_bindings/clang_bindings.dart' as clang_types; import '../utils.dart'; @@ -21,16 +20,13 @@ ObjCProtocol? parseObjCProtocolDeclaration( return null; } - final objcProtocols = config.objectiveC?.protocols; - if (objcProtocols == null) { + if (config.objectiveC == null) { return null; } final usr = cursor.usr(); final name = cursor.spelling(); - final decl = Declaration(usr: usr, originalName: name); - final cachedProtocol = bindingsIndex.getSeenObjCProtocol(usr); if (cachedProtocol != null) { return cachedProtocol; @@ -63,8 +59,8 @@ ObjCProtocol? parseObjCProtocolDeclaration( context: context, usr: usr, originalName: name, - name: objcProtocols.rename(decl), - module: objcProtocols.module(decl), + name: name, + module: null, dartDoc: getCursorDocComment( context, cursor, @@ -94,8 +90,7 @@ ObjCProtocol? parseObjCProtocolDeclaration( final (getter, setter) = parseObjCProperty( context, child, - decl, - objcProtocols, + name, ); protocol.addMethod(getter); protocol.addMethod(setter); @@ -103,7 +98,7 @@ ObjCProtocol? parseObjCProtocolDeclaration( case clang_types.CXCursorKind.CXCursor_ObjCInstanceMethodDecl: case clang_types.CXCursorKind.CXCursor_ObjCClassMethodDecl: protocol.addMethod( - parseObjCMethod(context, child, decl, objcProtocols), + parseObjCMethod(context, child, name), ); break; } diff --git a/pkgs/ffigen/lib/src/header_parser/sub_parsers/typedefdecl_parser.dart b/pkgs/ffigen/lib/src/header_parser/sub_parsers/typedefdecl_parser.dart index 5b6c40693b..52c8591f31 100644 --- a/pkgs/ffigen/lib/src/header_parser/sub_parsers/typedefdecl_parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/sub_parsers/typedefdecl_parser.dart @@ -3,7 +3,6 @@ // BSD-style license that can be found in the LICENSE file. import '../../code_generator.dart'; -import '../../config_provider/config_types.dart'; import '../../context.dart'; import '../clang_bindings/clang_bindings.dart' as clang_types; import '../type_extractor/extractor.dart'; @@ -30,7 +29,6 @@ Typealias parseTypedefDeclaration( clang_types.CXCursor cursor, ) { final logger = context.logger; - final config = context.config; final bindingsIndex = context.bindingsIndex; final name = cursor.spelling(); final usr = cursor.usr(); @@ -38,7 +36,6 @@ Typealias parseTypedefDeclaration( final cachedType = bindingsIndex.getSeenTypealias(usr); if (cachedType != null) return cachedType; - final decl = Declaration(usr: usr, originalName: name); final ct = clang.clang_getTypedefDeclUnderlyingType(cursor); final s = getCodeGenType(context, ct, originalCursor: cursor); @@ -78,7 +75,7 @@ Typealias parseTypedefDeclaration( final type = Typealias( usr: usr, originalName: name, - name: config.typedefs.rename(decl), + name: name, type: s, dartDoc: getCursorDocComment(context, cursor), ); diff --git a/pkgs/ffigen/lib/src/header_parser/sub_parsers/unnamed_enumdecl_parser.dart b/pkgs/ffigen/lib/src/header_parser/sub_parsers/unnamed_enumdecl_parser.dart index 87c6269edb..2dec4a9965 100644 --- a/pkgs/ffigen/lib/src/header_parser/sub_parsers/unnamed_enumdecl_parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/sub_parsers/unnamed_enumdecl_parser.dart @@ -3,7 +3,6 @@ // BSD-style license that can be found in the LICENSE file. import '../../code_generator.dart'; -import '../../config_provider/config_types.dart'; import '../../context.dart'; import '../clang_bindings/clang_bindings.dart' as clang_types; import '../utils.dart'; @@ -46,7 +45,6 @@ Constant? _addUnNamedEnumConstant( clang_types.CXCursor cursor, ) { final logger = context.logger; - final config = context.config; final bindingsIndex = context.bindingsIndex; final usr = cursor.usr(); @@ -68,9 +66,7 @@ Constant? _addUnNamedEnumConstant( final constant = UnnamedEnumConstant( usr: usr, originalName: cursor.spelling(), - name: config.unnamedEnums.rename( - Declaration(usr: cursor.usr(), originalName: cursor.spelling()), - ), + name: cursor.spelling(), dartDoc: apiAvailability.dartDoc, rawType: 'int', rawValue: clang.clang_getEnumConstantDeclValue(cursor).toString(), diff --git a/pkgs/ffigen/lib/src/header_parser/sub_parsers/var_parser.dart b/pkgs/ffigen/lib/src/header_parser/sub_parsers/var_parser.dart index 6bd83d10ba..8743a12cfb 100644 --- a/pkgs/ffigen/lib/src/header_parser/sub_parsers/var_parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/sub_parsers/var_parser.dart @@ -4,7 +4,6 @@ import '../../code_generator.dart'; import '../../config_provider/config.dart'; -import '../../config_provider/config_types.dart'; import '../../context.dart'; import '../clang_bindings/clang_bindings.dart' as clang_types; import '../utils.dart'; @@ -25,23 +24,19 @@ Binding? parseVarDeclaration(Context context, clang_types.CXCursor cursor) { return bindingsIndex.getSeenVariableConstant(usr); } - final decl = Declaration(usr: usr, originalName: name); final cType = cursor.type(); - // Try to evaluate as a constant first, - // unless the config asks for the variable's address. - if (cType.isConstQualified && !config.globals.includeSymbolAddress(decl)) { + Constant? constantValue; + if (cType.isConstQualified) { final evalResult = clang.clang_Cursor_Evaluate(cursor); final evalKind = clang.clang_EvalResult_getKind(evalResult); - Constant? constant; - switch (evalKind) { case clang_types.CXEvalResultKind.CXEval_Int: final value = clang.clang_EvalResult_getAsLongLong(evalResult); - constant = Constant( + constantValue = Constant( usr: usr, originalName: name, - name: config.globals.rename(decl), + name: name, dartDoc: getCursorDocComment(context, cursor), rawType: 'int', rawValue: value.toString(), @@ -49,10 +44,10 @@ Binding? parseVarDeclaration(Context context, clang_types.CXCursor cursor) { break; case clang_types.CXEvalResultKind.CXEval_Float: final value = clang.clang_EvalResult_getAsDouble(evalResult); - constant = Constant( + constantValue = Constant( usr: usr, originalName: name, - name: config.globals.rename(decl), + name: name, dartDoc: getCursorDocComment(context, cursor), rawType: 'double', rawValue: writeDoubleAsString(value), @@ -61,10 +56,10 @@ Binding? parseVarDeclaration(Context context, clang_types.CXCursor cursor) { case clang_types.CXEvalResultKind.CXEval_StrLiteral: final value = clang.clang_EvalResult_getAsStr(evalResult); final rawValue = getWrittenStringRepresentation(name, value, context); - constant = Constant( + constantValue = Constant( usr: usr, originalName: name, - name: config.globals.rename(decl), + name: name, dartDoc: getCursorDocComment(context, cursor), rawType: 'String', rawValue: "'$rawValue'", @@ -72,14 +67,6 @@ Binding? parseVarDeclaration(Context context, clang_types.CXCursor cursor) { break; } clang.clang_EvalResult_dispose(evalResult); - - if (constant != null) { - logger.fine( - '++++ Adding Constant from Global: ${cursor.completeStringRepr()}', - ); - bindingsIndex.addVariableConstantToSeen(usr, constant); - return constant; - } } logger.fine('++++ Adding Global: ${cursor.completeStringRepr()}'); @@ -101,12 +88,13 @@ Binding? parseVarDeclaration(Context context, clang_types.CXCursor cursor) { final global = Global( originalName: name, - name: config.globals.rename(decl), + name: name, usr: usr, type: type, dartDoc: getCursorDocComment(context, cursor), - exposeSymbolAddress: config.globals.includeSymbolAddress(decl), + exposeSymbolAddress: false, constant: cType.isConstQualified, + constantValue: constantValue, loadFromNativeAsset: nativeOutputStyle, ); bindingsIndex.addGlobalVarToSeen(usr, global); diff --git a/pkgs/ffigen/lib/src/public_ast/public_ast.dart b/pkgs/ffigen/lib/src/public_ast/public_ast.dart index 98c1112d82..787cc3d82a 100644 --- a/pkgs/ffigen/lib/src/public_ast/public_ast.dart +++ b/pkgs/ffigen/lib/src/public_ast/public_ast.dart @@ -288,7 +288,10 @@ class Func implements Decl { String get name => _binding.symbol.oldName; @override - set name(String value) => _binding.symbol.oldName = value; + set name(String value) { + _binding.symbol.oldName = value; + _binding.funcVarSymbol.oldName = '_$value'; + } @override bool get isExcluded => _binding.userDefinedIsExcluded ?? false; @@ -427,6 +430,8 @@ class ObjCInterface implements Decl { String? get module => _binding.module; set module(String? value) => _binding.module = value; + bool get isObjCImport => _binding.isObjCImport; + List get methods => _binding.methods.map(ObjCMethod.new).toList(); @override @@ -459,6 +464,8 @@ class ObjCProtocol implements Decl { String? get module => _binding.module; set module(String? value) => _binding.module = value; + bool get isObjCImport => _binding.isObjCImport; + List get methods => _binding.methods.map(ObjCMethod.new).toList(); @override @@ -488,6 +495,8 @@ class ObjCCategory implements Decl { @override set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; + bool get isObjCImport => _binding.isObjCImport; + List get methods => _binding.methods.map(ObjCMethod.new).toList(); @override @@ -594,7 +603,12 @@ class ObjCMethod implements AstNode { String get name => _method.symbol.oldName; - set name(String value) => _method.symbol.oldName = value; + set name(String value) { + _method.symbol.oldName = value; + if (_method.protocolMethodName != null) { + _method.protocolMethodName!.oldName = value; + } + } bool get isClassMethod => _method.isClassMethod; @@ -604,6 +618,8 @@ class ObjCMethod implements AstNode { set isExcluded(bool value) => _method.userDefinedIsExcluded = value; + List get parameters => _method.params.map(Parameter.new).toList(); + @override void accept(Visitor visitor) => visitor.visitObjCMethod(this); } @@ -805,247 +821,4 @@ class RenameMapVisitor extends Visitor { void visitCppClass(CppClass node) => _rename(node); } -class LegacyCallbacksVisitor extends Visitor { - final Config config; - - const LegacyCallbacksVisitor(this.config); - - @override - void visitStruct(Struct node) { - if (node._binding.isInternal) return; - if (!config.structs.include(node._binding)) return; - final renamed = config.structs.rename(node._binding); - if (renamed != node.originalName) { - node.name = renamed; - } - final pack = config.structs.packingOverride(node._binding); - if (pack != null) { - node.pack = pack.value; - } - for (final field in node.fields) { - if (!config.structs.includeMember(node._binding, field.originalName)) { - field.isExcluded = true; - } else { - final fieldRenamed = config.structs.renameMember( - node._binding, - field.originalName, - ); - if (fieldRenamed != field.originalName) { - field.name = fieldRenamed; - } - } - } - } - - @override - void visitUnion(Union node) { - if (node._binding.isInternal) return; - if (!config.unions.include(node._binding)) return; - final renamed = config.unions.rename(node._binding); - if (renamed != node.originalName) { - node.name = renamed; - } - for (final field in node.fields) { - if (!config.unions.includeMember(node._binding, field.originalName)) { - field.isExcluded = true; - } else { - final fieldRenamed = config.unions.renameMember( - node._binding, - field.originalName, - ); - if (fieldRenamed != field.originalName) { - field.name = fieldRenamed; - } - } - } - } - - @override - void visitEnum(EnumClass node) { - if (node._binding.isInternal) return; - if (!config.enums.include(node._binding)) return; - final renamed = config.enums.rename(node._binding); - if (renamed != node.originalName) { - node.name = renamed; - } - node.style = config.enums.style(node._binding, node.style); - for (final c in node.constants) { - if (c.originalName != null && - !config.enums.includeMember(node._binding, c.originalName!)) { - c.isExcluded = true; - } else if (c.originalName != null) { - final cRenamed = config.enums.renameMember( - node._binding, - c.originalName!, - ); - if (cRenamed != c.originalName) { - c.name = cRenamed; - } - } - } - } - - @override - void visitFunc(Func node) { - if (node._binding.isInternal) return; - if (!config.functions.include(node._binding)) return; - final renamed = config.functions.rename(node._binding); - if (renamed != node.originalName) { - node.name = renamed; - } - if (config.functions.includeSymbolAddress(node._binding)) { - node.exposeSymbolAddress = true; - } - if (config.functions.includeTypedef(node._binding)) { - node.exposeFunctionTypedefs = true; - } - if (config.functions.isLeaf(node._binding)) { - node.isLeaf = true; - } - if (config.functions.recordUse(node._binding)) { - node.recordUse = true; - } - } - - @override - void visitGlobal(Global node) { - if (node._binding.isInternal) return; - if (!config.globals.include(node._binding)) return; - final renamed = config.globals.rename(node._binding); - if (renamed != node.originalName) { - node.name = renamed; - } - if (config.globals.includeSymbolAddress(node._binding)) { - node.exposeSymbolAddress = true; - } - } - - @override - void visitMacroConstant(MacroConstant node) { - if (node._binding.isInternal) return; - if (!config.macros.include(node._binding)) return; - final renamed = config.macros.rename(node._binding); - if (renamed != node.originalName) { - node.name = renamed; - } - } - - @override - void visitTypealias(Typealias node) { - if (node._binding.isInternal) return; - if (!config.typedefs.include(node._binding)) return; - final renamed = config.typedefs.rename(node._binding); - if (renamed != node.originalName) { - node.name = renamed; - } - } - - @override - void visitUnnamedEnumConstant(UnnamedEnumConstant node) { - if (node._binding.isInternal) return; - if (!config.unnamedEnums.include(node._binding)) return; - final renamed = config.unnamedEnums.rename(node._binding); - if (renamed != node.originalName) { - node.name = renamed; - } - } - - @override - void visitObjCInterface(ObjCInterface node) { - if (node._binding.isInternal) return; - final objcInterfaces = config.objectiveC?.interfaces; - if (objcInterfaces == null || !objcInterfaces.include(node._binding)) { - return; - } - final renamed = objcInterfaces.rename(node._binding); - if (renamed != node.originalName) { - node.name = renamed; - } - final mod = objcInterfaces.module(node._binding); - if (mod != null) node.module = mod; - for (final method in node.methods) { - if (!objcInterfaces.includeMember(node._binding, method.originalName)) { - method.isExcluded = true; - } else if (objcInterfaces.renameMember != - Declarations.useMemberOriginalName) { - final methodRenamed = objcInterfaces.renameMember( - node._binding, - method.originalName, - ); - if (methodRenamed != method.originalName) { - method.name = methodRenamed.split(':').first; - } - } - } - } - - @override - void visitObjCProtocol(ObjCProtocol node) { - if (node._binding.isInternal) return; - final objcProtocols = config.objectiveC?.protocols; - if (objcProtocols == null || !objcProtocols.include(node._binding)) return; - final renamed = objcProtocols.rename(node._binding); - if (renamed != node.originalName) { - node.name = renamed; - } - final mod = objcProtocols.module(node._binding); - if (mod != null) node.module = mod; - for (final method in node.methods) { - if (!objcProtocols.includeMember(node._binding, method.originalName)) { - method.isExcluded = true; - } else if (objcProtocols.renameMember != - Declarations.useMemberOriginalName) { - final methodRenamed = objcProtocols.renameMember( - node._binding, - method.originalName, - ); - if (methodRenamed != method.originalName) { - method.name = methodRenamed.split(':').first; - } - } - } - } - - @override - void visitObjCCategory(ObjCCategory node) { - if (node._binding.isInternal) return; - final objcCategories = config.objectiveC?.categories; - if (objcCategories == null || !objcCategories.include(node._binding)) { - return; - } - final renamed = objcCategories.rename(node._binding); - if (renamed != node.originalName) { - node.name = renamed; - } - for (final method in node.methods) { - if (!objcCategories.includeMember(node._binding, method.originalName)) { - method.isExcluded = true; - } else if (objcCategories.renameMember != - Declarations.useMemberOriginalName) { - final methodRenamed = objcCategories.renameMember( - node._binding, - method.originalName, - ); - if (methodRenamed != method.originalName) { - method.name = methodRenamed.split(':').first; - } - } - } - } - - @override - void visitObjCMethod(ObjCMethod node) { - // Member exclusion/renaming handled in parent ObjCInterface/ObjCCategory/ObjCProtocol. - } - @override - void visitCppClass(CppClass node) { - if (node._binding.isInternal) return; - final cppClasses = config.cpp?.classes; - if (cppClasses == null) return; - final renamed = cppClasses.rename(node._binding); - if (renamed != node.originalName) { - node.name = renamed; - } - } -} diff --git a/pkgs/ffigen/lib/src/visitor/apply_config_filters.dart b/pkgs/ffigen/lib/src/visitor/apply_config_filters.dart index c3ee8ab662..f05a0a6d18 100644 --- a/pkgs/ffigen/lib/src/visitor/apply_config_filters.dart +++ b/pkgs/ffigen/lib/src/visitor/apply_config_filters.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. import '../code_generator.dart'; -import '../config_provider/config.dart' show Config, Declarations; +import '../config_provider/config.dart' show Config; import 'ast.dart'; @@ -13,66 +13,50 @@ class ApplyConfigFiltersVisitation extends Visitation { final indirectlyIncluded = {}; ApplyConfigFiltersVisitation(this.config); - void _visitImpl(Binding node, Declarations filters) { + void _visitImpl(Binding node) { + if (node.isObjCImport && + !(config.objectiveC?.generateForPackageObjectiveC ?? false)) { + return; + } node.visitChildren(visitor); if (node.originalName == '') return; - if (config.importedTypesByUsr.containsKey(node.usr)) return; if (node.userDefinedIsExcluded == true) return; - if (node.userDefinedIsExcluded == false || filters.include(node)) { + if (node.userDefinedIsExcluded == false) { directlyIncluded.add(node); } } @override - void visitStruct(Struct node) => _visitImpl(node, config.structs); + void visitStruct(Struct node) => _visitImpl(node); @override - void visitUnion(Union node) => _visitImpl(node, config.unions); + void visitUnion(Union node) => _visitImpl(node); @override void visitEnumClass(EnumClass node) { if (node.isAnonymous) return; - _visitImpl(node, config.enums); + _visitImpl(node); } @override void visitCppClass(CppClass node) { - final cppClasses = config.cpp?.classes; - if (cppClasses == null) { - if (node.userDefinedIsExcluded == false) { - directlyIncluded.add(node); - } - return; - } - _visitImpl(node, cppClasses); + _visitImpl(node); } @override - void visitFunc(Func node) => _visitImpl(node, config.functions); + void visitFunc(Func node) => _visitImpl(node); @override - void visitMacroConstant(MacroConstant node) => - _visitImpl(node, config.macros); + void visitMacroConstant(MacroConstant node) => _visitImpl(node); @override void visitObjCInterface(ObjCInterface node) { if (node.unavailable) return; - final objcInterfaces = config.objectiveC?.interfaces; - if (objcInterfaces == null) { - if (node.userDefinedIsExcluded == false) { - directlyIncluded.add(node); - } - return; - } node.filterMethods( - (m) => - m.userDefinedIsExcluded != true && - !m.unavailable && - (m.userDefinedIsExcluded == false || - objcInterfaces.includeMember(node, m.originalName)), + (m) => m.userDefinedIsExcluded != true && !m.unavailable, ); - _visitImpl(node, objcInterfaces); + _visitImpl(node); // If this node is included, include all its super types. if (directlyIncluded.contains(node)) { @@ -84,66 +68,43 @@ class ApplyConfigFiltersVisitation extends Visitation { @override void visitObjCCategory(ObjCCategory node) { - final objcCategories = config.objectiveC?.categories; - if (objcCategories == null) { - if (node.userDefinedIsExcluded == false) { - directlyIncluded.add(node); - } - return; - } node.filterMethods((m) { if (m.userDefinedIsExcluded == true) return false; if (m.unavailable) return false; if (node.shouldCopyMethodToInterface(m)) return false; - return m.userDefinedIsExcluded == false || - objcCategories.includeMember(node, m.originalName); + return m.userDefinedIsExcluded != true; }); - _visitImpl(node, objcCategories); + _visitImpl(node); } @override void visitObjCProtocol(ObjCProtocol node) { if (node.unavailable) return; - final objcProtocols = config.objectiveC?.protocols; - if (objcProtocols == null) { - if (node.userDefinedIsExcluded == false) { - directlyIncluded.add(node); - } - return; - } node.filterMethods((m) { - // TODO(https://github.com/dart-lang/native/issues/1149): Support class - // methods on protocols if there's a use case. For now filter them. We - // filter here instead of during parsing so that these methods are still - // copied to any interfaces that implement the protocol. if (m.userDefinedIsExcluded == true) return false; if (m.unavailable) return false; if (m.isClassMethod) return false; - return m.userDefinedIsExcluded == false || - objcProtocols.includeMember(node, m.originalName); + return m.userDefinedIsExcluded != true; }); - _visitImpl(node, objcProtocols); + _visitImpl(node); } @override - void visitUnnamedEnumConstant(UnnamedEnumConstant node) => - _visitImpl(node, config.unnamedEnums); + void visitUnnamedEnumConstant(UnnamedEnumConstant node) => _visitImpl(node); @override - void visitGlobal(Global node) => _visitImpl(node, config.globals); + void visitGlobal(Global node) => _visitImpl(node); @override void visitConstant(Constant node) { - // MacroConstant and UnnamedEnumConstant have their own overrides, so this - // only applies to base Constants (e.g. from static const variables). - _visitImpl(node, config.globals); + _visitImpl(node); } @override void visitTypealias(Typealias node) { if (node.isAnonymous) return; - _visitImpl(node, config.typedefs); + _visitImpl(node); } } diff --git a/pkgs/ffigen/lib/src/visitor/fill_method_dependencies.dart b/pkgs/ffigen/lib/src/visitor/fill_method_dependencies.dart index 04b9518d3a..4de98d583f 100644 --- a/pkgs/ffigen/lib/src/visitor/fill_method_dependencies.dart +++ b/pkgs/ffigen/lib/src/visitor/fill_method_dependencies.dart @@ -92,4 +92,12 @@ class _MethodDepAdderVisitation extends Visitation { @override void visitObjCBlockWrapperFuncs(ObjCBlockWrapperFuncs node) => node.visitChildren(visitor); + + @override + void visitObjCInterface(ObjCInterface node) { + if (!finalBindings.contains(node)) { + node.generateAsStub = true; + finalBindings.add(node); + } + } } diff --git a/pkgs/ffigen/lib/src/visitor/list_bindings.dart b/pkgs/ffigen/lib/src/visitor/list_bindings.dart index 72587c4a5b..a9568bebb1 100644 --- a/pkgs/ffigen/lib/src/visitor/list_bindings.dart +++ b/pkgs/ffigen/lib/src/visitor/list_bindings.dart @@ -35,7 +35,7 @@ class ListBindingsVisitation extends Visitation { } bool _shouldInclude(Binding node, _IncludeBehavior behavior) { - if (node.isObjCImport || node.userDefinedIsExcluded == true) return false; + if (node.isObjCImport) return false; switch (behavior) { case _IncludeBehavior.configOnly: return includes.contains(node); @@ -71,7 +71,7 @@ class ListBindingsVisitation extends Visitation { : _IncludeBehavior.configOnly, ); - if (omit && directTransitives.contains(node)) { + if (omit && !node.isObjCImport && directTransitives.contains(node)) { node.generateAsStub = true; bindings.add(node); @@ -109,7 +109,7 @@ class ListBindingsVisitation extends Visitation { : _IncludeBehavior.configOnly, ); - if (omit && directTransitives.contains(node)) { + if (omit && !node.isObjCImport && directTransitives.contains(node)) { node.generateAsStub = true; bindings.add(node); @@ -120,11 +120,11 @@ class ListBindingsVisitation extends Visitation { @override void visitStruct(Struct node) => - _visitImpl(node, _IncludeBehavior.configOrTransitive); + _visitImpl(node, _IncludeBehavior.configOrDirectTransitive); @override void visitUnion(Union node) => - _visitImpl(node, _IncludeBehavior.configOrTransitive); + _visitImpl(node, _IncludeBehavior.configOrDirectTransitive); @override void visitTypealias(Typealias node) { @@ -147,6 +147,10 @@ class ListBindingsVisitation extends Visitation { node.visitChildren(visitor); } } + + @override + void visitObjCBlock(ObjCBlock node) => + _visitImpl(node, _IncludeBehavior.configOrDirectTransitive); } class MarkBindingsVisitation extends Visitation { diff --git a/pkgs/ffigen/lib/src/visitor/opaque_compounds.dart b/pkgs/ffigen/lib/src/visitor/opaque_compounds.dart index 7fa06bbabb..4b1cedf1c1 100644 --- a/pkgs/ffigen/lib/src/visitor/opaque_compounds.dart +++ b/pkgs/ffigen/lib/src/visitor/opaque_compounds.dart @@ -51,7 +51,7 @@ class ClearOpaqueCompoundMembersVisitation extends Visitation { // the config filters, and the config is using opaque deps, convert the // compound to be opaque by deleting its members. if (!byValueCompounds.contains(node) && - !included.contains(node) && + (node.originalName.isEmpty || !included.contains(node)) && compondDepsConfig == CompoundDependencies.opaque) { node.members.clear(); } diff --git a/pkgs/ffigen/test/code_generator_tests/code_generator_test.dart b/pkgs/ffigen/test/code_generator_tests/code_generator_test.dart index af37007f67..cff8785613 100644 --- a/pkgs/ffigen/test/code_generator_tests/code_generator_test.dart +++ b/pkgs/ffigen/test/code_generator_tests/code_generator_test.dart @@ -20,20 +20,13 @@ void main() { Context makeContext({Output? output}) => testContext( FfiGenerator( + visitors: const [IncludeAllVisitor()], output: output ?? Output( dartFile: Uri.file('unused'), style: const DynamicLibraryBindings(wrapperName: 'Bindings'), ), - enums: Enums.includeAll, - functions: Functions.includeAll, - globals: Globals.includeAll, - macros: Macros.includeAll, - structs: Structs.includeAll, - typedefs: Typedefs.includeAll, - unions: Unions.includeAll, - unnamedEnums: UnnamedEnums.includeAll, ), ); diff --git a/pkgs/ffigen/test/collision_tests/decl_decl_collision_test.dart b/pkgs/ffigen/test/collision_tests/decl_decl_collision_test.dart index 852edbee05..feb68b1d88 100644 --- a/pkgs/ffigen/test/collision_tests/decl_decl_collision_test.dart +++ b/pkgs/ffigen/test/collision_tests/decl_decl_collision_test.dart @@ -13,16 +13,11 @@ void main() { test('declaration conflict', () { final context = testContext( FfiGenerator( + visitors: const [IncludeAllVisitor()], output: Output( dartFile: Uri.file('unused'), style: const DynamicLibraryBindings(wrapperName: 'Bindings'), ), - functions: Functions.includeAll, - structs: Structs.includeAll, - enums: Enums.includeAll, - globals: Globals.includeAll, - macros: Macros.includeAll, - typedefs: Typedefs.includeAll, ), ); final library = Library( diff --git a/pkgs/ffigen/test/collision_tests/decl_symbol_address_collision_test.dart b/pkgs/ffigen/test/collision_tests/decl_symbol_address_collision_test.dart index fce49fd9c5..f6f4cefbdd 100644 --- a/pkgs/ffigen/test/collision_tests/decl_symbol_address_collision_test.dart +++ b/pkgs/ffigen/test/collision_tests/decl_symbol_address_collision_test.dart @@ -15,16 +15,11 @@ void main() { setUpAll(() { final context = testContext( FfiGenerator( + visitors: const [IncludeAllVisitor()], output: Output( dartFile: Uri.file('unused'), style: const DynamicLibraryBindings(wrapperName: 'Bindings'), ), - functions: Functions.includeAll, - structs: Structs.includeAll, - enums: Enums.includeAll, - globals: Globals.includeAll, - macros: Macros.includeAll, - typedefs: Typedefs.includeAll, ), ); actual = Library( diff --git a/pkgs/ffigen/test/collision_tests/reserved_keyword_collision_test.dart b/pkgs/ffigen/test/collision_tests/reserved_keyword_collision_test.dart index cc5e3a8195..653bfb8a3a 100644 --- a/pkgs/ffigen/test/collision_tests/reserved_keyword_collision_test.dart +++ b/pkgs/ffigen/test/collision_tests/reserved_keyword_collision_test.dart @@ -33,15 +33,8 @@ void main() { ), ], ), - structs: Structs.includeAll, - unions: Unions.includeAll, - enums: Enums.includeAll, - functions: Functions.includeAll, - globals: Globals.includeAll, - typedefs: Typedefs( - include: (Declaration decl) => true, - includeUnused: true, - ), + visitors: const [IncludeAllVisitor()], + typedefs: const Typedefs(includeUnused: true), ), ), ); diff --git a/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_opaque_dependencies_bindings.dart b/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_opaque_dependencies_bindings.dart index cba416d5f9..5e92b96c3a 100644 --- a/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_opaque_dependencies_bindings.dart +++ b/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_opaque_dependencies_bindings.dart @@ -42,13 +42,38 @@ class NativeLibrary { .asFunction Function(ffi.Pointer)>(); } -final class A extends ffi.Opaque {} +final class A extends ffi.Struct { + @ffi.Int() + external int a; + + static ffi.Pointer $allocate(ffi.Allocator $allocator, {required int a}) => + $allocator()..ref.a = a; +} + +final class B extends ffi.Struct { + @ffi.Int() + external int a; -final class B extends ffi.Opaque {} + static ffi.Pointer $allocate(ffi.Allocator $allocator, {required int a}) => + $allocator()..ref.a = a; +} typedef BAlias = B; -final class C extends ffi.Opaque {} +final class C extends ffi.Struct { + @ffi.Int() + external int a; + + external ffi.Pointer nds; + + static ffi.Pointer $allocate( + ffi.Allocator $allocator, { + required int a, + required ffi.Pointer nds, + }) => $allocator() + ..ref.a = a + ..ref.nds = nds; +} final class D extends ffi.Struct { @ffi.Int() @@ -89,13 +114,24 @@ final class E extends ffi.Struct { external ffi.Array dArray; } +final class NoDefinitionStructInC extends ffi.Opaque {} + final class NoDefinitionStructInD extends ffi.Opaque {} -final class UA extends ffi.Opaque {} +final class UA extends ffi.Union { + @ffi.Int() + external int a; +} -final class UB extends ffi.Opaque {} +final class UB extends ffi.Union { + @ffi.Int() + external int a; +} -final class UC extends ffi.Opaque {} +final class UC extends ffi.Union { + @ffi.Int() + external int a; +} final class UD extends ffi.Union { @ffi.Int() diff --git a/pkgs/ffigen/test/header_parser_tests/function_n_struct_test.dart b/pkgs/ffigen/test/header_parser_tests/function_n_struct_test.dart index 5ec728234a..9d077977e9 100644 --- a/pkgs/ffigen/test/header_parser_tests/function_n_struct_test.dart +++ b/pkgs/ffigen/test/header_parser_tests/function_n_struct_test.dart @@ -82,18 +82,11 @@ ${strings.headers}: Library expectedLibrary() { final context = testContext( FfiGenerator( + visitors: const [IncludeAllVisitor()], output: Output( dartFile: Uri.file('unused'), style: const DynamicLibraryBindings(), ), - enums: Enums.includeAll, - functions: Functions.includeAll, - globals: Globals.includeAll, - macros: Macros.includeAll, - structs: Structs.includeAll, - typedefs: Typedefs.includeAll, - unions: Unions.includeAll, - unnamedEnums: UnnamedEnums.includeAll, ), ); final struct1 = Struct( diff --git a/pkgs/ffigen/test/header_parser_tests/globals_test.dart b/pkgs/ffigen/test/header_parser_tests/globals_test.dart index df8a61b0bb..d1aa6ad6e6 100644 --- a/pkgs/ffigen/test/header_parser_tests/globals_test.dart +++ b/pkgs/ffigen/test/header_parser_tests/globals_test.dart @@ -91,18 +91,11 @@ void main() { Library expectedLibrary() { final context = testContext( FfiGenerator( + visitors: const [IncludeAllVisitor()], output: Output( dartFile: Uri.file('unused'), style: const DynamicLibraryBindings(), ), - enums: Enums.includeAll, - functions: Functions.includeAll, - globals: Globals.includeAll, - macros: Macros.includeAll, - structs: Structs.includeAll, - typedefs: Typedefs.includeAll, - unions: Unions.includeAll, - unnamedEnums: UnnamedEnums.includeAll, ), ); final globalStruct = Struct(context: context, name: 'EmptyStruct'); diff --git a/pkgs/ffigen/test/header_parser_tests/record_use_test.dart b/pkgs/ffigen/test/header_parser_tests/record_use_test.dart index f0dfd22fac..ce5e1dbbdf 100644 --- a/pkgs/ffigen/test/header_parser_tests/record_use_test.dart +++ b/pkgs/ffigen/test/header_parser_tests/record_use_test.dart @@ -9,6 +9,19 @@ import 'package:test/test.dart'; import '../test_utils.dart'; +import 'package:ffigen/src/public_ast/public_ast.dart'; + +class _RecordUseVisitor extends Visitor { + @override + void visitFunc(Func node) { + if (node.originalName == 'sum') { + node.name = 'add'; + } + node.isExcluded = false; + node.recordUse = true; + } +} + void main() { group('record_use_test', () { test('Expected Bindings', () { @@ -16,13 +29,8 @@ void main() { p.join('test', 'header_parser_tests', 'record_use.h'), ); final generator = FfiGenerator( + visitors: [_RecordUseVisitor()], headers: Headers(entryPoints: [Uri.file(headerFile)]), - functions: Functions( - include: (decl) => true, - recordUse: (decl) => true, - rename: (decl) => - decl.originalName == 'sum' ? 'add' : decl.originalName, - ), output: Output( dartFile: Uri.file('unused.dart'), style: const NativeExternalBindings(), diff --git a/pkgs/ffigen/test/header_parser_tests/sort_test.dart b/pkgs/ffigen/test/header_parser_tests/sort_test.dart index 92a6c79023..bca6438f15 100644 --- a/pkgs/ffigen/test/header_parser_tests/sort_test.dart +++ b/pkgs/ffigen/test/header_parser_tests/sort_test.dart @@ -31,12 +31,8 @@ void main() { ), ], ), - structs: Structs.includeAll, - unions: Unions.includeAll, - typedefs: Typedefs( - include: (Declaration decl) => true, - includeUnused: true, - ), + visitors: const [IncludeAllVisitor()], + typedefs: const Typedefs(includeUnused: true), ), ), ); diff --git a/pkgs/ffigen/test/header_parser_tests/static_const_test.dart b/pkgs/ffigen/test/header_parser_tests/static_const_test.dart index a8fb0e4b86..a135cb49ba 100644 --- a/pkgs/ffigen/test/header_parser_tests/static_const_test.dart +++ b/pkgs/ffigen/test/header_parser_tests/static_const_test.dart @@ -185,7 +185,7 @@ Library expectedLibrary() { final myFlags = Typealias( name: 'MyFlags', type: NativeType(SupportedNativeType.uint64), - ); + )..generateBindings = true; final myBufferUsage = Typealias(name: 'MyBufferUsage', type: myFlags); return Library( diff --git a/pkgs/ffigen/test/large_integration_tests/_expected_cjson_bindings.dart b/pkgs/ffigen/test/large_integration_tests/_expected_cjson_bindings.dart index b2e87d134f..dc0a0df2be 100644 --- a/pkgs/ffigen/test/large_integration_tests/_expected_cjson_bindings.dart +++ b/pkgs/ffigen/test/large_integration_tests/_expected_cjson_bindings.dart @@ -2,1298 +2,3 @@ // // Generated by `package:ffigen`. // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package -import 'dart:ffi' as ffi; - -/// Bindings to Cjson. -class CJson { - /// Holds the symbol lookup function. - final ffi.Pointer Function(String symbolName) - _lookup; - - /// The symbols are looked up in [dynamicLibrary]. - CJson(ffi.DynamicLibrary dynamicLibrary) : _lookup = dynamicLibrary.lookup; - - /// The symbols are looked up with [lookup]. - CJson.fromLookup( - ffi.Pointer Function(String symbolName) lookup, - ) : _lookup = lookup; - - ffi.Pointer cJSON_AddArrayToObject( - ffi.Pointer object, - ffi.Pointer name, - ) { - return _cJSON_AddArrayToObject(object, name); - } - - late final _cJSON_AddArrayToObjectPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Pointer) - > - >('cJSON_AddArrayToObject'); - late final _cJSON_AddArrayToObject = _cJSON_AddArrayToObjectPtr - .asFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Pointer) - >(); - - ffi.Pointer cJSON_AddBoolToObject( - ffi.Pointer object, - ffi.Pointer name, - int boolean, - ) { - return _cJSON_AddBoolToObject(object, name, boolean); - } - - late final _cJSON_AddBoolToObjectPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - cJSON_bool, - ) - > - >('cJSON_AddBoolToObject'); - late final _cJSON_AddBoolToObject = _cJSON_AddBoolToObjectPtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ) - >(); - - ffi.Pointer cJSON_AddFalseToObject( - ffi.Pointer object, - ffi.Pointer name, - ) { - return _cJSON_AddFalseToObject(object, name); - } - - late final _cJSON_AddFalseToObjectPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Pointer) - > - >('cJSON_AddFalseToObject'); - late final _cJSON_AddFalseToObject = _cJSON_AddFalseToObjectPtr - .asFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Pointer) - >(); - - void cJSON_AddItemReferenceToArray( - ffi.Pointer array, - ffi.Pointer item, - ) { - return _cJSON_AddItemReferenceToArray(array, item); - } - - late final _cJSON_AddItemReferenceToArrayPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer) - > - >('cJSON_AddItemReferenceToArray'); - late final _cJSON_AddItemReferenceToArray = _cJSON_AddItemReferenceToArrayPtr - .asFunction, ffi.Pointer)>(); - - void cJSON_AddItemReferenceToObject( - ffi.Pointer object, - ffi.Pointer string, - ffi.Pointer item, - ) { - return _cJSON_AddItemReferenceToObject(object, string, item); - } - - late final _cJSON_AddItemReferenceToObjectPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >('cJSON_AddItemReferenceToObject'); - late final _cJSON_AddItemReferenceToObject = - _cJSON_AddItemReferenceToObjectPtr - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); - - void cJSON_AddItemToArray(ffi.Pointer array, ffi.Pointer item) { - return _cJSON_AddItemToArray(array, item); - } - - late final _cJSON_AddItemToArrayPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer) - > - >('cJSON_AddItemToArray'); - late final _cJSON_AddItemToArray = _cJSON_AddItemToArrayPtr - .asFunction, ffi.Pointer)>(); - - void cJSON_AddItemToObject( - ffi.Pointer object, - ffi.Pointer string, - ffi.Pointer item, - ) { - return _cJSON_AddItemToObject(object, string, item); - } - - late final _cJSON_AddItemToObjectPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >('cJSON_AddItemToObject'); - late final _cJSON_AddItemToObject = _cJSON_AddItemToObjectPtr - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); - - void cJSON_AddItemToObjectCS( - ffi.Pointer object, - ffi.Pointer string, - ffi.Pointer item, - ) { - return _cJSON_AddItemToObjectCS(object, string, item); - } - - late final _cJSON_AddItemToObjectCSPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >('cJSON_AddItemToObjectCS'); - late final _cJSON_AddItemToObjectCS = _cJSON_AddItemToObjectCSPtr - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); - - ffi.Pointer cJSON_AddNullToObject( - ffi.Pointer object, - ffi.Pointer name, - ) { - return _cJSON_AddNullToObject(object, name); - } - - late final _cJSON_AddNullToObjectPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Pointer) - > - >('cJSON_AddNullToObject'); - late final _cJSON_AddNullToObject = _cJSON_AddNullToObjectPtr - .asFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Pointer) - >(); - - ffi.Pointer cJSON_AddNumberToObject( - ffi.Pointer object, - ffi.Pointer name, - double number, - ) { - return _cJSON_AddNumberToObject(object, name, number); - } - - late final _cJSON_AddNumberToObjectPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Double, - ) - > - >('cJSON_AddNumberToObject'); - late final _cJSON_AddNumberToObject = _cJSON_AddNumberToObjectPtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - double, - ) - >(); - - ffi.Pointer cJSON_AddObjectToObject( - ffi.Pointer object, - ffi.Pointer name, - ) { - return _cJSON_AddObjectToObject(object, name); - } - - late final _cJSON_AddObjectToObjectPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Pointer) - > - >('cJSON_AddObjectToObject'); - late final _cJSON_AddObjectToObject = _cJSON_AddObjectToObjectPtr - .asFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Pointer) - >(); - - ffi.Pointer cJSON_AddRawToObject( - ffi.Pointer object, - ffi.Pointer name, - ffi.Pointer raw, - ) { - return _cJSON_AddRawToObject(object, name, raw); - } - - late final _cJSON_AddRawToObjectPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >('cJSON_AddRawToObject'); - late final _cJSON_AddRawToObject = _cJSON_AddRawToObjectPtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); - - ffi.Pointer cJSON_AddStringToObject( - ffi.Pointer object, - ffi.Pointer name, - ffi.Pointer string, - ) { - return _cJSON_AddStringToObject(object, name, string); - } - - late final _cJSON_AddStringToObjectPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >('cJSON_AddStringToObject'); - late final _cJSON_AddStringToObject = _cJSON_AddStringToObjectPtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); - - ffi.Pointer cJSON_AddTrueToObject( - ffi.Pointer object, - ffi.Pointer name, - ) { - return _cJSON_AddTrueToObject(object, name); - } - - late final _cJSON_AddTrueToObjectPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Pointer) - > - >('cJSON_AddTrueToObject'); - late final _cJSON_AddTrueToObject = _cJSON_AddTrueToObjectPtr - .asFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Pointer) - >(); - - int cJSON_Compare( - ffi.Pointer a, - ffi.Pointer b, - int case_sensitive, - ) { - return _cJSON_Compare(a, b, case_sensitive); - } - - late final _cJSON_ComparePtr = - _lookup< - ffi.NativeFunction< - cJSON_bool Function( - ffi.Pointer, - ffi.Pointer, - cJSON_bool, - ) - > - >('cJSON_Compare'); - late final _cJSON_Compare = _cJSON_ComparePtr - .asFunction, ffi.Pointer, int)>(); - - ffi.Pointer cJSON_CreateArray() { - return _cJSON_CreateArray(); - } - - late final _cJSON_CreateArrayPtr = - _lookup Function()>>( - 'cJSON_CreateArray', - ); - late final _cJSON_CreateArray = _cJSON_CreateArrayPtr - .asFunction Function()>(); - - ffi.Pointer cJSON_CreateArrayReference(ffi.Pointer child) { - return _cJSON_CreateArrayReference(child); - } - - late final _cJSON_CreateArrayReferencePtr = - _lookup< - ffi.NativeFunction Function(ffi.Pointer)> - >('cJSON_CreateArrayReference'); - late final _cJSON_CreateArrayReference = _cJSON_CreateArrayReferencePtr - .asFunction Function(ffi.Pointer)>(); - - ffi.Pointer cJSON_CreateBool(int boolean) { - return _cJSON_CreateBool(boolean); - } - - late final _cJSON_CreateBoolPtr = - _lookup Function(cJSON_bool)>>( - 'cJSON_CreateBool', - ); - late final _cJSON_CreateBool = _cJSON_CreateBoolPtr - .asFunction Function(int)>(); - - ffi.Pointer cJSON_CreateDoubleArray( - ffi.Pointer numbers, - int count, - ) { - return _cJSON_CreateDoubleArray(numbers, count); - } - - late final _cJSON_CreateDoubleArrayPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Int) - > - >('cJSON_CreateDoubleArray'); - late final _cJSON_CreateDoubleArray = _cJSON_CreateDoubleArrayPtr - .asFunction Function(ffi.Pointer, int)>(); - - ffi.Pointer cJSON_CreateFalse() { - return _cJSON_CreateFalse(); - } - - late final _cJSON_CreateFalsePtr = - _lookup Function()>>( - 'cJSON_CreateFalse', - ); - late final _cJSON_CreateFalse = _cJSON_CreateFalsePtr - .asFunction Function()>(); - - ffi.Pointer cJSON_CreateFloatArray( - ffi.Pointer numbers, - int count, - ) { - return _cJSON_CreateFloatArray(numbers, count); - } - - late final _cJSON_CreateFloatArrayPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Int) - > - >('cJSON_CreateFloatArray'); - late final _cJSON_CreateFloatArray = _cJSON_CreateFloatArrayPtr - .asFunction Function(ffi.Pointer, int)>(); - - ffi.Pointer cJSON_CreateIntArray( - ffi.Pointer numbers, - int count, - ) { - return _cJSON_CreateIntArray(numbers, count); - } - - late final _cJSON_CreateIntArrayPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Int) - > - >('cJSON_CreateIntArray'); - late final _cJSON_CreateIntArray = _cJSON_CreateIntArrayPtr - .asFunction Function(ffi.Pointer, int)>(); - - ffi.Pointer cJSON_CreateNull() { - return _cJSON_CreateNull(); - } - - late final _cJSON_CreateNullPtr = - _lookup Function()>>( - 'cJSON_CreateNull', - ); - late final _cJSON_CreateNull = _cJSON_CreateNullPtr - .asFunction Function()>(); - - ffi.Pointer cJSON_CreateNumber(double num) { - return _cJSON_CreateNumber(num); - } - - late final _cJSON_CreateNumberPtr = - _lookup Function(ffi.Double)>>( - 'cJSON_CreateNumber', - ); - late final _cJSON_CreateNumber = _cJSON_CreateNumberPtr - .asFunction Function(double)>(); - - ffi.Pointer cJSON_CreateObject() { - return _cJSON_CreateObject(); - } - - late final _cJSON_CreateObjectPtr = - _lookup Function()>>( - 'cJSON_CreateObject', - ); - late final _cJSON_CreateObject = _cJSON_CreateObjectPtr - .asFunction Function()>(); - - ffi.Pointer cJSON_CreateObjectReference(ffi.Pointer child) { - return _cJSON_CreateObjectReference(child); - } - - late final _cJSON_CreateObjectReferencePtr = - _lookup< - ffi.NativeFunction Function(ffi.Pointer)> - >('cJSON_CreateObjectReference'); - late final _cJSON_CreateObjectReference = _cJSON_CreateObjectReferencePtr - .asFunction Function(ffi.Pointer)>(); - - ffi.Pointer cJSON_CreateRaw(ffi.Pointer raw) { - return _cJSON_CreateRaw(raw); - } - - late final _cJSON_CreateRawPtr = - _lookup< - ffi.NativeFunction Function(ffi.Pointer)> - >('cJSON_CreateRaw'); - late final _cJSON_CreateRaw = _cJSON_CreateRawPtr - .asFunction Function(ffi.Pointer)>(); - - ffi.Pointer cJSON_CreateString(ffi.Pointer string) { - return _cJSON_CreateString(string); - } - - late final _cJSON_CreateStringPtr = - _lookup< - ffi.NativeFunction Function(ffi.Pointer)> - >('cJSON_CreateString'); - late final _cJSON_CreateString = _cJSON_CreateStringPtr - .asFunction Function(ffi.Pointer)>(); - - ffi.Pointer cJSON_CreateStringArray( - ffi.Pointer> strings, - int count, - ) { - return _cJSON_CreateStringArray(strings, count); - } - - late final _cJSON_CreateStringArrayPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer>, - ffi.Int, - ) - > - >('cJSON_CreateStringArray'); - late final _cJSON_CreateStringArray = _cJSON_CreateStringArrayPtr - .asFunction< - ffi.Pointer Function(ffi.Pointer>, int) - >(); - - ffi.Pointer cJSON_CreateStringReference(ffi.Pointer string) { - return _cJSON_CreateStringReference(string); - } - - late final _cJSON_CreateStringReferencePtr = - _lookup< - ffi.NativeFunction Function(ffi.Pointer)> - >('cJSON_CreateStringReference'); - late final _cJSON_CreateStringReference = _cJSON_CreateStringReferencePtr - .asFunction Function(ffi.Pointer)>(); - - ffi.Pointer cJSON_CreateTrue() { - return _cJSON_CreateTrue(); - } - - late final _cJSON_CreateTruePtr = - _lookup Function()>>( - 'cJSON_CreateTrue', - ); - late final _cJSON_CreateTrue = _cJSON_CreateTruePtr - .asFunction Function()>(); - - void cJSON_Delete(ffi.Pointer item) { - return _cJSON_Delete(item); - } - - late final _cJSON_DeletePtr = - _lookup)>>( - 'cJSON_Delete', - ); - late final _cJSON_Delete = _cJSON_DeletePtr - .asFunction)>(); - - void cJSON_DeleteItemFromArray(ffi.Pointer array, int which) { - return _cJSON_DeleteItemFromArray(array, which); - } - - late final _cJSON_DeleteItemFromArrayPtr = - _lookup< - ffi.NativeFunction, ffi.Int)> - >('cJSON_DeleteItemFromArray'); - late final _cJSON_DeleteItemFromArray = _cJSON_DeleteItemFromArrayPtr - .asFunction, int)>(); - - void cJSON_DeleteItemFromObject( - ffi.Pointer object, - ffi.Pointer string, - ) { - return _cJSON_DeleteItemFromObject(object, string); - } - - late final _cJSON_DeleteItemFromObjectPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer) - > - >('cJSON_DeleteItemFromObject'); - late final _cJSON_DeleteItemFromObject = _cJSON_DeleteItemFromObjectPtr - .asFunction, ffi.Pointer)>(); - - void cJSON_DeleteItemFromObjectCaseSensitive( - ffi.Pointer object, - ffi.Pointer string, - ) { - return _cJSON_DeleteItemFromObjectCaseSensitive(object, string); - } - - late final _cJSON_DeleteItemFromObjectCaseSensitivePtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer) - > - >('cJSON_DeleteItemFromObjectCaseSensitive'); - late final _cJSON_DeleteItemFromObjectCaseSensitive = - _cJSON_DeleteItemFromObjectCaseSensitivePtr - .asFunction< - void Function(ffi.Pointer, ffi.Pointer) - >(); - - ffi.Pointer cJSON_DetachItemFromArray( - ffi.Pointer array, - int which, - ) { - return _cJSON_DetachItemFromArray(array, which); - } - - late final _cJSON_DetachItemFromArrayPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Int) - > - >('cJSON_DetachItemFromArray'); - late final _cJSON_DetachItemFromArray = _cJSON_DetachItemFromArrayPtr - .asFunction Function(ffi.Pointer, int)>(); - - ffi.Pointer cJSON_DetachItemFromObject( - ffi.Pointer object, - ffi.Pointer string, - ) { - return _cJSON_DetachItemFromObject(object, string); - } - - late final _cJSON_DetachItemFromObjectPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Pointer) - > - >('cJSON_DetachItemFromObject'); - late final _cJSON_DetachItemFromObject = _cJSON_DetachItemFromObjectPtr - .asFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Pointer) - >(); - - ffi.Pointer cJSON_DetachItemFromObjectCaseSensitive( - ffi.Pointer object, - ffi.Pointer string, - ) { - return _cJSON_DetachItemFromObjectCaseSensitive(object, string); - } - - late final _cJSON_DetachItemFromObjectCaseSensitivePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Pointer) - > - >('cJSON_DetachItemFromObjectCaseSensitive'); - late final _cJSON_DetachItemFromObjectCaseSensitive = - _cJSON_DetachItemFromObjectCaseSensitivePtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); - - ffi.Pointer cJSON_DetachItemViaPointer( - ffi.Pointer parent, - ffi.Pointer item, - ) { - return _cJSON_DetachItemViaPointer(parent, item); - } - - late final _cJSON_DetachItemViaPointerPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Pointer) - > - >('cJSON_DetachItemViaPointer'); - late final _cJSON_DetachItemViaPointer = _cJSON_DetachItemViaPointerPtr - .asFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Pointer) - >(); - - ffi.Pointer cJSON_Duplicate(ffi.Pointer item, int recurse) { - return _cJSON_Duplicate(item, recurse); - } - - late final _cJSON_DuplicatePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, cJSON_bool) - > - >('cJSON_Duplicate'); - late final _cJSON_Duplicate = _cJSON_DuplicatePtr - .asFunction Function(ffi.Pointer, int)>(); - - ffi.Pointer cJSON_GetArrayItem(ffi.Pointer array, int index) { - return _cJSON_GetArrayItem(array, index); - } - - late final _cJSON_GetArrayItemPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Int) - > - >('cJSON_GetArrayItem'); - late final _cJSON_GetArrayItem = _cJSON_GetArrayItemPtr - .asFunction Function(ffi.Pointer, int)>(); - - int cJSON_GetArraySize(ffi.Pointer array) { - return _cJSON_GetArraySize(array); - } - - late final _cJSON_GetArraySizePtr = - _lookup)>>( - 'cJSON_GetArraySize', - ); - late final _cJSON_GetArraySize = _cJSON_GetArraySizePtr - .asFunction)>(); - - ffi.Pointer cJSON_GetErrorPtr() { - return _cJSON_GetErrorPtr(); - } - - late final _cJSON_GetErrorPtrPtr = - _lookup Function()>>( - 'cJSON_GetErrorPtr', - ); - late final _cJSON_GetErrorPtr = _cJSON_GetErrorPtrPtr - .asFunction Function()>(); - - ffi.Pointer cJSON_GetObjectItem( - ffi.Pointer object, - ffi.Pointer string, - ) { - return _cJSON_GetObjectItem(object, string); - } - - late final _cJSON_GetObjectItemPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Pointer) - > - >('cJSON_GetObjectItem'); - late final _cJSON_GetObjectItem = _cJSON_GetObjectItemPtr - .asFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Pointer) - >(); - - ffi.Pointer cJSON_GetObjectItemCaseSensitive( - ffi.Pointer object, - ffi.Pointer string, - ) { - return _cJSON_GetObjectItemCaseSensitive(object, string); - } - - late final _cJSON_GetObjectItemCaseSensitivePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Pointer) - > - >('cJSON_GetObjectItemCaseSensitive'); - late final _cJSON_GetObjectItemCaseSensitive = - _cJSON_GetObjectItemCaseSensitivePtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); - - ffi.Pointer cJSON_GetStringValue(ffi.Pointer item) { - return _cJSON_GetStringValue(item); - } - - late final _cJSON_GetStringValuePtr = - _lookup< - ffi.NativeFunction Function(ffi.Pointer)> - >('cJSON_GetStringValue'); - late final _cJSON_GetStringValue = _cJSON_GetStringValuePtr - .asFunction Function(ffi.Pointer)>(); - - int cJSON_HasObjectItem( - ffi.Pointer object, - ffi.Pointer string, - ) { - return _cJSON_HasObjectItem(object, string); - } - - late final _cJSON_HasObjectItemPtr = - _lookup< - ffi.NativeFunction< - cJSON_bool Function(ffi.Pointer, ffi.Pointer) - > - >('cJSON_HasObjectItem'); - late final _cJSON_HasObjectItem = _cJSON_HasObjectItemPtr - .asFunction, ffi.Pointer)>(); - - void cJSON_InitHooks(ffi.Pointer hooks) { - return _cJSON_InitHooks(hooks); - } - - late final _cJSON_InitHooksPtr = - _lookup)>>( - 'cJSON_InitHooks', - ); - late final _cJSON_InitHooks = _cJSON_InitHooksPtr - .asFunction)>(); - - void cJSON_InsertItemInArray( - ffi.Pointer array, - int which, - ffi.Pointer newitem, - ) { - return _cJSON_InsertItemInArray(array, which, newitem); - } - - late final _cJSON_InsertItemInArrayPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Int, ffi.Pointer) - > - >('cJSON_InsertItemInArray'); - late final _cJSON_InsertItemInArray = _cJSON_InsertItemInArrayPtr - .asFunction, int, ffi.Pointer)>(); - - int cJSON_IsArray(ffi.Pointer item) { - return _cJSON_IsArray(item); - } - - late final _cJSON_IsArrayPtr = - _lookup)>>( - 'cJSON_IsArray', - ); - late final _cJSON_IsArray = _cJSON_IsArrayPtr - .asFunction)>(); - - int cJSON_IsBool(ffi.Pointer item) { - return _cJSON_IsBool(item); - } - - late final _cJSON_IsBoolPtr = - _lookup)>>( - 'cJSON_IsBool', - ); - late final _cJSON_IsBool = _cJSON_IsBoolPtr - .asFunction)>(); - - int cJSON_IsFalse(ffi.Pointer item) { - return _cJSON_IsFalse(item); - } - - late final _cJSON_IsFalsePtr = - _lookup)>>( - 'cJSON_IsFalse', - ); - late final _cJSON_IsFalse = _cJSON_IsFalsePtr - .asFunction)>(); - - int cJSON_IsInvalid(ffi.Pointer item) { - return _cJSON_IsInvalid(item); - } - - late final _cJSON_IsInvalidPtr = - _lookup)>>( - 'cJSON_IsInvalid', - ); - late final _cJSON_IsInvalid = _cJSON_IsInvalidPtr - .asFunction)>(); - - int cJSON_IsNull(ffi.Pointer item) { - return _cJSON_IsNull(item); - } - - late final _cJSON_IsNullPtr = - _lookup)>>( - 'cJSON_IsNull', - ); - late final _cJSON_IsNull = _cJSON_IsNullPtr - .asFunction)>(); - - int cJSON_IsNumber(ffi.Pointer item) { - return _cJSON_IsNumber(item); - } - - late final _cJSON_IsNumberPtr = - _lookup)>>( - 'cJSON_IsNumber', - ); - late final _cJSON_IsNumber = _cJSON_IsNumberPtr - .asFunction)>(); - - int cJSON_IsObject(ffi.Pointer item) { - return _cJSON_IsObject(item); - } - - late final _cJSON_IsObjectPtr = - _lookup)>>( - 'cJSON_IsObject', - ); - late final _cJSON_IsObject = _cJSON_IsObjectPtr - .asFunction)>(); - - int cJSON_IsRaw(ffi.Pointer item) { - return _cJSON_IsRaw(item); - } - - late final _cJSON_IsRawPtr = - _lookup)>>( - 'cJSON_IsRaw', - ); - late final _cJSON_IsRaw = _cJSON_IsRawPtr - .asFunction)>(); - - int cJSON_IsString(ffi.Pointer item) { - return _cJSON_IsString(item); - } - - late final _cJSON_IsStringPtr = - _lookup)>>( - 'cJSON_IsString', - ); - late final _cJSON_IsString = _cJSON_IsStringPtr - .asFunction)>(); - - int cJSON_IsTrue(ffi.Pointer item) { - return _cJSON_IsTrue(item); - } - - late final _cJSON_IsTruePtr = - _lookup)>>( - 'cJSON_IsTrue', - ); - late final _cJSON_IsTrue = _cJSON_IsTruePtr - .asFunction)>(); - - void cJSON_Minify(ffi.Pointer json) { - return _cJSON_Minify(json); - } - - late final _cJSON_MinifyPtr = - _lookup)>>( - 'cJSON_Minify', - ); - late final _cJSON_Minify = _cJSON_MinifyPtr - .asFunction)>(); - - ffi.Pointer cJSON_Parse(ffi.Pointer value) { - return _cJSON_Parse(value); - } - - late final _cJSON_ParsePtr = - _lookup< - ffi.NativeFunction Function(ffi.Pointer)> - >('cJSON_Parse'); - late final _cJSON_Parse = _cJSON_ParsePtr - .asFunction Function(ffi.Pointer)>(); - - ffi.Pointer cJSON_ParseWithOpts( - ffi.Pointer value, - ffi.Pointer> return_parse_end, - int require_null_terminated, - ) { - return _cJSON_ParseWithOpts( - value, - return_parse_end, - require_null_terminated, - ); - } - - late final _cJSON_ParseWithOptsPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer>, - cJSON_bool, - ) - > - >('cJSON_ParseWithOpts'); - late final _cJSON_ParseWithOpts = _cJSON_ParseWithOptsPtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer>, - int, - ) - >(); - - ffi.Pointer cJSON_Print(ffi.Pointer item) { - return _cJSON_Print(item); - } - - late final _cJSON_PrintPtr = - _lookup< - ffi.NativeFunction Function(ffi.Pointer)> - >('cJSON_Print'); - late final _cJSON_Print = _cJSON_PrintPtr - .asFunction Function(ffi.Pointer)>(); - - ffi.Pointer cJSON_PrintBuffered( - ffi.Pointer item, - int prebuffer, - int fmt, - ) { - return _cJSON_PrintBuffered(item, prebuffer, fmt); - } - - late final _cJSON_PrintBufferedPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Int, - cJSON_bool, - ) - > - >('cJSON_PrintBuffered'); - late final _cJSON_PrintBuffered = _cJSON_PrintBufferedPtr - .asFunction< - ffi.Pointer Function(ffi.Pointer, int, int) - >(); - - int cJSON_PrintPreallocated( - ffi.Pointer item, - ffi.Pointer buffer, - int length, - int format, - ) { - return _cJSON_PrintPreallocated(item, buffer, length, format); - } - - late final _cJSON_PrintPreallocatedPtr = - _lookup< - ffi.NativeFunction< - cJSON_bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - cJSON_bool, - ) - > - >('cJSON_PrintPreallocated'); - late final _cJSON_PrintPreallocated = _cJSON_PrintPreallocatedPtr - .asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, int) - >(); - - ffi.Pointer cJSON_PrintUnformatted(ffi.Pointer item) { - return _cJSON_PrintUnformatted(item); - } - - late final _cJSON_PrintUnformattedPtr = - _lookup< - ffi.NativeFunction Function(ffi.Pointer)> - >('cJSON_PrintUnformatted'); - late final _cJSON_PrintUnformatted = _cJSON_PrintUnformattedPtr - .asFunction Function(ffi.Pointer)>(); - - void cJSON_ReplaceItemInArray( - ffi.Pointer array, - int which, - ffi.Pointer newitem, - ) { - return _cJSON_ReplaceItemInArray(array, which, newitem); - } - - late final _cJSON_ReplaceItemInArrayPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Int, ffi.Pointer) - > - >('cJSON_ReplaceItemInArray'); - late final _cJSON_ReplaceItemInArray = _cJSON_ReplaceItemInArrayPtr - .asFunction, int, ffi.Pointer)>(); - - void cJSON_ReplaceItemInObject( - ffi.Pointer object, - ffi.Pointer string, - ffi.Pointer newitem, - ) { - return _cJSON_ReplaceItemInObject(object, string, newitem); - } - - late final _cJSON_ReplaceItemInObjectPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >('cJSON_ReplaceItemInObject'); - late final _cJSON_ReplaceItemInObject = _cJSON_ReplaceItemInObjectPtr - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); - - void cJSON_ReplaceItemInObjectCaseSensitive( - ffi.Pointer object, - ffi.Pointer string, - ffi.Pointer newitem, - ) { - return _cJSON_ReplaceItemInObjectCaseSensitive(object, string, newitem); - } - - late final _cJSON_ReplaceItemInObjectCaseSensitivePtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >('cJSON_ReplaceItemInObjectCaseSensitive'); - late final _cJSON_ReplaceItemInObjectCaseSensitive = - _cJSON_ReplaceItemInObjectCaseSensitivePtr - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); - - int cJSON_ReplaceItemViaPointer( - ffi.Pointer parent, - ffi.Pointer item, - ffi.Pointer replacement, - ) { - return _cJSON_ReplaceItemViaPointer(parent, item, replacement); - } - - late final _cJSON_ReplaceItemViaPointerPtr = - _lookup< - ffi.NativeFunction< - cJSON_bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >('cJSON_ReplaceItemViaPointer'); - late final _cJSON_ReplaceItemViaPointer = _cJSON_ReplaceItemViaPointerPtr - .asFunction< - int Function(ffi.Pointer, ffi.Pointer, ffi.Pointer) - >(); - - double cJSON_SetNumberHelper(ffi.Pointer object, double number) { - return _cJSON_SetNumberHelper(object, number); - } - - late final _cJSON_SetNumberHelperPtr = - _lookup< - ffi.NativeFunction, ffi.Double)> - >('cJSON_SetNumberHelper'); - late final _cJSON_SetNumberHelper = _cJSON_SetNumberHelperPtr - .asFunction, double)>(); - - ffi.Pointer cJSON_Version() { - return _cJSON_Version(); - } - - late final _cJSON_VersionPtr = - _lookup Function()>>( - 'cJSON_Version', - ); - late final _cJSON_Version = _cJSON_VersionPtr - .asFunction Function()>(); - - void cJSON_free(ffi.Pointer object) { - return _cJSON_free(object); - } - - late final _cJSON_freePtr = - _lookup)>>( - 'cJSON_free', - ); - late final _cJSON_free = _cJSON_freePtr - .asFunction)>(); - - ffi.Pointer cJSON_malloc(int size) { - return _cJSON_malloc(size); - } - - late final _cJSON_mallocPtr = - _lookup Function(ffi.Size)>>( - 'cJSON_malloc', - ); - late final _cJSON_malloc = _cJSON_mallocPtr - .asFunction Function(int)>(); -} - -const double CJSON_DOUBLE_PRECISION = 1e-16; - -const int CJSON_NESTING_LIMIT = 1000; - -const int CJSON_VERSION_MAJOR = 1; - -const int CJSON_VERSION_MINOR = 7; - -const int CJSON_VERSION_PATCH = 12; - -final class cJSON extends ffi.Struct { - external ffi.Pointer next; - - external ffi.Pointer prev; - - external ffi.Pointer child; - - @ffi.Int() - external int type; - - external ffi.Pointer valuestring; - - @ffi.Int() - external int valueint; - - @ffi.Double() - external double valuedouble; - - external ffi.Pointer string; - - static ffi.Pointer $allocate( - ffi.Allocator $allocator, { - required ffi.Pointer next, - required ffi.Pointer prev, - required ffi.Pointer child, - required int type, - required ffi.Pointer valuestring, - required int valueint, - required double valuedouble, - required ffi.Pointer string, - }) => $allocator() - ..ref.next = next - ..ref.prev = prev - ..ref.child = child - ..ref.type = type - ..ref.valuestring = valuestring - ..ref.valueint = valueint - ..ref.valuedouble = valuedouble - ..ref.string = string; -} - -const int cJSON_Array = 32; - -const int cJSON_False = 1; - -final class cJSON_Hooks extends ffi.Struct { - external ffi.Pointer< - ffi.NativeFunction Function(ffi.Size sz)> - > - malloc_fn; - - external ffi.Pointer< - ffi.NativeFunction ptr)> - > - free_fn; - - static ffi.Pointer $allocate( - ffi.Allocator $allocator, { - required ffi.Pointer< - ffi.NativeFunction Function(ffi.Size sz)> - > - malloc_fn, - required ffi.Pointer< - ffi.NativeFunction ptr)> - > - free_fn, - }) => $allocator() - ..ref.malloc_fn = malloc_fn - ..ref.free_fn = free_fn; -} - -const int cJSON_Invalid = 0; - -const int cJSON_IsReference = 256; - -const int cJSON_NULL = 4; - -const int cJSON_Number = 8; - -const int cJSON_Object = 64; - -const int cJSON_Raw = 128; - -const int cJSON_String = 16; - -const int cJSON_StringIsConst = 512; - -const int cJSON_True = 2; - -typedef cJSON_bool = ffi.Int; -typedef DartcJSON_bool = int; diff --git a/pkgs/ffigen/test/large_integration_tests/_expected_sqlite_bindings.dart b/pkgs/ffigen/test/large_integration_tests/_expected_sqlite_bindings.dart index d00b72bbf3..dc0a0df2be 100644 --- a/pkgs/ffigen/test/large_integration_tests/_expected_sqlite_bindings.dart +++ b/pkgs/ffigen/test/large_integration_tests/_expected_sqlite_bindings.dart @@ -2,14430 +2,3 @@ // // Generated by `package:ffigen`. // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package -import 'dart:ffi' as ffi; - -/// Bindings to SQLite. -class SQLite { - /// Holds the symbol lookup function. - final ffi.Pointer Function(String symbolName) - _lookup; - - /// The symbols are looked up in [dynamicLibrary]. - SQLite(ffi.DynamicLibrary dynamicLibrary) : _lookup = dynamicLibrary.lookup; - - /// The symbols are looked up with [lookup]. - SQLite.fromLookup( - ffi.Pointer Function(String symbolName) lookup, - ) : _lookup = lookup; - - /// CAPI3REF: Obtain Aggregate Function Context - /// METHOD: sqlite3_context - /// - /// Implementations of aggregate SQL functions use this - /// routine to allocate memory for storing their state. - /// - /// ^The first time the sqlite3_aggregate_context(C,N) routine is called - /// for a particular aggregate function, SQLite allocates - /// N bytes of memory, zeroes out that memory, and returns a pointer - /// to the new memory. ^On second and subsequent calls to - /// sqlite3_aggregate_context() for the same aggregate function instance, - /// the same buffer is returned. Sqlite3_aggregate_context() is normally - /// called once for each invocation of the xStep callback and then one - /// last time when the xFinal callback is invoked. ^(When no rows match - /// an aggregate query, the xStep() callback of the aggregate function - /// implementation is never called and xFinal() is called exactly once. - /// In those cases, sqlite3_aggregate_context() might be called for the - /// first time from within xFinal().)^ - /// - /// ^The sqlite3_aggregate_context(C,N) routine returns a NULL pointer - /// when first called if N is less than or equal to zero or if a memory - /// allocate error occurs. - /// - /// ^(The amount of space allocated by sqlite3_aggregate_context(C,N) is - /// determined by the N parameter on first successful call. Changing the - /// value of N in any subsequent call to sqlite3_aggregate_context() within - /// the same aggregate function instance will not resize the memory - /// allocation.)^ Within the xFinal callback, it is customary to set - /// N=0 in calls to sqlite3_aggregate_context(C,N) so that no - /// pointless memory allocations occur. - /// - /// ^SQLite automatically frees the memory allocated by - /// sqlite3_aggregate_context() when the aggregate query concludes. - /// - /// The first parameter must be a copy of the - /// [sqlite3_context | SQL function context] that is the first parameter - /// to the xStep or xFinal callback routine that implements the aggregate - /// function. - /// - /// This routine must be called from the same thread in which - /// the aggregate SQL function is running. - ffi.Pointer sqlite3_aggregate_context( - ffi.Pointer arg0, - int nBytes, - ) { - return _sqlite3_aggregate_context(arg0, nBytes); - } - - late final _sqlite3_aggregate_contextPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Int) - > - >('sqlite3_aggregate_context'); - late final _sqlite3_aggregate_context = _sqlite3_aggregate_contextPtr - .asFunction< - ffi.Pointer Function(ffi.Pointer, int) - >(); - - int sqlite3_aggregate_count(ffi.Pointer arg0) { - return _sqlite3_aggregate_count(arg0); - } - - late final _sqlite3_aggregate_countPtr = - _lookup< - ffi.NativeFunction)> - >('sqlite3_aggregate_count'); - late final _sqlite3_aggregate_count = _sqlite3_aggregate_countPtr - .asFunction)>(); - - /// CAPI3REF: Automatically Load Statically Linked Extensions - /// - /// ^This interface causes the xEntryPoint() function to be invoked for - /// each new [database connection] that is created. The idea here is that - /// xEntryPoint() is the entry point for a statically linked [SQLite extension] - /// that is to be automatically loaded into all new database connections. - /// - /// ^(Even though the function prototype shows that xEntryPoint() takes - /// no arguments and returns void, SQLite invokes xEntryPoint() with three - /// arguments and expects an integer result as if the signature of the - /// entry point where as follows: - /// - ///
-  ///    int xEntryPoint(
-  ///      sqlite3 *db,
-  ///      const char **pzErrMsg,
-  ///      const struct sqlite3_api_routines *pThunk
-  ///    );
-  /// 
)^ - /// - /// If the xEntryPoint routine encounters an error, it should make *pzErrMsg - /// point to an appropriate error message (obtained from [sqlite3_mprintf()]) - /// and return an appropriate [error code]. ^SQLite ensures that *pzErrMsg - /// is NULL before calling the xEntryPoint(). ^SQLite will invoke - /// [sqlite3_free()] on *pzErrMsg after xEntryPoint() returns. ^If any - /// xEntryPoint() returns an error, the [sqlite3_open()], [sqlite3_open16()], - /// or [sqlite3_open_v2()] call that provoked the xEntryPoint() will fail. - /// - /// ^Calling sqlite3_auto_extension(X) with an entry point X that is already - /// on the list of automatic extensions is a harmless no-op. ^No entry point - /// will be called more than once for each database connection that is opened. - /// - /// See also: [sqlite3_reset_auto_extension()] - /// and [sqlite3_cancel_auto_extension()] - int sqlite3_auto_extension( - ffi.Pointer> xEntryPoint, - ) { - return _sqlite3_auto_extension(xEntryPoint); - } - - late final _sqlite3_auto_extensionPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>) - > - >('sqlite3_auto_extension'); - late final _sqlite3_auto_extension = _sqlite3_auto_extensionPtr - .asFunction< - int Function(ffi.Pointer>) - >(); - - int sqlite3_backup_finish(ffi.Pointer p) { - return _sqlite3_backup_finish(p); - } - - late final _sqlite3_backup_finishPtr = - _lookup< - ffi.NativeFunction)> - >('sqlite3_backup_finish'); - late final _sqlite3_backup_finish = _sqlite3_backup_finishPtr - .asFunction)>(); - - /// CAPI3REF: Online Backup API. - /// - /// The backup API copies the content of one database into another. - /// It is useful either for creating backups of databases or - /// for copying in-memory databases to or from persistent files. - /// - /// See Also: [Using the SQLite Online Backup API] - /// - /// ^SQLite holds a write transaction open on the destination database file - /// for the duration of the backup operation. - /// ^The source database is read-locked only while it is being read; - /// it is not locked continuously for the entire backup operation. - /// ^Thus, the backup may be performed on a live source database without - /// preventing other database connections from - /// reading or writing to the source database while the backup is underway. - /// - /// ^(To perform a backup operation: - ///
    - ///
  1. sqlite3_backup_init() is called once to initialize the - /// backup, - ///
  2. sqlite3_backup_step() is called one or more times to transfer - /// the data between the two databases, and finally - ///
  3. sqlite3_backup_finish() is called to release all resources - /// associated with the backup operation. - ///
)^ - /// There should be exactly one call to sqlite3_backup_finish() for each - /// successful call to sqlite3_backup_init(). - /// - /// [[sqlite3_backup_init()]] sqlite3_backup_init() - /// - /// ^The D and N arguments to sqlite3_backup_init(D,N,S,M) are the - /// [database connection] associated with the destination database - /// and the database name, respectively. - /// ^The database name is "main" for the main database, "temp" for the - /// temporary database, or the name specified after the AS keyword in - /// an [ATTACH] statement for an attached database. - /// ^The S and M arguments passed to - /// sqlite3_backup_init(D,N,S,M) identify the [database connection] - /// and database name of the source database, respectively. - /// ^The source and destination [database connections] (parameters S and D) - /// must be different or else sqlite3_backup_init(D,N,S,M) will fail with - /// an error. - /// - /// ^A call to sqlite3_backup_init() will fail, returning NULL, if - /// there is already a read or read-write transaction open on the - /// destination database. - /// - /// ^If an error occurs within sqlite3_backup_init(D,N,S,M), then NULL is - /// returned and an error code and error message are stored in the - /// destination [database connection] D. - /// ^The error code and message for the failed call to sqlite3_backup_init() - /// can be retrieved using the [sqlite3_errcode()], [sqlite3_errmsg()], and/or - /// [sqlite3_errmsg16()] functions. - /// ^A successful call to sqlite3_backup_init() returns a pointer to an - /// [sqlite3_backup] object. - /// ^The [sqlite3_backup] object may be used with the sqlite3_backup_step() and - /// sqlite3_backup_finish() functions to perform the specified backup - /// operation. - /// - /// [[sqlite3_backup_step()]] sqlite3_backup_step() - /// - /// ^Function sqlite3_backup_step(B,N) will copy up to N pages between - /// the source and destination databases specified by [sqlite3_backup] object B. - /// ^If N is negative, all remaining source pages are copied. - /// ^If sqlite3_backup_step(B,N) successfully copies N pages and there - /// are still more pages to be copied, then the function returns [SQLITE_OK]. - /// ^If sqlite3_backup_step(B,N) successfully finishes copying all pages - /// from source to destination, then it returns [SQLITE_DONE]. - /// ^If an error occurs while running sqlite3_backup_step(B,N), - /// then an [error code] is returned. ^As well as [SQLITE_OK] and - /// [SQLITE_DONE], a call to sqlite3_backup_step() may return [SQLITE_READONLY], - /// [SQLITE_NOMEM], [SQLITE_BUSY], [SQLITE_LOCKED], or an - /// [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX] extended error code. - /// - /// ^(The sqlite3_backup_step() might return [SQLITE_READONLY] if - ///
    - ///
  1. the destination database was opened read-only, or - ///
  2. the destination database is using write-ahead-log journaling - /// and the destination and source page sizes differ, or - ///
  3. the destination database is an in-memory database and the - /// destination and source page sizes differ. - ///
)^ - /// - /// ^If sqlite3_backup_step() cannot obtain a required file-system lock, then - /// the [sqlite3_busy_handler | busy-handler function] - /// is invoked (if one is specified). ^If the - /// busy-handler returns non-zero before the lock is available, then - /// [SQLITE_BUSY] is returned to the caller. ^In this case the call to - /// sqlite3_backup_step() can be retried later. ^If the source - /// [database connection] - /// is being used to write to the source database when sqlite3_backup_step() - /// is called, then [SQLITE_LOCKED] is returned immediately. ^Again, in this - /// case the call to sqlite3_backup_step() can be retried later on. ^(If - /// [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX], [SQLITE_NOMEM], or - /// [SQLITE_READONLY] is returned, then - /// there is no point in retrying the call to sqlite3_backup_step(). These - /// errors are considered fatal.)^ The application must accept - /// that the backup operation has failed and pass the backup operation handle - /// to the sqlite3_backup_finish() to release associated resources. - /// - /// ^The first call to sqlite3_backup_step() obtains an exclusive lock - /// on the destination file. ^The exclusive lock is not released until either - /// sqlite3_backup_finish() is called or the backup operation is complete - /// and sqlite3_backup_step() returns [SQLITE_DONE]. ^Every call to - /// sqlite3_backup_step() obtains a [shared lock] on the source database that - /// lasts for the duration of the sqlite3_backup_step() call. - /// ^Because the source database is not locked between calls to - /// sqlite3_backup_step(), the source database may be modified mid-way - /// through the backup process. ^If the source database is modified by an - /// external process or via a database connection other than the one being - /// used by the backup operation, then the backup will be automatically - /// restarted by the next call to sqlite3_backup_step(). ^If the source - /// database is modified by the using the same database connection as is used - /// by the backup operation, then the backup database is automatically - /// updated at the same time. - /// - /// [[sqlite3_backup_finish()]] sqlite3_backup_finish() - /// - /// When sqlite3_backup_step() has returned [SQLITE_DONE], or when the - /// application wishes to abandon the backup operation, the application - /// should destroy the [sqlite3_backup] by passing it to sqlite3_backup_finish(). - /// ^The sqlite3_backup_finish() interfaces releases all - /// resources associated with the [sqlite3_backup] object. - /// ^If sqlite3_backup_step() has not yet returned [SQLITE_DONE], then any - /// active write-transaction on the destination database is rolled back. - /// The [sqlite3_backup] object is invalid - /// and may not be used following a call to sqlite3_backup_finish(). - /// - /// ^The value returned by sqlite3_backup_finish is [SQLITE_OK] if no - /// sqlite3_backup_step() errors occurred, regardless or whether or not - /// sqlite3_backup_step() completed. - /// ^If an out-of-memory condition or IO error occurred during any prior - /// sqlite3_backup_step() call on the same [sqlite3_backup] object, then - /// sqlite3_backup_finish() returns the corresponding [error code]. - /// - /// ^A return of [SQLITE_BUSY] or [SQLITE_LOCKED] from sqlite3_backup_step() - /// is not a permanent error and does not affect the return value of - /// sqlite3_backup_finish(). - /// - /// [[sqlite3_backup_remaining()]] [[sqlite3_backup_pagecount()]] - /// sqlite3_backup_remaining() and sqlite3_backup_pagecount() - /// - /// ^The sqlite3_backup_remaining() routine returns the number of pages still - /// to be backed up at the conclusion of the most recent sqlite3_backup_step(). - /// ^The sqlite3_backup_pagecount() routine returns the total number of pages - /// in the source database at the conclusion of the most recent - /// sqlite3_backup_step(). - /// ^(The values returned by these functions are only updated by - /// sqlite3_backup_step(). If the source database is modified in a way that - /// changes the size of the source database or the number of pages remaining, - /// those changes are not reflected in the output of sqlite3_backup_pagecount() - /// and sqlite3_backup_remaining() until after the next - /// sqlite3_backup_step().)^ - /// - /// Concurrent Usage of Database Handles - /// - /// ^The source [database connection] may be used by the application for other - /// purposes while a backup operation is underway or being initialized. - /// ^If SQLite is compiled and configured to support threadsafe database - /// connections, then the source database connection may be used concurrently - /// from within other threads. - /// - /// However, the application must guarantee that the destination - /// [database connection] is not passed to any other API (by any thread) after - /// sqlite3_backup_init() is called and before the corresponding call to - /// sqlite3_backup_finish(). SQLite does not currently check to see - /// if the application incorrectly accesses the destination [database connection] - /// and so no error code is reported, but the operations may malfunction - /// nevertheless. Use of the destination database connection while a - /// backup is in progress might also also cause a mutex deadlock. - /// - /// If running in [shared cache mode], the application must - /// guarantee that the shared cache used by the destination database - /// is not accessed while the backup is running. In practice this means - /// that the application must guarantee that the disk file being - /// backed up to is not accessed by any connection within the process, - /// not just the specific connection that was passed to sqlite3_backup_init(). - /// - /// The [sqlite3_backup] object itself is partially threadsafe. Multiple - /// threads may safely make multiple concurrent calls to sqlite3_backup_step(). - /// However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount() - /// APIs are not strictly speaking threadsafe. If they are invoked at the - /// same time as another thread is invoking sqlite3_backup_step() it is - /// possible that they return invalid values. - ffi.Pointer sqlite3_backup_init( - ffi.Pointer pDest, - ffi.Pointer zDestName, - ffi.Pointer pSource, - ffi.Pointer zSourceName, - ) { - return _sqlite3_backup_init(pDest, zDestName, pSource, zSourceName); - } - - late final _sqlite3_backup_initPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >('sqlite3_backup_init'); - late final _sqlite3_backup_init = _sqlite3_backup_initPtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); - - int sqlite3_backup_pagecount(ffi.Pointer p) { - return _sqlite3_backup_pagecount(p); - } - - late final _sqlite3_backup_pagecountPtr = - _lookup< - ffi.NativeFunction)> - >('sqlite3_backup_pagecount'); - late final _sqlite3_backup_pagecount = _sqlite3_backup_pagecountPtr - .asFunction)>(); - - int sqlite3_backup_remaining(ffi.Pointer p) { - return _sqlite3_backup_remaining(p); - } - - late final _sqlite3_backup_remainingPtr = - _lookup< - ffi.NativeFunction)> - >('sqlite3_backup_remaining'); - late final _sqlite3_backup_remaining = _sqlite3_backup_remainingPtr - .asFunction)>(); - - int sqlite3_backup_step(ffi.Pointer p, int nPage) { - return _sqlite3_backup_step(p, nPage); - } - - late final _sqlite3_backup_stepPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int) - > - >('sqlite3_backup_step'); - late final _sqlite3_backup_step = _sqlite3_backup_stepPtr - .asFunction, int)>(); - - /// CAPI3REF: Binding Values To Prepared Statements - /// KEYWORDS: {host parameter} {host parameters} {host parameter name} - /// KEYWORDS: {SQL parameter} {SQL parameters} {parameter binding} - /// METHOD: sqlite3_stmt - /// - /// ^(In the SQL statement text input to [sqlite3_prepare_v2()] and its variants, - /// literals may be replaced by a [parameter] that matches one of following - /// templates: - /// - ///
    - ///
  • ? - ///
  • ?NNN - ///
  • :VVV - ///
  • @VVV - ///
  • $VVV - ///
- /// - /// In the templates above, NNN represents an integer literal, - /// and VVV represents an alphanumeric identifier.)^ ^The values of these - /// parameters (also called "host parameter names" or "SQL parameters") - /// can be set using the sqlite3_bind_*() routines defined here. - /// - /// ^The first argument to the sqlite3_bind_*() routines is always - /// a pointer to the [sqlite3_stmt] object returned from - /// [sqlite3_prepare_v2()] or its variants. - /// - /// ^The second argument is the index of the SQL parameter to be set. - /// ^The leftmost SQL parameter has an index of 1. ^When the same named - /// SQL parameter is used more than once, second and subsequent - /// occurrences have the same index as the first occurrence. - /// ^The index for named parameters can be looked up using the - /// [sqlite3_bind_parameter_index()] API if desired. ^The index - /// for "?NNN" parameters is the value of NNN. - /// ^The NNN value must be between 1 and the [sqlite3_limit()] - /// parameter [SQLITE_LIMIT_VARIABLE_NUMBER] (default value: 32766). - /// - /// ^The third argument is the value to bind to the parameter. - /// ^If the third parameter to sqlite3_bind_text() or sqlite3_bind_text16() - /// or sqlite3_bind_blob() is a NULL pointer then the fourth parameter - /// is ignored and the end result is the same as sqlite3_bind_null(). - /// ^If the third parameter to sqlite3_bind_text() is not NULL, then - /// it should be a pointer to well-formed UTF8 text. - /// ^If the third parameter to sqlite3_bind_text16() is not NULL, then - /// it should be a pointer to well-formed UTF16 text. - /// ^If the third parameter to sqlite3_bind_text64() is not NULL, then - /// it should be a pointer to a well-formed unicode string that is - /// either UTF8 if the sixth parameter is SQLITE_UTF8, or UTF16 - /// otherwise. - /// - /// [[byte-order determination rules]] ^The byte-order of - /// UTF16 input text is determined by the byte-order mark (BOM, U+FEFF) - /// found in first character, which is removed, or in the absence of a BOM - /// the byte order is the native byte order of the host - /// machine for sqlite3_bind_text16() or the byte order specified in - /// the 6th parameter for sqlite3_bind_text64().)^ - /// ^If UTF16 input text contains invalid unicode - /// characters, then SQLite might change those invalid characters - /// into the unicode replacement character: U+FFFD. - /// - /// ^(In those routines that have a fourth argument, its value is the - /// number of bytes in the parameter. To be clear: the value is the - /// number of bytes in the value, not the number of characters.)^ - /// ^If the fourth parameter to sqlite3_bind_text() or sqlite3_bind_text16() - /// is negative, then the length of the string is - /// the number of bytes up to the first zero terminator. - /// If the fourth parameter to sqlite3_bind_blob() is negative, then - /// the behavior is undefined. - /// If a non-negative fourth parameter is provided to sqlite3_bind_text() - /// or sqlite3_bind_text16() or sqlite3_bind_text64() then - /// that parameter must be the byte offset - /// where the NUL terminator would occur assuming the string were NUL - /// terminated. If any NUL characters occurs at byte offsets less than - /// the value of the fourth parameter then the resulting string value will - /// contain embedded NULs. The result of expressions involving strings - /// with embedded NULs is undefined. - /// - /// ^The fifth argument to the BLOB and string binding interfaces - /// is a destructor used to dispose of the BLOB or - /// string after SQLite has finished with it. ^The destructor is called - /// to dispose of the BLOB or string even if the call to the bind API fails, - /// except the destructor is not called if the third parameter is a NULL - /// pointer or the fourth parameter is negative. - /// ^If the fifth argument is - /// the special value [SQLITE_STATIC], then SQLite assumes that the - /// information is in static, unmanaged space and does not need to be freed. - /// ^If the fifth argument has the value [SQLITE_TRANSIENT], then - /// SQLite makes its own private copy of the data immediately, before - /// the sqlite3_bind_*() routine returns. - /// - /// ^The sixth argument to sqlite3_bind_text64() must be one of - /// [SQLITE_UTF8], [SQLITE_UTF16], [SQLITE_UTF16BE], or [SQLITE_UTF16LE] - /// to specify the encoding of the text in the third parameter. If - /// the sixth argument to sqlite3_bind_text64() is not one of the - /// allowed values shown above, or if the text encoding is different - /// from the encoding specified by the sixth parameter, then the behavior - /// is undefined. - /// - /// ^The sqlite3_bind_zeroblob() routine binds a BLOB of length N that - /// is filled with zeroes. ^A zeroblob uses a fixed amount of memory - /// (just an integer to hold its size) while it is being processed. - /// Zeroblobs are intended to serve as placeholders for BLOBs whose - /// content is later written using - /// [sqlite3_blob_open | incremental BLOB I/O] routines. - /// ^A negative value for the zeroblob results in a zero-length BLOB. - /// - /// ^The sqlite3_bind_pointer(S,I,P,T,D) routine causes the I-th parameter in - /// [prepared statement] S to have an SQL value of NULL, but to also be - /// associated with the pointer P of type T. ^D is either a NULL pointer or - /// a pointer to a destructor function for P. ^SQLite will invoke the - /// destructor D with a single argument of P when it is finished using - /// P. The T parameter should be a static string, preferably a string - /// literal. The sqlite3_bind_pointer() routine is part of the - /// [pointer passing interface] added for SQLite 3.20.0. - /// - /// ^If any of the sqlite3_bind_*() routines are called with a NULL pointer - /// for the [prepared statement] or with a prepared statement for which - /// [sqlite3_step()] has been called more recently than [sqlite3_reset()], - /// then the call will return [SQLITE_MISUSE]. If any sqlite3_bind_() - /// routine is passed a [prepared statement] that has been finalized, the - /// result is undefined and probably harmful. - /// - /// ^Bindings are not cleared by the [sqlite3_reset()] routine. - /// ^Unbound parameters are interpreted as NULL. - /// - /// ^The sqlite3_bind_* routines return [SQLITE_OK] on success or an - /// [error code] if anything goes wrong. - /// ^[SQLITE_TOOBIG] might be returned if the size of a string or BLOB - /// exceeds limits imposed by [sqlite3_limit]([SQLITE_LIMIT_LENGTH]) or - /// [SQLITE_MAX_LENGTH]. - /// ^[SQLITE_RANGE] is returned if the parameter - /// index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails. - /// - /// See also: [sqlite3_bind_parameter_count()], - /// [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()]. - int sqlite3_bind_blob( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, - int n, - ffi.Pointer)>> - arg4, - ) { - return _sqlite3_bind_blob(arg0, arg1, arg2, n, arg4); - } - - late final _sqlite3_bind_blobPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Int, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - > - >('sqlite3_bind_blob'); - late final _sqlite3_bind_blob = _sqlite3_bind_blobPtr - .asFunction< - int Function( - ffi.Pointer, - int, - ffi.Pointer, - int, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - >(); - - int sqlite3_bind_blob64( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, - int arg3, - ffi.Pointer)>> - arg4, - ) { - return _sqlite3_bind_blob64(arg0, arg1, arg2, arg3, arg4); - } - - late final _sqlite3_bind_blob64Ptr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - sqlite3_uint64, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - > - >('sqlite3_bind_blob64'); - late final _sqlite3_bind_blob64 = _sqlite3_bind_blob64Ptr - .asFunction< - int Function( - ffi.Pointer, - int, - ffi.Pointer, - int, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - >(); - - int sqlite3_bind_double( - ffi.Pointer arg0, - int arg1, - double arg2, - ) { - return _sqlite3_bind_double(arg0, arg1, arg2); - } - - late final _sqlite3_bind_doublePtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Double) - > - >('sqlite3_bind_double'); - late final _sqlite3_bind_double = _sqlite3_bind_doublePtr - .asFunction, int, double)>(); - - int sqlite3_bind_int(ffi.Pointer arg0, int arg1, int arg2) { - return _sqlite3_bind_int(arg0, arg1, arg2); - } - - late final _sqlite3_bind_intPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Int) - > - >('sqlite3_bind_int'); - late final _sqlite3_bind_int = _sqlite3_bind_intPtr - .asFunction, int, int)>(); - - int sqlite3_bind_int64(ffi.Pointer arg0, int arg1, int arg2) { - return _sqlite3_bind_int64(arg0, arg1, arg2); - } - - late final _sqlite3_bind_int64Ptr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, sqlite3_int64) - > - >('sqlite3_bind_int64'); - late final _sqlite3_bind_int64 = _sqlite3_bind_int64Ptr - .asFunction, int, int)>(); - - int sqlite3_bind_null(ffi.Pointer arg0, int arg1) { - return _sqlite3_bind_null(arg0, arg1); - } - - late final _sqlite3_bind_nullPtr = - _lookup< - ffi.NativeFunction, ffi.Int)> - >('sqlite3_bind_null'); - late final _sqlite3_bind_null = _sqlite3_bind_nullPtr - .asFunction, int)>(); - - /// CAPI3REF: Number Of SQL Parameters - /// METHOD: sqlite3_stmt - /// - /// ^This routine can be used to find the number of [SQL parameters] - /// in a [prepared statement]. SQL parameters are tokens of the - /// form "?", "?NNN", ":AAA", "$AAA", or "@AAA" that serve as - /// placeholders for values that are [sqlite3_bind_blob | bound] - /// to the parameters at a later time. - /// - /// ^(This routine actually returns the index of the largest (rightmost) - /// parameter. For all forms except ?NNN, this will correspond to the - /// number of unique parameters. If parameters of the ?NNN form are used, - /// there may be gaps in the list.)^ - /// - /// See also: [sqlite3_bind_blob|sqlite3_bind()], - /// [sqlite3_bind_parameter_name()], and - /// [sqlite3_bind_parameter_index()]. - int sqlite3_bind_parameter_count(ffi.Pointer arg0) { - return _sqlite3_bind_parameter_count(arg0); - } - - late final _sqlite3_bind_parameter_countPtr = - _lookup)>>( - 'sqlite3_bind_parameter_count', - ); - late final _sqlite3_bind_parameter_count = _sqlite3_bind_parameter_countPtr - .asFunction)>(); - - /// CAPI3REF: Index Of A Parameter With A Given Name - /// METHOD: sqlite3_stmt - /// - /// ^Return the index of an SQL parameter given its name. ^The - /// index value returned is suitable for use as the second - /// parameter to [sqlite3_bind_blob|sqlite3_bind()]. ^A zero - /// is returned if no matching parameter is found. ^The parameter - /// name must be given in UTF-8 even if the original statement - /// was prepared from UTF-16 text using [sqlite3_prepare16_v2()] or - /// [sqlite3_prepare16_v3()]. - /// - /// See also: [sqlite3_bind_blob|sqlite3_bind()], - /// [sqlite3_bind_parameter_count()], and - /// [sqlite3_bind_parameter_name()]. - int sqlite3_bind_parameter_index( - ffi.Pointer arg0, - ffi.Pointer zName, - ) { - return _sqlite3_bind_parameter_index(arg0, zName); - } - - late final _sqlite3_bind_parameter_indexPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer) - > - >('sqlite3_bind_parameter_index'); - late final _sqlite3_bind_parameter_index = _sqlite3_bind_parameter_indexPtr - .asFunction< - int Function(ffi.Pointer, ffi.Pointer) - >(); - - /// CAPI3REF: Name Of A Host Parameter - /// METHOD: sqlite3_stmt - /// - /// ^The sqlite3_bind_parameter_name(P,N) interface returns - /// the name of the N-th [SQL parameter] in the [prepared statement] P. - /// ^(SQL parameters of the form "?NNN" or ":AAA" or "@AAA" or "$AAA" - /// have a name which is the string "?NNN" or ":AAA" or "@AAA" or "$AAA" - /// respectively. - /// In other words, the initial ":" or "$" or "@" or "?" - /// is included as part of the name.)^ - /// ^Parameters of the form "?" without a following integer have no name - /// and are referred to as "nameless" or "anonymous parameters". - /// - /// ^The first host parameter has an index of 1, not 0. - /// - /// ^If the value N is out of range or if the N-th parameter is - /// nameless, then NULL is returned. ^The returned string is - /// always in UTF-8 encoding even if the named parameter was - /// originally specified as UTF-16 in [sqlite3_prepare16()], - /// [sqlite3_prepare16_v2()], or [sqlite3_prepare16_v3()]. - /// - /// See also: [sqlite3_bind_blob|sqlite3_bind()], - /// [sqlite3_bind_parameter_count()], and - /// [sqlite3_bind_parameter_index()]. - ffi.Pointer sqlite3_bind_parameter_name( - ffi.Pointer arg0, - int arg1, - ) { - return _sqlite3_bind_parameter_name(arg0, arg1); - } - - late final _sqlite3_bind_parameter_namePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Int) - > - >('sqlite3_bind_parameter_name'); - late final _sqlite3_bind_parameter_name = _sqlite3_bind_parameter_namePtr - .asFunction< - ffi.Pointer Function(ffi.Pointer, int) - >(); - - int sqlite3_bind_pointer( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer)>> - arg4, - ) { - return _sqlite3_bind_pointer(arg0, arg1, arg2, arg3, arg4); - } - - late final _sqlite3_bind_pointerPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - > - >('sqlite3_bind_pointer'); - late final _sqlite3_bind_pointer = _sqlite3_bind_pointerPtr - .asFunction< - int Function( - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - >(); - - int sqlite3_bind_text( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, - int arg3, - ffi.Pointer)>> - arg4, - ) { - return _sqlite3_bind_text(arg0, arg1, arg2, arg3, arg4); - } - - late final _sqlite3_bind_textPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Int, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - > - >('sqlite3_bind_text'); - late final _sqlite3_bind_text = _sqlite3_bind_textPtr - .asFunction< - int Function( - ffi.Pointer, - int, - ffi.Pointer, - int, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - >(); - - int sqlite3_bind_text16( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, - int arg3, - ffi.Pointer)>> - arg4, - ) { - return _sqlite3_bind_text16(arg0, arg1, arg2, arg3, arg4); - } - - late final _sqlite3_bind_text16Ptr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Int, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - > - >('sqlite3_bind_text16'); - late final _sqlite3_bind_text16 = _sqlite3_bind_text16Ptr - .asFunction< - int Function( - ffi.Pointer, - int, - ffi.Pointer, - int, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - >(); - - int sqlite3_bind_text64( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, - int arg3, - ffi.Pointer)>> - arg4, - int encoding, - ) { - return _sqlite3_bind_text64(arg0, arg1, arg2, arg3, arg4, encoding); - } - - late final _sqlite3_bind_text64Ptr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - sqlite3_uint64, - ffi.Pointer< - ffi.NativeFunction)> - >, - ffi.UnsignedChar, - ) - > - >('sqlite3_bind_text64'); - late final _sqlite3_bind_text64 = _sqlite3_bind_text64Ptr - .asFunction< - int Function( - ffi.Pointer, - int, - ffi.Pointer, - int, - ffi.Pointer< - ffi.NativeFunction)> - >, - int, - ) - >(); - - int sqlite3_bind_value( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, - ) { - return _sqlite3_bind_value(arg0, arg1, arg2); - } - - late final _sqlite3_bind_valuePtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ) - > - >('sqlite3_bind_value'); - late final _sqlite3_bind_value = _sqlite3_bind_valuePtr - .asFunction< - int Function(ffi.Pointer, int, ffi.Pointer) - >(); - - int sqlite3_bind_zeroblob(ffi.Pointer arg0, int arg1, int n) { - return _sqlite3_bind_zeroblob(arg0, arg1, n); - } - - late final _sqlite3_bind_zeroblobPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Int) - > - >('sqlite3_bind_zeroblob'); - late final _sqlite3_bind_zeroblob = _sqlite3_bind_zeroblobPtr - .asFunction, int, int)>(); - - int sqlite3_bind_zeroblob64( - ffi.Pointer arg0, - int arg1, - int arg2, - ) { - return _sqlite3_bind_zeroblob64(arg0, arg1, arg2); - } - - late final _sqlite3_bind_zeroblob64Ptr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, sqlite3_uint64) - > - >('sqlite3_bind_zeroblob64'); - late final _sqlite3_bind_zeroblob64 = _sqlite3_bind_zeroblob64Ptr - .asFunction, int, int)>(); - - /// CAPI3REF: Return The Size Of An Open BLOB - /// METHOD: sqlite3_blob - /// - /// ^Returns the size in bytes of the BLOB accessible via the - /// successfully opened [BLOB handle] in its only argument. ^The - /// incremental blob I/O routines can only read or overwriting existing - /// blob content; they cannot change the size of a blob. - /// - /// This routine only works on a [BLOB handle] which has been created - /// by a prior successful call to [sqlite3_blob_open()] and which has not - /// been closed by [sqlite3_blob_close()]. Passing any other pointer in - /// to this routine results in undefined and probably undesirable behavior. - int sqlite3_blob_bytes(ffi.Pointer arg0) { - return _sqlite3_blob_bytes(arg0); - } - - late final _sqlite3_blob_bytesPtr = - _lookup)>>( - 'sqlite3_blob_bytes', - ); - late final _sqlite3_blob_bytes = _sqlite3_blob_bytesPtr - .asFunction)>(); - - /// CAPI3REF: Close A BLOB Handle - /// DESTRUCTOR: sqlite3_blob - /// - /// ^This function closes an open [BLOB handle]. ^(The BLOB handle is closed - /// unconditionally. Even if this routine returns an error code, the - /// handle is still closed.)^ - /// - /// ^If the blob handle being closed was opened for read-write access, and if - /// the database is in auto-commit mode and there are no other open read-write - /// blob handles or active write statements, the current transaction is - /// committed. ^If an error occurs while committing the transaction, an error - /// code is returned and the transaction rolled back. - /// - /// Calling this function with an argument that is not a NULL pointer or an - /// open blob handle results in undefined behaviour. ^Calling this routine - /// with a null pointer (such as would be returned by a failed call to - /// [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function - /// is passed a valid open blob handle, the values returned by the - /// sqlite3_errcode() and sqlite3_errmsg() functions are set before returning. - int sqlite3_blob_close(ffi.Pointer arg0) { - return _sqlite3_blob_close(arg0); - } - - late final _sqlite3_blob_closePtr = - _lookup)>>( - 'sqlite3_blob_close', - ); - late final _sqlite3_blob_close = _sqlite3_blob_closePtr - .asFunction)>(); - - /// CAPI3REF: Open A BLOB For Incremental I/O - /// METHOD: sqlite3 - /// CONSTRUCTOR: sqlite3_blob - /// - /// ^(This interfaces opens a [BLOB handle | handle] to the BLOB located - /// in row iRow, column zColumn, table zTable in database zDb; - /// in other words, the same BLOB that would be selected by: - /// - ///
-  /// SELECT zColumn FROM zDb.zTable WHERE [rowid] = iRow;
-  /// 
)^ - /// - /// ^(Parameter zDb is not the filename that contains the database, but - /// rather the symbolic name of the database. For attached databases, this is - /// the name that appears after the AS keyword in the [ATTACH] statement. - /// For the main database file, the database name is "main". For TEMP - /// tables, the database name is "temp".)^ - /// - /// ^If the flags parameter is non-zero, then the BLOB is opened for read - /// and write access. ^If the flags parameter is zero, the BLOB is opened for - /// read-only access. - /// - /// ^(On success, [SQLITE_OK] is returned and the new [BLOB handle] is stored - /// in *ppBlob. Otherwise an [error code] is returned and, unless the error - /// code is SQLITE_MISUSE, *ppBlob is set to NULL.)^ ^This means that, provided - /// the API is not misused, it is always safe to call [sqlite3_blob_close()] - /// on *ppBlob after this function it returns. - /// - /// This function fails with SQLITE_ERROR if any of the following are true: - ///
    - ///
  • ^(Database zDb does not exist)^, - ///
  • ^(Table zTable does not exist within database zDb)^, - ///
  • ^(Table zTable is a WITHOUT ROWID table)^, - ///
  • ^(Column zColumn does not exist)^, - ///
  • ^(Row iRow is not present in the table)^, - ///
  • ^(The specified column of row iRow contains a value that is not - /// a TEXT or BLOB value)^, - ///
  • ^(Column zColumn is part of an index, PRIMARY KEY or UNIQUE - /// constraint and the blob is being opened for read/write access)^, - ///
  • ^([foreign key constraints | Foreign key constraints] are enabled, - /// column zColumn is part of a [child key] definition and the blob is - /// being opened for read/write access)^. - ///
- /// - /// ^Unless it returns SQLITE_MISUSE, this function sets the - /// [database connection] error code and message accessible via - /// [sqlite3_errcode()] and [sqlite3_errmsg()] and related functions. - /// - /// A BLOB referenced by sqlite3_blob_open() may be read using the - /// [sqlite3_blob_read()] interface and modified by using - /// [sqlite3_blob_write()]. The [BLOB handle] can be moved to a - /// different row of the same table using the [sqlite3_blob_reopen()] - /// interface. However, the column, table, or database of a [BLOB handle] - /// cannot be changed after the [BLOB handle] is opened. - /// - /// ^(If the row that a BLOB handle points to is modified by an - /// [UPDATE], [DELETE], or by [ON CONFLICT] side-effects - /// then the BLOB handle is marked as "expired". - /// This is true if any column of the row is changed, even a column - /// other than the one the BLOB handle is open on.)^ - /// ^Calls to [sqlite3_blob_read()] and [sqlite3_blob_write()] for - /// an expired BLOB handle fail with a return code of [SQLITE_ABORT]. - /// ^(Changes written into a BLOB prior to the BLOB expiring are not - /// rolled back by the expiration of the BLOB. Such changes will eventually - /// commit if the transaction continues to completion.)^ - /// - /// ^Use the [sqlite3_blob_bytes()] interface to determine the size of - /// the opened blob. ^The size of a blob may not be changed by this - /// interface. Use the [UPDATE] SQL command to change the size of a - /// blob. - /// - /// ^The [sqlite3_bind_zeroblob()] and [sqlite3_result_zeroblob()] interfaces - /// and the built-in [zeroblob] SQL function may be used to create a - /// zero-filled blob to read or write using the incremental-blob interface. - /// - /// To avoid a resource leak, every open [BLOB handle] should eventually - /// be released by a call to [sqlite3_blob_close()]. - /// - /// See also: [sqlite3_blob_close()], - /// [sqlite3_blob_reopen()], [sqlite3_blob_read()], - /// [sqlite3_blob_bytes()], [sqlite3_blob_write()]. - int sqlite3_blob_open( - ffi.Pointer arg0, - ffi.Pointer zDb, - ffi.Pointer zTable, - ffi.Pointer zColumn, - int iRow, - int flags, - ffi.Pointer> ppBlob, - ) { - return _sqlite3_blob_open(arg0, zDb, zTable, zColumn, iRow, flags, ppBlob); - } - - late final _sqlite3_blob_openPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - sqlite3_int64, - ffi.Int, - ffi.Pointer>, - ) - > - >('sqlite3_blob_open'); - late final _sqlite3_blob_open = _sqlite3_blob_openPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer>, - ) - >(); - - /// CAPI3REF: Read Data From A BLOB Incrementally - /// METHOD: sqlite3_blob - /// - /// ^(This function is used to read data from an open [BLOB handle] into a - /// caller-supplied buffer. N bytes of data are copied into buffer Z - /// from the open BLOB, starting at offset iOffset.)^ - /// - /// ^If offset iOffset is less than N bytes from the end of the BLOB, - /// [SQLITE_ERROR] is returned and no data is read. ^If N or iOffset is - /// less than zero, [SQLITE_ERROR] is returned and no data is read. - /// ^The size of the blob (and hence the maximum value of N+iOffset) - /// can be determined using the [sqlite3_blob_bytes()] interface. - /// - /// ^An attempt to read from an expired [BLOB handle] fails with an - /// error code of [SQLITE_ABORT]. - /// - /// ^(On success, sqlite3_blob_read() returns SQLITE_OK. - /// Otherwise, an [error code] or an [extended error code] is returned.)^ - /// - /// This routine only works on a [BLOB handle] which has been created - /// by a prior successful call to [sqlite3_blob_open()] and which has not - /// been closed by [sqlite3_blob_close()]. Passing any other pointer in - /// to this routine results in undefined and probably undesirable behavior. - /// - /// See also: [sqlite3_blob_write()]. - int sqlite3_blob_read( - ffi.Pointer arg0, - ffi.Pointer Z, - int N, - int iOffset, - ) { - return _sqlite3_blob_read(arg0, Z, N, iOffset); - } - - late final _sqlite3_blob_readPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Int, - ) - > - >('sqlite3_blob_read'); - late final _sqlite3_blob_read = _sqlite3_blob_readPtr - .asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, int) - >(); - - /// CAPI3REF: Move a BLOB Handle to a New Row - /// METHOD: sqlite3_blob - /// - /// ^This function is used to move an existing [BLOB handle] so that it points - /// to a different row of the same database table. ^The new row is identified - /// by the rowid value passed as the second argument. Only the row can be - /// changed. ^The database, table and column on which the blob handle is open - /// remain the same. Moving an existing [BLOB handle] to a new row is - /// faster than closing the existing handle and opening a new one. - /// - /// ^(The new row must meet the same criteria as for [sqlite3_blob_open()] - - /// it must exist and there must be either a blob or text value stored in - /// the nominated column.)^ ^If the new row is not present in the table, or if - /// it does not contain a blob or text value, or if another error occurs, an - /// SQLite error code is returned and the blob handle is considered aborted. - /// ^All subsequent calls to [sqlite3_blob_read()], [sqlite3_blob_write()] or - /// [sqlite3_blob_reopen()] on an aborted blob handle immediately return - /// SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle - /// always returns zero. - /// - /// ^This function sets the database handle error code and message. - int sqlite3_blob_reopen(ffi.Pointer arg0, int arg1) { - return _sqlite3_blob_reopen(arg0, arg1); - } - - late final _sqlite3_blob_reopenPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, sqlite3_int64) - > - >('sqlite3_blob_reopen'); - late final _sqlite3_blob_reopen = _sqlite3_blob_reopenPtr - .asFunction, int)>(); - - /// CAPI3REF: Write Data Into A BLOB Incrementally - /// METHOD: sqlite3_blob - /// - /// ^(This function is used to write data into an open [BLOB handle] from a - /// caller-supplied buffer. N bytes of data are copied from the buffer Z - /// into the open BLOB, starting at offset iOffset.)^ - /// - /// ^(On success, sqlite3_blob_write() returns SQLITE_OK. - /// Otherwise, an [error code] or an [extended error code] is returned.)^ - /// ^Unless SQLITE_MISUSE is returned, this function sets the - /// [database connection] error code and message accessible via - /// [sqlite3_errcode()] and [sqlite3_errmsg()] and related functions. - /// - /// ^If the [BLOB handle] passed as the first argument was not opened for - /// writing (the flags parameter to [sqlite3_blob_open()] was zero), - /// this function returns [SQLITE_READONLY]. - /// - /// This function may only modify the contents of the BLOB; it is - /// not possible to increase the size of a BLOB using this API. - /// ^If offset iOffset is less than N bytes from the end of the BLOB, - /// [SQLITE_ERROR] is returned and no data is written. The size of the - /// BLOB (and hence the maximum value of N+iOffset) can be determined - /// using the [sqlite3_blob_bytes()] interface. ^If N or iOffset are less - /// than zero [SQLITE_ERROR] is returned and no data is written. - /// - /// ^An attempt to write to an expired [BLOB handle] fails with an - /// error code of [SQLITE_ABORT]. ^Writes to the BLOB that occurred - /// before the [BLOB handle] expired are not rolled back by the - /// expiration of the handle, though of course those changes might - /// have been overwritten by the statement that expired the BLOB handle - /// or by other independent statements. - /// - /// This routine only works on a [BLOB handle] which has been created - /// by a prior successful call to [sqlite3_blob_open()] and which has not - /// been closed by [sqlite3_blob_close()]. Passing any other pointer in - /// to this routine results in undefined and probably undesirable behavior. - /// - /// See also: [sqlite3_blob_read()]. - int sqlite3_blob_write( - ffi.Pointer arg0, - ffi.Pointer z, - int n, - int iOffset, - ) { - return _sqlite3_blob_write(arg0, z, n, iOffset); - } - - late final _sqlite3_blob_writePtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Int, - ) - > - >('sqlite3_blob_write'); - late final _sqlite3_blob_write = _sqlite3_blob_writePtr - .asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, int) - >(); - - /// CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors - /// KEYWORDS: {busy-handler callback} {busy handler} - /// METHOD: sqlite3 - /// - /// ^The sqlite3_busy_handler(D,X,P) routine sets a callback function X - /// that might be invoked with argument P whenever - /// an attempt is made to access a database table associated with - /// [database connection] D when another thread - /// or process has the table locked. - /// The sqlite3_busy_handler() interface is used to implement - /// [sqlite3_busy_timeout()] and [PRAGMA busy_timeout]. - /// - /// ^If the busy callback is NULL, then [SQLITE_BUSY] - /// is returned immediately upon encountering the lock. ^If the busy callback - /// is not NULL, then the callback might be invoked with two arguments. - /// - /// ^The first argument to the busy handler is a copy of the void* pointer which - /// is the third argument to sqlite3_busy_handler(). ^The second argument to - /// the busy handler callback is the number of times that the busy handler has - /// been invoked previously for the same locking event. ^If the - /// busy callback returns 0, then no additional attempts are made to - /// access the database and [SQLITE_BUSY] is returned - /// to the application. - /// ^If the callback returns non-zero, then another attempt - /// is made to access the database and the cycle repeats. - /// - /// The presence of a busy handler does not guarantee that it will be invoked - /// when there is lock contention. ^If SQLite determines that invoking the busy - /// handler could result in a deadlock, it will go ahead and return [SQLITE_BUSY] - /// to the application instead of invoking the - /// busy handler. - /// Consider a scenario where one process is holding a read lock that - /// it is trying to promote to a reserved lock and - /// a second process is holding a reserved lock that it is trying - /// to promote to an exclusive lock. The first process cannot proceed - /// because it is blocked by the second and the second process cannot - /// proceed because it is blocked by the first. If both processes - /// invoke the busy handlers, neither will make any progress. Therefore, - /// SQLite returns [SQLITE_BUSY] for the first process, hoping that this - /// will induce the first process to release its read lock and allow - /// the second process to proceed. - /// - /// ^The default busy callback is NULL. - /// - /// ^(There can only be a single busy handler defined for each - /// [database connection]. Setting a new busy handler clears any - /// previously set handler.)^ ^Note that calling [sqlite3_busy_timeout()] - /// or evaluating [PRAGMA busy_timeout=N] will change the - /// busy handler and thus clear any previously set busy handler. - /// - /// The busy callback should not take any actions which modify the - /// database connection that invoked the busy handler. In other words, - /// the busy handler is not reentrant. Any such actions - /// result in undefined behavior. - /// - /// A busy handler must not close the database connection - /// or [prepared statement] that invoked the busy handler. - int sqlite3_busy_handler( - ffi.Pointer arg0, - ffi.Pointer< - ffi.NativeFunction, ffi.Int)> - > - arg1, - ffi.Pointer arg2, - ) { - return _sqlite3_busy_handler(arg0, arg1, arg2); - } - - late final _sqlite3_busy_handlerPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int) - > - >, - ffi.Pointer, - ) - > - >('sqlite3_busy_handler'); - late final _sqlite3_busy_handler = _sqlite3_busy_handlerPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction, ffi.Int)> - >, - ffi.Pointer, - ) - >(); - - /// CAPI3REF: Set A Busy Timeout - /// METHOD: sqlite3 - /// - /// ^This routine sets a [sqlite3_busy_handler | busy handler] that sleeps - /// for a specified amount of time when a table is locked. ^The handler - /// will sleep multiple times until at least "ms" milliseconds of sleeping - /// have accumulated. ^After at least "ms" milliseconds of sleeping, - /// the handler returns 0 which causes [sqlite3_step()] to return - /// [SQLITE_BUSY]. - /// - /// ^Calling this routine with an argument less than or equal to zero - /// turns off all busy handlers. - /// - /// ^(There can only be a single busy handler for a particular - /// [database connection] at any given moment. If another busy handler - /// was defined (using [sqlite3_busy_handler()]) prior to calling - /// this routine, that other busy handler is cleared.)^ - /// - /// See also: [PRAGMA busy_timeout] - int sqlite3_busy_timeout(ffi.Pointer arg0, int ms) { - return _sqlite3_busy_timeout(arg0, ms); - } - - late final _sqlite3_busy_timeoutPtr = - _lookup< - ffi.NativeFunction, ffi.Int)> - >('sqlite3_busy_timeout'); - late final _sqlite3_busy_timeout = _sqlite3_busy_timeoutPtr - .asFunction, int)>(); - - /// CAPI3REF: Cancel Automatic Extension Loading - /// - /// ^The [sqlite3_cancel_auto_extension(X)] interface unregisters the - /// initialization routine X that was registered using a prior call to - /// [sqlite3_auto_extension(X)]. ^The [sqlite3_cancel_auto_extension(X)] - /// routine returns 1 if initialization routine X was successfully - /// unregistered and it returns 0 if X was not on the list of initialization - /// routines. - int sqlite3_cancel_auto_extension( - ffi.Pointer> xEntryPoint, - ) { - return _sqlite3_cancel_auto_extension(xEntryPoint); - } - - late final _sqlite3_cancel_auto_extensionPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>) - > - >('sqlite3_cancel_auto_extension'); - late final _sqlite3_cancel_auto_extension = _sqlite3_cancel_auto_extensionPtr - .asFunction< - int Function(ffi.Pointer>) - >(); - - /// CAPI3REF: Count The Number Of Rows Modified - /// METHOD: sqlite3 - /// - /// ^This function returns the number of rows modified, inserted or - /// deleted by the most recently completed INSERT, UPDATE or DELETE - /// statement on the database connection specified by the only parameter. - /// ^Executing any other type of SQL statement does not modify the value - /// returned by this function. - /// - /// ^Only changes made directly by the INSERT, UPDATE or DELETE statement are - /// considered - auxiliary changes caused by [CREATE TRIGGER | triggers], - /// [foreign key actions] or [REPLACE] constraint resolution are not counted. - /// - /// Changes to a view that are intercepted by - /// [INSTEAD OF trigger | INSTEAD OF triggers] are not counted. ^The value - /// returned by sqlite3_changes() immediately after an INSERT, UPDATE or - /// DELETE statement run on a view is always zero. Only changes made to real - /// tables are counted. - /// - /// Things are more complicated if the sqlite3_changes() function is - /// executed while a trigger program is running. This may happen if the - /// program uses the [changes() SQL function], or if some other callback - /// function invokes sqlite3_changes() directly. Essentially: - /// - ///
    - ///
  • ^(Before entering a trigger program the value returned by - /// sqlite3_changes() function is saved. After the trigger program - /// has finished, the original value is restored.)^ - /// - ///
  • ^(Within a trigger program each INSERT, UPDATE and DELETE - /// statement sets the value returned by sqlite3_changes() - /// upon completion as normal. Of course, this value will not include - /// any changes performed by sub-triggers, as the sqlite3_changes() - /// value will be saved and restored after each sub-trigger has run.)^ - ///
- /// - /// ^This means that if the changes() SQL function (or similar) is used - /// by the first INSERT, UPDATE or DELETE statement within a trigger, it - /// returns the value as set when the calling statement began executing. - /// ^If it is used by the second or subsequent such statement within a trigger - /// program, the value returned reflects the number of rows modified by the - /// previous INSERT, UPDATE or DELETE statement within the same trigger. - /// - /// If a separate thread makes changes on the same database connection - /// while [sqlite3_changes()] is running then the value returned - /// is unpredictable and not meaningful. - /// - /// See also: - ///
    - ///
  • the [sqlite3_total_changes()] interface - ///
  • the [count_changes pragma] - ///
  • the [changes() SQL function] - ///
  • the [data_version pragma] - ///
- int sqlite3_changes(ffi.Pointer arg0) { - return _sqlite3_changes(arg0); - } - - late final _sqlite3_changesPtr = - _lookup)>>( - 'sqlite3_changes', - ); - late final _sqlite3_changes = _sqlite3_changesPtr - .asFunction)>(); - - /// CAPI3REF: Reset All Bindings On A Prepared Statement - /// METHOD: sqlite3_stmt - /// - /// ^Contrary to the intuition of many, [sqlite3_reset()] does not reset - /// the [sqlite3_bind_blob | bindings] on a [prepared statement]. - /// ^Use this routine to reset all host parameters to NULL. - int sqlite3_clear_bindings(ffi.Pointer arg0) { - return _sqlite3_clear_bindings(arg0); - } - - late final _sqlite3_clear_bindingsPtr = - _lookup)>>( - 'sqlite3_clear_bindings', - ); - late final _sqlite3_clear_bindings = _sqlite3_clear_bindingsPtr - .asFunction)>(); - - /// CAPI3REF: Closing A Database Connection - /// DESTRUCTOR: sqlite3 - /// - /// ^The sqlite3_close() and sqlite3_close_v2() routines are destructors - /// for the [sqlite3] object. - /// ^Calls to sqlite3_close() and sqlite3_close_v2() return [SQLITE_OK] if - /// the [sqlite3] object is successfully destroyed and all associated - /// resources are deallocated. - /// - /// Ideally, applications should [sqlite3_finalize | finalize] all - /// [prepared statements], [sqlite3_blob_close | close] all [BLOB handles], and - /// [sqlite3_backup_finish | finish] all [sqlite3_backup] objects associated - /// with the [sqlite3] object prior to attempting to close the object. - /// ^If the database connection is associated with unfinalized prepared - /// statements, BLOB handlers, and/or unfinished sqlite3_backup objects then - /// sqlite3_close() will leave the database connection open and return - /// [SQLITE_BUSY]. ^If sqlite3_close_v2() is called with unfinalized prepared - /// statements, unclosed BLOB handlers, and/or unfinished sqlite3_backups, - /// it returns [SQLITE_OK] regardless, but instead of deallocating the database - /// connection immediately, it marks the database connection as an unusable - /// "zombie" and makes arrangements to automatically deallocate the database - /// connection after all prepared statements are finalized, all BLOB handles - /// are closed, and all backups have finished. The sqlite3_close_v2() interface - /// is intended for use with host languages that are garbage collected, and - /// where the order in which destructors are called is arbitrary. - /// - /// ^If an [sqlite3] object is destroyed while a transaction is open, - /// the transaction is automatically rolled back. - /// - /// The C parameter to [sqlite3_close(C)] and [sqlite3_close_v2(C)] - /// must be either a NULL - /// pointer or an [sqlite3] object pointer obtained - /// from [sqlite3_open()], [sqlite3_open16()], or - /// [sqlite3_open_v2()], and not previously closed. - /// ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer - /// argument is a harmless no-op. - int sqlite3_close(ffi.Pointer arg0) { - return _sqlite3_close(arg0); - } - - late final _sqlite3_closePtr = - _lookup)>>( - 'sqlite3_close', - ); - late final _sqlite3_close = _sqlite3_closePtr - .asFunction)>(); - - int sqlite3_close_v2(ffi.Pointer arg0) { - return _sqlite3_close_v2(arg0); - } - - late final _sqlite3_close_v2Ptr = - _lookup)>>( - 'sqlite3_close_v2', - ); - late final _sqlite3_close_v2 = _sqlite3_close_v2Ptr - .asFunction)>(); - - /// CAPI3REF: Collation Needed Callbacks - /// METHOD: sqlite3 - /// - /// ^To avoid having to register all collation sequences before a database - /// can be used, a single callback function may be registered with the - /// [database connection] to be invoked whenever an undefined collation - /// sequence is required. - /// - /// ^If the function is registered using the sqlite3_collation_needed() API, - /// then it is passed the names of undefined collation sequences as strings - /// encoded in UTF-8. ^If sqlite3_collation_needed16() is used, - /// the names are passed as UTF-16 in machine native byte order. - /// ^A call to either function replaces the existing collation-needed callback. - /// - /// ^(When the callback is invoked, the first argument passed is a copy - /// of the second argument to sqlite3_collation_needed() or - /// sqlite3_collation_needed16(). The second argument is the database - /// connection. The third argument is one of [SQLITE_UTF8], [SQLITE_UTF16BE], - /// or [SQLITE_UTF16LE], indicating the most desirable form of the collation - /// sequence function required. The fourth parameter is the name of the - /// required collation sequence.)^ - /// - /// The callback function should register the desired collation using - /// [sqlite3_create_collation()], [sqlite3_create_collation16()], or - /// [sqlite3_create_collation_v2()]. - int sqlite3_collation_needed( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ) - > - > - arg2, - ) { - return _sqlite3_collation_needed(arg0, arg1, arg2); - } - - late final _sqlite3_collation_neededPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ) - > - >, - ) - > - >('sqlite3_collation_needed'); - late final _sqlite3_collation_needed = _sqlite3_collation_neededPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ) - > - >, - ) - >(); - - int sqlite3_collation_needed16( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ) - > - > - arg2, - ) { - return _sqlite3_collation_needed16(arg0, arg1, arg2); - } - - late final _sqlite3_collation_needed16Ptr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ) - > - >, - ) - > - >('sqlite3_collation_needed16'); - late final _sqlite3_collation_needed16 = _sqlite3_collation_needed16Ptr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ) - > - >, - ) - >(); - - /// CAPI3REF: Result Values From A Query - /// KEYWORDS: {column access functions} - /// METHOD: sqlite3_stmt - /// - /// Summary: - ///
- ///
sqlite3_column_blobBLOB result - ///
sqlite3_column_doubleREAL result - ///
sqlite3_column_int32-bit INTEGER result - ///
sqlite3_column_int6464-bit INTEGER result - ///
sqlite3_column_textUTF-8 TEXT result - ///
sqlite3_column_text16UTF-16 TEXT result - ///
sqlite3_column_valueThe result as an - /// [sqlite3_value|unprotected sqlite3_value] object. - ///
    - ///
sqlite3_column_bytesSize of a BLOB - /// or a UTF-8 TEXT result in bytes - ///
sqlite3_column_bytes16   - /// →  Size of UTF-16 - /// TEXT in bytes - ///
sqlite3_column_typeDefault - /// datatype of the result - ///
- /// - /// Details: - /// - /// ^These routines return information about a single column of the current - /// result row of a query. ^In every case the first argument is a pointer - /// to the [prepared statement] that is being evaluated (the [sqlite3_stmt*] - /// that was returned from [sqlite3_prepare_v2()] or one of its variants) - /// and the second argument is the index of the column for which information - /// should be returned. ^The leftmost column of the result set has the index 0. - /// ^The number of columns in the result can be determined using - /// [sqlite3_column_count()]. - /// - /// If the SQL statement does not currently point to a valid row, or if the - /// column index is out of range, the result is undefined. - /// These routines may only be called when the most recent call to - /// [sqlite3_step()] has returned [SQLITE_ROW] and neither - /// [sqlite3_reset()] nor [sqlite3_finalize()] have been called subsequently. - /// If any of these routines are called after [sqlite3_reset()] or - /// [sqlite3_finalize()] or after [sqlite3_step()] has returned - /// something other than [SQLITE_ROW], the results are undefined. - /// If [sqlite3_step()] or [sqlite3_reset()] or [sqlite3_finalize()] - /// are called from a different thread while any of these routines - /// are pending, then the results are undefined. - /// - /// The first six interfaces (_blob, _double, _int, _int64, _text, and _text16) - /// each return the value of a result column in a specific data format. If - /// the result column is not initially in the requested format (for example, - /// if the query returns an integer but the sqlite3_column_text() interface - /// is used to extract the value) then an automatic type conversion is performed. - /// - /// ^The sqlite3_column_type() routine returns the - /// [SQLITE_INTEGER | datatype code] for the initial data type - /// of the result column. ^The returned value is one of [SQLITE_INTEGER], - /// [SQLITE_FLOAT], [SQLITE_TEXT], [SQLITE_BLOB], or [SQLITE_NULL]. - /// The return value of sqlite3_column_type() can be used to decide which - /// of the first six interface should be used to extract the column value. - /// The value returned by sqlite3_column_type() is only meaningful if no - /// automatic type conversions have occurred for the value in question. - /// After a type conversion, the result of calling sqlite3_column_type() - /// is undefined, though harmless. Future - /// versions of SQLite may change the behavior of sqlite3_column_type() - /// following a type conversion. - /// - /// If the result is a BLOB or a TEXT string, then the sqlite3_column_bytes() - /// or sqlite3_column_bytes16() interfaces can be used to determine the size - /// of that BLOB or string. - /// - /// ^If the result is a BLOB or UTF-8 string then the sqlite3_column_bytes() - /// routine returns the number of bytes in that BLOB or string. - /// ^If the result is a UTF-16 string, then sqlite3_column_bytes() converts - /// the string to UTF-8 and then returns the number of bytes. - /// ^If the result is a numeric value then sqlite3_column_bytes() uses - /// [sqlite3_snprintf()] to convert that value to a UTF-8 string and returns - /// the number of bytes in that string. - /// ^If the result is NULL, then sqlite3_column_bytes() returns zero. - /// - /// ^If the result is a BLOB or UTF-16 string then the sqlite3_column_bytes16() - /// routine returns the number of bytes in that BLOB or string. - /// ^If the result is a UTF-8 string, then sqlite3_column_bytes16() converts - /// the string to UTF-16 and then returns the number of bytes. - /// ^If the result is a numeric value then sqlite3_column_bytes16() uses - /// [sqlite3_snprintf()] to convert that value to a UTF-16 string and returns - /// the number of bytes in that string. - /// ^If the result is NULL, then sqlite3_column_bytes16() returns zero. - /// - /// ^The values returned by [sqlite3_column_bytes()] and - /// [sqlite3_column_bytes16()] do not include the zero terminators at the end - /// of the string. ^For clarity: the values returned by - /// [sqlite3_column_bytes()] and [sqlite3_column_bytes16()] are the number of - /// bytes in the string, not the number of characters. - /// - /// ^Strings returned by sqlite3_column_text() and sqlite3_column_text16(), - /// even empty strings, are always zero-terminated. ^The return - /// value from sqlite3_column_blob() for a zero-length BLOB is a NULL pointer. - /// - /// Warning: ^The object returned by [sqlite3_column_value()] is an - /// [unprotected sqlite3_value] object. In a multithreaded environment, - /// an unprotected sqlite3_value object may only be used safely with - /// [sqlite3_bind_value()] and [sqlite3_result_value()]. - /// If the [unprotected sqlite3_value] object returned by - /// [sqlite3_column_value()] is used in any other way, including calls - /// to routines like [sqlite3_value_int()], [sqlite3_value_text()], - /// or [sqlite3_value_bytes()], the behavior is not threadsafe. - /// Hence, the sqlite3_column_value() interface - /// is normally only useful within the implementation of - /// [application-defined SQL functions] or [virtual tables], not within - /// top-level application code. - /// - /// The these routines may attempt to convert the datatype of the result. - /// ^For example, if the internal representation is FLOAT and a text result - /// is requested, [sqlite3_snprintf()] is used internally to perform the - /// conversion automatically. ^(The following table details the conversions - /// that are applied: - /// - ///
- /// - ///
Internal
Type
Requested
Type
Conversion - /// - ///
NULL INTEGER Result is 0 - ///
NULL FLOAT Result is 0.0 - ///
NULL TEXT Result is a NULL pointer - ///
NULL BLOB Result is a NULL pointer - ///
INTEGER FLOAT Convert from integer to float - ///
INTEGER TEXT ASCII rendering of the integer - ///
INTEGER BLOB Same as INTEGER->TEXT - ///
FLOAT INTEGER [CAST] to INTEGER - ///
FLOAT TEXT ASCII rendering of the float - ///
FLOAT BLOB [CAST] to BLOB - ///
TEXT INTEGER [CAST] to INTEGER - ///
TEXT FLOAT [CAST] to REAL - ///
TEXT BLOB No change - ///
BLOB INTEGER [CAST] to INTEGER - ///
BLOB FLOAT [CAST] to REAL - ///
BLOB TEXT Add a zero terminator if needed - ///
- ///
)^ - /// - /// Note that when type conversions occur, pointers returned by prior - /// calls to sqlite3_column_blob(), sqlite3_column_text(), and/or - /// sqlite3_column_text16() may be invalidated. - /// Type conversions and pointer invalidations might occur - /// in the following cases: - /// - ///
    - ///
  • The initial content is a BLOB and sqlite3_column_text() or - /// sqlite3_column_text16() is called. A zero-terminator might - /// need to be added to the string.
  • - ///
  • The initial content is UTF-8 text and sqlite3_column_bytes16() or - /// sqlite3_column_text16() is called. The content must be converted - /// to UTF-16.
  • - ///
  • The initial content is UTF-16 text and sqlite3_column_bytes() or - /// sqlite3_column_text() is called. The content must be converted - /// to UTF-8.
  • - ///
- /// - /// ^Conversions between UTF-16be and UTF-16le are always done in place and do - /// not invalidate a prior pointer, though of course the content of the buffer - /// that the prior pointer references will have been modified. Other kinds - /// of conversion are done in place when it is possible, but sometimes they - /// are not possible and in those cases prior pointers are invalidated. - /// - /// The safest policy is to invoke these routines - /// in one of the following ways: - /// - ///
    - ///
  • sqlite3_column_text() followed by sqlite3_column_bytes()
  • - ///
  • sqlite3_column_blob() followed by sqlite3_column_bytes()
  • - ///
  • sqlite3_column_text16() followed by sqlite3_column_bytes16()
  • - ///
- /// - /// In other words, you should call sqlite3_column_text(), - /// sqlite3_column_blob(), or sqlite3_column_text16() first to force the result - /// into the desired format, then invoke sqlite3_column_bytes() or - /// sqlite3_column_bytes16() to find the size of the result. Do not mix calls - /// to sqlite3_column_text() or sqlite3_column_blob() with calls to - /// sqlite3_column_bytes16(), and do not mix calls to sqlite3_column_text16() - /// with calls to sqlite3_column_bytes(). - /// - /// ^The pointers returned are valid until a type conversion occurs as - /// described above, or until [sqlite3_step()] or [sqlite3_reset()] or - /// [sqlite3_finalize()] is called. ^The memory space used to hold strings - /// and BLOBs is freed automatically. Do not pass the pointers returned - /// from [sqlite3_column_blob()], [sqlite3_column_text()], etc. into - /// [sqlite3_free()]. - /// - /// As long as the input parameters are correct, these routines will only - /// fail if an out-of-memory error occurs during a format conversion. - /// Only the following subset of interfaces are subject to out-of-memory - /// errors: - /// - ///
    - ///
  • sqlite3_column_blob() - ///
  • sqlite3_column_text() - ///
  • sqlite3_column_text16() - ///
  • sqlite3_column_bytes() - ///
  • sqlite3_column_bytes16() - ///
- /// - /// If an out-of-memory error occurs, then the return value from these - /// routines is the same as if the column had contained an SQL NULL value. - /// Valid SQL NULL returns can be distinguished from out-of-memory errors - /// by invoking the [sqlite3_errcode()] immediately after the suspect - /// return value is obtained and before any - /// other SQLite interface is called on the same [database connection]. - ffi.Pointer sqlite3_column_blob( - ffi.Pointer arg0, - int iCol, - ) { - return _sqlite3_column_blob(arg0, iCol); - } - - late final _sqlite3_column_blobPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Int) - > - >('sqlite3_column_blob'); - late final _sqlite3_column_blob = _sqlite3_column_blobPtr - .asFunction< - ffi.Pointer Function(ffi.Pointer, int) - >(); - - int sqlite3_column_bytes(ffi.Pointer arg0, int iCol) { - return _sqlite3_column_bytes(arg0, iCol); - } - - late final _sqlite3_column_bytesPtr = - _lookup< - ffi.NativeFunction, ffi.Int)> - >('sqlite3_column_bytes'); - late final _sqlite3_column_bytes = _sqlite3_column_bytesPtr - .asFunction, int)>(); - - int sqlite3_column_bytes16(ffi.Pointer arg0, int iCol) { - return _sqlite3_column_bytes16(arg0, iCol); - } - - late final _sqlite3_column_bytes16Ptr = - _lookup< - ffi.NativeFunction, ffi.Int)> - >('sqlite3_column_bytes16'); - late final _sqlite3_column_bytes16 = _sqlite3_column_bytes16Ptr - .asFunction, int)>(); - - /// CAPI3REF: Number Of Columns In A Result Set - /// METHOD: sqlite3_stmt - /// - /// ^Return the number of columns in the result set returned by the - /// [prepared statement]. ^If this routine returns 0, that means the - /// [prepared statement] returns no data (for example an [UPDATE]). - /// ^However, just because this routine returns a positive number does not - /// mean that one or more rows of data will be returned. ^A SELECT statement - /// will always have a positive sqlite3_column_count() but depending on the - /// WHERE clause constraints and the table content, it might return no rows. - /// - /// See also: [sqlite3_data_count()] - int sqlite3_column_count(ffi.Pointer pStmt) { - return _sqlite3_column_count(pStmt); - } - - late final _sqlite3_column_countPtr = - _lookup)>>( - 'sqlite3_column_count', - ); - late final _sqlite3_column_count = _sqlite3_column_countPtr - .asFunction)>(); - - /// CAPI3REF: Source Of Data In A Query Result - /// METHOD: sqlite3_stmt - /// - /// ^These routines provide a means to determine the database, table, and - /// table column that is the origin of a particular result column in - /// [SELECT] statement. - /// ^The name of the database or table or column can be returned as - /// either a UTF-8 or UTF-16 string. ^The _database_ routines return - /// the database name, the _table_ routines return the table name, and - /// the origin_ routines return the column name. - /// ^The returned string is valid until the [prepared statement] is destroyed - /// using [sqlite3_finalize()] or until the statement is automatically - /// reprepared by the first call to [sqlite3_step()] for a particular run - /// or until the same information is requested - /// again in a different encoding. - /// - /// ^The names returned are the original un-aliased names of the - /// database, table, and column. - /// - /// ^The first argument to these interfaces is a [prepared statement]. - /// ^These functions return information about the Nth result column returned by - /// the statement, where N is the second function argument. - /// ^The left-most column is column 0 for these routines. - /// - /// ^If the Nth column returned by the statement is an expression or - /// subquery and is not a column value, then all of these functions return - /// NULL. ^These routines might also return NULL if a memory allocation error - /// occurs. ^Otherwise, they return the name of the attached database, table, - /// or column that query result column was extracted from. - /// - /// ^As with all other SQLite APIs, those whose names end with "16" return - /// UTF-16 encoded strings and the other functions return UTF-8. - /// - /// ^These APIs are only available if the library was compiled with the - /// [SQLITE_ENABLE_COLUMN_METADATA] C-preprocessor symbol. - /// - /// If two or more threads call one or more - /// [sqlite3_column_database_name | column metadata interfaces] - /// for the same [prepared statement] and result column - /// at the same time then the results are undefined. - ffi.Pointer sqlite3_column_database_name( - ffi.Pointer arg0, - int arg1, - ) { - return _sqlite3_column_database_name(arg0, arg1); - } - - late final _sqlite3_column_database_namePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Int) - > - >('sqlite3_column_database_name'); - late final _sqlite3_column_database_name = _sqlite3_column_database_namePtr - .asFunction< - ffi.Pointer Function(ffi.Pointer, int) - >(); - - ffi.Pointer sqlite3_column_database_name16( - ffi.Pointer arg0, - int arg1, - ) { - return _sqlite3_column_database_name16(arg0, arg1); - } - - late final _sqlite3_column_database_name16Ptr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Int) - > - >('sqlite3_column_database_name16'); - late final _sqlite3_column_database_name16 = - _sqlite3_column_database_name16Ptr - .asFunction< - ffi.Pointer Function(ffi.Pointer, int) - >(); - - /// CAPI3REF: Declared Datatype Of A Query Result - /// METHOD: sqlite3_stmt - /// - /// ^(The first parameter is a [prepared statement]. - /// If this statement is a [SELECT] statement and the Nth column of the - /// returned result set of that [SELECT] is a table column (not an - /// expression or subquery) then the declared type of the table - /// column is returned.)^ ^If the Nth column of the result set is an - /// expression or subquery, then a NULL pointer is returned. - /// ^The returned string is always UTF-8 encoded. - /// - /// ^(For example, given the database schema: - /// - /// CREATE TABLE t1(c1 VARIANT); - /// - /// and the following statement to be compiled: - /// - /// SELECT c1 + 1, c1 FROM t1; - /// - /// this routine would return the string "VARIANT" for the second result - /// column (i==1), and a NULL pointer for the first result column (i==0).)^ - /// - /// ^SQLite uses dynamic run-time typing. ^So just because a column - /// is declared to contain a particular type does not mean that the - /// data stored in that column is of the declared type. SQLite is - /// strongly typed, but the typing is dynamic not static. ^Type - /// is associated with individual values, not with the containers - /// used to hold those values. - ffi.Pointer sqlite3_column_decltype( - ffi.Pointer arg0, - int arg1, - ) { - return _sqlite3_column_decltype(arg0, arg1); - } - - late final _sqlite3_column_decltypePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Int) - > - >('sqlite3_column_decltype'); - late final _sqlite3_column_decltype = _sqlite3_column_decltypePtr - .asFunction< - ffi.Pointer Function(ffi.Pointer, int) - >(); - - ffi.Pointer sqlite3_column_decltype16( - ffi.Pointer arg0, - int arg1, - ) { - return _sqlite3_column_decltype16(arg0, arg1); - } - - late final _sqlite3_column_decltype16Ptr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Int) - > - >('sqlite3_column_decltype16'); - late final _sqlite3_column_decltype16 = _sqlite3_column_decltype16Ptr - .asFunction< - ffi.Pointer Function(ffi.Pointer, int) - >(); - - double sqlite3_column_double(ffi.Pointer arg0, int iCol) { - return _sqlite3_column_double(arg0, iCol); - } - - late final _sqlite3_column_doublePtr = - _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Pointer, ffi.Int) - > - >('sqlite3_column_double'); - late final _sqlite3_column_double = _sqlite3_column_doublePtr - .asFunction, int)>(); - - int sqlite3_column_int(ffi.Pointer arg0, int iCol) { - return _sqlite3_column_int(arg0, iCol); - } - - late final _sqlite3_column_intPtr = - _lookup< - ffi.NativeFunction, ffi.Int)> - >('sqlite3_column_int'); - late final _sqlite3_column_int = _sqlite3_column_intPtr - .asFunction, int)>(); - - int sqlite3_column_int64(ffi.Pointer arg0, int iCol) { - return _sqlite3_column_int64(arg0, iCol); - } - - late final _sqlite3_column_int64Ptr = - _lookup< - ffi.NativeFunction< - sqlite3_int64 Function(ffi.Pointer, ffi.Int) - > - >('sqlite3_column_int64'); - late final _sqlite3_column_int64 = _sqlite3_column_int64Ptr - .asFunction, int)>(); - - /// CAPI3REF: Column Names In A Result Set - /// METHOD: sqlite3_stmt - /// - /// ^These routines return the name assigned to a particular column - /// in the result set of a [SELECT] statement. ^The sqlite3_column_name() - /// interface returns a pointer to a zero-terminated UTF-8 string - /// and sqlite3_column_name16() returns a pointer to a zero-terminated - /// UTF-16 string. ^The first parameter is the [prepared statement] - /// that implements the [SELECT] statement. ^The second parameter is the - /// column number. ^The leftmost column is number 0. - /// - /// ^The returned string pointer is valid until either the [prepared statement] - /// is destroyed by [sqlite3_finalize()] or until the statement is automatically - /// reprepared by the first call to [sqlite3_step()] for a particular run - /// or until the next call to - /// sqlite3_column_name() or sqlite3_column_name16() on the same column. - /// - /// ^If sqlite3_malloc() fails during the processing of either routine - /// (for example during a conversion from UTF-8 to UTF-16) then a - /// NULL pointer is returned. - /// - /// ^The name of a result column is the value of the "AS" clause for - /// that column, if there is an AS clause. If there is no AS clause - /// then the name of the column is unspecified and may change from - /// one release of SQLite to the next. - ffi.Pointer sqlite3_column_name( - ffi.Pointer arg0, - int N, - ) { - return _sqlite3_column_name(arg0, N); - } - - late final _sqlite3_column_namePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Int) - > - >('sqlite3_column_name'); - late final _sqlite3_column_name = _sqlite3_column_namePtr - .asFunction< - ffi.Pointer Function(ffi.Pointer, int) - >(); - - ffi.Pointer sqlite3_column_name16( - ffi.Pointer arg0, - int N, - ) { - return _sqlite3_column_name16(arg0, N); - } - - late final _sqlite3_column_name16Ptr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Int) - > - >('sqlite3_column_name16'); - late final _sqlite3_column_name16 = _sqlite3_column_name16Ptr - .asFunction< - ffi.Pointer Function(ffi.Pointer, int) - >(); - - ffi.Pointer sqlite3_column_origin_name( - ffi.Pointer arg0, - int arg1, - ) { - return _sqlite3_column_origin_name(arg0, arg1); - } - - late final _sqlite3_column_origin_namePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Int) - > - >('sqlite3_column_origin_name'); - late final _sqlite3_column_origin_name = _sqlite3_column_origin_namePtr - .asFunction< - ffi.Pointer Function(ffi.Pointer, int) - >(); - - ffi.Pointer sqlite3_column_origin_name16( - ffi.Pointer arg0, - int arg1, - ) { - return _sqlite3_column_origin_name16(arg0, arg1); - } - - late final _sqlite3_column_origin_name16Ptr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Int) - > - >('sqlite3_column_origin_name16'); - late final _sqlite3_column_origin_name16 = _sqlite3_column_origin_name16Ptr - .asFunction< - ffi.Pointer Function(ffi.Pointer, int) - >(); - - ffi.Pointer sqlite3_column_table_name( - ffi.Pointer arg0, - int arg1, - ) { - return _sqlite3_column_table_name(arg0, arg1); - } - - late final _sqlite3_column_table_namePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Int) - > - >('sqlite3_column_table_name'); - late final _sqlite3_column_table_name = _sqlite3_column_table_namePtr - .asFunction< - ffi.Pointer Function(ffi.Pointer, int) - >(); - - ffi.Pointer sqlite3_column_table_name16( - ffi.Pointer arg0, - int arg1, - ) { - return _sqlite3_column_table_name16(arg0, arg1); - } - - late final _sqlite3_column_table_name16Ptr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Int) - > - >('sqlite3_column_table_name16'); - late final _sqlite3_column_table_name16 = _sqlite3_column_table_name16Ptr - .asFunction< - ffi.Pointer Function(ffi.Pointer, int) - >(); - - ffi.Pointer sqlite3_column_text( - ffi.Pointer arg0, - int iCol, - ) { - return _sqlite3_column_text(arg0, iCol); - } - - late final _sqlite3_column_textPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Int, - ) - > - >('sqlite3_column_text'); - late final _sqlite3_column_text = _sqlite3_column_textPtr - .asFunction< - ffi.Pointer Function(ffi.Pointer, int) - >(); - - ffi.Pointer sqlite3_column_text16( - ffi.Pointer arg0, - int iCol, - ) { - return _sqlite3_column_text16(arg0, iCol); - } - - late final _sqlite3_column_text16Ptr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Int) - > - >('sqlite3_column_text16'); - late final _sqlite3_column_text16 = _sqlite3_column_text16Ptr - .asFunction< - ffi.Pointer Function(ffi.Pointer, int) - >(); - - int sqlite3_column_type(ffi.Pointer arg0, int iCol) { - return _sqlite3_column_type(arg0, iCol); - } - - late final _sqlite3_column_typePtr = - _lookup< - ffi.NativeFunction, ffi.Int)> - >('sqlite3_column_type'); - late final _sqlite3_column_type = _sqlite3_column_typePtr - .asFunction, int)>(); - - ffi.Pointer sqlite3_column_value( - ffi.Pointer arg0, - int iCol, - ) { - return _sqlite3_column_value(arg0, iCol); - } - - late final _sqlite3_column_valuePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Int, - ) - > - >('sqlite3_column_value'); - late final _sqlite3_column_value = _sqlite3_column_valuePtr - .asFunction< - ffi.Pointer Function(ffi.Pointer, int) - >(); - - /// CAPI3REF: Commit And Rollback Notification Callbacks - /// METHOD: sqlite3 - /// - /// ^The sqlite3_commit_hook() interface registers a callback - /// function to be invoked whenever a transaction is [COMMIT | committed]. - /// ^Any callback set by a previous call to sqlite3_commit_hook() - /// for the same database connection is overridden. - /// ^The sqlite3_rollback_hook() interface registers a callback - /// function to be invoked whenever a transaction is [ROLLBACK | rolled back]. - /// ^Any callback set by a previous call to sqlite3_rollback_hook() - /// for the same database connection is overridden. - /// ^The pArg argument is passed through to the callback. - /// ^If the callback on a commit hook function returns non-zero, - /// then the commit is converted into a rollback. - /// - /// ^The sqlite3_commit_hook(D,C,P) and sqlite3_rollback_hook(D,C,P) functions - /// return the P argument from the previous call of the same function - /// on the same [database connection] D, or NULL for - /// the first call for each function on D. - /// - /// The commit and rollback hook callbacks are not reentrant. - /// The callback implementation must not do anything that will modify - /// the database connection that invoked the callback. Any actions - /// to modify the database connection must be deferred until after the - /// completion of the [sqlite3_step()] call that triggered the commit - /// or rollback hook in the first place. - /// Note that running any other SQL statements, including SELECT statements, - /// or merely calling [sqlite3_prepare_v2()] and [sqlite3_step()] will modify - /// the database connections for the meaning of "modify" in this paragraph. - /// - /// ^Registering a NULL function disables the callback. - /// - /// ^When the commit hook callback routine returns zero, the [COMMIT] - /// operation is allowed to continue normally. ^If the commit hook - /// returns non-zero, then the [COMMIT] is converted into a [ROLLBACK]. - /// ^The rollback hook is invoked on a rollback that results from a commit - /// hook returning non-zero, just as it would be with any other rollback. - /// - /// ^For the purposes of this API, a transaction is said to have been - /// rolled back if an explicit "ROLLBACK" statement is executed, or - /// an error or constraint causes an implicit rollback to occur. - /// ^The rollback callback is not invoked if a transaction is - /// automatically rolled back because the database connection is closed. - /// - /// See also the [sqlite3_update_hook()] interface. - ffi.Pointer sqlite3_commit_hook( - ffi.Pointer arg0, - ffi.Pointer)>> - arg1, - ffi.Pointer arg2, - ) { - return _sqlite3_commit_hook(arg0, arg1, arg2); - } - - late final _sqlite3_commit_hookPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction)> - >, - ffi.Pointer, - ) - > - >('sqlite3_commit_hook'); - late final _sqlite3_commit_hook = _sqlite3_commit_hookPtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction)> - >, - ffi.Pointer, - ) - >(); - - ffi.Pointer sqlite3_compileoption_get(int N) { - return _sqlite3_compileoption_get(N); - } - - late final _sqlite3_compileoption_getPtr = - _lookup Function(ffi.Int)>>( - 'sqlite3_compileoption_get', - ); - late final _sqlite3_compileoption_get = _sqlite3_compileoption_getPtr - .asFunction Function(int)>(); - - int sqlite3_compileoption_used(ffi.Pointer zOptName) { - return _sqlite3_compileoption_used(zOptName); - } - - late final _sqlite3_compileoption_usedPtr = - _lookup)>>( - 'sqlite3_compileoption_used', - ); - late final _sqlite3_compileoption_used = _sqlite3_compileoption_usedPtr - .asFunction)>(); - - /// CAPI3REF: Determine If An SQL Statement Is Complete - /// - /// These routines are useful during command-line input to determine if the - /// currently entered text seems to form a complete SQL statement or - /// if additional input is needed before sending the text into - /// SQLite for parsing. ^These routines return 1 if the input string - /// appears to be a complete SQL statement. ^A statement is judged to be - /// complete if it ends with a semicolon token and is not a prefix of a - /// well-formed CREATE TRIGGER statement. ^Semicolons that are embedded within - /// string literals or quoted identifier names or comments are not - /// independent tokens (they are part of the token in which they are - /// embedded) and thus do not count as a statement terminator. ^Whitespace - /// and comments that follow the final semicolon are ignored. - /// - /// ^These routines return 0 if the statement is incomplete. ^If a - /// memory allocation fails, then SQLITE_NOMEM is returned. - /// - /// ^These routines do not parse the SQL statements thus - /// will not detect syntactically incorrect SQL. - /// - /// ^(If SQLite has not been initialized using [sqlite3_initialize()] prior - /// to invoking sqlite3_complete16() then sqlite3_initialize() is invoked - /// automatically by sqlite3_complete16(). If that initialization fails, - /// then the return value from sqlite3_complete16() will be non-zero - /// regardless of whether or not the input SQL is complete.)^ - /// - /// The input to [sqlite3_complete()] must be a zero-terminated - /// UTF-8 string. - /// - /// The input to [sqlite3_complete16()] must be a zero-terminated - /// UTF-16 string in native byte order. - int sqlite3_complete(ffi.Pointer sql) { - return _sqlite3_complete(sql); - } - - late final _sqlite3_completePtr = - _lookup)>>( - 'sqlite3_complete', - ); - late final _sqlite3_complete = _sqlite3_completePtr - .asFunction)>(); - - int sqlite3_complete16(ffi.Pointer sql) { - return _sqlite3_complete16(sql); - } - - late final _sqlite3_complete16Ptr = - _lookup)>>( - 'sqlite3_complete16', - ); - late final _sqlite3_complete16 = _sqlite3_complete16Ptr - .asFunction)>(); - - /// CAPI3REF: Configuring The SQLite Library - /// - /// The sqlite3_config() interface is used to make global configuration - /// changes to SQLite in order to tune SQLite to the specific needs of - /// the application. The default configuration is recommended for most - /// applications and so this routine is usually not necessary. It is - /// provided to support rare applications with unusual needs. - /// - /// The sqlite3_config() interface is not threadsafe. The application - /// must ensure that no other SQLite interfaces are invoked by other - /// threads while sqlite3_config() is running. - /// - /// The sqlite3_config() interface - /// may only be invoked prior to library initialization using - /// [sqlite3_initialize()] or after shutdown by [sqlite3_shutdown()]. - /// ^If sqlite3_config() is called after [sqlite3_initialize()] and before - /// [sqlite3_shutdown()] then it will return SQLITE_MISUSE. - /// Note, however, that ^sqlite3_config() can be called as part of the - /// implementation of an application-defined [sqlite3_os_init()]. - /// - /// The first argument to sqlite3_config() is an integer - /// [configuration option] that determines - /// what property of SQLite is to be configured. Subsequent arguments - /// vary depending on the [configuration option] - /// in the first argument. - /// - /// ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK]. - /// ^If the option is unknown or SQLite is unable to set the option - /// then this routine returns a non-zero [error code]. - int sqlite3_config(int arg0) { - return _sqlite3_config(arg0); - } - - late final _sqlite3_configPtr = - _lookup>('sqlite3_config'); - late final _sqlite3_config = _sqlite3_configPtr - .asFunction(); - - /// CAPI3REF: Database Connection For Functions - /// METHOD: sqlite3_context - /// - /// ^The sqlite3_context_db_handle() interface returns a copy of - /// the pointer to the [database connection] (the 1st parameter) - /// of the [sqlite3_create_function()] - /// and [sqlite3_create_function16()] routines that originally - /// registered the application defined function. - ffi.Pointer sqlite3_context_db_handle( - ffi.Pointer arg0, - ) { - return _sqlite3_context_db_handle(arg0); - } - - late final _sqlite3_context_db_handlePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('sqlite3_context_db_handle'); - late final _sqlite3_context_db_handle = _sqlite3_context_db_handlePtr - .asFunction< - ffi.Pointer Function(ffi.Pointer) - >(); - - /// CAPI3REF: Define New Collating Sequences - /// METHOD: sqlite3 - /// - /// ^These functions add, remove, or modify a [collation] associated - /// with the [database connection] specified as the first argument. - /// - /// ^The name of the collation is a UTF-8 string - /// for sqlite3_create_collation() and sqlite3_create_collation_v2() - /// and a UTF-16 string in native byte order for sqlite3_create_collation16(). - /// ^Collation names that compare equal according to [sqlite3_strnicmp()] are - /// considered to be the same name. - /// - /// ^(The third argument (eTextRep) must be one of the constants: - ///
    - ///
  • [SQLITE_UTF8], - ///
  • [SQLITE_UTF16LE], - ///
  • [SQLITE_UTF16BE], - ///
  • [SQLITE_UTF16], or - ///
  • [SQLITE_UTF16_ALIGNED]. - ///
)^ - /// ^The eTextRep argument determines the encoding of strings passed - /// to the collating function callback, xCompare. - /// ^The [SQLITE_UTF16] and [SQLITE_UTF16_ALIGNED] values for eTextRep - /// force strings to be UTF16 with native byte order. - /// ^The [SQLITE_UTF16_ALIGNED] value for eTextRep forces strings to begin - /// on an even byte address. - /// - /// ^The fourth argument, pArg, is an application data pointer that is passed - /// through as the first argument to the collating function callback. - /// - /// ^The fifth argument, xCompare, is a pointer to the collating function. - /// ^Multiple collating functions can be registered using the same name but - /// with different eTextRep parameters and SQLite will use whichever - /// function requires the least amount of data transformation. - /// ^If the xCompare argument is NULL then the collating function is - /// deleted. ^When all collating functions having the same name are deleted, - /// that collation is no longer usable. - /// - /// ^The collating function callback is invoked with a copy of the pArg - /// application data pointer and with two strings in the encoding specified - /// by the eTextRep argument. The two integer parameters to the collating - /// function callback are the length of the two strings, in bytes. The collating - /// function must return an integer that is negative, zero, or positive - /// if the first string is less than, equal to, or greater than the second, - /// respectively. A collating function must always return the same answer - /// given the same inputs. If two or more collating functions are registered - /// to the same collation name (using different eTextRep values) then all - /// must give an equivalent answer when invoked with equivalent strings. - /// The collating function must obey the following properties for all - /// strings A, B, and C: - /// - ///
    - ///
  1. If A==B then B==A. - ///
  2. If A==B and B==C then A==C. - ///
  3. If A<B THEN B>A. - ///
  4. If A<B and B<C then A<C. - ///
- /// - /// If a collating function fails any of the above constraints and that - /// collating function is registered and used, then the behavior of SQLite - /// is undefined. - /// - /// ^The sqlite3_create_collation_v2() works like sqlite3_create_collation() - /// with the addition that the xDestroy callback is invoked on pArg when - /// the collating function is deleted. - /// ^Collating functions are deleted when they are overridden by later - /// calls to the collation creation functions or when the - /// [database connection] is closed using [sqlite3_close()]. - /// - /// ^The xDestroy callback is not called if the - /// sqlite3_create_collation_v2() function fails. Applications that invoke - /// sqlite3_create_collation_v2() with a non-NULL xDestroy argument should - /// check the return code and dispose of the application data pointer - /// themselves rather than expecting SQLite to deal with it for them. - /// This is different from every other SQLite interface. The inconsistency - /// is unfortunate but cannot be changed without breaking backwards - /// compatibility. - /// - /// See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()]. - int sqlite3_create_collation( - ffi.Pointer arg0, - ffi.Pointer zName, - int eTextRep, - ffi.Pointer pArg, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ) - > - > - xCompare, - ) { - return _sqlite3_create_collation(arg0, zName, eTextRep, pArg, xCompare); - } - - late final _sqlite3_create_collationPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ) - > - >, - ) - > - >('sqlite3_create_collation'); - late final _sqlite3_create_collation = _sqlite3_create_collationPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ) - > - >, - ) - >(); - - int sqlite3_create_collation16( - ffi.Pointer arg0, - ffi.Pointer zName, - int eTextRep, - ffi.Pointer pArg, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ) - > - > - xCompare, - ) { - return _sqlite3_create_collation16(arg0, zName, eTextRep, pArg, xCompare); - } - - late final _sqlite3_create_collation16Ptr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ) - > - >, - ) - > - >('sqlite3_create_collation16'); - late final _sqlite3_create_collation16 = _sqlite3_create_collation16Ptr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ) - > - >, - ) - >(); - - int sqlite3_create_collation_v2( - ffi.Pointer arg0, - ffi.Pointer zName, - int eTextRep, - ffi.Pointer pArg, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ) - > - > - xCompare, - ffi.Pointer)>> - xDestroy, - ) { - return _sqlite3_create_collation_v2( - arg0, - zName, - eTextRep, - pArg, - xCompare, - xDestroy, - ); - } - - late final _sqlite3_create_collation_v2Ptr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ) - > - >, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - > - >('sqlite3_create_collation_v2'); - late final _sqlite3_create_collation_v2 = _sqlite3_create_collation_v2Ptr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ) - > - >, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - >(); - - /// CAPI3REF: Create and Destroy VFS Filenames - /// - /// These interfces are provided for use by [VFS shim] implementations and - /// are not useful outside of that context. - /// - /// The sqlite3_create_filename(D,J,W,N,P) allocates memory to hold a version of - /// database filename D with corresponding journal file J and WAL file W and - /// with N URI parameters key/values pairs in the array P. The result from - /// sqlite3_create_filename(D,J,W,N,P) is a pointer to a database filename that - /// is safe to pass to routines like: - ///
    - ///
  • [sqlite3_uri_parameter()], - ///
  • [sqlite3_uri_boolean()], - ///
  • [sqlite3_uri_int64()], - ///
  • [sqlite3_uri_key()], - ///
  • [sqlite3_filename_database()], - ///
  • [sqlite3_filename_journal()], or - ///
  • [sqlite3_filename_wal()]. - ///
- /// If a memory allocation error occurs, sqlite3_create_filename() might - /// return a NULL pointer. The memory obtained from sqlite3_create_filename(X) - /// must be released by a corresponding call to sqlite3_free_filename(Y). - /// - /// The P parameter in sqlite3_create_filename(D,J,W,N,P) should be an array - /// of 2*N pointers to strings. Each pair of pointers in this array corresponds - /// to a key and value for a query parameter. The P parameter may be a NULL - /// pointer if N is zero. None of the 2*N pointers in the P array may be - /// NULL pointers and key pointers should not be empty strings. - /// None of the D, J, or W parameters to sqlite3_create_filename(D,J,W,N,P) may - /// be NULL pointers, though they can be empty strings. - /// - /// The sqlite3_free_filename(Y) routine releases a memory allocation - /// previously obtained from sqlite3_create_filename(). Invoking - /// sqlite3_free_filename(Y) where Y is a NULL pointer is a harmless no-op. - /// - /// If the Y parameter to sqlite3_free_filename(Y) is anything other - /// than a NULL pointer or a pointer previously acquired from - /// sqlite3_create_filename(), then bad things such as heap - /// corruption or segfaults may occur. The value Y should be - /// used again after sqlite3_free_filename(Y) has been called. This means - /// that if the [sqlite3_vfs.xOpen()] method of a VFS has been called using Y, - /// then the corresponding [sqlite3_module.xClose() method should also be - /// invoked prior to calling sqlite3_free_filename(Y). - ffi.Pointer sqlite3_create_filename( - ffi.Pointer zDatabase, - ffi.Pointer zJournal, - ffi.Pointer zWal, - int nParam, - ffi.Pointer> azParam, - ) { - return _sqlite3_create_filename(zDatabase, zJournal, zWal, nParam, azParam); - } - - late final _sqlite3_create_filenamePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ) - > - >('sqlite3_create_filename'); - late final _sqlite3_create_filename = _sqlite3_create_filenamePtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>, - ) - >(); - - /// CAPI3REF: Create Or Redefine SQL Functions - /// KEYWORDS: {function creation routines} - /// METHOD: sqlite3 - /// - /// ^These functions (collectively known as "function creation routines") - /// are used to add SQL functions or aggregates or to redefine the behavior - /// of existing SQL functions or aggregates. The only differences between - /// the three "sqlite3_create_function*" routines are the text encoding - /// expected for the second parameter (the name of the function being - /// created) and the presence or absence of a destructor callback for - /// the application data pointer. Function sqlite3_create_window_function() - /// is similar, but allows the user to supply the extra callback functions - /// needed by [aggregate window functions]. - /// - /// ^The first parameter is the [database connection] to which the SQL - /// function is to be added. ^If an application uses more than one database - /// connection then application-defined SQL functions must be added - /// to each database connection separately. - /// - /// ^The second parameter is the name of the SQL function to be created or - /// redefined. ^The length of the name is limited to 255 bytes in a UTF-8 - /// representation, exclusive of the zero-terminator. ^Note that the name - /// length limit is in UTF-8 bytes, not characters nor UTF-16 bytes. - /// ^Any attempt to create a function with a longer name - /// will result in [SQLITE_MISUSE] being returned. - /// - /// ^The third parameter (nArg) - /// is the number of arguments that the SQL function or - /// aggregate takes. ^If this parameter is -1, then the SQL function or - /// aggregate may take any number of arguments between 0 and the limit - /// set by [sqlite3_limit]([SQLITE_LIMIT_FUNCTION_ARG]). If the third - /// parameter is less than -1 or greater than 127 then the behavior is - /// undefined. - /// - /// ^The fourth parameter, eTextRep, specifies what - /// [SQLITE_UTF8 | text encoding] this SQL function prefers for - /// its parameters. The application should set this parameter to - /// [SQLITE_UTF16LE] if the function implementation invokes - /// [sqlite3_value_text16le()] on an input, or [SQLITE_UTF16BE] if the - /// implementation invokes [sqlite3_value_text16be()] on an input, or - /// [SQLITE_UTF16] if [sqlite3_value_text16()] is used, or [SQLITE_UTF8] - /// otherwise. ^The same SQL function may be registered multiple times using - /// different preferred text encodings, with different implementations for - /// each encoding. - /// ^When multiple implementations of the same function are available, SQLite - /// will pick the one that involves the least amount of data conversion. - /// - /// ^The fourth parameter may optionally be ORed with [SQLITE_DETERMINISTIC] - /// to signal that the function will always return the same result given - /// the same inputs within a single SQL statement. Most SQL functions are - /// deterministic. The built-in [random()] SQL function is an example of a - /// function that is not deterministic. The SQLite query planner is able to - /// perform additional optimizations on deterministic functions, so use - /// of the [SQLITE_DETERMINISTIC] flag is recommended where possible. - /// - /// ^The fourth parameter may also optionally include the [SQLITE_DIRECTONLY] - /// flag, which if present prevents the function from being invoked from - /// within VIEWs, TRIGGERs, CHECK constraints, generated column expressions, - /// index expressions, or the WHERE clause of partial indexes. - /// - /// - /// For best security, the [SQLITE_DIRECTONLY] flag is recommended for - /// all application-defined SQL functions that do not need to be - /// used inside of triggers, view, CHECK constraints, or other elements of - /// the database schema. This flags is especially recommended for SQL - /// functions that have side effects or reveal internal application state. - /// Without this flag, an attacker might be able to modify the schema of - /// a database file to include invocations of the function with parameters - /// chosen by the attacker, which the application will then execute when - /// the database file is opened and read. - /// - /// - /// ^(The fifth parameter is an arbitrary pointer. The implementation of the - /// function can gain access to this pointer using [sqlite3_user_data()].)^ - /// - /// ^The sixth, seventh and eighth parameters passed to the three - /// "sqlite3_create_function*" functions, xFunc, xStep and xFinal, are - /// pointers to C-language functions that implement the SQL function or - /// aggregate. ^A scalar SQL function requires an implementation of the xFunc - /// callback only; NULL pointers must be passed as the xStep and xFinal - /// parameters. ^An aggregate SQL function requires an implementation of xStep - /// and xFinal and NULL pointer must be passed for xFunc. ^To delete an existing - /// SQL function or aggregate, pass NULL pointers for all three function - /// callbacks. - /// - /// ^The sixth, seventh, eighth and ninth parameters (xStep, xFinal, xValue - /// and xInverse) passed to sqlite3_create_window_function are pointers to - /// C-language callbacks that implement the new function. xStep and xFinal - /// must both be non-NULL. xValue and xInverse may either both be NULL, in - /// which case a regular aggregate function is created, or must both be - /// non-NULL, in which case the new function may be used as either an aggregate - /// or aggregate window function. More details regarding the implementation - /// of aggregate window functions are - /// [user-defined window functions|available here]. - /// - /// ^(If the final parameter to sqlite3_create_function_v2() or - /// sqlite3_create_window_function() is not NULL, then it is destructor for - /// the application data pointer. The destructor is invoked when the function - /// is deleted, either by being overloaded or when the database connection - /// closes.)^ ^The destructor is also invoked if the call to - /// sqlite3_create_function_v2() fails. ^When the destructor callback is - /// invoked, it is passed a single argument which is a copy of the application - /// data pointer which was the fifth parameter to sqlite3_create_function_v2(). - /// - /// ^It is permitted to register multiple implementations of the same - /// functions with the same name but with either differing numbers of - /// arguments or differing preferred text encodings. ^SQLite will use - /// the implementation that most closely matches the way in which the - /// SQL function is used. ^A function implementation with a non-negative - /// nArg parameter is a better match than a function implementation with - /// a negative nArg. ^A function where the preferred text encoding - /// matches the database encoding is a better - /// match than a function where the encoding is different. - /// ^A function where the encoding difference is between UTF16le and UTF16be - /// is a closer match than a function where the encoding difference is - /// between UTF8 and UTF16. - /// - /// ^Built-in functions may be overloaded by new application-defined functions. - /// - /// ^An application-defined function is permitted to call other - /// SQLite interfaces. However, such calls must not - /// close the database connection nor finalize or reset the prepared - /// statement in which the function is running. - int sqlite3_create_function( - ffi.Pointer db, - ffi.Pointer zFunctionName, - int nArg, - int eTextRep, - ffi.Pointer pApp, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ) - > - > - xFunc, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ) - > - > - xStep, - ffi.Pointer< - ffi.NativeFunction)> - > - xFinal, - ) { - return _sqlite3_create_function( - db, - zFunctionName, - nArg, - eTextRep, - pApp, - xFunc, - xStep, - xFinal, - ); - } - - late final _sqlite3_create_functionPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ) - > - >, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ) - > - >, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer) - > - >, - ) - > - >('sqlite3_create_function'); - late final _sqlite3_create_function = _sqlite3_create_functionPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ) - > - >, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ) - > - >, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - >(); - - int sqlite3_create_function16( - ffi.Pointer db, - ffi.Pointer zFunctionName, - int nArg, - int eTextRep, - ffi.Pointer pApp, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ) - > - > - xFunc, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ) - > - > - xStep, - ffi.Pointer< - ffi.NativeFunction)> - > - xFinal, - ) { - return _sqlite3_create_function16( - db, - zFunctionName, - nArg, - eTextRep, - pApp, - xFunc, - xStep, - xFinal, - ); - } - - late final _sqlite3_create_function16Ptr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ) - > - >, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ) - > - >, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer) - > - >, - ) - > - >('sqlite3_create_function16'); - late final _sqlite3_create_function16 = _sqlite3_create_function16Ptr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ) - > - >, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ) - > - >, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - >(); - - int sqlite3_create_function_v2( - ffi.Pointer db, - ffi.Pointer zFunctionName, - int nArg, - int eTextRep, - ffi.Pointer pApp, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ) - > - > - xFunc, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ) - > - > - xStep, - ffi.Pointer< - ffi.NativeFunction)> - > - xFinal, - ffi.Pointer)>> - xDestroy, - ) { - return _sqlite3_create_function_v2( - db, - zFunctionName, - nArg, - eTextRep, - pApp, - xFunc, - xStep, - xFinal, - xDestroy, - ); - } - - late final _sqlite3_create_function_v2Ptr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ) - > - >, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ) - > - >, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer) - > - >, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - > - >('sqlite3_create_function_v2'); - late final _sqlite3_create_function_v2 = _sqlite3_create_function_v2Ptr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ) - > - >, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ) - > - >, - ffi.Pointer< - ffi.NativeFunction)> - >, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - >(); - - /// CAPI3REF: Register A Virtual Table Implementation - /// METHOD: sqlite3 - /// - /// ^These routines are used to register a new [virtual table module] name. - /// ^Module names must be registered before - /// creating a new [virtual table] using the module and before using a - /// preexisting [virtual table] for the module. - /// - /// ^The module name is registered on the [database connection] specified - /// by the first parameter. ^The name of the module is given by the - /// second parameter. ^The third parameter is a pointer to - /// the implementation of the [virtual table module]. ^The fourth - /// parameter is an arbitrary client data pointer that is passed through - /// into the [xCreate] and [xConnect] methods of the virtual table module - /// when a new virtual table is be being created or reinitialized. - /// - /// ^The sqlite3_create_module_v2() interface has a fifth parameter which - /// is a pointer to a destructor for the pClientData. ^SQLite will - /// invoke the destructor function (if it is not NULL) when SQLite - /// no longer needs the pClientData pointer. ^The destructor will also - /// be invoked if the call to sqlite3_create_module_v2() fails. - /// ^The sqlite3_create_module() - /// interface is equivalent to sqlite3_create_module_v2() with a NULL - /// destructor. - /// - /// ^If the third parameter (the pointer to the sqlite3_module object) is - /// NULL then no new module is create and any existing modules with the - /// same name are dropped. - /// - /// See also: [sqlite3_drop_modules()] - int sqlite3_create_module( - ffi.Pointer db, - ffi.Pointer zName, - ffi.Pointer p, - ffi.Pointer pClientData, - ) { - return _sqlite3_create_module(db, zName, p, pClientData); - } - - late final _sqlite3_create_modulePtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >('sqlite3_create_module'); - late final _sqlite3_create_module = _sqlite3_create_modulePtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); - - int sqlite3_create_module_v2( - ffi.Pointer db, - ffi.Pointer zName, - ffi.Pointer p, - ffi.Pointer pClientData, - ffi.Pointer)>> - xDestroy, - ) { - return _sqlite3_create_module_v2(db, zName, p, pClientData, xDestroy); - } - - late final _sqlite3_create_module_v2Ptr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - > - >('sqlite3_create_module_v2'); - late final _sqlite3_create_module_v2 = _sqlite3_create_module_v2Ptr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - >(); - - int sqlite3_create_window_function( - ffi.Pointer db, - ffi.Pointer zFunctionName, - int nArg, - int eTextRep, - ffi.Pointer pApp, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ) - > - > - xStep, - ffi.Pointer< - ffi.NativeFunction)> - > - xFinal, - ffi.Pointer< - ffi.NativeFunction)> - > - xValue, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ) - > - > - xInverse, - ffi.Pointer)>> - xDestroy, - ) { - return _sqlite3_create_window_function( - db, - zFunctionName, - nArg, - eTextRep, - pApp, - xStep, - xFinal, - xValue, - xInverse, - xDestroy, - ); - } - - late final _sqlite3_create_window_functionPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ) - > - >, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer) - > - >, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer) - > - >, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ) - > - >, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - > - >('sqlite3_create_window_function'); - late final _sqlite3_create_window_function = - _sqlite3_create_window_functionPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ) - > - >, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer) - > - >, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer) - > - >, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ) - > - >, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - >(); - - /// CAPI3REF: Number of columns in a result set - /// METHOD: sqlite3_stmt - /// - /// ^The sqlite3_data_count(P) interface returns the number of columns in the - /// current row of the result set of [prepared statement] P. - /// ^If prepared statement P does not have results ready to return - /// (via calls to the [sqlite3_column_int | sqlite3_column()] family of - /// interfaces) then sqlite3_data_count(P) returns 0. - /// ^The sqlite3_data_count(P) routine also returns 0 if P is a NULL pointer. - /// ^The sqlite3_data_count(P) routine returns 0 if the previous call to - /// [sqlite3_step](P) returned [SQLITE_DONE]. ^The sqlite3_data_count(P) - /// will return non-zero if previous call to [sqlite3_step](P) returned - /// [SQLITE_ROW], except in the case of the [PRAGMA incremental_vacuum] - /// where it always returns zero since each step of that multi-step - /// pragma returns 0 columns of data. - /// - /// See also: [sqlite3_column_count()] - int sqlite3_data_count(ffi.Pointer pStmt) { - return _sqlite3_data_count(pStmt); - } - - late final _sqlite3_data_countPtr = - _lookup)>>( - 'sqlite3_data_count', - ); - late final _sqlite3_data_count = _sqlite3_data_countPtr - .asFunction)>(); - - /// CAPI3REF: Name Of The Folder Holding Database Files - /// - /// ^(If this global variable is made to point to a string which is - /// the name of a folder (a.k.a. directory), then all database files - /// specified with a relative pathname and created or accessed by - /// SQLite when using a built-in windows [sqlite3_vfs | VFS] will be assumed - /// to be relative to that directory.)^ ^If this variable is a NULL - /// pointer, then SQLite assumes that all database files specified - /// with a relative pathname are relative to the current directory - /// for the process. Only the windows VFS makes use of this global - /// variable; it is ignored by the unix VFS. - /// - /// Changing the value of this variable while a database connection is - /// open can result in a corrupt database. - /// - /// It is not safe to read or modify this variable in more than one - /// thread at a time. It is not safe to read or modify this variable - /// if a [database connection] is being used at the same time in a separate - /// thread. - /// It is intended that this variable be set once - /// as part of process initialization and before any SQLite interface - /// routines have been called and that this variable remain unchanged - /// thereafter. - /// - /// ^The [data_store_directory pragma] may modify this variable and cause - /// it to point to memory obtained from [sqlite3_malloc]. ^Furthermore, - /// the [data_store_directory pragma] always assumes that any string - /// that this variable points to is held in memory obtained from - /// [sqlite3_malloc] and the pragma may attempt to free that memory - /// using [sqlite3_free]. - /// Hence, if this variable is modified directly, either it should be - /// made NULL or made to point to memory obtained from [sqlite3_malloc] - /// or else the use of the [data_store_directory pragma] should be avoided. - late final ffi.Pointer> _sqlite3_data_directory = - _lookup>('sqlite3_data_directory'); - - ffi.Pointer get sqlite3_data_directory => - _sqlite3_data_directory.value; - - set sqlite3_data_directory(ffi.Pointer value) => - _sqlite3_data_directory.value = value; - - /// CAPI3REF: Database File Corresponding To A Journal - /// - /// ^If X is the name of a rollback or WAL-mode journal file that is - /// passed into the xOpen method of [sqlite3_vfs], then - /// sqlite3_database_file_object(X) returns a pointer to the [sqlite3_file] - /// object that represents the main database file. - /// - /// This routine is intended for use in custom [VFS] implementations - /// only. It is not a general-purpose interface. - /// The argument sqlite3_file_object(X) must be a filename pointer that - /// has been passed into [sqlite3_vfs].xOpen method where the - /// flags parameter to xOpen contains one of the bits - /// [SQLITE_OPEN_MAIN_JOURNAL] or [SQLITE_OPEN_WAL]. Any other use - /// of this routine results in undefined and probably undesirable - /// behavior. - ffi.Pointer sqlite3_database_file_object( - ffi.Pointer arg0, - ) { - return _sqlite3_database_file_object(arg0); - } - - late final _sqlite3_database_file_objectPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('sqlite3_database_file_object'); - late final _sqlite3_database_file_object = _sqlite3_database_file_objectPtr - .asFunction Function(ffi.Pointer)>(); - - /// CAPI3REF: Flush caches to disk mid-transaction - /// - /// ^If a write-transaction is open on [database connection] D when the - /// [sqlite3_db_cacheflush(D)] interface invoked, any dirty - /// pages in the pager-cache that are not currently in use are written out - /// to disk. A dirty page may be in use if a database cursor created by an - /// active SQL statement is reading from it, or if it is page 1 of a database - /// file (page 1 is always "in use"). ^The [sqlite3_db_cacheflush(D)] - /// interface flushes caches for all schemas - "main", "temp", and - /// any [attached] databases. - /// - /// ^If this function needs to obtain extra database locks before dirty pages - /// can be flushed to disk, it does so. ^If those locks cannot be obtained - /// immediately and there is a busy-handler callback configured, it is invoked - /// in the usual manner. ^If the required lock still cannot be obtained, then - /// the database is skipped and an attempt made to flush any dirty pages - /// belonging to the next (if any) database. ^If any databases are skipped - /// because locks cannot be obtained, but no other error occurs, this - /// function returns SQLITE_BUSY. - /// - /// ^If any other error occurs while flushing dirty pages to disk (for - /// example an IO error or out-of-memory condition), then processing is - /// abandoned and an SQLite [error code] is returned to the caller immediately. - /// - /// ^Otherwise, if no error occurs, [sqlite3_db_cacheflush()] returns SQLITE_OK. - /// - /// ^This function does not set the database handle error code or message - /// returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions. - int sqlite3_db_cacheflush(ffi.Pointer arg0) { - return _sqlite3_db_cacheflush(arg0); - } - - late final _sqlite3_db_cacheflushPtr = - _lookup)>>( - 'sqlite3_db_cacheflush', - ); - late final _sqlite3_db_cacheflush = _sqlite3_db_cacheflushPtr - .asFunction)>(); - - /// CAPI3REF: Configure database connections - /// METHOD: sqlite3 - /// - /// The sqlite3_db_config() interface is used to make configuration - /// changes to a [database connection]. The interface is similar to - /// [sqlite3_config()] except that the changes apply to a single - /// [database connection] (specified in the first argument). - /// - /// The second argument to sqlite3_db_config(D,V,...) is the - /// [SQLITE_DBCONFIG_LOOKASIDE | configuration verb] - an integer code - /// that indicates what aspect of the [database connection] is being configured. - /// Subsequent arguments vary depending on the configuration verb. - /// - /// ^Calls to sqlite3_db_config() return SQLITE_OK if and only if - /// the call is considered successful. - int sqlite3_db_config(ffi.Pointer arg0, int op) { - return _sqlite3_db_config(arg0, op); - } - - late final _sqlite3_db_configPtr = - _lookup< - ffi.NativeFunction, ffi.Int)> - >('sqlite3_db_config'); - late final _sqlite3_db_config = _sqlite3_db_configPtr - .asFunction, int)>(); - - /// CAPI3REF: Return The Filename For A Database Connection - /// METHOD: sqlite3 - /// - /// ^The sqlite3_db_filename(D,N) interface returns a pointer to the filename - /// associated with database N of connection D. - /// ^If there is no attached database N on the database - /// connection D, or if database N is a temporary or in-memory database, then - /// this function will return either a NULL pointer or an empty string. - /// - /// ^The string value returned by this routine is owned and managed by - /// the database connection. ^The value will be valid until the database N - /// is [DETACH]-ed or until the database connection closes. - /// - /// ^The filename returned by this function is the output of the - /// xFullPathname method of the [VFS]. ^In other words, the filename - /// will be an absolute pathname, even if the filename used - /// to open the database originally was a URI or relative pathname. - /// - /// If the filename pointer returned by this routine is not NULL, then it - /// can be used as the filename input parameter to these routines: - ///
    - ///
  • [sqlite3_uri_parameter()] - ///
  • [sqlite3_uri_boolean()] - ///
  • [sqlite3_uri_int64()] - ///
  • [sqlite3_filename_database()] - ///
  • [sqlite3_filename_journal()] - ///
  • [sqlite3_filename_wal()] - ///
- ffi.Pointer sqlite3_db_filename( - ffi.Pointer db, - ffi.Pointer zDbName, - ) { - return _sqlite3_db_filename(db, zDbName); - } - - late final _sqlite3_db_filenamePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >('sqlite3_db_filename'); - late final _sqlite3_db_filename = _sqlite3_db_filenamePtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); - - /// CAPI3REF: Find The Database Handle Of A Prepared Statement - /// METHOD: sqlite3_stmt - /// - /// ^The sqlite3_db_handle interface returns the [database connection] handle - /// to which a [prepared statement] belongs. ^The [database connection] - /// returned by sqlite3_db_handle is the same [database connection] - /// that was the first argument - /// to the [sqlite3_prepare_v2()] call (or its variants) that was used to - /// create the statement in the first place. - ffi.Pointer sqlite3_db_handle(ffi.Pointer arg0) { - return _sqlite3_db_handle(arg0); - } - - late final _sqlite3_db_handlePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('sqlite3_db_handle'); - late final _sqlite3_db_handle = _sqlite3_db_handlePtr - .asFunction Function(ffi.Pointer)>(); - - /// CAPI3REF: Retrieve the mutex for a database connection - /// METHOD: sqlite3 - /// - /// ^This interface returns a pointer the [sqlite3_mutex] object that - /// serializes access to the [database connection] given in the argument - /// when the [threading mode] is Serialized. - /// ^If the [threading mode] is Single-thread or Multi-thread then this - /// routine returns a NULL pointer. - ffi.Pointer sqlite3_db_mutex(ffi.Pointer arg0) { - return _sqlite3_db_mutex(arg0); - } - - late final _sqlite3_db_mutexPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('sqlite3_db_mutex'); - late final _sqlite3_db_mutex = _sqlite3_db_mutexPtr - .asFunction Function(ffi.Pointer)>(); - - /// CAPI3REF: Determine if a database is read-only - /// METHOD: sqlite3 - /// - /// ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N - /// of connection D is read-only, 0 if it is read/write, or -1 if N is not - /// the name of a database on connection D. - int sqlite3_db_readonly( - ffi.Pointer db, - ffi.Pointer zDbName, - ) { - return _sqlite3_db_readonly(db, zDbName); - } - - late final _sqlite3_db_readonlyPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer) - > - >('sqlite3_db_readonly'); - late final _sqlite3_db_readonly = _sqlite3_db_readonlyPtr - .asFunction, ffi.Pointer)>(); - - /// CAPI3REF: Free Memory Used By A Database Connection - /// METHOD: sqlite3 - /// - /// ^The sqlite3_db_release_memory(D) interface attempts to free as much heap - /// memory as possible from database connection D. Unlike the - /// [sqlite3_release_memory()] interface, this interface is in effect even - /// when the [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is - /// omitted. - /// - /// See also: [sqlite3_release_memory()] - int sqlite3_db_release_memory(ffi.Pointer arg0) { - return _sqlite3_db_release_memory(arg0); - } - - late final _sqlite3_db_release_memoryPtr = - _lookup)>>( - 'sqlite3_db_release_memory', - ); - late final _sqlite3_db_release_memory = _sqlite3_db_release_memoryPtr - .asFunction)>(); - - /// CAPI3REF: Database Connection Status - /// METHOD: sqlite3 - /// - /// ^This interface is used to retrieve runtime status information - /// about a single [database connection]. ^The first argument is the - /// database connection object to be interrogated. ^The second argument - /// is an integer constant, taken from the set of - /// [SQLITE_DBSTATUS options], that - /// determines the parameter to interrogate. The set of - /// [SQLITE_DBSTATUS options] is likely - /// to grow in future releases of SQLite. - /// - /// ^The current value of the requested parameter is written into *pCur - /// and the highest instantaneous value is written into *pHiwtr. ^If - /// the resetFlg is true, then the highest instantaneous value is - /// reset back down to the current value. - /// - /// ^The sqlite3_db_status() routine returns SQLITE_OK on success and a - /// non-zero [error code] on failure. - /// - /// See also: [sqlite3_status()] and [sqlite3_stmt_status()]. - int sqlite3_db_status( - ffi.Pointer arg0, - int op, - ffi.Pointer pCur, - ffi.Pointer pHiwtr, - int resetFlg, - ) { - return _sqlite3_db_status(arg0, op, pCur, pHiwtr, resetFlg); - } - - late final _sqlite3_db_statusPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ) - > - >('sqlite3_db_status'); - late final _sqlite3_db_status = _sqlite3_db_statusPtr - .asFunction< - int Function( - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - int, - ) - >(); - - /// CAPI3REF: Declare The Schema Of A Virtual Table - /// - /// ^The [xCreate] and [xConnect] methods of a - /// [virtual table module] call this interface - /// to declare the format (the names and datatypes of the columns) of - /// the virtual tables they implement. - int sqlite3_declare_vtab( - ffi.Pointer arg0, - ffi.Pointer zSQL, - ) { - return _sqlite3_declare_vtab(arg0, zSQL); - } - - late final _sqlite3_declare_vtabPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer) - > - >('sqlite3_declare_vtab'); - late final _sqlite3_declare_vtab = _sqlite3_declare_vtabPtr - .asFunction, ffi.Pointer)>(); - - /// CAPI3REF: Deserialize a database - /// - /// The sqlite3_deserialize(D,S,P,N,M,F) interface causes the - /// [database connection] D to disconnect from database S and then - /// reopen S as an in-memory database based on the serialization contained - /// in P. The serialized database P is N bytes in size. M is the size of - /// the buffer P, which might be larger than N. If M is larger than N, and - /// the SQLITE_DESERIALIZE_READONLY bit is not set in F, then SQLite is - /// permitted to add content to the in-memory database as long as the total - /// size does not exceed M bytes. - /// - /// If the SQLITE_DESERIALIZE_FREEONCLOSE bit is set in F, then SQLite will - /// invoke sqlite3_free() on the serialization buffer when the database - /// connection closes. If the SQLITE_DESERIALIZE_RESIZEABLE bit is set, then - /// SQLite will try to increase the buffer size using sqlite3_realloc64() - /// if writes on the database cause it to grow larger than M bytes. - /// - /// The sqlite3_deserialize() interface will fail with SQLITE_BUSY if the - /// database is currently in a read transaction or is involved in a backup - /// operation. - /// - /// If sqlite3_deserialize(D,S,P,N,M,F) fails for any reason and if the - /// SQLITE_DESERIALIZE_FREEONCLOSE bit is set in argument F, then - /// [sqlite3_free()] is invoked on argument P prior to returning. - /// - /// This interface is only available if SQLite is compiled with the - /// [SQLITE_ENABLE_DESERIALIZE] option. - int sqlite3_deserialize( - ffi.Pointer db, - ffi.Pointer zSchema, - ffi.Pointer pData, - int szDb, - int szBuf, - int mFlags, - ) { - return _sqlite3_deserialize(db, zSchema, pData, szDb, szBuf, mFlags); - } - - late final _sqlite3_deserializePtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - sqlite3_int64, - sqlite3_int64, - ffi.UnsignedInt, - ) - > - >('sqlite3_deserialize'); - late final _sqlite3_deserialize = _sqlite3_deserializePtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - int, - int, - ) - >(); - - /// CAPI3REF: Remove Unnecessary Virtual Table Implementations - /// METHOD: sqlite3 - /// - /// ^The sqlite3_drop_modules(D,L) interface removes all virtual - /// table modules from database connection D except those named on list L. - /// The L parameter must be either NULL or a pointer to an array of pointers - /// to strings where the array is terminated by a single NULL pointer. - /// ^If the L parameter is NULL, then all virtual table modules are removed. - /// - /// See also: [sqlite3_create_module()] - int sqlite3_drop_modules( - ffi.Pointer db, - ffi.Pointer> azKeep, - ) { - return _sqlite3_drop_modules(db, azKeep); - } - - late final _sqlite3_drop_modulesPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer>, - ) - > - >('sqlite3_drop_modules'); - late final _sqlite3_drop_modules = _sqlite3_drop_modulesPtr - .asFunction< - int Function(ffi.Pointer, ffi.Pointer>) - >(); - - /// CAPI3REF: Enable Or Disable Extension Loading - /// METHOD: sqlite3 - /// - /// ^So as not to open security holes in older applications that are - /// unprepared to deal with [extension loading], and as a means of disabling - /// [extension loading] while evaluating user-entered SQL, the following API - /// is provided to turn the [sqlite3_load_extension()] mechanism on and off. - /// - /// ^Extension loading is off by default. - /// ^Call the sqlite3_enable_load_extension() routine with onoff==1 - /// to turn extension loading on and call it with onoff==0 to turn - /// it back off again. - /// - /// ^This interface enables or disables both the C-API - /// [sqlite3_load_extension()] and the SQL function [load_extension()]. - /// ^(Use [sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],..) - /// to enable or disable only the C-API.)^ - /// - /// Security warning: It is recommended that extension loading - /// be enabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method - /// rather than this interface, so the [load_extension()] SQL function - /// remains disabled. This will prevent SQL injections from giving attackers - /// access to extension loading capabilities. - int sqlite3_enable_load_extension(ffi.Pointer db, int onoff) { - return _sqlite3_enable_load_extension(db, onoff); - } - - late final _sqlite3_enable_load_extensionPtr = - _lookup< - ffi.NativeFunction, ffi.Int)> - >('sqlite3_enable_load_extension'); - late final _sqlite3_enable_load_extension = _sqlite3_enable_load_extensionPtr - .asFunction, int)>(); - - /// CAPI3REF: Enable Or Disable Shared Pager Cache - /// - /// ^(This routine enables or disables the sharing of the database cache - /// and schema data structures between [database connection | connections] - /// to the same database. Sharing is enabled if the argument is true - /// and disabled if the argument is false.)^ - /// - /// ^Cache sharing is enabled and disabled for an entire process. - /// This is a change as of SQLite [version 3.5.0] ([dateof:3.5.0]). - /// In prior versions of SQLite, - /// sharing was enabled or disabled for each thread separately. - /// - /// ^(The cache sharing mode set by this interface effects all subsequent - /// calls to [sqlite3_open()], [sqlite3_open_v2()], and [sqlite3_open16()]. - /// Existing database connections continue to use the sharing mode - /// that was in effect at the time they were opened.)^ - /// - /// ^(This routine returns [SQLITE_OK] if shared cache was enabled or disabled - /// successfully. An [error code] is returned otherwise.)^ - /// - /// ^Shared cache is disabled by default. It is recommended that it stay - /// that way. In other words, do not use this routine. This interface - /// continues to be provided for historical compatibility, but its use is - /// discouraged. Any use of shared cache is discouraged. If shared cache - /// must be used, it is recommended that shared cache only be enabled for - /// individual database connections using the [sqlite3_open_v2()] interface - /// with the [SQLITE_OPEN_SHAREDCACHE] flag. - /// - /// Note: This method is disabled on MacOS X 10.7 and iOS version 5.0 - /// and will always return SQLITE_MISUSE. On those systems, - /// shared cache mode should be enabled per-database connection via - /// [sqlite3_open_v2()] with [SQLITE_OPEN_SHAREDCACHE]. - /// - /// This interface is threadsafe on processors where writing a - /// 32-bit integer is atomic. - /// - /// See Also: [SQLite Shared-Cache Mode] - int sqlite3_enable_shared_cache(int arg0) { - return _sqlite3_enable_shared_cache(arg0); - } - - late final _sqlite3_enable_shared_cachePtr = - _lookup>( - 'sqlite3_enable_shared_cache', - ); - late final _sqlite3_enable_shared_cache = _sqlite3_enable_shared_cachePtr - .asFunction(); - - /// CAPI3REF: Error Codes And Messages - /// METHOD: sqlite3 - /// - /// ^If the most recent sqlite3_* API call associated with - /// [database connection] D failed, then the sqlite3_errcode(D) interface - /// returns the numeric [result code] or [extended result code] for that - /// API call. - /// ^The sqlite3_extended_errcode() - /// interface is the same except that it always returns the - /// [extended result code] even when extended result codes are - /// disabled. - /// - /// The values returned by sqlite3_errcode() and/or - /// sqlite3_extended_errcode() might change with each API call. - /// Except, there are some interfaces that are guaranteed to never - /// change the value of the error code. The error-code preserving - /// interfaces are: - /// - ///
    - ///
  • sqlite3_errcode() - ///
  • sqlite3_extended_errcode() - ///
  • sqlite3_errmsg() - ///
  • sqlite3_errmsg16() - ///
- /// - /// ^The sqlite3_errmsg() and sqlite3_errmsg16() return English-language - /// text that describes the error, as either UTF-8 or UTF-16 respectively. - /// ^(Memory to hold the error message string is managed internally. - /// The application does not need to worry about freeing the result. - /// However, the error string might be overwritten or deallocated by - /// subsequent calls to other SQLite interface functions.)^ - /// - /// ^The sqlite3_errstr() interface returns the English-language text - /// that describes the [result code], as UTF-8. - /// ^(Memory to hold the error message string is managed internally - /// and must not be freed by the application)^. - /// - /// When the serialized [threading mode] is in use, it might be the - /// case that a second error occurs on a separate thread in between - /// the time of the first error and the call to these interfaces. - /// When that happens, the second error will be reported since these - /// interfaces always report the most recent result. To avoid - /// this, each thread can obtain exclusive use of the [database connection] D - /// by invoking [sqlite3_mutex_enter]([sqlite3_db_mutex](D)) before beginning - /// to use D and invoking [sqlite3_mutex_leave]([sqlite3_db_mutex](D)) after - /// all calls to the interfaces listed here are completed. - /// - /// If an interface fails with SQLITE_MISUSE, that means the interface - /// was invoked incorrectly by the application. In that case, the - /// error code and message may or may not be set. - int sqlite3_errcode(ffi.Pointer db) { - return _sqlite3_errcode(db); - } - - late final _sqlite3_errcodePtr = - _lookup)>>( - 'sqlite3_errcode', - ); - late final _sqlite3_errcode = _sqlite3_errcodePtr - .asFunction)>(); - - ffi.Pointer sqlite3_errmsg(ffi.Pointer arg0) { - return _sqlite3_errmsg(arg0); - } - - late final _sqlite3_errmsgPtr = - _lookup< - ffi.NativeFunction Function(ffi.Pointer)> - >('sqlite3_errmsg'); - late final _sqlite3_errmsg = _sqlite3_errmsgPtr - .asFunction Function(ffi.Pointer)>(); - - ffi.Pointer sqlite3_errmsg16(ffi.Pointer arg0) { - return _sqlite3_errmsg16(arg0); - } - - late final _sqlite3_errmsg16Ptr = - _lookup< - ffi.NativeFunction Function(ffi.Pointer)> - >('sqlite3_errmsg16'); - late final _sqlite3_errmsg16 = _sqlite3_errmsg16Ptr - .asFunction Function(ffi.Pointer)>(); - - ffi.Pointer sqlite3_errstr(int arg0) { - return _sqlite3_errstr(arg0); - } - - late final _sqlite3_errstrPtr = - _lookup Function(ffi.Int)>>( - 'sqlite3_errstr', - ); - late final _sqlite3_errstr = _sqlite3_errstrPtr - .asFunction Function(int)>(); - - /// CAPI3REF: One-Step Query Execution Interface - /// METHOD: sqlite3 - /// - /// The sqlite3_exec() interface is a convenience wrapper around - /// [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()], - /// that allows an application to run multiple statements of SQL - /// without having to use a lot of C code. - /// - /// ^The sqlite3_exec() interface runs zero or more UTF-8 encoded, - /// semicolon-separate SQL statements passed into its 2nd argument, - /// in the context of the [database connection] passed in as its 1st - /// argument. ^If the callback function of the 3rd argument to - /// sqlite3_exec() is not NULL, then it is invoked for each result row - /// coming out of the evaluated SQL statements. ^The 4th argument to - /// sqlite3_exec() is relayed through to the 1st argument of each - /// callback invocation. ^If the callback pointer to sqlite3_exec() - /// is NULL, then no callback is ever invoked and result rows are - /// ignored. - /// - /// ^If an error occurs while evaluating the SQL statements passed into - /// sqlite3_exec(), then execution of the current statement stops and - /// subsequent statements are skipped. ^If the 5th parameter to sqlite3_exec() - /// is not NULL then any error message is written into memory obtained - /// from [sqlite3_malloc()] and passed back through the 5th parameter. - /// To avoid memory leaks, the application should invoke [sqlite3_free()] - /// on error message strings returned through the 5th parameter of - /// sqlite3_exec() after the error message string is no longer needed. - /// ^If the 5th parameter to sqlite3_exec() is not NULL and no errors - /// occur, then sqlite3_exec() sets the pointer in its 5th parameter to - /// NULL before returning. - /// - /// ^If an sqlite3_exec() callback returns non-zero, the sqlite3_exec() - /// routine returns SQLITE_ABORT without invoking the callback again and - /// without running any subsequent SQL statements. - /// - /// ^The 2nd argument to the sqlite3_exec() callback function is the - /// number of columns in the result. ^The 3rd argument to the sqlite3_exec() - /// callback is an array of pointers to strings obtained as if from - /// [sqlite3_column_text()], one for each column. ^If an element of a - /// result row is NULL then the corresponding string pointer for the - /// sqlite3_exec() callback is a NULL pointer. ^The 4th argument to the - /// sqlite3_exec() callback is an array of pointers to strings where each - /// entry represents the name of corresponding result column as obtained - /// from [sqlite3_column_name()]. - /// - /// ^If the 2nd parameter to sqlite3_exec() is a NULL pointer, a pointer - /// to an empty string, or a pointer that contains only whitespace and/or - /// SQL comments, then no SQL statements are evaluated and the database - /// is not changed. - /// - /// Restrictions: - /// - ///
    - ///
  • The application must ensure that the 1st parameter to sqlite3_exec() - /// is a valid and open [database connection]. - ///
  • The application must not close the [database connection] specified by - /// the 1st parameter to sqlite3_exec() while sqlite3_exec() is running. - ///
  • The application must not modify the SQL statement text passed into - /// the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running. - ///
- int sqlite3_exec( - ffi.Pointer arg0, - ffi.Pointer sql, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ffi.Pointer>, - ) - > - > - callback, - ffi.Pointer arg3, - ffi.Pointer> errmsg, - ) { - return _sqlite3_exec(arg0, sql, callback, arg3, errmsg); - } - - late final _sqlite3_execPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ffi.Pointer>, - ) - > - >, - ffi.Pointer, - ffi.Pointer>, - ) - > - >('sqlite3_exec'); - late final _sqlite3_exec = _sqlite3_execPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ffi.Pointer>, - ) - > - >, - ffi.Pointer, - ffi.Pointer>, - ) - >(); - - ffi.Pointer sqlite3_expanded_sql(ffi.Pointer pStmt) { - return _sqlite3_expanded_sql(pStmt); - } - - late final _sqlite3_expanded_sqlPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('sqlite3_expanded_sql'); - late final _sqlite3_expanded_sql = _sqlite3_expanded_sqlPtr - .asFunction Function(ffi.Pointer)>(); - - int sqlite3_expired(ffi.Pointer arg0) { - return _sqlite3_expired(arg0); - } - - late final _sqlite3_expiredPtr = - _lookup)>>( - 'sqlite3_expired', - ); - late final _sqlite3_expired = _sqlite3_expiredPtr - .asFunction)>(); - - int sqlite3_extended_errcode(ffi.Pointer db) { - return _sqlite3_extended_errcode(db); - } - - late final _sqlite3_extended_errcodePtr = - _lookup)>>( - 'sqlite3_extended_errcode', - ); - late final _sqlite3_extended_errcode = _sqlite3_extended_errcodePtr - .asFunction)>(); - - /// CAPI3REF: Enable Or Disable Extended Result Codes - /// METHOD: sqlite3 - /// - /// ^The sqlite3_extended_result_codes() routine enables or disables the - /// [extended result codes] feature of SQLite. ^The extended result - /// codes are disabled by default for historical compatibility. - int sqlite3_extended_result_codes(ffi.Pointer arg0, int onoff) { - return _sqlite3_extended_result_codes(arg0, onoff); - } - - late final _sqlite3_extended_result_codesPtr = - _lookup< - ffi.NativeFunction, ffi.Int)> - >('sqlite3_extended_result_codes'); - late final _sqlite3_extended_result_codes = _sqlite3_extended_result_codesPtr - .asFunction, int)>(); - - /// CAPI3REF: Low-Level Control Of Database Files - /// METHOD: sqlite3 - /// KEYWORDS: {file control} - /// - /// ^The [sqlite3_file_control()] interface makes a direct call to the - /// xFileControl method for the [sqlite3_io_methods] object associated - /// with a particular database identified by the second argument. ^The - /// name of the database is "main" for the main database or "temp" for the - /// TEMP database, or the name that appears after the AS keyword for - /// databases that are added using the [ATTACH] SQL command. - /// ^A NULL pointer can be used in place of "main" to refer to the - /// main database file. - /// ^The third and fourth parameters to this routine - /// are passed directly through to the second and third parameters of - /// the xFileControl method. ^The return value of the xFileControl - /// method becomes the return value of this routine. - /// - /// A few opcodes for [sqlite3_file_control()] are handled directly - /// by the SQLite core and never invoke the - /// sqlite3_io_methods.xFileControl method. - /// ^The [SQLITE_FCNTL_FILE_POINTER] value for the op parameter causes - /// a pointer to the underlying [sqlite3_file] object to be written into - /// the space pointed to by the 4th parameter. The - /// [SQLITE_FCNTL_JOURNAL_POINTER] works similarly except that it returns - /// the [sqlite3_file] object associated with the journal file instead of - /// the main database. The [SQLITE_FCNTL_VFS_POINTER] opcode returns - /// a pointer to the underlying [sqlite3_vfs] object for the file. - /// The [SQLITE_FCNTL_DATA_VERSION] returns the data version counter - /// from the pager. - /// - /// ^If the second parameter (zDbName) does not match the name of any - /// open database file, then SQLITE_ERROR is returned. ^This error - /// code is not remembered and will not be recalled by [sqlite3_errcode()] - /// or [sqlite3_errmsg()]. The underlying xFileControl method might - /// also return SQLITE_ERROR. There is no way to distinguish between - /// an incorrect zDbName and an SQLITE_ERROR return from the underlying - /// xFileControl method. - /// - /// See also: [file control opcodes] - int sqlite3_file_control( - ffi.Pointer arg0, - ffi.Pointer zDbName, - int op, - ffi.Pointer arg3, - ) { - return _sqlite3_file_control(arg0, zDbName, op, arg3); - } - - late final _sqlite3_file_controlPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ) - > - >('sqlite3_file_control'); - late final _sqlite3_file_control = _sqlite3_file_controlPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ) - >(); - - /// CAPI3REF: Translate filenames - /// - /// These routines are available to [VFS|custom VFS implementations] for - /// translating filenames between the main database file, the journal file, - /// and the WAL file. - /// - /// If F is the name of an sqlite database file, journal file, or WAL file - /// passed by the SQLite core into the VFS, then sqlite3_filename_database(F) - /// returns the name of the corresponding database file. - /// - /// If F is the name of an sqlite database file, journal file, or WAL file - /// passed by the SQLite core into the VFS, or if F is a database filename - /// obtained from [sqlite3_db_filename()], then sqlite3_filename_journal(F) - /// returns the name of the corresponding rollback journal file. - /// - /// If F is the name of an sqlite database file, journal file, or WAL file - /// that was passed by the SQLite core into the VFS, or if F is a database - /// filename obtained from [sqlite3_db_filename()], then - /// sqlite3_filename_wal(F) returns the name of the corresponding - /// WAL file. - /// - /// In all of the above, if F is not the name of a database, journal or WAL - /// filename passed into the VFS from the SQLite core and F is not the - /// return value from [sqlite3_db_filename()], then the result is - /// undefined and is likely a memory access violation. - ffi.Pointer sqlite3_filename_database(ffi.Pointer arg0) { - return _sqlite3_filename_database(arg0); - } - - late final _sqlite3_filename_databasePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('sqlite3_filename_database'); - late final _sqlite3_filename_database = _sqlite3_filename_databasePtr - .asFunction Function(ffi.Pointer)>(); - - ffi.Pointer sqlite3_filename_journal(ffi.Pointer arg0) { - return _sqlite3_filename_journal(arg0); - } - - late final _sqlite3_filename_journalPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('sqlite3_filename_journal'); - late final _sqlite3_filename_journal = _sqlite3_filename_journalPtr - .asFunction Function(ffi.Pointer)>(); - - ffi.Pointer sqlite3_filename_wal(ffi.Pointer arg0) { - return _sqlite3_filename_wal(arg0); - } - - late final _sqlite3_filename_walPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('sqlite3_filename_wal'); - late final _sqlite3_filename_wal = _sqlite3_filename_walPtr - .asFunction Function(ffi.Pointer)>(); - - /// CAPI3REF: Destroy A Prepared Statement Object - /// DESTRUCTOR: sqlite3_stmt - /// - /// ^The sqlite3_finalize() function is called to delete a [prepared statement]. - /// ^If the most recent evaluation of the statement encountered no errors - /// or if the statement is never been evaluated, then sqlite3_finalize() returns - /// SQLITE_OK. ^If the most recent evaluation of statement S failed, then - /// sqlite3_finalize(S) returns the appropriate [error code] or - /// [extended error code]. - /// - /// ^The sqlite3_finalize(S) routine can be called at any point during - /// the life cycle of [prepared statement] S: - /// before statement S is ever evaluated, after - /// one or more calls to [sqlite3_reset()], or after any call - /// to [sqlite3_step()] regardless of whether or not the statement has - /// completed execution. - /// - /// ^Invoking sqlite3_finalize() on a NULL pointer is a harmless no-op. - /// - /// The application must finalize every [prepared statement] in order to avoid - /// resource leaks. It is a grievous error for the application to try to use - /// a prepared statement after it has been finalized. Any use of a prepared - /// statement after it has been finalized can result in undefined and - /// undesirable behavior such as segfaults and heap corruption. - int sqlite3_finalize(ffi.Pointer pStmt) { - return _sqlite3_finalize(pStmt); - } - - late final _sqlite3_finalizePtr = - _lookup)>>( - 'sqlite3_finalize', - ); - late final _sqlite3_finalize = _sqlite3_finalizePtr - .asFunction)>(); - - void sqlite3_free(ffi.Pointer arg0) { - return _sqlite3_free(arg0); - } - - late final _sqlite3_freePtr = - _lookup)>>( - 'sqlite3_free', - ); - late final _sqlite3_free = _sqlite3_freePtr - .asFunction)>(); - - void sqlite3_free_filename(ffi.Pointer arg0) { - return _sqlite3_free_filename(arg0); - } - - late final _sqlite3_free_filenamePtr = - _lookup)>>( - 'sqlite3_free_filename', - ); - late final _sqlite3_free_filename = _sqlite3_free_filenamePtr - .asFunction)>(); - - void sqlite3_free_table(ffi.Pointer> result) { - return _sqlite3_free_table(result); - } - - late final _sqlite3_free_tablePtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer>) - > - >('sqlite3_free_table'); - late final _sqlite3_free_table = _sqlite3_free_tablePtr - .asFunction>)>(); - - /// CAPI3REF: Test For Auto-Commit Mode - /// KEYWORDS: {autocommit mode} - /// METHOD: sqlite3 - /// - /// ^The sqlite3_get_autocommit() interface returns non-zero or - /// zero if the given database connection is or is not in autocommit mode, - /// respectively. ^Autocommit mode is on by default. - /// ^Autocommit mode is disabled by a [BEGIN] statement. - /// ^Autocommit mode is re-enabled by a [COMMIT] or [ROLLBACK]. - /// - /// If certain kinds of errors occur on a statement within a multi-statement - /// transaction (errors including [SQLITE_FULL], [SQLITE_IOERR], - /// [SQLITE_NOMEM], [SQLITE_BUSY], and [SQLITE_INTERRUPT]) then the - /// transaction might be rolled back automatically. The only way to - /// find out whether SQLite automatically rolled back the transaction after - /// an error is to use this function. - /// - /// If another thread changes the autocommit status of the database - /// connection while this routine is running, then the return value - /// is undefined. - int sqlite3_get_autocommit(ffi.Pointer arg0) { - return _sqlite3_get_autocommit(arg0); - } - - late final _sqlite3_get_autocommitPtr = - _lookup)>>( - 'sqlite3_get_autocommit', - ); - late final _sqlite3_get_autocommit = _sqlite3_get_autocommitPtr - .asFunction)>(); - - /// CAPI3REF: Function Auxiliary Data - /// METHOD: sqlite3_context - /// - /// These functions may be used by (non-aggregate) SQL functions to - /// associate metadata with argument values. If the same value is passed to - /// multiple invocations of the same SQL function during query execution, under - /// some circumstances the associated metadata may be preserved. An example - /// of where this might be useful is in a regular-expression matching - /// function. The compiled version of the regular expression can be stored as - /// metadata associated with the pattern string. - /// Then as long as the pattern string remains the same, - /// the compiled regular expression can be reused on multiple - /// invocations of the same function. - /// - /// ^The sqlite3_get_auxdata(C,N) interface returns a pointer to the metadata - /// associated by the sqlite3_set_auxdata(C,N,P,X) function with the Nth argument - /// value to the application-defined function. ^N is zero for the left-most - /// function argument. ^If there is no metadata - /// associated with the function argument, the sqlite3_get_auxdata(C,N) interface - /// returns a NULL pointer. - /// - /// ^The sqlite3_set_auxdata(C,N,P,X) interface saves P as metadata for the N-th - /// argument of the application-defined function. ^Subsequent - /// calls to sqlite3_get_auxdata(C,N) return P from the most recent - /// sqlite3_set_auxdata(C,N,P,X) call if the metadata is still valid or - /// NULL if the metadata has been discarded. - /// ^After each call to sqlite3_set_auxdata(C,N,P,X) where X is not NULL, - /// SQLite will invoke the destructor function X with parameter P exactly - /// once, when the metadata is discarded. - /// SQLite is free to discard the metadata at any time, including:
    - ///
  • ^(when the corresponding function parameter changes)^, or - ///
  • ^(when [sqlite3_reset()] or [sqlite3_finalize()] is called for the - /// SQL statement)^, or - ///
  • ^(when sqlite3_set_auxdata() is invoked again on the same - /// parameter)^, or - ///
  • ^(during the original sqlite3_set_auxdata() call when a memory - /// allocation error occurs.)^
- /// - /// Note the last bullet in particular. The destructor X in - /// sqlite3_set_auxdata(C,N,P,X) might be called immediately, before the - /// sqlite3_set_auxdata() interface even returns. Hence sqlite3_set_auxdata() - /// should be called near the end of the function implementation and the - /// function implementation should not make any use of P after - /// sqlite3_set_auxdata() has been called. - /// - /// ^(In practice, metadata is preserved between function calls for - /// function parameters that are compile-time constants, including literal - /// values and [parameters] and expressions composed from the same.)^ - /// - /// The value of the N parameter to these interfaces should be non-negative. - /// Future enhancements may make use of negative N values to define new - /// kinds of function caching behavior. - /// - /// These routines must be called from the same thread in which - /// the SQL function is running. - ffi.Pointer sqlite3_get_auxdata( - ffi.Pointer arg0, - int N, - ) { - return _sqlite3_get_auxdata(arg0, N); - } - - late final _sqlite3_get_auxdataPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Int) - > - >('sqlite3_get_auxdata'); - late final _sqlite3_get_auxdata = _sqlite3_get_auxdataPtr - .asFunction< - ffi.Pointer Function(ffi.Pointer, int) - >(); - - /// CAPI3REF: Convenience Routines For Running Queries - /// METHOD: sqlite3 - /// - /// This is a legacy interface that is preserved for backwards compatibility. - /// Use of this interface is not recommended. - /// - /// Definition: A result table is memory data structure created by the - /// [sqlite3_get_table()] interface. A result table records the - /// complete query results from one or more queries. - /// - /// The table conceptually has a number of rows and columns. But - /// these numbers are not part of the result table itself. These - /// numbers are obtained separately. Let N be the number of rows - /// and M be the number of columns. - /// - /// A result table is an array of pointers to zero-terminated UTF-8 strings. - /// There are (N+1)*M elements in the array. The first M pointers point - /// to zero-terminated strings that contain the names of the columns. - /// The remaining entries all point to query results. NULL values result - /// in NULL pointers. All other values are in their UTF-8 zero-terminated - /// string representation as returned by [sqlite3_column_text()]. - /// - /// A result table might consist of one or more memory allocations. - /// It is not safe to pass a result table directly to [sqlite3_free()]. - /// A result table should be deallocated using [sqlite3_free_table()]. - /// - /// ^(As an example of the result table format, suppose a query result - /// is as follows: - /// - ///
-  /// Name        | Age
-  /// -----------------------
-  /// Alice       | 43
-  /// Bob         | 28
-  /// Cindy       | 21
-  /// 
- /// - /// There are two columns (M==2) and three rows (N==3). Thus the - /// result table has 8 entries. Suppose the result table is stored - /// in an array named azResult. Then azResult holds this content: - /// - ///
-  /// azResult[0] = "Name";
-  /// azResult[1] = "Age";
-  /// azResult[2] = "Alice";
-  /// azResult[3] = "43";
-  /// azResult[4] = "Bob";
-  /// azResult[5] = "28";
-  /// azResult[6] = "Cindy";
-  /// azResult[7] = "21";
-  /// 
)^ - /// - /// ^The sqlite3_get_table() function evaluates one or more - /// semicolon-separated SQL statements in the zero-terminated UTF-8 - /// string of its 2nd parameter and returns a result table to the - /// pointer given in its 3rd parameter. - /// - /// After the application has finished with the result from sqlite3_get_table(), - /// it must pass the result table pointer to sqlite3_free_table() in order to - /// release the memory that was malloced. Because of the way the - /// [sqlite3_malloc()] happens within sqlite3_get_table(), the calling - /// function must not try to call [sqlite3_free()] directly. Only - /// [sqlite3_free_table()] is able to release the memory properly and safely. - /// - /// The sqlite3_get_table() interface is implemented as a wrapper around - /// [sqlite3_exec()]. The sqlite3_get_table() routine does not have access - /// to any internal data structures of SQLite. It uses only the public - /// interface defined here. As a consequence, errors that occur in the - /// wrapper layer outside of the internal [sqlite3_exec()] call are not - /// reflected in subsequent calls to [sqlite3_errcode()] or - /// [sqlite3_errmsg()]. - int sqlite3_get_table( - ffi.Pointer db, - ffi.Pointer zSql, - ffi.Pointer>> pazResult, - ffi.Pointer pnRow, - ffi.Pointer pnColumn, - ffi.Pointer> pzErrmsg, - ) { - return _sqlite3_get_table(db, zSql, pazResult, pnRow, pnColumn, pzErrmsg); - } - - late final _sqlite3_get_tablePtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ) - > - >('sqlite3_get_table'); - late final _sqlite3_get_table = _sqlite3_get_tablePtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ) - >(); - - int sqlite3_global_recover() { - return _sqlite3_global_recover(); - } - - late final _sqlite3_global_recoverPtr = - _lookup>('sqlite3_global_recover'); - late final _sqlite3_global_recover = _sqlite3_global_recoverPtr - .asFunction(); - - int sqlite3_hard_heap_limit64(int N) { - return _sqlite3_hard_heap_limit64(N); - } - - late final _sqlite3_hard_heap_limit64Ptr = - _lookup>( - 'sqlite3_hard_heap_limit64', - ); - late final _sqlite3_hard_heap_limit64 = _sqlite3_hard_heap_limit64Ptr - .asFunction(); - - /// CAPI3REF: Initialize The SQLite Library - /// - /// ^The sqlite3_initialize() routine initializes the - /// SQLite library. ^The sqlite3_shutdown() routine - /// deallocates any resources that were allocated by sqlite3_initialize(). - /// These routines are designed to aid in process initialization and - /// shutdown on embedded systems. Workstation applications using - /// SQLite normally do not need to invoke either of these routines. - /// - /// A call to sqlite3_initialize() is an "effective" call if it is - /// the first time sqlite3_initialize() is invoked during the lifetime of - /// the process, or if it is the first time sqlite3_initialize() is invoked - /// following a call to sqlite3_shutdown(). ^(Only an effective call - /// of sqlite3_initialize() does any initialization. All other calls - /// are harmless no-ops.)^ - /// - /// A call to sqlite3_shutdown() is an "effective" call if it is the first - /// call to sqlite3_shutdown() since the last sqlite3_initialize(). ^(Only - /// an effective call to sqlite3_shutdown() does any deinitialization. - /// All other valid calls to sqlite3_shutdown() are harmless no-ops.)^ - /// - /// The sqlite3_initialize() interface is threadsafe, but sqlite3_shutdown() - /// is not. The sqlite3_shutdown() interface must only be called from a - /// single thread. All open [database connections] must be closed and all - /// other SQLite resources must be deallocated prior to invoking - /// sqlite3_shutdown(). - /// - /// Among other things, ^sqlite3_initialize() will invoke - /// sqlite3_os_init(). Similarly, ^sqlite3_shutdown() - /// will invoke sqlite3_os_end(). - /// - /// ^The sqlite3_initialize() routine returns [SQLITE_OK] on success. - /// ^If for some reason, sqlite3_initialize() is unable to initialize - /// the library (perhaps it is unable to allocate a needed resource such - /// as a mutex) it returns an [error code] other than [SQLITE_OK]. - /// - /// ^The sqlite3_initialize() routine is called internally by many other - /// SQLite interfaces so that an application usually does not need to - /// invoke sqlite3_initialize() directly. For example, [sqlite3_open()] - /// calls sqlite3_initialize() so the SQLite library will be automatically - /// initialized when [sqlite3_open()] is called if it has not be initialized - /// already. ^However, if SQLite is compiled with the [SQLITE_OMIT_AUTOINIT] - /// compile-time option, then the automatic calls to sqlite3_initialize() - /// are omitted and the application must call sqlite3_initialize() directly - /// prior to using any other SQLite interface. For maximum portability, - /// it is recommended that applications always invoke sqlite3_initialize() - /// directly prior to using any other SQLite interface. Future releases - /// of SQLite may require this. In other words, the behavior exhibited - /// when SQLite is compiled with [SQLITE_OMIT_AUTOINIT] might become the - /// default behavior in some future release of SQLite. - /// - /// The sqlite3_os_init() routine does operating-system specific - /// initialization of the SQLite library. The sqlite3_os_end() - /// routine undoes the effect of sqlite3_os_init(). Typical tasks - /// performed by these routines include allocation or deallocation - /// of static resources, initialization of global variables, - /// setting up a default [sqlite3_vfs] module, or setting up - /// a default configuration using [sqlite3_config()]. - /// - /// The application should never invoke either sqlite3_os_init() - /// or sqlite3_os_end() directly. The application should only invoke - /// sqlite3_initialize() and sqlite3_shutdown(). The sqlite3_os_init() - /// interface is called automatically by sqlite3_initialize() and - /// sqlite3_os_end() is called by sqlite3_shutdown(). Appropriate - /// implementations for sqlite3_os_init() and sqlite3_os_end() - /// are built into SQLite when it is compiled for Unix, Windows, or OS/2. - /// When [custom builds | built for other platforms] - /// (using the [SQLITE_OS_OTHER=1] compile-time - /// option) the application must supply a suitable implementation for - /// sqlite3_os_init() and sqlite3_os_end(). An application-supplied - /// implementation of sqlite3_os_init() or sqlite3_os_end() - /// must return [SQLITE_OK] on success and some other [error code] upon - /// failure. - int sqlite3_initialize() { - return _sqlite3_initialize(); - } - - late final _sqlite3_initializePtr = - _lookup>('sqlite3_initialize'); - late final _sqlite3_initialize = _sqlite3_initializePtr - .asFunction(); - - /// CAPI3REF: Interrupt A Long-Running Query - /// METHOD: sqlite3 - /// - /// ^This function causes any pending database operation to abort and - /// return at its earliest opportunity. This routine is typically - /// called in response to a user action such as pressing "Cancel" - /// or Ctrl-C where the user wants a long query operation to halt - /// immediately. - /// - /// ^It is safe to call this routine from a thread different from the - /// thread that is currently running the database operation. But it - /// is not safe to call this routine with a [database connection] that - /// is closed or might close before sqlite3_interrupt() returns. - /// - /// ^If an SQL operation is very nearly finished at the time when - /// sqlite3_interrupt() is called, then it might not have an opportunity - /// to be interrupted and might continue to completion. - /// - /// ^An SQL operation that is interrupted will return [SQLITE_INTERRUPT]. - /// ^If the interrupted SQL operation is an INSERT, UPDATE, or DELETE - /// that is inside an explicit transaction, then the entire transaction - /// will be rolled back automatically. - /// - /// ^The sqlite3_interrupt(D) call is in effect until all currently running - /// SQL statements on [database connection] D complete. ^Any new SQL statements - /// that are started after the sqlite3_interrupt() call and before the - /// running statement count reaches zero are interrupted as if they had been - /// running prior to the sqlite3_interrupt() call. ^New SQL statements - /// that are started after the running statement count reaches zero are - /// not effected by the sqlite3_interrupt(). - /// ^A call to sqlite3_interrupt(D) that occurs when there are no running - /// SQL statements is a no-op and has no effect on SQL statements - /// that are started after the sqlite3_interrupt() call returns. - void sqlite3_interrupt(ffi.Pointer arg0) { - return _sqlite3_interrupt(arg0); - } - - late final _sqlite3_interruptPtr = - _lookup)>>( - 'sqlite3_interrupt', - ); - late final _sqlite3_interrupt = _sqlite3_interruptPtr - .asFunction)>(); - - int sqlite3_keyword_check(ffi.Pointer arg0, int arg1) { - return _sqlite3_keyword_check(arg0, arg1); - } - - late final _sqlite3_keyword_checkPtr = - _lookup< - ffi.NativeFunction, ffi.Int)> - >('sqlite3_keyword_check'); - late final _sqlite3_keyword_check = _sqlite3_keyword_checkPtr - .asFunction, int)>(); - - /// CAPI3REF: SQL Keyword Checking - /// - /// These routines provide access to the set of SQL language keywords - /// recognized by SQLite. Applications can uses these routines to determine - /// whether or not a specific identifier needs to be escaped (for example, - /// by enclosing in double-quotes) so as not to confuse the parser. - /// - /// The sqlite3_keyword_count() interface returns the number of distinct - /// keywords understood by SQLite. - /// - /// The sqlite3_keyword_name(N,Z,L) interface finds the N-th keyword and - /// makes *Z point to that keyword expressed as UTF8 and writes the number - /// of bytes in the keyword into *L. The string that *Z points to is not - /// zero-terminated. The sqlite3_keyword_name(N,Z,L) routine returns - /// SQLITE_OK if N is within bounds and SQLITE_ERROR if not. If either Z - /// or L are NULL or invalid pointers then calls to - /// sqlite3_keyword_name(N,Z,L) result in undefined behavior. - /// - /// The sqlite3_keyword_check(Z,L) interface checks to see whether or not - /// the L-byte UTF8 identifier that Z points to is a keyword, returning non-zero - /// if it is and zero if not. - /// - /// The parser used by SQLite is forgiving. It is often possible to use - /// a keyword as an identifier as long as such use does not result in a - /// parsing ambiguity. For example, the statement - /// "CREATE TABLE BEGIN(REPLACE,PRAGMA,END);" is accepted by SQLite, and - /// creates a new table named "BEGIN" with three columns named - /// "REPLACE", "PRAGMA", and "END". Nevertheless, best practice is to avoid - /// using keywords as identifiers. Common techniques used to avoid keyword - /// name collisions include: - ///
    - ///
  • Put all identifier names inside double-quotes. This is the official - /// SQL way to escape identifier names. - ///
  • Put identifier names inside [...]. This is not standard SQL, - /// but it is what SQL Server does and so lots of programmers use this - /// technique. - ///
  • Begin every identifier with the letter "Z" as no SQL keywords start - /// with "Z". - ///
  • Include a digit somewhere in every identifier name. - ///
- /// - /// Note that the number of keywords understood by SQLite can depend on - /// compile-time options. For example, "VACUUM" is not a keyword if - /// SQLite is compiled with the [-DSQLITE_OMIT_VACUUM] option. Also, - /// new keywords may be added to future releases of SQLite. - int sqlite3_keyword_count() { - return _sqlite3_keyword_count(); - } - - late final _sqlite3_keyword_countPtr = - _lookup>('sqlite3_keyword_count'); - late final _sqlite3_keyword_count = _sqlite3_keyword_countPtr - .asFunction(); - - int sqlite3_keyword_name( - int arg0, - ffi.Pointer> arg1, - ffi.Pointer arg2, - ) { - return _sqlite3_keyword_name(arg0, arg1, arg2); - } - - late final _sqlite3_keyword_namePtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Pointer>, - ffi.Pointer, - ) - > - >('sqlite3_keyword_name'); - late final _sqlite3_keyword_name = _sqlite3_keyword_namePtr - .asFunction< - int Function( - int, - ffi.Pointer>, - ffi.Pointer, - ) - >(); - - /// CAPI3REF: Last Insert Rowid - /// METHOD: sqlite3 - /// - /// ^Each entry in most SQLite tables (except for [WITHOUT ROWID] tables) - /// has a unique 64-bit signed - /// integer key called the [ROWID | "rowid"]. ^The rowid is always available - /// as an undeclared column named ROWID, OID, or _ROWID_ as long as those - /// names are not also used by explicitly declared columns. ^If - /// the table has a column of type [INTEGER PRIMARY KEY] then that column - /// is another alias for the rowid. - /// - /// ^The sqlite3_last_insert_rowid(D) interface usually returns the [rowid] of - /// the most recent successful [INSERT] into a rowid table or [virtual table] - /// on database connection D. ^Inserts into [WITHOUT ROWID] tables are not - /// recorded. ^If no successful [INSERT]s into rowid tables have ever occurred - /// on the database connection D, then sqlite3_last_insert_rowid(D) returns - /// zero. - /// - /// As well as being set automatically as rows are inserted into database - /// tables, the value returned by this function may be set explicitly by - /// [sqlite3_set_last_insert_rowid()] - /// - /// Some virtual table implementations may INSERT rows into rowid tables as - /// part of committing a transaction (e.g. to flush data accumulated in memory - /// to disk). In this case subsequent calls to this function return the rowid - /// associated with these internal INSERT operations, which leads to - /// unintuitive results. Virtual table implementations that do write to rowid - /// tables in this way can avoid this problem by restoring the original - /// rowid value using [sqlite3_set_last_insert_rowid()] before returning - /// control to the user. - /// - /// ^(If an [INSERT] occurs within a trigger then this routine will - /// return the [rowid] of the inserted row as long as the trigger is - /// running. Once the trigger program ends, the value returned - /// by this routine reverts to what it was before the trigger was fired.)^ - /// - /// ^An [INSERT] that fails due to a constraint violation is not a - /// successful [INSERT] and does not change the value returned by this - /// routine. ^Thus INSERT OR FAIL, INSERT OR IGNORE, INSERT OR ROLLBACK, - /// and INSERT OR ABORT make no changes to the return value of this - /// routine when their insertion fails. ^(When INSERT OR REPLACE - /// encounters a constraint violation, it does not fail. The - /// INSERT continues to completion after deleting rows that caused - /// the constraint problem so INSERT OR REPLACE will always change - /// the return value of this interface.)^ - /// - /// ^For the purposes of this routine, an [INSERT] is considered to - /// be successful even if it is subsequently rolled back. - /// - /// This function is accessible to SQL statements via the - /// [last_insert_rowid() SQL function]. - /// - /// If a separate thread performs a new [INSERT] on the same - /// database connection while the [sqlite3_last_insert_rowid()] - /// function is running and thus changes the last insert [rowid], - /// then the value returned by [sqlite3_last_insert_rowid()] is - /// unpredictable and might not equal either the old or the new - /// last insert [rowid]. - int sqlite3_last_insert_rowid(ffi.Pointer arg0) { - return _sqlite3_last_insert_rowid(arg0); - } - - late final _sqlite3_last_insert_rowidPtr = - _lookup)>>( - 'sqlite3_last_insert_rowid', - ); - late final _sqlite3_last_insert_rowid = _sqlite3_last_insert_rowidPtr - .asFunction)>(); - - ffi.Pointer sqlite3_libversion() { - return _sqlite3_libversion(); - } - - late final _sqlite3_libversionPtr = - _lookup Function()>>( - 'sqlite3_libversion', - ); - late final _sqlite3_libversion = _sqlite3_libversionPtr - .asFunction Function()>(); - - int sqlite3_libversion_number() { - return _sqlite3_libversion_number(); - } - - late final _sqlite3_libversion_numberPtr = - _lookup>( - 'sqlite3_libversion_number', - ); - late final _sqlite3_libversion_number = _sqlite3_libversion_numberPtr - .asFunction(); - - /// CAPI3REF: Run-time Limits - /// METHOD: sqlite3 - /// - /// ^(This interface allows the size of various constructs to be limited - /// on a connection by connection basis. The first parameter is the - /// [database connection] whose limit is to be set or queried. The - /// second parameter is one of the [limit categories] that define a - /// class of constructs to be size limited. The third parameter is the - /// new limit for that construct.)^ - /// - /// ^If the new limit is a negative number, the limit is unchanged. - /// ^(For each limit category SQLITE_LIMIT_NAME there is a - /// [limits | hard upper bound] - /// set at compile-time by a C preprocessor macro called - /// [limits | SQLITE_MAX_NAME]. - /// (The "_LIMIT_" in the name is changed to "_MAX_".))^ - /// ^Attempts to increase a limit above its hard upper bound are - /// silently truncated to the hard upper bound. - /// - /// ^Regardless of whether or not the limit was changed, the - /// [sqlite3_limit()] interface returns the prior value of the limit. - /// ^Hence, to find the current value of a limit without changing it, - /// simply invoke this interface with the third parameter set to -1. - /// - /// Run-time limits are intended for use in applications that manage - /// both their own internal database and also databases that are controlled - /// by untrusted external sources. An example application might be a - /// web browser that has its own databases for storing history and - /// separate databases controlled by JavaScript applications downloaded - /// off the Internet. The internal databases can be given the - /// large, default limits. Databases managed by external sources can - /// be given much smaller limits designed to prevent a denial of service - /// attack. Developers might also want to use the [sqlite3_set_authorizer()] - /// interface to further control untrusted SQL. The size of the database - /// created by an untrusted script can be contained using the - /// [max_page_count] [PRAGMA]. - /// - /// New run-time limit categories may be added in future releases. - int sqlite3_limit(ffi.Pointer arg0, int id, int newVal) { - return _sqlite3_limit(arg0, id, newVal); - } - - late final _sqlite3_limitPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Int) - > - >('sqlite3_limit'); - late final _sqlite3_limit = _sqlite3_limitPtr - .asFunction, int, int)>(); - - /// CAPI3REF: Load An Extension - /// METHOD: sqlite3 - /// - /// ^This interface loads an SQLite extension library from the named file. - /// - /// ^The sqlite3_load_extension() interface attempts to load an - /// [SQLite extension] library contained in the file zFile. If - /// the file cannot be loaded directly, attempts are made to load - /// with various operating-system specific extensions added. - /// So for example, if "samplelib" cannot be loaded, then names like - /// "samplelib.so" or "samplelib.dylib" or "samplelib.dll" might - /// be tried also. - /// - /// ^The entry point is zProc. - /// ^(zProc may be 0, in which case SQLite will try to come up with an - /// entry point name on its own. It first tries "sqlite3_extension_init". - /// If that does not work, it constructs a name "sqlite3_X_init" where the - /// X is consists of the lower-case equivalent of all ASCII alphabetic - /// characters in the filename from the last "/" to the first following - /// "." and omitting any initial "lib".)^ - /// ^The sqlite3_load_extension() interface returns - /// [SQLITE_OK] on success and [SQLITE_ERROR] if something goes wrong. - /// ^If an error occurs and pzErrMsg is not 0, then the - /// [sqlite3_load_extension()] interface shall attempt to - /// fill *pzErrMsg with error message text stored in memory - /// obtained from [sqlite3_malloc()]. The calling function - /// should free this memory by calling [sqlite3_free()]. - /// - /// ^Extension loading must be enabled using - /// [sqlite3_enable_load_extension()] or - /// [sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],1,NULL) - /// prior to calling this API, - /// otherwise an error will be returned. - /// - /// Security warning: It is recommended that the - /// [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method be used to enable only this - /// interface. The use of the [sqlite3_enable_load_extension()] interface - /// should be avoided. This will keep the SQL function [load_extension()] - /// disabled and prevent SQL injections from giving attackers - /// access to extension loading capabilities. - /// - /// See also the [load_extension() SQL function]. - int sqlite3_load_extension( - ffi.Pointer db, - ffi.Pointer zFile, - ffi.Pointer zProc, - ffi.Pointer> pzErrMsg, - ) { - return _sqlite3_load_extension(db, zFile, zProc, pzErrMsg); - } - - late final _sqlite3_load_extensionPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ) - > - >('sqlite3_load_extension'); - late final _sqlite3_load_extension = _sqlite3_load_extensionPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ) - >(); - - /// CAPI3REF: Error Logging Interface - /// - /// ^The [sqlite3_log()] interface writes a message into the [error log] - /// established by the [SQLITE_CONFIG_LOG] option to [sqlite3_config()]. - /// ^If logging is enabled, the zFormat string and subsequent arguments are - /// used with [sqlite3_snprintf()] to generate the final output string. - /// - /// The sqlite3_log() interface is intended for use by extensions such as - /// virtual tables, collating functions, and SQL functions. While there is - /// nothing to prevent an application from calling sqlite3_log(), doing so - /// is considered bad form. - /// - /// The zFormat string must not be NULL. - /// - /// To avoid deadlocks and other threading problems, the sqlite3_log() routine - /// will not use dynamically allocated memory. The log message is stored in - /// a fixed-length buffer on the stack. If the log message is longer than - /// a few hundred characters, it will be truncated to the length of the - /// buffer. - void sqlite3_log(int iErrCode, ffi.Pointer zFormat) { - return _sqlite3_log(iErrCode, zFormat); - } - - late final _sqlite3_logPtr = - _lookup< - ffi.NativeFunction)> - >('sqlite3_log'); - late final _sqlite3_log = _sqlite3_logPtr - .asFunction)>(); - - /// CAPI3REF: Memory Allocation Subsystem - /// - /// The SQLite core uses these three routines for all of its own - /// internal memory allocation needs. "Core" in the previous sentence - /// does not include operating-system specific [VFS] implementation. The - /// Windows VFS uses native malloc() and free() for some operations. - /// - /// ^The sqlite3_malloc() routine returns a pointer to a block - /// of memory at least N bytes in length, where N is the parameter. - /// ^If sqlite3_malloc() is unable to obtain sufficient free - /// memory, it returns a NULL pointer. ^If the parameter N to - /// sqlite3_malloc() is zero or negative then sqlite3_malloc() returns - /// a NULL pointer. - /// - /// ^The sqlite3_malloc64(N) routine works just like - /// sqlite3_malloc(N) except that N is an unsigned 64-bit integer instead - /// of a signed 32-bit integer. - /// - /// ^Calling sqlite3_free() with a pointer previously returned - /// by sqlite3_malloc() or sqlite3_realloc() releases that memory so - /// that it might be reused. ^The sqlite3_free() routine is - /// a no-op if is called with a NULL pointer. Passing a NULL pointer - /// to sqlite3_free() is harmless. After being freed, memory - /// should neither be read nor written. Even reading previously freed - /// memory might result in a segmentation fault or other severe error. - /// Memory corruption, a segmentation fault, or other severe error - /// might result if sqlite3_free() is called with a non-NULL pointer that - /// was not obtained from sqlite3_malloc() or sqlite3_realloc(). - /// - /// ^The sqlite3_realloc(X,N) interface attempts to resize a - /// prior memory allocation X to be at least N bytes. - /// ^If the X parameter to sqlite3_realloc(X,N) - /// is a NULL pointer then its behavior is identical to calling - /// sqlite3_malloc(N). - /// ^If the N parameter to sqlite3_realloc(X,N) is zero or - /// negative then the behavior is exactly the same as calling - /// sqlite3_free(X). - /// ^sqlite3_realloc(X,N) returns a pointer to a memory allocation - /// of at least N bytes in size or NULL if insufficient memory is available. - /// ^If M is the size of the prior allocation, then min(N,M) bytes - /// of the prior allocation are copied into the beginning of buffer returned - /// by sqlite3_realloc(X,N) and the prior allocation is freed. - /// ^If sqlite3_realloc(X,N) returns NULL and N is positive, then the - /// prior allocation is not freed. - /// - /// ^The sqlite3_realloc64(X,N) interfaces works the same as - /// sqlite3_realloc(X,N) except that N is a 64-bit unsigned integer instead - /// of a 32-bit signed integer. - /// - /// ^If X is a memory allocation previously obtained from sqlite3_malloc(), - /// sqlite3_malloc64(), sqlite3_realloc(), or sqlite3_realloc64(), then - /// sqlite3_msize(X) returns the size of that memory allocation in bytes. - /// ^The value returned by sqlite3_msize(X) might be larger than the number - /// of bytes requested when X was allocated. ^If X is a NULL pointer then - /// sqlite3_msize(X) returns zero. If X points to something that is not - /// the beginning of memory allocation, or if it points to a formerly - /// valid memory allocation that has now been freed, then the behavior - /// of sqlite3_msize(X) is undefined and possibly harmful. - /// - /// ^The memory returned by sqlite3_malloc(), sqlite3_realloc(), - /// sqlite3_malloc64(), and sqlite3_realloc64() - /// is always aligned to at least an 8 byte boundary, or to a - /// 4 byte boundary if the [SQLITE_4_BYTE_ALIGNED_MALLOC] compile-time - /// option is used. - /// - /// The pointer arguments to [sqlite3_free()] and [sqlite3_realloc()] - /// must be either NULL or else pointers obtained from a prior - /// invocation of [sqlite3_malloc()] or [sqlite3_realloc()] that have - /// not yet been released. - /// - /// The application must not read or write any part of - /// a block of memory after it has been released using - /// [sqlite3_free()] or [sqlite3_realloc()]. - ffi.Pointer sqlite3_malloc(int arg0) { - return _sqlite3_malloc(arg0); - } - - late final _sqlite3_mallocPtr = - _lookup Function(ffi.Int)>>( - 'sqlite3_malloc', - ); - late final _sqlite3_malloc = _sqlite3_mallocPtr - .asFunction Function(int)>(); - - ffi.Pointer sqlite3_malloc64(int arg0) { - return _sqlite3_malloc64(arg0); - } - - late final _sqlite3_malloc64Ptr = - _lookup< - ffi.NativeFunction Function(sqlite3_uint64)> - >('sqlite3_malloc64'); - late final _sqlite3_malloc64 = _sqlite3_malloc64Ptr - .asFunction Function(int)>(); - - int sqlite3_memory_alarm( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, sqlite3_int64, ffi.Int) - > - > - arg0, - ffi.Pointer arg1, - int arg2, - ) { - return _sqlite3_memory_alarm(arg0, arg1, arg2); - } - - late final _sqlite3_memory_alarmPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, sqlite3_int64, ffi.Int) - > - >, - ffi.Pointer, - sqlite3_int64, - ) - > - >('sqlite3_memory_alarm'); - late final _sqlite3_memory_alarm = _sqlite3_memory_alarmPtr - .asFunction< - int Function( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, sqlite3_int64, ffi.Int) - > - >, - ffi.Pointer, - int, - ) - >(); - - int sqlite3_memory_highwater(int resetFlag) { - return _sqlite3_memory_highwater(resetFlag); - } - - late final _sqlite3_memory_highwaterPtr = - _lookup>( - 'sqlite3_memory_highwater', - ); - late final _sqlite3_memory_highwater = _sqlite3_memory_highwaterPtr - .asFunction(); - - /// CAPI3REF: Memory Allocator Statistics - /// - /// SQLite provides these two interfaces for reporting on the status - /// of the [sqlite3_malloc()], [sqlite3_free()], and [sqlite3_realloc()] - /// routines, which form the built-in memory allocation subsystem. - /// - /// ^The [sqlite3_memory_used()] routine returns the number of bytes - /// of memory currently outstanding (malloced but not freed). - /// ^The [sqlite3_memory_highwater()] routine returns the maximum - /// value of [sqlite3_memory_used()] since the high-water mark - /// was last reset. ^The values returned by [sqlite3_memory_used()] and - /// [sqlite3_memory_highwater()] include any overhead - /// added by SQLite in its implementation of [sqlite3_malloc()], - /// but not overhead added by the any underlying system library - /// routines that [sqlite3_malloc()] may call. - /// - /// ^The memory high-water mark is reset to the current value of - /// [sqlite3_memory_used()] if and only if the parameter to - /// [sqlite3_memory_highwater()] is true. ^The value returned - /// by [sqlite3_memory_highwater(1)] is the high-water mark - /// prior to the reset. - int sqlite3_memory_used() { - return _sqlite3_memory_used(); - } - - late final _sqlite3_memory_usedPtr = - _lookup>( - 'sqlite3_memory_used', - ); - late final _sqlite3_memory_used = _sqlite3_memory_usedPtr - .asFunction(); - - /// CAPI3REF: Formatted String Printing Functions - /// - /// These routines are work-alikes of the "printf()" family of functions - /// from the standard C library. - /// These routines understand most of the common formatting options from - /// the standard library printf() - /// plus some additional non-standard formats ([%q], [%Q], [%w], and [%z]). - /// See the [built-in printf()] documentation for details. - /// - /// ^The sqlite3_mprintf() and sqlite3_vmprintf() routines write their - /// results into memory obtained from [sqlite3_malloc64()]. - /// The strings returned by these two routines should be - /// released by [sqlite3_free()]. ^Both routines return a - /// NULL pointer if [sqlite3_malloc64()] is unable to allocate enough - /// memory to hold the resulting string. - /// - /// ^(The sqlite3_snprintf() routine is similar to "snprintf()" from - /// the standard C library. The result is written into the - /// buffer supplied as the second parameter whose size is given by - /// the first parameter. Note that the order of the - /// first two parameters is reversed from snprintf().)^ This is an - /// historical accident that cannot be fixed without breaking - /// backwards compatibility. ^(Note also that sqlite3_snprintf() - /// returns a pointer to its buffer instead of the number of - /// characters actually written into the buffer.)^ We admit that - /// the number of characters written would be a more useful return - /// value but we cannot change the implementation of sqlite3_snprintf() - /// now without breaking compatibility. - /// - /// ^As long as the buffer size is greater than zero, sqlite3_snprintf() - /// guarantees that the buffer is always zero-terminated. ^The first - /// parameter "n" is the total size of the buffer, including space for - /// the zero terminator. So the longest string that can be completely - /// written will be n-1 characters. - /// - /// ^The sqlite3_vsnprintf() routine is a varargs version of sqlite3_snprintf(). - /// - /// See also: [built-in printf()], [printf() SQL function] - ffi.Pointer sqlite3_mprintf(ffi.Pointer arg0) { - return _sqlite3_mprintf(arg0); - } - - late final _sqlite3_mprintfPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('sqlite3_mprintf'); - late final _sqlite3_mprintf = _sqlite3_mprintfPtr - .asFunction Function(ffi.Pointer)>(); - - int sqlite3_msize(ffi.Pointer arg0) { - return _sqlite3_msize(arg0); - } - - late final _sqlite3_msizePtr = - _lookup< - ffi.NativeFunction)> - >('sqlite3_msize'); - late final _sqlite3_msize = _sqlite3_msizePtr - .asFunction)>(); - - /// CAPI3REF: Mutexes - /// - /// The SQLite core uses these routines for thread - /// synchronization. Though they are intended for internal - /// use by SQLite, code that links against SQLite is - /// permitted to use any of these routines. - /// - /// The SQLite source code contains multiple implementations - /// of these mutex routines. An appropriate implementation - /// is selected automatically at compile-time. The following - /// implementations are available in the SQLite core: - /// - ///
    - ///
  • SQLITE_MUTEX_PTHREADS - ///
  • SQLITE_MUTEX_W32 - ///
  • SQLITE_MUTEX_NOOP - ///
- /// - /// The SQLITE_MUTEX_NOOP implementation is a set of routines - /// that does no real locking and is appropriate for use in - /// a single-threaded application. The SQLITE_MUTEX_PTHREADS and - /// SQLITE_MUTEX_W32 implementations are appropriate for use on Unix - /// and Windows. - /// - /// If SQLite is compiled with the SQLITE_MUTEX_APPDEF preprocessor - /// macro defined (with "-DSQLITE_MUTEX_APPDEF=1"), then no mutex - /// implementation is included with the library. In this case the - /// application must supply a custom mutex implementation using the - /// [SQLITE_CONFIG_MUTEX] option of the sqlite3_config() function - /// before calling sqlite3_initialize() or any other public sqlite3_ - /// function that calls sqlite3_initialize(). - /// - /// ^The sqlite3_mutex_alloc() routine allocates a new - /// mutex and returns a pointer to it. ^The sqlite3_mutex_alloc() - /// routine returns NULL if it is unable to allocate the requested - /// mutex. The argument to sqlite3_mutex_alloc() must one of these - /// integer constants: - /// - ///
    - ///
  • SQLITE_MUTEX_FAST - ///
  • SQLITE_MUTEX_RECURSIVE - ///
  • SQLITE_MUTEX_STATIC_MASTER - ///
  • SQLITE_MUTEX_STATIC_MEM - ///
  • SQLITE_MUTEX_STATIC_OPEN - ///
  • SQLITE_MUTEX_STATIC_PRNG - ///
  • SQLITE_MUTEX_STATIC_LRU - ///
  • SQLITE_MUTEX_STATIC_PMEM - ///
  • SQLITE_MUTEX_STATIC_APP1 - ///
  • SQLITE_MUTEX_STATIC_APP2 - ///
  • SQLITE_MUTEX_STATIC_APP3 - ///
  • SQLITE_MUTEX_STATIC_VFS1 - ///
  • SQLITE_MUTEX_STATIC_VFS2 - ///
  • SQLITE_MUTEX_STATIC_VFS3 - ///
- /// - /// ^The first two constants (SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE) - /// cause sqlite3_mutex_alloc() to create - /// a new mutex. ^The new mutex is recursive when SQLITE_MUTEX_RECURSIVE - /// is used but not necessarily so when SQLITE_MUTEX_FAST is used. - /// The mutex implementation does not need to make a distinction - /// between SQLITE_MUTEX_RECURSIVE and SQLITE_MUTEX_FAST if it does - /// not want to. SQLite will only request a recursive mutex in - /// cases where it really needs one. If a faster non-recursive mutex - /// implementation is available on the host platform, the mutex subsystem - /// might return such a mutex in response to SQLITE_MUTEX_FAST. - /// - /// ^The other allowed parameters to sqlite3_mutex_alloc() (anything other - /// than SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE) each return - /// a pointer to a static preexisting mutex. ^Nine static mutexes are - /// used by the current version of SQLite. Future versions of SQLite - /// may add additional static mutexes. Static mutexes are for internal - /// use by SQLite only. Applications that use SQLite mutexes should - /// use only the dynamic mutexes returned by SQLITE_MUTEX_FAST or - /// SQLITE_MUTEX_RECURSIVE. - /// - /// ^Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST - /// or SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc() - /// returns a different mutex on every call. ^For the static - /// mutex types, the same mutex is returned on every call that has - /// the same type number. - /// - /// ^The sqlite3_mutex_free() routine deallocates a previously - /// allocated dynamic mutex. Attempting to deallocate a static - /// mutex results in undefined behavior. - /// - /// ^The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt - /// to enter a mutex. ^If another thread is already within the mutex, - /// sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return - /// SQLITE_BUSY. ^The sqlite3_mutex_try() interface returns [SQLITE_OK] - /// upon successful entry. ^(Mutexes created using - /// SQLITE_MUTEX_RECURSIVE can be entered multiple times by the same thread. - /// In such cases, the - /// mutex must be exited an equal number of times before another thread - /// can enter.)^ If the same thread tries to enter any mutex other - /// than an SQLITE_MUTEX_RECURSIVE more than once, the behavior is undefined. - /// - /// ^(Some systems (for example, Windows 95) do not support the operation - /// implemented by sqlite3_mutex_try(). On those systems, sqlite3_mutex_try() - /// will always return SQLITE_BUSY. The SQLite core only ever uses - /// sqlite3_mutex_try() as an optimization so this is acceptable - /// behavior.)^ - /// - /// ^The sqlite3_mutex_leave() routine exits a mutex that was - /// previously entered by the same thread. The behavior - /// is undefined if the mutex is not currently entered by the - /// calling thread or is not currently allocated. - /// - /// ^If the argument to sqlite3_mutex_enter(), sqlite3_mutex_try(), or - /// sqlite3_mutex_leave() is a NULL pointer, then all three routines - /// behave as no-ops. - /// - /// See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()]. - ffi.Pointer sqlite3_mutex_alloc(int arg0) { - return _sqlite3_mutex_alloc(arg0); - } - - late final _sqlite3_mutex_allocPtr = - _lookup Function(ffi.Int)>>( - 'sqlite3_mutex_alloc', - ); - late final _sqlite3_mutex_alloc = _sqlite3_mutex_allocPtr - .asFunction Function(int)>(); - - void sqlite3_mutex_enter(ffi.Pointer arg0) { - return _sqlite3_mutex_enter(arg0); - } - - late final _sqlite3_mutex_enterPtr = - _lookup< - ffi.NativeFunction)> - >('sqlite3_mutex_enter'); - late final _sqlite3_mutex_enter = _sqlite3_mutex_enterPtr - .asFunction)>(); - - void sqlite3_mutex_free(ffi.Pointer arg0) { - return _sqlite3_mutex_free(arg0); - } - - late final _sqlite3_mutex_freePtr = - _lookup< - ffi.NativeFunction)> - >('sqlite3_mutex_free'); - late final _sqlite3_mutex_free = _sqlite3_mutex_freePtr - .asFunction)>(); - - int sqlite3_mutex_held(ffi.Pointer arg0) { - return _sqlite3_mutex_held(arg0); - } - - late final _sqlite3_mutex_heldPtr = - _lookup)>>( - 'sqlite3_mutex_held', - ); - late final _sqlite3_mutex_held = _sqlite3_mutex_heldPtr - .asFunction)>(); - - void sqlite3_mutex_leave(ffi.Pointer arg0) { - return _sqlite3_mutex_leave(arg0); - } - - late final _sqlite3_mutex_leavePtr = - _lookup< - ffi.NativeFunction)> - >('sqlite3_mutex_leave'); - late final _sqlite3_mutex_leave = _sqlite3_mutex_leavePtr - .asFunction)>(); - - int sqlite3_mutex_notheld(ffi.Pointer arg0) { - return _sqlite3_mutex_notheld(arg0); - } - - late final _sqlite3_mutex_notheldPtr = - _lookup)>>( - 'sqlite3_mutex_notheld', - ); - late final _sqlite3_mutex_notheld = _sqlite3_mutex_notheldPtr - .asFunction)>(); - - int sqlite3_mutex_try(ffi.Pointer arg0) { - return _sqlite3_mutex_try(arg0); - } - - late final _sqlite3_mutex_tryPtr = - _lookup)>>( - 'sqlite3_mutex_try', - ); - late final _sqlite3_mutex_try = _sqlite3_mutex_tryPtr - .asFunction)>(); - - /// CAPI3REF: Find the next prepared statement - /// METHOD: sqlite3 - /// - /// ^This interface returns a pointer to the next [prepared statement] after - /// pStmt associated with the [database connection] pDb. ^If pStmt is NULL - /// then this interface returns a pointer to the first prepared statement - /// associated with the database connection pDb. ^If no prepared statement - /// satisfies the conditions of this routine, it returns NULL. - /// - /// The [database connection] pointer D in a call to - /// [sqlite3_next_stmt(D,S)] must refer to an open database - /// connection and in particular must not be a NULL pointer. - ffi.Pointer sqlite3_next_stmt( - ffi.Pointer pDb, - ffi.Pointer pStmt, - ) { - return _sqlite3_next_stmt(pDb, pStmt); - } - - late final _sqlite3_next_stmtPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >('sqlite3_next_stmt'); - late final _sqlite3_next_stmt = _sqlite3_next_stmtPtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); - - ffi.Pointer sqlite3_normalized_sql( - ffi.Pointer pStmt, - ) { - return _sqlite3_normalized_sql(pStmt); - } - - late final _sqlite3_normalized_sqlPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('sqlite3_normalized_sql'); - late final _sqlite3_normalized_sql = _sqlite3_normalized_sqlPtr - .asFunction Function(ffi.Pointer)>(); - - /// CAPI3REF: Opening A New Database Connection - /// CONSTRUCTOR: sqlite3 - /// - /// ^These routines open an SQLite database file as specified by the - /// filename argument. ^The filename argument is interpreted as UTF-8 for - /// sqlite3_open() and sqlite3_open_v2() and as UTF-16 in the native byte - /// order for sqlite3_open16(). ^(A [database connection] handle is usually - /// returned in *ppDb, even if an error occurs. The only exception is that - /// if SQLite is unable to allocate memory to hold the [sqlite3] object, - /// a NULL will be written into *ppDb instead of a pointer to the [sqlite3] - /// object.)^ ^(If the database is opened (and/or created) successfully, then - /// [SQLITE_OK] is returned. Otherwise an [error code] is returned.)^ ^The - /// [sqlite3_errmsg()] or [sqlite3_errmsg16()] routines can be used to obtain - /// an English language description of the error following a failure of any - /// of the sqlite3_open() routines. - /// - /// ^The default encoding will be UTF-8 for databases created using - /// sqlite3_open() or sqlite3_open_v2(). ^The default encoding for databases - /// created using sqlite3_open16() will be UTF-16 in the native byte order. - /// - /// Whether or not an error occurs when it is opened, resources - /// associated with the [database connection] handle should be released by - /// passing it to [sqlite3_close()] when it is no longer required. - /// - /// The sqlite3_open_v2() interface works like sqlite3_open() - /// except that it accepts two additional parameters for additional control - /// over the new database connection. ^(The flags parameter to - /// sqlite3_open_v2() must include, at a minimum, one of the following - /// three flag combinations:)^ - /// - ///
- /// ^(
[SQLITE_OPEN_READONLY]
- ///
The database is opened in read-only mode. If the database does not - /// already exist, an error is returned.
)^ - /// - /// ^(
[SQLITE_OPEN_READWRITE]
- ///
The database is opened for reading and writing if possible, or reading - /// only if the file is write protected by the operating system. In either - /// case the database must already exist, otherwise an error is returned.
)^ - /// - /// ^(
[SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]
- ///
The database is opened for reading and writing, and is created if - /// it does not already exist. This is the behavior that is always used for - /// sqlite3_open() and sqlite3_open16().
)^ - ///
- /// - /// In addition to the required flags, the following optional flags are - /// also supported: - /// - ///
- /// ^(
[SQLITE_OPEN_URI]
- ///
The filename can be interpreted as a URI if this flag is set.
)^ - /// - /// ^(
[SQLITE_OPEN_MEMORY]
- ///
The database will be opened as an in-memory database. The database - /// is named by the "filename" argument for the purposes of cache-sharing, - /// if shared cache mode is enabled, but the "filename" is otherwise ignored. - ///
)^ - /// - /// ^(
[SQLITE_OPEN_NOMUTEX]
- ///
The new database connection will use the "multi-thread" - /// [threading mode].)^ This means that separate threads are allowed - /// to use SQLite at the same time, as long as each thread is using - /// a different [database connection]. - /// - /// ^(
[SQLITE_OPEN_FULLMUTEX]
- ///
The new database connection will use the "serialized" - /// [threading mode].)^ This means the multiple threads can safely - /// attempt to use the same database connection at the same time. - /// (Mutexes will block any actual concurrency, but in this mode - /// there is no harm in trying.) - /// - /// ^(
[SQLITE_OPEN_SHAREDCACHE]
- ///
The database is opened [shared cache] enabled, overriding - /// the default shared cache setting provided by - /// [sqlite3_enable_shared_cache()].)^ - /// - /// ^(
[SQLITE_OPEN_PRIVATECACHE]
- ///
The database is opened [shared cache] disabled, overriding - /// the default shared cache setting provided by - /// [sqlite3_enable_shared_cache()].)^ - /// - /// [[OPEN_NOFOLLOW]] ^(
[SQLITE_OPEN_NOFOLLOW]
- ///
The database filename is not allowed to be a symbolic link
- ///
)^ - /// - /// If the 3rd parameter to sqlite3_open_v2() is not one of the - /// required combinations shown above optionally combined with other - /// [SQLITE_OPEN_READONLY | SQLITE_OPEN_* bits] - /// then the behavior is undefined. - /// - /// ^The fourth parameter to sqlite3_open_v2() is the name of the - /// [sqlite3_vfs] object that defines the operating system interface that - /// the new database connection should use. ^If the fourth parameter is - /// a NULL pointer then the default [sqlite3_vfs] object is used. - /// - /// ^If the filename is ":memory:", then a private, temporary in-memory database - /// is created for the connection. ^This in-memory database will vanish when - /// the database connection is closed. Future versions of SQLite might - /// make use of additional special filenames that begin with the ":" character. - /// It is recommended that when a database filename actually does begin with - /// a ":" character you should prefix the filename with a pathname such as - /// "./" to avoid ambiguity. - /// - /// ^If the filename is an empty string, then a private, temporary - /// on-disk database will be created. ^This private database will be - /// automatically deleted as soon as the database connection is closed. - /// - /// [[URI filenames in sqlite3_open()]]

URI Filenames

- /// - /// ^If [URI filename] interpretation is enabled, and the filename argument - /// begins with "file:", then the filename is interpreted as a URI. ^URI - /// filename interpretation is enabled if the [SQLITE_OPEN_URI] flag is - /// set in the third argument to sqlite3_open_v2(), or if it has - /// been enabled globally using the [SQLITE_CONFIG_URI] option with the - /// [sqlite3_config()] method or by the [SQLITE_USE_URI] compile-time option. - /// URI filename interpretation is turned off - /// by default, but future releases of SQLite might enable URI filename - /// interpretation by default. See "[URI filenames]" for additional - /// information. - /// - /// URI filenames are parsed according to RFC 3986. ^If the URI contains an - /// authority, then it must be either an empty string or the string - /// "localhost". ^If the authority is not an empty string or "localhost", an - /// error is returned to the caller. ^The fragment component of a URI, if - /// present, is ignored. - /// - /// ^SQLite uses the path component of the URI as the name of the disk file - /// which contains the database. ^If the path begins with a '/' character, - /// then it is interpreted as an absolute path. ^If the path does not begin - /// with a '/' (meaning that the authority section is omitted from the URI) - /// then the path is interpreted as a relative path. - /// ^(On windows, the first component of an absolute path - /// is a drive specification (e.g. "C:").)^ - /// - /// [[core URI query parameters]] - /// The query component of a URI may contain parameters that are interpreted - /// either by SQLite itself, or by a [VFS | custom VFS implementation]. - /// SQLite and its built-in [VFSes] interpret the - /// following query parameters: - /// - ///
    - ///
  • vfs: ^The "vfs" parameter may be used to specify the name of - /// a VFS object that provides the operating system interface that should - /// be used to access the database file on disk. ^If this option is set to - /// an empty string the default VFS object is used. ^Specifying an unknown - /// VFS is an error. ^If sqlite3_open_v2() is used and the vfs option is - /// present, then the VFS specified by the option takes precedence over - /// the value passed as the fourth parameter to sqlite3_open_v2(). - /// - ///
  • mode: ^(The mode parameter may be set to either "ro", "rw", - /// "rwc", or "memory". Attempting to set it to any other value is - /// an error)^. - /// ^If "ro" is specified, then the database is opened for read-only - /// access, just as if the [SQLITE_OPEN_READONLY] flag had been set in the - /// third argument to sqlite3_open_v2(). ^If the mode option is set to - /// "rw", then the database is opened for read-write (but not create) - /// access, as if SQLITE_OPEN_READWRITE (but not SQLITE_OPEN_CREATE) had - /// been set. ^Value "rwc" is equivalent to setting both - /// SQLITE_OPEN_READWRITE and SQLITE_OPEN_CREATE. ^If the mode option is - /// set to "memory" then a pure [in-memory database] that never reads - /// or writes from disk is used. ^It is an error to specify a value for - /// the mode parameter that is less restrictive than that specified by - /// the flags passed in the third parameter to sqlite3_open_v2(). - /// - ///
  • cache: ^The cache parameter may be set to either "shared" or - /// "private". ^Setting it to "shared" is equivalent to setting the - /// SQLITE_OPEN_SHAREDCACHE bit in the flags argument passed to - /// sqlite3_open_v2(). ^Setting the cache parameter to "private" is - /// equivalent to setting the SQLITE_OPEN_PRIVATECACHE bit. - /// ^If sqlite3_open_v2() is used and the "cache" parameter is present in - /// a URI filename, its value overrides any behavior requested by setting - /// SQLITE_OPEN_PRIVATECACHE or SQLITE_OPEN_SHAREDCACHE flag. - /// - ///
  • psow: ^The psow parameter indicates whether or not the - /// [powersafe overwrite] property does or does not apply to the - /// storage media on which the database file resides. - /// - ///
  • nolock: ^The nolock parameter is a boolean query parameter - /// which if set disables file locking in rollback journal modes. This - /// is useful for accessing a database on a filesystem that does not - /// support locking. Caution: Database corruption might result if two - /// or more processes write to the same database and any one of those - /// processes uses nolock=1. - /// - ///
  • immutable: ^The immutable parameter is a boolean query - /// parameter that indicates that the database file is stored on - /// read-only media. ^When immutable is set, SQLite assumes that the - /// database file cannot be changed, even by a process with higher - /// privilege, and so the database is opened read-only and all locking - /// and change detection is disabled. Caution: Setting the immutable - /// property on a database file that does in fact change can result - /// in incorrect query results and/or [SQLITE_CORRUPT] errors. - /// See also: [SQLITE_IOCAP_IMMUTABLE]. - /// - ///
- /// - /// ^Specifying an unknown parameter in the query component of a URI is not an - /// error. Future versions of SQLite might understand additional query - /// parameters. See "[query parameters with special meaning to SQLite]" for - /// additional information. - /// - /// [[URI filename examples]]

URI filename examples

- /// - /// - ///
URI filenames Results - ///
file:data.db - /// Open the file "data.db" in the current directory. - ///
file:/home/fred/data.db
- /// file:///home/fred/data.db
- /// file://localhost/home/fred/data.db
- /// Open the database file "/home/fred/data.db". - ///
file://darkstar/home/fred/data.db - /// An error. "darkstar" is not a recognized authority. - ///
- /// file:///C:/Documents%20and%20Settings/fred/Desktop/data.db - /// Windows only: Open the file "data.db" on fred's desktop on drive - /// C:. Note that the %20 escaping in this example is not strictly - /// necessary - space characters can be used literally - /// in URI filenames. - ///
file:data.db?mode=ro&cache=private - /// Open file "data.db" in the current directory for read-only access. - /// Regardless of whether or not shared-cache mode is enabled by - /// default, use a private cache. - ///
file:/home/fred/data.db?vfs=unix-dotfile - /// Open file "/home/fred/data.db". Use the special VFS "unix-dotfile" - /// that uses dot-files in place of posix advisory locking. - ///
file:data.db?mode=readonly - /// An error. "readonly" is not a valid option for the "mode" parameter. - ///
- /// - /// ^URI hexadecimal escape sequences (%HH) are supported within the path and - /// query components of a URI. A hexadecimal escape sequence consists of a - /// percent sign - "%" - followed by exactly two hexadecimal digits - /// specifying an octet value. ^Before the path or query components of a - /// URI filename are interpreted, they are encoded using UTF-8 and all - /// hexadecimal escape sequences replaced by a single byte containing the - /// corresponding octet. If this process generates an invalid UTF-8 encoding, - /// the results are undefined. - /// - /// Note to Windows users: The encoding used for the filename argument - /// of sqlite3_open() and sqlite3_open_v2() must be UTF-8, not whatever - /// codepage is currently defined. Filenames containing international - /// characters must be converted to UTF-8 prior to passing them into - /// sqlite3_open() or sqlite3_open_v2(). - /// - /// Note to Windows Runtime users: The temporary directory must be set - /// prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various - /// features that require the use of temporary files may fail. - /// - /// See also: [sqlite3_temp_directory] - int sqlite3_open( - ffi.Pointer filename, - ffi.Pointer> ppDb, - ) { - return _sqlite3_open(filename, ppDb); - } - - late final _sqlite3_openPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer>, - ) - > - >('sqlite3_open'); - late final _sqlite3_open = _sqlite3_openPtr - .asFunction< - int Function(ffi.Pointer, ffi.Pointer>) - >(); - - int sqlite3_open16( - ffi.Pointer filename, - ffi.Pointer> ppDb, - ) { - return _sqlite3_open16(filename, ppDb); - } - - late final _sqlite3_open16Ptr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer>, - ) - > - >('sqlite3_open16'); - late final _sqlite3_open16 = _sqlite3_open16Ptr - .asFunction< - int Function(ffi.Pointer, ffi.Pointer>) - >(); - - int sqlite3_open_v2( - ffi.Pointer filename, - ffi.Pointer> ppDb, - int flags, - ffi.Pointer zVfs, - ) { - return _sqlite3_open_v2(filename, ppDb, flags, zVfs); - } - - late final _sqlite3_open_v2Ptr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Int, - ffi.Pointer, - ) - > - >('sqlite3_open_v2'); - late final _sqlite3_open_v2 = _sqlite3_open_v2Ptr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer>, - int, - ffi.Pointer, - ) - >(); - - int sqlite3_os_end() { - return _sqlite3_os_end(); - } - - late final _sqlite3_os_endPtr = - _lookup>('sqlite3_os_end'); - late final _sqlite3_os_end = _sqlite3_os_endPtr.asFunction(); - - int sqlite3_os_init() { - return _sqlite3_os_init(); - } - - late final _sqlite3_os_initPtr = - _lookup>('sqlite3_os_init'); - late final _sqlite3_os_init = _sqlite3_os_initPtr - .asFunction(); - - /// CAPI3REF: Overload A Function For A Virtual Table - /// METHOD: sqlite3 - /// - /// ^(Virtual tables can provide alternative implementations of functions - /// using the [xFindFunction] method of the [virtual table module]. - /// But global versions of those functions - /// must exist in order to be overloaded.)^ - /// - /// ^(This API makes sure a global version of a function with a particular - /// name and number of parameters exists. If no such function exists - /// before this API is called, a new function is created.)^ ^The implementation - /// of the new function always causes an exception to be thrown. So - /// the new function is not good for anything by itself. Its only - /// purpose is to be a placeholder function that can be overloaded - /// by a [virtual table]. - int sqlite3_overload_function( - ffi.Pointer arg0, - ffi.Pointer zFuncName, - int nArg, - ) { - return _sqlite3_overload_function(arg0, zFuncName, nArg); - } - - late final _sqlite3_overload_functionPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, ffi.Int) - > - >('sqlite3_overload_function'); - late final _sqlite3_overload_function = _sqlite3_overload_functionPtr - .asFunction< - int Function(ffi.Pointer, ffi.Pointer, int) - >(); - - /// CAPI3REF: Compiling An SQL Statement - /// KEYWORDS: {SQL statement compiler} - /// METHOD: sqlite3 - /// CONSTRUCTOR: sqlite3_stmt - /// - /// To execute an SQL statement, it must first be compiled into a byte-code - /// program using one of these routines. Or, in other words, these routines - /// are constructors for the [prepared statement] object. - /// - /// The preferred routine to use is [sqlite3_prepare_v2()]. The - /// [sqlite3_prepare()] interface is legacy and should be avoided. - /// [sqlite3_prepare_v3()] has an extra "prepFlags" option that is used - /// for special purposes. - /// - /// The use of the UTF-8 interfaces is preferred, as SQLite currently - /// does all parsing using UTF-8. The UTF-16 interfaces are provided - /// as a convenience. The UTF-16 interfaces work by converting the - /// input text into UTF-8, then invoking the corresponding UTF-8 interface. - /// - /// The first argument, "db", is a [database connection] obtained from a - /// prior successful call to [sqlite3_open()], [sqlite3_open_v2()] or - /// [sqlite3_open16()]. The database connection must not have been closed. - /// - /// The second argument, "zSql", is the statement to be compiled, encoded - /// as either UTF-8 or UTF-16. The sqlite3_prepare(), sqlite3_prepare_v2(), - /// and sqlite3_prepare_v3() - /// interfaces use UTF-8, and sqlite3_prepare16(), sqlite3_prepare16_v2(), - /// and sqlite3_prepare16_v3() use UTF-16. - /// - /// ^If the nByte argument is negative, then zSql is read up to the - /// first zero terminator. ^If nByte is positive, then it is the - /// number of bytes read from zSql. ^If nByte is zero, then no prepared - /// statement is generated. - /// If the caller knows that the supplied string is nul-terminated, then - /// there is a small performance advantage to passing an nByte parameter that - /// is the number of bytes in the input string including - /// the nul-terminator. - /// - /// ^If pzTail is not NULL then *pzTail is made to point to the first byte - /// past the end of the first SQL statement in zSql. These routines only - /// compile the first statement in zSql, so *pzTail is left pointing to - /// what remains uncompiled. - /// - /// ^*ppStmt is left pointing to a compiled [prepared statement] that can be - /// executed using [sqlite3_step()]. ^If there is an error, *ppStmt is set - /// to NULL. ^If the input text contains no SQL (if the input is an empty - /// string or a comment) then *ppStmt is set to NULL. - /// The calling procedure is responsible for deleting the compiled - /// SQL statement using [sqlite3_finalize()] after it has finished with it. - /// ppStmt may not be NULL. - /// - /// ^On success, the sqlite3_prepare() family of routines return [SQLITE_OK]; - /// otherwise an [error code] is returned. - /// - /// The sqlite3_prepare_v2(), sqlite3_prepare_v3(), sqlite3_prepare16_v2(), - /// and sqlite3_prepare16_v3() interfaces are recommended for all new programs. - /// The older interfaces (sqlite3_prepare() and sqlite3_prepare16()) - /// are retained for backwards compatibility, but their use is discouraged. - /// ^In the "vX" interfaces, the prepared statement - /// that is returned (the [sqlite3_stmt] object) contains a copy of the - /// original SQL text. This causes the [sqlite3_step()] interface to - /// behave differently in three ways: - /// - ///
    - ///
  1. - /// ^If the database schema changes, instead of returning [SQLITE_SCHEMA] as it - /// always used to do, [sqlite3_step()] will automatically recompile the SQL - /// statement and try to run it again. As many as [SQLITE_MAX_SCHEMA_RETRY] - /// retries will occur before sqlite3_step() gives up and returns an error. - ///
  2. - /// - ///
  3. - /// ^When an error occurs, [sqlite3_step()] will return one of the detailed - /// [error codes] or [extended error codes]. ^The legacy behavior was that - /// [sqlite3_step()] would only return a generic [SQLITE_ERROR] result code - /// and the application would have to make a second call to [sqlite3_reset()] - /// in order to find the underlying cause of the problem. With the "v2" prepare - /// interfaces, the underlying reason for the error is returned immediately. - ///
  4. - /// - ///
  5. - /// ^If the specific value bound to a [parameter | host parameter] in the - /// WHERE clause might influence the choice of query plan for a statement, - /// then the statement will be automatically recompiled, as if there had been - /// a schema change, on the first [sqlite3_step()] call following any change - /// to the [sqlite3_bind_text | bindings] of that [parameter]. - /// ^The specific value of a WHERE-clause [parameter] might influence the - /// choice of query plan if the parameter is the left-hand side of a [LIKE] - /// or [GLOB] operator or if the parameter is compared to an indexed column - /// and the [SQLITE_ENABLE_STAT4] compile-time option is enabled. - ///
  6. - ///
- /// - ///

^sqlite3_prepare_v3() differs from sqlite3_prepare_v2() only in having - /// the extra prepFlags parameter, which is a bit array consisting of zero or - /// more of the [SQLITE_PREPARE_PERSISTENT|SQLITE_PREPARE_*] flags. ^The - /// sqlite3_prepare_v2() interface works exactly the same as - /// sqlite3_prepare_v3() with a zero prepFlags parameter. - int sqlite3_prepare( - ffi.Pointer db, - ffi.Pointer zSql, - int nByte, - ffi.Pointer> ppStmt, - ffi.Pointer> pzTail, - ) { - return _sqlite3_prepare(db, zSql, nByte, ppStmt, pzTail); - } - - late final _sqlite3_preparePtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ffi.Pointer>, - ) - > - >('sqlite3_prepare'); - late final _sqlite3_prepare = _sqlite3_preparePtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>, - ffi.Pointer>, - ) - >(); - - int sqlite3_prepare16( - ffi.Pointer db, - ffi.Pointer zSql, - int nByte, - ffi.Pointer> ppStmt, - ffi.Pointer> pzTail, - ) { - return _sqlite3_prepare16(db, zSql, nByte, ppStmt, pzTail); - } - - late final _sqlite3_prepare16Ptr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ffi.Pointer>, - ) - > - >('sqlite3_prepare16'); - late final _sqlite3_prepare16 = _sqlite3_prepare16Ptr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>, - ffi.Pointer>, - ) - >(); - - int sqlite3_prepare16_v2( - ffi.Pointer db, - ffi.Pointer zSql, - int nByte, - ffi.Pointer> ppStmt, - ffi.Pointer> pzTail, - ) { - return _sqlite3_prepare16_v2(db, zSql, nByte, ppStmt, pzTail); - } - - late final _sqlite3_prepare16_v2Ptr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ffi.Pointer>, - ) - > - >('sqlite3_prepare16_v2'); - late final _sqlite3_prepare16_v2 = _sqlite3_prepare16_v2Ptr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>, - ffi.Pointer>, - ) - >(); - - int sqlite3_prepare16_v3( - ffi.Pointer db, - ffi.Pointer zSql, - int nByte, - int prepFlags, - ffi.Pointer> ppStmt, - ffi.Pointer> pzTail, - ) { - return _sqlite3_prepare16_v3(db, zSql, nByte, prepFlags, ppStmt, pzTail); - } - - late final _sqlite3_prepare16_v3Ptr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.UnsignedInt, - ffi.Pointer>, - ffi.Pointer>, - ) - > - >('sqlite3_prepare16_v3'); - late final _sqlite3_prepare16_v3 = _sqlite3_prepare16_v3Ptr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer>, - ffi.Pointer>, - ) - >(); - - int sqlite3_prepare_v2( - ffi.Pointer db, - ffi.Pointer zSql, - int nByte, - ffi.Pointer> ppStmt, - ffi.Pointer> pzTail, - ) { - return _sqlite3_prepare_v2(db, zSql, nByte, ppStmt, pzTail); - } - - late final _sqlite3_prepare_v2Ptr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ffi.Pointer>, - ) - > - >('sqlite3_prepare_v2'); - late final _sqlite3_prepare_v2 = _sqlite3_prepare_v2Ptr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>, - ffi.Pointer>, - ) - >(); - - int sqlite3_prepare_v3( - ffi.Pointer db, - ffi.Pointer zSql, - int nByte, - int prepFlags, - ffi.Pointer> ppStmt, - ffi.Pointer> pzTail, - ) { - return _sqlite3_prepare_v3(db, zSql, nByte, prepFlags, ppStmt, pzTail); - } - - late final _sqlite3_prepare_v3Ptr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.UnsignedInt, - ffi.Pointer>, - ffi.Pointer>, - ) - > - >('sqlite3_prepare_v3'); - late final _sqlite3_prepare_v3 = _sqlite3_prepare_v3Ptr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer>, - ffi.Pointer>, - ) - >(); - - ffi.Pointer sqlite3_profile( - ffi.Pointer arg0, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - sqlite3_uint64, - ) - > - > - xProfile, - ffi.Pointer arg2, - ) { - return _sqlite3_profile(arg0, xProfile, arg2); - } - - late final _sqlite3_profilePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - sqlite3_uint64, - ) - > - >, - ffi.Pointer, - ) - > - >('sqlite3_profile'); - late final _sqlite3_profile = _sqlite3_profilePtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - sqlite3_uint64, - ) - > - >, - ffi.Pointer, - ) - >(); - - /// CAPI3REF: Query Progress Callbacks - /// METHOD: sqlite3 - /// - /// ^The sqlite3_progress_handler(D,N,X,P) interface causes the callback - /// function X to be invoked periodically during long running calls to - /// [sqlite3_exec()], [sqlite3_step()] and [sqlite3_get_table()] for - /// database connection D. An example use for this - /// interface is to keep a GUI updated during a large query. - /// - /// ^The parameter P is passed through as the only parameter to the - /// callback function X. ^The parameter N is the approximate number of - /// [virtual machine instructions] that are evaluated between successive - /// invocations of the callback X. ^If N is less than one then the progress - /// handler is disabled. - /// - /// ^Only a single progress handler may be defined at one time per - /// [database connection]; setting a new progress handler cancels the - /// old one. ^Setting parameter X to NULL disables the progress handler. - /// ^The progress handler is also disabled by setting N to a value less - /// than 1. - /// - /// ^If the progress callback returns non-zero, the operation is - /// interrupted. This feature can be used to implement a - /// "Cancel" button on a GUI progress dialog box. - /// - /// The progress handler callback must not do anything that will modify - /// the database connection that invoked the progress handler. - /// Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their - /// database connections for the meaning of "modify" in this paragraph. - void sqlite3_progress_handler( - ffi.Pointer arg0, - int arg1, - ffi.Pointer)>> - arg2, - ffi.Pointer arg3, - ) { - return _sqlite3_progress_handler(arg0, arg1, arg2, arg3); - } - - late final _sqlite3_progress_handlerPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer< - ffi.NativeFunction)> - >, - ffi.Pointer, - ) - > - >('sqlite3_progress_handler'); - late final _sqlite3_progress_handler = _sqlite3_progress_handlerPtr - .asFunction< - void Function( - ffi.Pointer, - int, - ffi.Pointer< - ffi.NativeFunction)> - >, - ffi.Pointer, - ) - >(); - - /// CAPI3REF: Pseudo-Random Number Generator - /// - /// SQLite contains a high-quality pseudo-random number generator (PRNG) used to - /// select random [ROWID | ROWIDs] when inserting new records into a table that - /// already uses the largest possible [ROWID]. The PRNG is also used for - /// the built-in random() and randomblob() SQL functions. This interface allows - /// applications to access the same PRNG for other purposes. - /// - /// ^A call to this routine stores N bytes of randomness into buffer P. - /// ^The P parameter can be a NULL pointer. - /// - /// ^If this routine has not been previously called or if the previous - /// call had N less than one or a NULL pointer for P, then the PRNG is - /// seeded using randomness obtained from the xRandomness method of - /// the default [sqlite3_vfs] object. - /// ^If the previous call to this routine had an N of 1 or more and a - /// non-NULL P then the pseudo-randomness is generated - /// internally and without recourse to the [sqlite3_vfs] xRandomness - /// method. - void sqlite3_randomness(int N, ffi.Pointer P) { - return _sqlite3_randomness(N, P); - } - - late final _sqlite3_randomnessPtr = - _lookup< - ffi.NativeFunction)> - >('sqlite3_randomness'); - late final _sqlite3_randomness = _sqlite3_randomnessPtr - .asFunction)>(); - - ffi.Pointer sqlite3_realloc(ffi.Pointer arg0, int arg1) { - return _sqlite3_realloc(arg0, arg1); - } - - late final _sqlite3_reallocPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Int) - > - >('sqlite3_realloc'); - late final _sqlite3_realloc = _sqlite3_reallocPtr - .asFunction Function(ffi.Pointer, int)>(); - - ffi.Pointer sqlite3_realloc64( - ffi.Pointer arg0, - int arg1, - ) { - return _sqlite3_realloc64(arg0, arg1); - } - - late final _sqlite3_realloc64Ptr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, sqlite3_uint64) - > - >('sqlite3_realloc64'); - late final _sqlite3_realloc64 = _sqlite3_realloc64Ptr - .asFunction Function(ffi.Pointer, int)>(); - - /// CAPI3REF: Attempt To Free Heap Memory - /// - /// ^The sqlite3_release_memory() interface attempts to free N bytes - /// of heap memory by deallocating non-essential memory allocations - /// held by the database library. Memory used to cache database - /// pages to improve performance is an example of non-essential memory. - /// ^sqlite3_release_memory() returns the number of bytes actually freed, - /// which might be more or less than the amount requested. - /// ^The sqlite3_release_memory() routine is a no-op returning zero - /// if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT]. - /// - /// See also: [sqlite3_db_release_memory()] - int sqlite3_release_memory(int arg0) { - return _sqlite3_release_memory(arg0); - } - - late final _sqlite3_release_memoryPtr = - _lookup>( - 'sqlite3_release_memory', - ); - late final _sqlite3_release_memory = _sqlite3_release_memoryPtr - .asFunction(); - - /// CAPI3REF: Reset A Prepared Statement Object - /// METHOD: sqlite3_stmt - /// - /// The sqlite3_reset() function is called to reset a [prepared statement] - /// object back to its initial state, ready to be re-executed. - /// ^Any SQL statement variables that had values bound to them using - /// the [sqlite3_bind_blob | sqlite3_bind_*() API] retain their values. - /// Use [sqlite3_clear_bindings()] to reset the bindings. - /// - /// ^The [sqlite3_reset(S)] interface resets the [prepared statement] S - /// back to the beginning of its program. - /// - /// ^If the most recent call to [sqlite3_step(S)] for the - /// [prepared statement] S returned [SQLITE_ROW] or [SQLITE_DONE], - /// or if [sqlite3_step(S)] has never before been called on S, - /// then [sqlite3_reset(S)] returns [SQLITE_OK]. - /// - /// ^If the most recent call to [sqlite3_step(S)] for the - /// [prepared statement] S indicated an error, then - /// [sqlite3_reset(S)] returns an appropriate [error code]. - /// - /// ^The [sqlite3_reset(S)] interface does not change the values - /// of any [sqlite3_bind_blob|bindings] on the [prepared statement] S. - int sqlite3_reset(ffi.Pointer pStmt) { - return _sqlite3_reset(pStmt); - } - - late final _sqlite3_resetPtr = - _lookup)>>( - 'sqlite3_reset', - ); - late final _sqlite3_reset = _sqlite3_resetPtr - .asFunction)>(); - - /// CAPI3REF: Reset Automatic Extension Loading - /// - /// ^This interface disables all automatic extensions previously - /// registered using [sqlite3_auto_extension()]. - void sqlite3_reset_auto_extension() { - return _sqlite3_reset_auto_extension(); - } - - late final _sqlite3_reset_auto_extensionPtr = - _lookup>( - 'sqlite3_reset_auto_extension', - ); - late final _sqlite3_reset_auto_extension = _sqlite3_reset_auto_extensionPtr - .asFunction(); - - /// CAPI3REF: Setting The Result Of An SQL Function - /// METHOD: sqlite3_context - /// - /// These routines are used by the xFunc or xFinal callbacks that - /// implement SQL functions and aggregates. See - /// [sqlite3_create_function()] and [sqlite3_create_function16()] - /// for additional information. - /// - /// These functions work very much like the [parameter binding] family of - /// functions used to bind values to host parameters in prepared statements. - /// Refer to the [SQL parameter] documentation for additional information. - /// - /// ^The sqlite3_result_blob() interface sets the result from - /// an application-defined function to be the BLOB whose content is pointed - /// to by the second parameter and which is N bytes long where N is the - /// third parameter. - /// - /// ^The sqlite3_result_zeroblob(C,N) and sqlite3_result_zeroblob64(C,N) - /// interfaces set the result of the application-defined function to be - /// a BLOB containing all zero bytes and N bytes in size. - /// - /// ^The sqlite3_result_double() interface sets the result from - /// an application-defined function to be a floating point value specified - /// by its 2nd argument. - /// - /// ^The sqlite3_result_error() and sqlite3_result_error16() functions - /// cause the implemented SQL function to throw an exception. - /// ^SQLite uses the string pointed to by the - /// 2nd parameter of sqlite3_result_error() or sqlite3_result_error16() - /// as the text of an error message. ^SQLite interprets the error - /// message string from sqlite3_result_error() as UTF-8. ^SQLite - /// interprets the string from sqlite3_result_error16() as UTF-16 using - /// the same [byte-order determination rules] as [sqlite3_bind_text16()]. - /// ^If the third parameter to sqlite3_result_error() - /// or sqlite3_result_error16() is negative then SQLite takes as the error - /// message all text up through the first zero character. - /// ^If the third parameter to sqlite3_result_error() or - /// sqlite3_result_error16() is non-negative then SQLite takes that many - /// bytes (not characters) from the 2nd parameter as the error message. - /// ^The sqlite3_result_error() and sqlite3_result_error16() - /// routines make a private copy of the error message text before - /// they return. Hence, the calling function can deallocate or - /// modify the text after they return without harm. - /// ^The sqlite3_result_error_code() function changes the error code - /// returned by SQLite as a result of an error in a function. ^By default, - /// the error code is SQLITE_ERROR. ^A subsequent call to sqlite3_result_error() - /// or sqlite3_result_error16() resets the error code to SQLITE_ERROR. - /// - /// ^The sqlite3_result_error_toobig() interface causes SQLite to throw an - /// error indicating that a string or BLOB is too long to represent. - /// - /// ^The sqlite3_result_error_nomem() interface causes SQLite to throw an - /// error indicating that a memory allocation failed. - /// - /// ^The sqlite3_result_int() interface sets the return value - /// of the application-defined function to be the 32-bit signed integer - /// value given in the 2nd argument. - /// ^The sqlite3_result_int64() interface sets the return value - /// of the application-defined function to be the 64-bit signed integer - /// value given in the 2nd argument. - /// - /// ^The sqlite3_result_null() interface sets the return value - /// of the application-defined function to be NULL. - /// - /// ^The sqlite3_result_text(), sqlite3_result_text16(), - /// sqlite3_result_text16le(), and sqlite3_result_text16be() interfaces - /// set the return value of the application-defined function to be - /// a text string which is represented as UTF-8, UTF-16 native byte order, - /// UTF-16 little endian, or UTF-16 big endian, respectively. - /// ^The sqlite3_result_text64() interface sets the return value of an - /// application-defined function to be a text string in an encoding - /// specified by the fifth (and last) parameter, which must be one - /// of [SQLITE_UTF8], [SQLITE_UTF16], [SQLITE_UTF16BE], or [SQLITE_UTF16LE]. - /// ^SQLite takes the text result from the application from - /// the 2nd parameter of the sqlite3_result_text* interfaces. - /// ^If the 3rd parameter to the sqlite3_result_text* interfaces - /// is negative, then SQLite takes result text from the 2nd parameter - /// through the first zero character. - /// ^If the 3rd parameter to the sqlite3_result_text* interfaces - /// is non-negative, then as many bytes (not characters) of the text - /// pointed to by the 2nd parameter are taken as the application-defined - /// function result. If the 3rd parameter is non-negative, then it - /// must be the byte offset into the string where the NUL terminator would - /// appear if the string where NUL terminated. If any NUL characters occur - /// in the string at a byte offset that is less than the value of the 3rd - /// parameter, then the resulting string will contain embedded NULs and the - /// result of expressions operating on strings with embedded NULs is undefined. - /// ^If the 4th parameter to the sqlite3_result_text* interfaces - /// or sqlite3_result_blob is a non-NULL pointer, then SQLite calls that - /// function as the destructor on the text or BLOB result when it has - /// finished using that result. - /// ^If the 4th parameter to the sqlite3_result_text* interfaces or to - /// sqlite3_result_blob is the special constant SQLITE_STATIC, then SQLite - /// assumes that the text or BLOB result is in constant space and does not - /// copy the content of the parameter nor call a destructor on the content - /// when it has finished using that result. - /// ^If the 4th parameter to the sqlite3_result_text* interfaces - /// or sqlite3_result_blob is the special constant SQLITE_TRANSIENT - /// then SQLite makes a copy of the result into space obtained - /// from [sqlite3_malloc()] before it returns. - /// - /// ^For the sqlite3_result_text16(), sqlite3_result_text16le(), and - /// sqlite3_result_text16be() routines, and for sqlite3_result_text64() - /// when the encoding is not UTF8, if the input UTF16 begins with a - /// byte-order mark (BOM, U+FEFF) then the BOM is removed from the - /// string and the rest of the string is interpreted according to the - /// byte-order specified by the BOM. ^The byte-order specified by - /// the BOM at the beginning of the text overrides the byte-order - /// specified by the interface procedure. ^So, for example, if - /// sqlite3_result_text16le() is invoked with text that begins - /// with bytes 0xfe, 0xff (a big-endian byte-order mark) then the - /// first two bytes of input are skipped and the remaining input - /// is interpreted as UTF16BE text. - /// - /// ^For UTF16 input text to the sqlite3_result_text16(), - /// sqlite3_result_text16be(), sqlite3_result_text16le(), and - /// sqlite3_result_text64() routines, if the text contains invalid - /// UTF16 characters, the invalid characters might be converted - /// into the unicode replacement character, U+FFFD. - /// - /// ^The sqlite3_result_value() interface sets the result of - /// the application-defined function to be a copy of the - /// [unprotected sqlite3_value] object specified by the 2nd parameter. ^The - /// sqlite3_result_value() interface makes a copy of the [sqlite3_value] - /// so that the [sqlite3_value] specified in the parameter may change or - /// be deallocated after sqlite3_result_value() returns without harm. - /// ^A [protected sqlite3_value] object may always be used where an - /// [unprotected sqlite3_value] object is required, so either - /// kind of [sqlite3_value] object can be used with this interface. - /// - /// ^The sqlite3_result_pointer(C,P,T,D) interface sets the result to an - /// SQL NULL value, just like [sqlite3_result_null(C)], except that it - /// also associates the host-language pointer P or type T with that - /// NULL value such that the pointer can be retrieved within an - /// [application-defined SQL function] using [sqlite3_value_pointer()]. - /// ^If the D parameter is not NULL, then it is a pointer to a destructor - /// for the P parameter. ^SQLite invokes D with P as its only argument - /// when SQLite is finished with P. The T parameter should be a static - /// string and preferably a string literal. The sqlite3_result_pointer() - /// routine is part of the [pointer passing interface] added for SQLite 3.20.0. - /// - /// If these routines are called from within the different thread - /// than the one containing the application-defined function that received - /// the [sqlite3_context] pointer, the results are undefined. - void sqlite3_result_blob( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, - ffi.Pointer)>> - arg3, - ) { - return _sqlite3_result_blob(arg0, arg1, arg2, arg3); - } - - late final _sqlite3_result_blobPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - > - >('sqlite3_result_blob'); - late final _sqlite3_result_blob = _sqlite3_result_blobPtr - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - >(); - - void sqlite3_result_blob64( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, - ffi.Pointer)>> - arg3, - ) { - return _sqlite3_result_blob64(arg0, arg1, arg2, arg3); - } - - late final _sqlite3_result_blob64Ptr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - sqlite3_uint64, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - > - >('sqlite3_result_blob64'); - late final _sqlite3_result_blob64 = _sqlite3_result_blob64Ptr - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - >(); - - void sqlite3_result_double(ffi.Pointer arg0, double arg1) { - return _sqlite3_result_double(arg0, arg1); - } - - late final _sqlite3_result_doublePtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Double) - > - >('sqlite3_result_double'); - late final _sqlite3_result_double = _sqlite3_result_doublePtr - .asFunction, double)>(); - - void sqlite3_result_error( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, - ) { - return _sqlite3_result_error(arg0, arg1, arg2); - } - - late final _sqlite3_result_errorPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ) - > - >('sqlite3_result_error'); - late final _sqlite3_result_error = _sqlite3_result_errorPtr - .asFunction< - void Function(ffi.Pointer, ffi.Pointer, int) - >(); - - void sqlite3_result_error16( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, - ) { - return _sqlite3_result_error16(arg0, arg1, arg2); - } - - late final _sqlite3_result_error16Ptr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ) - > - >('sqlite3_result_error16'); - late final _sqlite3_result_error16 = _sqlite3_result_error16Ptr - .asFunction< - void Function(ffi.Pointer, ffi.Pointer, int) - >(); - - void sqlite3_result_error_code(ffi.Pointer arg0, int arg1) { - return _sqlite3_result_error_code(arg0, arg1); - } - - late final _sqlite3_result_error_codePtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Int) - > - >('sqlite3_result_error_code'); - late final _sqlite3_result_error_code = _sqlite3_result_error_codePtr - .asFunction, int)>(); - - void sqlite3_result_error_nomem(ffi.Pointer arg0) { - return _sqlite3_result_error_nomem(arg0); - } - - late final _sqlite3_result_error_nomemPtr = - _lookup< - ffi.NativeFunction)> - >('sqlite3_result_error_nomem'); - late final _sqlite3_result_error_nomem = _sqlite3_result_error_nomemPtr - .asFunction)>(); - - void sqlite3_result_error_toobig(ffi.Pointer arg0) { - return _sqlite3_result_error_toobig(arg0); - } - - late final _sqlite3_result_error_toobigPtr = - _lookup< - ffi.NativeFunction)> - >('sqlite3_result_error_toobig'); - late final _sqlite3_result_error_toobig = _sqlite3_result_error_toobigPtr - .asFunction)>(); - - void sqlite3_result_int(ffi.Pointer arg0, int arg1) { - return _sqlite3_result_int(arg0, arg1); - } - - late final _sqlite3_result_intPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Int) - > - >('sqlite3_result_int'); - late final _sqlite3_result_int = _sqlite3_result_intPtr - .asFunction, int)>(); - - void sqlite3_result_int64(ffi.Pointer arg0, int arg1) { - return _sqlite3_result_int64(arg0, arg1); - } - - late final _sqlite3_result_int64Ptr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, sqlite3_int64) - > - >('sqlite3_result_int64'); - late final _sqlite3_result_int64 = _sqlite3_result_int64Ptr - .asFunction, int)>(); - - void sqlite3_result_null(ffi.Pointer arg0) { - return _sqlite3_result_null(arg0); - } - - late final _sqlite3_result_nullPtr = - _lookup< - ffi.NativeFunction)> - >('sqlite3_result_null'); - late final _sqlite3_result_null = _sqlite3_result_nullPtr - .asFunction)>(); - - void sqlite3_result_pointer( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer)>> - arg3, - ) { - return _sqlite3_result_pointer(arg0, arg1, arg2, arg3); - } - - late final _sqlite3_result_pointerPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - > - >('sqlite3_result_pointer'); - late final _sqlite3_result_pointer = _sqlite3_result_pointerPtr - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - >(); - - /// CAPI3REF: Setting The Subtype Of An SQL Function - /// METHOD: sqlite3_context - /// - /// The sqlite3_result_subtype(C,T) function causes the subtype of - /// the result from the [application-defined SQL function] with - /// [sqlite3_context] C to be the value T. Only the lower 8 bits - /// of the subtype T are preserved in current versions of SQLite; - /// higher order bits are discarded. - /// The number of subtype bytes preserved by SQLite might increase - /// in future releases of SQLite. - void sqlite3_result_subtype(ffi.Pointer arg0, int arg1) { - return _sqlite3_result_subtype(arg0, arg1); - } - - late final _sqlite3_result_subtypePtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.UnsignedInt) - > - >('sqlite3_result_subtype'); - late final _sqlite3_result_subtype = _sqlite3_result_subtypePtr - .asFunction, int)>(); - - void sqlite3_result_text( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, - ffi.Pointer)>> - arg3, - ) { - return _sqlite3_result_text(arg0, arg1, arg2, arg3); - } - - late final _sqlite3_result_textPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - > - >('sqlite3_result_text'); - late final _sqlite3_result_text = _sqlite3_result_textPtr - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - >(); - - void sqlite3_result_text16( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, - ffi.Pointer)>> - arg3, - ) { - return _sqlite3_result_text16(arg0, arg1, arg2, arg3); - } - - late final _sqlite3_result_text16Ptr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - > - >('sqlite3_result_text16'); - late final _sqlite3_result_text16 = _sqlite3_result_text16Ptr - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - >(); - - void sqlite3_result_text16be( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, - ffi.Pointer)>> - arg3, - ) { - return _sqlite3_result_text16be(arg0, arg1, arg2, arg3); - } - - late final _sqlite3_result_text16bePtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - > - >('sqlite3_result_text16be'); - late final _sqlite3_result_text16be = _sqlite3_result_text16bePtr - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - >(); - - void sqlite3_result_text16le( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, - ffi.Pointer)>> - arg3, - ) { - return _sqlite3_result_text16le(arg0, arg1, arg2, arg3); - } - - late final _sqlite3_result_text16lePtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - > - >('sqlite3_result_text16le'); - late final _sqlite3_result_text16le = _sqlite3_result_text16lePtr - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - >(); - - void sqlite3_result_text64( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, - ffi.Pointer)>> - arg3, - int encoding, - ) { - return _sqlite3_result_text64(arg0, arg1, arg2, arg3, encoding); - } - - late final _sqlite3_result_text64Ptr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - sqlite3_uint64, - ffi.Pointer< - ffi.NativeFunction)> - >, - ffi.UnsignedChar, - ) - > - >('sqlite3_result_text64'); - late final _sqlite3_result_text64 = _sqlite3_result_text64Ptr - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer< - ffi.NativeFunction)> - >, - int, - ) - >(); - - void sqlite3_result_value( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - return _sqlite3_result_value(arg0, arg1); - } - - late final _sqlite3_result_valuePtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >('sqlite3_result_value'); - late final _sqlite3_result_value = _sqlite3_result_valuePtr - .asFunction< - void Function(ffi.Pointer, ffi.Pointer) - >(); - - void sqlite3_result_zeroblob(ffi.Pointer arg0, int n) { - return _sqlite3_result_zeroblob(arg0, n); - } - - late final _sqlite3_result_zeroblobPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Int) - > - >('sqlite3_result_zeroblob'); - late final _sqlite3_result_zeroblob = _sqlite3_result_zeroblobPtr - .asFunction, int)>(); - - int sqlite3_result_zeroblob64(ffi.Pointer arg0, int n) { - return _sqlite3_result_zeroblob64(arg0, n); - } - - late final _sqlite3_result_zeroblob64Ptr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, sqlite3_uint64) - > - >('sqlite3_result_zeroblob64'); - late final _sqlite3_result_zeroblob64 = _sqlite3_result_zeroblob64Ptr - .asFunction, int)>(); - - ffi.Pointer sqlite3_rollback_hook( - ffi.Pointer arg0, - ffi.Pointer)>> - arg1, - ffi.Pointer arg2, - ) { - return _sqlite3_rollback_hook(arg0, arg1, arg2); - } - - late final _sqlite3_rollback_hookPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction)> - >, - ffi.Pointer, - ) - > - >('sqlite3_rollback_hook'); - late final _sqlite3_rollback_hook = _sqlite3_rollback_hookPtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction)> - >, - ffi.Pointer, - ) - >(); - - /// Register a geometry callback named zGeom that can be used as part of an - /// R-Tree geometry query as follows: - /// - /// SELECT ... FROM WHERE MATCH $zGeom(... params ...) - int sqlite3_rtree_geometry_callback( - ffi.Pointer db, - ffi.Pointer zGeom, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ) - > - > - xGeom, - ffi.Pointer pContext, - ) { - return _sqlite3_rtree_geometry_callback(db, zGeom, xGeom, pContext); - } - - late final _sqlite3_rtree_geometry_callbackPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ) - > - >, - ffi.Pointer, - ) - > - >('sqlite3_rtree_geometry_callback'); - late final _sqlite3_rtree_geometry_callback = - _sqlite3_rtree_geometry_callbackPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ) - > - >, - ffi.Pointer, - ) - >(); - - /// Register a 2nd-generation geometry callback named zScore that can be - /// used as part of an R-Tree geometry query as follows: - /// - /// SELECT ... FROM WHERE MATCH $zQueryFunc(... params ...) - int sqlite3_rtree_query_callback( - ffi.Pointer db, - ffi.Pointer zQueryFunc, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer) - > - > - xQueryFunc, - ffi.Pointer pContext, - ffi.Pointer)>> - xDestructor, - ) { - return _sqlite3_rtree_query_callback( - db, - zQueryFunc, - xQueryFunc, - pContext, - xDestructor, - ); - } - - late final _sqlite3_rtree_query_callbackPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer) - > - >, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - > - >('sqlite3_rtree_query_callback'); - late final _sqlite3_rtree_query_callback = _sqlite3_rtree_query_callbackPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer) - > - >, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - >(); - - /// CAPI3REF: Serialize a database - /// - /// The sqlite3_serialize(D,S,P,F) interface returns a pointer to memory - /// that is a serialization of the S database on [database connection] D. - /// If P is not a NULL pointer, then the size of the database in bytes - /// is written into *P. - /// - /// For an ordinary on-disk database file, the serialization is just a - /// copy of the disk file. For an in-memory database or a "TEMP" database, - /// the serialization is the same sequence of bytes which would be written - /// to disk if that database where backed up to disk. - /// - /// The usual case is that sqlite3_serialize() copies the serialization of - /// the database into memory obtained from [sqlite3_malloc64()] and returns - /// a pointer to that memory. The caller is responsible for freeing the - /// returned value to avoid a memory leak. However, if the F argument - /// contains the SQLITE_SERIALIZE_NOCOPY bit, then no memory allocations - /// are made, and the sqlite3_serialize() function will return a pointer - /// to the contiguous memory representation of the database that SQLite - /// is currently using for that database, or NULL if the no such contiguous - /// memory representation of the database exists. A contiguous memory - /// representation of the database will usually only exist if there has - /// been a prior call to [sqlite3_deserialize(D,S,...)] with the same - /// values of D and S. - /// The size of the database is written into *P even if the - /// SQLITE_SERIALIZE_NOCOPY bit is set but no contiguous copy - /// of the database exists. - /// - /// A call to sqlite3_serialize(D,S,P,F) might return NULL even if the - /// SQLITE_SERIALIZE_NOCOPY bit is omitted from argument F if a memory - /// allocation error occurs. - /// - /// This interface is only available if SQLite is compiled with the - /// [SQLITE_ENABLE_DESERIALIZE] option. - ffi.Pointer sqlite3_serialize( - ffi.Pointer db, - ffi.Pointer zSchema, - ffi.Pointer piSize, - int mFlags, - ) { - return _sqlite3_serialize(db, zSchema, piSize, mFlags); - } - - late final _sqlite3_serializePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ) - > - >('sqlite3_serialize'); - late final _sqlite3_serialize = _sqlite3_serializePtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ) - >(); - - /// CAPI3REF: Compile-Time Authorization Callbacks - /// METHOD: sqlite3 - /// KEYWORDS: {authorizer callback} - /// - /// ^This routine registers an authorizer callback with a particular - /// [database connection], supplied in the first argument. - /// ^The authorizer callback is invoked as SQL statements are being compiled - /// by [sqlite3_prepare()] or its variants [sqlite3_prepare_v2()], - /// [sqlite3_prepare_v3()], [sqlite3_prepare16()], [sqlite3_prepare16_v2()], - /// and [sqlite3_prepare16_v3()]. ^At various - /// points during the compilation process, as logic is being created - /// to perform various actions, the authorizer callback is invoked to - /// see if those actions are allowed. ^The authorizer callback should - /// return [SQLITE_OK] to allow the action, [SQLITE_IGNORE] to disallow the - /// specific action but allow the SQL statement to continue to be - /// compiled, or [SQLITE_DENY] to cause the entire SQL statement to be - /// rejected with an error. ^If the authorizer callback returns - /// any value other than [SQLITE_IGNORE], [SQLITE_OK], or [SQLITE_DENY] - /// then the [sqlite3_prepare_v2()] or equivalent call that triggered - /// the authorizer will fail with an error message. - /// - /// When the callback returns [SQLITE_OK], that means the operation - /// requested is ok. ^When the callback returns [SQLITE_DENY], the - /// [sqlite3_prepare_v2()] or equivalent call that triggered the - /// authorizer will fail with an error message explaining that - /// access is denied. - /// - /// ^The first parameter to the authorizer callback is a copy of the third - /// parameter to the sqlite3_set_authorizer() interface. ^The second parameter - /// to the callback is an integer [SQLITE_COPY | action code] that specifies - /// the particular action to be authorized. ^The third through sixth parameters - /// to the callback are either NULL pointers or zero-terminated strings - /// that contain additional details about the action to be authorized. - /// Applications must always be prepared to encounter a NULL pointer in any - /// of the third through the sixth parameters of the authorization callback. - /// - /// ^If the action code is [SQLITE_READ] - /// and the callback returns [SQLITE_IGNORE] then the - /// [prepared statement] statement is constructed to substitute - /// a NULL value in place of the table column that would have - /// been read if [SQLITE_OK] had been returned. The [SQLITE_IGNORE] - /// return can be used to deny an untrusted user access to individual - /// columns of a table. - /// ^When a table is referenced by a [SELECT] but no column values are - /// extracted from that table (for example in a query like - /// "SELECT count(*) FROM tab") then the [SQLITE_READ] authorizer callback - /// is invoked once for that table with a column name that is an empty string. - /// ^If the action code is [SQLITE_DELETE] and the callback returns - /// [SQLITE_IGNORE] then the [DELETE] operation proceeds but the - /// [truncate optimization] is disabled and all rows are deleted individually. - /// - /// An authorizer is used when [sqlite3_prepare | preparing] - /// SQL statements from an untrusted source, to ensure that the SQL statements - /// do not try to access data they are not allowed to see, or that they do not - /// try to execute malicious statements that damage the database. For - /// example, an application may allow a user to enter arbitrary - /// SQL queries for evaluation by a database. But the application does - /// not want the user to be able to make arbitrary changes to the - /// database. An authorizer could then be put in place while the - /// user-entered SQL is being [sqlite3_prepare | prepared] that - /// disallows everything except [SELECT] statements. - /// - /// Applications that need to process SQL from untrusted sources - /// might also consider lowering resource limits using [sqlite3_limit()] - /// and limiting database size using the [max_page_count] [PRAGMA] - /// in addition to using an authorizer. - /// - /// ^(Only a single authorizer can be in place on a database connection - /// at a time. Each call to sqlite3_set_authorizer overrides the - /// previous call.)^ ^Disable the authorizer by installing a NULL callback. - /// The authorizer is disabled by default. - /// - /// The authorizer callback must not do anything that will modify - /// the database connection that invoked the authorizer callback. - /// Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their - /// database connections for the meaning of "modify" in this paragraph. - /// - /// ^When [sqlite3_prepare_v2()] is used to prepare a statement, the - /// statement might be re-prepared during [sqlite3_step()] due to a - /// schema change. Hence, the application should ensure that the - /// correct authorizer callback remains in place during the [sqlite3_step()]. - /// - /// ^Note that the authorizer callback is invoked only during - /// [sqlite3_prepare()] or its variants. Authorization is not - /// performed during statement evaluation in [sqlite3_step()], unless - /// as stated in the previous paragraph, sqlite3_step() invokes - /// sqlite3_prepare_v2() to reprepare a statement after a schema change. - int sqlite3_set_authorizer( - ffi.Pointer arg0, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - > - xAuth, - ffi.Pointer pUserData, - ) { - return _sqlite3_set_authorizer(arg0, xAuth, pUserData); - } - - late final _sqlite3_set_authorizerPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >, - ffi.Pointer, - ) - > - >('sqlite3_set_authorizer'); - late final _sqlite3_set_authorizer = _sqlite3_set_authorizerPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >, - ffi.Pointer, - ) - >(); - - void sqlite3_set_auxdata( - ffi.Pointer arg0, - int N, - ffi.Pointer arg2, - ffi.Pointer)>> - arg3, - ) { - return _sqlite3_set_auxdata(arg0, N, arg2, arg3); - } - - late final _sqlite3_set_auxdataPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - > - >('sqlite3_set_auxdata'); - late final _sqlite3_set_auxdata = _sqlite3_set_auxdataPtr - .asFunction< - void Function( - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - >(); - - /// CAPI3REF: Set the Last Insert Rowid value. - /// METHOD: sqlite3 - /// - /// The sqlite3_set_last_insert_rowid(D, R) method allows the application to - /// set the value returned by calling sqlite3_last_insert_rowid(D) to R - /// without inserting a row into the database. - void sqlite3_set_last_insert_rowid(ffi.Pointer arg0, int arg1) { - return _sqlite3_set_last_insert_rowid(arg0, arg1); - } - - late final _sqlite3_set_last_insert_rowidPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, sqlite3_int64) - > - >('sqlite3_set_last_insert_rowid'); - late final _sqlite3_set_last_insert_rowid = _sqlite3_set_last_insert_rowidPtr - .asFunction, int)>(); - - int sqlite3_shutdown() { - return _sqlite3_shutdown(); - } - - late final _sqlite3_shutdownPtr = - _lookup>('sqlite3_shutdown'); - late final _sqlite3_shutdown = _sqlite3_shutdownPtr - .asFunction(); - - /// CAPI3REF: Suspend Execution For A Short Time - /// - /// The sqlite3_sleep() function causes the current thread to suspend execution - /// for at least a number of milliseconds specified in its parameter. - /// - /// If the operating system does not support sleep requests with - /// millisecond time resolution, then the time will be rounded up to - /// the nearest second. The number of milliseconds of sleep actually - /// requested from the operating system is returned. - /// - /// ^SQLite implements this interface by calling the xSleep() - /// method of the default [sqlite3_vfs] object. If the xSleep() method - /// of the default VFS is not implemented correctly, or not implemented at - /// all, then the behavior of sqlite3_sleep() may deviate from the description - /// in the previous paragraphs. - int sqlite3_sleep(int arg0) { - return _sqlite3_sleep(arg0); - } - - late final _sqlite3_sleepPtr = - _lookup>('sqlite3_sleep'); - late final _sqlite3_sleep = _sqlite3_sleepPtr.asFunction(); - - /// CAPI3REF: Compare the ages of two snapshot handles. - /// METHOD: sqlite3_snapshot - /// - /// The sqlite3_snapshot_cmp(P1, P2) interface is used to compare the ages - /// of two valid snapshot handles. - /// - /// If the two snapshot handles are not associated with the same database - /// file, the result of the comparison is undefined. - /// - /// Additionally, the result of the comparison is only valid if both of the - /// snapshot handles were obtained by calling sqlite3_snapshot_get() since the - /// last time the wal file was deleted. The wal file is deleted when the - /// database is changed back to rollback mode or when the number of database - /// clients drops to zero. If either snapshot handle was obtained before the - /// wal file was last deleted, the value returned by this function - /// is undefined. - /// - /// Otherwise, this API returns a negative value if P1 refers to an older - /// snapshot than P2, zero if the two handles refer to the same database - /// snapshot, and a positive value if P1 is a newer snapshot than P2. - /// - /// This interface is only available if SQLite is compiled with the - /// [SQLITE_ENABLE_SNAPSHOT] option. - int sqlite3_snapshot_cmp( - ffi.Pointer p1, - ffi.Pointer p2, - ) { - return _sqlite3_snapshot_cmp(p1, p2); - } - - late final _sqlite3_snapshot_cmpPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >('sqlite3_snapshot_cmp'); - late final _sqlite3_snapshot_cmp = _sqlite3_snapshot_cmpPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); - - /// CAPI3REF: Destroy a snapshot - /// DESTRUCTOR: sqlite3_snapshot - /// - /// ^The [sqlite3_snapshot_free(P)] interface destroys [sqlite3_snapshot] P. - /// The application must eventually free every [sqlite3_snapshot] object - /// using this routine to avoid a memory leak. - /// - /// The [sqlite3_snapshot_free()] interface is only available when the - /// [SQLITE_ENABLE_SNAPSHOT] compile-time option is used. - void sqlite3_snapshot_free(ffi.Pointer arg0) { - return _sqlite3_snapshot_free(arg0); - } - - late final _sqlite3_snapshot_freePtr = - _lookup< - ffi.NativeFunction)> - >('sqlite3_snapshot_free'); - late final _sqlite3_snapshot_free = _sqlite3_snapshot_freePtr - .asFunction)>(); - - /// CAPI3REF: Record A Database Snapshot - /// CONSTRUCTOR: sqlite3_snapshot - /// - /// ^The [sqlite3_snapshot_get(D,S,P)] interface attempts to make a - /// new [sqlite3_snapshot] object that records the current state of - /// schema S in database connection D. ^On success, the - /// [sqlite3_snapshot_get(D,S,P)] interface writes a pointer to the newly - /// created [sqlite3_snapshot] object into *P and returns SQLITE_OK. - /// If there is not already a read-transaction open on schema S when - /// this function is called, one is opened automatically. - /// - /// The following must be true for this function to succeed. If any of - /// the following statements are false when sqlite3_snapshot_get() is - /// called, SQLITE_ERROR is returned. The final value of *P is undefined - /// in this case. - /// - ///

    - ///
  • The database handle must not be in [autocommit mode]. - /// - ///
  • Schema S of [database connection] D must be a [WAL mode] database. - /// - ///
  • There must not be a write transaction open on schema S of database - /// connection D. - /// - ///
  • One or more transactions must have been written to the current wal - /// file since it was created on disk (by any connection). This means - /// that a snapshot cannot be taken on a wal mode database with no wal - /// file immediately after it is first opened. At least one transaction - /// must be written to it first. - ///
- /// - /// This function may also return SQLITE_NOMEM. If it is called with the - /// database handle in autocommit mode but fails for some other reason, - /// whether or not a read transaction is opened on schema S is undefined. - /// - /// The [sqlite3_snapshot] object returned from a successful call to - /// [sqlite3_snapshot_get()] must be freed using [sqlite3_snapshot_free()] - /// to avoid a memory leak. - /// - /// The [sqlite3_snapshot_get()] interface is only available when the - /// [SQLITE_ENABLE_SNAPSHOT] compile-time option is used. - int sqlite3_snapshot_get( - ffi.Pointer db, - ffi.Pointer zSchema, - ffi.Pointer> ppSnapshot, - ) { - return _sqlite3_snapshot_get(db, zSchema, ppSnapshot); - } - - late final _sqlite3_snapshot_getPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ) - > - >('sqlite3_snapshot_get'); - late final _sqlite3_snapshot_get = _sqlite3_snapshot_getPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ) - >(); - - /// CAPI3REF: Start a read transaction on an historical snapshot - /// METHOD: sqlite3_snapshot - /// - /// ^The [sqlite3_snapshot_open(D,S,P)] interface either starts a new read - /// transaction or upgrades an existing one for schema S of - /// [database connection] D such that the read transaction refers to - /// historical [snapshot] P, rather than the most recent change to the - /// database. ^The [sqlite3_snapshot_open()] interface returns SQLITE_OK - /// on success or an appropriate [error code] if it fails. - /// - /// ^In order to succeed, the database connection must not be in - /// [autocommit mode] when [sqlite3_snapshot_open(D,S,P)] is called. If there - /// is already a read transaction open on schema S, then the database handle - /// must have no active statements (SELECT statements that have been passed - /// to sqlite3_step() but not sqlite3_reset() or sqlite3_finalize()). - /// SQLITE_ERROR is returned if either of these conditions is violated, or - /// if schema S does not exist, or if the snapshot object is invalid. - /// - /// ^A call to sqlite3_snapshot_open() will fail to open if the specified - /// snapshot has been overwritten by a [checkpoint]. In this case - /// SQLITE_ERROR_SNAPSHOT is returned. - /// - /// If there is already a read transaction open when this function is - /// invoked, then the same read transaction remains open (on the same - /// database snapshot) if SQLITE_ERROR, SQLITE_BUSY or SQLITE_ERROR_SNAPSHOT - /// is returned. If another error code - for example SQLITE_PROTOCOL or an - /// SQLITE_IOERR error code - is returned, then the final state of the - /// read transaction is undefined. If SQLITE_OK is returned, then the - /// read transaction is now open on database snapshot P. - /// - /// ^(A call to [sqlite3_snapshot_open(D,S,P)] will fail if the - /// database connection D does not know that the database file for - /// schema S is in [WAL mode]. A database connection might not know - /// that the database file is in [WAL mode] if there has been no prior - /// I/O on that database connection, or if the database entered [WAL mode] - /// after the most recent I/O on the database connection.)^ - /// (Hint: Run "[PRAGMA application_id]" against a newly opened - /// database connection in order to make it ready to use snapshots.) - /// - /// The [sqlite3_snapshot_open()] interface is only available when the - /// [SQLITE_ENABLE_SNAPSHOT] compile-time option is used. - int sqlite3_snapshot_open( - ffi.Pointer db, - ffi.Pointer zSchema, - ffi.Pointer pSnapshot, - ) { - return _sqlite3_snapshot_open(db, zSchema, pSnapshot); - } - - late final _sqlite3_snapshot_openPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >('sqlite3_snapshot_open'); - late final _sqlite3_snapshot_open = _sqlite3_snapshot_openPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); - - /// CAPI3REF: Recover snapshots from a wal file - /// METHOD: sqlite3_snapshot - /// - /// If a [WAL file] remains on disk after all database connections close - /// (either through the use of the [SQLITE_FCNTL_PERSIST_WAL] [file control] - /// or because the last process to have the database opened exited without - /// calling [sqlite3_close()]) and a new connection is subsequently opened - /// on that database and [WAL file], the [sqlite3_snapshot_open()] interface - /// will only be able to open the last transaction added to the WAL file - /// even though the WAL file contains other valid transactions. - /// - /// This function attempts to scan the WAL file associated with database zDb - /// of database handle db and make all valid snapshots available to - /// sqlite3_snapshot_open(). It is an error if there is already a read - /// transaction open on the database, or if the database is not a WAL mode - /// database. - /// - /// SQLITE_OK is returned if successful, or an SQLite error code otherwise. - /// - /// This interface is only available if SQLite is compiled with the - /// [SQLITE_ENABLE_SNAPSHOT] option. - int sqlite3_snapshot_recover( - ffi.Pointer db, - ffi.Pointer zDb, - ) { - return _sqlite3_snapshot_recover(db, zDb); - } - - late final _sqlite3_snapshot_recoverPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer) - > - >('sqlite3_snapshot_recover'); - late final _sqlite3_snapshot_recover = _sqlite3_snapshot_recoverPtr - .asFunction, ffi.Pointer)>(); - - ffi.Pointer sqlite3_snprintf( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ) { - return _sqlite3_snprintf(arg0, arg1, arg2); - } - - late final _sqlite3_snprintfPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ) - > - >('sqlite3_snprintf'); - late final _sqlite3_snprintf = _sqlite3_snprintfPtr - .asFunction< - ffi.Pointer Function( - int, - ffi.Pointer, - ffi.Pointer, - ) - >(); - - /// CAPI3REF: Deprecated Soft Heap Limit Interface - /// DEPRECATED - /// - /// This is a deprecated version of the [sqlite3_soft_heap_limit64()] - /// interface. This routine is provided for historical compatibility - /// only. All new applications should use the - /// [sqlite3_soft_heap_limit64()] interface rather than this one. - void sqlite3_soft_heap_limit(int N) { - return _sqlite3_soft_heap_limit(N); - } - - late final _sqlite3_soft_heap_limitPtr = - _lookup>( - 'sqlite3_soft_heap_limit', - ); - late final _sqlite3_soft_heap_limit = _sqlite3_soft_heap_limitPtr - .asFunction(); - - /// CAPI3REF: Impose A Limit On Heap Size - /// - /// These interfaces impose limits on the amount of heap memory that will be - /// by all database connections within a single process. - /// - /// ^The sqlite3_soft_heap_limit64() interface sets and/or queries the - /// soft limit on the amount of heap memory that may be allocated by SQLite. - /// ^SQLite strives to keep heap memory utilization below the soft heap - /// limit by reducing the number of pages held in the page cache - /// as heap memory usages approaches the limit. - /// ^The soft heap limit is "soft" because even though SQLite strives to stay - /// below the limit, it will exceed the limit rather than generate - /// an [SQLITE_NOMEM] error. In other words, the soft heap limit - /// is advisory only. - /// - /// ^The sqlite3_hard_heap_limit64(N) interface sets a hard upper bound of - /// N bytes on the amount of memory that will be allocated. ^The - /// sqlite3_hard_heap_limit64(N) interface is similar to - /// sqlite3_soft_heap_limit64(N) except that memory allocations will fail - /// when the hard heap limit is reached. - /// - /// ^The return value from both sqlite3_soft_heap_limit64() and - /// sqlite3_hard_heap_limit64() is the size of - /// the heap limit prior to the call, or negative in the case of an - /// error. ^If the argument N is negative - /// then no change is made to the heap limit. Hence, the current - /// size of heap limits can be determined by invoking - /// sqlite3_soft_heap_limit64(-1) or sqlite3_hard_heap_limit(-1). - /// - /// ^Setting the heap limits to zero disables the heap limiter mechanism. - /// - /// ^The soft heap limit may not be greater than the hard heap limit. - /// ^If the hard heap limit is enabled and if sqlite3_soft_heap_limit(N) - /// is invoked with a value of N that is greater than the hard heap limit, - /// the the soft heap limit is set to the value of the hard heap limit. - /// ^The soft heap limit is automatically enabled whenever the hard heap - /// limit is enabled. ^When sqlite3_hard_heap_limit64(N) is invoked and - /// the soft heap limit is outside the range of 1..N, then the soft heap - /// limit is set to N. ^Invoking sqlite3_soft_heap_limit64(0) when the - /// hard heap limit is enabled makes the soft heap limit equal to the - /// hard heap limit. - /// - /// The memory allocation limits can also be adjusted using - /// [PRAGMA soft_heap_limit] and [PRAGMA hard_heap_limit]. - /// - /// ^(The heap limits are not enforced in the current implementation - /// if one or more of following conditions are true: - /// - ///
    - ///
  • The limit value is set to zero. - ///
  • Memory accounting is disabled using a combination of the - /// [sqlite3_config]([SQLITE_CONFIG_MEMSTATUS],...) start-time option and - /// the [SQLITE_DEFAULT_MEMSTATUS] compile-time option. - ///
  • An alternative page cache implementation is specified using - /// [sqlite3_config]([SQLITE_CONFIG_PCACHE2],...). - ///
  • The page cache allocates from its own memory pool supplied - /// by [sqlite3_config]([SQLITE_CONFIG_PAGECACHE],...) rather than - /// from the heap. - ///
)^ - /// - /// The circumstances under which SQLite will enforce the heap limits may - /// changes in future releases of SQLite. - int sqlite3_soft_heap_limit64(int N) { - return _sqlite3_soft_heap_limit64(N); - } - - late final _sqlite3_soft_heap_limit64Ptr = - _lookup>( - 'sqlite3_soft_heap_limit64', - ); - late final _sqlite3_soft_heap_limit64 = _sqlite3_soft_heap_limit64Ptr - .asFunction(); - - ffi.Pointer sqlite3_sourceid() { - return _sqlite3_sourceid(); - } - - late final _sqlite3_sourceidPtr = - _lookup Function()>>( - 'sqlite3_sourceid', - ); - late final _sqlite3_sourceid = _sqlite3_sourceidPtr - .asFunction Function()>(); - - /// CAPI3REF: Retrieving Statement SQL - /// METHOD: sqlite3_stmt - /// - /// ^The sqlite3_sql(P) interface returns a pointer to a copy of the UTF-8 - /// SQL text used to create [prepared statement] P if P was - /// created by [sqlite3_prepare_v2()], [sqlite3_prepare_v3()], - /// [sqlite3_prepare16_v2()], or [sqlite3_prepare16_v3()]. - /// ^The sqlite3_expanded_sql(P) interface returns a pointer to a UTF-8 - /// string containing the SQL text of prepared statement P with - /// [bound parameters] expanded. - /// ^The sqlite3_normalized_sql(P) interface returns a pointer to a UTF-8 - /// string containing the normalized SQL text of prepared statement P. The - /// semantics used to normalize a SQL statement are unspecified and subject - /// to change. At a minimum, literal values will be replaced with suitable - /// placeholders. - /// - /// ^(For example, if a prepared statement is created using the SQL - /// text "SELECT $abc,:xyz" and if parameter $abc is bound to integer 2345 - /// and parameter :xyz is unbound, then sqlite3_sql() will return - /// the original string, "SELECT $abc,:xyz" but sqlite3_expanded_sql() - /// will return "SELECT 2345,NULL".)^ - /// - /// ^The sqlite3_expanded_sql() interface returns NULL if insufficient memory - /// is available to hold the result, or if the result would exceed the - /// the maximum string length determined by the [SQLITE_LIMIT_LENGTH]. - /// - /// ^The [SQLITE_TRACE_SIZE_LIMIT] compile-time option limits the size of - /// bound parameter expansions. ^The [SQLITE_OMIT_TRACE] compile-time - /// option causes sqlite3_expanded_sql() to always return NULL. - /// - /// ^The strings returned by sqlite3_sql(P) and sqlite3_normalized_sql(P) - /// are managed by SQLite and are automatically freed when the prepared - /// statement is finalized. - /// ^The string returned by sqlite3_expanded_sql(P), on the other hand, - /// is obtained from [sqlite3_malloc()] and must be free by the application - /// by passing it to [sqlite3_free()]. - ffi.Pointer sqlite3_sql(ffi.Pointer pStmt) { - return _sqlite3_sql(pStmt); - } - - late final _sqlite3_sqlPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('sqlite3_sql'); - late final _sqlite3_sql = _sqlite3_sqlPtr - .asFunction Function(ffi.Pointer)>(); - - /// CAPI3REF: SQLite Runtime Status - /// - /// ^These interfaces are used to retrieve runtime status information - /// about the performance of SQLite, and optionally to reset various - /// highwater marks. ^The first argument is an integer code for - /// the specific parameter to measure. ^(Recognized integer codes - /// are of the form [status parameters | SQLITE_STATUS_...].)^ - /// ^The current value of the parameter is returned into *pCurrent. - /// ^The highest recorded value is returned in *pHighwater. ^If the - /// resetFlag is true, then the highest record value is reset after - /// *pHighwater is written. ^(Some parameters do not record the highest - /// value. For those parameters - /// nothing is written into *pHighwater and the resetFlag is ignored.)^ - /// ^(Other parameters record only the highwater mark and not the current - /// value. For these latter parameters nothing is written into *pCurrent.)^ - /// - /// ^The sqlite3_status() and sqlite3_status64() routines return - /// SQLITE_OK on success and a non-zero [error code] on failure. - /// - /// If either the current value or the highwater mark is too large to - /// be represented by a 32-bit integer, then the values returned by - /// sqlite3_status() are undefined. - /// - /// See also: [sqlite3_db_status()] - int sqlite3_status( - int op, - ffi.Pointer pCurrent, - ffi.Pointer pHighwater, - int resetFlag, - ) { - return _sqlite3_status(op, pCurrent, pHighwater, resetFlag); - } - - late final _sqlite3_statusPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ) - > - >('sqlite3_status'); - late final _sqlite3_status = _sqlite3_statusPtr - .asFunction< - int Function(int, ffi.Pointer, ffi.Pointer, int) - >(); - - int sqlite3_status64( - int op, - ffi.Pointer pCurrent, - ffi.Pointer pHighwater, - int resetFlag, - ) { - return _sqlite3_status64(op, pCurrent, pHighwater, resetFlag); - } - - late final _sqlite3_status64Ptr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ) - > - >('sqlite3_status64'); - late final _sqlite3_status64 = _sqlite3_status64Ptr - .asFunction< - int Function( - int, - ffi.Pointer, - ffi.Pointer, - int, - ) - >(); - - /// CAPI3REF: Evaluate An SQL Statement - /// METHOD: sqlite3_stmt - /// - /// After a [prepared statement] has been prepared using any of - /// [sqlite3_prepare_v2()], [sqlite3_prepare_v3()], [sqlite3_prepare16_v2()], - /// or [sqlite3_prepare16_v3()] or one of the legacy - /// interfaces [sqlite3_prepare()] or [sqlite3_prepare16()], this function - /// must be called one or more times to evaluate the statement. - /// - /// The details of the behavior of the sqlite3_step() interface depend - /// on whether the statement was prepared using the newer "vX" interfaces - /// [sqlite3_prepare_v3()], [sqlite3_prepare_v2()], [sqlite3_prepare16_v3()], - /// [sqlite3_prepare16_v2()] or the older legacy - /// interfaces [sqlite3_prepare()] and [sqlite3_prepare16()]. The use of the - /// new "vX" interface is recommended for new applications but the legacy - /// interface will continue to be supported. - /// - /// ^In the legacy interface, the return value will be either [SQLITE_BUSY], - /// [SQLITE_DONE], [SQLITE_ROW], [SQLITE_ERROR], or [SQLITE_MISUSE]. - /// ^With the "v2" interface, any of the other [result codes] or - /// [extended result codes] might be returned as well. - /// - /// ^[SQLITE_BUSY] means that the database engine was unable to acquire the - /// database locks it needs to do its job. ^If the statement is a [COMMIT] - /// or occurs outside of an explicit transaction, then you can retry the - /// statement. If the statement is not a [COMMIT] and occurs within an - /// explicit transaction then you should rollback the transaction before - /// continuing. - /// - /// ^[SQLITE_DONE] means that the statement has finished executing - /// successfully. sqlite3_step() should not be called again on this virtual - /// machine without first calling [sqlite3_reset()] to reset the virtual - /// machine back to its initial state. - /// - /// ^If the SQL statement being executed returns any data, then [SQLITE_ROW] - /// is returned each time a new row of data is ready for processing by the - /// caller. The values may be accessed using the [column access functions]. - /// sqlite3_step() is called again to retrieve the next row of data. - /// - /// ^[SQLITE_ERROR] means that a run-time error (such as a constraint - /// violation) has occurred. sqlite3_step() should not be called again on - /// the VM. More information may be found by calling [sqlite3_errmsg()]. - /// ^With the legacy interface, a more specific error code (for example, - /// [SQLITE_INTERRUPT], [SQLITE_SCHEMA], [SQLITE_CORRUPT], and so forth) - /// can be obtained by calling [sqlite3_reset()] on the - /// [prepared statement]. ^In the "v2" interface, - /// the more specific error code is returned directly by sqlite3_step(). - /// - /// [SQLITE_MISUSE] means that the this routine was called inappropriately. - /// Perhaps it was called on a [prepared statement] that has - /// already been [sqlite3_finalize | finalized] or on one that had - /// previously returned [SQLITE_ERROR] or [SQLITE_DONE]. Or it could - /// be the case that the same database connection is being used by two or - /// more threads at the same moment in time. - /// - /// For all versions of SQLite up to and including 3.6.23.1, a call to - /// [sqlite3_reset()] was required after sqlite3_step() returned anything - /// other than [SQLITE_ROW] before any subsequent invocation of - /// sqlite3_step(). Failure to reset the prepared statement using - /// [sqlite3_reset()] would result in an [SQLITE_MISUSE] return from - /// sqlite3_step(). But after [version 3.6.23.1] ([dateof:3.6.23.1], - /// sqlite3_step() began - /// calling [sqlite3_reset()] automatically in this circumstance rather - /// than returning [SQLITE_MISUSE]. This is not considered a compatibility - /// break because any application that ever receives an SQLITE_MISUSE error - /// is broken by definition. The [SQLITE_OMIT_AUTORESET] compile-time option - /// can be used to restore the legacy behavior. - /// - /// Goofy Interface Alert: In the legacy interface, the sqlite3_step() - /// API always returns a generic error code, [SQLITE_ERROR], following any - /// error other than [SQLITE_BUSY] and [SQLITE_MISUSE]. You must call - /// [sqlite3_reset()] or [sqlite3_finalize()] in order to find one of the - /// specific [error codes] that better describes the error. - /// We admit that this is a goofy design. The problem has been fixed - /// with the "v2" interface. If you prepare all of your SQL statements - /// using [sqlite3_prepare_v3()] or [sqlite3_prepare_v2()] - /// or [sqlite3_prepare16_v2()] or [sqlite3_prepare16_v3()] instead - /// of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces, - /// then the more specific [error codes] are returned directly - /// by sqlite3_step(). The use of the "vX" interfaces is recommended. - int sqlite3_step(ffi.Pointer arg0) { - return _sqlite3_step(arg0); - } - - late final _sqlite3_stepPtr = - _lookup)>>( - 'sqlite3_step', - ); - late final _sqlite3_step = _sqlite3_stepPtr - .asFunction)>(); - - /// CAPI3REF: Determine If A Prepared Statement Has Been Reset - /// METHOD: sqlite3_stmt - /// - /// ^The sqlite3_stmt_busy(S) interface returns true (non-zero) if the - /// [prepared statement] S has been stepped at least once using - /// [sqlite3_step(S)] but has neither run to completion (returned - /// [SQLITE_DONE] from [sqlite3_step(S)]) nor - /// been reset using [sqlite3_reset(S)]. ^The sqlite3_stmt_busy(S) - /// interface returns false if S is a NULL pointer. If S is not a - /// NULL pointer and is not a pointer to a valid [prepared statement] - /// object, then the behavior is undefined and probably undesirable. - /// - /// This interface can be used in combination [sqlite3_next_stmt()] - /// to locate all prepared statements associated with a database - /// connection that are in need of being reset. This can be used, - /// for example, in diagnostic routines to search for prepared - /// statements that are holding a transaction open. - int sqlite3_stmt_busy(ffi.Pointer arg0) { - return _sqlite3_stmt_busy(arg0); - } - - late final _sqlite3_stmt_busyPtr = - _lookup)>>( - 'sqlite3_stmt_busy', - ); - late final _sqlite3_stmt_busy = _sqlite3_stmt_busyPtr - .asFunction)>(); - - /// CAPI3REF: Query The EXPLAIN Setting For A Prepared Statement - /// METHOD: sqlite3_stmt - /// - /// ^The sqlite3_stmt_isexplain(S) interface returns 1 if the - /// prepared statement S is an EXPLAIN statement, or 2 if the - /// statement S is an EXPLAIN QUERY PLAN. - /// ^The sqlite3_stmt_isexplain(S) interface returns 0 if S is - /// an ordinary statement or a NULL pointer. - int sqlite3_stmt_isexplain(ffi.Pointer pStmt) { - return _sqlite3_stmt_isexplain(pStmt); - } - - late final _sqlite3_stmt_isexplainPtr = - _lookup)>>( - 'sqlite3_stmt_isexplain', - ); - late final _sqlite3_stmt_isexplain = _sqlite3_stmt_isexplainPtr - .asFunction)>(); - - /// CAPI3REF: Determine If An SQL Statement Writes The Database - /// METHOD: sqlite3_stmt - /// - /// ^The sqlite3_stmt_readonly(X) interface returns true (non-zero) if - /// and only if the [prepared statement] X makes no direct changes to - /// the content of the database file. - /// - /// Note that [application-defined SQL functions] or - /// [virtual tables] might change the database indirectly as a side effect. - /// ^(For example, if an application defines a function "eval()" that - /// calls [sqlite3_exec()], then the following SQL statement would - /// change the database file through side-effects: - /// - ///
-  /// SELECT eval('DELETE FROM t1') FROM t2;
-  /// 
- /// - /// But because the [SELECT] statement does not change the database file - /// directly, sqlite3_stmt_readonly() would still return true.)^ - /// - /// ^Transaction control statements such as [BEGIN], [COMMIT], [ROLLBACK], - /// [SAVEPOINT], and [RELEASE] cause sqlite3_stmt_readonly() to return true, - /// since the statements themselves do not actually modify the database but - /// rather they control the timing of when other statements modify the - /// database. ^The [ATTACH] and [DETACH] statements also cause - /// sqlite3_stmt_readonly() to return true since, while those statements - /// change the configuration of a database connection, they do not make - /// changes to the content of the database files on disk. - /// ^The sqlite3_stmt_readonly() interface returns true for [BEGIN] since - /// [BEGIN] merely sets internal flags, but the [BEGIN|BEGIN IMMEDIATE] and - /// [BEGIN|BEGIN EXCLUSIVE] commands do touch the database and so - /// sqlite3_stmt_readonly() returns false for those commands. - int sqlite3_stmt_readonly(ffi.Pointer pStmt) { - return _sqlite3_stmt_readonly(pStmt); - } - - late final _sqlite3_stmt_readonlyPtr = - _lookup)>>( - 'sqlite3_stmt_readonly', - ); - late final _sqlite3_stmt_readonly = _sqlite3_stmt_readonlyPtr - .asFunction)>(); - - /// CAPI3REF: Prepared Statement Scan Status - /// METHOD: sqlite3_stmt - /// - /// This interface returns information about the predicted and measured - /// performance for pStmt. Advanced applications can use this - /// interface to compare the predicted and the measured performance and - /// issue warnings and/or rerun [ANALYZE] if discrepancies are found. - /// - /// Since this interface is expected to be rarely used, it is only - /// available if SQLite is compiled using the [SQLITE_ENABLE_STMT_SCANSTATUS] - /// compile-time option. - /// - /// The "iScanStatusOp" parameter determines which status information to return. - /// The "iScanStatusOp" must be one of the [scanstatus options] or the behavior - /// of this interface is undefined. - /// ^The requested measurement is written into a variable pointed to by - /// the "pOut" parameter. - /// Parameter "idx" identifies the specific loop to retrieve statistics for. - /// Loops are numbered starting from zero. ^If idx is out of range - less than - /// zero or greater than or equal to the total number of loops used to implement - /// the statement - a non-zero value is returned and the variable that pOut - /// points to is unchanged. - /// - /// ^Statistics might not be available for all loops in all statements. ^In cases - /// where there exist loops with no available statistics, this function behaves - /// as if the loop did not exist - it returns non-zero and leave the variable - /// that pOut points to unchanged. - /// - /// See also: [sqlite3_stmt_scanstatus_reset()] - int sqlite3_stmt_scanstatus( - ffi.Pointer pStmt, - int idx, - int iScanStatusOp, - ffi.Pointer pOut, - ) { - return _sqlite3_stmt_scanstatus(pStmt, idx, iScanStatusOp, pOut); - } - - late final _sqlite3_stmt_scanstatusPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Pointer, - ) - > - >('sqlite3_stmt_scanstatus'); - late final _sqlite3_stmt_scanstatus = _sqlite3_stmt_scanstatusPtr - .asFunction< - int Function(ffi.Pointer, int, int, ffi.Pointer) - >(); - - /// CAPI3REF: Zero Scan-Status Counters - /// METHOD: sqlite3_stmt - /// - /// ^Zero all [sqlite3_stmt_scanstatus()] related event counters. - /// - /// This API is only available if the library is built with pre-processor - /// symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined. - void sqlite3_stmt_scanstatus_reset(ffi.Pointer arg0) { - return _sqlite3_stmt_scanstatus_reset(arg0); - } - - late final _sqlite3_stmt_scanstatus_resetPtr = - _lookup)>>( - 'sqlite3_stmt_scanstatus_reset', - ); - late final _sqlite3_stmt_scanstatus_reset = _sqlite3_stmt_scanstatus_resetPtr - .asFunction)>(); - - /// CAPI3REF: Prepared Statement Status - /// METHOD: sqlite3_stmt - /// - /// ^(Each prepared statement maintains various - /// [SQLITE_STMTSTATUS counters] that measure the number - /// of times it has performed specific operations.)^ These counters can - /// be used to monitor the performance characteristics of the prepared - /// statements. For example, if the number of table steps greatly exceeds - /// the number of table searches or result rows, that would tend to indicate - /// that the prepared statement is using a full table scan rather than - /// an index. - /// - /// ^(This interface is used to retrieve and reset counter values from - /// a [prepared statement]. The first argument is the prepared statement - /// object to be interrogated. The second argument - /// is an integer code for a specific [SQLITE_STMTSTATUS counter] - /// to be interrogated.)^ - /// ^The current value of the requested counter is returned. - /// ^If the resetFlg is true, then the counter is reset to zero after this - /// interface call returns. - /// - /// See also: [sqlite3_status()] and [sqlite3_db_status()]. - int sqlite3_stmt_status( - ffi.Pointer arg0, - int op, - int resetFlg, - ) { - return _sqlite3_stmt_status(arg0, op, resetFlg); - } - - late final _sqlite3_stmt_statusPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Int) - > - >('sqlite3_stmt_status'); - late final _sqlite3_stmt_status = _sqlite3_stmt_statusPtr - .asFunction, int, int)>(); - - void sqlite3_str_append( - ffi.Pointer arg0, - ffi.Pointer zIn, - int N, - ) { - return _sqlite3_str_append(arg0, zIn, N); - } - - late final _sqlite3_str_appendPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ) - > - >('sqlite3_str_append'); - late final _sqlite3_str_append = _sqlite3_str_appendPtr - .asFunction< - void Function(ffi.Pointer, ffi.Pointer, int) - >(); - - void sqlite3_str_appendall( - ffi.Pointer arg0, - ffi.Pointer zIn, - ) { - return _sqlite3_str_appendall(arg0, zIn); - } - - late final _sqlite3_str_appendallPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer) - > - >('sqlite3_str_appendall'); - late final _sqlite3_str_appendall = _sqlite3_str_appendallPtr - .asFunction< - void Function(ffi.Pointer, ffi.Pointer) - >(); - - void sqlite3_str_appendchar(ffi.Pointer arg0, int N, int C) { - return _sqlite3_str_appendchar(arg0, N, C); - } - - late final _sqlite3_str_appendcharPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Int, ffi.Char) - > - >('sqlite3_str_appendchar'); - late final _sqlite3_str_appendchar = _sqlite3_str_appendcharPtr - .asFunction, int, int)>(); - - /// CAPI3REF: Add Content To A Dynamic String - /// METHOD: sqlite3_str - /// - /// These interfaces add content to an sqlite3_str object previously obtained - /// from [sqlite3_str_new()]. - /// - /// ^The [sqlite3_str_appendf(X,F,...)] and - /// [sqlite3_str_vappendf(X,F,V)] interfaces uses the [built-in printf] - /// functionality of SQLite to append formatted text onto the end of - /// [sqlite3_str] object X. - /// - /// ^The [sqlite3_str_append(X,S,N)] method appends exactly N bytes from string S - /// onto the end of the [sqlite3_str] object X. N must be non-negative. - /// S must contain at least N non-zero bytes of content. To append a - /// zero-terminated string in its entirety, use the [sqlite3_str_appendall()] - /// method instead. - /// - /// ^The [sqlite3_str_appendall(X,S)] method appends the complete content of - /// zero-terminated string S onto the end of [sqlite3_str] object X. - /// - /// ^The [sqlite3_str_appendchar(X,N,C)] method appends N copies of the - /// single-byte character C onto the end of [sqlite3_str] object X. - /// ^This method can be used, for example, to add whitespace indentation. - /// - /// ^The [sqlite3_str_reset(X)] method resets the string under construction - /// inside [sqlite3_str] object X back to zero bytes in length. - /// - /// These methods do not return a result code. ^If an error occurs, that fact - /// is recorded in the [sqlite3_str] object and can be recovered by a - /// subsequent call to [sqlite3_str_errcode(X)]. - void sqlite3_str_appendf( - ffi.Pointer arg0, - ffi.Pointer zFormat, - ) { - return _sqlite3_str_appendf(arg0, zFormat); - } - - late final _sqlite3_str_appendfPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer) - > - >('sqlite3_str_appendf'); - late final _sqlite3_str_appendf = _sqlite3_str_appendfPtr - .asFunction< - void Function(ffi.Pointer, ffi.Pointer) - >(); - - /// CAPI3REF: Status Of A Dynamic String - /// METHOD: sqlite3_str - /// - /// These interfaces return the current status of an [sqlite3_str] object. - /// - /// ^If any prior errors have occurred while constructing the dynamic string - /// in sqlite3_str X, then the [sqlite3_str_errcode(X)] method will return - /// an appropriate error code. ^The [sqlite3_str_errcode(X)] method returns - /// [SQLITE_NOMEM] following any out-of-memory error, or - /// [SQLITE_TOOBIG] if the size of the dynamic string exceeds - /// [SQLITE_MAX_LENGTH], or [SQLITE_OK] if there have been no errors. - /// - /// ^The [sqlite3_str_length(X)] method returns the current length, in bytes, - /// of the dynamic string under construction in [sqlite3_str] object X. - /// ^The length returned by [sqlite3_str_length(X)] does not include the - /// zero-termination byte. - /// - /// ^The [sqlite3_str_value(X)] method returns a pointer to the current - /// content of the dynamic string under construction in X. The value - /// returned by [sqlite3_str_value(X)] is managed by the sqlite3_str object X - /// and might be freed or altered by any subsequent method on the same - /// [sqlite3_str] object. Applications must not used the pointer returned - /// [sqlite3_str_value(X)] after any subsequent method call on the same - /// object. ^Applications may change the content of the string returned - /// by [sqlite3_str_value(X)] as long as they do not write into any bytes - /// outside the range of 0 to [sqlite3_str_length(X)] and do not read or - /// write any byte after any subsequent sqlite3_str method call. - int sqlite3_str_errcode(ffi.Pointer arg0) { - return _sqlite3_str_errcode(arg0); - } - - late final _sqlite3_str_errcodePtr = - _lookup)>>( - 'sqlite3_str_errcode', - ); - late final _sqlite3_str_errcode = _sqlite3_str_errcodePtr - .asFunction)>(); - - /// CAPI3REF: Finalize A Dynamic String - /// DESTRUCTOR: sqlite3_str - /// - /// ^The [sqlite3_str_finish(X)] interface destroys the sqlite3_str object X - /// and returns a pointer to a memory buffer obtained from [sqlite3_malloc64()] - /// that contains the constructed string. The calling application should - /// pass the returned value to [sqlite3_free()] to avoid a memory leak. - /// ^The [sqlite3_str_finish(X)] interface may return a NULL pointer if any - /// errors were encountered during construction of the string. ^The - /// [sqlite3_str_finish(X)] interface will also return a NULL pointer if the - /// string in [sqlite3_str] object X is zero bytes long. - ffi.Pointer sqlite3_str_finish(ffi.Pointer arg0) { - return _sqlite3_str_finish(arg0); - } - - late final _sqlite3_str_finishPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('sqlite3_str_finish'); - late final _sqlite3_str_finish = _sqlite3_str_finishPtr - .asFunction Function(ffi.Pointer)>(); - - int sqlite3_str_length(ffi.Pointer arg0) { - return _sqlite3_str_length(arg0); - } - - late final _sqlite3_str_lengthPtr = - _lookup)>>( - 'sqlite3_str_length', - ); - late final _sqlite3_str_length = _sqlite3_str_lengthPtr - .asFunction)>(); - - /// CAPI3REF: Create A New Dynamic String Object - /// CONSTRUCTOR: sqlite3_str - /// - /// ^The [sqlite3_str_new(D)] interface allocates and initializes - /// a new [sqlite3_str] object. To avoid memory leaks, the object returned by - /// [sqlite3_str_new()] must be freed by a subsequent call to - /// [sqlite3_str_finish(X)]. - /// - /// ^The [sqlite3_str_new(D)] interface always returns a pointer to a - /// valid [sqlite3_str] object, though in the event of an out-of-memory - /// error the returned object might be a special singleton that will - /// silently reject new text, always return SQLITE_NOMEM from - /// [sqlite3_str_errcode()], always return 0 for - /// [sqlite3_str_length()], and always return NULL from - /// [sqlite3_str_finish(X)]. It is always safe to use the value - /// returned by [sqlite3_str_new(D)] as the sqlite3_str parameter - /// to any of the other [sqlite3_str] methods. - /// - /// The D parameter to [sqlite3_str_new(D)] may be NULL. If the - /// D parameter in [sqlite3_str_new(D)] is not NULL, then the maximum - /// length of the string contained in the [sqlite3_str] object will be - /// the value set for [sqlite3_limit](D,[SQLITE_LIMIT_LENGTH]) instead - /// of [SQLITE_MAX_LENGTH]. - ffi.Pointer sqlite3_str_new(ffi.Pointer arg0) { - return _sqlite3_str_new(arg0); - } - - late final _sqlite3_str_newPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('sqlite3_str_new'); - late final _sqlite3_str_new = _sqlite3_str_newPtr - .asFunction Function(ffi.Pointer)>(); - - void sqlite3_str_reset(ffi.Pointer arg0) { - return _sqlite3_str_reset(arg0); - } - - late final _sqlite3_str_resetPtr = - _lookup)>>( - 'sqlite3_str_reset', - ); - late final _sqlite3_str_reset = _sqlite3_str_resetPtr - .asFunction)>(); - - ffi.Pointer sqlite3_str_value(ffi.Pointer arg0) { - return _sqlite3_str_value(arg0); - } - - late final _sqlite3_str_valuePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('sqlite3_str_value'); - late final _sqlite3_str_value = _sqlite3_str_valuePtr - .asFunction Function(ffi.Pointer)>(); - - /// CAPI3REF: String Globbing - /// - /// ^The [sqlite3_strglob(P,X)] interface returns zero if and only if - /// string X matches the [GLOB] pattern P. - /// ^The definition of [GLOB] pattern matching used in - /// [sqlite3_strglob(P,X)] is the same as for the "X GLOB P" operator in the - /// SQL dialect understood by SQLite. ^The [sqlite3_strglob(P,X)] function - /// is case sensitive. - /// - /// Note that this routine returns zero on a match and non-zero if the strings - /// do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()]. - /// - /// See also: [sqlite3_strlike()]. - int sqlite3_strglob(ffi.Pointer zGlob, ffi.Pointer zStr) { - return _sqlite3_strglob(zGlob, zStr); - } - - late final _sqlite3_strglobPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer) - > - >('sqlite3_strglob'); - late final _sqlite3_strglob = _sqlite3_strglobPtr - .asFunction, ffi.Pointer)>(); - - /// CAPI3REF: String Comparison - /// - /// ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications - /// and extensions to compare the contents of two buffers containing UTF-8 - /// strings in a case-independent fashion, using the same definition of "case - /// independence" that SQLite uses internally when comparing identifiers. - int sqlite3_stricmp(ffi.Pointer arg0, ffi.Pointer arg1) { - return _sqlite3_stricmp(arg0, arg1); - } - - late final _sqlite3_stricmpPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer) - > - >('sqlite3_stricmp'); - late final _sqlite3_stricmp = _sqlite3_stricmpPtr - .asFunction, ffi.Pointer)>(); - - /// CAPI3REF: String LIKE Matching - /// - /// ^The [sqlite3_strlike(P,X,E)] interface returns zero if and only if - /// string X matches the [LIKE] pattern P with escape character E. - /// ^The definition of [LIKE] pattern matching used in - /// [sqlite3_strlike(P,X,E)] is the same as for the "X LIKE P ESCAPE E" - /// operator in the SQL dialect understood by SQLite. ^For "X LIKE P" without - /// the ESCAPE clause, set the E parameter of [sqlite3_strlike(P,X,E)] to 0. - /// ^As with the LIKE operator, the [sqlite3_strlike(P,X,E)] function is case - /// insensitive - equivalent upper and lower case ASCII characters match - /// one another. - /// - /// ^The [sqlite3_strlike(P,X,E)] function matches Unicode characters, though - /// only ASCII characters are case folded. - /// - /// Note that this routine returns zero on a match and non-zero if the strings - /// do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()]. - /// - /// See also: [sqlite3_strglob()]. - int sqlite3_strlike( - ffi.Pointer zGlob, - ffi.Pointer zStr, - int cEsc, - ) { - return _sqlite3_strlike(zGlob, zStr, cEsc); - } - - late final _sqlite3_strlikePtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ) - > - >('sqlite3_strlike'); - late final _sqlite3_strlike = _sqlite3_strlikePtr - .asFunction< - int Function(ffi.Pointer, ffi.Pointer, int) - >(); - - int sqlite3_strnicmp( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, - ) { - return _sqlite3_strnicmp(arg0, arg1, arg2); - } - - late final _sqlite3_strnicmpPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ) - > - >('sqlite3_strnicmp'); - late final _sqlite3_strnicmp = _sqlite3_strnicmpPtr - .asFunction< - int Function(ffi.Pointer, ffi.Pointer, int) - >(); - - /// CAPI3REF: Low-level system error code - /// - /// ^Attempt to return the underlying operating system error code or error - /// number that caused the most recent I/O error or failure to open a file. - /// The return value is OS-dependent. For example, on unix systems, after - /// [sqlite3_open_v2()] returns [SQLITE_CANTOPEN], this interface could be - /// called to get back the underlying "errno" that caused the problem, such - /// as ENOSPC, EAUTH, EISDIR, and so forth. - int sqlite3_system_errno(ffi.Pointer arg0) { - return _sqlite3_system_errno(arg0); - } - - late final _sqlite3_system_errnoPtr = - _lookup)>>( - 'sqlite3_system_errno', - ); - late final _sqlite3_system_errno = _sqlite3_system_errnoPtr - .asFunction)>(); - - /// CAPI3REF: Extract Metadata About A Column Of A Table - /// METHOD: sqlite3 - /// - /// ^(The sqlite3_table_column_metadata(X,D,T,C,....) routine returns - /// information about column C of table T in database D - /// on [database connection] X.)^ ^The sqlite3_table_column_metadata() - /// interface returns SQLITE_OK and fills in the non-NULL pointers in - /// the final five arguments with appropriate values if the specified - /// column exists. ^The sqlite3_table_column_metadata() interface returns - /// SQLITE_ERROR if the specified column does not exist. - /// ^If the column-name parameter to sqlite3_table_column_metadata() is a - /// NULL pointer, then this routine simply checks for the existence of the - /// table and returns SQLITE_OK if the table exists and SQLITE_ERROR if it - /// does not. If the table name parameter T in a call to - /// sqlite3_table_column_metadata(X,D,T,C,...) is NULL then the result is - /// undefined behavior. - /// - /// ^The column is identified by the second, third and fourth parameters to - /// this function. ^(The second parameter is either the name of the database - /// (i.e. "main", "temp", or an attached database) containing the specified - /// table or NULL.)^ ^If it is NULL, then all attached databases are searched - /// for the table using the same algorithm used by the database engine to - /// resolve unqualified table references. - /// - /// ^The third and fourth parameters to this function are the table and column - /// name of the desired column, respectively. - /// - /// ^Metadata is returned by writing to the memory locations passed as the 5th - /// and subsequent parameters to this function. ^Any of these arguments may be - /// NULL, in which case the corresponding element of metadata is omitted. - /// - /// ^(
- /// - ///
Parameter Output
Type
Description - /// - ///
5th const char* Data type - ///
6th const char* Name of default collation sequence - ///
7th int True if column has a NOT NULL constraint - ///
8th int True if column is part of the PRIMARY KEY - ///
9th int True if column is [AUTOINCREMENT] - ///
- ///
)^ - /// - /// ^The memory pointed to by the character pointers returned for the - /// declaration type and collation sequence is valid until the next - /// call to any SQLite API function. - /// - /// ^If the specified table is actually a view, an [error code] is returned. - /// - /// ^If the specified column is "rowid", "oid" or "_rowid_" and the table - /// is not a [WITHOUT ROWID] table and an - /// [INTEGER PRIMARY KEY] column has been explicitly declared, then the output - /// parameters are set for the explicitly declared column. ^(If there is no - /// [INTEGER PRIMARY KEY] column, then the outputs - /// for the [rowid] are set as follows: - /// - ///
-  /// data type: "INTEGER"
-  /// collation sequence: "BINARY"
-  /// not null: 0
-  /// primary key: 1
-  /// auto increment: 0
-  /// 
)^ - /// - /// ^This function causes all database schemas to be read from disk and - /// parsed, if that has not already been done, and returns an error if - /// any errors are encountered while loading the schema. - int sqlite3_table_column_metadata( - ffi.Pointer db, - ffi.Pointer zDbName, - ffi.Pointer zTableName, - ffi.Pointer zColumnName, - ffi.Pointer> pzDataType, - ffi.Pointer> pzCollSeq, - ffi.Pointer pNotNull, - ffi.Pointer pPrimaryKey, - ffi.Pointer pAutoinc, - ) { - return _sqlite3_table_column_metadata( - db, - zDbName, - zTableName, - zColumnName, - pzDataType, - pzCollSeq, - pNotNull, - pPrimaryKey, - pAutoinc, - ); - } - - late final _sqlite3_table_column_metadataPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >('sqlite3_table_column_metadata'); - late final _sqlite3_table_column_metadata = _sqlite3_table_column_metadataPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); - - /// CAPI3REF: Name Of The Folder Holding Temporary Files - /// - /// ^(If this global variable is made to point to a string which is - /// the name of a folder (a.k.a. directory), then all temporary files - /// created by SQLite when using a built-in [sqlite3_vfs | VFS] - /// will be placed in that directory.)^ ^If this variable - /// is a NULL pointer, then SQLite performs a search for an appropriate - /// temporary file directory. - /// - /// Applications are strongly discouraged from using this global variable. - /// It is required to set a temporary folder on Windows Runtime (WinRT). - /// But for all other platforms, it is highly recommended that applications - /// neither read nor write this variable. This global variable is a relic - /// that exists for backwards compatibility of legacy applications and should - /// be avoided in new projects. - /// - /// It is not safe to read or modify this variable in more than one - /// thread at a time. It is not safe to read or modify this variable - /// if a [database connection] is being used at the same time in a separate - /// thread. - /// It is intended that this variable be set once - /// as part of process initialization and before any SQLite interface - /// routines have been called and that this variable remain unchanged - /// thereafter. - /// - /// ^The [temp_store_directory pragma] may modify this variable and cause - /// it to point to memory obtained from [sqlite3_malloc]. ^Furthermore, - /// the [temp_store_directory pragma] always assumes that any string - /// that this variable points to is held in memory obtained from - /// [sqlite3_malloc] and the pragma may attempt to free that memory - /// using [sqlite3_free]. - /// Hence, if this variable is modified directly, either it should be - /// made NULL or made to point to memory obtained from [sqlite3_malloc] - /// or else the use of the [temp_store_directory pragma] should be avoided. - /// Except when requested by the [temp_store_directory pragma], SQLite - /// does not free the memory that sqlite3_temp_directory points to. If - /// the application wants that memory to be freed, it must do - /// so itself, taking care to only do so after all [database connection] - /// objects have been destroyed. - /// - /// Note to Windows Runtime users: The temporary directory must be set - /// prior to calling [sqlite3_open] or [sqlite3_open_v2]. Otherwise, various - /// features that require the use of temporary files may fail. Here is an - /// example of how to do this using C++ with the Windows Runtime: - /// - ///
-  /// LPCWSTR zPath = Windows::Storage::ApplicationData::Current->
-  ///       TemporaryFolder->Path->Data();
-  /// char zPathBuf[MAX_PATH + 1];
-  /// memset(zPathBuf, 0, sizeof(zPathBuf));
-  /// WideCharToMultiByte(CP_UTF8, 0, zPath, -1, zPathBuf, sizeof(zPathBuf),
-  ///       NULL, NULL);
-  /// sqlite3_temp_directory = sqlite3_mprintf("%s", zPathBuf);
-  /// 
- late final ffi.Pointer> _sqlite3_temp_directory = - _lookup>('sqlite3_temp_directory'); - - ffi.Pointer get sqlite3_temp_directory => - _sqlite3_temp_directory.value; - - set sqlite3_temp_directory(ffi.Pointer value) => - _sqlite3_temp_directory.value = value; - - /// CAPI3REF: Testing Interface - /// - /// ^The sqlite3_test_control() interface is used to read out internal - /// state of SQLite and to inject faults into SQLite for testing - /// purposes. ^The first parameter is an operation code that determines - /// the number, meaning, and operation of all subsequent parameters. - /// - /// This interface is not for use by applications. It exists solely - /// for verifying the correct operation of the SQLite library. Depending - /// on how the SQLite library is compiled, this interface might not exist. - /// - /// The details of the operation codes, their meanings, the parameters - /// they take, and what they do are all subject to change without notice. - /// Unlike most of the SQLite API, this function is not guaranteed to - /// operate consistently from one release to the next. - int sqlite3_test_control(int op) { - return _sqlite3_test_control(op); - } - - late final _sqlite3_test_controlPtr = - _lookup>( - 'sqlite3_test_control', - ); - late final _sqlite3_test_control = _sqlite3_test_controlPtr - .asFunction(); - - void sqlite3_thread_cleanup() { - return _sqlite3_thread_cleanup(); - } - - late final _sqlite3_thread_cleanupPtr = - _lookup>( - 'sqlite3_thread_cleanup', - ); - late final _sqlite3_thread_cleanup = _sqlite3_thread_cleanupPtr - .asFunction(); - - /// CAPI3REF: Test To See If The Library Is Threadsafe - /// - /// ^The sqlite3_threadsafe() function returns zero if and only if - /// SQLite was compiled with mutexing code omitted due to the - /// [SQLITE_THREADSAFE] compile-time option being set to 0. - /// - /// SQLite can be compiled with or without mutexes. When - /// the [SQLITE_THREADSAFE] C preprocessor macro is 1 or 2, mutexes - /// are enabled and SQLite is threadsafe. When the - /// [SQLITE_THREADSAFE] macro is 0, - /// the mutexes are omitted. Without the mutexes, it is not safe - /// to use SQLite concurrently from more than one thread. - /// - /// Enabling mutexes incurs a measurable performance penalty. - /// So if speed is of utmost importance, it makes sense to disable - /// the mutexes. But for maximum safety, mutexes should be enabled. - /// ^The default behavior is for mutexes to be enabled. - /// - /// This interface can be used by an application to make sure that the - /// version of SQLite that it is linking against was compiled with - /// the desired setting of the [SQLITE_THREADSAFE] macro. - /// - /// This interface only reports on the compile-time mutex setting - /// of the [SQLITE_THREADSAFE] flag. If SQLite is compiled with - /// SQLITE_THREADSAFE=1 or =2 then mutexes are enabled by default but - /// can be fully or partially disabled using a call to [sqlite3_config()] - /// with the verbs [SQLITE_CONFIG_SINGLETHREAD], [SQLITE_CONFIG_MULTITHREAD], - /// or [SQLITE_CONFIG_SERIALIZED]. ^(The return value of the - /// sqlite3_threadsafe() function shows only the compile-time setting of - /// thread safety, not any run-time changes to that setting made by - /// sqlite3_config(). In other words, the return value from sqlite3_threadsafe() - /// is unchanged by calls to sqlite3_config().)^ - /// - /// See the [threading mode] documentation for additional information. - int sqlite3_threadsafe() { - return _sqlite3_threadsafe(); - } - - late final _sqlite3_threadsafePtr = - _lookup>('sqlite3_threadsafe'); - late final _sqlite3_threadsafe = _sqlite3_threadsafePtr - .asFunction(); - - /// CAPI3REF: Total Number Of Rows Modified - /// METHOD: sqlite3 - /// - /// ^This function returns the total number of rows inserted, modified or - /// deleted by all [INSERT], [UPDATE] or [DELETE] statements completed - /// since the database connection was opened, including those executed as - /// part of trigger programs. ^Executing any other type of SQL statement - /// does not affect the value returned by sqlite3_total_changes(). - /// - /// ^Changes made as part of [foreign key actions] are included in the - /// count, but those made as part of REPLACE constraint resolution are - /// not. ^Changes to a view that are intercepted by INSTEAD OF triggers - /// are not counted. - /// - /// The [sqlite3_total_changes(D)] interface only reports the number - /// of rows that changed due to SQL statement run against database - /// connection D. Any changes by other database connections are ignored. - /// To detect changes against a database file from other database - /// connections use the [PRAGMA data_version] command or the - /// [SQLITE_FCNTL_DATA_VERSION] [file control]. - /// - /// If a separate thread makes changes on the same database connection - /// while [sqlite3_total_changes()] is running then the value - /// returned is unpredictable and not meaningful. - /// - /// See also: - ///
    - ///
  • the [sqlite3_changes()] interface - ///
  • the [count_changes pragma] - ///
  • the [changes() SQL function] - ///
  • the [data_version pragma] - ///
  • the [SQLITE_FCNTL_DATA_VERSION] [file control] - ///
- int sqlite3_total_changes(ffi.Pointer arg0) { - return _sqlite3_total_changes(arg0); - } - - late final _sqlite3_total_changesPtr = - _lookup)>>( - 'sqlite3_total_changes', - ); - late final _sqlite3_total_changes = _sqlite3_total_changesPtr - .asFunction)>(); - - /// CAPI3REF: Tracing And Profiling Functions - /// METHOD: sqlite3 - /// - /// These routines are deprecated. Use the [sqlite3_trace_v2()] interface - /// instead of the routines described here. - /// - /// These routines register callback functions that can be used for - /// tracing and profiling the execution of SQL statements. - /// - /// ^The callback function registered by sqlite3_trace() is invoked at - /// various times when an SQL statement is being run by [sqlite3_step()]. - /// ^The sqlite3_trace() callback is invoked with a UTF-8 rendering of the - /// SQL statement text as the statement first begins executing. - /// ^(Additional sqlite3_trace() callbacks might occur - /// as each triggered subprogram is entered. The callbacks for triggers - /// contain a UTF-8 SQL comment that identifies the trigger.)^ - /// - /// The [SQLITE_TRACE_SIZE_LIMIT] compile-time option can be used to limit - /// the length of [bound parameter] expansion in the output of sqlite3_trace(). - /// - /// ^The callback function registered by sqlite3_profile() is invoked - /// as each SQL statement finishes. ^The profile callback contains - /// the original statement text and an estimate of wall-clock time - /// of how long that statement took to run. ^The profile callback - /// time is in units of nanoseconds, however the current implementation - /// is only capable of millisecond resolution so the six least significant - /// digits in the time are meaningless. Future versions of SQLite - /// might provide greater resolution on the profiler callback. Invoking - /// either [sqlite3_trace()] or [sqlite3_trace_v2()] will cancel the - /// profile callback. - ffi.Pointer sqlite3_trace( - ffi.Pointer arg0, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer) - > - > - xTrace, - ffi.Pointer arg2, - ) { - return _sqlite3_trace(arg0, xTrace, arg2); - } - - late final _sqlite3_tracePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer) - > - >, - ffi.Pointer, - ) - > - >('sqlite3_trace'); - late final _sqlite3_trace = _sqlite3_tracePtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer) - > - >, - ffi.Pointer, - ) - >(); - - /// CAPI3REF: SQL Trace Hook - /// METHOD: sqlite3 - /// - /// ^The sqlite3_trace_v2(D,M,X,P) interface registers a trace callback - /// function X against [database connection] D, using property mask M - /// and context pointer P. ^If the X callback is - /// NULL or if the M mask is zero, then tracing is disabled. The - /// M argument should be the bitwise OR-ed combination of - /// zero or more [SQLITE_TRACE] constants. - /// - /// ^Each call to either sqlite3_trace() or sqlite3_trace_v2() overrides - /// (cancels) any prior calls to sqlite3_trace() or sqlite3_trace_v2(). - /// - /// ^The X callback is invoked whenever any of the events identified by - /// mask M occur. ^The integer return value from the callback is currently - /// ignored, though this may change in future releases. Callback - /// implementations should return zero to ensure future compatibility. - /// - /// ^A trace callback is invoked with four arguments: callback(T,C,P,X). - /// ^The T argument is one of the [SQLITE_TRACE] - /// constants to indicate why the callback was invoked. - /// ^The C argument is a copy of the context pointer. - /// The P and X arguments are pointers whose meanings depend on T. - /// - /// The sqlite3_trace_v2() interface is intended to replace the legacy - /// interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which - /// are deprecated. - int sqlite3_trace_v2( - ffi.Pointer arg0, - int uMask, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.UnsignedInt, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - > - xCallback, - ffi.Pointer pCtx, - ) { - return _sqlite3_trace_v2(arg0, uMask, xCallback, pCtx); - } - - late final _sqlite3_trace_v2Ptr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.UnsignedInt, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.UnsignedInt, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >, - ffi.Pointer, - ) - > - >('sqlite3_trace_v2'); - late final _sqlite3_trace_v2 = _sqlite3_trace_v2Ptr - .asFunction< - int Function( - ffi.Pointer, - int, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.UnsignedInt, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >, - ffi.Pointer, - ) - >(); - - int sqlite3_transfer_bindings( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - return _sqlite3_transfer_bindings(arg0, arg1); - } - - late final _sqlite3_transfer_bindingsPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer) - > - >('sqlite3_transfer_bindings'); - late final _sqlite3_transfer_bindings = _sqlite3_transfer_bindingsPtr - .asFunction< - int Function(ffi.Pointer, ffi.Pointer) - >(); - - /// CAPI3REF: Unlock Notification - /// METHOD: sqlite3 - /// - /// ^When running in shared-cache mode, a database operation may fail with - /// an [SQLITE_LOCKED] error if the required locks on the shared-cache or - /// individual tables within the shared-cache cannot be obtained. See - /// [SQLite Shared-Cache Mode] for a description of shared-cache locking. - /// ^This API may be used to register a callback that SQLite will invoke - /// when the connection currently holding the required lock relinquishes it. - /// ^This API is only available if the library was compiled with the - /// [SQLITE_ENABLE_UNLOCK_NOTIFY] C-preprocessor symbol defined. - /// - /// See Also: [Using the SQLite Unlock Notification Feature]. - /// - /// ^Shared-cache locks are released when a database connection concludes - /// its current transaction, either by committing it or rolling it back. - /// - /// ^When a connection (known as the blocked connection) fails to obtain a - /// shared-cache lock and SQLITE_LOCKED is returned to the caller, the - /// identity of the database connection (the blocking connection) that - /// has locked the required resource is stored internally. ^After an - /// application receives an SQLITE_LOCKED error, it may call the - /// sqlite3_unlock_notify() method with the blocked connection handle as - /// the first argument to register for a callback that will be invoked - /// when the blocking connections current transaction is concluded. ^The - /// callback is invoked from within the [sqlite3_step] or [sqlite3_close] - /// call that concludes the blocking connection's transaction. - /// - /// ^(If sqlite3_unlock_notify() is called in a multi-threaded application, - /// there is a chance that the blocking connection will have already - /// concluded its transaction by the time sqlite3_unlock_notify() is invoked. - /// If this happens, then the specified callback is invoked immediately, - /// from within the call to sqlite3_unlock_notify().)^ - /// - /// ^If the blocked connection is attempting to obtain a write-lock on a - /// shared-cache table, and more than one other connection currently holds - /// a read-lock on the same table, then SQLite arbitrarily selects one of - /// the other connections to use as the blocking connection. - /// - /// ^(There may be at most one unlock-notify callback registered by a - /// blocked connection. If sqlite3_unlock_notify() is called when the - /// blocked connection already has a registered unlock-notify callback, - /// then the new callback replaces the old.)^ ^If sqlite3_unlock_notify() is - /// called with a NULL pointer as its second argument, then any existing - /// unlock-notify callback is canceled. ^The blocked connections - /// unlock-notify callback may also be canceled by closing the blocked - /// connection using [sqlite3_close()]. - /// - /// The unlock-notify callback is not reentrant. If an application invokes - /// any sqlite3_xxx API functions from within an unlock-notify callback, a - /// crash or deadlock may be the result. - /// - /// ^Unless deadlock is detected (see below), sqlite3_unlock_notify() always - /// returns SQLITE_OK. - /// - /// Callback Invocation Details - /// - /// When an unlock-notify callback is registered, the application provides a - /// single void* pointer that is passed to the callback when it is invoked. - /// However, the signature of the callback function allows SQLite to pass - /// it an array of void* context pointers. The first argument passed to - /// an unlock-notify callback is a pointer to an array of void* pointers, - /// and the second is the number of entries in the array. - /// - /// When a blocking connection's transaction is concluded, there may be - /// more than one blocked connection that has registered for an unlock-notify - /// callback. ^If two or more such blocked connections have specified the - /// same callback function, then instead of invoking the callback function - /// multiple times, it is invoked once with the set of void* context pointers - /// specified by the blocked connections bundled together into an array. - /// This gives the application an opportunity to prioritize any actions - /// related to the set of unblocked database connections. - /// - /// Deadlock Detection - /// - /// Assuming that after registering for an unlock-notify callback a - /// database waits for the callback to be issued before taking any further - /// action (a reasonable assumption), then using this API may cause the - /// application to deadlock. For example, if connection X is waiting for - /// connection Y's transaction to be concluded, and similarly connection - /// Y is waiting on connection X's transaction, then neither connection - /// will proceed and the system may remain deadlocked indefinitely. - /// - /// To avoid this scenario, the sqlite3_unlock_notify() performs deadlock - /// detection. ^If a given call to sqlite3_unlock_notify() would put the - /// system in a deadlocked state, then SQLITE_LOCKED is returned and no - /// unlock-notify callback is registered. The system is said to be in - /// a deadlocked state if connection A has registered for an unlock-notify - /// callback on the conclusion of connection B's transaction, and connection - /// B has itself registered for an unlock-notify callback when connection - /// A's transaction is concluded. ^Indirect deadlock is also detected, so - /// the system is also considered to be deadlocked if connection B has - /// registered for an unlock-notify callback on the conclusion of connection - /// C's transaction, where connection C is waiting on connection A. ^Any - /// number of levels of indirection are allowed. - /// - /// The "DROP TABLE" Exception - /// - /// When a call to [sqlite3_step()] returns SQLITE_LOCKED, it is almost - /// always appropriate to call sqlite3_unlock_notify(). There is however, - /// one exception. When executing a "DROP TABLE" or "DROP INDEX" statement, - /// SQLite checks if there are any currently executing SELECT statements - /// that belong to the same connection. If there are, SQLITE_LOCKED is - /// returned. In this case there is no "blocking connection", so invoking - /// sqlite3_unlock_notify() results in the unlock-notify callback being - /// invoked immediately. If the application then re-attempts the "DROP TABLE" - /// or "DROP INDEX" query, an infinite loop might be the result. - /// - /// One way around this problem is to check the extended error code returned - /// by an sqlite3_step() call. ^(If there is a blocking connection, then the - /// extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in - /// the special "DROP TABLE/INDEX" case, the extended error code is just - /// SQLITE_LOCKED.)^ - int sqlite3_unlock_notify( - ffi.Pointer pBlocked, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer> apArg, - ffi.Int nArg, - ) - > - > - xNotify, - ffi.Pointer pNotifyArg, - ) { - return _sqlite3_unlock_notify(pBlocked, xNotify, pNotifyArg); - } - - late final _sqlite3_unlock_notifyPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer> apArg, - ffi.Int nArg, - ) - > - >, - ffi.Pointer, - ) - > - >('sqlite3_unlock_notify'); - late final _sqlite3_unlock_notify = _sqlite3_unlock_notifyPtr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer> apArg, - ffi.Int nArg, - ) - > - >, - ffi.Pointer, - ) - >(); - - /// CAPI3REF: Data Change Notification Callbacks - /// METHOD: sqlite3 - /// - /// ^The sqlite3_update_hook() interface registers a callback function - /// with the [database connection] identified by the first argument - /// to be invoked whenever a row is updated, inserted or deleted in - /// a [rowid table]. - /// ^Any callback set by a previous call to this function - /// for the same database connection is overridden. - /// - /// ^The second argument is a pointer to the function to invoke when a - /// row is updated, inserted or deleted in a rowid table. - /// ^The first argument to the callback is a copy of the third argument - /// to sqlite3_update_hook(). - /// ^The second callback argument is one of [SQLITE_INSERT], [SQLITE_DELETE], - /// or [SQLITE_UPDATE], depending on the operation that caused the callback - /// to be invoked. - /// ^The third and fourth arguments to the callback contain pointers to the - /// database and table name containing the affected row. - /// ^The final callback parameter is the [rowid] of the row. - /// ^In the case of an update, this is the [rowid] after the update takes place. - /// - /// ^(The update hook is not invoked when internal system tables are - /// modified (i.e. sqlite_master and sqlite_sequence).)^ - /// ^The update hook is not invoked when [WITHOUT ROWID] tables are modified. - /// - /// ^In the current implementation, the update hook - /// is not invoked when conflicting rows are deleted because of an - /// [ON CONFLICT | ON CONFLICT REPLACE] clause. ^Nor is the update hook - /// invoked when rows are deleted using the [truncate optimization]. - /// The exceptions defined in this paragraph might change in a future - /// release of SQLite. - /// - /// The update hook implementation must not do anything that will modify - /// the database connection that invoked the update hook. Any actions - /// to modify the database connection must be deferred until after the - /// completion of the [sqlite3_step()] call that triggered the update hook. - /// Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their - /// database connections for the meaning of "modify" in this paragraph. - /// - /// ^The sqlite3_update_hook(D,C,P) function - /// returns the P argument from the previous call - /// on the same [database connection] D, or NULL for - /// the first call on D. - /// - /// See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()], - /// and [sqlite3_preupdate_hook()] interfaces. - ffi.Pointer sqlite3_update_hook( - ffi.Pointer arg0, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - sqlite3_int64, - ) - > - > - arg1, - ffi.Pointer arg2, - ) { - return _sqlite3_update_hook(arg0, arg1, arg2); - } - - late final _sqlite3_update_hookPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - sqlite3_int64, - ) - > - >, - ffi.Pointer, - ) - > - >('sqlite3_update_hook'); - late final _sqlite3_update_hook = _sqlite3_update_hookPtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - sqlite3_int64, - ) - > - >, - ffi.Pointer, - ) - >(); - - int sqlite3_uri_boolean( - ffi.Pointer zFile, - ffi.Pointer zParam, - int bDefault, - ) { - return _sqlite3_uri_boolean(zFile, zParam, bDefault); - } - - late final _sqlite3_uri_booleanPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ) - > - >('sqlite3_uri_boolean'); - late final _sqlite3_uri_boolean = _sqlite3_uri_booleanPtr - .asFunction< - int Function(ffi.Pointer, ffi.Pointer, int) - >(); - - int sqlite3_uri_int64( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, - ) { - return _sqlite3_uri_int64(arg0, arg1, arg2); - } - - late final _sqlite3_uri_int64Ptr = - _lookup< - ffi.NativeFunction< - sqlite3_int64 Function( - ffi.Pointer, - ffi.Pointer, - sqlite3_int64, - ) - > - >('sqlite3_uri_int64'); - late final _sqlite3_uri_int64 = _sqlite3_uri_int64Ptr - .asFunction< - int Function(ffi.Pointer, ffi.Pointer, int) - >(); - - ffi.Pointer sqlite3_uri_key( - ffi.Pointer zFilename, - int N, - ) { - return _sqlite3_uri_key(zFilename, N); - } - - late final _sqlite3_uri_keyPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Int) - > - >('sqlite3_uri_key'); - late final _sqlite3_uri_key = _sqlite3_uri_keyPtr - .asFunction Function(ffi.Pointer, int)>(); - - /// CAPI3REF: Obtain Values For URI Parameters - /// - /// These are utility routines, useful to [VFS|custom VFS implementations], - /// that check if a database file was a URI that contained a specific query - /// parameter, and if so obtains the value of that query parameter. - /// - /// The first parameter to these interfaces (hereafter referred to - /// as F) must be one of: - ///
    - ///
  • A database filename pointer created by the SQLite core and - /// passed into the xOpen() method of a VFS implemention, or - ///
  • A filename obtained from [sqlite3_db_filename()], or - ///
  • A new filename constructed using [sqlite3_create_filename()]. - ///
- /// If the F parameter is not one of the above, then the behavior is - /// undefined and probably undesirable. Older versions of SQLite were - /// more tolerant of invalid F parameters than newer versions. - /// - /// If F is a suitable filename (as described in the previous paragraph) - /// and if P is the name of the query parameter, then - /// sqlite3_uri_parameter(F,P) returns the value of the P - /// parameter if it exists or a NULL pointer if P does not appear as a - /// query parameter on F. If P is a query parameter of F and it - /// has no explicit value, then sqlite3_uri_parameter(F,P) returns - /// a pointer to an empty string. - /// - /// The sqlite3_uri_boolean(F,P,B) routine assumes that P is a boolean - /// parameter and returns true (1) or false (0) according to the value - /// of P. The sqlite3_uri_boolean(F,P,B) routine returns true (1) if the - /// value of query parameter P is one of "yes", "true", or "on" in any - /// case or if the value begins with a non-zero number. The - /// sqlite3_uri_boolean(F,P,B) routines returns false (0) if the value of - /// query parameter P is one of "no", "false", or "off" in any case or - /// if the value begins with a numeric zero. If P is not a query - /// parameter on F or if the value of P does not match any of the - /// above, then sqlite3_uri_boolean(F,P,B) returns (B!=0). - /// - /// The sqlite3_uri_int64(F,P,D) routine converts the value of P into a - /// 64-bit signed integer and returns that integer, or D if P does not - /// exist. If the value of P is something other than an integer, then - /// zero is returned. - /// - /// The sqlite3_uri_key(F,N) returns a pointer to the name (not - /// the value) of the N-th query parameter for filename F, or a NULL - /// pointer if N is less than zero or greater than the number of query - /// parameters minus 1. The N value is zero-based so N should be 0 to obtain - /// the name of the first query parameter, 1 for the second parameter, and - /// so forth. - /// - /// If F is a NULL pointer, then sqlite3_uri_parameter(F,P) returns NULL and - /// sqlite3_uri_boolean(F,P,B) returns B. If F is not a NULL pointer and - /// is not a database file pathname pointer that the SQLite core passed - /// into the xOpen VFS method, then the behavior of this routine is undefined - /// and probably undesirable. - /// - /// Beginning with SQLite [version 3.31.0] ([dateof:3.31.0]) the input F - /// parameter can also be the name of a rollback journal file or WAL file - /// in addition to the main database file. Prior to version 3.31.0, these - /// routines would only work if F was the name of the main database file. - /// When the F parameter is the name of the rollback journal or WAL file, - /// it has access to all the same query parameters as were found on the - /// main database file. - /// - /// See the [URI filename] documentation for additional information. - ffi.Pointer sqlite3_uri_parameter( - ffi.Pointer zFilename, - ffi.Pointer zParam, - ) { - return _sqlite3_uri_parameter(zFilename, zParam); - } - - late final _sqlite3_uri_parameterPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >('sqlite3_uri_parameter'); - late final _sqlite3_uri_parameter = _sqlite3_uri_parameterPtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); - - /// CAPI3REF: User Data For Functions - /// METHOD: sqlite3_context - /// - /// ^The sqlite3_user_data() interface returns a copy of - /// the pointer that was the pUserData parameter (the 5th parameter) - /// of the [sqlite3_create_function()] - /// and [sqlite3_create_function16()] routines that originally - /// registered the application defined function. - /// - /// This routine must be called from the same thread in which - /// the application-defined function is running. - ffi.Pointer sqlite3_user_data(ffi.Pointer arg0) { - return _sqlite3_user_data(arg0); - } - - late final _sqlite3_user_dataPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('sqlite3_user_data'); - late final _sqlite3_user_data = _sqlite3_user_dataPtr - .asFunction< - ffi.Pointer Function(ffi.Pointer) - >(); - - /// CAPI3REF: Obtaining SQL Values - /// METHOD: sqlite3_value - /// - /// Summary: - ///
- ///
sqlite3_value_blobBLOB value - ///
sqlite3_value_doubleREAL value - ///
sqlite3_value_int32-bit INTEGER value - ///
sqlite3_value_int6464-bit INTEGER value - ///
sqlite3_value_pointerPointer value - ///
sqlite3_value_textUTF-8 TEXT value - ///
sqlite3_value_text16UTF-16 TEXT value in - /// the native byteorder - ///
sqlite3_value_text16beUTF-16be TEXT value - ///
sqlite3_value_text16leUTF-16le TEXT value - ///
    - ///
sqlite3_value_bytesSize of a BLOB - /// or a UTF-8 TEXT in bytes - ///
sqlite3_value_bytes16   - /// →  Size of UTF-16 - /// TEXT in bytes - ///
sqlite3_value_typeDefault - /// datatype of the value - ///
sqlite3_value_numeric_type   - /// →  Best numeric datatype of the value - ///
sqlite3_value_nochange   - /// →  True if the column is unchanged in an UPDATE - /// against a virtual table. - ///
sqlite3_value_frombind   - /// →  True if value originated from a [bound parameter] - ///
- /// - /// Details: - /// - /// These routines extract type, size, and content information from - /// [protected sqlite3_value] objects. Protected sqlite3_value objects - /// are used to pass parameter information into the functions that - /// implement [application-defined SQL functions] and [virtual tables]. - /// - /// These routines work only with [protected sqlite3_value] objects. - /// Any attempt to use these routines on an [unprotected sqlite3_value] - /// is not threadsafe. - /// - /// ^These routines work just like the corresponding [column access functions] - /// except that these routines take a single [protected sqlite3_value] object - /// pointer instead of a [sqlite3_stmt*] pointer and an integer column number. - /// - /// ^The sqlite3_value_text16() interface extracts a UTF-16 string - /// in the native byte-order of the host machine. ^The - /// sqlite3_value_text16be() and sqlite3_value_text16le() interfaces - /// extract UTF-16 strings as big-endian and little-endian respectively. - /// - /// ^If [sqlite3_value] object V was initialized - /// using [sqlite3_bind_pointer(S,I,P,X,D)] or [sqlite3_result_pointer(C,P,X,D)] - /// and if X and Y are strings that compare equal according to strcmp(X,Y), - /// then sqlite3_value_pointer(V,Y) will return the pointer P. ^Otherwise, - /// sqlite3_value_pointer(V,Y) returns a NULL. The sqlite3_bind_pointer() - /// routine is part of the [pointer passing interface] added for SQLite 3.20.0. - /// - /// ^(The sqlite3_value_type(V) interface returns the - /// [SQLITE_INTEGER | datatype code] for the initial datatype of the - /// [sqlite3_value] object V. The returned value is one of [SQLITE_INTEGER], - /// [SQLITE_FLOAT], [SQLITE_TEXT], [SQLITE_BLOB], or [SQLITE_NULL].)^ - /// Other interfaces might change the datatype for an sqlite3_value object. - /// For example, if the datatype is initially SQLITE_INTEGER and - /// sqlite3_value_text(V) is called to extract a text value for that - /// integer, then subsequent calls to sqlite3_value_type(V) might return - /// SQLITE_TEXT. Whether or not a persistent internal datatype conversion - /// occurs is undefined and may change from one release of SQLite to the next. - /// - /// ^(The sqlite3_value_numeric_type() interface attempts to apply - /// numeric affinity to the value. This means that an attempt is - /// made to convert the value to an integer or floating point. If - /// such a conversion is possible without loss of information (in other - /// words, if the value is a string that looks like a number) - /// then the conversion is performed. Otherwise no conversion occurs. - /// The [SQLITE_INTEGER | datatype] after conversion is returned.)^ - /// - /// ^Within the [xUpdate] method of a [virtual table], the - /// sqlite3_value_nochange(X) interface returns true if and only if - /// the column corresponding to X is unchanged by the UPDATE operation - /// that the xUpdate method call was invoked to implement and if - /// and the prior [xColumn] method call that was invoked to extracted - /// the value for that column returned without setting a result (probably - /// because it queried [sqlite3_vtab_nochange()] and found that the column - /// was unchanging). ^Within an [xUpdate] method, any value for which - /// sqlite3_value_nochange(X) is true will in all other respects appear - /// to be a NULL value. If sqlite3_value_nochange(X) is invoked anywhere other - /// than within an [xUpdate] method call for an UPDATE statement, then - /// the return value is arbitrary and meaningless. - /// - /// ^The sqlite3_value_frombind(X) interface returns non-zero if the - /// value X originated from one of the [sqlite3_bind_int|sqlite3_bind()] - /// interfaces. ^If X comes from an SQL literal value, or a table column, - /// or an expression, then sqlite3_value_frombind(X) returns zero. - /// - /// Please pay particular attention to the fact that the pointer returned - /// from [sqlite3_value_blob()], [sqlite3_value_text()], or - /// [sqlite3_value_text16()] can be invalidated by a subsequent call to - /// [sqlite3_value_bytes()], [sqlite3_value_bytes16()], [sqlite3_value_text()], - /// or [sqlite3_value_text16()]. - /// - /// These routines must be called from the same thread as - /// the SQL function that supplied the [sqlite3_value*] parameters. - /// - /// As long as the input parameter is correct, these routines can only - /// fail if an out-of-memory error occurs during a format conversion. - /// Only the following subset of interfaces are subject to out-of-memory - /// errors: - /// - ///
    - ///
  • sqlite3_value_blob() - ///
  • sqlite3_value_text() - ///
  • sqlite3_value_text16() - ///
  • sqlite3_value_text16le() - ///
  • sqlite3_value_text16be() - ///
  • sqlite3_value_bytes() - ///
  • sqlite3_value_bytes16() - ///
- /// - /// If an out-of-memory error occurs, then the return value from these - /// routines is the same as if the column had contained an SQL NULL value. - /// Valid SQL NULL returns can be distinguished from out-of-memory errors - /// by invoking the [sqlite3_errcode()] immediately after the suspect - /// return value is obtained and before any - /// other SQLite interface is called on the same [database connection]. - ffi.Pointer sqlite3_value_blob(ffi.Pointer arg0) { - return _sqlite3_value_blob(arg0); - } - - late final _sqlite3_value_blobPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('sqlite3_value_blob'); - late final _sqlite3_value_blob = _sqlite3_value_blobPtr - .asFunction Function(ffi.Pointer)>(); - - int sqlite3_value_bytes(ffi.Pointer arg0) { - return _sqlite3_value_bytes(arg0); - } - - late final _sqlite3_value_bytesPtr = - _lookup)>>( - 'sqlite3_value_bytes', - ); - late final _sqlite3_value_bytes = _sqlite3_value_bytesPtr - .asFunction)>(); - - int sqlite3_value_bytes16(ffi.Pointer arg0) { - return _sqlite3_value_bytes16(arg0); - } - - late final _sqlite3_value_bytes16Ptr = - _lookup)>>( - 'sqlite3_value_bytes16', - ); - late final _sqlite3_value_bytes16 = _sqlite3_value_bytes16Ptr - .asFunction)>(); - - double sqlite3_value_double(ffi.Pointer arg0) { - return _sqlite3_value_double(arg0); - } - - late final _sqlite3_value_doublePtr = - _lookup< - ffi.NativeFunction)> - >('sqlite3_value_double'); - late final _sqlite3_value_double = _sqlite3_value_doublePtr - .asFunction)>(); - - /// CAPI3REF: Copy And Free SQL Values - /// METHOD: sqlite3_value - /// - /// ^The sqlite3_value_dup(V) interface makes a copy of the [sqlite3_value] - /// object D and returns a pointer to that copy. ^The [sqlite3_value] returned - /// is a [protected sqlite3_value] object even if the input is not. - /// ^The sqlite3_value_dup(V) interface returns NULL if V is NULL or if a - /// memory allocation fails. - /// - /// ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object - /// previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer - /// then sqlite3_value_free(V) is a harmless no-op. - ffi.Pointer sqlite3_value_dup( - ffi.Pointer arg0, - ) { - return _sqlite3_value_dup(arg0); - } - - late final _sqlite3_value_dupPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('sqlite3_value_dup'); - late final _sqlite3_value_dup = _sqlite3_value_dupPtr - .asFunction< - ffi.Pointer Function(ffi.Pointer) - >(); - - void sqlite3_value_free(ffi.Pointer arg0) { - return _sqlite3_value_free(arg0); - } - - late final _sqlite3_value_freePtr = - _lookup< - ffi.NativeFunction)> - >('sqlite3_value_free'); - late final _sqlite3_value_free = _sqlite3_value_freePtr - .asFunction)>(); - - int sqlite3_value_frombind(ffi.Pointer arg0) { - return _sqlite3_value_frombind(arg0); - } - - late final _sqlite3_value_frombindPtr = - _lookup)>>( - 'sqlite3_value_frombind', - ); - late final _sqlite3_value_frombind = _sqlite3_value_frombindPtr - .asFunction)>(); - - int sqlite3_value_int(ffi.Pointer arg0) { - return _sqlite3_value_int(arg0); - } - - late final _sqlite3_value_intPtr = - _lookup)>>( - 'sqlite3_value_int', - ); - late final _sqlite3_value_int = _sqlite3_value_intPtr - .asFunction)>(); - - int sqlite3_value_int64(ffi.Pointer arg0) { - return _sqlite3_value_int64(arg0); - } - - late final _sqlite3_value_int64Ptr = - _lookup< - ffi.NativeFunction)> - >('sqlite3_value_int64'); - late final _sqlite3_value_int64 = _sqlite3_value_int64Ptr - .asFunction)>(); - - int sqlite3_value_nochange(ffi.Pointer arg0) { - return _sqlite3_value_nochange(arg0); - } - - late final _sqlite3_value_nochangePtr = - _lookup)>>( - 'sqlite3_value_nochange', - ); - late final _sqlite3_value_nochange = _sqlite3_value_nochangePtr - .asFunction)>(); - - int sqlite3_value_numeric_type(ffi.Pointer arg0) { - return _sqlite3_value_numeric_type(arg0); - } - - late final _sqlite3_value_numeric_typePtr = - _lookup)>>( - 'sqlite3_value_numeric_type', - ); - late final _sqlite3_value_numeric_type = _sqlite3_value_numeric_typePtr - .asFunction)>(); - - ffi.Pointer sqlite3_value_pointer( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - return _sqlite3_value_pointer(arg0, arg1); - } - - late final _sqlite3_value_pointerPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >('sqlite3_value_pointer'); - late final _sqlite3_value_pointer = _sqlite3_value_pointerPtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); - - /// CAPI3REF: Finding The Subtype Of SQL Values - /// METHOD: sqlite3_value - /// - /// The sqlite3_value_subtype(V) function returns the subtype for - /// an [application-defined SQL function] argument V. The subtype - /// information can be used to pass a limited amount of context from - /// one SQL function to another. Use the [sqlite3_result_subtype()] - /// routine to set the subtype for the return value of an SQL function. - int sqlite3_value_subtype(ffi.Pointer arg0) { - return _sqlite3_value_subtype(arg0); - } - - late final _sqlite3_value_subtypePtr = - _lookup< - ffi.NativeFunction)> - >('sqlite3_value_subtype'); - late final _sqlite3_value_subtype = _sqlite3_value_subtypePtr - .asFunction)>(); - - ffi.Pointer sqlite3_value_text( - ffi.Pointer arg0, - ) { - return _sqlite3_value_text(arg0); - } - - late final _sqlite3_value_textPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('sqlite3_value_text'); - late final _sqlite3_value_text = _sqlite3_value_textPtr - .asFunction< - ffi.Pointer Function(ffi.Pointer) - >(); - - ffi.Pointer sqlite3_value_text16(ffi.Pointer arg0) { - return _sqlite3_value_text16(arg0); - } - - late final _sqlite3_value_text16Ptr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('sqlite3_value_text16'); - late final _sqlite3_value_text16 = _sqlite3_value_text16Ptr - .asFunction Function(ffi.Pointer)>(); - - ffi.Pointer sqlite3_value_text16be( - ffi.Pointer arg0, - ) { - return _sqlite3_value_text16be(arg0); - } - - late final _sqlite3_value_text16bePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('sqlite3_value_text16be'); - late final _sqlite3_value_text16be = _sqlite3_value_text16bePtr - .asFunction Function(ffi.Pointer)>(); - - ffi.Pointer sqlite3_value_text16le( - ffi.Pointer arg0, - ) { - return _sqlite3_value_text16le(arg0); - } - - late final _sqlite3_value_text16lePtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('sqlite3_value_text16le'); - late final _sqlite3_value_text16le = _sqlite3_value_text16lePtr - .asFunction Function(ffi.Pointer)>(); - - int sqlite3_value_type(ffi.Pointer arg0) { - return _sqlite3_value_type(arg0); - } - - late final _sqlite3_value_typePtr = - _lookup)>>( - 'sqlite3_value_type', - ); - late final _sqlite3_value_type = _sqlite3_value_typePtr - .asFunction)>(); - - /// CAPI3REF: Run-Time Library Version Numbers - /// KEYWORDS: sqlite3_version sqlite3_sourceid - /// - /// These interfaces provide the same information as the [SQLITE_VERSION], - /// [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros - /// but are associated with the library instead of the header file. ^(Cautious - /// programmers might include assert() statements in their application to - /// verify that values returned by these interfaces match the macros in - /// the header, and thus ensure that the application is - /// compiled with matching library and header files. - /// - ///
-  /// assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER );
-  /// assert( strncmp(sqlite3_sourceid(),SQLITE_SOURCE_ID,80)==0 );
-  /// assert( strcmp(sqlite3_libversion(),SQLITE_VERSION)==0 );
-  /// 
)^ - /// - /// ^The sqlite3_version[] string constant contains the text of [SQLITE_VERSION] - /// macro. ^The sqlite3_libversion() function returns a pointer to the - /// to the sqlite3_version[] string constant. The sqlite3_libversion() - /// function is provided for use in DLLs since DLL users usually do not have - /// direct access to string constants within the DLL. ^The - /// sqlite3_libversion_number() function returns an integer equal to - /// [SQLITE_VERSION_NUMBER]. ^(The sqlite3_sourceid() function returns - /// a pointer to a string constant whose value is the same as the - /// [SQLITE_SOURCE_ID] C preprocessor macro. Except if SQLite is built - /// using an edited copy of [the amalgamation], then the last four characters - /// of the hash might be different from [SQLITE_SOURCE_ID].)^ - /// - /// See also: [sqlite_version()] and [sqlite_source_id()]. - late final ffi.Pointer> _sqlite3_version = - _lookup>('sqlite3_version'); - - ffi.Pointer get sqlite3_version => _sqlite3_version.value; - - set sqlite3_version(ffi.Pointer value) => - _sqlite3_version.value = value; - - /// CAPI3REF: Virtual File System Objects - /// - /// A virtual filesystem (VFS) is an [sqlite3_vfs] object - /// that SQLite uses to interact - /// with the underlying operating system. Most SQLite builds come with a - /// single default VFS that is appropriate for the host computer. - /// New VFSes can be registered and existing VFSes can be unregistered. - /// The following interfaces are provided. - /// - /// ^The sqlite3_vfs_find() interface returns a pointer to a VFS given its name. - /// ^Names are case sensitive. - /// ^Names are zero-terminated UTF-8 strings. - /// ^If there is no match, a NULL pointer is returned. - /// ^If zVfsName is NULL then the default VFS is returned. - /// - /// ^New VFSes are registered with sqlite3_vfs_register(). - /// ^Each new VFS becomes the default VFS if the makeDflt flag is set. - /// ^The same VFS can be registered multiple times without injury. - /// ^To make an existing VFS into the default VFS, register it again - /// with the makeDflt flag set. If two different VFSes with the - /// same name are registered, the behavior is undefined. If a - /// VFS is registered with a name that is NULL or an empty string, - /// then the behavior is undefined. - /// - /// ^Unregister a VFS with the sqlite3_vfs_unregister() interface. - /// ^(If the default VFS is unregistered, another VFS is chosen as - /// the default. The choice for the new VFS is arbitrary.)^ - ffi.Pointer sqlite3_vfs_find(ffi.Pointer zVfsName) { - return _sqlite3_vfs_find(zVfsName); - } - - late final _sqlite3_vfs_findPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - >('sqlite3_vfs_find'); - late final _sqlite3_vfs_find = _sqlite3_vfs_findPtr - .asFunction Function(ffi.Pointer)>(); - - int sqlite3_vfs_register(ffi.Pointer arg0, int makeDflt) { - return _sqlite3_vfs_register(arg0, makeDflt); - } - - late final _sqlite3_vfs_registerPtr = - _lookup< - ffi.NativeFunction, ffi.Int)> - >('sqlite3_vfs_register'); - late final _sqlite3_vfs_register = _sqlite3_vfs_registerPtr - .asFunction, int)>(); - - int sqlite3_vfs_unregister(ffi.Pointer arg0) { - return _sqlite3_vfs_unregister(arg0); - } - - late final _sqlite3_vfs_unregisterPtr = - _lookup)>>( - 'sqlite3_vfs_unregister', - ); - late final _sqlite3_vfs_unregister = _sqlite3_vfs_unregisterPtr - .asFunction)>(); - - /// CAPI3REF: Determine The Collation For a Virtual Table Constraint - /// - /// This function may only be called from within a call to the [xBestIndex] - /// method of a [virtual table]. - /// - /// The first argument must be the sqlite3_index_info object that is the - /// first parameter to the xBestIndex() method. The second argument must be - /// an index into the aConstraint[] array belonging to the sqlite3_index_info - /// structure passed to xBestIndex. This function returns a pointer to a buffer - /// containing the name of the collation sequence for the corresponding - /// constraint. - ffi.Pointer sqlite3_vtab_collation( - ffi.Pointer arg0, - int arg1, - ) { - return _sqlite3_vtab_collation(arg0, arg1); - } - - late final _sqlite3_vtab_collationPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Int, - ) - > - >('sqlite3_vtab_collation'); - late final _sqlite3_vtab_collation = _sqlite3_vtab_collationPtr - .asFunction< - ffi.Pointer Function(ffi.Pointer, int) - >(); - - /// CAPI3REF: Virtual Table Interface Configuration - /// - /// This function may be called by either the [xConnect] or [xCreate] method - /// of a [virtual table] implementation to configure - /// various facets of the virtual table interface. - /// - /// If this interface is invoked outside the context of an xConnect or - /// xCreate virtual table method then the behavior is undefined. - /// - /// In the call sqlite3_vtab_config(D,C,...) the D parameter is the - /// [database connection] in which the virtual table is being created and - /// which is passed in as the first argument to the [xConnect] or [xCreate] - /// method that is invoking sqlite3_vtab_config(). The C parameter is one - /// of the [virtual table configuration options]. The presence and meaning - /// of parameters after C depend on which [virtual table configuration option] - /// is used. - int sqlite3_vtab_config(ffi.Pointer arg0, int op) { - return _sqlite3_vtab_config(arg0, op); - } - - late final _sqlite3_vtab_configPtr = - _lookup< - ffi.NativeFunction, ffi.Int)> - >('sqlite3_vtab_config'); - late final _sqlite3_vtab_config = _sqlite3_vtab_configPtr - .asFunction, int)>(); - - /// CAPI3REF: Determine If Virtual Table Column Access Is For UPDATE - /// - /// If the sqlite3_vtab_nochange(X) routine is called within the [xColumn] - /// method of a [virtual table], then it returns true if and only if the - /// column is being fetched as part of an UPDATE operation during which the - /// column value will not change. Applications might use this to substitute - /// a return value that is less expensive to compute and that the corresponding - /// [xUpdate] method understands as a "no-change" value. - /// - /// If the [xColumn] method calls sqlite3_vtab_nochange() and finds that - /// the column is not changed by the UPDATE statement, then the xColumn - /// method can optionally return without setting a result, without calling - /// any of the [sqlite3_result_int|sqlite3_result_xxxxx() interfaces]. - /// In that case, [sqlite3_value_nochange(X)] will return true for the - /// same column in the [xUpdate] method. - int sqlite3_vtab_nochange(ffi.Pointer arg0) { - return _sqlite3_vtab_nochange(arg0); - } - - late final _sqlite3_vtab_nochangePtr = - _lookup< - ffi.NativeFunction)> - >('sqlite3_vtab_nochange'); - late final _sqlite3_vtab_nochange = _sqlite3_vtab_nochangePtr - .asFunction)>(); - - /// CAPI3REF: Determine The Virtual Table Conflict Policy - /// - /// This function may only be called from within a call to the [xUpdate] method - /// of a [virtual table] implementation for an INSERT or UPDATE operation. ^The - /// value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL], - /// [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode - /// of the SQL statement that triggered the call to the [xUpdate] method of the - /// [virtual table]. - int sqlite3_vtab_on_conflict(ffi.Pointer arg0) { - return _sqlite3_vtab_on_conflict(arg0); - } - - late final _sqlite3_vtab_on_conflictPtr = - _lookup)>>( - 'sqlite3_vtab_on_conflict', - ); - late final _sqlite3_vtab_on_conflict = _sqlite3_vtab_on_conflictPtr - .asFunction)>(); - - /// CAPI3REF: Configure an auto-checkpoint - /// METHOD: sqlite3 - /// - /// ^The [sqlite3_wal_autocheckpoint(D,N)] is a wrapper around - /// [sqlite3_wal_hook()] that causes any database on [database connection] D - /// to automatically [checkpoint] - /// after committing a transaction if there are N or - /// more frames in the [write-ahead log] file. ^Passing zero or - /// a negative value as the nFrame parameter disables automatic - /// checkpoints entirely. - /// - /// ^The callback registered by this function replaces any existing callback - /// registered using [sqlite3_wal_hook()]. ^Likewise, registering a callback - /// using [sqlite3_wal_hook()] disables the automatic checkpoint mechanism - /// configured by this function. - /// - /// ^The [wal_autocheckpoint pragma] can be used to invoke this interface - /// from SQL. - /// - /// ^Checkpoints initiated by this mechanism are - /// [sqlite3_wal_checkpoint_v2|PASSIVE]. - /// - /// ^Every new [database connection] defaults to having the auto-checkpoint - /// enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT] - /// pages. The use of this interface - /// is only necessary if the default setting is found to be suboptimal - /// for a particular application. - int sqlite3_wal_autocheckpoint(ffi.Pointer db, int N) { - return _sqlite3_wal_autocheckpoint(db, N); - } - - late final _sqlite3_wal_autocheckpointPtr = - _lookup< - ffi.NativeFunction, ffi.Int)> - >('sqlite3_wal_autocheckpoint'); - late final _sqlite3_wal_autocheckpoint = _sqlite3_wal_autocheckpointPtr - .asFunction, int)>(); - - /// CAPI3REF: Checkpoint a database - /// METHOD: sqlite3 - /// - /// ^(The sqlite3_wal_checkpoint(D,X) is equivalent to - /// [sqlite3_wal_checkpoint_v2](D,X,[SQLITE_CHECKPOINT_PASSIVE],0,0).)^ - /// - /// In brief, sqlite3_wal_checkpoint(D,X) causes the content in the - /// [write-ahead log] for database X on [database connection] D to be - /// transferred into the database file and for the write-ahead log to - /// be reset. See the [checkpointing] documentation for addition - /// information. - /// - /// This interface used to be the only way to cause a checkpoint to - /// occur. But then the newer and more powerful [sqlite3_wal_checkpoint_v2()] - /// interface was added. This interface is retained for backwards - /// compatibility and as a convenience for applications that need to manually - /// start a callback but which do not need the full power (and corresponding - /// complication) of [sqlite3_wal_checkpoint_v2()]. - int sqlite3_wal_checkpoint( - ffi.Pointer db, - ffi.Pointer zDb, - ) { - return _sqlite3_wal_checkpoint(db, zDb); - } - - late final _sqlite3_wal_checkpointPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer) - > - >('sqlite3_wal_checkpoint'); - late final _sqlite3_wal_checkpoint = _sqlite3_wal_checkpointPtr - .asFunction, ffi.Pointer)>(); - - /// CAPI3REF: Checkpoint a database - /// METHOD: sqlite3 - /// - /// ^(The sqlite3_wal_checkpoint_v2(D,X,M,L,C) interface runs a checkpoint - /// operation on database X of [database connection] D in mode M. Status - /// information is written back into integers pointed to by L and C.)^ - /// ^(The M parameter must be a valid [checkpoint mode]:)^ - /// - ///
- ///
SQLITE_CHECKPOINT_PASSIVE
- /// ^Checkpoint as many frames as possible without waiting for any database - /// readers or writers to finish, then sync the database file if all frames - /// in the log were checkpointed. ^The [busy-handler callback] - /// is never invoked in the SQLITE_CHECKPOINT_PASSIVE mode. - /// ^On the other hand, passive mode might leave the checkpoint unfinished - /// if there are concurrent readers or writers. - /// - ///
SQLITE_CHECKPOINT_FULL
- /// ^This mode blocks (it invokes the - /// [sqlite3_busy_handler|busy-handler callback]) until there is no - /// database writer and all readers are reading from the most recent database - /// snapshot. ^It then checkpoints all frames in the log file and syncs the - /// database file. ^This mode blocks new database writers while it is pending, - /// but new database readers are allowed to continue unimpeded. - /// - ///
SQLITE_CHECKPOINT_RESTART
- /// ^This mode works the same way as SQLITE_CHECKPOINT_FULL with the addition - /// that after checkpointing the log file it blocks (calls the - /// [busy-handler callback]) - /// until all readers are reading from the database file only. ^This ensures - /// that the next writer will restart the log file from the beginning. - /// ^Like SQLITE_CHECKPOINT_FULL, this mode blocks new - /// database writer attempts while it is pending, but does not impede readers. - /// - ///
SQLITE_CHECKPOINT_TRUNCATE
- /// ^This mode works the same way as SQLITE_CHECKPOINT_RESTART with the - /// addition that it also truncates the log file to zero bytes just prior - /// to a successful return. - ///
- /// - /// ^If pnLog is not NULL, then *pnLog is set to the total number of frames in - /// the log file or to -1 if the checkpoint could not run because - /// of an error or because the database is not in [WAL mode]. ^If pnCkpt is not - /// NULL,then *pnCkpt is set to the total number of checkpointed frames in the - /// log file (including any that were already checkpointed before the function - /// was called) or to -1 if the checkpoint could not run due to an error or - /// because the database is not in WAL mode. ^Note that upon successful - /// completion of an SQLITE_CHECKPOINT_TRUNCATE, the log file will have been - /// truncated to zero bytes and so both *pnLog and *pnCkpt will be set to zero. - /// - /// ^All calls obtain an exclusive "checkpoint" lock on the database file. ^If - /// any other process is running a checkpoint operation at the same time, the - /// lock cannot be obtained and SQLITE_BUSY is returned. ^Even if there is a - /// busy-handler configured, it will not be invoked in this case. - /// - /// ^The SQLITE_CHECKPOINT_FULL, RESTART and TRUNCATE modes also obtain the - /// exclusive "writer" lock on the database file. ^If the writer lock cannot be - /// obtained immediately, and a busy-handler is configured, it is invoked and - /// the writer lock retried until either the busy-handler returns 0 or the lock - /// is successfully obtained. ^The busy-handler is also invoked while waiting for - /// database readers as described above. ^If the busy-handler returns 0 before - /// the writer lock is obtained or while waiting for database readers, the - /// checkpoint operation proceeds from that point in the same way as - /// SQLITE_CHECKPOINT_PASSIVE - checkpointing as many frames as possible - /// without blocking any further. ^SQLITE_BUSY is returned in this case. - /// - /// ^If parameter zDb is NULL or points to a zero length string, then the - /// specified operation is attempted on all WAL databases [attached] to - /// [database connection] db. In this case the - /// values written to output parameters *pnLog and *pnCkpt are undefined. ^If - /// an SQLITE_BUSY error is encountered when processing one or more of the - /// attached WAL databases, the operation is still attempted on any remaining - /// attached databases and SQLITE_BUSY is returned at the end. ^If any other - /// error occurs while processing an attached database, processing is abandoned - /// and the error code is returned to the caller immediately. ^If no error - /// (SQLITE_BUSY or otherwise) is encountered while processing the attached - /// databases, SQLITE_OK is returned. - /// - /// ^If database zDb is the name of an attached database that is not in WAL - /// mode, SQLITE_OK is returned and both *pnLog and *pnCkpt set to -1. ^If - /// zDb is not NULL (or a zero length string) and is not the name of any - /// attached database, SQLITE_ERROR is returned to the caller. - /// - /// ^Unless it returns SQLITE_MISUSE, - /// the sqlite3_wal_checkpoint_v2() interface - /// sets the error information that is queried by - /// [sqlite3_errcode()] and [sqlite3_errmsg()]. - /// - /// ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface - /// from SQL. - int sqlite3_wal_checkpoint_v2( - ffi.Pointer db, - ffi.Pointer zDb, - int eMode, - ffi.Pointer pnLog, - ffi.Pointer pnCkpt, - ) { - return _sqlite3_wal_checkpoint_v2(db, zDb, eMode, pnLog, pnCkpt); - } - - late final _sqlite3_wal_checkpoint_v2Ptr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ) - > - >('sqlite3_wal_checkpoint_v2'); - late final _sqlite3_wal_checkpoint_v2 = _sqlite3_wal_checkpoint_v2Ptr - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ) - >(); - - /// CAPI3REF: Write-Ahead Log Commit Hook - /// METHOD: sqlite3 - /// - /// ^The [sqlite3_wal_hook()] function is used to register a callback that - /// is invoked each time data is committed to a database in wal mode. - /// - /// ^(The callback is invoked by SQLite after the commit has taken place and - /// the associated write-lock on the database released)^, so the implementation - /// may read, write or [checkpoint] the database as required. - /// - /// ^The first parameter passed to the callback function when it is invoked - /// is a copy of the third parameter passed to sqlite3_wal_hook() when - /// registering the callback. ^The second is a copy of the database handle. - /// ^The third parameter is the name of the database that was written to - - /// either "main" or the name of an [ATTACH]-ed database. ^The fourth parameter - /// is the number of pages currently in the write-ahead log file, - /// including those that were just committed. - /// - /// The callback function should normally return [SQLITE_OK]. ^If an error - /// code is returned, that error will propagate back up through the - /// SQLite code base to cause the statement that provoked the callback - /// to report an error, though the commit will have still occurred. If the - /// callback returns [SQLITE_ROW] or [SQLITE_DONE], or if it returns a value - /// that does not correspond to any valid SQLite error code, the results - /// are undefined. - /// - /// A single database handle may have at most a single write-ahead log callback - /// registered at one time. ^Calling [sqlite3_wal_hook()] replaces any - /// previously registered write-ahead log callback. ^Note that the - /// [sqlite3_wal_autocheckpoint()] interface and the - /// [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will - /// overwrite any prior [sqlite3_wal_hook()] settings. - ffi.Pointer sqlite3_wal_hook( - ffi.Pointer arg0, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ) - > - > - arg1, - ffi.Pointer arg2, - ) { - return _sqlite3_wal_hook(arg0, arg1, arg2); - } - - late final _sqlite3_wal_hookPtr = - _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ) - > - >, - ffi.Pointer, - ) - > - >('sqlite3_wal_hook'); - late final _sqlite3_wal_hook = _sqlite3_wal_hookPtr - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ) - > - >, - ffi.Pointer, - ) - >(); - - /// CAPI3REF: Win32 Specific Interface - /// - /// These interfaces are available only on Windows. The - /// [sqlite3_win32_set_directory] interface is used to set the value associated - /// with the [sqlite3_temp_directory] or [sqlite3_data_directory] variable, to - /// zValue, depending on the value of the type parameter. The zValue parameter - /// should be NULL to cause the previous value to be freed via [sqlite3_free]; - /// a non-NULL value will be copied into memory obtained from [sqlite3_malloc] - /// prior to being used. The [sqlite3_win32_set_directory] interface returns - /// [SQLITE_OK] to indicate success, [SQLITE_ERROR] if the type is unsupported, - /// or [SQLITE_NOMEM] if memory could not be allocated. The value of the - /// [sqlite3_data_directory] variable is intended to act as a replacement for - /// the current directory on the sub-platforms of Win32 where that concept is - /// not present, e.g. WinRT and UWP. The [sqlite3_win32_set_directory8] and - /// [sqlite3_win32_set_directory16] interfaces behave exactly the same as the - /// sqlite3_win32_set_directory interface except the string parameter must be - /// UTF-8 or UTF-16, respectively. - int sqlite3_win32_set_directory(int type, ffi.Pointer zValue) { - return _sqlite3_win32_set_directory(type, zValue); - } - - late final _sqlite3_win32_set_directoryPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.UnsignedLong, ffi.Pointer) - > - >('sqlite3_win32_set_directory'); - late final _sqlite3_win32_set_directory = _sqlite3_win32_set_directoryPtr - .asFunction)>(); - - int sqlite3_win32_set_directory16(int type, ffi.Pointer zValue) { - return _sqlite3_win32_set_directory16(type, zValue); - } - - late final _sqlite3_win32_set_directory16Ptr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.UnsignedLong, ffi.Pointer) - > - >('sqlite3_win32_set_directory16'); - late final _sqlite3_win32_set_directory16 = _sqlite3_win32_set_directory16Ptr - .asFunction)>(); - - int sqlite3_win32_set_directory8(int type, ffi.Pointer zValue) { - return _sqlite3_win32_set_directory8(type, zValue); - } - - late final _sqlite3_win32_set_directory8Ptr = - _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.UnsignedLong, ffi.Pointer) - > - >('sqlite3_win32_set_directory8'); - late final _sqlite3_win32_set_directory8 = _sqlite3_win32_set_directory8Ptr - .asFunction)>(); -} - -const int FTS5_TOKENIZE_AUX = 8; - -const int FTS5_TOKENIZE_DOCUMENT = 4; - -const int FTS5_TOKENIZE_PREFIX = 2; - -const int FTS5_TOKENIZE_QUERY = 1; - -const int FTS5_TOKEN_COLOCATED = 1; - -const int FULLY_WITHIN = 2; - -final class Fts5Context extends ffi.Opaque {} - -/// EXTENSION API FUNCTIONS -/// -/// xUserData(pFts): -/// Return a copy of the context pointer the extension function was -/// registered with. -/// -/// xColumnTotalSize(pFts, iCol, pnToken): -/// If parameter iCol is less than zero, set output variable *pnToken -/// to the total number of tokens in the FTS5 table. Or, if iCol is -/// non-negative but less than the number of columns in the table, return -/// the total number of tokens in column iCol, considering all rows in -/// the FTS5 table. -/// -/// If parameter iCol is greater than or equal to the number of columns -/// in the table, SQLITE_RANGE is returned. Or, if an error occurs (e.g. -/// an OOM condition or IO error), an appropriate SQLite error code is -/// returned. -/// -/// xColumnCount(pFts): -/// Return the number of columns in the table. -/// -/// xColumnSize(pFts, iCol, pnToken): -/// If parameter iCol is less than zero, set output variable *pnToken -/// to the total number of tokens in the current row. Or, if iCol is -/// non-negative but less than the number of columns in the table, set -/// *pnToken to the number of tokens in column iCol of the current row. -/// -/// If parameter iCol is greater than or equal to the number of columns -/// in the table, SQLITE_RANGE is returned. Or, if an error occurs (e.g. -/// an OOM condition or IO error), an appropriate SQLite error code is -/// returned. -/// -/// This function may be quite inefficient if used with an FTS5 table -/// created with the "columnsize=0" option. -/// -/// xColumnText: -/// This function attempts to retrieve the text of column iCol of the -/// current document. If successful, (*pz) is set to point to a buffer -/// containing the text in utf-8 encoding, (*pn) is set to the size in bytes -/// (not characters) of the buffer and SQLITE_OK is returned. Otherwise, -/// if an error occurs, an SQLite error code is returned and the final values -/// of (*pz) and (*pn) are undefined. -/// -/// xPhraseCount: -/// Returns the number of phrases in the current query expression. -/// -/// xPhraseSize: -/// Returns the number of tokens in phrase iPhrase of the query. Phrases -/// are numbered starting from zero. -/// -/// xInstCount: -/// Set *pnInst to the total number of occurrences of all phrases within -/// the query within the current row. Return SQLITE_OK if successful, or -/// an error code (i.e. SQLITE_NOMEM) if an error occurs. -/// -/// This API can be quite slow if used with an FTS5 table created with the -/// "detail=none" or "detail=column" option. If the FTS5 table is created -/// with either "detail=none" or "detail=column" and "content=" option -/// (i.e. if it is a contentless table), then this API always returns 0. -/// -/// xInst: -/// Query for the details of phrase match iIdx within the current row. -/// Phrase matches are numbered starting from zero, so the iIdx argument -/// should be greater than or equal to zero and smaller than the value -/// output by xInstCount(). -/// -/// Usually, output parameter *piPhrase is set to the phrase number, *piCol -/// to the column in which it occurs and *piOff the token offset of the -/// first token of the phrase. Returns SQLITE_OK if successful, or an error -/// code (i.e. SQLITE_NOMEM) if an error occurs. -/// -/// This API can be quite slow if used with an FTS5 table created with the -/// "detail=none" or "detail=column" option. -/// -/// xRowid: -/// Returns the rowid of the current row. -/// -/// xTokenize: -/// Tokenize text using the tokenizer belonging to the FTS5 table. -/// -/// xQueryPhrase(pFts5, iPhrase, pUserData, xCallback): -/// This API function is used to query the FTS table for phrase iPhrase -/// of the current query. Specifically, a query equivalent to: -/// -/// ... FROM ftstable WHERE ftstable MATCH $p ORDER BY rowid -/// -/// with $p set to a phrase equivalent to the phrase iPhrase of the -/// current query is executed. Any column filter that applies to -/// phrase iPhrase of the current query is included in $p. For each -/// row visited, the callback function passed as the fourth argument -/// is invoked. The context and API objects passed to the callback -/// function may be used to access the properties of each matched row. -/// Invoking Api.xUserData() returns a copy of the pointer passed as -/// the third argument to pUserData. -/// -/// If the callback function returns any value other than SQLITE_OK, the -/// query is abandoned and the xQueryPhrase function returns immediately. -/// If the returned value is SQLITE_DONE, xQueryPhrase returns SQLITE_OK. -/// Otherwise, the error code is propagated upwards. -/// -/// If the query runs to completion without incident, SQLITE_OK is returned. -/// Or, if some error occurs before the query completes or is aborted by -/// the callback, an SQLite error code is returned. -/// -/// -/// xSetAuxdata(pFts5, pAux, xDelete) -/// -/// Save the pointer passed as the second argument as the extension function's -/// "auxiliary data". The pointer may then be retrieved by the current or any -/// future invocation of the same fts5 extension function made as part of -/// the same MATCH query using the xGetAuxdata() API. -/// -/// Each extension function is allocated a single auxiliary data slot for -/// each FTS query (MATCH expression). If the extension function is invoked -/// more than once for a single FTS query, then all invocations share a -/// single auxiliary data context. -/// -/// If there is already an auxiliary data pointer when this function is -/// invoked, then it is replaced by the new pointer. If an xDelete callback -/// was specified along with the original pointer, it is invoked at this -/// point. -/// -/// The xDelete callback, if one is specified, is also invoked on the -/// auxiliary data pointer after the FTS5 query has finished. -/// -/// If an error (e.g. an OOM condition) occurs within this function, -/// the auxiliary data is set to NULL and an error code returned. If the -/// xDelete parameter was not NULL, it is invoked on the auxiliary data -/// pointer before returning. -/// -/// -/// xGetAuxdata(pFts5, bClear) -/// -/// Returns the current auxiliary data pointer for the fts5 extension -/// function. See the xSetAuxdata() method for details. -/// -/// If the bClear argument is non-zero, then the auxiliary data is cleared -/// (set to NULL) before this function returns. In this case the xDelete, -/// if any, is not invoked. -/// -/// -/// xRowCount(pFts5, pnRow) -/// -/// This function is used to retrieve the total number of rows in the table. -/// In other words, the same value that would be returned by: -/// -/// SELECT count(*) FROM ftstable; -/// -/// xPhraseFirst() -/// This function is used, along with type Fts5PhraseIter and the xPhraseNext -/// method, to iterate through all instances of a single query phrase within -/// the current row. This is the same information as is accessible via the -/// xInstCount/xInst APIs. While the xInstCount/xInst APIs are more convenient -/// to use, this API may be faster under some circumstances. To iterate -/// through instances of phrase iPhrase, use the following code: -/// -/// Fts5PhraseIter iter; -/// int iCol, iOff; -/// for(pApi->xPhraseFirst(pFts, iPhrase, &iter, &iCol, &iOff); -/// iCol>=0; -/// pApi->xPhraseNext(pFts, &iter, &iCol, &iOff) -/// ){ -/// // An instance of phrase iPhrase at offset iOff of column iCol -/// } -/// -/// The Fts5PhraseIter structure is defined above. Applications should not -/// modify this structure directly - it should only be used as shown above -/// with the xPhraseFirst() and xPhraseNext() API methods (and by -/// xPhraseFirstColumn() and xPhraseNextColumn() as illustrated below). -/// -/// This API can be quite slow if used with an FTS5 table created with the -/// "detail=none" or "detail=column" option. If the FTS5 table is created -/// with either "detail=none" or "detail=column" and "content=" option -/// (i.e. if it is a contentless table), then this API always iterates -/// through an empty set (all calls to xPhraseFirst() set iCol to -1). -/// -/// xPhraseNext() -/// See xPhraseFirst above. -/// -/// xPhraseFirstColumn() -/// This function and xPhraseNextColumn() are similar to the xPhraseFirst() -/// and xPhraseNext() APIs described above. The difference is that instead -/// of iterating through all instances of a phrase in the current row, these -/// APIs are used to iterate through the set of columns in the current row -/// that contain one or more instances of a specified phrase. For example: -/// -/// Fts5PhraseIter iter; -/// int iCol; -/// for(pApi->xPhraseFirstColumn(pFts, iPhrase, &iter, &iCol); -/// iCol>=0; -/// pApi->xPhraseNextColumn(pFts, &iter, &iCol) -/// ){ -/// // Column iCol contains at least one instance of phrase iPhrase -/// } -/// -/// This API can be quite slow if used with an FTS5 table created with the -/// "detail=none" option. If the FTS5 table is created with either -/// "detail=none" "content=" option (i.e. if it is a contentless table), -/// then this API always iterates through an empty set (all calls to -/// xPhraseFirstColumn() set iCol to -1). -/// -/// The information accessed using this API and its companion -/// xPhraseFirstColumn() may also be obtained using xPhraseFirst/xPhraseNext -/// (or xInst/xInstCount). The chief advantage of this API is that it is -/// significantly more efficient than those alternatives when used with -/// "detail=column" tables. -/// -/// xPhraseNextColumn() -/// See xPhraseFirstColumn above. -final class Fts5ExtensionApi extends ffi.Struct { - /// Currently always set to 3 - @ffi.Int() - external int iVersion; - - external ffi.Pointer< - ffi.NativeFunction Function(ffi.Pointer)> - > - xUserData; - - external ffi.Pointer< - ffi.NativeFunction)> - > - xColumnCount; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer) - > - > - xRowCount; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ) - > - > - xColumnTotalSize; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Int, - ) - > - >, - ) - > - > - xTokenize; - - external ffi.Pointer< - ffi.NativeFunction)> - > - xPhraseCount; - - external ffi.Pointer< - ffi.NativeFunction, ffi.Int)> - > - xPhraseSize; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer) - > - > - xInstCount; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - > - xInst; - - external ffi.Pointer< - ffi.NativeFunction)> - > - xRowid; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ffi.Pointer, - ) - > - > - xColumnText; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Pointer) - > - > - xColumnSize; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >, - ) - > - > - xQueryPhrase; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - > - > - xSetAuxdata; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Int) - > - > - xGetAuxdata; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - > - xPhraseFirst; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - > - xPhraseNext; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ) - > - > - xPhraseFirstColumn; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - > - xPhraseNextColumn; - - static ffi.Pointer $allocate( - ffi.Allocator $allocator, { - required int iVersion, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer) - > - > - xUserData, - required ffi.Pointer< - ffi.NativeFunction)> - > - xColumnCount, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer) - > - > - xRowCount, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ) - > - > - xColumnTotalSize, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Int, - ) - > - >, - ) - > - > - xTokenize, - required ffi.Pointer< - ffi.NativeFunction)> - > - xPhraseCount, - required ffi.Pointer< - ffi.NativeFunction, ffi.Int)> - > - xPhraseSize, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer) - > - > - xInstCount, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - > - xInst, - required ffi.Pointer< - ffi.NativeFunction)> - > - xRowid, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ffi.Pointer, - ) - > - > - xColumnText, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ) - > - > - xColumnSize, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >, - ) - > - > - xQueryPhrase, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction)> - >, - ) - > - > - xSetAuxdata, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Int) - > - > - xGetAuxdata, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - > - xPhraseFirst, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - > - xPhraseNext, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ) - > - > - xPhraseFirstColumn, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - > - xPhraseNextColumn, - }) => $allocator() - ..ref.iVersion = iVersion - ..ref.xUserData = xUserData - ..ref.xColumnCount = xColumnCount - ..ref.xRowCount = xRowCount - ..ref.xColumnTotalSize = xColumnTotalSize - ..ref.xTokenize = xTokenize - ..ref.xPhraseCount = xPhraseCount - ..ref.xPhraseSize = xPhraseSize - ..ref.xInstCount = xInstCount - ..ref.xInst = xInst - ..ref.xRowid = xRowid - ..ref.xColumnText = xColumnText - ..ref.xColumnSize = xColumnSize - ..ref.xQueryPhrase = xQueryPhrase - ..ref.xSetAuxdata = xSetAuxdata - ..ref.xGetAuxdata = xGetAuxdata - ..ref.xPhraseFirst = xPhraseFirst - ..ref.xPhraseNext = xPhraseNext - ..ref.xPhraseFirstColumn = xPhraseFirstColumn - ..ref.xPhraseNextColumn = xPhraseNextColumn; -} - -final class Fts5PhraseIter extends ffi.Struct { - external ffi.Pointer a; - - external ffi.Pointer b; - - static ffi.Pointer $allocate( - ffi.Allocator $allocator, { - required ffi.Pointer a, - required ffi.Pointer b, - }) => $allocator() - ..ref.a = a - ..ref.b = b; -} - -final class Fts5Tokenizer extends ffi.Opaque {} - -const int NOT_WITHIN = 0; - -const int PARTLY_WITHIN = 1; - -const int SQLITE3_TEXT = 3; - -const int SQLITE_ABORT = 4; - -const int SQLITE_ABORT_ROLLBACK = 516; - -const int SQLITE_ACCESS_EXISTS = 0; - -const int SQLITE_ACCESS_READ = 2; - -const int SQLITE_ACCESS_READWRITE = 1; - -const int SQLITE_ALTER_TABLE = 26; - -const int SQLITE_ANALYZE = 28; - -const int SQLITE_ANY = 5; - -const int SQLITE_ATTACH = 24; - -const int SQLITE_AUTH = 23; - -const int SQLITE_AUTH_USER = 279; - -const int SQLITE_BLOB = 4; - -const int SQLITE_BUSY = 5; - -const int SQLITE_BUSY_RECOVERY = 261; - -const int SQLITE_BUSY_SNAPSHOT = 517; - -const int SQLITE_BUSY_TIMEOUT = 773; - -const int SQLITE_CANTOPEN = 14; - -const int SQLITE_CANTOPEN_CONVPATH = 1038; - -const int SQLITE_CANTOPEN_DIRTYWAL = 1294; - -const int SQLITE_CANTOPEN_FULLPATH = 782; - -const int SQLITE_CANTOPEN_ISDIR = 526; - -const int SQLITE_CANTOPEN_NOTEMPDIR = 270; - -const int SQLITE_CANTOPEN_SYMLINK = 1550; - -const int SQLITE_CHECKPOINT_FULL = 1; - -const int SQLITE_CHECKPOINT_PASSIVE = 0; - -const int SQLITE_CHECKPOINT_RESTART = 2; - -const int SQLITE_CHECKPOINT_TRUNCATE = 3; - -const int SQLITE_CONFIG_COVERING_INDEX_SCAN = 20; - -const int SQLITE_CONFIG_GETMALLOC = 5; - -const int SQLITE_CONFIG_GETMUTEX = 11; - -const int SQLITE_CONFIG_GETPCACHE = 15; - -const int SQLITE_CONFIG_GETPCACHE2 = 19; - -const int SQLITE_CONFIG_HEAP = 8; - -const int SQLITE_CONFIG_LOG = 16; - -const int SQLITE_CONFIG_LOOKASIDE = 13; - -const int SQLITE_CONFIG_MALLOC = 4; - -const int SQLITE_CONFIG_MEMDB_MAXSIZE = 29; - -const int SQLITE_CONFIG_MEMSTATUS = 9; - -const int SQLITE_CONFIG_MMAP_SIZE = 22; - -const int SQLITE_CONFIG_MULTITHREAD = 2; - -const int SQLITE_CONFIG_MUTEX = 10; - -const int SQLITE_CONFIG_PAGECACHE = 7; - -const int SQLITE_CONFIG_PCACHE = 14; - -const int SQLITE_CONFIG_PCACHE2 = 18; - -const int SQLITE_CONFIG_PCACHE_HDRSZ = 24; - -const int SQLITE_CONFIG_PMASZ = 25; - -const int SQLITE_CONFIG_SCRATCH = 6; - -const int SQLITE_CONFIG_SERIALIZED = 3; - -const int SQLITE_CONFIG_SINGLETHREAD = 1; - -const int SQLITE_CONFIG_SMALL_MALLOC = 27; - -const int SQLITE_CONFIG_SORTERREF_SIZE = 28; - -const int SQLITE_CONFIG_SQLLOG = 21; - -const int SQLITE_CONFIG_STMTJRNL_SPILL = 26; - -const int SQLITE_CONFIG_URI = 17; - -const int SQLITE_CONFIG_WIN32_HEAPSIZE = 23; - -const int SQLITE_CONSTRAINT = 19; - -const int SQLITE_CONSTRAINT_CHECK = 275; - -const int SQLITE_CONSTRAINT_COMMITHOOK = 531; - -const int SQLITE_CONSTRAINT_FOREIGNKEY = 787; - -const int SQLITE_CONSTRAINT_FUNCTION = 1043; - -const int SQLITE_CONSTRAINT_NOTNULL = 1299; - -const int SQLITE_CONSTRAINT_PINNED = 2835; - -const int SQLITE_CONSTRAINT_PRIMARYKEY = 1555; - -const int SQLITE_CONSTRAINT_ROWID = 2579; - -const int SQLITE_CONSTRAINT_TRIGGER = 1811; - -const int SQLITE_CONSTRAINT_UNIQUE = 2067; - -const int SQLITE_CONSTRAINT_VTAB = 2323; - -const int SQLITE_COPY = 0; - -const int SQLITE_CORRUPT = 11; - -const int SQLITE_CORRUPT_INDEX = 779; - -const int SQLITE_CORRUPT_SEQUENCE = 523; - -const int SQLITE_CORRUPT_VTAB = 267; - -const int SQLITE_CREATE_INDEX = 1; - -const int SQLITE_CREATE_TABLE = 2; - -const int SQLITE_CREATE_TEMP_INDEX = 3; - -const int SQLITE_CREATE_TEMP_TABLE = 4; - -const int SQLITE_CREATE_TEMP_TRIGGER = 5; - -const int SQLITE_CREATE_TEMP_VIEW = 6; - -const int SQLITE_CREATE_TRIGGER = 7; - -const int SQLITE_CREATE_VIEW = 8; - -const int SQLITE_CREATE_VTABLE = 29; - -const int SQLITE_DBCONFIG_DEFENSIVE = 1010; - -const int SQLITE_DBCONFIG_DQS_DDL = 1014; - -const int SQLITE_DBCONFIG_DQS_DML = 1013; - -const int SQLITE_DBCONFIG_ENABLE_FKEY = 1002; - -const int SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER = 1004; - -const int SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION = 1005; - -const int SQLITE_DBCONFIG_ENABLE_QPSG = 1007; - -const int SQLITE_DBCONFIG_ENABLE_TRIGGER = 1003; - -const int SQLITE_DBCONFIG_ENABLE_VIEW = 1015; - -const int SQLITE_DBCONFIG_LEGACY_ALTER_TABLE = 1012; - -const int SQLITE_DBCONFIG_LEGACY_FILE_FORMAT = 1016; - -const int SQLITE_DBCONFIG_LOOKASIDE = 1001; - -const int SQLITE_DBCONFIG_MAINDBNAME = 1000; - -const int SQLITE_DBCONFIG_MAX = 1017; - -const int SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE = 1006; - -const int SQLITE_DBCONFIG_RESET_DATABASE = 1009; - -const int SQLITE_DBCONFIG_TRIGGER_EQP = 1008; - -const int SQLITE_DBCONFIG_TRUSTED_SCHEMA = 1017; - -const int SQLITE_DBCONFIG_WRITABLE_SCHEMA = 1011; - -const int SQLITE_DBSTATUS_CACHE_HIT = 7; - -const int SQLITE_DBSTATUS_CACHE_MISS = 8; - -const int SQLITE_DBSTATUS_CACHE_SPILL = 12; - -const int SQLITE_DBSTATUS_CACHE_USED = 1; - -const int SQLITE_DBSTATUS_CACHE_USED_SHARED = 11; - -const int SQLITE_DBSTATUS_CACHE_WRITE = 9; - -const int SQLITE_DBSTATUS_DEFERRED_FKS = 10; - -const int SQLITE_DBSTATUS_LOOKASIDE_HIT = 4; - -const int SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL = 6; - -const int SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE = 5; - -const int SQLITE_DBSTATUS_LOOKASIDE_USED = 0; - -const int SQLITE_DBSTATUS_MAX = 12; - -const int SQLITE_DBSTATUS_SCHEMA_USED = 2; - -const int SQLITE_DBSTATUS_STMT_USED = 3; - -const int SQLITE_DELETE = 9; - -const int SQLITE_DENY = 1; - -const int SQLITE_DESERIALIZE_FREEONCLOSE = 1; - -const int SQLITE_DESERIALIZE_READONLY = 4; - -const int SQLITE_DESERIALIZE_RESIZEABLE = 2; - -const int SQLITE_DETACH = 25; - -const int SQLITE_DETERMINISTIC = 2048; - -const int SQLITE_DIRECTONLY = 524288; - -const int SQLITE_DONE = 101; - -const int SQLITE_DROP_INDEX = 10; - -const int SQLITE_DROP_TABLE = 11; - -const int SQLITE_DROP_TEMP_INDEX = 12; - -const int SQLITE_DROP_TEMP_TABLE = 13; - -const int SQLITE_DROP_TEMP_TRIGGER = 14; - -const int SQLITE_DROP_TEMP_VIEW = 15; - -const int SQLITE_DROP_TRIGGER = 16; - -const int SQLITE_DROP_VIEW = 17; - -const int SQLITE_DROP_VTABLE = 30; - -const int SQLITE_EMPTY = 16; - -const int SQLITE_ERROR = 1; - -const int SQLITE_ERROR_MISSING_COLLSEQ = 257; - -const int SQLITE_ERROR_RETRY = 513; - -const int SQLITE_ERROR_SNAPSHOT = 769; - -const int SQLITE_FAIL = 3; - -const int SQLITE_FCNTL_BEGIN_ATOMIC_WRITE = 31; - -const int SQLITE_FCNTL_BUSYHANDLER = 15; - -const int SQLITE_FCNTL_CHUNK_SIZE = 6; - -const int SQLITE_FCNTL_CKPT_DONE = 37; - -const int SQLITE_FCNTL_CKPT_START = 39; - -const int SQLITE_FCNTL_COMMIT_ATOMIC_WRITE = 32; - -const int SQLITE_FCNTL_COMMIT_PHASETWO = 22; - -const int SQLITE_FCNTL_DATA_VERSION = 35; - -const int SQLITE_FCNTL_FILE_POINTER = 7; - -const int SQLITE_FCNTL_GET_LOCKPROXYFILE = 2; - -const int SQLITE_FCNTL_HAS_MOVED = 20; - -const int SQLITE_FCNTL_JOURNAL_POINTER = 28; - -const int SQLITE_FCNTL_LAST_ERRNO = 4; - -const int SQLITE_FCNTL_LOCKSTATE = 1; - -const int SQLITE_FCNTL_LOCK_TIMEOUT = 34; - -const int SQLITE_FCNTL_MMAP_SIZE = 18; - -const int SQLITE_FCNTL_OVERWRITE = 11; - -const int SQLITE_FCNTL_PDB = 30; - -const int SQLITE_FCNTL_PERSIST_WAL = 10; - -const int SQLITE_FCNTL_POWERSAFE_OVERWRITE = 13; - -const int SQLITE_FCNTL_PRAGMA = 14; - -const int SQLITE_FCNTL_RBU = 26; - -const int SQLITE_FCNTL_RESERVE_BYTES = 38; - -const int SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE = 33; - -const int SQLITE_FCNTL_SET_LOCKPROXYFILE = 3; - -const int SQLITE_FCNTL_SIZE_HINT = 5; - -const int SQLITE_FCNTL_SIZE_LIMIT = 36; - -const int SQLITE_FCNTL_SYNC = 21; - -const int SQLITE_FCNTL_SYNC_OMITTED = 8; - -const int SQLITE_FCNTL_TEMPFILENAME = 16; - -const int SQLITE_FCNTL_TRACE = 19; - -const int SQLITE_FCNTL_VFSNAME = 12; - -const int SQLITE_FCNTL_VFS_POINTER = 27; - -const int SQLITE_FCNTL_WAL_BLOCK = 24; - -const int SQLITE_FCNTL_WIN32_AV_RETRY = 9; - -const int SQLITE_FCNTL_WIN32_GET_HANDLE = 29; - -const int SQLITE_FCNTL_WIN32_SET_HANDLE = 23; - -const int SQLITE_FCNTL_ZIPVFS = 25; - -const int SQLITE_FLOAT = 2; - -const int SQLITE_FORMAT = 24; - -const int SQLITE_FULL = 13; - -const int SQLITE_FUNCTION = 31; - -const int SQLITE_GET_LOCKPROXYFILE = 2; - -const int SQLITE_IGNORE = 2; - -const int SQLITE_INDEX_CONSTRAINT_EQ = 2; - -const int SQLITE_INDEX_CONSTRAINT_FUNCTION = 150; - -const int SQLITE_INDEX_CONSTRAINT_GE = 32; - -const int SQLITE_INDEX_CONSTRAINT_GLOB = 66; - -const int SQLITE_INDEX_CONSTRAINT_GT = 4; - -const int SQLITE_INDEX_CONSTRAINT_IS = 72; - -const int SQLITE_INDEX_CONSTRAINT_ISNOT = 69; - -const int SQLITE_INDEX_CONSTRAINT_ISNOTNULL = 70; - -const int SQLITE_INDEX_CONSTRAINT_ISNULL = 71; - -const int SQLITE_INDEX_CONSTRAINT_LE = 8; - -const int SQLITE_INDEX_CONSTRAINT_LIKE = 65; - -const int SQLITE_INDEX_CONSTRAINT_LT = 16; - -const int SQLITE_INDEX_CONSTRAINT_MATCH = 64; - -const int SQLITE_INDEX_CONSTRAINT_NE = 68; - -const int SQLITE_INDEX_CONSTRAINT_REGEXP = 67; - -const int SQLITE_INDEX_SCAN_UNIQUE = 1; - -const int SQLITE_INNOCUOUS = 2097152; - -const int SQLITE_INSERT = 18; - -const int SQLITE_INTEGER = 1; - -const int SQLITE_INTERNAL = 2; - -const int SQLITE_INTERRUPT = 9; - -const int SQLITE_IOCAP_ATOMIC = 1; - -const int SQLITE_IOCAP_ATOMIC16K = 64; - -const int SQLITE_IOCAP_ATOMIC1K = 4; - -const int SQLITE_IOCAP_ATOMIC2K = 8; - -const int SQLITE_IOCAP_ATOMIC32K = 128; - -const int SQLITE_IOCAP_ATOMIC4K = 16; - -const int SQLITE_IOCAP_ATOMIC512 = 2; - -const int SQLITE_IOCAP_ATOMIC64K = 256; - -const int SQLITE_IOCAP_ATOMIC8K = 32; - -const int SQLITE_IOCAP_BATCH_ATOMIC = 16384; - -const int SQLITE_IOCAP_IMMUTABLE = 8192; - -const int SQLITE_IOCAP_POWERSAFE_OVERWRITE = 4096; - -const int SQLITE_IOCAP_SAFE_APPEND = 512; - -const int SQLITE_IOCAP_SEQUENTIAL = 1024; - -const int SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN = 2048; - -const int SQLITE_IOERR = 10; - -const int SQLITE_IOERR_ACCESS = 3338; - -const int SQLITE_IOERR_AUTH = 7178; - -const int SQLITE_IOERR_BEGIN_ATOMIC = 7434; - -const int SQLITE_IOERR_BLOCKED = 2826; - -const int SQLITE_IOERR_CHECKRESERVEDLOCK = 3594; - -const int SQLITE_IOERR_CLOSE = 4106; - -const int SQLITE_IOERR_COMMIT_ATOMIC = 7690; - -const int SQLITE_IOERR_CONVPATH = 6666; - -const int SQLITE_IOERR_DATA = 8202; - -const int SQLITE_IOERR_DELETE = 2570; - -const int SQLITE_IOERR_DELETE_NOENT = 5898; - -const int SQLITE_IOERR_DIR_CLOSE = 4362; - -const int SQLITE_IOERR_DIR_FSYNC = 1290; - -const int SQLITE_IOERR_FSTAT = 1802; - -const int SQLITE_IOERR_FSYNC = 1034; - -const int SQLITE_IOERR_GETTEMPPATH = 6410; - -const int SQLITE_IOERR_LOCK = 3850; - -const int SQLITE_IOERR_MMAP = 6154; - -const int SQLITE_IOERR_NOMEM = 3082; - -const int SQLITE_IOERR_RDLOCK = 2314; - -const int SQLITE_IOERR_READ = 266; - -const int SQLITE_IOERR_ROLLBACK_ATOMIC = 7946; - -const int SQLITE_IOERR_SEEK = 5642; - -const int SQLITE_IOERR_SHMLOCK = 5130; - -const int SQLITE_IOERR_SHMMAP = 5386; - -const int SQLITE_IOERR_SHMOPEN = 4618; - -const int SQLITE_IOERR_SHMSIZE = 4874; - -const int SQLITE_IOERR_SHORT_READ = 522; - -const int SQLITE_IOERR_TRUNCATE = 1546; - -const int SQLITE_IOERR_UNLOCK = 2058; - -const int SQLITE_IOERR_VNODE = 6922; - -const int SQLITE_IOERR_WRITE = 778; - -const int SQLITE_LAST_ERRNO = 4; - -const int SQLITE_LIMIT_ATTACHED = 7; - -const int SQLITE_LIMIT_COLUMN = 2; - -const int SQLITE_LIMIT_COMPOUND_SELECT = 4; - -const int SQLITE_LIMIT_EXPR_DEPTH = 3; - -const int SQLITE_LIMIT_FUNCTION_ARG = 6; - -const int SQLITE_LIMIT_LENGTH = 0; - -const int SQLITE_LIMIT_LIKE_PATTERN_LENGTH = 8; - -const int SQLITE_LIMIT_SQL_LENGTH = 1; - -const int SQLITE_LIMIT_TRIGGER_DEPTH = 10; - -const int SQLITE_LIMIT_VARIABLE_NUMBER = 9; - -const int SQLITE_LIMIT_VDBE_OP = 5; - -const int SQLITE_LIMIT_WORKER_THREADS = 11; - -const int SQLITE_LOCKED = 6; - -const int SQLITE_LOCKED_SHAREDCACHE = 262; - -const int SQLITE_LOCKED_VTAB = 518; - -const int SQLITE_LOCK_EXCLUSIVE = 4; - -const int SQLITE_LOCK_NONE = 0; - -const int SQLITE_LOCK_PENDING = 3; - -const int SQLITE_LOCK_RESERVED = 2; - -const int SQLITE_LOCK_SHARED = 1; - -const int SQLITE_MISMATCH = 20; - -const int SQLITE_MISUSE = 21; - -const int SQLITE_MUTEX_FAST = 0; - -const int SQLITE_MUTEX_RECURSIVE = 1; - -const int SQLITE_MUTEX_STATIC_APP1 = 8; - -const int SQLITE_MUTEX_STATIC_APP2 = 9; - -const int SQLITE_MUTEX_STATIC_APP3 = 10; - -const int SQLITE_MUTEX_STATIC_LRU = 6; - -const int SQLITE_MUTEX_STATIC_LRU2 = 7; - -const int SQLITE_MUTEX_STATIC_MASTER = 2; - -const int SQLITE_MUTEX_STATIC_MEM = 3; - -const int SQLITE_MUTEX_STATIC_MEM2 = 4; - -const int SQLITE_MUTEX_STATIC_OPEN = 4; - -const int SQLITE_MUTEX_STATIC_PMEM = 7; - -const int SQLITE_MUTEX_STATIC_PRNG = 5; - -const int SQLITE_MUTEX_STATIC_VFS1 = 11; - -const int SQLITE_MUTEX_STATIC_VFS2 = 12; - -const int SQLITE_MUTEX_STATIC_VFS3 = 13; - -const int SQLITE_NOLFS = 22; - -const int SQLITE_NOMEM = 7; - -const int SQLITE_NOTADB = 26; - -const int SQLITE_NOTFOUND = 12; - -const int SQLITE_NOTICE = 27; - -const int SQLITE_NOTICE_RECOVER_ROLLBACK = 539; - -const int SQLITE_NOTICE_RECOVER_WAL = 283; - -const int SQLITE_NULL = 5; - -const int SQLITE_OK = 0; - -const int SQLITE_OK_LOAD_PERMANENTLY = 256; - -const int SQLITE_OK_SYMLINK = 512; - -const int SQLITE_OPEN_AUTOPROXY = 32; - -const int SQLITE_OPEN_CREATE = 4; - -const int SQLITE_OPEN_DELETEONCLOSE = 8; - -const int SQLITE_OPEN_EXCLUSIVE = 16; - -const int SQLITE_OPEN_FULLMUTEX = 65536; - -const int SQLITE_OPEN_MAIN_DB = 256; - -const int SQLITE_OPEN_MAIN_JOURNAL = 2048; - -const int SQLITE_OPEN_MASTER_JOURNAL = 16384; - -const int SQLITE_OPEN_MEMORY = 128; - -const int SQLITE_OPEN_NOFOLLOW = 16777216; - -const int SQLITE_OPEN_NOMUTEX = 32768; - -const int SQLITE_OPEN_PRIVATECACHE = 262144; - -const int SQLITE_OPEN_READONLY = 1; - -const int SQLITE_OPEN_READWRITE = 2; - -const int SQLITE_OPEN_SHAREDCACHE = 131072; - -const int SQLITE_OPEN_SUBJOURNAL = 8192; - -const int SQLITE_OPEN_TEMP_DB = 512; - -const int SQLITE_OPEN_TEMP_JOURNAL = 4096; - -const int SQLITE_OPEN_TRANSIENT_DB = 1024; - -const int SQLITE_OPEN_URI = 64; - -const int SQLITE_OPEN_WAL = 524288; - -const int SQLITE_PERM = 3; - -const int SQLITE_PRAGMA = 19; - -const int SQLITE_PREPARE_NORMALIZE = 2; - -const int SQLITE_PREPARE_NO_VTAB = 4; - -const int SQLITE_PREPARE_PERSISTENT = 1; - -const int SQLITE_PROTOCOL = 15; - -const int SQLITE_RANGE = 25; - -const int SQLITE_READ = 20; - -const int SQLITE_READONLY = 8; - -const int SQLITE_READONLY_CANTINIT = 1288; - -const int SQLITE_READONLY_CANTLOCK = 520; - -const int SQLITE_READONLY_DBMOVED = 1032; - -const int SQLITE_READONLY_DIRECTORY = 1544; - -const int SQLITE_READONLY_RECOVERY = 264; - -const int SQLITE_READONLY_ROLLBACK = 776; - -const int SQLITE_RECURSIVE = 33; - -const int SQLITE_REINDEX = 27; - -const int SQLITE_REPLACE = 5; - -const int SQLITE_ROLLBACK = 1; - -const int SQLITE_ROW = 100; - -const int SQLITE_SAVEPOINT = 32; - -const int SQLITE_SCANSTAT_EST = 2; - -const int SQLITE_SCANSTAT_EXPLAIN = 4; - -const int SQLITE_SCANSTAT_NAME = 3; - -const int SQLITE_SCANSTAT_NLOOP = 0; - -const int SQLITE_SCANSTAT_NVISIT = 1; - -const int SQLITE_SCANSTAT_SELECTID = 5; - -const int SQLITE_SCHEMA = 17; - -const int SQLITE_SELECT = 21; - -const int SQLITE_SERIALIZE_NOCOPY = 1; - -const int SQLITE_SET_LOCKPROXYFILE = 3; - -const int SQLITE_SHM_EXCLUSIVE = 8; - -const int SQLITE_SHM_LOCK = 2; - -const int SQLITE_SHM_NLOCK = 8; - -const int SQLITE_SHM_SHARED = 4; - -const int SQLITE_SHM_UNLOCK = 1; - -const String SQLITE_SOURCE_ID = - '2020-06-18 14:00:33 7ebdfa80be8e8e73324b8d66b3460222eb74c7e9dfd655b48d6ca7e1933cc8fd'; - -const int SQLITE_STATUS_MALLOC_COUNT = 9; - -const int SQLITE_STATUS_MALLOC_SIZE = 5; - -const int SQLITE_STATUS_MEMORY_USED = 0; - -const int SQLITE_STATUS_PAGECACHE_OVERFLOW = 2; - -const int SQLITE_STATUS_PAGECACHE_SIZE = 7; - -const int SQLITE_STATUS_PAGECACHE_USED = 1; - -const int SQLITE_STATUS_PARSER_STACK = 6; - -const int SQLITE_STATUS_SCRATCH_OVERFLOW = 4; - -const int SQLITE_STATUS_SCRATCH_SIZE = 8; - -const int SQLITE_STATUS_SCRATCH_USED = 3; - -const int SQLITE_STMTSTATUS_AUTOINDEX = 3; - -const int SQLITE_STMTSTATUS_FULLSCAN_STEP = 1; - -const int SQLITE_STMTSTATUS_MEMUSED = 99; - -const int SQLITE_STMTSTATUS_REPREPARE = 5; - -const int SQLITE_STMTSTATUS_RUN = 6; - -const int SQLITE_STMTSTATUS_SORT = 2; - -const int SQLITE_STMTSTATUS_VM_STEP = 4; - -const int SQLITE_SUBTYPE = 1048576; - -const int SQLITE_SYNC_DATAONLY = 16; - -const int SQLITE_SYNC_FULL = 3; - -const int SQLITE_SYNC_NORMAL = 2; - -const int SQLITE_TESTCTRL_ALWAYS = 13; - -const int SQLITE_TESTCTRL_ASSERT = 12; - -const int SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS = 10; - -const int SQLITE_TESTCTRL_BITVEC_TEST = 8; - -const int SQLITE_TESTCTRL_BYTEORDER = 22; - -const int SQLITE_TESTCTRL_EXPLAIN_STMT = 19; - -const int SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS = 29; - -const int SQLITE_TESTCTRL_FAULT_INSTALL = 9; - -const int SQLITE_TESTCTRL_FIRST = 5; - -const int SQLITE_TESTCTRL_IMPOSTER = 25; - -const int SQLITE_TESTCTRL_INTERNAL_FUNCTIONS = 17; - -const int SQLITE_TESTCTRL_ISINIT = 23; - -const int SQLITE_TESTCTRL_ISKEYWORD = 16; - -const int SQLITE_TESTCTRL_LAST = 29; - -const int SQLITE_TESTCTRL_LOCALTIME_FAULT = 18; - -const int SQLITE_TESTCTRL_NEVER_CORRUPT = 20; - -const int SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD = 19; - -const int SQLITE_TESTCTRL_OPTIMIZATIONS = 15; - -const int SQLITE_TESTCTRL_PARSER_COVERAGE = 26; - -const int SQLITE_TESTCTRL_PENDING_BYTE = 11; - -const int SQLITE_TESTCTRL_PRNG_RESET = 7; - -const int SQLITE_TESTCTRL_PRNG_RESTORE = 6; - -const int SQLITE_TESTCTRL_PRNG_SAVE = 5; - -const int SQLITE_TESTCTRL_PRNG_SEED = 28; - -const int SQLITE_TESTCTRL_RESERVE = 14; - -const int SQLITE_TESTCTRL_RESULT_INTREAL = 27; - -const int SQLITE_TESTCTRL_SCRATCHMALLOC = 17; - -const int SQLITE_TESTCTRL_SORTER_MMAP = 24; - -const int SQLITE_TESTCTRL_VDBE_COVERAGE = 21; - -const int SQLITE_TEXT = 3; - -const int SQLITE_TOOBIG = 18; - -const int SQLITE_TRACE_CLOSE = 8; - -const int SQLITE_TRACE_PROFILE = 2; - -const int SQLITE_TRACE_ROW = 4; - -const int SQLITE_TRACE_STMT = 1; - -const int SQLITE_TRANSACTION = 22; - -const int SQLITE_UPDATE = 23; - -const int SQLITE_UTF16 = 4; - -const int SQLITE_UTF16BE = 3; - -const int SQLITE_UTF16LE = 2; - -const int SQLITE_UTF16_ALIGNED = 8; - -const int SQLITE_UTF8 = 1; - -const String SQLITE_VERSION = '3.32.3'; - -const int SQLITE_VERSION_NUMBER = 3032003; - -const int SQLITE_VTAB_CONSTRAINT_SUPPORT = 1; - -const int SQLITE_VTAB_DIRECTONLY = 3; - -const int SQLITE_VTAB_INNOCUOUS = 2; - -const int SQLITE_WARNING = 28; - -const int SQLITE_WARNING_AUTOINDEX = 284; - -const int SQLITE_WIN32_DATA_DIRECTORY_TYPE = 1; - -const int SQLITE_WIN32_TEMP_DIRECTORY_TYPE = 2; - -final class fts5_api extends ffi.Struct { - /// Currently always set to 2 - @ffi.Int() - external int iVersion; - - /// Create a new tokenizer - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer pApi, - ffi.Pointer zName, - ffi.Pointer pContext, - ffi.Pointer pTokenizer, - ffi.Pointer< - ffi.NativeFunction)> - > - xDestroy, - ) - > - > - xCreateTokenizer; - - /// Find an existing tokenizer - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer pApi, - ffi.Pointer zName, - ffi.Pointer> ppContext, - ffi.Pointer pTokenizer, - ) - > - > - xFindTokenizer; - - /// Create a new auxiliary function - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer pApi, - ffi.Pointer zName, - ffi.Pointer pContext, - fts5_extension_function xFunction, - ffi.Pointer< - ffi.NativeFunction)> - > - xDestroy, - ) - > - > - xCreateFunction; - - static ffi.Pointer $allocate( - ffi.Allocator $allocator, { - required int iVersion, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer pApi, - ffi.Pointer zName, - ffi.Pointer pContext, - ffi.Pointer pTokenizer, - ffi.Pointer< - ffi.NativeFunction)> - > - xDestroy, - ) - > - > - xCreateTokenizer, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer pApi, - ffi.Pointer zName, - ffi.Pointer> ppContext, - ffi.Pointer pTokenizer, - ) - > - > - xFindTokenizer, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer pApi, - ffi.Pointer zName, - ffi.Pointer pContext, - fts5_extension_function xFunction, - ffi.Pointer< - ffi.NativeFunction)> - > - xDestroy, - ) - > - > - xCreateFunction, - }) => $allocator() - ..ref.iVersion = iVersion - ..ref.xCreateTokenizer = xCreateTokenizer - ..ref.xFindTokenizer = xFindTokenizer - ..ref.xCreateFunction = xCreateFunction; -} - -typedef fts5_extension_function = - ffi.Pointer>; -typedef fts5_extension_functionFunction = - ffi.Void Function( - ffi.Pointer pApi, - ffi.Pointer pFts, - ffi.Pointer pCtx, - ffi.Int nVal, - ffi.Pointer> apVal, - ); -typedef Dartfts5_extension_functionFunction = - void Function( - ffi.Pointer pApi, - ffi.Pointer pFts, - ffi.Pointer pCtx, - int nVal, - ffi.Pointer> apVal, - ); - -final class fts5_tokenizer extends ffi.Struct { - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Int, - ffi.Pointer>, - ) - > - > - xCreate; - - external ffi.Pointer< - ffi.NativeFunction)> - > - xDelete; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Int, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Int, - ) - > - >, - ) - > - > - xTokenize; - - static ffi.Pointer $allocate( - ffi.Allocator $allocator, { - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Int, - ffi.Pointer>, - ) - > - > - xCreate, - required ffi.Pointer< - ffi.NativeFunction)> - > - xDelete, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Int, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Int, - ffi.Int, - ffi.Int, - ) - > - >, - ) - > - > - xTokenize, - }) => $allocator() - ..ref.xCreate = xCreate - ..ref.xDelete = xDelete - ..ref.xTokenize = xTokenize; -} - -final class sqlite3 extends ffi.Opaque {} - -final class sqlite3_api_routines extends ffi.Opaque {} - -final class sqlite3_backup extends ffi.Opaque {} - -final class sqlite3_blob extends ffi.Opaque {} - -/// The type for a callback function. -/// This is legacy and deprecated. It is included for historical -/// compatibility and is not documented. -typedef sqlite3_callback = - ffi.Pointer>; -typedef sqlite3_callbackFunction = - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ffi.Pointer>, - ); -typedef Dartsqlite3_callbackFunction = - int Function( - ffi.Pointer, - int, - ffi.Pointer>, - ffi.Pointer>, - ); - -final class sqlite3_context extends ffi.Opaque {} - -/// CAPI3REF: Constants Defining Special Destructor Behavior -/// -/// These are special values for the destructor that is passed in as the -/// final argument to routines like [sqlite3_result_blob()]. ^If the destructor -/// argument is SQLITE_STATIC, it means that the content pointer is constant -/// and will never change. It does not need to be destroyed. ^The -/// SQLITE_TRANSIENT value means that the content will likely change in -/// the near future and that SQLite should make its own private copy of -/// the content before returning. -/// -/// The typedef is necessary to work around problems in certain -/// C++ compilers. -typedef sqlite3_destructor_type = - ffi.Pointer>; -typedef sqlite3_destructor_typeFunction = - ffi.Void Function(ffi.Pointer); -typedef Dartsqlite3_destructor_typeFunction = - void Function(ffi.Pointer); - -final class sqlite3_file extends ffi.Struct { - /// Methods for an open file - external ffi.Pointer pMethods; - - static ffi.Pointer $allocate( - ffi.Allocator $allocator, { - required ffi.Pointer pMethods, - }) => $allocator()..ref.pMethods = pMethods; -} - -final class sqlite3_index_constraint extends ffi.Struct { - /// Column constrained. -1 for ROWID - @ffi.Int() - external int iColumn; - - /// Constraint operator - @ffi.UnsignedChar() - external int op; - - /// True if this constraint is usable - @ffi.UnsignedChar() - external int usable; - - /// Used internally - xBestIndex should ignore - @ffi.Int() - external int iTermOffset; - - static ffi.Pointer $allocate( - ffi.Allocator $allocator, { - required int iColumn, - required int op, - required int usable, - required int iTermOffset, - }) => $allocator() - ..ref.iColumn = iColumn - ..ref.op = op - ..ref.usable = usable - ..ref.iTermOffset = iTermOffset; -} - -/// Outputs -final class sqlite3_index_constraint_usage extends ffi.Struct { - /// if >0, constraint is part of argv to xFilter - @ffi.Int() - external int argvIndex; - - /// Do not code a test for this constraint - @ffi.UnsignedChar() - external int omit; - - static ffi.Pointer $allocate( - ffi.Allocator $allocator, { - required int argvIndex, - required int omit, - }) => $allocator() - ..ref.argvIndex = argvIndex - ..ref.omit = omit; -} - -/// CAPI3REF: Virtual Table Indexing Information -/// KEYWORDS: sqlite3_index_info -/// -/// The sqlite3_index_info structure and its substructures is used as part -/// of the [virtual table] interface to -/// pass information into and receive the reply from the [xBestIndex] -/// method of a [virtual table module]. The fields under **Inputs** are the -/// inputs to xBestIndex and are read-only. xBestIndex inserts its -/// results into the **Outputs** fields. -/// -/// ^(The aConstraint[] array records WHERE clause constraints of the form: -/// -///
column OP expr
-/// -/// where OP is =, <, <=, >, or >=.)^ ^(The particular operator is -/// stored in aConstraint[].op using one of the -/// [SQLITE_INDEX_CONSTRAINT_EQ | SQLITE_INDEX_CONSTRAINT_ values].)^ -/// ^(The index of the column is stored in -/// aConstraint[].iColumn.)^ ^(aConstraint[].usable is TRUE if the -/// expr on the right-hand side can be evaluated (and thus the constraint -/// is usable) and false if it cannot.)^ -/// -/// ^The optimizer automatically inverts terms of the form "expr OP column" -/// and makes other simplifications to the WHERE clause in an attempt to -/// get as many WHERE clause terms into the form shown above as possible. -/// ^The aConstraint[] array only reports WHERE clause terms that are -/// relevant to the particular virtual table being queried. -/// -/// ^Information about the ORDER BY clause is stored in aOrderBy[]. -/// ^Each term of aOrderBy records a column of the ORDER BY clause. -/// -/// The colUsed field indicates which columns of the virtual table may be -/// required by the current scan. Virtual table columns are numbered from -/// zero in the order in which they appear within the CREATE TABLE statement -/// passed to sqlite3_declare_vtab(). For the first 63 columns (columns 0-62), -/// the corresponding bit is set within the colUsed mask if the column may be -/// required by SQLite. If the table has at least 64 columns and any column -/// to the right of the first 63 is required, then bit 63 of colUsed is also -/// set. In other words, column iCol may be required if the expression -/// (colUsed & ((sqlite3_uint64)1 << (iCol>=63 ? 63 : iCol))) evaluates to -/// non-zero. -/// -/// The [xBestIndex] method must fill aConstraintUsage[] with information -/// about what parameters to pass to xFilter. ^If argvIndex>0 then -/// the right-hand side of the corresponding aConstraint[] is evaluated -/// and becomes the argvIndex-th entry in argv. ^(If aConstraintUsage[].omit -/// is true, then the constraint is assumed to be fully handled by the -/// virtual table and might not be checked again by the byte code.)^ ^(The -/// aConstraintUsage[].omit flag is an optimization hint. When the omit flag -/// is left in its default setting of false, the constraint will always be -/// checked separately in byte code. If the omit flag is change to true, then -/// the constraint may or may not be checked in byte code. In other words, -/// when the omit flag is true there is no guarantee that the constraint will -/// not be checked again using byte code.)^ -/// -/// ^The idxNum and idxPtr values are recorded and passed into the -/// [xFilter] method. -/// ^[sqlite3_free()] is used to free idxPtr if and only if -/// needToFreeIdxPtr is true. -/// -/// ^The orderByConsumed means that output from [xFilter]/[xNext] will occur in -/// the correct order to satisfy the ORDER BY clause so that no separate -/// sorting step is required. -/// -/// ^The estimatedCost value is an estimate of the cost of a particular -/// strategy. A cost of N indicates that the cost of the strategy is similar -/// to a linear scan of an SQLite table with N rows. A cost of log(N) -/// indicates that the expense of the operation is similar to that of a -/// binary search on a unique indexed field of an SQLite table with N rows. -/// -/// ^The estimatedRows value is an estimate of the number of rows that -/// will be returned by the strategy. -/// -/// The xBestIndex method may optionally populate the idxFlags field with a -/// mask of SQLITE_INDEX_SCAN_* flags. Currently there is only one such flag - -/// SQLITE_INDEX_SCAN_UNIQUE. If the xBestIndex method sets this flag, SQLite -/// assumes that the strategy may visit at most one row. -/// -/// Additionally, if xBestIndex sets the SQLITE_INDEX_SCAN_UNIQUE flag, then -/// SQLite also assumes that if a call to the xUpdate() method is made as -/// part of the same statement to delete or update a virtual table row and the -/// implementation returns SQLITE_CONSTRAINT, then there is no need to rollback -/// any database changes. In other words, if the xUpdate() returns -/// SQLITE_CONSTRAINT, the database contents must be exactly as they were -/// before xUpdate was called. By contrast, if SQLITE_INDEX_SCAN_UNIQUE is not -/// set and xUpdate returns SQLITE_CONSTRAINT, any database changes made by -/// the xUpdate method are automatically rolled back by SQLite. -/// -/// IMPORTANT: The estimatedRows field was added to the sqlite3_index_info -/// structure for SQLite [version 3.8.2] ([dateof:3.8.2]). -/// If a virtual table extension is -/// used with an SQLite version earlier than 3.8.2, the results of attempting -/// to read or write the estimatedRows field are undefined (but are likely -/// to include crashing the application). The estimatedRows field should -/// therefore only be used if [sqlite3_libversion_number()] returns a -/// value greater than or equal to 3008002. Similarly, the idxFlags field -/// was added for [version 3.9.0] ([dateof:3.9.0]). -/// It may therefore only be used if -/// sqlite3_libversion_number() returns a value greater than or equal to -/// 3009000. -final class sqlite3_index_info extends ffi.Struct { - /// Number of entries in aConstraint - @ffi.Int() - external int nConstraint; - - /// Table of WHERE clause constraints - external ffi.Pointer aConstraint; - - /// Number of terms in the ORDER BY clause - @ffi.Int() - external int nOrderBy; - - /// The ORDER BY clause - external ffi.Pointer aOrderBy; - - external ffi.Pointer aConstraintUsage; - - /// Number used to identify the index - @ffi.Int() - external int idxNum; - - /// String, possibly obtained from sqlite3_malloc - external ffi.Pointer idxStr; - - /// Free idxStr using sqlite3_free() if true - @ffi.Int() - external int needToFreeIdxStr; - - /// True if output is already ordered - @ffi.Int() - external int orderByConsumed; - - /// Estimated cost of using this index - @ffi.Double() - external double estimatedCost; - - /// Estimated number of rows returned - @sqlite3_int64() - external int estimatedRows; - - /// Mask of SQLITE_INDEX_SCAN_* flags - @ffi.Int() - external int idxFlags; - - /// Input: Mask of columns used by statement - @sqlite3_uint64() - external int colUsed; - - static ffi.Pointer $allocate( - ffi.Allocator $allocator, { - required int nConstraint, - required ffi.Pointer aConstraint, - required int nOrderBy, - required ffi.Pointer aOrderBy, - required ffi.Pointer aConstraintUsage, - required int idxNum, - required ffi.Pointer idxStr, - required int needToFreeIdxStr, - required int orderByConsumed, - required double estimatedCost, - required int estimatedRows, - required int idxFlags, - required int colUsed, - }) => $allocator() - ..ref.nConstraint = nConstraint - ..ref.aConstraint = aConstraint - ..ref.nOrderBy = nOrderBy - ..ref.aOrderBy = aOrderBy - ..ref.aConstraintUsage = aConstraintUsage - ..ref.idxNum = idxNum - ..ref.idxStr = idxStr - ..ref.needToFreeIdxStr = needToFreeIdxStr - ..ref.orderByConsumed = orderByConsumed - ..ref.estimatedCost = estimatedCost - ..ref.estimatedRows = estimatedRows - ..ref.idxFlags = idxFlags - ..ref.colUsed = colUsed; -} - -final class sqlite3_index_orderby extends ffi.Struct { - /// Column number - @ffi.Int() - external int iColumn; - - /// True for DESC. False for ASC. - @ffi.UnsignedChar() - external int desc; - - static ffi.Pointer $allocate( - ffi.Allocator $allocator, { - required int iColumn, - required int desc, - }) => $allocator() - ..ref.iColumn = iColumn - ..ref.desc = desc; -} - -typedef sqlite3_int64 = sqlite_int64; - -final class sqlite3_io_methods extends ffi.Opaque {} - -final class sqlite3_mem_methods extends ffi.Struct { - /// Memory allocation function - external ffi.Pointer< - ffi.NativeFunction Function(ffi.Int)> - > - xMalloc; - - /// Free a prior allocation - external ffi.Pointer< - ffi.NativeFunction)> - > - xFree; - - /// Resize an allocation - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Int) - > - > - xRealloc; - - /// Return the size of an allocation - external ffi.Pointer< - ffi.NativeFunction)> - > - xSize; - - /// Round up request size to allocation size - external ffi.Pointer> xRoundup; - - /// Initialize the memory allocator - external ffi.Pointer< - ffi.NativeFunction)> - > - xInit; - - /// Deinitialize the memory allocator - external ffi.Pointer< - ffi.NativeFunction)> - > - xShutdown; - - /// Argument to xInit() and xShutdown() - external ffi.Pointer pAppData; - - static ffi.Pointer $allocate( - ffi.Allocator $allocator, { - required ffi.Pointer< - ffi.NativeFunction Function(ffi.Int)> - > - xMalloc, - required ffi.Pointer< - ffi.NativeFunction)> - > - xFree, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Int) - > - > - xRealloc, - required ffi.Pointer< - ffi.NativeFunction)> - > - xSize, - required ffi.Pointer> - xRoundup, - required ffi.Pointer< - ffi.NativeFunction)> - > - xInit, - required ffi.Pointer< - ffi.NativeFunction)> - > - xShutdown, - required ffi.Pointer pAppData, - }) => $allocator() - ..ref.xMalloc = xMalloc - ..ref.xFree = xFree - ..ref.xRealloc = xRealloc - ..ref.xSize = xSize - ..ref.xRoundup = xRoundup - ..ref.xInit = xInit - ..ref.xShutdown = xShutdown - ..ref.pAppData = pAppData; -} - -/// CAPI3REF: Virtual Table Object -/// KEYWORDS: sqlite3_module {virtual table module} -/// -/// This structure, sometimes called a "virtual table module", -/// defines the implementation of a [virtual table]. -/// This structure consists mostly of methods for the module. -/// -/// ^A virtual table module is created by filling in a persistent -/// instance of this structure and passing a pointer to that instance -/// to [sqlite3_create_module()] or [sqlite3_create_module_v2()]. -/// ^The registration remains valid until it is replaced by a different -/// module or until the [database connection] closes. The content -/// of this structure must not change while it is registered with -/// any database connection. -final class sqlite3_module extends ffi.Struct { - @ffi.Int() - external int iVersion; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer>, - ) - > - > - xCreate; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer>, - ) - > - > - xConnect; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ) - > - > - xBestIndex; - - external ffi.Pointer< - ffi.NativeFunction pVTab)> - > - xDisconnect; - - external ffi.Pointer< - ffi.NativeFunction pVTab)> - > - xDestroy; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer pVTab, - ffi.Pointer> ppCursor, - ) - > - > - xOpen; - - external ffi.Pointer< - ffi.NativeFunction)> - > - xClose; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ) - > - > - xFilter; - - external ffi.Pointer< - ffi.NativeFunction)> - > - xNext; - - external ffi.Pointer< - ffi.NativeFunction)> - > - xEof; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ) - > - > - xColumn; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ) - > - > - xRowid; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ffi.Pointer, - ) - > - > - xUpdate; - - external ffi.Pointer< - ffi.NativeFunction pVTab)> - > - xBegin; - - external ffi.Pointer< - ffi.NativeFunction pVTab)> - > - xSync; - - external ffi.Pointer< - ffi.NativeFunction pVTab)> - > - xCommit; - - external ffi.Pointer< - ffi.NativeFunction pVTab)> - > - xRollback; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer pVtab, - ffi.Int nArg, - ffi.Pointer zName, - ffi.Pointer< - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ) - > - > - > - pxFunc, - ffi.Pointer> ppArg, - ) - > - > - xFindFunction; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer pVtab, - ffi.Pointer zNew, - ) - > - > - xRename; - - /// The methods above are in version 1 of the sqlite_module object. Those - /// below are for version 2 and greater. - external ffi.Pointer< - ffi.NativeFunction, ffi.Int)> - > - xSavepoint; - - external ffi.Pointer< - ffi.NativeFunction, ffi.Int)> - > - xRelease; - - external ffi.Pointer< - ffi.NativeFunction, ffi.Int)> - > - xRollbackTo; - - /// The methods above are in versions 1 and 2 of the sqlite_module object. - /// Those below are for version 3 and greater. - external ffi.Pointer< - ffi.NativeFunction)> - > - xShadowName; - - static ffi.Pointer $allocate( - ffi.Allocator $allocator, { - required int iVersion, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer>, - ) - > - > - xCreate, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer>, - ) - > - > - xConnect, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ) - > - > - xBestIndex, - required ffi.Pointer< - ffi.NativeFunction pVTab)> - > - xDisconnect, - required ffi.Pointer< - ffi.NativeFunction pVTab)> - > - xDestroy, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer pVTab, - ffi.Pointer> ppCursor, - ) - > - > - xOpen, - required ffi.Pointer< - ffi.NativeFunction)> - > - xClose, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ) - > - > - xFilter, - required ffi.Pointer< - ffi.NativeFunction)> - > - xNext, - required ffi.Pointer< - ffi.NativeFunction)> - > - xEof, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ) - > - > - xColumn, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ) - > - > - xRowid, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ffi.Pointer, - ) - > - > - xUpdate, - required ffi.Pointer< - ffi.NativeFunction pVTab)> - > - xBegin, - required ffi.Pointer< - ffi.NativeFunction pVTab)> - > - xSync, - required ffi.Pointer< - ffi.NativeFunction pVTab)> - > - xCommit, - required ffi.Pointer< - ffi.NativeFunction pVTab)> - > - xRollback, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer pVtab, - ffi.Int nArg, - ffi.Pointer zName, - ffi.Pointer< - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ) - > - > - > - pxFunc, - ffi.Pointer> ppArg, - ) - > - > - xFindFunction, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer pVtab, - ffi.Pointer zNew, - ) - > - > - xRename, - required ffi.Pointer< - ffi.NativeFunction, ffi.Int)> - > - xSavepoint, - required ffi.Pointer< - ffi.NativeFunction, ffi.Int)> - > - xRelease, - required ffi.Pointer< - ffi.NativeFunction, ffi.Int)> - > - xRollbackTo, - required ffi.Pointer< - ffi.NativeFunction)> - > - xShadowName, - }) => $allocator() - ..ref.iVersion = iVersion - ..ref.xCreate = xCreate - ..ref.xConnect = xConnect - ..ref.xBestIndex = xBestIndex - ..ref.xDisconnect = xDisconnect - ..ref.xDestroy = xDestroy - ..ref.xOpen = xOpen - ..ref.xClose = xClose - ..ref.xFilter = xFilter - ..ref.xNext = xNext - ..ref.xEof = xEof - ..ref.xColumn = xColumn - ..ref.xRowid = xRowid - ..ref.xUpdate = xUpdate - ..ref.xBegin = xBegin - ..ref.xSync = xSync - ..ref.xCommit = xCommit - ..ref.xRollback = xRollback - ..ref.xFindFunction = xFindFunction - ..ref.xRename = xRename - ..ref.xSavepoint = xSavepoint - ..ref.xRelease = xRelease - ..ref.xRollbackTo = xRollbackTo - ..ref.xShadowName = xShadowName; -} - -final class sqlite3_mutex extends ffi.Opaque {} - -final class sqlite3_mutex_methods extends ffi.Struct { - external ffi.Pointer> xMutexInit; - - external ffi.Pointer> xMutexEnd; - - external ffi.Pointer< - ffi.NativeFunction Function(ffi.Int)> - > - xMutexAlloc; - - external ffi.Pointer< - ffi.NativeFunction)> - > - xMutexFree; - - external ffi.Pointer< - ffi.NativeFunction)> - > - xMutexEnter; - - external ffi.Pointer< - ffi.NativeFunction)> - > - xMutexTry; - - external ffi.Pointer< - ffi.NativeFunction)> - > - xMutexLeave; - - external ffi.Pointer< - ffi.NativeFunction)> - > - xMutexHeld; - - external ffi.Pointer< - ffi.NativeFunction)> - > - xMutexNotheld; - - static ffi.Pointer $allocate( - ffi.Allocator $allocator, { - required ffi.Pointer> xMutexInit, - required ffi.Pointer> xMutexEnd, - required ffi.Pointer< - ffi.NativeFunction Function(ffi.Int)> - > - xMutexAlloc, - required ffi.Pointer< - ffi.NativeFunction)> - > - xMutexFree, - required ffi.Pointer< - ffi.NativeFunction)> - > - xMutexEnter, - required ffi.Pointer< - ffi.NativeFunction)> - > - xMutexTry, - required ffi.Pointer< - ffi.NativeFunction)> - > - xMutexLeave, - required ffi.Pointer< - ffi.NativeFunction)> - > - xMutexHeld, - required ffi.Pointer< - ffi.NativeFunction)> - > - xMutexNotheld, - }) => $allocator() - ..ref.xMutexInit = xMutexInit - ..ref.xMutexEnd = xMutexEnd - ..ref.xMutexAlloc = xMutexAlloc - ..ref.xMutexFree = xMutexFree - ..ref.xMutexEnter = xMutexEnter - ..ref.xMutexTry = xMutexTry - ..ref.xMutexLeave = xMutexLeave - ..ref.xMutexHeld = xMutexHeld - ..ref.xMutexNotheld = xMutexNotheld; -} - -final class sqlite3_pcache extends ffi.Opaque {} - -final class sqlite3_pcache_methods extends ffi.Struct { - external ffi.Pointer pArg; - - external ffi.Pointer< - ffi.NativeFunction)> - > - xInit; - - external ffi.Pointer< - ffi.NativeFunction)> - > - xShutdown; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Int szPage, ffi.Int bPurgeable) - > - > - xCreate; - - external ffi.Pointer< - ffi.NativeFunction, ffi.Int)> - > - xCachesize; - - external ffi.Pointer< - ffi.NativeFunction)> - > - xPagecount; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.UnsignedInt, - ffi.Int, - ) - > - > - xFetch; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ) - > - > - xUnpin; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.UnsignedInt, - ) - > - > - xRekey; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.UnsignedInt) - > - > - xTruncate; - - external ffi.Pointer< - ffi.NativeFunction)> - > - xDestroy; - - static ffi.Pointer $allocate( - ffi.Allocator $allocator, { - required ffi.Pointer pArg, - required ffi.Pointer< - ffi.NativeFunction)> - > - xInit, - required ffi.Pointer< - ffi.NativeFunction)> - > - xShutdown, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Int szPage, ffi.Int bPurgeable) - > - > - xCreate, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Int) - > - > - xCachesize, - required ffi.Pointer< - ffi.NativeFunction)> - > - xPagecount, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.UnsignedInt, - ffi.Int, - ) - > - > - xFetch, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ) - > - > - xUnpin, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.UnsignedInt, - ) - > - > - xRekey, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.UnsignedInt) - > - > - xTruncate, - required ffi.Pointer< - ffi.NativeFunction)> - > - xDestroy, - }) => $allocator() - ..ref.pArg = pArg - ..ref.xInit = xInit - ..ref.xShutdown = xShutdown - ..ref.xCreate = xCreate - ..ref.xCachesize = xCachesize - ..ref.xPagecount = xPagecount - ..ref.xFetch = xFetch - ..ref.xUnpin = xUnpin - ..ref.xRekey = xRekey - ..ref.xTruncate = xTruncate - ..ref.xDestroy = xDestroy; -} - -final class sqlite3_pcache_methods2 extends ffi.Struct { - @ffi.Int() - external int iVersion; - - external ffi.Pointer pArg; - - external ffi.Pointer< - ffi.NativeFunction)> - > - xInit; - - external ffi.Pointer< - ffi.NativeFunction)> - > - xShutdown; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int szPage, - ffi.Int szExtra, - ffi.Int bPurgeable, - ) - > - > - xCreate; - - external ffi.Pointer< - ffi.NativeFunction, ffi.Int)> - > - xCachesize; - - external ffi.Pointer< - ffi.NativeFunction)> - > - xPagecount; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.UnsignedInt, - ffi.Int, - ) - > - > - xFetch; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ) - > - > - xUnpin; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.UnsignedInt, - ) - > - > - xRekey; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.UnsignedInt) - > - > - xTruncate; - - external ffi.Pointer< - ffi.NativeFunction)> - > - xDestroy; - - external ffi.Pointer< - ffi.NativeFunction)> - > - xShrink; - - static ffi.Pointer $allocate( - ffi.Allocator $allocator, { - required int iVersion, - required ffi.Pointer pArg, - required ffi.Pointer< - ffi.NativeFunction)> - > - xInit, - required ffi.Pointer< - ffi.NativeFunction)> - > - xShutdown, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int szPage, - ffi.Int szExtra, - ffi.Int bPurgeable, - ) - > - > - xCreate, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Int) - > - > - xCachesize, - required ffi.Pointer< - ffi.NativeFunction)> - > - xPagecount, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.UnsignedInt, - ffi.Int, - ) - > - > - xFetch, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ) - > - > - xUnpin, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.UnsignedInt, - ) - > - > - xRekey, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.UnsignedInt) - > - > - xTruncate, - required ffi.Pointer< - ffi.NativeFunction)> - > - xDestroy, - required ffi.Pointer< - ffi.NativeFunction)> - > - xShrink, - }) => $allocator() - ..ref.iVersion = iVersion - ..ref.pArg = pArg - ..ref.xInit = xInit - ..ref.xShutdown = xShutdown - ..ref.xCreate = xCreate - ..ref.xCachesize = xCachesize - ..ref.xPagecount = xPagecount - ..ref.xFetch = xFetch - ..ref.xUnpin = xUnpin - ..ref.xRekey = xRekey - ..ref.xTruncate = xTruncate - ..ref.xDestroy = xDestroy - ..ref.xShrink = xShrink; -} - -final class sqlite3_pcache_page extends ffi.Struct { - /// The content of the page - external ffi.Pointer pBuf; - - /// Extra information associated with the page - external ffi.Pointer pExtra; - - static ffi.Pointer $allocate( - ffi.Allocator $allocator, { - required ffi.Pointer pBuf, - required ffi.Pointer pExtra, - }) => $allocator() - ..ref.pBuf = pBuf - ..ref.pExtra = pExtra; -} - -typedef sqlite3_rtree_dbl = ffi.Double; -typedef Dartsqlite3_rtree_dbl = double; - -/// A pointer to a structure of the following type is passed as the first -/// argument to callbacks registered using rtree_geometry_callback(). -final class sqlite3_rtree_geometry extends ffi.Struct { - /// Copy of pContext passed to s_r_g_c() - external ffi.Pointer pContext; - - /// Size of array aParam[] - @ffi.Int() - external int nParam; - - /// Parameters passed to SQL geom function - external ffi.Pointer aParam; - - /// Callback implementation user data - external ffi.Pointer pUser; - - /// Called by SQLite to clean up pUser - external ffi.Pointer< - ffi.NativeFunction)> - > - xDelUser; - - static ffi.Pointer $allocate( - ffi.Allocator $allocator, { - required ffi.Pointer pContext, - required int nParam, - required ffi.Pointer aParam, - required ffi.Pointer pUser, - required ffi.Pointer< - ffi.NativeFunction)> - > - xDelUser, - }) => $allocator() - ..ref.pContext = pContext - ..ref.nParam = nParam - ..ref.aParam = aParam - ..ref.pUser = pUser - ..ref.xDelUser = xDelUser; -} - -/// A pointer to a structure of the following type is passed as the -/// argument to scored geometry callback registered using -/// sqlite3_rtree_query_callback(). -/// -/// Note that the first 5 fields of this structure are identical to -/// sqlite3_rtree_geometry. This structure is a subclass of -/// sqlite3_rtree_geometry. -final class sqlite3_rtree_query_info extends ffi.Struct { - /// pContext from when function registered - external ffi.Pointer pContext; - - /// Number of function parameters - @ffi.Int() - external int nParam; - - /// value of function parameters - external ffi.Pointer aParam; - - /// callback can use this, if desired - external ffi.Pointer pUser; - - /// function to free pUser - external ffi.Pointer< - ffi.NativeFunction)> - > - xDelUser; - - /// Coordinates of node or entry to check - external ffi.Pointer aCoord; - - /// Number of pending entries in the queue - external ffi.Pointer anQueue; - - /// Number of coordinates - @ffi.Int() - external int nCoord; - - /// Level of current node or entry - @ffi.Int() - external int iLevel; - - /// The largest iLevel value in the tree - @ffi.Int() - external int mxLevel; - - /// Rowid for current entry - @sqlite3_int64() - external int iRowid; - - /// Score of parent node - @sqlite3_rtree_dbl() - external double rParentScore; - - /// Visibility of parent node - @ffi.Int() - external int eParentWithin; - - /// OUT: Visibility - @ffi.Int() - external int eWithin; - - /// OUT: Write the score here - @sqlite3_rtree_dbl() - external double rScore; - - /// Original SQL values of parameters - external ffi.Pointer> apSqlParam; - - static ffi.Pointer $allocate( - ffi.Allocator $allocator, { - required ffi.Pointer pContext, - required int nParam, - required ffi.Pointer aParam, - required ffi.Pointer pUser, - required ffi.Pointer< - ffi.NativeFunction)> - > - xDelUser, - required ffi.Pointer aCoord, - required ffi.Pointer anQueue, - required int nCoord, - required int iLevel, - required int mxLevel, - required int iRowid, - required double rParentScore, - required int eParentWithin, - required int eWithin, - required double rScore, - required ffi.Pointer> apSqlParam, - }) => $allocator() - ..ref.pContext = pContext - ..ref.nParam = nParam - ..ref.aParam = aParam - ..ref.pUser = pUser - ..ref.xDelUser = xDelUser - ..ref.aCoord = aCoord - ..ref.anQueue = anQueue - ..ref.nCoord = nCoord - ..ref.iLevel = iLevel - ..ref.mxLevel = mxLevel - ..ref.iRowid = iRowid - ..ref.rParentScore = rParentScore - ..ref.eParentWithin = eParentWithin - ..ref.eWithin = eWithin - ..ref.rScore = rScore - ..ref.apSqlParam = apSqlParam; -} - -/// CAPI3REF: Database Snapshot -/// KEYWORDS: {snapshot} {sqlite3_snapshot} -/// -/// An instance of the snapshot object records the state of a [WAL mode] -/// database for some specific point in history. -/// -/// In [WAL mode], multiple [database connections] that are open on the -/// same database file can each be reading a different historical version -/// of the database file. When a [database connection] begins a read -/// transaction, that connection sees an unchanging copy of the database -/// as it existed for the point in time when the transaction first started. -/// Subsequent changes to the database from other connections are not seen -/// by the reader until a new read transaction is started. -/// -/// The sqlite3_snapshot object records state information about an historical -/// version of the database file so that it is possible to later open a new read -/// transaction that sees that historical version of the database rather than -/// the most recent version. -final class sqlite3_snapshot extends ffi.Struct { - @ffi.Array.multi([48]) - external ffi.Array hidden; -} - -final class sqlite3_stmt extends ffi.Opaque {} - -final class sqlite3_str extends ffi.Opaque {} - -typedef sqlite3_syscall_ptr = - ffi.Pointer>; -typedef sqlite3_syscall_ptrFunction = ffi.Void Function(); -typedef Dartsqlite3_syscall_ptrFunction = void Function(); -typedef sqlite3_uint64 = sqlite_uint64; - -final class sqlite3_value extends ffi.Opaque {} - -final class sqlite3_vfs extends ffi.Struct { - /// Structure version number (currently 3) - @ffi.Int() - external int iVersion; - - /// Size of subclassed sqlite3_file - @ffi.Int() - external int szOsFile; - - /// Maximum file pathname length - @ffi.Int() - external int mxPathname; - - /// Next registered VFS - external ffi.Pointer pNext; - - /// Name of this virtual file system - external ffi.Pointer zName; - - /// Pointer to application-specific data - external ffi.Pointer pAppData; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ) - > - > - xOpen; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, ffi.Int) - > - > - xDelete; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ) - > - > - xAccess; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ) - > - > - xFullPathname; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - > - > - xDlOpen; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ) - > - > - xDlError; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer> Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - > - xDlSym; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer) - > - > - xDlClose; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Pointer) - > - > - xRandomness; - - external ffi.Pointer< - ffi.NativeFunction, ffi.Int)> - > - xSleep; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer) - > - > - xCurrentTime; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Pointer) - > - > - xGetLastError; - - /// The methods above are in version 1 of the sqlite_vfs object - /// definition. Those that follow are added in version 2 or later - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer) - > - > - xCurrentTimeInt64; - - /// The methods above are in versions 1 and 2 of the sqlite_vfs object. - /// Those below are for version 3 and greater. - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - sqlite3_syscall_ptr, - ) - > - > - xSetSystemCall; - - external ffi.Pointer< - ffi.NativeFunction< - sqlite3_syscall_ptr Function( - ffi.Pointer, - ffi.Pointer, - ) - > - > - xGetSystemCall; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - > - > - xNextSystemCall; - - static ffi.Pointer $allocate( - ffi.Allocator $allocator, { - required int iVersion, - required int szOsFile, - required int mxPathname, - required ffi.Pointer pNext, - required ffi.Pointer zName, - required ffi.Pointer pAppData, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ) - > - > - xOpen, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ) - > - > - xDelete, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ) - > - > - xAccess, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ) - > - > - xFullPathname, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - > - > - xDlOpen, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ) - > - > - xDlError, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer> Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - > - xDlSym, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer) - > - > - xDlClose, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ) - > - > - xRandomness, - required ffi.Pointer< - ffi.NativeFunction, ffi.Int)> - > - xSleep, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer) - > - > - xCurrentTime, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer, - ) - > - > - xGetLastError, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer) - > - > - xCurrentTimeInt64, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - sqlite3_syscall_ptr, - ) - > - > - xSetSystemCall, - required ffi.Pointer< - ffi.NativeFunction< - sqlite3_syscall_ptr Function( - ffi.Pointer, - ffi.Pointer, - ) - > - > - xGetSystemCall, - required ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - > - > - xNextSystemCall, - }) => $allocator() - ..ref.iVersion = iVersion - ..ref.szOsFile = szOsFile - ..ref.mxPathname = mxPathname - ..ref.pNext = pNext - ..ref.zName = zName - ..ref.pAppData = pAppData - ..ref.xOpen = xOpen - ..ref.xDelete = xDelete - ..ref.xAccess = xAccess - ..ref.xFullPathname = xFullPathname - ..ref.xDlOpen = xDlOpen - ..ref.xDlError = xDlError - ..ref.xDlSym = xDlSym - ..ref.xDlClose = xDlClose - ..ref.xRandomness = xRandomness - ..ref.xSleep = xSleep - ..ref.xCurrentTime = xCurrentTime - ..ref.xGetLastError = xGetLastError - ..ref.xCurrentTimeInt64 = xCurrentTimeInt64 - ..ref.xSetSystemCall = xSetSystemCall - ..ref.xGetSystemCall = xGetSystemCall - ..ref.xNextSystemCall = xNextSystemCall; -} - -/// CAPI3REF: Virtual Table Instance Object -/// KEYWORDS: sqlite3_vtab -/// -/// Every [virtual table module] implementation uses a subclass -/// of this object to describe a particular instance -/// of the [virtual table]. Each subclass will -/// be tailored to the specific needs of the module implementation. -/// The purpose of this superclass is to define certain fields that are -/// common to all module implementations. -/// -/// ^Virtual tables methods can set an error message by assigning a -/// string obtained from [sqlite3_mprintf()] to zErrMsg. The method should -/// take care that any prior string is freed by a call to [sqlite3_free()] -/// prior to assigning a new string to zErrMsg. ^After the error message -/// is delivered up to the client application, the string will be automatically -/// freed by sqlite3_free() and the zErrMsg field will be zeroed. -final class sqlite3_vtab extends ffi.Struct { - /// The module for this virtual table - external ffi.Pointer pModule; - - /// Number of open cursors - @ffi.Int() - external int nRef; - - /// Error message from sqlite3_mprintf() - external ffi.Pointer zErrMsg; - - static ffi.Pointer $allocate( - ffi.Allocator $allocator, { - required ffi.Pointer pModule, - required int nRef, - required ffi.Pointer zErrMsg, - }) => $allocator() - ..ref.pModule = pModule - ..ref.nRef = nRef - ..ref.zErrMsg = zErrMsg; -} - -/// CAPI3REF: Virtual Table Cursor Object -/// KEYWORDS: sqlite3_vtab_cursor {virtual table cursor} -/// -/// Every [virtual table module] implementation uses a subclass of the -/// following structure to describe cursors that point into the -/// [virtual table] and are used -/// to loop through the virtual table. Cursors are created using the -/// [sqlite3_module.xOpen | xOpen] method of the module and are destroyed -/// by the [sqlite3_module.xClose | xClose] method. Cursors are used -/// by the [xFilter], [xNext], [xEof], [xColumn], and [xRowid] methods -/// of the module. Each module implementation will define -/// the content of a cursor structure to suit its own needs. -/// -/// This superclass exists in order to define fields of the cursor that -/// are common to all implementations. -final class sqlite3_vtab_cursor extends ffi.Struct { - /// Virtual table of this cursor - external ffi.Pointer pVtab; - - static ffi.Pointer $allocate( - ffi.Allocator $allocator, { - required ffi.Pointer pVtab, - }) => $allocator()..ref.pVtab = pVtab; -} - -typedef sqlite_int64 = ffi.LongLong; -typedef Dartsqlite_int64 = int; -typedef sqlite_uint64 = ffi.UnsignedLongLong; -typedef Dartsqlite_uint64 = int; diff --git a/pkgs/ffigen/test/large_integration_tests/large_objc_test.dart b/pkgs/ffigen/test/large_integration_tests/large_objc_test.dart index 1eb46cf241..8e7627ac4c 100644 --- a/pkgs/ffigen/test/large_integration_tests/large_objc_test.dart +++ b/pkgs/ffigen/test/large_integration_tests/large_objc_test.dart @@ -14,6 +14,7 @@ import 'dart:io'; import 'package:ffigen/ffigen.dart'; import 'package:ffigen/src/code_generator/utils.dart'; +import 'package:ffigen/src/public_ast/public_ast.dart'; import 'package:path/path.dart' as path; import 'package:test/test.dart'; @@ -32,29 +33,85 @@ Future run(String exe, List args) async { return await process.exitCode; } +class _RandomIncludeVisitor extends Visitor { + static const inclusionRatio = 0.1; + static const seed = 1234; + static const forceIncludedProtocols = {'NSTextLocation'}; + + bool _randInclude(String kind, String usr, [String? member]) => + fnvHash32('$seed.$kind.$usr.$member') < ((1 << 32) * inclusionRatio); + + @override + void visitFunc(Func node) { + if (!_randInclude('functionDecl', node.usr)) node.isExcluded = true; + } + + @override + void visitStruct(Struct node) { + if (!_randInclude('structDecl', node.usr)) node.isExcluded = true; + } + + @override + void visitUnion(Union node) { + if (!_randInclude('unionDecl', node.usr)) node.isExcluded = true; + } + + @override + void visitEnum(EnumClass node) { + if (!_randInclude('enums', node.usr)) node.isExcluded = true; + } + + @override + void visitUnnamedEnumConstant(UnnamedEnumConstant node) { + if (!_randInclude('unnamedEnumConstants', node.usr)) node.isExcluded = true; + } + + @override + void visitGlobal(Global node) { + if (!_randInclude('globals', node.usr)) node.isExcluded = true; + } + + @override + void visitTypealias(Typealias node) { + if (!_randInclude('typedefs', node.usr)) node.isExcluded = true; + } + + @override + void visitObjCInterface(ObjCInterface node) { + if (!_randInclude('objcInterfaces', node.usr)) node.isExcluded = true; + for (final m in node.methods) { + if (!_randInclude('objcInterfaces.memb', node.usr, m.originalName)) { + m.isExcluded = true; + } + } + } + + @override + void visitObjCProtocol(ObjCProtocol node) { + if (!forceIncludedProtocols.contains(node.originalName) && + !_randInclude('objcProtocols', node.usr)) { + node.isExcluded = true; + } + for (final m in node.methods) { + if (!_randInclude('objcProtocols.memb', node.usr, m.originalName)) { + m.isExcluded = true; + } + } + } + + @override + void visitObjCCategory(ObjCCategory node) { + if (!_randInclude('objcCategories', node.usr)) node.isExcluded = true; + for (final m in node.methods) { + if (!_randInclude('objcCategories.memb', node.usr, m.originalName)) { + m.isExcluded = true; + } + } + } +} + void main() { test('Large ObjC integration test', () async { - // Reducing the bindings to a random subset so that the test completes in a - // reasonable amount of time. - // TODO(https://github.com/dart-lang/sdk/issues/56247): Remove this. - const inclusionRatio = 0.1; - const seed = 1234; - bool randInclude(String kind, Declaration declaration, [String? member]) => - fnvHash32('$seed.$kind.${declaration.usr}.$member') < - ((1 << 32) * inclusionRatio); - bool Function(Declaration clazz) includeRandom( - String kind, [ - Set forceIncludes = const {}, - ]) => - (Declaration declaration) => - forceIncludes.contains(declaration.originalName) || - randInclude(kind, declaration); - bool Function(Declaration declaration, String member) includeMemberRandom( - String kind, - ) => - (Declaration clazz, String method) => - randInclude('$kind.memb', clazz, method); - final outFile = path.join( packagePathForTests, 'test', @@ -68,10 +125,8 @@ void main() { 'large_objc_bindings.m', ); - // TODO(https://github.com/dart-lang/native/issues/2517): Remove this. - const forceIncludedProtocols = {'NSTextLocation'}; - final generator = FfiGenerator( + visitors: [_RandomIncludeVisitor()], headers: Headers( entryPoints: [ Uri.file( @@ -94,42 +149,10 @@ void main() { // ignore_for_file: unused_field ''', ), - functions: () { - return Functions(include: includeRandom('functionDecl')); - }(), - structs: () { - return Structs(include: includeRandom('structDecl')); - }(), - unions: () { - return Unions(include: includeRandom('unionDecl')); - }(), - enums: () { - return Enums(include: includeRandom('enums')); - }(), - unnamedEnums: () { - return UnnamedEnums(include: includeRandom('unnamedEnumConstants')); - }(), - globals: Globals(include: includeRandom('globals')), - typedefs: Typedefs(include: includeRandom('typedefs')), objectiveC: ObjectiveC( - interfaces: Interfaces( - include: includeRandom('objcInterfaces'), - includeMember: includeMemberRandom('objcInterfaces'), - includeTransitive: false, - ), - protocols: Protocols( - include: includeRandom('objcProtocols', forceIncludedProtocols), - includeMember: includeMemberRandom('objcProtocols'), - includeTransitive: false, - ), - categories: Categories( - include: includeRandom('objcCategories'), - includeMember: includeMemberRandom('objcCategories'), - includeTransitive: false, - ), externalVersions: ExternalVersions( - ios: Versions(min: Version(12, 0, 0)), - macos: Versions(min: Version(10, 14, 0)), + ios: Versions(min: Version.parse('12.0.0')), + macos: Versions(min: Version.parse('10.14.0')), ), ), ); diff --git a/pkgs/ffigen/test/large_integration_tests/large_test.dart b/pkgs/ffigen/test/large_integration_tests/large_test.dart index edf269adeb..0b075eea1f 100644 --- a/pkgs/ffigen/test/large_integration_tests/large_test.dart +++ b/pkgs/ffigen/test/large_integration_tests/large_test.dart @@ -7,6 +7,7 @@ import 'package:ffigen/src/config_provider/config.dart'; import 'package:ffigen/src/config_provider/config_types.dart'; import 'package:ffigen/src/context.dart'; import 'package:ffigen/src/header_parser.dart'; +import 'package:ffigen/src/public_ast/public_ast.dart'; import 'package:logging/logging.dart'; import 'package:path/path.dart' as path; import 'package:test/test.dart'; @@ -63,12 +64,8 @@ void main() { 'Index.h', ].any((filename) => header.pathSegments.last == filename), ), - functions: Functions.includeAll, - structs: Structs.includeAll, - enums: Enums.includeAll, - macros: Macros.includeAll, + visitors: const [IncludeAllVisitor()], typedefs: Typedefs( - include: (_) => true, // ignore: deprecated_member_use_from_same_package imported: [ImportedType(ffiImport, 'Int64', 'int', 'time_t')], ), @@ -148,10 +145,6 @@ void main() { ], include: (Uri header) => header.pathSegments.last == 'cJSON.h', ), - functions: Functions.includeAll, - structs: Structs.includeAll, - macros: Macros.includeAll, - typedefs: Typedefs.includeAll, ); final context = testContext(generator); final library = parse(context); @@ -164,9 +157,6 @@ void main() { }); test('SQLite test', () { - // Excluding functions etc that use 'va_list' because it can either be a - // Pointer<__va_list_tag> or int depending on the OS. - final vaRegex = RegExp(r'(^|[^a-z])va($|[^a-z])'); final generator = FfiGenerator( output: Output( dartFile: Uri.file('unused'), @@ -189,21 +179,7 @@ void main() { ], include: (Uri header) => header.pathSegments.last == 'sqlite3.h', ), - functions: Functions( - include: (declaration) => !{ - 'sqlite3_vmprintf', - 'sqlite3_vsnprintf', - 'sqlite3_str_vappendf', - }.contains(declaration.originalName), - ), - structs: Structs( - include: (declaration) => !vaRegex.hasMatch(declaration.originalName), - ), - globals: Globals.includeAll, - macros: Macros.includeAll, - typedefs: Typedefs( - include: (declaration) => !vaRegex.hasMatch(declaration.originalName), - ), + visitors: const [_LargeTestVisitor()], ); final context = testContext(generator); final library = parse(context); @@ -214,21 +190,33 @@ void main() { '_expected_sqlite_bindings.dart', ]); }); + }); +} - test('Libclang config test', () { - final config = testConfigFromPath( - path.join(packagePathForTests, 'tool', 'libclang_config.yaml'), - ); - final context = testContext(config); - final library = parse(context); +class _LargeTestVisitor extends Visitor { + static final vaRegex = RegExp(r'(^|[^a-z])va($|[^a-z])'); - matchLibraryWithExpected(context, library, 'libclang_config.dart', [ - 'lib', - 'src', - 'header_parser', - 'clang_bindings', - 'clang_bindings.dart', - ]); - }); - }); + const _LargeTestVisitor(); + + @override + void visitFunc(Func node) { + if ({'sqlite3_vmprintf', 'sqlite3_vsnprintf', 'sqlite3_str_vappendf'} + .contains(node.originalName)) { + node.isExcluded = true; + } + } + + @override + void visitStruct(Struct node) { + if (vaRegex.hasMatch(node.originalName)) { + node.isExcluded = true; + } + } + + @override + void visitTypealias(Typealias node) { + if (vaRegex.hasMatch(node.originalName)) { + node.isExcluded = true; + } + } } diff --git a/pkgs/ffigen/test/native_cpp_test/verify_bindings_test.dart b/pkgs/ffigen/test/native_cpp_test/verify_bindings_test.dart index be8f1398e4..d307dcf0b6 100644 --- a/pkgs/ffigen/test/native_cpp_test/verify_bindings_test.dart +++ b/pkgs/ffigen/test/native_cpp_test/verify_bindings_test.dart @@ -44,9 +44,10 @@ void main() { ], compilerOptions: ['-x', 'c++'], ), - cpp: Cpp( - classes: CppClasses.includeSet({'Animal', 'FinalizerTestSubject'}), - ), + cpp: const Cpp(), + visitors: [ + IncludeSetVisitor({'Animal', 'FinalizerTestSubject'}), + ], ), 'memory_edge_cases': FfiGenerator( output: Output( @@ -61,7 +62,10 @@ void main() { ], compilerOptions: ['-x', 'c++'], ), - cpp: Cpp(classes: CppClasses.includeSet({'Node'})), + cpp: const Cpp(), + visitors: [ + IncludeSetVisitor({'Node'}), + ], ), }; diff --git a/pkgs/ffigen/test/native_objc_test/block_annotation_test.dart b/pkgs/ffigen/test/native_objc_test/block_annotation_test.dart index 81e869e4f4..bf5efebf2f 100644 --- a/pkgs/ffigen/test/native_objc_test/block_annotation_test.dart +++ b/pkgs/ffigen/test/native_objc_test/block_annotation_test.dart @@ -92,7 +92,7 @@ void main() { test('RetainedObjectProducer, defined dart, invoked dart', () { objectProducerTest(() { ObjCBlock Function(Pointer)> blk = - ObjCBlock_EmptyObject_ffiVoid$1.fromFunction( + ObjCBlock_EmptyObject_ffiVoid_retained.fromFunction( (Pointer _) => EmptyObject.alloc().init(), ); return blk(nullptr); @@ -102,7 +102,7 @@ void main() { test('RetainedObjectProducer, defined dart, invoked objC', () { objectProducerTest(() { ObjCBlock Function(Pointer)> blk = - ObjCBlock_EmptyObject_ffiVoid$1.fromFunction( + ObjCBlock_EmptyObject_ffiVoid_retained.fromFunction( (Pointer _) => EmptyObject.alloc().init(), ); return BlockAnnotationTest.invokeRetainedObjectProducer( @@ -345,7 +345,7 @@ void main() { test('RetainedBlockProducer, defined dart, invoked dart', () { blockProducerTest(() { ObjCBlock Function(Pointer)> blk = - ObjCBlock_EmptyBlock_ffiVoid$1.fromFunction( + ObjCBlock_EmptyBlock_ffiVoid_retained.fromFunction( (Pointer _) => ObjCBlock_ffiVoid.fromFunction(() {}), ); return blk(nullptr); @@ -355,7 +355,7 @@ void main() { test('RetainedBlockProducer, defined dart, invoked objC', () { blockProducerTest(() { ObjCBlock Function(Pointer)> blk = - ObjCBlock_EmptyBlock_ffiVoid$1.fromFunction( + ObjCBlock_EmptyBlock_ffiVoid_retained.fromFunction( (Pointer _) => ObjCBlock_ffiVoid.fromFunction(() {}), ); return BlockAnnotationTest.invokeRetainedBlockProducer( diff --git a/pkgs/ffigen/test/native_objc_test/block_annotation_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/block_annotation_test_bindings.dart index 9e837fb438..6a586634ef 100644 --- a/pkgs/ffigen/test/native_objc_test/block_annotation_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/block_annotation_test_bindings.dart @@ -1011,7 +1011,7 @@ interface class BlockAnnotationTestProtocol$Builder { isInstanceMethod: true, ), (DartEmptyBlock Function() func) => - ObjCBlock_EmptyBlock_ffiVoid$1.fromFunction( + ObjCBlock_EmptyBlock_ffiVoid_retained.fromFunction( (ffi.Pointer _) => func(), ), ); @@ -1037,7 +1037,7 @@ interface class BlockAnnotationTestProtocol$Builder { isInstanceMethod: true, ), (EmptyObject Function() func) => - ObjCBlock_EmptyObject_ffiVoid$1.fromFunction( + ObjCBlock_EmptyObject_ffiVoid_retained.fromFunction( (ffi.Pointer _) => func(), ), ); @@ -1714,7 +1714,7 @@ extension ObjCBlock_EmptyBlock_ffiVoid$CallExtension } /// Construction methods for `objc.ObjCBlock> Function(ffi.Pointer)>`. -abstract final class ObjCBlock_EmptyBlock_ffiVoid$1 { +abstract final class ObjCBlock_EmptyBlock_ffiVoid_retained { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< objc.Retained> Function( @@ -1821,7 +1821,7 @@ abstract final class ObjCBlock_EmptyBlock_ffiVoid$1 { } /// Call operator for `objc.ObjCBlock> Function(ffi.Pointer)>`. -extension ObjCBlock_EmptyBlock_ffiVoid$1$CallExtension +extension ObjCBlock_EmptyBlock_ffiVoid_retained$CallExtension on objc.ObjCBlock< objc.Retained> Function( @@ -1969,20 +1969,22 @@ extension ObjCBlock_EmptyObject_ffiVoid$CallExtension } } -/// Construction methods for `objc.ObjCBlock Function(ffi.Pointer)>`. -abstract final class ObjCBlock_EmptyObject_ffiVoid$1 { +/// Construction methods for `objc.ObjCBlock, EmptyObject)>`. +abstract final class ObjCBlock_EmptyObject_ffiVoid_EmptyObject { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - objc.Retained Function(ffi.Pointer) + EmptyObject Function(ffi.Pointer, EmptyObject) > fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, }) => - objc.ObjCBlock< - objc.Retained Function(ffi.Pointer) - >(pointer, retain: retain, release: release); + objc.ObjCBlock, EmptyObject)>( + pointer, + retain: retain, + release: release, + ); /// Creates a block from a C function pointer. /// @@ -1990,23 +1992,23 @@ abstract final class ObjCBlock_EmptyObject_ffiVoid$1 { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - objc.Retained Function(ffi.Pointer) + EmptyObject Function(ffi.Pointer, EmptyObject) > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer arg0) + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) > > ptr, - ) => - objc.ObjCBlock< - objc.Retained Function(ffi.Pointer) - >( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); + ) => objc.ObjCBlock, EmptyObject)>( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); /// Creates a block from a Dart function. /// @@ -2017,18 +2019,22 @@ abstract final class ObjCBlock_EmptyObject_ffiVoid$1 { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - objc.Retained Function(ffi.Pointer) + EmptyObject Function(ffi.Pointer, EmptyObject) > fromFunction( - EmptyObject Function(ffi.Pointer) fn, { + EmptyObject Function(ffi.Pointer, EmptyObject) fn, { bool keepIsolateAlive = true, }) => - objc.ObjCBlock< - objc.Retained Function(ffi.Pointer) - >( - objc.newClosureBlock(_closureCallable, (ffi.Pointer arg0) { - final _$$ref = fn(arg0).ref; - return _$$ref.retainAndReturnPointer(); + objc.ObjCBlock, EmptyObject)>( + objc.newClosureBlock(_closureCallable, ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + final _$$ref = fn( + arg0, + EmptyObject.fromPointer(arg1, retain: true, release: true), + ).ref; + return _$$ref.retainAndAutorelease(); }, keepIsolateAlive), retain: false, release: true, @@ -2037,48 +2043,60 @@ abstract final class ObjCBlock_EmptyObject_ffiVoid$1 { static ffi.Pointer _fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0, + ffi.Pointer arg1, ) => block.ref.target .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer arg0) + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) > >() .asFunction< - ffi.Pointer Function(ffi.Pointer) - >()(arg0); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + >()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static ffi.Pointer _closureTrampoline( ffi.Pointer block, ffi.Pointer arg0, + ffi.Pointer arg1, ) => (objc.getBlockClosure(block) - as ffi.Pointer Function(ffi.Pointer))( - arg0, - ); + as ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock Function(ffi.Pointer)>`. -extension ObjCBlock_EmptyObject_ffiVoid$1$CallExtension +/// Call operator for `objc.ObjCBlock, EmptyObject)>`. +extension ObjCBlock_EmptyObject_ffiVoid_EmptyObject$CallExtension on objc.ObjCBlock< - objc.Retained Function(ffi.Pointer) + EmptyObject Function(ffi.Pointer, EmptyObject) > { - EmptyObject call(ffi.Pointer arg0) { + EmptyObject call(ffi.Pointer arg0, EmptyObject arg1) { + final _$$ref$1 = arg1.ref; return EmptyObject.fromPointer( ref.pointer.ref.invoke .cast< @@ -2086,6 +2104,7 @@ extension ObjCBlock_EmptyObject_ffiVoid$1$CallExtension ffi.Pointer Function( ffi.Pointer block, ffi.Pointer arg0, + ffi.Pointer arg1, ) > >() @@ -2093,30 +2112,29 @@ extension ObjCBlock_EmptyObject_ffiVoid$1$CallExtension ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) - >()(ref.pointer, arg0), - retain: false, + >()(ref.pointer, arg0, _$$ref$1.pointer), + retain: true, release: true, ); } } -/// Construction methods for `objc.ObjCBlock, EmptyObject)>`. -abstract final class ObjCBlock_EmptyObject_ffiVoid_EmptyObject { +/// Construction methods for `objc.ObjCBlock, objc.Consumed)>`. +abstract final class ObjCBlock_EmptyObject_ffiVoid_EmptyObject$1 { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - EmptyObject Function(ffi.Pointer, EmptyObject) + EmptyObject Function(ffi.Pointer, objc.Consumed) > fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, }) => - objc.ObjCBlock, EmptyObject)>( - pointer, - retain: retain, - release: release, - ); + objc.ObjCBlock< + EmptyObject Function(ffi.Pointer, objc.Consumed) + >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. /// @@ -2124,7 +2142,7 @@ abstract final class ObjCBlock_EmptyObject_ffiVoid_EmptyObject { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - EmptyObject Function(ffi.Pointer, EmptyObject) + EmptyObject Function(ffi.Pointer, objc.Consumed) > fromFunctionPointer( ffi.Pointer< @@ -2136,11 +2154,14 @@ abstract final class ObjCBlock_EmptyObject_ffiVoid_EmptyObject { > > ptr, - ) => objc.ObjCBlock, EmptyObject)>( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); + ) => + objc.ObjCBlock< + EmptyObject Function(ffi.Pointer, objc.Consumed) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); /// Creates a block from a Dart function. /// @@ -2151,20 +2172,22 @@ abstract final class ObjCBlock_EmptyObject_ffiVoid_EmptyObject { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - EmptyObject Function(ffi.Pointer, EmptyObject) + EmptyObject Function(ffi.Pointer, objc.Consumed) > fromFunction( EmptyObject Function(ffi.Pointer, EmptyObject) fn, { bool keepIsolateAlive = true, }) => - objc.ObjCBlock, EmptyObject)>( + objc.ObjCBlock< + EmptyObject Function(ffi.Pointer, objc.Consumed) + >( objc.newClosureBlock(_closureCallable, ( ffi.Pointer arg0, ffi.Pointer arg1, ) { final _$$ref = fn( arg0, - EmptyObject.fromPointer(arg1, retain: true, release: true), + EmptyObject.fromPointer(arg1, retain: false, release: true), ).ref; return _$$ref.retainAndAutorelease(); }, keepIsolateAlive), @@ -2221,11 +2244,14 @@ abstract final class ObjCBlock_EmptyObject_ffiVoid_EmptyObject { .cast(); } -/// Call operator for `objc.ObjCBlock, EmptyObject)>`. -extension ObjCBlock_EmptyObject_ffiVoid_EmptyObject$CallExtension +/// Call operator for `objc.ObjCBlock, objc.Consumed)>`. +extension ObjCBlock_EmptyObject_ffiVoid_EmptyObject$1$CallExtension on objc.ObjCBlock< - EmptyObject Function(ffi.Pointer, EmptyObject) + EmptyObject Function( + ffi.Pointer, + objc.Consumed, + ) > { EmptyObject call(ffi.Pointer arg0, EmptyObject arg1) { final _$$ref$1 = arg1.ref; @@ -2246,18 +2272,18 @@ extension ObjCBlock_EmptyObject_ffiVoid_EmptyObject$CallExtension ffi.Pointer, ffi.Pointer, ) - >()(ref.pointer, arg0, _$$ref$1.pointer), + >()(ref.pointer, arg0, _$$ref$1.retainAndReturnPointer()), retain: true, release: true, ); } } -/// Construction methods for `objc.ObjCBlock, objc.Consumed)>`. -abstract final class ObjCBlock_EmptyObject_ffiVoid_EmptyObject$1 { +/// Construction methods for `objc.ObjCBlock Function(ffi.Pointer)>`. +abstract final class ObjCBlock_EmptyObject_ffiVoid_retained { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - EmptyObject Function(ffi.Pointer, objc.Consumed) + objc.Retained Function(ffi.Pointer) > fromPointer( ffi.Pointer pointer, { @@ -2265,7 +2291,7 @@ abstract final class ObjCBlock_EmptyObject_ffiVoid_EmptyObject$1 { bool release = false, }) => objc.ObjCBlock< - EmptyObject Function(ffi.Pointer, objc.Consumed) + objc.Retained Function(ffi.Pointer) >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. @@ -2274,21 +2300,18 @@ abstract final class ObjCBlock_EmptyObject_ffiVoid_EmptyObject$1 { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - EmptyObject Function(ffi.Pointer, objc.Consumed) + objc.Retained Function(ffi.Pointer) > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) + ffi.Pointer Function(ffi.Pointer arg0) > > ptr, ) => objc.ObjCBlock< - EmptyObject Function(ffi.Pointer, objc.Consumed) + objc.Retained Function(ffi.Pointer) >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, @@ -2304,24 +2327,18 @@ abstract final class ObjCBlock_EmptyObject_ffiVoid_EmptyObject$1 { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - EmptyObject Function(ffi.Pointer, objc.Consumed) + objc.Retained Function(ffi.Pointer) > fromFunction( - EmptyObject Function(ffi.Pointer, EmptyObject) fn, { + EmptyObject Function(ffi.Pointer) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< - EmptyObject Function(ffi.Pointer, objc.Consumed) + objc.Retained Function(ffi.Pointer) >( - objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - final _$$ref = fn( - arg0, - EmptyObject.fromPointer(arg1, retain: false, release: true), - ).ref; - return _$$ref.retainAndAutorelease(); + objc.newClosureBlock(_closureCallable, (ffi.Pointer arg0) { + final _$$ref = fn(arg0).ref; + return _$$ref.retainAndReturnPointer(); }, keepIsolateAlive), retain: false, release: true, @@ -2330,63 +2347,48 @@ abstract final class ObjCBlock_EmptyObject_ffiVoid_EmptyObject$1 { static ffi.Pointer _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, - ) + ffi.Pointer Function(ffi.Pointer arg0) > >() .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - >()(arg0, arg1); + ffi.Pointer Function(ffi.Pointer) + >()(arg0); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static ffi.Pointer _closureTrampoline( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, ) => (objc.getBlockClosure(block) - as ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1); + as ffi.Pointer Function(ffi.Pointer))( + arg0, + ); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock, objc.Consumed)>`. -extension ObjCBlock_EmptyObject_ffiVoid_EmptyObject$1$CallExtension +/// Call operator for `objc.ObjCBlock Function(ffi.Pointer)>`. +extension ObjCBlock_EmptyObject_ffiVoid_retained$CallExtension on objc.ObjCBlock< - EmptyObject Function( - ffi.Pointer, - objc.Consumed, - ) + objc.Retained Function(ffi.Pointer) > { - EmptyObject call(ffi.Pointer arg0, EmptyObject arg1) { - final _$$ref$1 = arg1.ref; + EmptyObject call(ffi.Pointer arg0) { return EmptyObject.fromPointer( ref.pointer.ref.invoke .cast< @@ -2394,7 +2396,6 @@ extension ObjCBlock_EmptyObject_ffiVoid_EmptyObject$1$CallExtension ffi.Pointer Function( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, ) > >() @@ -2402,10 +2403,9 @@ extension ObjCBlock_EmptyObject_ffiVoid_EmptyObject$1$CallExtension ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, ) - >()(ref.pointer, arg0, _$$ref$1.retainAndReturnPointer()), - retain: true, + >()(ref.pointer, arg0), + retain: false, release: true, ); } diff --git a/pkgs/ffigen/test/native_objc_test/category_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/category_test_bindings.dart index d20ffb4776..086eb07d84 100644 --- a/pkgs/ffigen/test/native_objc_test/category_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/category_test_bindings.dart @@ -2,33 +2,11 @@ // // Generated by `package:ffigen`. // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package -@ffi.DefaultAsset('package:ffigen/objc_test') -library; - import 'dart:ffi' as ffi; import 'package:objective_c/objective_c.dart' as objc; import 'package:ffi/ffi.dart' as pkg_ffi; const _$objcVersionCheck = objc.ObjCVersionCheck(9, 4); -@ffi.Native< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) ->(isLeaf: true) -external ffi.Pointer _l3cf7j_wrapBlockingBlock_pfv6jd( - ffi.Pointer block, - ffi.Pointer listnerBlock, - ffi.Pointer context, -); - -@ffi.Native< - ffi.Pointer Function(ffi.Pointer) ->(isLeaf: true) -external ffi.Pointer _l3cf7j_wrapListenerBlock_pfv6jd( - ffi.Pointer block, -); /// CatImplementsProto extension CatImplementsProto on Thing { @@ -277,252 +255,6 @@ extension Mul on Thing { } } -/// NSItemProvider -extension NSItemProvider on objc.NSURL { - /// itemProviderVisibilityForRepresentationWithTypeIdentifier: - objc.NSItemProviderRepresentationVisibility - itemProviderVisibilityForRepresentationWithTypeIdentifier( - objc.NSString typeIdentifier, - ) { - final _$$ref = object$.ref; - final _$$ref$1 = typeIdentifier.ref; - objc.checkOsVersionInternal( - 'NSURL.itemProviderVisibilityForRepresentationWithTypeIdentifier:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - if (!objc.respondsToSelector( - _$$ref.pointer, - _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, - )) { - throw objc.UnimplementedOptionalMethodException( - 'NSURL', - 'itemProviderVisibilityForRepresentationWithTypeIdentifier:', - ); - } - final $ret = _objc_msgSend_16fy0up( - _$$ref.pointer, - _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, - _$$ref$1.pointer, - ); - return objc.NSItemProviderRepresentationVisibility.fromValue($ret); - } - - /// loadDataWithTypeIdentifier:forItemProviderCompletionHandler: - objc.NSProgress? loadDataWithTypeIdentifier( - objc.NSString typeIdentifier, { - required objc.ObjCBlock - forItemProviderCompletionHandler, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = typeIdentifier.ref; - final _$$ref$2 = forItemProviderCompletionHandler.ref; - objc.checkOsVersionInternal( - 'NSURL.loadDataWithTypeIdentifier:forItemProviderCompletionHandler:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - final $ret = _objc_msgSend_r0bo0s( - _$$ref.pointer, - _sel_loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, - _$$ref$1.pointer, - _$$ref$2.pointer, - ); - return $ret.address == 0 - ? null - : objc.NSProgress.fromPointer($ret, retain: true, release: true); - } - - /// writableTypeIdentifiersForItemProvider - objc.NSArray get writableTypeIdentifiersForItemProvider { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.writableTypeIdentifiersForItemProvider', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - if (!objc.respondsToSelector( - _$$ref.pointer, - _sel_writableTypeIdentifiersForItemProvider, - )) { - throw objc.UnimplementedOptionalMethodException( - 'NSURL', - 'writableTypeIdentifiersForItemProvider', - ); - } - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_writableTypeIdentifiersForItemProvider, - ); - return objc.NSArray.fromPointer($ret, retain: true, release: true); - } - - /// itemProviderVisibilityForRepresentationWithTypeIdentifier: - static objc.NSItemProviderRepresentationVisibility - itemProviderVisibilityForRepresentationWithTypeIdentifier$1( - objc.NSString typeIdentifier, - ) { - final _$$ref = typeIdentifier.ref; - objc.checkOsVersionInternal( - 'NSURL.itemProviderVisibilityForRepresentationWithTypeIdentifier:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - if (!objc.respondsToSelector( - _class_NSURL, - _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, - )) { - throw objc.UnimplementedOptionalMethodException( - 'NSURL', - 'itemProviderVisibilityForRepresentationWithTypeIdentifier:', - ); - } - final $ret = _objc_msgSend_16fy0up( - _class_NSURL, - _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, - _$$ref.pointer, - ); - return objc.NSItemProviderRepresentationVisibility.fromValue($ret); - } - - /// objectWithItemProviderData:typeIdentifier:error: - static objc.NSURL? objectWithItemProviderData( - objc.NSData data, { - required objc.NSString typeIdentifier, - }) { - final _$$ref = data.ref; - final _$$ref$1 = typeIdentifier.ref; - objc.checkOsVersionInternal( - 'NSURL.objectWithItemProviderData:typeIdentifier:error:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1pnyuds( - _class_NSURL, - _sel_objectWithItemProviderData_typeIdentifier_error_, - _$$ref.pointer, - _$$ref$1.pointer, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : objc.NSURL.fromPointer($ret, retain: true, release: true); - } finally { - pkg_ffi.calloc.free($err); - } - } - - /// readableTypeIdentifiersForItemProvider - static objc.NSArray getReadableTypeIdentifiersForItemProvider() { - objc.checkOsVersionInternal( - 'NSURL.readableTypeIdentifiersForItemProvider', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _class_NSURL, - _sel_readableTypeIdentifiersForItemProvider, - ); - return objc.NSArray.fromPointer($ret, retain: true, release: true); - } - - /// writableTypeIdentifiersForItemProvider - static objc.NSArray getWritableTypeIdentifiersForItemProvider$1() { - objc.checkOsVersionInternal( - 'NSURL.writableTypeIdentifiersForItemProvider', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _class_NSURL, - _sel_writableTypeIdentifiersForItemProvider, - ); - return objc.NSArray.fromPointer($ret, retain: true, release: true); - } -} - -/// NSPromisedItems -extension NSPromisedItems on objc.NSURL { - /// checkPromisedItemIsReachableAndReturnError: - bool checkPromisedItemIsReachableAndReturnError() { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.checkPromisedItemIsReachableAndReturnError:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), - ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1dom33q( - _$$ref.pointer, - _sel_checkPromisedItemIsReachableAndReturnError_, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret; - } finally { - pkg_ffi.calloc.free($err); - } - } - - /// getPromisedItemResourceValue:forKey:error: - bool getPromisedItemResourceValue( - ffi.Pointer> value, { - required objc.NSString forKey, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = forKey.ref; - objc.checkOsVersionInternal( - 'NSURL.getPromisedItemResourceValue:forKey:error:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), - ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1j9bhml( - _$$ref.pointer, - _sel_getPromisedItemResourceValue_forKey_error_, - value, - _$$ref$1.pointer, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret; - } finally { - pkg_ffi.calloc.free($err); - } - } - - /// promisedItemResourceValuesForKeys:error: - objc.NSDictionary? promisedItemResourceValuesForKeys(objc.NSArray keys) { - final _$$ref = object$.ref; - final _$$ref$1 = keys.ref; - objc.checkOsVersionInternal( - 'NSURL.promisedItemResourceValuesForKeys:error:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), - ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1lhpu4m( - _$$ref.pointer, - _sel_promisedItemResourceValuesForKeys_error_, - _$$ref$1.pointer, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : objc.NSDictionary.fromPointer($ret, retain: true, release: true); - } finally { - pkg_ffi.calloc.free($err); - } - } -} - /// NSString extension NSString on Thing { /// nsStringExtension @@ -532,671 +264,6 @@ extension NSString on Thing { } } -/// NSURLCategory -extension NSURLCategory on objc.NSURL { - /// extensionMethod - int extensionMethod() { - final _$$ref = object$.ref; - return _objc_msgSend_1gcq84o(_$$ref.pointer, _sel_extensionMethod); - } -} - -/// NSURLLoading -extension NSURLLoading on objc.NSURL { - /// URLHandleUsingCache: - @Deprecated('Use NSURLConnection instead') - objc.NSURLHandle? URLHandleUsingCache(bool shouldUseCache) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.URLHandleUsingCache:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_1t6aok9( - _$$ref.pointer, - _sel_URLHandleUsingCache_, - shouldUseCache, - ); - return $ret.address == 0 - ? null - : objc.NSURLHandle.fromPointer($ret, retain: true, release: true); - } - - /// loadResourceDataNotifyingClient:usingCache: - @Deprecated('Use NSURLConnection instead') - void loadResourceDataNotifyingClient( - objc.ObjCObject client, { - required bool usingCache, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = client.ref; - objc.checkOsVersionInternal( - 'NSURL.loadResourceDataNotifyingClient:usingCache:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_6p7ndb( - _$$ref.pointer, - _sel_loadResourceDataNotifyingClient_usingCache_, - _$$ref$1.pointer, - usingCache, - ); - } - - /// propertyForKey: - @Deprecated('Use NSURLConnection instead') - objc.ObjCObject? propertyForKey(objc.NSString propertyKey) { - final _$$ref = object$.ref; - final _$$ref$1 = propertyKey.ref; - objc.checkOsVersionInternal( - 'NSURL.propertyForKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_propertyForKey_, - _$$ref$1.pointer, - ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); - } - - /// resourceDataUsingCache: - @Deprecated('Use NSURLConnection instead') - objc.NSData? resourceDataUsingCache(bool shouldUseCache) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.resourceDataUsingCache:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_1t6aok9( - _$$ref.pointer, - _sel_resourceDataUsingCache_, - shouldUseCache, - ); - return $ret.address == 0 - ? null - : objc.NSData.fromPointer($ret, retain: true, release: true); - } - - /// setProperty:forKey: - @Deprecated('Use NSURLConnection instead') - bool setProperty(objc.ObjCObject property, {required objc.NSString forKey}) { - final _$$ref = object$.ref; - final _$$ref$1 = property.ref; - final _$$ref$2 = forKey.ref; - objc.checkOsVersionInternal( - 'NSURL.setProperty:forKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_1lsax7n( - _$$ref.pointer, - _sel_setProperty_forKey_, - _$$ref$1.pointer, - _$$ref$2.pointer, - ); - } - - /// setResourceData: - @Deprecated('Use NSURLConnection instead') - bool setResourceData(objc.NSData data) { - final _$$ref = object$.ref; - final _$$ref$1 = data.ref; - objc.checkOsVersionInternal( - 'NSURL.setResourceData:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_setResourceData_, - _$$ref$1.pointer, - ); - } -} - -/// NSURLPathUtilities -extension NSURLPathUtilities on objc.NSURL { - /// URLByAppendingPathComponent: - objc.NSURL? URLByAppendingPathComponent(objc.NSString pathComponent) { - final _$$ref = object$.ref; - final _$$ref$1 = pathComponent.ref; - objc.checkOsVersionInternal( - 'NSURL.URLByAppendingPathComponent:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_URLByAppendingPathComponent_, - _$$ref$1.pointer, - ); - return $ret.address == 0 - ? null - : objc.NSURL.fromPointer($ret, retain: true, release: true); - } - - /// URLByAppendingPathComponent:isDirectory: - objc.NSURL? URLByAppendingPathComponent$1( - objc.NSString pathComponent, { - required bool isDirectory, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = pathComponent.ref; - objc.checkOsVersionInternal( - 'NSURL.URLByAppendingPathComponent:isDirectory:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_17amj0z( - _$$ref.pointer, - _sel_URLByAppendingPathComponent_isDirectory_, - _$$ref$1.pointer, - isDirectory, - ); - return $ret.address == 0 - ? null - : objc.NSURL.fromPointer($ret, retain: true, release: true); - } - - /// URLByAppendingPathExtension: - objc.NSURL? URLByAppendingPathExtension(objc.NSString pathExtension) { - final _$$ref = object$.ref; - final _$$ref$1 = pathExtension.ref; - objc.checkOsVersionInternal( - 'NSURL.URLByAppendingPathExtension:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_URLByAppendingPathExtension_, - _$$ref$1.pointer, - ); - return $ret.address == 0 - ? null - : objc.NSURL.fromPointer($ret, retain: true, release: true); - } - - /// URLByDeletingLastPathComponent - objc.NSURL? get URLByDeletingLastPathComponent { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.URLByDeletingLastPathComponent', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_URLByDeletingLastPathComponent, - ); - return $ret.address == 0 - ? null - : objc.NSURL.fromPointer($ret, retain: true, release: true); - } - - /// URLByDeletingPathExtension - objc.NSURL? get URLByDeletingPathExtension { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.URLByDeletingPathExtension', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_URLByDeletingPathExtension, - ); - return $ret.address == 0 - ? null - : objc.NSURL.fromPointer($ret, retain: true, release: true); - } - - /// URLByResolvingSymlinksInPath - objc.NSURL? get URLByResolvingSymlinksInPath { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.URLByResolvingSymlinksInPath', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_URLByResolvingSymlinksInPath, - ); - return $ret.address == 0 - ? null - : objc.NSURL.fromPointer($ret, retain: true, release: true); - } - - /// URLByStandardizingPath - objc.NSURL? get URLByStandardizingPath { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.URLByStandardizingPath', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_URLByStandardizingPath, - ); - return $ret.address == 0 - ? null - : objc.NSURL.fromPointer($ret, retain: true, release: true); - } - - /// checkResourceIsReachableAndReturnError: - bool checkResourceIsReachableAndReturnError() { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.checkResourceIsReachableAndReturnError:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1dom33q( - _$$ref.pointer, - _sel_checkResourceIsReachableAndReturnError_, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret; - } finally { - pkg_ffi.calloc.free($err); - } - } - - /// lastPathComponent - objc.NSString? get lastPathComponent { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.lastPathComponent', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_lastPathComponent); - return $ret.address == 0 - ? null - : objc.NSString.fromPointer($ret, retain: true, release: true); - } - - /// pathComponents - objc.NSArray? get pathComponents { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.pathComponents', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_pathComponents); - return $ret.address == 0 - ? null - : objc.NSArray.fromPointer($ret, retain: true, release: true); - } - - /// pathExtension - objc.NSString? get pathExtension { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.pathExtension', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_pathExtension); - return $ret.address == 0 - ? null - : objc.NSString.fromPointer($ret, retain: true, release: true); - } - - /// fileURLWithPathComponents: - static objc.NSURL? fileURLWithPathComponents(objc.NSArray components) { - final _$$ref = components.ref; - objc.checkOsVersionInternal( - 'NSURL.fileURLWithPathComponents:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _class_NSURL, - _sel_fileURLWithPathComponents_, - _$$ref.pointer, - ); - return $ret.address == 0 - ? null - : objc.NSURL.fromPointer($ret, retain: true, release: true); - } -} - -/// Construction methods for `objc.ObjCBlock`. -abstract final class ObjCBlock_ffiVoid_NSData_NSError { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock - fromPointer( - ffi.Pointer pointer, { - bool retain = false, - bool release = false, - }) => objc.ObjCBlock( - pointer, - retain: retain, - release: release, - ); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock - fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) - > - > - ptr, - ) => objc.ObjCBlock( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - /// - /// If `keepIsolateAlive` is true, this block will keep this isolate alive - /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock - fromFunction( - void Function(objc.NSData?, objc.NSError?) fn, { - bool keepIsolateAlive = true, - }) => objc.ObjCBlock( - objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - return fn( - arg0.address == 0 - ? null - : objc.NSData.fromPointer(arg0, retain: true, release: true), - arg1.address == 0 - ? null - : objc.NSError.fromPointer(arg1, retain: true, release: true), - ); - }, keepIsolateAlive), - retain: false, - release: true, - ); - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// If `keepIsolateAlive` is true, this block will keep this isolate alive - /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock - listener( - void Function(objc.NSData?, objc.NSError?) fn, { - bool keepIsolateAlive = true, - }) { - final raw = objc.newClosureBlock(_listenerCallable.nativeFunction.cast(), ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - return fn( - arg0.address == 0 - ? null - : objc.NSData.fromPointer(arg0, retain: false, release: true), - arg1.address == 0 - ? null - : objc.NSError.fromPointer(arg1, retain: false, release: true), - ); - }, keepIsolateAlive); - final wrapper = _l3cf7j_wrapListenerBlock_pfv6jd(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock( - wrapper, - retain: false, - release: true, - ); - } - - /// Creates a blocking block from a Dart function. - /// - /// This callback can be invoked from any native thread, and will block the - /// caller until the callback is handled by the Dart isolate that created - /// the block. Async functions are not supported. - /// - /// If `keepIsolateAlive` is true, this block will keep this isolate alive - /// until it is garbage collected by both Dart and ObjC. If the owner isolate - /// has shut down, and the block is invoked by native code, it may block - /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock - blocking( - void Function(objc.NSData?, objc.NSError?) fn, { - bool keepIsolateAlive = true, - }) { - final raw = objc.newClosureBlock(_blockingCallable.nativeFunction.cast(), ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - return fn( - arg0.address == 0 - ? null - : objc.NSData.fromPointer(arg0, retain: false, release: true), - arg1.address == 0 - ? null - : objc.NSError.fromPointer(arg1, retain: false, release: true), - ); - }, keepIsolateAlive); - final rawListener = objc.newClosureBlock( - _blockingListenerCallable.nativeFunction.cast(), - ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - return fn( - arg0.address == 0 - ? null - : objc.NSData.fromPointer(arg0, retain: false, release: true), - arg1.address == 0 - ? null - : objc.NSError.fromPointer(arg1, retain: false, release: true), - ); - }, - keepIsolateAlive, - ); - final wrapper = _l3cf7j_wrapBlockingBlock_pfv6jd( - raw, - rawListener, - objc.objCContext, - ); - objc.objectRelease(raw.cast()); - objc.objectRelease(rawListener.cast()); - return objc.ObjCBlock( - wrapper, - retain: false, - release: true, - ); - } - - static void _listenerTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - (objc.getBlockClosure(block) - as void Function( - ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1); - objc.objectRelease(block.cast()); - } - - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - _listenerCallable = - ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >.listener(_listenerTrampoline) - ..keepIsolateAlive = false; - static void _blockingTrampoline( - ffi.Pointer block, - ffi.Pointer waiter, - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - try { - (objc.getBlockClosure(block) - as void Function( - ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1); - } catch (e) { - } finally { - objc.signalWaiter(waiter); - objc.objectRelease(block.cast()); - } - } - - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - _blockingCallable = - ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >.isolateLocal(_blockingTrampoline) - ..keepIsolateAlive = false; - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - _blockingListenerCallable = - ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >.listener(_blockingTrampoline) - ..keepIsolateAlive = false; - static void _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); - static ffi.Pointer _fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(_fnPtrTrampoline) - .cast(); - static void _closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ) => - (objc.getBlockClosure(block) - as void Function( - ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1); - static ffi.Pointer _closureCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(_closureTrampoline) - .cast(); -} - -/// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSData_NSError$CallExtension - on objc.ObjCBlock { - void call(objc.NSData? arg0, objc.NSError? arg1) { - final _$$ref = arg0?.ref; - final _$$ref$1 = arg1?.ref; - return ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ) - > - >() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >()( - ref.pointer, - _$$ref?.pointer ?? ffi.nullptr, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - } -} - /// StaticAndInstanceMethodsWithSameNameCategory extension StaticAndInstanceMethodsWithSameNameCategory on Thing { /// sameNameMethod @@ -1348,14 +415,6 @@ final _class_NSString = objc.getClass( _class_NSString_raw, ).cast(), ); -@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSURL') -external ffi.Pointer _class_NSURL_raw; -final _class_NSURL = objc.getClass( - "NSURL", - () => ffi.Native.addressOf>( - _class_NSURL_raw, - ).cast(), -); @ffi.Native>(symbol: 'OBJC_CLASS_\$_Thing') external ffi.Pointer _class_Thing_raw; final _class_Thing = objc.getClass( @@ -1379,42 +438,6 @@ final _objc_msgSend_151sglz = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_16fy0up = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); -final _objc_msgSend_17amj0z = 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, - ) - >(); final _objc_msgSend_19nvye5 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -1449,23 +472,6 @@ final _objc_msgSend_1cwp428 = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_1dom33q = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ) - > - >() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ) - >(); final _objc_msgSend_1gcq84o = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -1481,86 +487,6 @@ final _objc_msgSend_1gcq84o = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_1j9bhml = 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>, - ) - >(); -final _objc_msgSend_1lhpu4m = 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_1lsax7n = 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_1pnyuds = 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>, - ) - >(); final _objc_msgSend_1q0lyci = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -1597,42 +523,6 @@ final _objc_msgSend_1sotr3r = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_1t6aok9 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ) - > - >() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - bool, - ) - >(); -final _objc_msgSend_6p7ndb = 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, - ) - >(); final _objc_msgSend_91o635 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -1648,48 +538,30 @@ final _objc_msgSend_91o635 = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_r0bo0s = objc.msgSendPointer +final _objc_msgSend_e3qsqz = 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_URLByAppendingPathComponent_ = objc.registerName( - "URLByAppendingPathComponent:", -); -late final _sel_URLByAppendingPathComponent_isDirectory_ = objc.registerName( - "URLByAppendingPathComponent:isDirectory:", -); -late final _sel_URLByAppendingPathExtension_ = objc.registerName( - "URLByAppendingPathExtension:", -); -late final _sel_URLByDeletingLastPathComponent = objc.registerName( - "URLByDeletingLastPathComponent", -); -late final _sel_URLByDeletingPathExtension = objc.registerName( - "URLByDeletingPathExtension", -); -late final _sel_URLByResolvingSymlinksInPath = objc.registerName( - "URLByResolvingSymlinksInPath", -); -late final _sel_URLByStandardizingPath = objc.registerName( - "URLByStandardizingPath", -); -late final _sel_URLHandleUsingCache_ = objc.registerName( - "URLHandleUsingCache:", +@ffi.Native Function()>( + symbol: '_l3cf7j_CatTestProtocol', +) +external ffi.Pointer _protocol_CatTestProtocol_raw(); +final _protocol_CatTestProtocol = objc.getProtocol( + "CatTestProtocol", + _protocol_CatTestProtocol_raw, ); late final _sel_add_Y_ = objc.registerName("add:Y:"); late final _sel_alloc = objc.registerName("alloc"); @@ -1700,57 +572,17 @@ late final _sel_anonymousCategoryMethod = objc.registerName( late final _sel_anonymousCategoryStaticMethod = objc.registerName( "anonymousCategoryStaticMethod", ); -late final _sel_checkPromisedItemIsReachableAndReturnError_ = objc.registerName( - "checkPromisedItemIsReachableAndReturnError:", -); -late final _sel_checkResourceIsReachableAndReturnError_ = objc.registerName( - "checkResourceIsReachableAndReturnError:", -); -late final _sel_extensionMethod = objc.registerName("extensionMethod"); -late final _sel_fileURLWithPathComponents_ = objc.registerName( - "fileURLWithPathComponents:", -); -late final _sel_getPromisedItemResourceValue_forKey_error_ = objc.registerName( - "getPromisedItemResourceValue:forKey:error:", -); +late final _sel_conformsToProtocol_ = objc.registerName("conformsToProtocol:"); late final _sel_init = objc.registerName("init"); late final _sel_initWithCoder_ = objc.registerName("initWithCoder:"); late final _sel_instancetypeMethod = objc.registerName("instancetypeMethod"); late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); -late final _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_ = - objc.registerName( - "itemProviderVisibilityForRepresentationWithTypeIdentifier:", - ); -late final _sel_lastPathComponent = objc.registerName("lastPathComponent"); -late final _sel_loadDataWithTypeIdentifier_forItemProviderCompletionHandler_ = - objc.registerName( - "loadDataWithTypeIdentifier:forItemProviderCompletionHandler:", - ); -late final _sel_loadResourceDataNotifyingClient_usingCache_ = objc.registerName( - "loadResourceDataNotifyingClient:usingCache:", -); late final _sel_method = objc.registerName("method"); late final _sel_mul_Y_ = objc.registerName("mul:Y:"); late final _sel_new = objc.registerName("new"); late final _sel_nsStringExtension = objc.registerName("nsStringExtension"); -late final _sel_objectWithItemProviderData_typeIdentifier_error_ = objc - .registerName("objectWithItemProviderData:typeIdentifier:error:"); -late final _sel_pathComponents = objc.registerName("pathComponents"); -late final _sel_pathExtension = objc.registerName("pathExtension"); -late final _sel_promisedItemResourceValuesForKeys_error_ = objc.registerName( - "promisedItemResourceValuesForKeys:error:", -); -late final _sel_propertyForKey_ = objc.registerName("propertyForKey:"); late final _sel_protoMethod = objc.registerName("protoMethod"); -late final _sel_readableTypeIdentifiersForItemProvider = objc.registerName( - "readableTypeIdentifiersForItemProvider", -); -late final _sel_resourceDataUsingCache_ = objc.registerName( - "resourceDataUsingCache:", -); late final _sel_sameNameMethod = objc.registerName("sameNameMethod"); -late final _sel_setProperty_forKey_ = objc.registerName("setProperty:forKey:"); -late final _sel_setResourceData_ = objc.registerName("setResourceData:"); late final _sel_someProperty = objc.registerName("someProperty"); late final _sel_staticMethod = objc.registerName("staticMethod"); late final _sel_staticProtoMethod = objc.registerName("staticProtoMethod"); @@ -1758,9 +590,6 @@ late final _sel_sub_Y_ = objc.registerName("sub:Y:"); late final _sel_supportsSecureCoding = objc.registerName( "supportsSecureCoding", ); -late final _sel_writableTypeIdentifiersForItemProvider = objc.registerName( - "writableTypeIdentifiersForItemProvider", -); typedef instancetype = ffi.Pointer; typedef Dartinstancetype = objc.ObjCObject; diff --git a/pkgs/ffigen/test/native_objc_test/category_test_bindings.m b/pkgs/ffigen/test/native_objc_test/category_test_bindings.m deleted file mode 100644 index 62de78b093..0000000000 --- a/pkgs/ffigen/test/native_objc_test/category_test_bindings.m +++ /dev/null @@ -1,77 +0,0 @@ -#include -#import -#import -#import "category_test.h" -#import "category_test.h" - -#if !__has_feature(objc_arc) -#error "This file must be compiled with ARC enabled" -#endif - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wundeclared-selector" - -typedef struct { - int64_t version; - void* (*newWaiter)(void); - void (*awaitWaiter)(void*); - void* (*currentIsolate)(void); - void (*enterIsolate)(void*); - void (*exitIsolate)(void); - int64_t (*getMainPortId)(void); - bool (*getCurrentThreadOwnsIsolate)(int64_t); -} DOBJC_Context; - -id objc_retainBlock(id); - -#define BLOCKING_BLOCK_IMPL(ctx, BLOCK_SIG, INVOKE_DIRECT, INVOKE_LISTENER) \ - assert(ctx->version >= 1); \ - void* targetIsolate = ctx->currentIsolate(); \ - int64_t targetPort = ctx->getMainPortId == NULL ? 0 : ctx->getMainPortId(); \ - return BLOCK_SIG { \ - void* currentIsolate = ctx->currentIsolate(); \ - bool mayEnterIsolate = \ - currentIsolate == NULL && \ - ctx->getCurrentThreadOwnsIsolate != NULL && \ - ctx->getCurrentThreadOwnsIsolate(targetPort); \ - if (currentIsolate == targetIsolate || mayEnterIsolate) { \ - if (mayEnterIsolate) { \ - ctx->enterIsolate(targetIsolate); \ - } \ - INVOKE_DIRECT; \ - if (mayEnterIsolate) { \ - ctx->exitIsolate(); \ - } \ - } else { \ - void* waiter = ctx->newWaiter(); \ - INVOKE_LISTENER; \ - ctx->awaitWaiter(waiter); \ - } \ - }; - - -typedef void (^_ListenerTrampoline)(id arg0, id arg1); -__attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline _l3cf7j_wrapListenerBlock_pfv6jd(_ListenerTrampoline block) NS_RETURNS_RETAINED { - return ^void(id arg0, id arg1) { - objc_retainBlock(block); - block((__bridge id)(__bridge_retained void*)(arg0), (__bridge id)(__bridge_retained void*)(arg1)); - }; -} - -typedef void (^_BlockingTrampoline)(void * waiter, id arg0, id arg1); -__attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline _l3cf7j_wrapBlockingBlock_pfv6jd( - _BlockingTrampoline block, _BlockingTrampoline listenerBlock, - DOBJC_Context* ctx) NS_RETURNS_RETAINED { - BLOCKING_BLOCK_IMPL(ctx, ^void(id arg0, id arg1), { - objc_retainBlock(block); - block(nil, (__bridge id)(__bridge_retained void*)(arg0), (__bridge id)(__bridge_retained void*)(arg1)); - }, { - objc_retainBlock(listenerBlock); - listenerBlock(waiter, (__bridge id)(__bridge_retained void*)(arg0), (__bridge id)(__bridge_retained void*)(arg1)); - }); -} -#undef BLOCKING_BLOCK_IMPL - -#pragma clang diagnostic pop diff --git a/pkgs/ffigen/test/native_objc_test/property_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/property_test_bindings.dart index 8f85c87570..f29ead197f 100644 --- a/pkgs/ffigen/test/native_objc_test/property_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/property_test_bindings.dart @@ -200,8 +200,7 @@ extension PropertyInterface$Methods on PropertyInterface { } } -/// WARNING: UndefinedTemplate is a stub. To generate bindings for this class, include -/// UndefinedTemplate in your config's objc-interfaces list. +/// UndefinedTemplate /// /// UndefinedTemplate extension type UndefinedTemplate._(objc.ObjCObject object$) @@ -253,6 +252,16 @@ final _class_PropertyInterface = objc.getClass( _class_PropertyInterface_raw, ).cast(), ); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_UndefinedTemplate', +) +external ffi.Pointer _class_UndefinedTemplate_raw; +final _class_UndefinedTemplate = objc.getClass( + "UndefinedTemplate", + () => ffi.Native.addressOf>( + _class_UndefinedTemplate_raw, + ).cast(), +); final _objc_msgSend_151sglz = objc.msgSendPointer .cast< ffi.NativeFunction< diff --git a/pkgs/ffigen/test/native_objc_test/protocol_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/protocol_test_bindings.dart index 7100665a4f..a90685fdc4 100644 --- a/pkgs/ffigen/test/native_objc_test/protocol_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/protocol_test_bindings.dart @@ -646,6 +646,27 @@ interface class MyProtocol$Builder { ); } +/// NSString +/// +/// NSString +extension type NSString._(objc.ObjCObject object$) + implements + objc.ObjCObject, + objc.NSObject, + objc.NSCopying, + objc.NSMutableCopying, + objc.NSSecureCoding { + /// Constructs a [NSString] that points to the same underlying object as [other]. + NSString.as(objc.ObjCObject other) : object$ = other {} + + /// Constructs a [NSString] that wraps the given raw object pointer. + NSString.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) {} +} + /// Construction methods for `objc.ObjCBlock)>`. abstract final class ObjCBlock_Int32_ffiVoid { /// Returns a block that wraps the given raw block pointer. @@ -3269,6 +3290,14 @@ final _protocol_EmptyProtocol = objc.getProtocol( "EmptyProtocol", _protocol_EmptyProtocol_raw, ); +@ffi.Native Function()>( + symbol: '_13hhotk_FilteredProtocol', +) +external ffi.Pointer _protocol_FilteredProtocol_raw(); +final _protocol_FilteredProtocol = objc.getProtocol( + "FilteredProtocol", + _protocol_FilteredProtocol_raw, +); @ffi.Native Function()>( symbol: '_13hhotk_MyProtocol', ) @@ -3285,6 +3314,14 @@ final _protocol_SecondaryProtocol = objc.getProtocol( "SecondaryProtocol", _protocol_SecondaryProtocol_raw, ); +@ffi.Native Function()>( + symbol: '_13hhotk_SuperProtocol', +) +external ffi.Pointer _protocol_SuperProtocol_raw(); +final _protocol_SuperProtocol = objc.getProtocol( + "SuperProtocol", + _protocol_SuperProtocol_raw, +); @ffi.Native Function()>( symbol: '_13hhotk_UnusedProtocol', ) diff --git a/pkgs/ffigen/test/native_objc_test/sdk_variable_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/sdk_variable_test_bindings.dart index 4cfebce6b9..2fe7ca4cef 100644 --- a/pkgs/ffigen/test/native_objc_test/sdk_variable_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/sdk_variable_test_bindings.dart @@ -2,11 +2,173 @@ // // Generated by `package:ffigen`. // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package +@ffi.DefaultAsset('package:ffigen/objc_test') +library; + import 'dart:ffi' as ffi; import 'package:objective_c/objective_c.dart' as objc; import 'package:ffi/ffi.dart' as pkg_ffi; const _$objcVersionCheck = objc.ObjCVersionCheck(9, 4); +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) +>(isLeaf: true) +external ffi.Pointer _1hhvgmr_wrapBlockingBlock_15kw6nv( + ffi.Pointer block, + ffi.Pointer listnerBlock, + ffi.Pointer context, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) +>(isLeaf: true) +external ffi.Pointer _1hhvgmr_wrapBlockingBlock_1pl9qdv( + ffi.Pointer block, + ffi.Pointer listnerBlock, + ffi.Pointer context, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) +>(isLeaf: true) +external ffi.Pointer _1hhvgmr_wrapBlockingBlock_4sp4xj( + ffi.Pointer block, + ffi.Pointer listnerBlock, + ffi.Pointer context, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) +>(isLeaf: true) +external ffi.Pointer _1hhvgmr_wrapBlockingBlock_d66md0( + ffi.Pointer block, + ffi.Pointer listnerBlock, + ffi.Pointer context, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) +>(isLeaf: true) +external ffi.Pointer _1hhvgmr_wrapBlockingBlock_pfv6jd( + ffi.Pointer block, + ffi.Pointer listnerBlock, + ffi.Pointer context, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) +>(isLeaf: true) +external ffi.Pointer _1hhvgmr_wrapBlockingBlock_r8gdi7( + ffi.Pointer block, + ffi.Pointer listnerBlock, + ffi.Pointer context, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) +>(isLeaf: true) +external ffi.Pointer _1hhvgmr_wrapBlockingBlock_t8l8el( + ffi.Pointer block, + ffi.Pointer listnerBlock, + ffi.Pointer context, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) +>(isLeaf: true) +external ffi.Pointer _1hhvgmr_wrapBlockingBlock_xtuoz7( + ffi.Pointer block, + ffi.Pointer listnerBlock, + ffi.Pointer context, +); + +@ffi.Native< + ffi.Pointer Function(ffi.Pointer) +>(isLeaf: true) +external ffi.Pointer _1hhvgmr_wrapListenerBlock_15kw6nv( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function(ffi.Pointer) +>(isLeaf: true) +external ffi.Pointer _1hhvgmr_wrapListenerBlock_1pl9qdv( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function(ffi.Pointer) +>(isLeaf: true) +external ffi.Pointer _1hhvgmr_wrapListenerBlock_4sp4xj( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function(ffi.Pointer) +>(isLeaf: true) +external ffi.Pointer _1hhvgmr_wrapListenerBlock_d66md0( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function(ffi.Pointer) +>(isLeaf: true) +external ffi.Pointer _1hhvgmr_wrapListenerBlock_pfv6jd( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function(ffi.Pointer) +>(isLeaf: true) +external ffi.Pointer _1hhvgmr_wrapListenerBlock_r8gdi7( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function(ffi.Pointer) +>(isLeaf: true) +external ffi.Pointer _1hhvgmr_wrapListenerBlock_t8l8el( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function(ffi.Pointer) +>(isLeaf: true) +external ffi.Pointer _1hhvgmr_wrapListenerBlock_xtuoz7( + ffi.Pointer block, +); /// WARNING: NSAccessibility is a stub. To generate bindings for this class, include /// NSAccessibility in your config's objc-protocols list. @@ -42,6 +204,115 @@ extension type NSAccessibilityElement._(objc.ObjCProtocol object$) }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); } +enum NSAccessibilityOrientation { + NSAccessibilityOrientationUnknown(0), + NSAccessibilityOrientationVertical(1), + NSAccessibilityOrientationHorizontal(2); + + final int value; + const NSAccessibilityOrientation(this.value); + + static NSAccessibilityOrientation fromValue(int value) => switch (value) { + 0 => NSAccessibilityOrientationUnknown, + 1 => NSAccessibilityOrientationVertical, + 2 => NSAccessibilityOrientationHorizontal, + _ => throw ArgumentError( + 'Unknown value for NSAccessibilityOrientation: $value', + ), + }; +} + +enum NSAccessibilityRulerMarkerType { + NSAccessibilityRulerMarkerTypeUnknown(0), + NSAccessibilityRulerMarkerTypeTabStopLeft(1), + NSAccessibilityRulerMarkerTypeTabStopRight(2), + NSAccessibilityRulerMarkerTypeTabStopCenter(3), + NSAccessibilityRulerMarkerTypeTabStopDecimal(4), + NSAccessibilityRulerMarkerTypeIndentHead(5), + NSAccessibilityRulerMarkerTypeIndentTail(6), + NSAccessibilityRulerMarkerTypeIndentFirstLine(7); + + final int value; + const NSAccessibilityRulerMarkerType(this.value); + + static NSAccessibilityRulerMarkerType fromValue(int value) => switch (value) { + 0 => NSAccessibilityRulerMarkerTypeUnknown, + 1 => NSAccessibilityRulerMarkerTypeTabStopLeft, + 2 => NSAccessibilityRulerMarkerTypeTabStopRight, + 3 => NSAccessibilityRulerMarkerTypeTabStopCenter, + 4 => NSAccessibilityRulerMarkerTypeTabStopDecimal, + 5 => NSAccessibilityRulerMarkerTypeIndentHead, + 6 => NSAccessibilityRulerMarkerTypeIndentTail, + 7 => NSAccessibilityRulerMarkerTypeIndentFirstLine, + _ => throw ArgumentError( + 'Unknown value for NSAccessibilityRulerMarkerType: $value', + ), + }; +} + +enum NSAccessibilitySortDirection { + NSAccessibilitySortDirectionUnknown(0), + NSAccessibilitySortDirectionAscending(1), + NSAccessibilitySortDirectionDescending(2); + + final int value; + const NSAccessibilitySortDirection(this.value); + + static NSAccessibilitySortDirection fromValue(int value) => switch (value) { + 0 => NSAccessibilitySortDirectionUnknown, + 1 => NSAccessibilitySortDirectionAscending, + 2 => NSAccessibilitySortDirectionDescending, + _ => throw ArgumentError( + 'Unknown value for NSAccessibilitySortDirection: $value', + ), + }; +} + +enum NSAccessibilityUnits { + NSAccessibilityUnitsUnknown(0), + NSAccessibilityUnitsInches(1), + NSAccessibilityUnitsCentimeters(2), + NSAccessibilityUnitsPoints(3), + NSAccessibilityUnitsPicas(4); + + final int value; + const NSAccessibilityUnits(this.value); + + static NSAccessibilityUnits fromValue(int value) => switch (value) { + 0 => NSAccessibilityUnitsUnknown, + 1 => NSAccessibilityUnitsInches, + 2 => NSAccessibilityUnitsCentimeters, + 3 => NSAccessibilityUnitsPoints, + 4 => NSAccessibilityUnitsPicas, + _ => throw ArgumentError('Unknown value for NSAccessibilityUnits: $value'), + }; +} + +sealed class NSAlignmentOptions { + static const NSAlignMinXInward = 1; + static const NSAlignMinYInward = 2; + static const NSAlignMaxXInward = 4; + static const NSAlignMaxYInward = 8; + static const NSAlignWidthInward = 16; + static const NSAlignHeightInward = 32; + static const NSAlignMinXOutward = 256; + static const NSAlignMinYOutward = 512; + static const NSAlignMaxXOutward = 1024; + static const NSAlignMaxYOutward = 2048; + static const NSAlignWidthOutward = 4096; + static const NSAlignHeightOutward = 8192; + static const NSAlignMinXNearest = 65536; + static const NSAlignMinYNearest = 131072; + static const NSAlignMaxXNearest = 262144; + static const NSAlignMaxYNearest = 524288; + static const NSAlignWidthNearest = 1048576; + static const NSAlignHeightNearest = 2097152; + static const NSAlignRectFlipped = -9223372036854775808; + static const NSAlignAllEdgesInward = 15; + static const NSAlignAllEdgesOutward = 3840; + static const NSAlignAllEdgesNearest = 983040; +} + /// WARNING: NSAnimatablePropertyContainer is a stub. To generate bindings for this class, include /// NSAnimatablePropertyContainer in your config's objc-protocols list. /// @@ -76,8 +347,50 @@ extension type NSAppearanceCustomization._(objc.ObjCProtocol object$) }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); } -/// WARNING: NSButtonCell is a stub. To generate bindings for this class, include -/// NSButtonCell in your config's objc-interfaces list. +sealed class NSApplicationPresentationOptions { + static const NSApplicationPresentationDefault = 0; + static const NSApplicationPresentationAutoHideDock = 1; + static const NSApplicationPresentationHideDock = 2; + static const NSApplicationPresentationAutoHideMenuBar = 4; + static const NSApplicationPresentationHideMenuBar = 8; + static const NSApplicationPresentationDisableAppleMenu = 16; + static const NSApplicationPresentationDisableProcessSwitching = 32; + static const NSApplicationPresentationDisableForceQuit = 64; + static const NSApplicationPresentationDisableSessionTermination = 128; + static const NSApplicationPresentationDisableHideApplication = 256; + static const NSApplicationPresentationDisableMenuBarTransparency = 512; + static const NSApplicationPresentationFullScreen = 1024; + static const NSApplicationPresentationAutoHideToolbar = 2048; + static const NSApplicationPresentationDisableCursorLocationAssistance = 4096; +} + +sealed class NSAutoresizingMaskOptions { + static const NSViewNotSizable = 0; + static const NSViewMinXMargin = 1; + static const NSViewWidthSizable = 2; + static const NSViewMaxXMargin = 4; + static const NSViewMinYMargin = 8; + static const NSViewHeightSizable = 16; + static const NSViewMaxYMargin = 32; +} + +enum NSBackingStoreType { + NSBackingStoreRetained(0), + NSBackingStoreNonretained(1), + NSBackingStoreBuffered(2); + + final int value; + const NSBackingStoreType(this.value); + + static NSBackingStoreType fromValue(int value) => switch (value) { + 0 => NSBackingStoreRetained, + 1 => NSBackingStoreNonretained, + 2 => NSBackingStoreBuffered, + _ => throw ArgumentError('Unknown value for NSBackingStoreType: $value'), + }; +} + +/// NSButtonCell /// /// NSButtonCell extension type NSButtonCell._(objc.ObjCObject object$) @@ -93,8 +406,7 @@ extension type NSButtonCell._(objc.ObjCObject object$) }) : object$ = objc.ObjCObject(other, retain: retain, release: release) {} } -/// WARNING: NSColorList is a stub. To generate bindings for this class, include -/// NSColorList in your config's objc-interfaces list. +/// NSColorList /// /// NSColorList extension type NSColorList._(objc.ObjCObject object$) @@ -110,8 +422,7 @@ extension type NSColorList._(objc.ObjCObject object$) }) : object$ = objc.ObjCObject(other, retain: retain, release: release) {} } -/// WARNING: NSColorPanel is a stub. To generate bindings for this class, include -/// NSColorPanel in your config's objc-interfaces list. +/// NSColorPanel /// /// NSColorPanel extension type NSColorPanel._(objc.ObjCObject object$) @@ -159,6 +470,18 @@ enum NSColorPanelMode { }; } +sealed class NSColorPanelOptions { + static const NSColorPanelGrayModeMask = 1; + static const NSColorPanelRGBModeMask = 2; + static const NSColorPanelCMYKModeMask = 4; + static const NSColorPanelHSBModeMask = 8; + static const NSColorPanelCustomPaletteModeMask = 16; + static const NSColorPanelColorListModeMask = 32; + static const NSColorPanelWheelModeMask = 64; + static const NSColorPanelCrayonModeMask = 128; + static const NSColorPanelAllModesMask = 65535; +} + /// NSColorPicker extension type NSColorPicker._(objc.ObjCObject object$) implements objc.ObjCObject, objc.NSObject, NSColorPickingDefault { @@ -407,8 +730,305 @@ extension type NSColorPickingDefault._(objc.ObjCProtocol object$) }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); } -/// WARNING: NSImage is a stub. To generate bindings for this class, include -/// NSImage in your config's objc-interfaces list. +enum NSDisplayGamut { + NSDisplayGamutSRGB(1), + NSDisplayGamutP3(2); + + final int value; + const NSDisplayGamut(this.value); + + static NSDisplayGamut fromValue(int value) => switch (value) { + 1 => NSDisplayGamutSRGB, + 2 => NSDisplayGamutP3, + _ => throw ArgumentError('Unknown value for NSDisplayGamut: $value'), + }; +} + +sealed class NSDragOperation { + static const NSDragOperationNone = 0; + static const NSDragOperationCopy = 1; + static const NSDragOperationLink = 2; + static const NSDragOperationGeneric = 4; + static const NSDragOperationPrivate = 8; + static const NSDragOperationMove = 16; + static const NSDragOperationDelete = 32; + static const NSDragOperationEvery = -1; + static const NSDragOperationAll_Obsolete = 15; + static const NSDragOperationAll = 15; +} + +enum NSDraggingContext { + NSDraggingContextOutsideApplication(0), + NSDraggingContextWithinApplication(1); + + final int value; + const NSDraggingContext(this.value); + + static NSDraggingContext fromValue(int value) => switch (value) { + 0 => NSDraggingContextOutsideApplication, + 1 => NSDraggingContextWithinApplication, + _ => throw ArgumentError('Unknown value for NSDraggingContext: $value'), + }; +} + +enum NSDraggingFormation { + NSDraggingFormationDefault(0), + NSDraggingFormationNone(1), + NSDraggingFormationPile(2), + NSDraggingFormationList(3), + NSDraggingFormationStack(4); + + final int value; + const NSDraggingFormation(this.value); + + static NSDraggingFormation fromValue(int value) => switch (value) { + 0 => NSDraggingFormationDefault, + 1 => NSDraggingFormationNone, + 2 => NSDraggingFormationPile, + 3 => NSDraggingFormationList, + 4 => NSDraggingFormationStack, + _ => throw ArgumentError('Unknown value for NSDraggingFormation: $value'), + }; +} + +sealed class NSDraggingItemEnumerationOptions { + static const NSDraggingItemEnumerationConcurrent = 1; + static const NSDraggingItemEnumerationClearNonenumeratedImages = 65536; +} + +sealed class NSEventButtonMask { + static const NSEventButtonMaskPenTip = 1; + static const NSEventButtonMaskPenLowerSide = 2; + static const NSEventButtonMaskPenUpperSide = 4; +} + +enum NSEventGestureAxis { + NSEventGestureAxisNone(0), + NSEventGestureAxisHorizontal(1), + NSEventGestureAxisVertical(2); + + final int value; + const NSEventGestureAxis(this.value); + + static NSEventGestureAxis fromValue(int value) => switch (value) { + 0 => NSEventGestureAxisNone, + 1 => NSEventGestureAxisHorizontal, + 2 => NSEventGestureAxisVertical, + _ => throw ArgumentError('Unknown value for NSEventGestureAxis: $value'), + }; +} + +sealed class NSEventMask { + static const NSEventMaskLeftMouseDown = 2; + static const NSEventMaskLeftMouseUp = 4; + static const NSEventMaskRightMouseDown = 8; + static const NSEventMaskRightMouseUp = 16; + static const NSEventMaskMouseMoved = 32; + static const NSEventMaskLeftMouseDragged = 64; + static const NSEventMaskRightMouseDragged = 128; + static const NSEventMaskMouseEntered = 256; + static const NSEventMaskMouseExited = 512; + static const NSEventMaskKeyDown = 1024; + static const NSEventMaskKeyUp = 2048; + static const NSEventMaskFlagsChanged = 4096; + static const NSEventMaskAppKitDefined = 8192; + static const NSEventMaskSystemDefined = 16384; + static const NSEventMaskApplicationDefined = 32768; + static const NSEventMaskPeriodic = 65536; + static const NSEventMaskCursorUpdate = 131072; + static const NSEventMaskScrollWheel = 4194304; + static const NSEventMaskTabletPoint = 8388608; + static const NSEventMaskTabletProximity = 16777216; + static const NSEventMaskOtherMouseDown = 33554432; + static const NSEventMaskOtherMouseUp = 67108864; + static const NSEventMaskOtherMouseDragged = 134217728; + static const NSEventMaskGesture = 536870912; + static const NSEventMaskMagnify = 1073741824; + static const NSEventMaskSwipe = 2147483648; + static const NSEventMaskRotate = 262144; + static const NSEventMaskBeginGesture = 524288; + static const NSEventMaskEndGesture = 1048576; + static const NSEventMaskSmartMagnify = 4294967296; + static const NSEventMaskPressure = 17179869184; + static const NSEventMaskDirectTouch = 137438953472; + static const NSEventMaskChangeMode = 274877906944; + static const NSEventMaskMouseCancelled = 1099511627776; + static const NSEventMaskAny = -1; +} + +sealed class NSEventModifierFlags { + static const NSEventModifierFlagCapsLock = 65536; + static const NSEventModifierFlagShift = 131072; + static const NSEventModifierFlagControl = 262144; + static const NSEventModifierFlagOption = 524288; + static const NSEventModifierFlagCommand = 1048576; + static const NSEventModifierFlagNumericPad = 2097152; + static const NSEventModifierFlagHelp = 4194304; + static const NSEventModifierFlagFunction = 8388608; + static const NSEventModifierFlagDeviceIndependentFlagsMask = 4294901760; +} + +sealed class NSEventPhase { + static const NSEventPhaseNone = 0; + static const NSEventPhaseBegan = 1; + static const NSEventPhaseStationary = 2; + static const NSEventPhaseChanged = 4; + static const NSEventPhaseEnded = 8; + static const NSEventPhaseCancelled = 16; + static const NSEventPhaseMayBegin = 32; +} + +enum NSEventSubtype { + NSEventSubtypeWindowExposed(0), + NSEventSubtypeApplicationActivated(1), + NSEventSubtypeApplicationDeactivated(2), + NSEventSubtypeWindowMoved(4), + NSEventSubtypeScreenChanged(8), + NSEventSubtypeTouch(3); + + static const NSEventSubtypePowerOff = NSEventSubtypeApplicationActivated; + static const NSEventSubtypeMouseEvent = NSEventSubtypeWindowExposed; + static const NSEventSubtypeTabletPoint = NSEventSubtypeApplicationActivated; + static const NSEventSubtypeTabletProximity = + NSEventSubtypeApplicationDeactivated; + + final int value; + const NSEventSubtype(this.value); + + static NSEventSubtype fromValue(int value) => switch (value) { + 0 => NSEventSubtypeWindowExposed, + 1 => NSEventSubtypeApplicationActivated, + 2 => NSEventSubtypeApplicationDeactivated, + 4 => NSEventSubtypeWindowMoved, + 8 => NSEventSubtypeScreenChanged, + 3 => NSEventSubtypeTouch, + _ => throw ArgumentError('Unknown value for NSEventSubtype: $value'), + }; + + @override + String toString() { + if (this == NSEventSubtypeWindowExposed) + return "NSEventSubtype.NSEventSubtypeWindowExposed, NSEventSubtype.NSEventSubtypeMouseEvent"; + if (this == NSEventSubtypeApplicationActivated) + return "NSEventSubtype.NSEventSubtypeApplicationActivated, NSEventSubtype.NSEventSubtypePowerOff, NSEventSubtype.NSEventSubtypeTabletPoint"; + if (this == NSEventSubtypeApplicationDeactivated) + return "NSEventSubtype.NSEventSubtypeApplicationDeactivated, NSEventSubtype.NSEventSubtypeTabletProximity"; + return super.toString(); + } +} + +sealed class NSEventSwipeTrackingOptions { + static const NSEventSwipeTrackingLockDirection = 1; + static const NSEventSwipeTrackingClampGestureAmount = 2; +} + +enum NSEventType { + NSEventTypeLeftMouseDown(1), + NSEventTypeLeftMouseUp(2), + NSEventTypeRightMouseDown(3), + NSEventTypeRightMouseUp(4), + NSEventTypeMouseMoved(5), + NSEventTypeLeftMouseDragged(6), + NSEventTypeRightMouseDragged(7), + NSEventTypeMouseEntered(8), + NSEventTypeMouseExited(9), + NSEventTypeKeyDown(10), + NSEventTypeKeyUp(11), + NSEventTypeFlagsChanged(12), + NSEventTypeAppKitDefined(13), + NSEventTypeSystemDefined(14), + NSEventTypeApplicationDefined(15), + NSEventTypePeriodic(16), + NSEventTypeCursorUpdate(17), + NSEventTypeScrollWheel(22), + NSEventTypeTabletPoint(23), + NSEventTypeTabletProximity(24), + NSEventTypeOtherMouseDown(25), + NSEventTypeOtherMouseUp(26), + NSEventTypeOtherMouseDragged(27), + NSEventTypeGesture(29), + NSEventTypeMagnify(30), + NSEventTypeSwipe(31), + NSEventTypeRotate(18), + NSEventTypeBeginGesture(19), + NSEventTypeEndGesture(20), + NSEventTypeSmartMagnify(32), + NSEventTypeQuickLook(33), + NSEventTypePressure(34), + NSEventTypeDirectTouch(37), + NSEventTypeChangeMode(38), + NSEventTypeMouseCancelled(40); + + final int value; + const NSEventType(this.value); + + static NSEventType fromValue(int value) => switch (value) { + 1 => NSEventTypeLeftMouseDown, + 2 => NSEventTypeLeftMouseUp, + 3 => NSEventTypeRightMouseDown, + 4 => NSEventTypeRightMouseUp, + 5 => NSEventTypeMouseMoved, + 6 => NSEventTypeLeftMouseDragged, + 7 => NSEventTypeRightMouseDragged, + 8 => NSEventTypeMouseEntered, + 9 => NSEventTypeMouseExited, + 10 => NSEventTypeKeyDown, + 11 => NSEventTypeKeyUp, + 12 => NSEventTypeFlagsChanged, + 13 => NSEventTypeAppKitDefined, + 14 => NSEventTypeSystemDefined, + 15 => NSEventTypeApplicationDefined, + 16 => NSEventTypePeriodic, + 17 => NSEventTypeCursorUpdate, + 22 => NSEventTypeScrollWheel, + 23 => NSEventTypeTabletPoint, + 24 => NSEventTypeTabletProximity, + 25 => NSEventTypeOtherMouseDown, + 26 => NSEventTypeOtherMouseUp, + 27 => NSEventTypeOtherMouseDragged, + 29 => NSEventTypeGesture, + 30 => NSEventTypeMagnify, + 31 => NSEventTypeSwipe, + 18 => NSEventTypeRotate, + 19 => NSEventTypeBeginGesture, + 20 => NSEventTypeEndGesture, + 32 => NSEventTypeSmartMagnify, + 33 => NSEventTypeQuickLook, + 34 => NSEventTypePressure, + 37 => NSEventTypeDirectTouch, + 38 => NSEventTypeChangeMode, + 40 => NSEventTypeMouseCancelled, + _ => throw ArgumentError('Unknown value for NSEventType: $value'), + }; +} + +sealed class NSFileWrapperReadingOptions { + static const NSFileWrapperReadingImmediate = 1; + static const NSFileWrapperReadingWithoutMapping = 2; +} + +sealed class NSFileWrapperWritingOptions { + static const NSFileWrapperWritingAtomic = 1; + static const NSFileWrapperWritingWithNameUpdating = 2; +} + +enum NSFocusRingType { + NSFocusRingTypeDefault(0), + NSFocusRingTypeNone(1), + NSFocusRingTypeExterior(2); + + final int value; + const NSFocusRingType(this.value); + + static NSFocusRingType fromValue(int value) => switch (value) { + 0 => NSFocusRingTypeDefault, + 1 => NSFocusRingTypeNone, + 2 => NSFocusRingTypeExterior, + _ => throw ArgumentError('Unknown value for NSFocusRingType: $value'), + }; +} + +/// NSImage /// /// NSImage extension type NSImage._(objc.ObjCObject object$) implements objc.ObjCObject { @@ -440,8 +1060,48 @@ extension type NSMenuItemValidation._(objc.ObjCProtocol object$) }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); } -/// WARNING: NSPanel is a stub. To generate bindings for this class, include -/// NSPanel in your config's objc-interfaces list. +enum NSMenuPresentationStyle { + NSMenuPresentationStyleRegular(0), + NSMenuPresentationStylePalette(1); + + final int value; + const NSMenuPresentationStyle(this.value); + + static NSMenuPresentationStyle fromValue(int value) => switch (value) { + 0 => NSMenuPresentationStyleRegular, + 1 => NSMenuPresentationStylePalette, + _ => throw ArgumentError( + 'Unknown value for NSMenuPresentationStyle: $value', + ), + }; +} + +sealed class NSMenuProperties { + static const NSMenuPropertyItemTitle = 1; + static const NSMenuPropertyItemAttributedTitle = 2; + static const NSMenuPropertyItemKeyEquivalent = 4; + static const NSMenuPropertyItemImage = 8; + static const NSMenuPropertyItemEnabled = 16; + static const NSMenuPropertyItemAccessibilityDescription = 32; +} + +enum NSMenuSelectionMode { + NSMenuSelectionModeAutomatic(0), + NSMenuSelectionModeSelectOne(1), + NSMenuSelectionModeSelectAny(2); + + final int value; + const NSMenuSelectionMode(this.value); + + static NSMenuSelectionMode fromValue(int value) => switch (value) { + 0 => NSMenuSelectionModeAutomatic, + 1 => NSMenuSelectionModeSelectOne, + 2 => NSMenuSelectionModeSelectAny, + _ => throw ArgumentError('Unknown value for NSMenuSelectionMode: $value'), + }; +} + +/// NSPanel /// /// NSPanel extension type NSPanel._(objc.ObjCObject object$) @@ -461,8 +1121,109 @@ extension type NSPanel._(objc.ObjCObject object$) } } -/// WARNING: NSResponder is a stub. To generate bindings for this class, include -/// NSResponder in your config's objc-interfaces list. +enum NSPasteboardAccessBehavior { + NSPasteboardAccessBehaviorDefault(0), + NSPasteboardAccessBehaviorAsk(1), + NSPasteboardAccessBehaviorAlwaysAllow(2), + NSPasteboardAccessBehaviorAlwaysDeny(3); + + final int value; + const NSPasteboardAccessBehavior(this.value); + + static NSPasteboardAccessBehavior fromValue(int value) => switch (value) { + 0 => NSPasteboardAccessBehaviorDefault, + 1 => NSPasteboardAccessBehaviorAsk, + 2 => NSPasteboardAccessBehaviorAlwaysAllow, + 3 => NSPasteboardAccessBehaviorAlwaysDeny, + _ => throw ArgumentError( + 'Unknown value for NSPasteboardAccessBehavior: $value', + ), + }; +} + +sealed class NSPasteboardContentsOptions { + static const NSPasteboardContentsCurrentHostOnly = 1; +} + +enum NSPointingDeviceType { + NSPointingDeviceTypeUnknown(0), + NSPointingDeviceTypePen(1), + NSPointingDeviceTypeCursor(2), + NSPointingDeviceTypeEraser(3); + + final int value; + const NSPointingDeviceType(this.value); + + static NSPointingDeviceType fromValue(int value) => switch (value) { + 0 => NSPointingDeviceTypeUnknown, + 1 => NSPointingDeviceTypePen, + 2 => NSPointingDeviceTypeCursor, + 3 => NSPointingDeviceTypeEraser, + _ => throw ArgumentError('Unknown value for NSPointingDeviceType: $value'), + }; +} + +enum NSPressureBehavior { + NSPressureBehaviorUnknown(-1), + NSPressureBehaviorPrimaryDefault(0), + NSPressureBehaviorPrimaryClick(1), + NSPressureBehaviorPrimaryGeneric(2), + NSPressureBehaviorPrimaryAccelerator(3), + NSPressureBehaviorPrimaryDeepClick(5), + NSPressureBehaviorPrimaryDeepDrag(6); + + final int value; + const NSPressureBehavior(this.value); + + static NSPressureBehavior fromValue(int value) => switch (value) { + -1 => NSPressureBehaviorUnknown, + 0 => NSPressureBehaviorPrimaryDefault, + 1 => NSPressureBehaviorPrimaryClick, + 2 => NSPressureBehaviorPrimaryGeneric, + 3 => NSPressureBehaviorPrimaryAccelerator, + 5 => NSPressureBehaviorPrimaryDeepClick, + 6 => NSPressureBehaviorPrimaryDeepDrag, + _ => throw ArgumentError('Unknown value for NSPressureBehavior: $value'), + }; +} + +enum NSRectEdge { + NSRectEdgeMinX(0), + NSRectEdgeMinY(1), + NSRectEdgeMaxX(2), + NSRectEdgeMaxY(3); + + static const NSMinXEdge = NSRectEdgeMinX; + static const NSMinYEdge = NSRectEdgeMinY; + static const NSMaxXEdge = NSRectEdgeMaxX; + static const NSMaxYEdge = NSRectEdgeMaxY; + + final int value; + const NSRectEdge(this.value); + + static NSRectEdge fromValue(int value) => switch (value) { + 0 => NSRectEdgeMinX, + 1 => NSRectEdgeMinY, + 2 => NSRectEdgeMaxX, + 3 => NSRectEdgeMaxY, + _ => throw ArgumentError('Unknown value for NSRectEdge: $value'), + }; + + @override + String toString() { + if (this == NSRectEdgeMinX) + return "NSRectEdge.NSRectEdgeMinX, NSRectEdge.NSMinXEdge"; + if (this == NSRectEdgeMinY) + return "NSRectEdge.NSRectEdgeMinY, NSRectEdge.NSMinYEdge"; + if (this == NSRectEdgeMaxX) + return "NSRectEdge.NSRectEdgeMaxX, NSRectEdge.NSMaxXEdge"; + if (this == NSRectEdgeMaxY) + return "NSRectEdge.NSRectEdgeMaxY, NSRectEdge.NSMaxYEdge"; + return super.toString(); + } +} + +/// NSResponder /// /// NSResponder extension type NSResponder._(objc.ObjCObject object$) @@ -482,6 +1243,60 @@ extension type NSResponder._(objc.ObjCObject object$) } } +enum NSSelectionDirection { + NSDirectSelection(0), + NSSelectingNext(1), + NSSelectingPrevious(2); + + final int value; + const NSSelectionDirection(this.value); + + static NSSelectionDirection fromValue(int value) => switch (value) { + 0 => NSDirectSelection, + 1 => NSSelectingNext, + 2 => NSSelectingPrevious, + _ => throw ArgumentError('Unknown value for NSSelectionDirection: $value'), + }; +} + +enum NSSpringLoadingHighlight { + NSSpringLoadingHighlightNone(0), + NSSpringLoadingHighlightStandard(1), + NSSpringLoadingHighlightEmphasized(2); + + final int value; + const NSSpringLoadingHighlight(this.value); + + static NSSpringLoadingHighlight fromValue(int value) => switch (value) { + 0 => NSSpringLoadingHighlightNone, + 1 => NSSpringLoadingHighlightStandard, + 2 => NSSpringLoadingHighlightEmphasized, + _ => throw ArgumentError( + 'Unknown value for NSSpringLoadingHighlight: $value', + ), + }; +} + +enum NSTextAlignment { + NSTextAlignmentLeft(0), + NSTextAlignmentCenter(1), + NSTextAlignmentRight(2), + NSTextAlignmentJustified(3), + NSTextAlignmentNatural(4); + + final int value; + const NSTextAlignment(this.value); + + static NSTextAlignment fromValue(int value) => switch (value) { + 0 => NSTextAlignmentLeft, + 1 => NSTextAlignmentCenter, + 2 => NSTextAlignmentRight, + 3 => NSTextAlignmentJustified, + 4 => NSTextAlignmentNatural, + _ => throw ArgumentError('Unknown value for NSTextAlignment: $value'), + }; +} + /// NSTextList extension type NSTextList._(objc.ObjCObject object$) implements @@ -715,6 +1530,55 @@ sealed class NSTextListOptions { static const NSTextListPrependEnclosingMarker = 1; } +enum NSTitlebarSeparatorStyle { + NSTitlebarSeparatorStyleAutomatic(0), + NSTitlebarSeparatorStyleNone(1), + NSTitlebarSeparatorStyleLine(2), + NSTitlebarSeparatorStyleShadow(3); + + final int value; + const NSTitlebarSeparatorStyle(this.value); + + static NSTitlebarSeparatorStyle fromValue(int value) => switch (value) { + 0 => NSTitlebarSeparatorStyleAutomatic, + 1 => NSTitlebarSeparatorStyleNone, + 2 => NSTitlebarSeparatorStyleLine, + 3 => NSTitlebarSeparatorStyleShadow, + _ => throw ArgumentError( + 'Unknown value for NSTitlebarSeparatorStyle: $value', + ), + }; +} + +sealed class NSTouchPhase { + static const NSTouchPhaseBegan = 1; + static const NSTouchPhaseMoved = 2; + static const NSTouchPhaseStationary = 4; + static const NSTouchPhaseEnded = 8; + static const NSTouchPhaseCancelled = 16; + static const NSTouchPhaseTouching = 7; + static const NSTouchPhaseAny = -1; +} + +enum NSTouchType { + NSTouchTypeDirect(0), + NSTouchTypeIndirect(1); + + final int value; + const NSTouchType(this.value); + + static NSTouchType fromValue(int value) => switch (value) { + 0 => NSTouchTypeDirect, + 1 => NSTouchTypeIndirect, + _ => throw ArgumentError('Unknown value for NSTouchType: $value'), + }; +} + +sealed class NSTouchTypeMask { + static const NSTouchTypeMaskDirect = 1; + static const NSTouchTypeMaskIndirect = 2; +} + /// WARNING: NSUserInterfaceItemIdentification is a stub. To generate bindings for this class, include /// NSUserInterfaceItemIdentification in your config's objc-protocols list. /// @@ -732,6 +1596,22 @@ extension type NSUserInterfaceItemIdentification._(objc.ObjCProtocol object$) }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); } +enum NSUserInterfaceLayoutDirection { + NSUserInterfaceLayoutDirectionLeftToRight(0), + NSUserInterfaceLayoutDirectionRightToLeft(1); + + final int value; + const NSUserInterfaceLayoutDirection(this.value); + + static NSUserInterfaceLayoutDirection fromValue(int value) => switch (value) { + 0 => NSUserInterfaceLayoutDirectionLeftToRight, + 1 => NSUserInterfaceLayoutDirectionRightToLeft, + _ => throw ArgumentError( + 'Unknown value for NSUserInterfaceLayoutDirection: $value', + ), + }; +} + /// WARNING: NSUserInterfaceValidations is a stub. To generate bindings for this class, include /// NSUserInterfaceValidations in your config's objc-protocols list. /// @@ -749,8 +1629,66 @@ extension type NSUserInterfaceValidations._(objc.ObjCProtocol object$) }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); } -/// WARNING: NSWindow is a stub. To generate bindings for this class, include -/// NSWindow in your config's objc-interfaces list. +enum NSViewLayerContentsPlacement { + NSViewLayerContentsPlacementScaleAxesIndependently(0), + NSViewLayerContentsPlacementScaleProportionallyToFit(1), + NSViewLayerContentsPlacementScaleProportionallyToFill(2), + NSViewLayerContentsPlacementCenter(3), + NSViewLayerContentsPlacementTop(4), + NSViewLayerContentsPlacementTopRight(5), + NSViewLayerContentsPlacementRight(6), + NSViewLayerContentsPlacementBottomRight(7), + NSViewLayerContentsPlacementBottom(8), + NSViewLayerContentsPlacementBottomLeft(9), + NSViewLayerContentsPlacementLeft(10), + NSViewLayerContentsPlacementTopLeft(11); + + final int value; + const NSViewLayerContentsPlacement(this.value); + + static NSViewLayerContentsPlacement fromValue(int value) => switch (value) { + 0 => NSViewLayerContentsPlacementScaleAxesIndependently, + 1 => NSViewLayerContentsPlacementScaleProportionallyToFit, + 2 => NSViewLayerContentsPlacementScaleProportionallyToFill, + 3 => NSViewLayerContentsPlacementCenter, + 4 => NSViewLayerContentsPlacementTop, + 5 => NSViewLayerContentsPlacementTopRight, + 6 => NSViewLayerContentsPlacementRight, + 7 => NSViewLayerContentsPlacementBottomRight, + 8 => NSViewLayerContentsPlacementBottom, + 9 => NSViewLayerContentsPlacementBottomLeft, + 10 => NSViewLayerContentsPlacementLeft, + 11 => NSViewLayerContentsPlacementTopLeft, + _ => throw ArgumentError( + 'Unknown value for NSViewLayerContentsPlacement: $value', + ), + }; +} + +enum NSViewLayerContentsRedrawPolicy { + NSViewLayerContentsRedrawNever(0), + NSViewLayerContentsRedrawOnSetNeedsDisplay(1), + NSViewLayerContentsRedrawDuringViewResize(2), + NSViewLayerContentsRedrawBeforeViewResize(3), + NSViewLayerContentsRedrawCrossfade(4); + + final int value; + const NSViewLayerContentsRedrawPolicy(this.value); + + static NSViewLayerContentsRedrawPolicy fromValue(int value) => + switch (value) { + 0 => NSViewLayerContentsRedrawNever, + 1 => NSViewLayerContentsRedrawOnSetNeedsDisplay, + 2 => NSViewLayerContentsRedrawDuringViewResize, + 3 => NSViewLayerContentsRedrawBeforeViewResize, + 4 => NSViewLayerContentsRedrawCrossfade, + _ => throw ArgumentError( + 'Unknown value for NSViewLayerContentsRedrawPolicy: $value', + ), + }; +} + +/// NSWindow /// /// NSWindow extension type NSWindow._(objc.ObjCObject object$) @@ -779,29 +1717,268 @@ extension type NSWindow._(objc.ObjCObject object$) } } -/// UIPickerView -extension type UIPickerView._(objc.ObjCObject object$) - implements objc.ObjCObject, objc.NSCoding { - /// Constructs a [UIPickerView] that points to the same underlying object as [other]. - UIPickerView.as(objc.ObjCObject other) : object$ = other { - objc.checkOsVersionInternal('UIPickerView', iOS: (false, (2, 0, 0))); - assert(isA(object$)); - } +enum NSWindowAnimationBehavior { + NSWindowAnimationBehaviorDefault(0), + NSWindowAnimationBehaviorNone(2), + NSWindowAnimationBehaviorDocumentWindow(3), + NSWindowAnimationBehaviorUtilityWindow(4), + NSWindowAnimationBehaviorAlertPanel(5); - /// Constructs a [UIPickerView] that wraps the given raw object pointer. - UIPickerView.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - objc.checkOsVersionInternal('UIPickerView', iOS: (false, (2, 0, 0))); - assert(isA(object$)); - } + final int value; + const NSWindowAnimationBehavior(this.value); - /// Returns whether [obj] is an instance of [UIPickerView]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( + static NSWindowAnimationBehavior fromValue(int value) => switch (value) { + 0 => NSWindowAnimationBehaviorDefault, + 2 => NSWindowAnimationBehaviorNone, + 3 => NSWindowAnimationBehaviorDocumentWindow, + 4 => NSWindowAnimationBehaviorUtilityWindow, + 5 => NSWindowAnimationBehaviorAlertPanel, + _ => throw ArgumentError( + 'Unknown value for NSWindowAnimationBehavior: $value', + ), + }; +} + +@Deprecated('Deprecated') +enum NSWindowBackingLocation { + NSWindowBackingLocationDefault(0), + NSWindowBackingLocationVideoMemory(1), + NSWindowBackingLocationMainMemory(2); + + final int value; + const NSWindowBackingLocation(this.value); + + static NSWindowBackingLocation fromValue(int value) => switch (value) { + 0 => NSWindowBackingLocationDefault, + 1 => NSWindowBackingLocationVideoMemory, + 2 => NSWindowBackingLocationMainMemory, + _ => throw ArgumentError( + 'Unknown value for NSWindowBackingLocation: $value', + ), + }; +} + +enum NSWindowButton { + NSWindowCloseButton(0), + NSWindowMiniaturizeButton(1), + NSWindowZoomButton(2), + NSWindowToolbarButton(3), + NSWindowDocumentIconButton(4), + NSWindowDocumentVersionsButton(6); + + final int value; + const NSWindowButton(this.value); + + static NSWindowButton fromValue(int value) => switch (value) { + 0 => NSWindowCloseButton, + 1 => NSWindowMiniaturizeButton, + 2 => NSWindowZoomButton, + 3 => NSWindowToolbarButton, + 4 => NSWindowDocumentIconButton, + 6 => NSWindowDocumentVersionsButton, + _ => throw ArgumentError('Unknown value for NSWindowButton: $value'), + }; +} + +sealed class NSWindowCollectionBehavior { + static const NSWindowCollectionBehaviorDefault = 0; + static const NSWindowCollectionBehaviorCanJoinAllSpaces = 1; + static const NSWindowCollectionBehaviorMoveToActiveSpace = 2; + static const NSWindowCollectionBehaviorManaged = 4; + static const NSWindowCollectionBehaviorTransient = 8; + static const NSWindowCollectionBehaviorStationary = 16; + static const NSWindowCollectionBehaviorParticipatesInCycle = 32; + static const NSWindowCollectionBehaviorIgnoresCycle = 64; + static const NSWindowCollectionBehaviorFullScreenPrimary = 128; + static const NSWindowCollectionBehaviorFullScreenAuxiliary = 256; + static const NSWindowCollectionBehaviorFullScreenNone = 512; + static const NSWindowCollectionBehaviorFullScreenAllowsTiling = 2048; + static const NSWindowCollectionBehaviorFullScreenDisallowsTiling = 4096; + static const NSWindowCollectionBehaviorPrimary = 65536; + static const NSWindowCollectionBehaviorAuxiliary = 131072; + static const NSWindowCollectionBehaviorCanJoinAllApplications = 262144; +} + +enum NSWindowDepth { + NSWindowDepthTwentyfourBitRGB(520), + NSWindowDepthSixtyfourBitRGB(528), + NSWindowDepthOnehundredtwentyeightBitRGB(544); + + final int value; + const NSWindowDepth(this.value); + + static NSWindowDepth fromValue(int value) => switch (value) { + 520 => NSWindowDepthTwentyfourBitRGB, + 528 => NSWindowDepthSixtyfourBitRGB, + 544 => NSWindowDepthOnehundredtwentyeightBitRGB, + _ => throw ArgumentError('Unknown value for NSWindowDepth: $value'), + }; +} + +sealed class NSWindowNumberListOptions { + static const NSWindowNumberListAllApplications = 1; + static const NSWindowNumberListAllSpaces = 16; +} + +sealed class NSWindowOcclusionState { + static const NSWindowOcclusionStateVisible = 2; +} + +enum NSWindowOrderingMode { + NSWindowAbove(1), + NSWindowBelow(-1), + NSWindowOut(0); + + final int value; + const NSWindowOrderingMode(this.value); + + static NSWindowOrderingMode fromValue(int value) => switch (value) { + 1 => NSWindowAbove, + -1 => NSWindowBelow, + 0 => NSWindowOut, + _ => throw ArgumentError('Unknown value for NSWindowOrderingMode: $value'), + }; +} + +enum NSWindowSharingType { + NSWindowSharingNone(0), + NSWindowSharingReadOnly(1); + + final int value; + const NSWindowSharingType(this.value); + + static NSWindowSharingType fromValue(int value) => switch (value) { + 0 => NSWindowSharingNone, + 1 => NSWindowSharingReadOnly, + _ => throw ArgumentError('Unknown value for NSWindowSharingType: $value'), + }; +} + +sealed class NSWindowStyleMask { + static const NSWindowStyleMaskBorderless = 0; + static const NSWindowStyleMaskTitled = 1; + static const NSWindowStyleMaskClosable = 2; + static const NSWindowStyleMaskMiniaturizable = 4; + static const NSWindowStyleMaskResizable = 8; + static const NSWindowStyleMaskTexturedBackground = 256; + static const NSWindowStyleMaskUnifiedTitleAndToolbar = 4096; + static const NSWindowStyleMaskFullScreen = 16384; + static const NSWindowStyleMaskFullSizeContentView = 32768; + static const NSWindowStyleMaskUtilityWindow = 16; + static const NSWindowStyleMaskDocModalWindow = 64; + static const NSWindowStyleMaskNonactivatingPanel = 128; + static const NSWindowStyleMaskHUDWindow = 8192; +} + +enum NSWindowTabbingMode { + NSWindowTabbingModeAutomatic(0), + NSWindowTabbingModePreferred(1), + NSWindowTabbingModeDisallowed(2); + + final int value; + const NSWindowTabbingMode(this.value); + + static NSWindowTabbingMode fromValue(int value) => switch (value) { + 0 => NSWindowTabbingModeAutomatic, + 1 => NSWindowTabbingModePreferred, + 2 => NSWindowTabbingModeDisallowed, + _ => throw ArgumentError('Unknown value for NSWindowTabbingMode: $value'), + }; +} + +enum NSWindowTitleVisibility { + NSWindowTitleVisible(0), + NSWindowTitleHidden(1); + + final int value; + const NSWindowTitleVisibility(this.value); + + static NSWindowTitleVisibility fromValue(int value) => switch (value) { + 0 => NSWindowTitleVisible, + 1 => NSWindowTitleHidden, + _ => throw ArgumentError( + 'Unknown value for NSWindowTitleVisibility: $value', + ), + }; +} + +enum NSWindowToolbarStyle { + NSWindowToolbarStyleAutomatic(0), + NSWindowToolbarStyleExpanded(1), + NSWindowToolbarStylePreference(2), + NSWindowToolbarStyleUnified(3), + NSWindowToolbarStyleUnifiedCompact(4); + + final int value; + const NSWindowToolbarStyle(this.value); + + static NSWindowToolbarStyle fromValue(int value) => switch (value) { + 0 => NSWindowToolbarStyleAutomatic, + 1 => NSWindowToolbarStyleExpanded, + 2 => NSWindowToolbarStylePreference, + 3 => NSWindowToolbarStyleUnified, + 4 => NSWindowToolbarStyleUnifiedCompact, + _ => throw ArgumentError('Unknown value for NSWindowToolbarStyle: $value'), + }; +} + +enum NSWindowUserTabbingPreference { + NSWindowUserTabbingPreferenceManual(0), + NSWindowUserTabbingPreferenceAlways(1), + NSWindowUserTabbingPreferenceInFullScreen(2); + + final int value; + const NSWindowUserTabbingPreference(this.value); + + static NSWindowUserTabbingPreference fromValue(int value) => switch (value) { + 0 => NSWindowUserTabbingPreferenceManual, + 1 => NSWindowUserTabbingPreferenceAlways, + 2 => NSWindowUserTabbingPreferenceInFullScreen, + _ => throw ArgumentError( + 'Unknown value for NSWindowUserTabbingPreference: $value', + ), + }; +} + +enum NSWritingDirection { + NSWritingDirectionNatural(-1), + NSWritingDirectionLeftToRight(0), + NSWritingDirectionRightToLeft(1); + + final int value; + const NSWritingDirection(this.value); + + static NSWritingDirection fromValue(int value) => switch (value) { + -1 => NSWritingDirectionNatural, + 0 => NSWritingDirectionLeftToRight, + 1 => NSWritingDirectionRightToLeft, + _ => throw ArgumentError('Unknown value for NSWritingDirection: $value'), + }; +} + +/// UIPickerView +extension type UIPickerView._(objc.ObjCObject object$) + implements objc.ObjCObject, objc.NSCoding { + /// Constructs a [UIPickerView] that points to the same underlying object as [other]. + UIPickerView.as(objc.ObjCObject other) : object$ = other { + objc.checkOsVersionInternal('UIPickerView', iOS: (false, (2, 0, 0))); + assert(isA(object$)); + } + + /// Constructs a [UIPickerView] that wraps the given raw object pointer. + UIPickerView.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + objc.checkOsVersionInternal('UIPickerView', iOS: (false, (2, 0, 0))); + assert(isA(object$)); + } + + /// Returns whether [obj] is an instance of [UIPickerView]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, _class_UIPickerView, @@ -1068,6 +2245,98 @@ extension type UIPickerViewDelegate._(objc.ObjCProtocol object$) }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); } +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_CADisplayLink', +) +external ffi.Pointer _class_CADisplayLink_raw; +final _class_CADisplayLink = objc.getClass( + "CADisplayLink", + () => ffi.Native.addressOf>( + _class_CADisplayLink_raw, + ).cast(), +); +@ffi.Native>(symbol: 'OBJC_CLASS_\$_CALayer') +external ffi.Pointer _class_CALayer_raw; +final _class_CALayer = objc.getClass( + "CALayer", + () => ffi.Native.addressOf>( + _class_CALayer_raw, + ).cast(), +); +@ffi.Native>(symbol: 'OBJC_CLASS_\$_CIFilter') +external ffi.Pointer _class_CIFilter_raw; +final _class_CIFilter = objc.getClass( + "CIFilter", + () => ffi.Native.addressOf>( + _class_CIFilter_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSAppearance', +) +external ffi.Pointer _class_NSAppearance_raw; +final _class_NSAppearance = objc.getClass( + "NSAppearance", + () => ffi.Native.addressOf>( + _class_NSAppearance_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSBitmapImageRep', +) +external ffi.Pointer _class_NSBitmapImageRep_raw; +final _class_NSBitmapImageRep = objc.getClass( + "NSBitmapImageRep", + () => ffi.Native.addressOf>( + _class_NSBitmapImageRep_raw, + ).cast(), +); +@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSButton') +external ffi.Pointer _class_NSButton_raw; +final _class_NSButton = objc.getClass( + "NSButton", + () => ffi.Native.addressOf>( + _class_NSButton_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSButtonCell', +) +external ffi.Pointer _class_NSButtonCell_raw; +final _class_NSButtonCell = objc.getClass( + "NSButtonCell", + () => ffi.Native.addressOf>( + _class_NSButtonCell_raw, + ).cast(), +); +@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSColor') +external ffi.Pointer _class_NSColor_raw; +final _class_NSColor = objc.getClass( + "NSColor", + () => ffi.Native.addressOf>( + _class_NSColor_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSColorList', +) +external ffi.Pointer _class_NSColorList_raw; +final _class_NSColorList = objc.getClass( + "NSColorList", + () => ffi.Native.addressOf>( + _class_NSColorList_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSColorPanel', +) +external ffi.Pointer _class_NSColorPanel_raw; +final _class_NSColorPanel = objc.getClass( + "NSColorPanel", + () => ffi.Native.addressOf>( + _class_NSColorPanel_raw, + ).cast(), +); @ffi.Native>( symbol: 'OBJC_CLASS_\$_NSColorPicker', ) @@ -1078,6 +2347,228 @@ final _class_NSColorPicker = objc.getClass( _class_NSColorPicker_raw, ).cast(), ); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSColorSpace', +) +external ffi.Pointer _class_NSColorSpace_raw; +final _class_NSColorSpace = objc.getClass( + "NSColorSpace", + () => ffi.Native.addressOf>( + _class_NSColorSpace_raw, + ).cast(), +); +@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSCursor') +external ffi.Pointer _class_NSCursor_raw; +final _class_NSCursor = objc.getClass( + "NSCursor", + () => ffi.Native.addressOf>( + _class_NSCursor_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSDockTile', +) +external ffi.Pointer _class_NSDockTile_raw; +final _class_NSDockTile = objc.getClass( + "NSDockTile", + () => ffi.Native.addressOf>( + _class_NSDockTile_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSDraggingItem', +) +external ffi.Pointer _class_NSDraggingItem_raw; +final _class_NSDraggingItem = objc.getClass( + "NSDraggingItem", + () => ffi.Native.addressOf>( + _class_NSDraggingItem_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSDraggingSession', +) +external ffi.Pointer _class_NSDraggingSession_raw; +final _class_NSDraggingSession = objc.getClass( + "NSDraggingSession", + () => ffi.Native.addressOf>( + _class_NSDraggingSession_raw, + ).cast(), +); +@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSEvent') +external ffi.Pointer _class_NSEvent_raw; +final _class_NSEvent = objc.getClass( + "NSEvent", + () => ffi.Native.addressOf>( + _class_NSEvent_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSFileWrapper', +) +external ffi.Pointer _class_NSFileWrapper_raw; +final _class_NSFileWrapper = objc.getClass( + "NSFileWrapper", + () => ffi.Native.addressOf>( + _class_NSFileWrapper_raw, + ).cast(), +); +@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSFont') +external ffi.Pointer _class_NSFont_raw; +final _class_NSFont = objc.getClass( + "NSFont", + () => ffi.Native.addressOf>( + _class_NSFont_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSGestureRecognizer', +) +external ffi.Pointer _class_NSGestureRecognizer_raw; +final _class_NSGestureRecognizer = objc.getClass( + "NSGestureRecognizer", + () => ffi.Native.addressOf>( + _class_NSGestureRecognizer_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSGraphicsContext', +) +external ffi.Pointer _class_NSGraphicsContext_raw; +final _class_NSGraphicsContext = objc.getClass( + "NSGraphicsContext", + () => ffi.Native.addressOf>( + _class_NSGraphicsContext_raw, + ).cast(), +); +@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSImage') +external ffi.Pointer _class_NSImage_raw; +final _class_NSImage = objc.getClass( + "NSImage", + () => ffi.Native.addressOf>( + _class_NSImage_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSLayoutGuide', +) +external ffi.Pointer _class_NSLayoutGuide_raw; +final _class_NSLayoutGuide = objc.getClass( + "NSLayoutGuide", + () => ffi.Native.addressOf>( + _class_NSLayoutGuide_raw, + ).cast(), +); +@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSMenu') +external ffi.Pointer _class_NSMenu_raw; +final _class_NSMenu = objc.getClass( + "NSMenu", + () => ffi.Native.addressOf>( + _class_NSMenu_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSMenuItem', +) +external ffi.Pointer _class_NSMenuItem_raw; +final _class_NSMenuItem = objc.getClass( + "NSMenuItem", + () => ffi.Native.addressOf>( + _class_NSMenuItem_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSMenuItemBadge', +) +external ffi.Pointer _class_NSMenuItemBadge_raw; +final _class_NSMenuItemBadge = objc.getClass( + "NSMenuItemBadge", + () => ffi.Native.addressOf>( + _class_NSMenuItemBadge_raw, + ).cast(), +); +@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSPanel') +external ffi.Pointer _class_NSPanel_raw; +final _class_NSPanel = objc.getClass( + "NSPanel", + () => ffi.Native.addressOf>( + _class_NSPanel_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSPasteboard', +) +external ffi.Pointer _class_NSPasteboard_raw; +final _class_NSPasteboard = objc.getClass( + "NSPasteboard", + () => ffi.Native.addressOf>( + _class_NSPasteboard_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSPasteboardItem', +) +external ffi.Pointer _class_NSPasteboardItem_raw; +final _class_NSPasteboardItem = objc.getClass( + "NSPasteboardItem", + () => ffi.Native.addressOf>( + _class_NSPasteboardItem_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSResponder', +) +external ffi.Pointer _class_NSResponder_raw; +final _class_NSResponder = objc.getClass( + "NSResponder", + () => ffi.Native.addressOf>( + _class_NSResponder_raw, + ).cast(), +); +@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSScreen') +external ffi.Pointer _class_NSScreen_raw; +final _class_NSScreen = objc.getClass( + "NSScreen", + () => ffi.Native.addressOf>( + _class_NSScreen_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSScrollView', +) +external ffi.Pointer _class_NSScrollView_raw; +final _class_NSScrollView = objc.getClass( + "NSScrollView", + () => ffi.Native.addressOf>( + _class_NSScrollView_raw, + ).cast(), +); +@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSShadow') +external ffi.Pointer _class_NSShadow_raw; +final _class_NSShadow = objc.getClass( + "NSShadow", + () => ffi.Native.addressOf>( + _class_NSShadow_raw, + ).cast(), +); +@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSText') +external ffi.Pointer _class_NSText_raw; +final _class_NSText = objc.getClass( + "NSText", + () => ffi.Native.addressOf>( + _class_NSText_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSTextInputContext', +) +external ffi.Pointer _class_NSTextInputContext_raw; +final _class_NSTextInputContext = objc.getClass( + "NSTextInputContext", + () => ffi.Native.addressOf>( + _class_NSTextInputContext_raw, + ).cast(), +); @ffi.Native>( symbol: 'OBJC_CLASS_\$_NSTextList', ) @@ -1089,28 +2580,151 @@ final _class_NSTextList = objc.getClass( ).cast(), ); @ffi.Native>( - symbol: 'OBJC_CLASS_\$_UIPickerView', + symbol: 'OBJC_CLASS_\$_NSTitlebarAccessoryViewController', ) -external ffi.Pointer _class_UIPickerView_raw; -final _class_UIPickerView = objc.getClass( - "UIPickerView", +external ffi.Pointer +_class_NSTitlebarAccessoryViewController_raw; +final _class_NSTitlebarAccessoryViewController = objc.getClass( + "NSTitlebarAccessoryViewController", () => ffi.Native.addressOf>( - _class_UIPickerView_raw, + _class_NSTitlebarAccessoryViewController_raw, ).cast(), ); -final _objc_msgSend_12hwf9n = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ) - > - >() - .asFunction< - int Function( - ffi.Pointer, +@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSToolbar') +external ffi.Pointer _class_NSToolbar_raw; +final _class_NSToolbar = objc.getClass( + "NSToolbar", + () => ffi.Native.addressOf>( + _class_NSToolbar_raw, + ).cast(), +); +@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSTouch') +external ffi.Pointer _class_NSTouch_raw; +final _class_NSTouch = objc.getClass( + "NSTouch", + () => ffi.Native.addressOf>( + _class_NSTouch_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSTrackingArea', +) +external ffi.Pointer _class_NSTrackingArea_raw; +final _class_NSTrackingArea = objc.getClass( + "NSTrackingArea", + () => ffi.Native.addressOf>( + _class_NSTrackingArea_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSUndoManager', +) +external ffi.Pointer _class_NSUndoManager_raw; +final _class_NSUndoManager = objc.getClass( + "NSUndoManager", + () => ffi.Native.addressOf>( + _class_NSUndoManager_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSUserActivity', +) +external ffi.Pointer _class_NSUserActivity_raw; +final _class_NSUserActivity = objc.getClass( + "NSUserActivity", + () => ffi.Native.addressOf>( + _class_NSUserActivity_raw, + ).cast(), +); +@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSView') +external ffi.Pointer _class_NSView_raw; +final _class_NSView = objc.getClass( + "NSView", + () => ffi.Native.addressOf>( + _class_NSView_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSViewController', +) +external ffi.Pointer _class_NSViewController_raw; +final _class_NSViewController = objc.getClass( + "NSViewController", + () => ffi.Native.addressOf>( + _class_NSViewController_raw, + ).cast(), +); +@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSWindow') +external ffi.Pointer _class_NSWindow_raw; +final _class_NSWindow = objc.getClass( + "NSWindow", + () => ffi.Native.addressOf>( + _class_NSWindow_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSWindowController', +) +external ffi.Pointer _class_NSWindowController_raw; +final _class_NSWindowController = objc.getClass( + "NSWindowController", + () => ffi.Native.addressOf>( + _class_NSWindowController_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSWindowTab', +) +external ffi.Pointer _class_NSWindowTab_raw; +final _class_NSWindowTab = objc.getClass( + "NSWindowTab", + () => ffi.Native.addressOf>( + _class_NSWindowTab_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSWindowTabGroup', +) +external ffi.Pointer _class_NSWindowTabGroup_raw; +final _class_NSWindowTabGroup = objc.getClass( + "NSWindowTabGroup", + () => ffi.Native.addressOf>( + _class_NSWindowTabGroup_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSWritingToolsCoordinator', +) +external ffi.Pointer _class_NSWritingToolsCoordinator_raw; +final _class_NSWritingToolsCoordinator = objc.getClass( + "NSWritingToolsCoordinator", + () => ffi.Native.addressOf>( + _class_NSWritingToolsCoordinator_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_UIPickerView', +) +external ffi.Pointer _class_UIPickerView_raw; +final _class_UIPickerView = objc.getClass( + "UIPickerView", + () => ffi.Native.addressOf>( + _class_UIPickerView_raw, + ).cast(), +); +final _objc_msgSend_12hwf9n = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ) + > + >() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer, int, ) @@ -1425,6 +3039,23 @@ final _objc_msgSend_cy4jud = objc.msgSendPointer bool, ) >(); +final _objc_msgSend_e3qsqz = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); final _objc_msgSend_exovb9 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -1512,77 +3143,3462 @@ final _objc_msgSend_xtuoz7 = objc.msgSendPointer ffi.Pointer, ) >(); -late final _sel_alloc = objc.registerName("alloc"); -late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); -late final _sel_alphaControlAddedOrRemoved_ = objc.registerName( - "alphaControlAddedOrRemoved:", +@ffi.Native Function()>( + symbol: '_1hhvgmr_NSAccessibility', +) +external ffi.Pointer _protocol_NSAccessibility_raw(); +final _protocol_NSAccessibility = objc.getProtocol( + "NSAccessibility", + _protocol_NSAccessibility_raw, ); -late final _sel_attachColorList_ = objc.registerName("attachColorList:"); -late final _sel_buttonToolTip = objc.registerName("buttonToolTip"); -late final _sel_colorPanel = objc.registerName("colorPanel"); -late final _sel_dataSource = objc.registerName("dataSource"); -late final _sel_delegate = objc.registerName("delegate"); -late final _sel_detachColorList_ = objc.registerName("detachColorList:"); -late final _sel_encodeWithCoder_ = objc.registerName("encodeWithCoder:"); -late final _sel_init = objc.registerName("init"); -late final _sel_initWithCoder_ = objc.registerName("initWithCoder:"); -late final _sel_initWithMarkerFormat_options_ = objc.registerName( - "initWithMarkerFormat:options:", +@ffi.Native Function()>( + symbol: '_1hhvgmr_NSAccessibilityElement', +) +external ffi.Pointer +_protocol_NSAccessibilityElement_raw(); +final _protocol_NSAccessibilityElement = objc.getProtocol( + "NSAccessibilityElement", + _protocol_NSAccessibilityElement_raw, ); -late final _sel_initWithMarkerFormat_options_startingItemNumber_ = objc - .registerName("initWithMarkerFormat:options:startingItemNumber:"); -late final _sel_initWithPickerMask_colorPanel_ = objc.registerName( - "initWithPickerMask:colorPanel:", +@ffi.Native Function()>( + symbol: '_1hhvgmr_NSAnimatablePropertyContainer', +) +external ffi.Pointer +_protocol_NSAnimatablePropertyContainer_raw(); +final _protocol_NSAnimatablePropertyContainer = objc.getProtocol( + "NSAnimatablePropertyContainer", + _protocol_NSAnimatablePropertyContainer_raw, ); -late final _sel_insertNewButtonImage_in_ = objc.registerName( - "insertNewButtonImage:in:", +@ffi.Native Function()>( + symbol: '_1hhvgmr_NSAppearanceCustomization', +) +external ffi.Pointer +_protocol_NSAppearanceCustomization_raw(); +final _protocol_NSAppearanceCustomization = objc.getProtocol( + "NSAppearanceCustomization", + _protocol_NSAppearanceCustomization_raw, ); -late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); -late final _sel_isOrdered = objc.registerName("isOrdered"); -late final _sel_listOptions = objc.registerName("listOptions"); -late final _sel_markerForItemNumber_ = objc.registerName( - "markerForItemNumber:", +@ffi.Native Function()>( + symbol: '_1hhvgmr_NSChangeSpelling', +) +external ffi.Pointer _protocol_NSChangeSpelling_raw(); +final _protocol_NSChangeSpelling = objc.getProtocol( + "NSChangeSpelling", + _protocol_NSChangeSpelling_raw, ); -late final _sel_markerFormat = objc.registerName("markerFormat"); -late final _sel_minContentSize = objc.registerName("minContentSize"); -late final _sel_new = objc.registerName("new"); -late final _sel_numberOfComponents = objc.registerName("numberOfComponents"); -late final _sel_numberOfRowsInComponent_ = objc.registerName( - "numberOfRowsInComponent:", +@ffi.Native Function()>( + symbol: '_1hhvgmr_NSColorPickingDefault', +) +external ffi.Pointer +_protocol_NSColorPickingDefault_raw(); +final _protocol_NSColorPickingDefault = objc.getProtocol( + "NSColorPickingDefault", + _protocol_NSColorPickingDefault_raw, ); -late final _sel_provideNewButtonImage = objc.registerName( - "provideNewButtonImage", +@ffi.Native Function()>( + symbol: '_1hhvgmr_NSDraggingDestination', +) +external ffi.Pointer +_protocol_NSDraggingDestination_raw(); +final _protocol_NSDraggingDestination = objc.getProtocol( + "NSDraggingDestination", + _protocol_NSDraggingDestination_raw, ); -late final _sel_reloadAllComponents = objc.registerName("reloadAllComponents"); -late final _sel_reloadComponent_ = objc.registerName("reloadComponent:"); -late final _sel_rowSizeForComponent_ = objc.registerName( - "rowSizeForComponent:", +@ffi.Native Function()>( + symbol: '_1hhvgmr_NSDraggingInfo', +) +external ffi.Pointer _protocol_NSDraggingInfo_raw(); +final _protocol_NSDraggingInfo = objc.getProtocol( + "NSDraggingInfo", + _protocol_NSDraggingInfo_raw, ); -late final _sel_selectRow_inComponent_animated_ = objc.registerName( - "selectRow:inComponent:animated:", +@ffi.Native Function()>( + symbol: '_1hhvgmr_NSDraggingSource', +) +external ffi.Pointer _protocol_NSDraggingSource_raw(); +final _protocol_NSDraggingSource = objc.getProtocol( + "NSDraggingSource", + _protocol_NSDraggingSource_raw, ); -late final _sel_selectedRowInComponent_ = objc.registerName( - "selectedRowInComponent:", +@ffi.Native Function()>( + symbol: '_1hhvgmr_NSIgnoreMisspelledWords', +) +external ffi.Pointer +_protocol_NSIgnoreMisspelledWords_raw(); +final _protocol_NSIgnoreMisspelledWords = objc.getProtocol( + "NSIgnoreMisspelledWords", + _protocol_NSIgnoreMisspelledWords_raw, ); -late final _sel_setDataSource_ = objc.registerName("setDataSource:"); -late final _sel_setDelegate_ = objc.registerName("setDelegate:"); -late final _sel_setMode_ = objc.registerName("setMode:"); -late final _sel_setShowsSelectionIndicator_ = objc.registerName( - "setShowsSelectionIndicator:", +@ffi.Native Function()>( + symbol: '_1hhvgmr_NSMenuDelegate', +) +external ffi.Pointer _protocol_NSMenuDelegate_raw(); +final _protocol_NSMenuDelegate = objc.getProtocol( + "NSMenuDelegate", + _protocol_NSMenuDelegate_raw, ); -late final _sel_setStartingItemNumber_ = objc.registerName( - "setStartingItemNumber:", +@ffi.Native Function()>( + symbol: '_1hhvgmr_NSMenuItemValidation', +) +external ffi.Pointer +_protocol_NSMenuItemValidation_raw(); +final _protocol_NSMenuItemValidation = objc.getProtocol( + "NSMenuItemValidation", + _protocol_NSMenuItemValidation_raw, ); -late final _sel_showsSelectionIndicator = objc.registerName( - "showsSelectionIndicator", +@ffi.Native Function()>( + symbol: '_1hhvgmr_NSStandardKeyBindingResponding', +) +external ffi.Pointer +_protocol_NSStandardKeyBindingResponding_raw(); +final _protocol_NSStandardKeyBindingResponding = objc.getProtocol( + "NSStandardKeyBindingResponding", + _protocol_NSStandardKeyBindingResponding_raw, ); -late final _sel_startingItemNumber = objc.registerName("startingItemNumber"); -late final _sel_supportsSecureCoding = objc.registerName( - "supportsSecureCoding", +@ffi.Native Function()>( + symbol: '_1hhvgmr_NSTextDelegate', +) +external ffi.Pointer _protocol_NSTextDelegate_raw(); +final _protocol_NSTextDelegate = objc.getProtocol( + "NSTextDelegate", + _protocol_NSTextDelegate_raw, ); -late final _sel_viewForRow_forComponent_ = objc.registerName( - "viewForRow:forComponent:", +@ffi.Native Function()>( + symbol: '_1hhvgmr_NSUserActivityDelegate', +) +external ffi.Pointer +_protocol_NSUserActivityDelegate_raw(); +final _protocol_NSUserActivityDelegate = objc.getProtocol( + "NSUserActivityDelegate", + _protocol_NSUserActivityDelegate_raw, ); -late final _sel_viewSizeChanged_ = objc.registerName("viewSizeChanged:"); +@ffi.Native Function()>( + symbol: '_1hhvgmr_NSUserActivityRestoring', +) +external ffi.Pointer +_protocol_NSUserActivityRestoring_raw(); +final _protocol_NSUserActivityRestoring = objc.getProtocol( + "NSUserActivityRestoring", + _protocol_NSUserActivityRestoring_raw, +); +@ffi.Native Function()>( + symbol: '_1hhvgmr_NSUserInterfaceItemIdentification', +) +external ffi.Pointer +_protocol_NSUserInterfaceItemIdentification_raw(); +final _protocol_NSUserInterfaceItemIdentification = objc.getProtocol( + "NSUserInterfaceItemIdentification", + _protocol_NSUserInterfaceItemIdentification_raw, +); +@ffi.Native Function()>( + symbol: '_1hhvgmr_NSUserInterfaceValidations', +) +external ffi.Pointer +_protocol_NSUserInterfaceValidations_raw(); +final _protocol_NSUserInterfaceValidations = objc.getProtocol( + "NSUserInterfaceValidations", + _protocol_NSUserInterfaceValidations_raw, +); +@ffi.Native Function()>( + symbol: '_1hhvgmr_NSValidatedUserInterfaceItem', +) +external ffi.Pointer +_protocol_NSValidatedUserInterfaceItem_raw(); +final _protocol_NSValidatedUserInterfaceItem = objc.getProtocol( + "NSValidatedUserInterfaceItem", + _protocol_NSValidatedUserInterfaceItem_raw, +); +@ffi.Native Function()>( + symbol: '_1hhvgmr_NSWindowDelegate', +) +external ffi.Pointer _protocol_NSWindowDelegate_raw(); +final _protocol_NSWindowDelegate = objc.getProtocol( + "NSWindowDelegate", + _protocol_NSWindowDelegate_raw, +); +@ffi.Native Function()>( + symbol: '_1hhvgmr_UIPickerViewDataSource', +) +external ffi.Pointer +_protocol_UIPickerViewDataSource_raw(); +final _protocol_UIPickerViewDataSource = objc.getProtocol( + "UIPickerViewDataSource", + _protocol_UIPickerViewDataSource_raw, +); +@ffi.Native Function()>( + symbol: '_1hhvgmr_UIPickerViewDelegate', +) +external ffi.Pointer +_protocol_UIPickerViewDelegate_raw(); +final _protocol_UIPickerViewDelegate = objc.getProtocol( + "UIPickerViewDelegate", + _protocol_UIPickerViewDelegate_raw, +); +late final _sel_CGEvent = objc.registerName("CGEvent"); +late final _sel_RTFDFromRange_ = objc.registerName("RTFDFromRange:"); +late final _sel_RTFFromRange_ = objc.registerName("RTFFromRange:"); +late final _sel_absoluteX = objc.registerName("absoluteX"); +late final _sel_absoluteY = objc.registerName("absoluteY"); +late final _sel_absoluteZ = objc.registerName("absoluteZ"); +late final _sel_acceptsFirstMouse_ = objc.registerName("acceptsFirstMouse:"); +late final _sel_acceptsFirstResponder = objc.registerName( + "acceptsFirstResponder", +); +late final _sel_acceptsMouseMovedEvents = objc.registerName( + "acceptsMouseMovedEvents", +); +late final _sel_acceptsTouchEvents = objc.registerName("acceptsTouchEvents"); +late final _sel_accessBehavior = objc.registerName("accessBehavior"); +late final _sel_accessibilityActivationPoint = objc.registerName( + "accessibilityActivationPoint", +); +late final _sel_accessibilityAllowedValues = objc.registerName( + "accessibilityAllowedValues", +); +late final _sel_accessibilityApplicationFocusedUIElement = objc.registerName( + "accessibilityApplicationFocusedUIElement", +); +late final _sel_accessibilityAttributedStringForRange_ = objc.registerName( + "accessibilityAttributedStringForRange:", +); +late final _sel_accessibilityAttributedUserInputLabels = objc.registerName( + "accessibilityAttributedUserInputLabels", +); +late final _sel_accessibilityCancelButton = objc.registerName( + "accessibilityCancelButton", +); +late final _sel_accessibilityCellForColumn_row_ = objc.registerName( + "accessibilityCellForColumn:row:", +); +late final _sel_accessibilityChildren = objc.registerName( + "accessibilityChildren", +); +late final _sel_accessibilityChildrenInNavigationOrder = objc.registerName( + "accessibilityChildrenInNavigationOrder", +); +late final _sel_accessibilityClearButton = objc.registerName( + "accessibilityClearButton", +); +late final _sel_accessibilityCloseButton = objc.registerName( + "accessibilityCloseButton", +); +late final _sel_accessibilityColumnCount = objc.registerName( + "accessibilityColumnCount", +); +late final _sel_accessibilityColumnHeaderUIElements = objc.registerName( + "accessibilityColumnHeaderUIElements", +); +late final _sel_accessibilityColumnIndexRange = objc.registerName( + "accessibilityColumnIndexRange", +); +late final _sel_accessibilityColumnTitles = objc.registerName( + "accessibilityColumnTitles", +); +late final _sel_accessibilityColumns = objc.registerName( + "accessibilityColumns", +); +late final _sel_accessibilityContents = objc.registerName( + "accessibilityContents", +); +late final _sel_accessibilityCriticalValue = objc.registerName( + "accessibilityCriticalValue", +); +late final _sel_accessibilityCustomActions = objc.registerName( + "accessibilityCustomActions", +); +late final _sel_accessibilityCustomRotors = objc.registerName( + "accessibilityCustomRotors", +); +late final _sel_accessibilityDecrementButton = objc.registerName( + "accessibilityDecrementButton", +); +late final _sel_accessibilityDefaultButton = objc.registerName( + "accessibilityDefaultButton", +); +late final _sel_accessibilityDisclosedByRow = objc.registerName( + "accessibilityDisclosedByRow", +); +late final _sel_accessibilityDisclosedRows = objc.registerName( + "accessibilityDisclosedRows", +); +late final _sel_accessibilityDisclosureLevel = objc.registerName( + "accessibilityDisclosureLevel", +); +late final _sel_accessibilityDocument = objc.registerName( + "accessibilityDocument", +); +late final _sel_accessibilityExtrasMenuBar = objc.registerName( + "accessibilityExtrasMenuBar", +); +late final _sel_accessibilityFilename = objc.registerName( + "accessibilityFilename", +); +late final _sel_accessibilityFocusedWindow = objc.registerName( + "accessibilityFocusedWindow", +); +late final _sel_accessibilityFrame = objc.registerName("accessibilityFrame"); +late final _sel_accessibilityFrameForRange_ = objc.registerName( + "accessibilityFrameForRange:", +); +late final _sel_accessibilityFullScreenButton = objc.registerName( + "accessibilityFullScreenButton", +); +late final _sel_accessibilityGrowArea = objc.registerName( + "accessibilityGrowArea", +); +late final _sel_accessibilityHandles = objc.registerName( + "accessibilityHandles", +); +late final _sel_accessibilityHeader = objc.registerName("accessibilityHeader"); +late final _sel_accessibilityHelp = objc.registerName("accessibilityHelp"); +late final _sel_accessibilityHorizontalScrollBar = objc.registerName( + "accessibilityHorizontalScrollBar", +); +late final _sel_accessibilityHorizontalUnitDescription = objc.registerName( + "accessibilityHorizontalUnitDescription", +); +late final _sel_accessibilityHorizontalUnits = objc.registerName( + "accessibilityHorizontalUnits", +); +late final _sel_accessibilityIdentifier = objc.registerName( + "accessibilityIdentifier", +); +late final _sel_accessibilityIncrementButton = objc.registerName( + "accessibilityIncrementButton", +); +late final _sel_accessibilityIndex = objc.registerName("accessibilityIndex"); +late final _sel_accessibilityInsertionPointLineNumber = objc.registerName( + "accessibilityInsertionPointLineNumber", +); +late final _sel_accessibilityLabel = objc.registerName("accessibilityLabel"); +late final _sel_accessibilityLabelUIElements = objc.registerName( + "accessibilityLabelUIElements", +); +late final _sel_accessibilityLabelValue = objc.registerName( + "accessibilityLabelValue", +); +late final _sel_accessibilityLayoutPointForScreenPoint_ = objc.registerName( + "accessibilityLayoutPointForScreenPoint:", +); +late final _sel_accessibilityLayoutSizeForScreenSize_ = objc.registerName( + "accessibilityLayoutSizeForScreenSize:", +); +late final _sel_accessibilityLineForIndex_ = objc.registerName( + "accessibilityLineForIndex:", +); +late final _sel_accessibilityLinkedUIElements = objc.registerName( + "accessibilityLinkedUIElements", +); +late final _sel_accessibilityMainWindow = objc.registerName( + "accessibilityMainWindow", +); +late final _sel_accessibilityMarkerGroupUIElement = objc.registerName( + "accessibilityMarkerGroupUIElement", +); +late final _sel_accessibilityMarkerTypeDescription = objc.registerName( + "accessibilityMarkerTypeDescription", +); +late final _sel_accessibilityMarkerUIElements = objc.registerName( + "accessibilityMarkerUIElements", +); +late final _sel_accessibilityMarkerValues = objc.registerName( + "accessibilityMarkerValues", +); +late final _sel_accessibilityMaxValue = objc.registerName( + "accessibilityMaxValue", +); +late final _sel_accessibilityMenuBar = objc.registerName( + "accessibilityMenuBar", +); +late final _sel_accessibilityMinValue = objc.registerName( + "accessibilityMinValue", +); +late final _sel_accessibilityMinimizeButton = objc.registerName( + "accessibilityMinimizeButton", +); +late final _sel_accessibilityNextContents = objc.registerName( + "accessibilityNextContents", +); +late final _sel_accessibilityNumberOfCharacters = objc.registerName( + "accessibilityNumberOfCharacters", +); +late final _sel_accessibilityOrientation = objc.registerName( + "accessibilityOrientation", +); +late final _sel_accessibilityOverflowButton = objc.registerName( + "accessibilityOverflowButton", +); +late final _sel_accessibilityParent = objc.registerName("accessibilityParent"); +late final _sel_accessibilityPerformCancel = objc.registerName( + "accessibilityPerformCancel", +); +late final _sel_accessibilityPerformConfirm = objc.registerName( + "accessibilityPerformConfirm", +); +late final _sel_accessibilityPerformDecrement = objc.registerName( + "accessibilityPerformDecrement", +); +late final _sel_accessibilityPerformDelete = objc.registerName( + "accessibilityPerformDelete", +); +late final _sel_accessibilityPerformIncrement = objc.registerName( + "accessibilityPerformIncrement", +); +late final _sel_accessibilityPerformPick = objc.registerName( + "accessibilityPerformPick", +); +late final _sel_accessibilityPerformPress = objc.registerName( + "accessibilityPerformPress", +); +late final _sel_accessibilityPerformRaise = objc.registerName( + "accessibilityPerformRaise", +); +late final _sel_accessibilityPerformShowAlternateUI = objc.registerName( + "accessibilityPerformShowAlternateUI", +); +late final _sel_accessibilityPerformShowDefaultUI = objc.registerName( + "accessibilityPerformShowDefaultUI", +); +late final _sel_accessibilityPerformShowMenu = objc.registerName( + "accessibilityPerformShowMenu", +); +late final _sel_accessibilityPlaceholderValue = objc.registerName( + "accessibilityPlaceholderValue", +); +late final _sel_accessibilityPreviousContents = objc.registerName( + "accessibilityPreviousContents", +); +late final _sel_accessibilityProxy = objc.registerName("accessibilityProxy"); +late final _sel_accessibilityRTFForRange_ = objc.registerName( + "accessibilityRTFForRange:", +); +late final _sel_accessibilityRangeForIndex_ = objc.registerName( + "accessibilityRangeForIndex:", +); +late final _sel_accessibilityRangeForLine_ = objc.registerName( + "accessibilityRangeForLine:", +); +late final _sel_accessibilityRangeForPosition_ = objc.registerName( + "accessibilityRangeForPosition:", +); +late final _sel_accessibilityRole = objc.registerName("accessibilityRole"); +late final _sel_accessibilityRoleDescription = objc.registerName( + "accessibilityRoleDescription", +); +late final _sel_accessibilityRowCount = objc.registerName( + "accessibilityRowCount", +); +late final _sel_accessibilityRowHeaderUIElements = objc.registerName( + "accessibilityRowHeaderUIElements", +); +late final _sel_accessibilityRowIndexRange = objc.registerName( + "accessibilityRowIndexRange", +); +late final _sel_accessibilityRows = objc.registerName("accessibilityRows"); +late final _sel_accessibilityRulerMarkerType = objc.registerName( + "accessibilityRulerMarkerType", +); +late final _sel_accessibilityScreenPointForLayoutPoint_ = objc.registerName( + "accessibilityScreenPointForLayoutPoint:", +); +late final _sel_accessibilityScreenSizeForLayoutSize_ = objc.registerName( + "accessibilityScreenSizeForLayoutSize:", +); +late final _sel_accessibilitySearchButton = objc.registerName( + "accessibilitySearchButton", +); +late final _sel_accessibilitySearchMenu = objc.registerName( + "accessibilitySearchMenu", +); +late final _sel_accessibilitySelectedCells = objc.registerName( + "accessibilitySelectedCells", +); +late final _sel_accessibilitySelectedChildren = objc.registerName( + "accessibilitySelectedChildren", +); +late final _sel_accessibilitySelectedColumns = objc.registerName( + "accessibilitySelectedColumns", +); +late final _sel_accessibilitySelectedRows = objc.registerName( + "accessibilitySelectedRows", +); +late final _sel_accessibilitySelectedText = objc.registerName( + "accessibilitySelectedText", +); +late final _sel_accessibilitySelectedTextRange = objc.registerName( + "accessibilitySelectedTextRange", +); +late final _sel_accessibilitySelectedTextRanges = objc.registerName( + "accessibilitySelectedTextRanges", +); +late final _sel_accessibilityServesAsTitleForUIElements = objc.registerName( + "accessibilityServesAsTitleForUIElements", +); +late final _sel_accessibilitySharedCharacterRange = objc.registerName( + "accessibilitySharedCharacterRange", +); +late final _sel_accessibilitySharedFocusElements = objc.registerName( + "accessibilitySharedFocusElements", +); +late final _sel_accessibilitySharedTextUIElements = objc.registerName( + "accessibilitySharedTextUIElements", +); +late final _sel_accessibilityShownMenu = objc.registerName( + "accessibilityShownMenu", +); +late final _sel_accessibilitySortDirection = objc.registerName( + "accessibilitySortDirection", +); +late final _sel_accessibilitySplitters = objc.registerName( + "accessibilitySplitters", +); +late final _sel_accessibilityStringForRange_ = objc.registerName( + "accessibilityStringForRange:", +); +late final _sel_accessibilityStyleRangeForIndex_ = objc.registerName( + "accessibilityStyleRangeForIndex:", +); +late final _sel_accessibilitySubrole = objc.registerName( + "accessibilitySubrole", +); +late final _sel_accessibilityTabs = objc.registerName("accessibilityTabs"); +late final _sel_accessibilityTitle = objc.registerName("accessibilityTitle"); +late final _sel_accessibilityTitleUIElement = objc.registerName( + "accessibilityTitleUIElement", +); +late final _sel_accessibilityToolbarButton = objc.registerName( + "accessibilityToolbarButton", +); +late final _sel_accessibilityTopLevelUIElement = objc.registerName( + "accessibilityTopLevelUIElement", +); +late final _sel_accessibilityURL = objc.registerName("accessibilityURL"); +late final _sel_accessibilityUnitDescription = objc.registerName( + "accessibilityUnitDescription", +); +late final _sel_accessibilityUnits = objc.registerName("accessibilityUnits"); +late final _sel_accessibilityUserInputLabels = objc.registerName( + "accessibilityUserInputLabels", +); +late final _sel_accessibilityValue = objc.registerName("accessibilityValue"); +late final _sel_accessibilityValueDescription = objc.registerName( + "accessibilityValueDescription", +); +late final _sel_accessibilityVerticalScrollBar = objc.registerName( + "accessibilityVerticalScrollBar", +); +late final _sel_accessibilityVerticalUnitDescription = objc.registerName( + "accessibilityVerticalUnitDescription", +); +late final _sel_accessibilityVerticalUnits = objc.registerName( + "accessibilityVerticalUnits", +); +late final _sel_accessibilityVisibleCells = objc.registerName( + "accessibilityVisibleCells", +); +late final _sel_accessibilityVisibleCharacterRange = objc.registerName( + "accessibilityVisibleCharacterRange", +); +late final _sel_accessibilityVisibleChildren = objc.registerName( + "accessibilityVisibleChildren", +); +late final _sel_accessibilityVisibleColumns = objc.registerName( + "accessibilityVisibleColumns", +); +late final _sel_accessibilityVisibleRows = objc.registerName( + "accessibilityVisibleRows", +); +late final _sel_accessibilityWarningValue = objc.registerName( + "accessibilityWarningValue", +); +late final _sel_accessibilityWindow = objc.registerName("accessibilityWindow"); +late final _sel_accessibilityWindows = objc.registerName( + "accessibilityWindows", +); +late final _sel_accessibilityZoomButton = objc.registerName( + "accessibilityZoomButton", +); +late final _sel_accessoryView = objc.registerName("accessoryView"); +late final _sel_action = objc.registerName("action"); +late final _sel_activityType = objc.registerName("activityType"); +late final _sel_addChildWindow_ordered_ = objc.registerName( + "addChildWindow:ordered:", +); +late final _sel_addCursorRect_cursor_ = objc.registerName( + "addCursorRect:cursor:", +); +late final _sel_addFileWithPath_ = objc.registerName("addFileWithPath:"); +late final _sel_addFileWrapper_ = objc.registerName("addFileWrapper:"); +late final _sel_addGestureRecognizer_ = objc.registerName( + "addGestureRecognizer:", +); +late final _sel_addGlobalMonitorForEventsMatchingMask_handler_ = objc + .registerName("addGlobalMonitorForEventsMatchingMask:handler:"); +late final _sel_addItemWithTitle_action_keyEquivalent_ = objc.registerName( + "addItemWithTitle:action:keyEquivalent:", +); +late final _sel_addItem_ = objc.registerName("addItem:"); +late final _sel_addLocalMonitorForEventsMatchingMask_handler_ = objc + .registerName("addLocalMonitorForEventsMatchingMask:handler:"); +late final _sel_addRegularFileWithContents_preferredFilename_ = objc + .registerName("addRegularFileWithContents:preferredFilename:"); +late final _sel_addSubview_ = objc.registerName("addSubview:"); +late final _sel_addSubview_positioned_relativeTo_ = objc.registerName( + "addSubview:positioned:relativeTo:", +); +late final _sel_addSymbolicLinkWithDestination_preferredFilename_ = objc + .registerName("addSymbolicLinkWithDestination:preferredFilename:"); +late final _sel_addTabbedWindow_ordered_ = objc.registerName( + "addTabbedWindow:ordered:", +); +late final _sel_addTitlebarAccessoryViewController_ = objc.registerName( + "addTitlebarAccessoryViewController:", +); +late final _sel_addToolTipRect_owner_userData_ = objc.registerName( + "addToolTipRect:owner:userData:", +); +late final _sel_addTrackingArea_ = objc.registerName("addTrackingArea:"); +late final _sel_addTrackingRect_owner_userData_assumeInside_ = objc + .registerName("addTrackingRect:owner:userData:assumeInside:"); +late final _sel_addTypes_owner_ = objc.registerName("addTypes:owner:"); +late final _sel_addUserInfoEntriesFromDictionary_ = objc.registerName( + "addUserInfoEntriesFromDictionary:", +); +late final _sel_additionalSafeAreaInsets = objc.registerName( + "additionalSafeAreaInsets", +); +late final _sel_adjustPageHeightNew_top_bottom_limit_ = objc.registerName( + "adjustPageHeightNew:top:bottom:limit:", +); +late final _sel_adjustPageWidthNew_left_right_limit_ = objc.registerName( + "adjustPageWidthNew:left:right:limit:", +); +late final _sel_adjustScroll_ = objc.registerName("adjustScroll:"); +late final _sel_alignCenter_ = objc.registerName("alignCenter:"); +late final _sel_alignLeft_ = objc.registerName("alignLeft:"); +late final _sel_alignRight_ = objc.registerName("alignRight:"); +late final _sel_alignment = objc.registerName("alignment"); +late final _sel_allTouches = objc.registerName("allTouches"); +late final _sel_alloc = objc.registerName("alloc"); +late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); +late final _sel_allocateGState = objc.registerName("allocateGState"); +late final _sel_allowedTouchTypes = objc.registerName("allowedTouchTypes"); +late final _sel_allowsAutomaticKeyEquivalentLocalization = objc.registerName( + "allowsAutomaticKeyEquivalentLocalization", +); +late final _sel_allowsAutomaticKeyEquivalentMirroring = objc.registerName( + "allowsAutomaticKeyEquivalentMirroring", +); +late final _sel_allowsAutomaticWindowTabbing = objc.registerName( + "allowsAutomaticWindowTabbing", +); +late final _sel_allowsConcurrentViewDrawing = objc.registerName( + "allowsConcurrentViewDrawing", +); +late final _sel_allowsContextMenuPlugIns = objc.registerName( + "allowsContextMenuPlugIns", +); +late final _sel_allowsKeyEquivalentWhenHidden = objc.registerName( + "allowsKeyEquivalentWhenHidden", +); +late final _sel_allowsToolTipsWhenApplicationIsInactive = objc.registerName( + "allowsToolTipsWhenApplicationIsInactive", +); +late final _sel_allowsVibrancy = objc.registerName("allowsVibrancy"); +late final _sel_alpha = objc.registerName("alpha"); +late final _sel_alphaControlAddedOrRemoved_ = objc.registerName( + "alphaControlAddedOrRemoved:", +); +late final _sel_alphaValue = objc.registerName("alphaValue"); +late final _sel_ancestorSharedWithView_ = objc.registerName( + "ancestorSharedWithView:", +); +late final _sel_animatesToDestination = objc.registerName( + "animatesToDestination", +); +late final _sel_animationBehavior = objc.registerName("animationBehavior"); +late final _sel_animationForKey_ = objc.registerName("animationForKey:"); +late final _sel_animationResizeTime_ = objc.registerName( + "animationResizeTime:", +); +late final _sel_animations = objc.registerName("animations"); +late final _sel_animator = objc.registerName("animator"); +late final _sel_appearance = objc.registerName("appearance"); +late final _sel_appearanceNamed_ = objc.registerName("appearanceNamed:"); +late final _sel_appearanceSource = objc.registerName("appearanceSource"); +late final _sel_areCursorRectsEnabled = objc.registerName( + "areCursorRectsEnabled", +); +late final _sel_aspectRatio = objc.registerName("aspectRatio"); +late final _sel_associatedEventsMask = objc.registerName( + "associatedEventsMask", +); +late final _sel_attachColorList_ = objc.registerName("attachColorList:"); +late final _sel_attachedMenu = objc.registerName("attachedMenu"); +late final _sel_attachedSheet = objc.registerName("attachedSheet"); +late final _sel_attributedTitle = objc.registerName("attributedTitle"); +late final _sel_autoenablesItems = objc.registerName("autoenablesItems"); +late final _sel_automaticallyInsertsWritingToolsItems = objc.registerName( + "automaticallyInsertsWritingToolsItems", +); +late final _sel_autorecalculatesContentBorderThicknessForEdge_ = objc + .registerName("autorecalculatesContentBorderThicknessForEdge:"); +late final _sel_autorecalculatesKeyViewLoop = objc.registerName( + "autorecalculatesKeyViewLoop", +); +late final _sel_autoresizesSubviews = objc.registerName("autoresizesSubviews"); +late final _sel_autoresizingMask = objc.registerName("autoresizingMask"); +late final _sel_autoscroll_ = objc.registerName("autoscroll:"); +late final _sel_availableTypeFromArray_ = objc.registerName( + "availableTypeFromArray:", +); +late final _sel_backgroundColor = objc.registerName("backgroundColor"); +late final _sel_backgroundFilters = objc.registerName("backgroundFilters"); +late final _sel_backingAlignedRect_options_ = objc.registerName( + "backingAlignedRect:options:", +); +late final _sel_backingLocation = objc.registerName("backingLocation"); +late final _sel_backingScaleFactor = objc.registerName("backingScaleFactor"); +late final _sel_backingType = objc.registerName("backingType"); +late final _sel_badge = objc.registerName("badge"); +late final _sel_baseWritingDirection = objc.registerName( + "baseWritingDirection", +); +late final _sel_becomeCurrent = objc.registerName("becomeCurrent"); +late final _sel_becomeFirstResponder = objc.registerName( + "becomeFirstResponder", +); +late final _sel_becomeKeyWindow = objc.registerName("becomeKeyWindow"); +late final _sel_becomeMainWindow = objc.registerName("becomeMainWindow"); +late final _sel_becomesKeyOnlyIfNeeded = objc.registerName( + "becomesKeyOnlyIfNeeded", +); +late final _sel_beginCriticalSheet_completionHandler_ = objc.registerName( + "beginCriticalSheet:completionHandler:", +); +late final _sel_beginDocument = objc.registerName("beginDocument"); +late final _sel_beginDraggingSessionWithItems_event_source_ = objc.registerName( + "beginDraggingSessionWithItems:event:source:", +); +late final _sel_beginGestureWithEvent_ = objc.registerName( + "beginGestureWithEvent:", +); +late final _sel_beginPageInRect_atPlacement_ = objc.registerName( + "beginPageInRect:atPlacement:", +); +late final _sel_beginSheet_completionHandler_ = objc.registerName( + "beginSheet:completionHandler:", +); +late final _sel_beginUndoGrouping = objc.registerName("beginUndoGrouping"); +late final _sel_bestMatchFromAppearancesWithNames_ = objc.registerName( + "bestMatchFromAppearancesWithNames:", +); +late final _sel_bitmapImageRepForCachingDisplayInRect_ = objc.registerName( + "bitmapImageRepForCachingDisplayInRect:", +); +late final _sel_bounds = objc.registerName("bounds"); +late final _sel_boundsRotation = objc.registerName("boundsRotation"); +late final _sel_buttonMask = objc.registerName("buttonMask"); +late final _sel_buttonNumber = objc.registerName("buttonNumber"); +late final _sel_buttonToolTip = objc.registerName("buttonToolTip"); +late final _sel_cacheDisplayInRect_toBitmapImageRep_ = objc.registerName( + "cacheDisplayInRect:toBitmapImageRep:", +); +late final _sel_cacheImageInRect_ = objc.registerName("cacheImageInRect:"); +late final _sel_canBecomeKeyView = objc.registerName("canBecomeKeyView"); +late final _sel_canBecomeKeyWindow = objc.registerName("canBecomeKeyWindow"); +late final _sel_canBecomeMainWindow = objc.registerName("canBecomeMainWindow"); +late final _sel_canBecomeVisibleWithoutLogin = objc.registerName( + "canBecomeVisibleWithoutLogin", +); +late final _sel_canDraw = objc.registerName("canDraw"); +late final _sel_canDrawConcurrently = objc.registerName("canDrawConcurrently"); +late final _sel_canDrawSubviewsIntoLayer = objc.registerName( + "canDrawSubviewsIntoLayer", +); +late final _sel_canHide = objc.registerName("canHide"); +late final _sel_canReadItemWithDataConformingToTypes_ = objc.registerName( + "canReadItemWithDataConformingToTypes:", +); +late final _sel_canReadObjectForClasses_options_ = objc.registerName( + "canReadObjectForClasses:options:", +); +late final _sel_canRedo = objc.registerName("canRedo"); +late final _sel_canRepresentDisplayGamut_ = objc.registerName( + "canRepresentDisplayGamut:", +); +late final _sel_canStoreColor = objc.registerName("canStoreColor"); +late final _sel_canUndo = objc.registerName("canUndo"); +late final _sel_cancelOperation_ = objc.registerName("cancelOperation:"); +late final _sel_cancelTracking = objc.registerName("cancelTracking"); +late final _sel_cancelTrackingWithoutAnimation = objc.registerName( + "cancelTrackingWithoutAnimation", +); +late final _sel_capabilityMask = objc.registerName("capabilityMask"); +late final _sel_capitalizeWord_ = objc.registerName("capitalizeWord:"); +late final _sel_cascadeTopLeftFromPoint_ = objc.registerName( + "cascadeTopLeftFromPoint:", +); +late final _sel_cascadingReferenceFrame = objc.registerName( + "cascadingReferenceFrame", +); +late final _sel_center = objc.registerName("center"); +late final _sel_centerScanRect_ = objc.registerName("centerScanRect:"); +late final _sel_centerSelectionInVisibleArea_ = objc.registerName( + "centerSelectionInVisibleArea:", +); +late final _sel_changeCaseOfLetter_ = objc.registerName("changeCaseOfLetter:"); +late final _sel_changeCount = objc.registerName("changeCount"); +late final _sel_changeFont_ = objc.registerName("changeFont:"); +late final _sel_changeModeWithEvent_ = objc.registerName( + "changeModeWithEvent:", +); +late final _sel_changeSpelling_ = objc.registerName("changeSpelling:"); +late final _sel_characters = objc.registerName("characters"); +late final _sel_charactersByApplyingModifiers_ = objc.registerName( + "charactersByApplyingModifiers:", +); +late final _sel_charactersIgnoringModifiers = objc.registerName( + "charactersIgnoringModifiers", +); +late final _sel_checkSpelling_ = objc.registerName("checkSpelling:"); +late final _sel_childWindows = objc.registerName("childWindows"); +late final _sel_clearContents = objc.registerName("clearContents"); +late final _sel_clickCount = objc.registerName("clickCount"); +late final _sel_clipsToBounds = objc.registerName("clipsToBounds"); +late final _sel_close = objc.registerName("close"); +late final _sel_coalescedTouchesForTouch_ = objc.registerName( + "coalescedTouchesForTouch:", +); +late final _sel_collectionBehavior = objc.registerName("collectionBehavior"); +late final _sel_color = objc.registerName("color"); +late final _sel_colorPanel = objc.registerName("colorPanel"); +late final _sel_colorSpace = objc.registerName("colorSpace"); +late final _sel_complete_ = objc.registerName("complete:"); +late final _sel_compositingFilter = objc.registerName("compositingFilter"); +late final _sel_concludeDragOperation_ = objc.registerName( + "concludeDragOperation:", +); +late final _sel_confinementRectForMenu_onScreen_ = objc.registerName( + "confinementRectForMenu:onScreen:", +); +late final _sel_conformsToProtocol_ = objc.registerName("conformsToProtocol:"); +late final _sel_constrainFrameRect_toScreen_ = objc.registerName( + "constrainFrameRect:toScreen:", +); +late final _sel_contentAspectRatio = objc.registerName("contentAspectRatio"); +late final _sel_contentBorderThicknessForEdge_ = objc.registerName( + "contentBorderThicknessForEdge:", +); +late final _sel_contentFilters = objc.registerName("contentFilters"); +late final _sel_contentLayoutGuide = objc.registerName("contentLayoutGuide"); +late final _sel_contentLayoutRect = objc.registerName("contentLayoutRect"); +late final _sel_contentMaxSize = objc.registerName("contentMaxSize"); +late final _sel_contentMinSize = objc.registerName("contentMinSize"); +late final _sel_contentRectForFrameRect_ = objc.registerName( + "contentRectForFrameRect:", +); +late final _sel_contentRectForFrameRect_styleMask_ = objc.registerName( + "contentRectForFrameRect:styleMask:", +); +late final _sel_contentResizeIncrements = objc.registerName( + "contentResizeIncrements", +); +late final _sel_contentView = objc.registerName("contentView"); +late final _sel_contentViewController = objc.registerName( + "contentViewController", +); +late final _sel_context = objc.registerName("context"); +late final _sel_contextMenuKeyDown_ = objc.registerName("contextMenuKeyDown:"); +late final _sel_contextMenuRepresentation = objc.registerName( + "contextMenuRepresentation", +); +late final _sel_convertBaseToScreen_ = objc.registerName( + "convertBaseToScreen:", +); +late final _sel_convertPointFromBacking_ = objc.registerName( + "convertPointFromBacking:", +); +late final _sel_convertPointFromBase_ = objc.registerName( + "convertPointFromBase:", +); +late final _sel_convertPointFromLayer_ = objc.registerName( + "convertPointFromLayer:", +); +late final _sel_convertPointFromScreen_ = objc.registerName( + "convertPointFromScreen:", +); +late final _sel_convertPointToBacking_ = objc.registerName( + "convertPointToBacking:", +); +late final _sel_convertPointToBase_ = objc.registerName("convertPointToBase:"); +late final _sel_convertPointToLayer_ = objc.registerName( + "convertPointToLayer:", +); +late final _sel_convertPointToScreen_ = objc.registerName( + "convertPointToScreen:", +); +late final _sel_convertPoint_fromView_ = objc.registerName( + "convertPoint:fromView:", +); +late final _sel_convertPoint_toView_ = objc.registerName( + "convertPoint:toView:", +); +late final _sel_convertRectFromBacking_ = objc.registerName( + "convertRectFromBacking:", +); +late final _sel_convertRectFromBase_ = objc.registerName( + "convertRectFromBase:", +); +late final _sel_convertRectFromLayer_ = objc.registerName( + "convertRectFromLayer:", +); +late final _sel_convertRectFromScreen_ = objc.registerName( + "convertRectFromScreen:", +); +late final _sel_convertRectToBacking_ = objc.registerName( + "convertRectToBacking:", +); +late final _sel_convertRectToBase_ = objc.registerName("convertRectToBase:"); +late final _sel_convertRectToLayer_ = objc.registerName("convertRectToLayer:"); +late final _sel_convertRectToScreen_ = objc.registerName( + "convertRectToScreen:", +); +late final _sel_convertRect_fromView_ = objc.registerName( + "convertRect:fromView:", +); +late final _sel_convertRect_toView_ = objc.registerName("convertRect:toView:"); +late final _sel_convertScreenToBase_ = objc.registerName( + "convertScreenToBase:", +); +late final _sel_convertSizeFromBacking_ = objc.registerName( + "convertSizeFromBacking:", +); +late final _sel_convertSizeFromBase_ = objc.registerName( + "convertSizeFromBase:", +); +late final _sel_convertSizeFromLayer_ = objc.registerName( + "convertSizeFromLayer:", +); +late final _sel_convertSizeToBacking_ = objc.registerName( + "convertSizeToBacking:", +); +late final _sel_convertSizeToBase_ = objc.registerName("convertSizeToBase:"); +late final _sel_convertSizeToLayer_ = objc.registerName("convertSizeToLayer:"); +late final _sel_convertSize_fromView_ = objc.registerName( + "convertSize:fromView:", +); +late final _sel_convertSize_toView_ = objc.registerName("convertSize:toView:"); +late final _sel_copyFont_ = objc.registerName("copyFont:"); +late final _sel_copyRuler_ = objc.registerName("copyRuler:"); +late final _sel_copy_ = objc.registerName("copy:"); +late final _sel_currentAppearance = objc.registerName("currentAppearance"); +late final _sel_currentDrawingAppearance = objc.registerName( + "currentDrawingAppearance", +); +late final _sel_currentEvent = objc.registerName("currentEvent"); +late final _sel_cursorUpdate_ = objc.registerName("cursorUpdate:"); +late final _sel_customWindowsToEnterFullScreenForWindow_ = objc.registerName( + "customWindowsToEnterFullScreenForWindow:", +); +late final _sel_customWindowsToEnterFullScreenForWindow_onScreen_ = objc + .registerName("customWindowsToEnterFullScreenForWindow:onScreen:"); +late final _sel_customWindowsToExitFullScreenForWindow_ = objc.registerName( + "customWindowsToExitFullScreenForWindow:", +); +late final _sel_cut_ = objc.registerName("cut:"); +late final _sel_data1 = objc.registerName("data1"); +late final _sel_data2 = objc.registerName("data2"); +late final _sel_dataForType_ = objc.registerName("dataForType:"); +late final _sel_dataSource = objc.registerName("dataSource"); +late final _sel_dataWithEPSInsideRect_ = objc.registerName( + "dataWithEPSInsideRect:", +); +late final _sel_dataWithPDFInsideRect_ = objc.registerName( + "dataWithPDFInsideRect:", +); +late final _sel_declareTypes_owner_ = objc.registerName("declareTypes:owner:"); +late final _sel_deepestScreen = objc.registerName("deepestScreen"); +late final _sel_defaultAnimationForKey_ = objc.registerName( + "defaultAnimationForKey:", +); +late final _sel_defaultButtonCell = objc.registerName("defaultButtonCell"); +late final _sel_defaultDepthLimit = objc.registerName("defaultDepthLimit"); +late final _sel_defaultFocusRingType = objc.registerName( + "defaultFocusRingType", +); +late final _sel_defaultMenu = objc.registerName("defaultMenu"); +late final _sel_delegate = objc.registerName("delegate"); +late final _sel_deleteAllSavedUserActivitiesWithCompletionHandler_ = objc + .registerName("deleteAllSavedUserActivitiesWithCompletionHandler:"); +late final _sel_deleteBackwardByDecomposingPreviousCharacter_ = objc + .registerName("deleteBackwardByDecomposingPreviousCharacter:"); +late final _sel_deleteBackward_ = objc.registerName("deleteBackward:"); +late final _sel_deleteForward_ = objc.registerName("deleteForward:"); +late final _sel_deleteSavedUserActivitiesWithPersistentIdentifiers_completionHandler_ = + objc.registerName( + "deleteSavedUserActivitiesWithPersistentIdentifiers:completionHandler:", + ); +late final _sel_deleteToBeginningOfLine_ = objc.registerName( + "deleteToBeginningOfLine:", +); +late final _sel_deleteToBeginningOfParagraph_ = objc.registerName( + "deleteToBeginningOfParagraph:", +); +late final _sel_deleteToEndOfLine_ = objc.registerName("deleteToEndOfLine:"); +late final _sel_deleteToEndOfParagraph_ = objc.registerName( + "deleteToEndOfParagraph:", +); +late final _sel_deleteToMark_ = objc.registerName("deleteToMark:"); +late final _sel_deleteWordBackward_ = objc.registerName("deleteWordBackward:"); +late final _sel_deleteWordForward_ = objc.registerName("deleteWordForward:"); +late final _sel_delete_ = objc.registerName("delete:"); +late final _sel_deltaX = objc.registerName("deltaX"); +late final _sel_deltaY = objc.registerName("deltaY"); +late final _sel_deltaZ = objc.registerName("deltaZ"); +late final _sel_deminiaturize_ = objc.registerName("deminiaturize:"); +late final _sel_depthLimit = objc.registerName("depthLimit"); +late final _sel_detachColorList_ = objc.registerName("detachColorList:"); +late final _sel_detectMetadataForTypes_completionHandler_ = objc.registerName( + "detectMetadataForTypes:completionHandler:", +); +late final _sel_detectPatternsForPatterns_completionHandler_ = objc + .registerName("detectPatternsForPatterns:completionHandler:"); +late final _sel_detectValuesForPatterns_completionHandler_ = objc.registerName( + "detectValuesForPatterns:completionHandler:", +); +late final _sel_device = objc.registerName("device"); +late final _sel_deviceDescription = objc.registerName("deviceDescription"); +late final _sel_deviceID = objc.registerName("deviceID"); +late final _sel_deviceSize = objc.registerName("deviceSize"); +late final _sel_didAddSubview_ = objc.registerName("didAddSubview:"); +late final _sel_didCloseMenu_withEvent_ = objc.registerName( + "didCloseMenu:withEvent:", +); +late final _sel_disableCursorRects = objc.registerName("disableCursorRects"); +late final _sel_disableFlushWindow = objc.registerName("disableFlushWindow"); +late final _sel_disableKeyEquivalentForDefaultButtonCell = objc.registerName( + "disableKeyEquivalentForDefaultButtonCell", +); +late final _sel_disableScreenUpdatesUntilFlush = objc.registerName( + "disableScreenUpdatesUntilFlush", +); +late final _sel_disableUndoRegistration = objc.registerName( + "disableUndoRegistration", +); +late final _sel_discardCachedImage = objc.registerName("discardCachedImage"); +late final _sel_discardCursorRects = objc.registerName("discardCursorRects"); +late final _sel_discardEventsMatchingMask_beforeEvent_ = objc.registerName( + "discardEventsMatchingMask:beforeEvent:", +); +late final _sel_display = objc.registerName("display"); +late final _sel_displayIfNeeded = objc.registerName("displayIfNeeded"); +late final _sel_displayIfNeededIgnoringOpacity = objc.registerName( + "displayIfNeededIgnoringOpacity", +); +late final _sel_displayIfNeededInRectIgnoringOpacity_ = objc.registerName( + "displayIfNeededInRectIgnoringOpacity:", +); +late final _sel_displayIfNeededInRect_ = objc.registerName( + "displayIfNeededInRect:", +); +late final _sel_displayLinkWithTarget_selector_ = objc.registerName( + "displayLinkWithTarget:selector:", +); +late final _sel_displayRectIgnoringOpacity_ = objc.registerName( + "displayRectIgnoringOpacity:", +); +late final _sel_displayRectIgnoringOpacity_inContext_ = objc.registerName( + "displayRectIgnoringOpacity:inContext:", +); +late final _sel_displayRect_ = objc.registerName("displayRect:"); +late final _sel_displaysWhenScreenProfileChanges = objc.registerName( + "displaysWhenScreenProfileChanges", +); +late final _sel_doCommandBySelector_ = objc.registerName( + "doCommandBySelector:", +); +late final _sel_dockTile = objc.registerName("dockTile"); +late final _sel_doubleClickInterval = objc.registerName("doubleClickInterval"); +late final _sel_dragColor_withEvent_fromView_ = objc.registerName( + "dragColor:withEvent:fromView:", +); +late final _sel_dragFile_fromRect_slideBack_event_ = objc.registerName( + "dragFile:fromRect:slideBack:event:", +); +late final _sel_dragImage_at_offset_event_pasteboard_source_slideBack_ = objc + .registerName("dragImage:at:offset:event:pasteboard:source:slideBack:"); +late final _sel_dragPromisedFilesOfTypes_fromRect_source_slideBack_event_ = objc + .registerName("dragPromisedFilesOfTypes:fromRect:source:slideBack:event:"); +late final _sel_draggedImage = objc.registerName("draggedImage"); +late final _sel_draggedImageLocation = objc.registerName( + "draggedImageLocation", +); +late final _sel_draggingDestinationWindow = objc.registerName( + "draggingDestinationWindow", +); +late final _sel_draggingEnded_ = objc.registerName("draggingEnded:"); +late final _sel_draggingEntered_ = objc.registerName("draggingEntered:"); +late final _sel_draggingExited_ = objc.registerName("draggingExited:"); +late final _sel_draggingFormation = objc.registerName("draggingFormation"); +late final _sel_draggingLocation = objc.registerName("draggingLocation"); +late final _sel_draggingPasteboard = objc.registerName("draggingPasteboard"); +late final _sel_draggingSequenceNumber = objc.registerName( + "draggingSequenceNumber", +); +late final _sel_draggingSession_endedAtPoint_operation_ = objc.registerName( + "draggingSession:endedAtPoint:operation:", +); +late final _sel_draggingSession_movedToPoint_ = objc.registerName( + "draggingSession:movedToPoint:", +); +late final _sel_draggingSession_sourceOperationMaskForDraggingContext_ = objc + .registerName("draggingSession:sourceOperationMaskForDraggingContext:"); +late final _sel_draggingSession_willBeginAtPoint_ = objc.registerName( + "draggingSession:willBeginAtPoint:", +); +late final _sel_draggingSource = objc.registerName("draggingSource"); +late final _sel_draggingSourceOperationMask = objc.registerName( + "draggingSourceOperationMask", +); +late final _sel_draggingUpdated_ = objc.registerName("draggingUpdated:"); +late final _sel_drawFocusRingMask = objc.registerName("drawFocusRingMask"); +late final _sel_drawPageBorderWithSize_ = objc.registerName( + "drawPageBorderWithSize:", +); +late final _sel_drawRect_ = objc.registerName("drawRect:"); +late final _sel_drawSheetBorderWithSize_ = objc.registerName( + "drawSheetBorderWithSize:", +); +late final _sel_drawsBackground = objc.registerName("drawsBackground"); +late final _sel_effectiveAppearance = objc.registerName("effectiveAppearance"); +late final _sel_enableCursorRects = objc.registerName("enableCursorRects"); +late final _sel_enableFlushWindow = objc.registerName("enableFlushWindow"); +late final _sel_enableKeyEquivalentForDefaultButtonCell = objc.registerName( + "enableKeyEquivalentForDefaultButtonCell", +); +late final _sel_enableUndoRegistration = objc.registerName( + "enableUndoRegistration", +); +late final _sel_enclosingMenuItem = objc.registerName("enclosingMenuItem"); +late final _sel_enclosingScrollView = objc.registerName("enclosingScrollView"); +late final _sel_encodeWithCoder_ = objc.registerName("encodeWithCoder:"); +late final _sel_endDocument = objc.registerName("endDocument"); +late final _sel_endEditingFor_ = objc.registerName("endEditingFor:"); +late final _sel_endGestureWithEvent_ = objc.registerName( + "endGestureWithEvent:", +); +late final _sel_endPage = objc.registerName("endPage"); +late final _sel_endSheet_ = objc.registerName("endSheet:"); +late final _sel_endSheet_returnCode_ = objc.registerName( + "endSheet:returnCode:", +); +late final _sel_endUndoGrouping = objc.registerName("endUndoGrouping"); +late final _sel_enterExitEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_trackingNumber_userData_ = + objc.registerName( + "enterExitEventWithType:location:modifierFlags:timestamp:windowNumber:context:eventNumber:trackingNumber:userData:", + ); +late final _sel_enterFullScreenMode_withOptions_ = objc.registerName( + "enterFullScreenMode:withOptions:", +); +late final _sel_enumerateDraggingItemsWithOptions_forView_classes_searchOptions_usingBlock_ = + objc.registerName( + "enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:", + ); +late final _sel_eventNumber = objc.registerName("eventNumber"); +late final _sel_eventRef = objc.registerName("eventRef"); +late final _sel_eventWithCGEvent_ = objc.registerName("eventWithCGEvent:"); +late final _sel_eventWithEventRef_ = objc.registerName("eventWithEventRef:"); +late final _sel_exitFullScreenModeWithOptions_ = objc.registerName( + "exitFullScreenModeWithOptions:", +); +late final _sel_expirationDate = objc.registerName("expirationDate"); +late final _sel_fieldEditor_forObject_ = objc.registerName( + "fieldEditor:forObject:", +); +late final _sel_fileAttributes = objc.registerName("fileAttributes"); +late final _sel_fileWrappers = objc.registerName("fileWrappers"); +late final _sel_filename = objc.registerName("filename"); +late final _sel_firstResponder = objc.registerName("firstResponder"); +late final _sel_flagsChanged_ = objc.registerName("flagsChanged:"); +late final _sel_flushBufferedKeyEvents = objc.registerName( + "flushBufferedKeyEvents", +); +late final _sel_flushWindow = objc.registerName("flushWindow"); +late final _sel_flushWindowIfNeeded = objc.registerName("flushWindowIfNeeded"); +late final _sel_focusRingMaskBounds = objc.registerName("focusRingMaskBounds"); +late final _sel_focusRingType = objc.registerName("focusRingType"); +late final _sel_focusView = objc.registerName("focusView"); +late final _sel_font = objc.registerName("font"); +late final _sel_frame = objc.registerName("frame"); +late final _sel_frameAutosaveName = objc.registerName("frameAutosaveName"); +late final _sel_frameCenterRotation = objc.registerName("frameCenterRotation"); +late final _sel_frameRectForContentRect_ = objc.registerName( + "frameRectForContentRect:", +); +late final _sel_frameRectForContentRect_styleMask_ = objc.registerName( + "frameRectForContentRect:styleMask:", +); +late final _sel_frameRotation = objc.registerName("frameRotation"); +late final _sel_gState = objc.registerName("gState"); +late final _sel_generalPasteboard = objc.registerName("generalPasteboard"); +late final _sel_gestureRecognizers = objc.registerName("gestureRecognizers"); +late final _sel_getContinuationStreamsWithCompletionHandler_ = objc + .registerName("getContinuationStreamsWithCompletionHandler:"); +late final _sel_getRectsBeingDrawn_count_ = objc.registerName( + "getRectsBeingDrawn:count:", +); +late final _sel_getRectsExposedDuringLiveResize_count_ = objc.registerName( + "getRectsExposedDuringLiveResize:count:", +); +late final _sel_graphicsContext = objc.registerName("graphicsContext"); +late final _sel_groupingLevel = objc.registerName("groupingLevel"); +late final _sel_groupsByEvent = objc.registerName("groupsByEvent"); +late final _sel_hasActiveWindowSharingSession = objc.registerName( + "hasActiveWindowSharingSession", +); +late final _sel_hasDynamicDepthLimit = objc.registerName( + "hasDynamicDepthLimit", +); +late final _sel_hasPreciseScrollingDeltas = objc.registerName( + "hasPreciseScrollingDeltas", +); +late final _sel_hasShadow = objc.registerName("hasShadow"); +late final _sel_hasSubmenu = objc.registerName("hasSubmenu"); +late final _sel_heightAdjustLimit = objc.registerName("heightAdjustLimit"); +late final _sel_helpRequested_ = objc.registerName("helpRequested:"); +late final _sel_hidesOnDeactivate = objc.registerName("hidesOnDeactivate"); +late final _sel_highlightedItem = objc.registerName("highlightedItem"); +late final _sel_hitTest_ = objc.registerName("hitTest:"); +late final _sel_identifier = objc.registerName("identifier"); +late final _sel_identity = objc.registerName("identity"); +late final _sel_ignoreModifierKeysForDraggingSession_ = objc.registerName( + "ignoreModifierKeysForDraggingSession:", +); +late final _sel_ignoreSpelling_ = objc.registerName("ignoreSpelling:"); +late final _sel_ignoresMouseEvents = objc.registerName("ignoresMouseEvents"); +late final _sel_image = objc.registerName("image"); +late final _sel_importsGraphics = objc.registerName("importsGraphics"); +late final _sel_inLiveResize = objc.registerName("inLiveResize"); +late final _sel_indent_ = objc.registerName("indent:"); +late final _sel_indentationLevel = objc.registerName("indentationLevel"); +late final _sel_indexOfItemWithRepresentedObject_ = objc.registerName( + "indexOfItemWithRepresentedObject:", +); +late final _sel_indexOfItemWithSubmenu_ = objc.registerName( + "indexOfItemWithSubmenu:", +); +late final _sel_indexOfItemWithTag_ = objc.registerName("indexOfItemWithTag:"); +late final _sel_indexOfItemWithTarget_andAction_ = objc.registerName( + "indexOfItemWithTarget:andAction:", +); +late final _sel_indexOfItemWithTitle_ = objc.registerName( + "indexOfItemWithTitle:", +); +late final _sel_indexOfItem_ = objc.registerName("indexOfItem:"); +late final _sel_indexOfPasteboardItem_ = objc.registerName( + "indexOfPasteboardItem:", +); +late final _sel_init = objc.registerName("init"); +late final _sel_initDirectoryWithFileWrappers_ = objc.registerName( + "initDirectoryWithFileWrappers:", +); +late final _sel_initRegularFileWithContents_ = objc.registerName( + "initRegularFileWithContents:", +); +late final _sel_initSymbolicLinkWithDestinationURL_ = objc.registerName( + "initSymbolicLinkWithDestinationURL:", +); +late final _sel_initSymbolicLinkWithDestination_ = objc.registerName( + "initSymbolicLinkWithDestination:", +); +late final _sel_initWithActivityType_ = objc.registerName( + "initWithActivityType:", +); +late final _sel_initWithAppearanceNamed_bundle_ = objc.registerName( + "initWithAppearanceNamed:bundle:", +); +late final _sel_initWithCoder_ = objc.registerName("initWithCoder:"); +late final _sel_initWithContentRect_styleMask_backing_defer_ = objc + .registerName("initWithContentRect:styleMask:backing:defer:"); +late final _sel_initWithContentRect_styleMask_backing_defer_screen_ = objc + .registerName("initWithContentRect:styleMask:backing:defer:screen:"); +late final _sel_initWithFrame_ = objc.registerName("initWithFrame:"); +late final _sel_initWithMarkerFormat_options_ = objc.registerName( + "initWithMarkerFormat:options:", +); +late final _sel_initWithMarkerFormat_options_startingItemNumber_ = objc + .registerName("initWithMarkerFormat:options:startingItemNumber:"); +late final _sel_initWithPath_ = objc.registerName("initWithPath:"); +late final _sel_initWithPickerMask_colorPanel_ = objc.registerName( + "initWithPickerMask:colorPanel:", +); +late final _sel_initWithSerializedRepresentation_ = objc.registerName( + "initWithSerializedRepresentation:", +); +late final _sel_initWithTitle_ = objc.registerName("initWithTitle:"); +late final _sel_initWithTitle_action_keyEquivalent_ = objc.registerName( + "initWithTitle:action:keyEquivalent:", +); +late final _sel_initWithURL_options_error_ = objc.registerName( + "initWithURL:options:error:", +); +late final _sel_initWithWindowRef_ = objc.registerName("initWithWindowRef:"); +late final _sel_initialFirstResponder = objc.registerName( + "initialFirstResponder", +); +late final _sel_inputContext = objc.registerName("inputContext"); +late final _sel_insertBacktab_ = objc.registerName("insertBacktab:"); +late final _sel_insertContainerBreak_ = objc.registerName( + "insertContainerBreak:", +); +late final _sel_insertDoubleQuoteIgnoringSubstitution_ = objc.registerName( + "insertDoubleQuoteIgnoringSubstitution:", +); +late final _sel_insertItemWithTitle_action_keyEquivalent_atIndex_ = objc + .registerName("insertItemWithTitle:action:keyEquivalent:atIndex:"); +late final _sel_insertItem_atIndex_ = objc.registerName("insertItem:atIndex:"); +late final _sel_insertLineBreak_ = objc.registerName("insertLineBreak:"); +late final _sel_insertNewButtonImage_in_ = objc.registerName( + "insertNewButtonImage:in:", +); +late final _sel_insertNewlineIgnoringFieldEditor_ = objc.registerName( + "insertNewlineIgnoringFieldEditor:", +); +late final _sel_insertNewline_ = objc.registerName("insertNewline:"); +late final _sel_insertParagraphSeparator_ = objc.registerName( + "insertParagraphSeparator:", +); +late final _sel_insertSingleQuoteIgnoringSubstitution_ = objc.registerName( + "insertSingleQuoteIgnoringSubstitution:", +); +late final _sel_insertTabIgnoringFieldEditor_ = objc.registerName( + "insertTabIgnoringFieldEditor:", +); +late final _sel_insertTab_ = objc.registerName("insertTab:"); +late final _sel_insertText_ = objc.registerName("insertText:"); +late final _sel_insertTitlebarAccessoryViewController_atIndex_ = objc + .registerName("insertTitlebarAccessoryViewController:atIndex:"); +late final _sel_interpretKeyEvents_ = objc.registerName("interpretKeyEvents:"); +late final _sel_invalidate = objc.registerName("invalidate"); +late final _sel_invalidateCursorRectsForView_ = objc.registerName( + "invalidateCursorRectsForView:", +); +late final _sel_invalidateShadow = objc.registerName("invalidateShadow"); +late final _sel_isARepeat = objc.registerName("isARepeat"); +late final _sel_isAccessibilityAlternateUIVisible = objc.registerName( + "isAccessibilityAlternateUIVisible", +); +late final _sel_isAccessibilityDisclosed = objc.registerName( + "isAccessibilityDisclosed", +); +late final _sel_isAccessibilityEdited = objc.registerName( + "isAccessibilityEdited", +); +late final _sel_isAccessibilityElement = objc.registerName( + "isAccessibilityElement", +); +late final _sel_isAccessibilityEnabled = objc.registerName( + "isAccessibilityEnabled", +); +late final _sel_isAccessibilityExpanded = objc.registerName( + "isAccessibilityExpanded", +); +late final _sel_isAccessibilityFocused = objc.registerName( + "isAccessibilityFocused", +); +late final _sel_isAccessibilityFrontmost = objc.registerName( + "isAccessibilityFrontmost", +); +late final _sel_isAccessibilityHidden = objc.registerName( + "isAccessibilityHidden", +); +late final _sel_isAccessibilityMain = objc.registerName("isAccessibilityMain"); +late final _sel_isAccessibilityMinimized = objc.registerName( + "isAccessibilityMinimized", +); +late final _sel_isAccessibilityModal = objc.registerName( + "isAccessibilityModal", +); +late final _sel_isAccessibilityOrderedByRow = objc.registerName( + "isAccessibilityOrderedByRow", +); +late final _sel_isAccessibilityProtectedContent = objc.registerName( + "isAccessibilityProtectedContent", +); +late final _sel_isAccessibilityRequired = objc.registerName( + "isAccessibilityRequired", +); +late final _sel_isAccessibilitySelected = objc.registerName( + "isAccessibilitySelected", +); +late final _sel_isAccessibilitySelectorAllowed_ = objc.registerName( + "isAccessibilitySelectorAllowed:", +); +late final _sel_isAlternate = objc.registerName("isAlternate"); +late final _sel_isAttached = objc.registerName("isAttached"); +late final _sel_isAutodisplay = objc.registerName("isAutodisplay"); +late final _sel_isCompatibleWithResponsiveScrolling = objc.registerName( + "isCompatibleWithResponsiveScrolling", +); +late final _sel_isContinuous = objc.registerName("isContinuous"); +late final _sel_isDescendantOf_ = objc.registerName("isDescendantOf:"); +late final _sel_isDirectionInvertedFromDevice = objc.registerName( + "isDirectionInvertedFromDevice", +); +late final _sel_isDirectory = objc.registerName("isDirectory"); +late final _sel_isDocumentEdited = objc.registerName("isDocumentEdited"); +late final _sel_isDrawingFindIndicator = objc.registerName( + "isDrawingFindIndicator", +); +late final _sel_isEditable = objc.registerName("isEditable"); +late final _sel_isEligibleForHandoff = objc.registerName( + "isEligibleForHandoff", +); +late final _sel_isEligibleForPrediction = objc.registerName( + "isEligibleForPrediction", +); +late final _sel_isEligibleForPublicIndexing = objc.registerName( + "isEligibleForPublicIndexing", +); +late final _sel_isEligibleForSearch = objc.registerName("isEligibleForSearch"); +late final _sel_isEnabled = objc.registerName("isEnabled"); +late final _sel_isEnteringProximity = objc.registerName("isEnteringProximity"); +late final _sel_isExcludedFromWindowsMenu = objc.registerName( + "isExcludedFromWindowsMenu", +); +late final _sel_isFieldEditor = objc.registerName("isFieldEditor"); +late final _sel_isFlipped = objc.registerName("isFlipped"); +late final _sel_isFloatingPanel = objc.registerName("isFloatingPanel"); +late final _sel_isFlushWindowDisabled = objc.registerName( + "isFlushWindowDisabled", +); +late final _sel_isHidden = objc.registerName("isHidden"); +late final _sel_isHiddenOrHasHiddenAncestor = objc.registerName( + "isHiddenOrHasHiddenAncestor", +); +late final _sel_isHighlighted = objc.registerName("isHighlighted"); +late final _sel_isHorizontallyResizable = objc.registerName( + "isHorizontallyResizable", +); +late final _sel_isInFullScreenMode = objc.registerName("isInFullScreenMode"); +late final _sel_isKeyWindow = objc.registerName("isKeyWindow"); +late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); +late final _sel_isMainWindow = objc.registerName("isMainWindow"); +late final _sel_isMiniaturized = objc.registerName("isMiniaturized"); +late final _sel_isMouseCoalescingEnabled = objc.registerName( + "isMouseCoalescingEnabled", +); +late final _sel_isMovable = objc.registerName("isMovable"); +late final _sel_isMovableByWindowBackground = objc.registerName( + "isMovableByWindowBackground", +); +late final _sel_isOnActiveSpace = objc.registerName("isOnActiveSpace"); +late final _sel_isOneShot = objc.registerName("isOneShot"); +late final _sel_isOpaque = objc.registerName("isOpaque"); +late final _sel_isOrdered = objc.registerName("isOrdered"); +late final _sel_isRedoing = objc.registerName("isRedoing"); +late final _sel_isRegularFile = objc.registerName("isRegularFile"); +late final _sel_isReleasedWhenClosed = objc.registerName( + "isReleasedWhenClosed", +); +late final _sel_isResting = objc.registerName("isResting"); +late final _sel_isRichText = objc.registerName("isRichText"); +late final _sel_isRotatedFromBase = objc.registerName("isRotatedFromBase"); +late final _sel_isRotatedOrScaledFromBase = objc.registerName( + "isRotatedOrScaledFromBase", +); +late final _sel_isRulerVisible = objc.registerName("isRulerVisible"); +late final _sel_isSectionHeader = objc.registerName("isSectionHeader"); +late final _sel_isSelectable = objc.registerName("isSelectable"); +late final _sel_isSeparatorItem = objc.registerName("isSeparatorItem"); +late final _sel_isSheet = objc.registerName("isSheet"); +late final _sel_isSwipeTrackingFromScrollEventsEnabled = objc.registerName( + "isSwipeTrackingFromScrollEventsEnabled", +); +late final _sel_isSymbolicLink = objc.registerName("isSymbolicLink"); +late final _sel_isTornOff = objc.registerName("isTornOff"); +late final _sel_isUndoRegistrationEnabled = objc.registerName( + "isUndoRegistrationEnabled", +); +late final _sel_isUndoing = objc.registerName("isUndoing"); +late final _sel_isVerticallyResizable = objc.registerName( + "isVerticallyResizable", +); +late final _sel_isVisible = objc.registerName("isVisible"); +late final _sel_isZoomed = objc.registerName("isZoomed"); +late final _sel_itemArray = objc.registerName("itemArray"); +late final _sel_itemAtIndex_ = objc.registerName("itemAtIndex:"); +late final _sel_itemChanged_ = objc.registerName("itemChanged:"); +late final _sel_itemWithTag_ = objc.registerName("itemWithTag:"); +late final _sel_itemWithTitle_ = objc.registerName("itemWithTitle:"); +late final _sel_keyCode = objc.registerName("keyCode"); +late final _sel_keyDown_ = objc.registerName("keyDown:"); +late final _sel_keyEquivalent = objc.registerName("keyEquivalent"); +late final _sel_keyEquivalentModifierMask = objc.registerName( + "keyEquivalentModifierMask", +); +late final _sel_keyEventWithType_location_modifierFlags_timestamp_windowNumber_context_characters_charactersIgnoringModifiers_isARepeat_keyCode_ = + objc.registerName( + "keyEventWithType:location:modifierFlags:timestamp:windowNumber:context:characters:charactersIgnoringModifiers:isARepeat:keyCode:", + ); +late final _sel_keyForFileWrapper_ = objc.registerName("keyForFileWrapper:"); +late final _sel_keyRepeatDelay = objc.registerName("keyRepeatDelay"); +late final _sel_keyRepeatInterval = objc.registerName("keyRepeatInterval"); +late final _sel_keyUp_ = objc.registerName("keyUp:"); +late final _sel_keyViewSelectionDirection = objc.registerName( + "keyViewSelectionDirection", +); +late final _sel_keywords = objc.registerName("keywords"); +late final _sel_knowsPageRange_ = objc.registerName("knowsPageRange:"); +late final _sel_layer = objc.registerName("layer"); +late final _sel_layerContentsPlacement = objc.registerName( + "layerContentsPlacement", +); +late final _sel_layerContentsRedrawPolicy = objc.registerName( + "layerContentsRedrawPolicy", +); +late final _sel_layerUsesCoreImageFilters = objc.registerName( + "layerUsesCoreImageFilters", +); +late final _sel_layout = objc.registerName("layout"); +late final _sel_layoutMarginsGuide = objc.registerName("layoutMarginsGuide"); +late final _sel_layoutSubtreeIfNeeded = objc.registerName( + "layoutSubtreeIfNeeded", +); +late final _sel_level = objc.registerName("level"); +late final _sel_levelsOfUndo = objc.registerName("levelsOfUndo"); +late final _sel_listOptions = objc.registerName("listOptions"); +late final _sel_locationForSubmenu_ = objc.registerName("locationForSubmenu:"); +late final _sel_locationInView_ = objc.registerName("locationInView:"); +late final _sel_locationInWindow = objc.registerName("locationInWindow"); +late final _sel_locationOfPrintRect_ = objc.registerName( + "locationOfPrintRect:", +); +late final _sel_lockFocus = objc.registerName("lockFocus"); +late final _sel_lockFocusIfCanDraw = objc.registerName("lockFocusIfCanDraw"); +late final _sel_lockFocusIfCanDrawInContext_ = objc.registerName( + "lockFocusIfCanDrawInContext:", +); +late final _sel_lowercaseWord_ = objc.registerName("lowercaseWord:"); +late final _sel_magnification = objc.registerName("magnification"); +late final _sel_magnifyWithEvent_ = objc.registerName("magnifyWithEvent:"); +late final _sel_makeBackingLayer = objc.registerName("makeBackingLayer"); +late final _sel_makeBaseWritingDirectionLeftToRight_ = objc.registerName( + "makeBaseWritingDirectionLeftToRight:", +); +late final _sel_makeBaseWritingDirectionNatural_ = objc.registerName( + "makeBaseWritingDirectionNatural:", +); +late final _sel_makeBaseWritingDirectionRightToLeft_ = objc.registerName( + "makeBaseWritingDirectionRightToLeft:", +); +late final _sel_makeFirstResponder_ = objc.registerName("makeFirstResponder:"); +late final _sel_makeKeyAndOrderFront_ = objc.registerName( + "makeKeyAndOrderFront:", +); +late final _sel_makeKeyWindow = objc.registerName("makeKeyWindow"); +late final _sel_makeMainWindow = objc.registerName("makeMainWindow"); +late final _sel_makeTextWritingDirectionLeftToRight_ = objc.registerName( + "makeTextWritingDirectionLeftToRight:", +); +late final _sel_makeTextWritingDirectionNatural_ = objc.registerName( + "makeTextWritingDirectionNatural:", +); +late final _sel_makeTextWritingDirectionRightToLeft_ = objc.registerName( + "makeTextWritingDirectionRightToLeft:", +); +late final _sel_markerForItemNumber_ = objc.registerName( + "markerForItemNumber:", +); +late final _sel_markerFormat = objc.registerName("markerFormat"); +late final _sel_matchesContentsOfURL_ = objc.registerName( + "matchesContentsOfURL:", +); +late final _sel_maxFullScreenContentSize = objc.registerName( + "maxFullScreenContentSize", +); +late final _sel_maxSize = objc.registerName("maxSize"); +late final _sel_maximumLinearExposure = objc.registerName( + "maximumLinearExposure", +); +late final _sel_menu = objc.registerName("menu"); +late final _sel_menuBarHeight = objc.registerName("menuBarHeight"); +late final _sel_menuBarVisible = objc.registerName("menuBarVisible"); +late final _sel_menuChangedMessagesEnabled = objc.registerName( + "menuChangedMessagesEnabled", +); +late final _sel_menuChanged_ = objc.registerName("menuChanged:"); +late final _sel_menuDidClose_ = objc.registerName("menuDidClose:"); +late final _sel_menuForEvent_ = objc.registerName("menuForEvent:"); +late final _sel_menuHasKeyEquivalent_forEvent_target_action_ = objc + .registerName("menuHasKeyEquivalent:forEvent:target:action:"); +late final _sel_menuNeedsUpdate_ = objc.registerName("menuNeedsUpdate:"); +late final _sel_menuRepresentation = objc.registerName("menuRepresentation"); +late final _sel_menuWillOpen_ = objc.registerName("menuWillOpen:"); +late final _sel_menuZone = objc.registerName("menuZone"); +late final _sel_menu_updateItem_atIndex_shouldCancel_ = objc.registerName( + "menu:updateItem:atIndex:shouldCancel:", +); +late final _sel_menu_willHighlightItem_ = objc.registerName( + "menu:willHighlightItem:", +); +late final _sel_mergeAllWindows_ = objc.registerName("mergeAllWindows:"); +late final _sel_minContentSize = objc.registerName("minContentSize"); +late final _sel_minFrameWidthWithTitle_styleMask_ = objc.registerName( + "minFrameWidthWithTitle:styleMask:", +); +late final _sel_minFullScreenContentSize = objc.registerName( + "minFullScreenContentSize", +); +late final _sel_minSize = objc.registerName("minSize"); +late final _sel_miniaturize_ = objc.registerName("miniaturize:"); +late final _sel_minimumWidth = objc.registerName("minimumWidth"); +late final _sel_miniwindowImage = objc.registerName("miniwindowImage"); +late final _sel_miniwindowTitle = objc.registerName("miniwindowTitle"); +late final _sel_mixedStateImage = objc.registerName("mixedStateImage"); +late final _sel_mnemonic = objc.registerName("mnemonic"); +late final _sel_mnemonicLocation = objc.registerName("mnemonicLocation"); +late final _sel_mode = objc.registerName("mode"); +late final _sel_modifierFlags = objc.registerName("modifierFlags"); +late final _sel_momentumPhase = objc.registerName("momentumPhase"); +late final _sel_mouseCancelled_ = objc.registerName("mouseCancelled:"); +late final _sel_mouseDownCanMoveWindow = objc.registerName( + "mouseDownCanMoveWindow", +); +late final _sel_mouseDown_ = objc.registerName("mouseDown:"); +late final _sel_mouseDragged_ = objc.registerName("mouseDragged:"); +late final _sel_mouseEntered_ = objc.registerName("mouseEntered:"); +late final _sel_mouseEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_clickCount_pressure_ = + objc.registerName( + "mouseEventWithType:location:modifierFlags:timestamp:windowNumber:context:eventNumber:clickCount:pressure:", + ); +late final _sel_mouseExited_ = objc.registerName("mouseExited:"); +late final _sel_mouseLocation = objc.registerName("mouseLocation"); +late final _sel_mouseLocationOutsideOfEventStream = objc.registerName( + "mouseLocationOutsideOfEventStream", +); +late final _sel_mouseMoved_ = objc.registerName("mouseMoved:"); +late final _sel_mouseUp_ = objc.registerName("mouseUp:"); +late final _sel_mouse_inRect_ = objc.registerName("mouse:inRect:"); +late final _sel_moveBackwardAndModifySelection_ = objc.registerName( + "moveBackwardAndModifySelection:", +); +late final _sel_moveBackward_ = objc.registerName("moveBackward:"); +late final _sel_moveDownAndModifySelection_ = objc.registerName( + "moveDownAndModifySelection:", +); +late final _sel_moveDown_ = objc.registerName("moveDown:"); +late final _sel_moveForwardAndModifySelection_ = objc.registerName( + "moveForwardAndModifySelection:", +); +late final _sel_moveForward_ = objc.registerName("moveForward:"); +late final _sel_moveLeftAndModifySelection_ = objc.registerName( + "moveLeftAndModifySelection:", +); +late final _sel_moveLeft_ = objc.registerName("moveLeft:"); +late final _sel_moveParagraphBackwardAndModifySelection_ = objc.registerName( + "moveParagraphBackwardAndModifySelection:", +); +late final _sel_moveParagraphForwardAndModifySelection_ = objc.registerName( + "moveParagraphForwardAndModifySelection:", +); +late final _sel_moveRightAndModifySelection_ = objc.registerName( + "moveRightAndModifySelection:", +); +late final _sel_moveRight_ = objc.registerName("moveRight:"); +late final _sel_moveTabToNewWindow_ = objc.registerName("moveTabToNewWindow:"); +late final _sel_moveToBeginningOfDocumentAndModifySelection_ = objc + .registerName("moveToBeginningOfDocumentAndModifySelection:"); +late final _sel_moveToBeginningOfDocument_ = objc.registerName( + "moveToBeginningOfDocument:", +); +late final _sel_moveToBeginningOfLineAndModifySelection_ = objc.registerName( + "moveToBeginningOfLineAndModifySelection:", +); +late final _sel_moveToBeginningOfLine_ = objc.registerName( + "moveToBeginningOfLine:", +); +late final _sel_moveToBeginningOfParagraphAndModifySelection_ = objc + .registerName("moveToBeginningOfParagraphAndModifySelection:"); +late final _sel_moveToBeginningOfParagraph_ = objc.registerName( + "moveToBeginningOfParagraph:", +); +late final _sel_moveToEndOfDocumentAndModifySelection_ = objc.registerName( + "moveToEndOfDocumentAndModifySelection:", +); +late final _sel_moveToEndOfDocument_ = objc.registerName( + "moveToEndOfDocument:", +); +late final _sel_moveToEndOfLineAndModifySelection_ = objc.registerName( + "moveToEndOfLineAndModifySelection:", +); +late final _sel_moveToEndOfLine_ = objc.registerName("moveToEndOfLine:"); +late final _sel_moveToEndOfParagraphAndModifySelection_ = objc.registerName( + "moveToEndOfParagraphAndModifySelection:", +); +late final _sel_moveToEndOfParagraph_ = objc.registerName( + "moveToEndOfParagraph:", +); +late final _sel_moveToLeftEndOfLineAndModifySelection_ = objc.registerName( + "moveToLeftEndOfLineAndModifySelection:", +); +late final _sel_moveToLeftEndOfLine_ = objc.registerName( + "moveToLeftEndOfLine:", +); +late final _sel_moveToRightEndOfLineAndModifySelection_ = objc.registerName( + "moveToRightEndOfLineAndModifySelection:", +); +late final _sel_moveToRightEndOfLine_ = objc.registerName( + "moveToRightEndOfLine:", +); +late final _sel_moveUpAndModifySelection_ = objc.registerName( + "moveUpAndModifySelection:", +); +late final _sel_moveUp_ = objc.registerName("moveUp:"); +late final _sel_moveWordBackwardAndModifySelection_ = objc.registerName( + "moveWordBackwardAndModifySelection:", +); +late final _sel_moveWordBackward_ = objc.registerName("moveWordBackward:"); +late final _sel_moveWordForwardAndModifySelection_ = objc.registerName( + "moveWordForwardAndModifySelection:", +); +late final _sel_moveWordForward_ = objc.registerName("moveWordForward:"); +late final _sel_moveWordLeftAndModifySelection_ = objc.registerName( + "moveWordLeftAndModifySelection:", +); +late final _sel_moveWordLeft_ = objc.registerName("moveWordLeft:"); +late final _sel_moveWordRightAndModifySelection_ = objc.registerName( + "moveWordRightAndModifySelection:", +); +late final _sel_moveWordRight_ = objc.registerName("moveWordRight:"); +late final _sel_name = objc.registerName("name"); +late final _sel_namesOfPromisedFilesDroppedAtDestination_ = objc.registerName( + "namesOfPromisedFilesDroppedAtDestination:", +); +late final _sel_needsDisplay = objc.registerName("needsDisplay"); +late final _sel_needsLayout = objc.registerName("needsLayout"); +late final _sel_needsPanelToBecomeKey = objc.registerName( + "needsPanelToBecomeKey", +); +late final _sel_needsSave = objc.registerName("needsSave"); +late final _sel_needsToBeUpdatedFromPath_ = objc.registerName( + "needsToBeUpdatedFromPath:", +); +late final _sel_needsToDrawRect_ = objc.registerName("needsToDrawRect:"); +late final _sel_new = objc.registerName("new"); +late final _sel_newWindowForTab_ = objc.registerName("newWindowForTab:"); +late final _sel_nextEventMatchingMask_ = objc.registerName( + "nextEventMatchingMask:", +); +late final _sel_nextEventMatchingMask_untilDate_inMode_dequeue_ = objc + .registerName("nextEventMatchingMask:untilDate:inMode:dequeue:"); +late final _sel_nextKeyView = objc.registerName("nextKeyView"); +late final _sel_nextResponder = objc.registerName("nextResponder"); +late final _sel_nextValidKeyView = objc.registerName("nextValidKeyView"); +late final _sel_noResponderFor_ = objc.registerName("noResponderFor:"); +late final _sel_normalizedPosition = objc.registerName("normalizedPosition"); +late final _sel_noteFocusRingMaskChanged = objc.registerName( + "noteFocusRingMaskChanged", +); +late final _sel_numberOfComponents = objc.registerName("numberOfComponents"); +late final _sel_numberOfComponentsInPickerView_ = objc.registerName( + "numberOfComponentsInPickerView:", +); +late final _sel_numberOfItems = objc.registerName("numberOfItems"); +late final _sel_numberOfItemsInMenu_ = objc.registerName( + "numberOfItemsInMenu:", +); +late final _sel_numberOfRowsInComponent_ = objc.registerName( + "numberOfRowsInComponent:", +); +late final _sel_numberOfValidItemsForDrop = objc.registerName( + "numberOfValidItemsForDrop", +); +late final _sel_occlusionState = objc.registerName("occlusionState"); +late final _sel_offStateImage = objc.registerName("offStateImage"); +late final _sel_onStateImage = objc.registerName("onStateImage"); +late final _sel_opaqueAncestor = objc.registerName("opaqueAncestor"); +late final _sel_orderBack_ = objc.registerName("orderBack:"); +late final _sel_orderFrontRegardless = objc.registerName( + "orderFrontRegardless", +); +late final _sel_orderFront_ = objc.registerName("orderFront:"); +late final _sel_orderOut_ = objc.registerName("orderOut:"); +late final _sel_orderWindow_relativeTo_ = objc.registerName( + "orderWindow:relativeTo:", +); +late final _sel_otherEventWithType_location_modifierFlags_timestamp_windowNumber_context_subtype_data1_data2_ = + objc.registerName( + "otherEventWithType:location:modifierFlags:timestamp:windowNumber:context:subtype:data1:data2:", + ); +late final _sel_otherMouseDown_ = objc.registerName("otherMouseDown:"); +late final _sel_otherMouseDragged_ = objc.registerName("otherMouseDragged:"); +late final _sel_otherMouseUp_ = objc.registerName("otherMouseUp:"); +late final _sel_pageDownAndModifySelection_ = objc.registerName( + "pageDownAndModifySelection:", +); +late final _sel_pageDown_ = objc.registerName("pageDown:"); +late final _sel_pageFooter = objc.registerName("pageFooter"); +late final _sel_pageHeader = objc.registerName("pageHeader"); +late final _sel_pageUpAndModifySelection_ = objc.registerName( + "pageUpAndModifySelection:", +); +late final _sel_pageUp_ = objc.registerName("pageUp:"); +late final _sel_paletteMenuWithColors_titles_selectionHandler_ = objc + .registerName("paletteMenuWithColors:titles:selectionHandler:"); +late final _sel_paletteMenuWithColors_titles_templateImage_selectionHandler_ = + objc.registerName( + "paletteMenuWithColors:titles:templateImage:selectionHandler:", + ); +late final _sel_parentItem = objc.registerName("parentItem"); +late final _sel_parentWindow = objc.registerName("parentWindow"); +late final _sel_pasteFont_ = objc.registerName("pasteFont:"); +late final _sel_pasteRuler_ = objc.registerName("pasteRuler:"); +late final _sel_paste_ = objc.registerName("paste:"); +late final _sel_pasteboardByFilteringData_ofType_ = objc.registerName( + "pasteboardByFilteringData:ofType:", +); +late final _sel_pasteboardByFilteringFile_ = objc.registerName( + "pasteboardByFilteringFile:", +); +late final _sel_pasteboardByFilteringTypesInPasteboard_ = objc.registerName( + "pasteboardByFilteringTypesInPasteboard:", +); +late final _sel_pasteboardItems = objc.registerName("pasteboardItems"); +late final _sel_pasteboardWithName_ = objc.registerName("pasteboardWithName:"); +late final _sel_pasteboardWithUniqueName = objc.registerName( + "pasteboardWithUniqueName", +); +late final _sel_performActionForItemAtIndex_ = objc.registerName( + "performActionForItemAtIndex:", +); +late final _sel_performAsCurrentDrawingAppearance_ = objc.registerName( + "performAsCurrentDrawingAppearance:", +); +late final _sel_performClose_ = objc.registerName("performClose:"); +late final _sel_performDragOperation_ = objc.registerName( + "performDragOperation:", +); +late final _sel_performKeyEquivalent_ = objc.registerName( + "performKeyEquivalent:", +); +late final _sel_performMiniaturize_ = objc.registerName("performMiniaturize:"); +late final _sel_performMnemonic_ = objc.registerName("performMnemonic:"); +late final _sel_performTextFinderAction_ = objc.registerName( + "performTextFinderAction:", +); +late final _sel_performWindowDragWithEvent_ = objc.registerName( + "performWindowDragWithEvent:", +); +late final _sel_performZoom_ = objc.registerName("performZoom:"); +late final _sel_persistentIdentifier = objc.registerName( + "persistentIdentifier", +); +late final _sel_phase = objc.registerName("phase"); +late final _sel_pickerView_attributedTitleForRow_forComponent_ = objc + .registerName("pickerView:attributedTitleForRow:forComponent:"); +late final _sel_pickerView_didSelectRow_inComponent_ = objc.registerName( + "pickerView:didSelectRow:inComponent:", +); +late final _sel_pickerView_numberOfRowsInComponent_ = objc.registerName( + "pickerView:numberOfRowsInComponent:", +); +late final _sel_pickerView_rowHeightForComponent_ = objc.registerName( + "pickerView:rowHeightForComponent:", +); +late final _sel_pickerView_titleForRow_forComponent_ = objc.registerName( + "pickerView:titleForRow:forComponent:", +); +late final _sel_pickerView_viewForRow_forComponent_reusingView_ = objc + .registerName("pickerView:viewForRow:forComponent:reusingView:"); +late final _sel_pickerView_widthForComponent_ = objc.registerName( + "pickerView:widthForComponent:", +); +late final _sel_pointingDeviceID = objc.registerName("pointingDeviceID"); +late final _sel_pointingDeviceSerialNumber = objc.registerName( + "pointingDeviceSerialNumber", +); +late final _sel_pointingDeviceType = objc.registerName("pointingDeviceType"); +late final _sel_popUpContextMenu_withEvent_forView_ = objc.registerName( + "popUpContextMenu:withEvent:forView:", +); +late final _sel_popUpContextMenu_withEvent_forView_withFont_ = objc + .registerName("popUpContextMenu:withEvent:forView:withFont:"); +late final _sel_popUpMenuPositioningItem_atLocation_inView_ = objc.registerName( + "popUpMenuPositioningItem:atLocation:inView:", +); +late final _sel_postEvent_atStart_ = objc.registerName("postEvent:atStart:"); +late final _sel_postsBoundsChangedNotifications = objc.registerName( + "postsBoundsChangedNotifications", +); +late final _sel_postsFrameChangedNotifications = objc.registerName( + "postsFrameChangedNotifications", +); +late final _sel_preferredBackingLocation = objc.registerName( + "preferredBackingLocation", +); +late final _sel_preferredFilename = objc.registerName("preferredFilename"); +late final _sel_prefersCompactControlSizeMetrics = objc.registerName( + "prefersCompactControlSizeMetrics", +); +late final _sel_prepareContentInRect_ = objc.registerName( + "prepareContentInRect:", +); +late final _sel_prepareForDragOperation_ = objc.registerName( + "prepareForDragOperation:", +); +late final _sel_prepareForNewContentsWithOptions_ = objc.registerName( + "prepareForNewContentsWithOptions:", +); +late final _sel_prepareForReuse = objc.registerName("prepareForReuse"); +late final _sel_prepareWithInvocationTarget_ = objc.registerName( + "prepareWithInvocationTarget:", +); +late final _sel_preparedContentRect = objc.registerName("preparedContentRect"); +late final _sel_presentError_ = objc.registerName("presentError:"); +late final _sel_presentError_modalForWindow_delegate_didPresentSelector_contextInfo_ = + objc.registerName( + "presentError:modalForWindow:delegate:didPresentSelector:contextInfo:", + ); +late final _sel_presentationStyle = objc.registerName("presentationStyle"); +late final _sel_preservesContentDuringLiveResize = objc.registerName( + "preservesContentDuringLiveResize", +); +late final _sel_pressedMouseButtons = objc.registerName("pressedMouseButtons"); +late final _sel_pressure = objc.registerName("pressure"); +late final _sel_pressureBehavior = objc.registerName("pressureBehavior"); +late final _sel_pressureChangeWithEvent_ = objc.registerName( + "pressureChangeWithEvent:", +); +late final _sel_preventsApplicationTerminationWhenModal = objc.registerName( + "preventsApplicationTerminationWhenModal", +); +late final _sel_previewRepresentableActivityItemsForWindow_ = objc.registerName( + "previewRepresentableActivityItemsForWindow:", +); +late final _sel_previousKeyView = objc.registerName("previousKeyView"); +late final _sel_previousLocationInView_ = objc.registerName( + "previousLocationInView:", +); +late final _sel_previousValidKeyView = objc.registerName( + "previousValidKeyView", +); +late final _sel_printJobTitle = objc.registerName("printJobTitle"); +late final _sel_print_ = objc.registerName("print:"); +late final _sel_propertiesToUpdate = objc.registerName("propertiesToUpdate"); +late final _sel_propertyListForType_ = objc.registerName( + "propertyListForType:", +); +late final _sel_provideNewButtonImage = objc.registerName( + "provideNewButtonImage", +); +late final _sel_quickLookPreviewItems_ = objc.registerName( + "quickLookPreviewItems:", +); +late final _sel_quickLookWithEvent_ = objc.registerName("quickLookWithEvent:"); +late final _sel_readFileContentsType_toFile_ = objc.registerName( + "readFileContentsType:toFile:", +); +late final _sel_readFileWrapper = objc.registerName("readFileWrapper"); +late final _sel_readFromURL_options_error_ = objc.registerName( + "readFromURL:options:error:", +); +late final _sel_readObjectsForClasses_options_ = objc.registerName( + "readObjectsForClasses:options:", +); +late final _sel_readRTFDFromFile_ = objc.registerName("readRTFDFromFile:"); +late final _sel_recalculateKeyViewLoop = objc.registerName( + "recalculateKeyViewLoop", +); +late final _sel_rectForPage_ = objc.registerName("rectForPage:"); +late final _sel_rectForSmartMagnificationAtPoint_inRect_ = objc.registerName( + "rectForSmartMagnificationAtPoint:inRect:", +); +late final _sel_rectPreservedDuringLiveResize = objc.registerName( + "rectPreservedDuringLiveResize", +); +late final _sel_redo = objc.registerName("redo"); +late final _sel_redoActionIsDiscardable = objc.registerName( + "redoActionIsDiscardable", +); +late final _sel_redoActionName = objc.registerName("redoActionName"); +late final _sel_redoActionUserInfoValueForKey_ = objc.registerName( + "redoActionUserInfoValueForKey:", +); +late final _sel_redoCount = objc.registerName("redoCount"); +late final _sel_redoMenuItemTitle = objc.registerName("redoMenuItemTitle"); +late final _sel_redoMenuTitleForUndoActionName_ = objc.registerName( + "redoMenuTitleForUndoActionName:", +); +late final _sel_referrerURL = objc.registerName("referrerURL"); +late final _sel_registerForDraggedTypes_ = objc.registerName( + "registerForDraggedTypes:", +); +late final _sel_registerUndoWithTarget_handler_ = objc.registerName( + "registerUndoWithTarget:handler:", +); +late final _sel_registerUndoWithTarget_selector_object_ = objc.registerName( + "registerUndoWithTarget:selector:object:", +); +late final _sel_registeredDraggedTypes = objc.registerName( + "registeredDraggedTypes", +); +late final _sel_regularFileContents = objc.registerName("regularFileContents"); +late final _sel_releaseGState = objc.registerName("releaseGState"); +late final _sel_releaseGlobally = objc.registerName("releaseGlobally"); +late final _sel_reloadAllComponents = objc.registerName("reloadAllComponents"); +late final _sel_reloadComponent_ = objc.registerName("reloadComponent:"); +late final _sel_removeAllActions = objc.registerName("removeAllActions"); +late final _sel_removeAllActionsWithTarget_ = objc.registerName( + "removeAllActionsWithTarget:", +); +late final _sel_removeAllItems = objc.registerName("removeAllItems"); +late final _sel_removeAllToolTips = objc.registerName("removeAllToolTips"); +late final _sel_removeChildWindow_ = objc.registerName("removeChildWindow:"); +late final _sel_removeCursorRect_cursor_ = objc.registerName( + "removeCursorRect:cursor:", +); +late final _sel_removeFileWrapper_ = objc.registerName("removeFileWrapper:"); +late final _sel_removeFrameUsingName_ = objc.registerName( + "removeFrameUsingName:", +); +late final _sel_removeFromSuperview = objc.registerName("removeFromSuperview"); +late final _sel_removeFromSuperviewWithoutNeedingDisplay = objc.registerName( + "removeFromSuperviewWithoutNeedingDisplay", +); +late final _sel_removeGestureRecognizer_ = objc.registerName( + "removeGestureRecognizer:", +); +late final _sel_removeItemAtIndex_ = objc.registerName("removeItemAtIndex:"); +late final _sel_removeItem_ = objc.registerName("removeItem:"); +late final _sel_removeMonitor_ = objc.registerName("removeMonitor:"); +late final _sel_removeTitlebarAccessoryViewControllerAtIndex_ = objc + .registerName("removeTitlebarAccessoryViewControllerAtIndex:"); +late final _sel_removeToolTip_ = objc.registerName("removeToolTip:"); +late final _sel_removeTrackingArea_ = objc.registerName("removeTrackingArea:"); +late final _sel_removeTrackingRect_ = objc.registerName("removeTrackingRect:"); +late final _sel_renewGState = objc.registerName("renewGState"); +late final _sel_replaceCharactersInRange_withRTFD_ = objc.registerName( + "replaceCharactersInRange:withRTFD:", +); +late final _sel_replaceCharactersInRange_withRTF_ = objc.registerName( + "replaceCharactersInRange:withRTF:", +); +late final _sel_replaceCharactersInRange_withString_ = objc.registerName( + "replaceCharactersInRange:withString:", +); +late final _sel_replaceSubview_with_ = objc.registerName( + "replaceSubview:with:", +); +late final _sel_representedFilename = objc.registerName("representedFilename"); +late final _sel_representedObject = objc.registerName("representedObject"); +late final _sel_representedURL = objc.registerName("representedURL"); +late final _sel_requestSharingOfWindowUsingPreview_title_completionHandler_ = + objc.registerName( + "requestSharingOfWindowUsingPreview:title:completionHandler:", + ); +late final _sel_requestSharingOfWindow_completionHandler_ = objc.registerName( + "requestSharingOfWindow:completionHandler:", +); +late final _sel_requiredUserInfoKeys = objc.registerName( + "requiredUserInfoKeys", +); +late final _sel_resetCursorRects = objc.registerName("resetCursorRects"); +late final _sel_resetSpringLoading = objc.registerName("resetSpringLoading"); +late final _sel_resignCurrent = objc.registerName("resignCurrent"); +late final _sel_resignFirstResponder = objc.registerName( + "resignFirstResponder", +); +late final _sel_resignKeyWindow = objc.registerName("resignKeyWindow"); +late final _sel_resignMainWindow = objc.registerName("resignMainWindow"); +late final _sel_resizeFlags = objc.registerName("resizeFlags"); +late final _sel_resizeIncrements = objc.registerName("resizeIncrements"); +late final _sel_resizeSubviewsWithOldSize_ = objc.registerName( + "resizeSubviewsWithOldSize:", +); +late final _sel_resizeWithOldSuperviewSize_ = objc.registerName( + "resizeWithOldSuperviewSize:", +); +late final _sel_restoreCachedImage = objc.registerName("restoreCachedImage"); +late final _sel_restoreUserActivityState_ = objc.registerName( + "restoreUserActivityState:", +); +late final _sel_rightMouseDown_ = objc.registerName("rightMouseDown:"); +late final _sel_rightMouseDragged_ = objc.registerName("rightMouseDragged:"); +late final _sel_rightMouseUp_ = objc.registerName("rightMouseUp:"); +late final _sel_rotateByAngle_ = objc.registerName("rotateByAngle:"); +late final _sel_rotateWithEvent_ = objc.registerName("rotateWithEvent:"); +late final _sel_rotation = objc.registerName("rotation"); +late final _sel_rowSizeForComponent_ = objc.registerName( + "rowSizeForComponent:", +); +late final _sel_runLoopModes = objc.registerName("runLoopModes"); +late final _sel_runToolbarCustomizationPalette_ = objc.registerName( + "runToolbarCustomizationPalette:", +); +late final _sel_safeAreaInsets = objc.registerName("safeAreaInsets"); +late final _sel_safeAreaLayoutGuide = objc.registerName("safeAreaLayoutGuide"); +late final _sel_safeAreaRect = objc.registerName("safeAreaRect"); +late final _sel_saveFrameUsingName_ = objc.registerName("saveFrameUsingName:"); +late final _sel_scaleUnitSquareToSize_ = objc.registerName( + "scaleUnitSquareToSize:", +); +late final _sel_screen = objc.registerName("screen"); +late final _sel_scrollLineDown_ = objc.registerName("scrollLineDown:"); +late final _sel_scrollLineUp_ = objc.registerName("scrollLineUp:"); +late final _sel_scrollPageDown_ = objc.registerName("scrollPageDown:"); +late final _sel_scrollPageUp_ = objc.registerName("scrollPageUp:"); +late final _sel_scrollPoint_ = objc.registerName("scrollPoint:"); +late final _sel_scrollRangeToVisible_ = objc.registerName( + "scrollRangeToVisible:", +); +late final _sel_scrollRectToVisible_ = objc.registerName( + "scrollRectToVisible:", +); +late final _sel_scrollRect_by_ = objc.registerName("scrollRect:by:"); +late final _sel_scrollToBeginningOfDocument_ = objc.registerName( + "scrollToBeginningOfDocument:", +); +late final _sel_scrollToEndOfDocument_ = objc.registerName( + "scrollToEndOfDocument:", +); +late final _sel_scrollWheel_ = objc.registerName("scrollWheel:"); +late final _sel_scrollingDeltaX = objc.registerName("scrollingDeltaX"); +late final _sel_scrollingDeltaY = objc.registerName("scrollingDeltaY"); +late final _sel_sectionHeaderWithTitle_ = objc.registerName( + "sectionHeaderWithTitle:", +); +late final _sel_selectAll_ = objc.registerName("selectAll:"); +late final _sel_selectKeyViewFollowingView_ = objc.registerName( + "selectKeyViewFollowingView:", +); +late final _sel_selectKeyViewPrecedingView_ = objc.registerName( + "selectKeyViewPrecedingView:", +); +late final _sel_selectLine_ = objc.registerName("selectLine:"); +late final _sel_selectNextKeyView_ = objc.registerName("selectNextKeyView:"); +late final _sel_selectNextTab_ = objc.registerName("selectNextTab:"); +late final _sel_selectParagraph_ = objc.registerName("selectParagraph:"); +late final _sel_selectPreviousKeyView_ = objc.registerName( + "selectPreviousKeyView:", +); +late final _sel_selectPreviousTab_ = objc.registerName("selectPreviousTab:"); +late final _sel_selectRow_inComponent_animated_ = objc.registerName( + "selectRow:inComponent:animated:", +); +late final _sel_selectToMark_ = objc.registerName("selectToMark:"); +late final _sel_selectWord_ = objc.registerName("selectWord:"); +late final _sel_selectedItems = objc.registerName("selectedItems"); +late final _sel_selectedRange = objc.registerName("selectedRange"); +late final _sel_selectedRowInComponent_ = objc.registerName( + "selectedRowInComponent:", +); +late final _sel_selectionMode = objc.registerName("selectionMode"); +late final _sel_sendEvent_ = objc.registerName("sendEvent:"); +late final _sel_separatorItem = objc.registerName("separatorItem"); +late final _sel_serializedRepresentation = objc.registerName( + "serializedRepresentation", +); +late final _sel_setAcceptsMouseMovedEvents_ = objc.registerName( + "setAcceptsMouseMovedEvents:", +); +late final _sel_setAcceptsTouchEvents_ = objc.registerName( + "setAcceptsTouchEvents:", +); +late final _sel_setAccessibilityActivationPoint_ = objc.registerName( + "setAccessibilityActivationPoint:", +); +late final _sel_setAccessibilityAllowedValues_ = objc.registerName( + "setAccessibilityAllowedValues:", +); +late final _sel_setAccessibilityAlternateUIVisible_ = objc.registerName( + "setAccessibilityAlternateUIVisible:", +); +late final _sel_setAccessibilityApplicationFocusedUIElement_ = objc + .registerName("setAccessibilityApplicationFocusedUIElement:"); +late final _sel_setAccessibilityAttributedUserInputLabels_ = objc.registerName( + "setAccessibilityAttributedUserInputLabels:", +); +late final _sel_setAccessibilityCancelButton_ = objc.registerName( + "setAccessibilityCancelButton:", +); +late final _sel_setAccessibilityChildrenInNavigationOrder_ = objc.registerName( + "setAccessibilityChildrenInNavigationOrder:", +); +late final _sel_setAccessibilityChildren_ = objc.registerName( + "setAccessibilityChildren:", +); +late final _sel_setAccessibilityClearButton_ = objc.registerName( + "setAccessibilityClearButton:", +); +late final _sel_setAccessibilityCloseButton_ = objc.registerName( + "setAccessibilityCloseButton:", +); +late final _sel_setAccessibilityColumnCount_ = objc.registerName( + "setAccessibilityColumnCount:", +); +late final _sel_setAccessibilityColumnHeaderUIElements_ = objc.registerName( + "setAccessibilityColumnHeaderUIElements:", +); +late final _sel_setAccessibilityColumnIndexRange_ = objc.registerName( + "setAccessibilityColumnIndexRange:", +); +late final _sel_setAccessibilityColumnTitles_ = objc.registerName( + "setAccessibilityColumnTitles:", +); +late final _sel_setAccessibilityColumns_ = objc.registerName( + "setAccessibilityColumns:", +); +late final _sel_setAccessibilityContents_ = objc.registerName( + "setAccessibilityContents:", +); +late final _sel_setAccessibilityCriticalValue_ = objc.registerName( + "setAccessibilityCriticalValue:", +); +late final _sel_setAccessibilityCustomActions_ = objc.registerName( + "setAccessibilityCustomActions:", +); +late final _sel_setAccessibilityCustomRotors_ = objc.registerName( + "setAccessibilityCustomRotors:", +); +late final _sel_setAccessibilityDecrementButton_ = objc.registerName( + "setAccessibilityDecrementButton:", +); +late final _sel_setAccessibilityDefaultButton_ = objc.registerName( + "setAccessibilityDefaultButton:", +); +late final _sel_setAccessibilityDisclosedByRow_ = objc.registerName( + "setAccessibilityDisclosedByRow:", +); +late final _sel_setAccessibilityDisclosedRows_ = objc.registerName( + "setAccessibilityDisclosedRows:", +); +late final _sel_setAccessibilityDisclosed_ = objc.registerName( + "setAccessibilityDisclosed:", +); +late final _sel_setAccessibilityDisclosureLevel_ = objc.registerName( + "setAccessibilityDisclosureLevel:", +); +late final _sel_setAccessibilityDocument_ = objc.registerName( + "setAccessibilityDocument:", +); +late final _sel_setAccessibilityEdited_ = objc.registerName( + "setAccessibilityEdited:", +); +late final _sel_setAccessibilityElement_ = objc.registerName( + "setAccessibilityElement:", +); +late final _sel_setAccessibilityEnabled_ = objc.registerName( + "setAccessibilityEnabled:", +); +late final _sel_setAccessibilityExpanded_ = objc.registerName( + "setAccessibilityExpanded:", +); +late final _sel_setAccessibilityExtrasMenuBar_ = objc.registerName( + "setAccessibilityExtrasMenuBar:", +); +late final _sel_setAccessibilityFilename_ = objc.registerName( + "setAccessibilityFilename:", +); +late final _sel_setAccessibilityFocusedWindow_ = objc.registerName( + "setAccessibilityFocusedWindow:", +); +late final _sel_setAccessibilityFocused_ = objc.registerName( + "setAccessibilityFocused:", +); +late final _sel_setAccessibilityFrame_ = objc.registerName( + "setAccessibilityFrame:", +); +late final _sel_setAccessibilityFrontmost_ = objc.registerName( + "setAccessibilityFrontmost:", +); +late final _sel_setAccessibilityFullScreenButton_ = objc.registerName( + "setAccessibilityFullScreenButton:", +); +late final _sel_setAccessibilityGrowArea_ = objc.registerName( + "setAccessibilityGrowArea:", +); +late final _sel_setAccessibilityHandles_ = objc.registerName( + "setAccessibilityHandles:", +); +late final _sel_setAccessibilityHeader_ = objc.registerName( + "setAccessibilityHeader:", +); +late final _sel_setAccessibilityHelp_ = objc.registerName( + "setAccessibilityHelp:", +); +late final _sel_setAccessibilityHidden_ = objc.registerName( + "setAccessibilityHidden:", +); +late final _sel_setAccessibilityHorizontalScrollBar_ = objc.registerName( + "setAccessibilityHorizontalScrollBar:", +); +late final _sel_setAccessibilityHorizontalUnitDescription_ = objc.registerName( + "setAccessibilityHorizontalUnitDescription:", +); +late final _sel_setAccessibilityHorizontalUnits_ = objc.registerName( + "setAccessibilityHorizontalUnits:", +); +late final _sel_setAccessibilityIdentifier_ = objc.registerName( + "setAccessibilityIdentifier:", +); +late final _sel_setAccessibilityIncrementButton_ = objc.registerName( + "setAccessibilityIncrementButton:", +); +late final _sel_setAccessibilityIndex_ = objc.registerName( + "setAccessibilityIndex:", +); +late final _sel_setAccessibilityInsertionPointLineNumber_ = objc.registerName( + "setAccessibilityInsertionPointLineNumber:", +); +late final _sel_setAccessibilityLabelUIElements_ = objc.registerName( + "setAccessibilityLabelUIElements:", +); +late final _sel_setAccessibilityLabelValue_ = objc.registerName( + "setAccessibilityLabelValue:", +); +late final _sel_setAccessibilityLabel_ = objc.registerName( + "setAccessibilityLabel:", +); +late final _sel_setAccessibilityLinkedUIElements_ = objc.registerName( + "setAccessibilityLinkedUIElements:", +); +late final _sel_setAccessibilityMainWindow_ = objc.registerName( + "setAccessibilityMainWindow:", +); +late final _sel_setAccessibilityMain_ = objc.registerName( + "setAccessibilityMain:", +); +late final _sel_setAccessibilityMarkerGroupUIElement_ = objc.registerName( + "setAccessibilityMarkerGroupUIElement:", +); +late final _sel_setAccessibilityMarkerTypeDescription_ = objc.registerName( + "setAccessibilityMarkerTypeDescription:", +); +late final _sel_setAccessibilityMarkerUIElements_ = objc.registerName( + "setAccessibilityMarkerUIElements:", +); +late final _sel_setAccessibilityMarkerValues_ = objc.registerName( + "setAccessibilityMarkerValues:", +); +late final _sel_setAccessibilityMaxValue_ = objc.registerName( + "setAccessibilityMaxValue:", +); +late final _sel_setAccessibilityMenuBar_ = objc.registerName( + "setAccessibilityMenuBar:", +); +late final _sel_setAccessibilityMinValue_ = objc.registerName( + "setAccessibilityMinValue:", +); +late final _sel_setAccessibilityMinimizeButton_ = objc.registerName( + "setAccessibilityMinimizeButton:", +); +late final _sel_setAccessibilityMinimized_ = objc.registerName( + "setAccessibilityMinimized:", +); +late final _sel_setAccessibilityModal_ = objc.registerName( + "setAccessibilityModal:", +); +late final _sel_setAccessibilityNextContents_ = objc.registerName( + "setAccessibilityNextContents:", +); +late final _sel_setAccessibilityNumberOfCharacters_ = objc.registerName( + "setAccessibilityNumberOfCharacters:", +); +late final _sel_setAccessibilityOrderedByRow_ = objc.registerName( + "setAccessibilityOrderedByRow:", +); +late final _sel_setAccessibilityOrientation_ = objc.registerName( + "setAccessibilityOrientation:", +); +late final _sel_setAccessibilityOverflowButton_ = objc.registerName( + "setAccessibilityOverflowButton:", +); +late final _sel_setAccessibilityParent_ = objc.registerName( + "setAccessibilityParent:", +); +late final _sel_setAccessibilityPlaceholderValue_ = objc.registerName( + "setAccessibilityPlaceholderValue:", +); +late final _sel_setAccessibilityPreviousContents_ = objc.registerName( + "setAccessibilityPreviousContents:", +); +late final _sel_setAccessibilityProtectedContent_ = objc.registerName( + "setAccessibilityProtectedContent:", +); +late final _sel_setAccessibilityProxy_ = objc.registerName( + "setAccessibilityProxy:", +); +late final _sel_setAccessibilityRequired_ = objc.registerName( + "setAccessibilityRequired:", +); +late final _sel_setAccessibilityRoleDescription_ = objc.registerName( + "setAccessibilityRoleDescription:", +); +late final _sel_setAccessibilityRole_ = objc.registerName( + "setAccessibilityRole:", +); +late final _sel_setAccessibilityRowCount_ = objc.registerName( + "setAccessibilityRowCount:", +); +late final _sel_setAccessibilityRowHeaderUIElements_ = objc.registerName( + "setAccessibilityRowHeaderUIElements:", +); +late final _sel_setAccessibilityRowIndexRange_ = objc.registerName( + "setAccessibilityRowIndexRange:", +); +late final _sel_setAccessibilityRows_ = objc.registerName( + "setAccessibilityRows:", +); +late final _sel_setAccessibilityRulerMarkerType_ = objc.registerName( + "setAccessibilityRulerMarkerType:", +); +late final _sel_setAccessibilitySearchButton_ = objc.registerName( + "setAccessibilitySearchButton:", +); +late final _sel_setAccessibilitySearchMenu_ = objc.registerName( + "setAccessibilitySearchMenu:", +); +late final _sel_setAccessibilitySelectedCells_ = objc.registerName( + "setAccessibilitySelectedCells:", +); +late final _sel_setAccessibilitySelectedChildren_ = objc.registerName( + "setAccessibilitySelectedChildren:", +); +late final _sel_setAccessibilitySelectedColumns_ = objc.registerName( + "setAccessibilitySelectedColumns:", +); +late final _sel_setAccessibilitySelectedRows_ = objc.registerName( + "setAccessibilitySelectedRows:", +); +late final _sel_setAccessibilitySelectedTextRange_ = objc.registerName( + "setAccessibilitySelectedTextRange:", +); +late final _sel_setAccessibilitySelectedTextRanges_ = objc.registerName( + "setAccessibilitySelectedTextRanges:", +); +late final _sel_setAccessibilitySelectedText_ = objc.registerName( + "setAccessibilitySelectedText:", +); +late final _sel_setAccessibilitySelected_ = objc.registerName( + "setAccessibilitySelected:", +); +late final _sel_setAccessibilityServesAsTitleForUIElements_ = objc.registerName( + "setAccessibilityServesAsTitleForUIElements:", +); +late final _sel_setAccessibilitySharedCharacterRange_ = objc.registerName( + "setAccessibilitySharedCharacterRange:", +); +late final _sel_setAccessibilitySharedFocusElements_ = objc.registerName( + "setAccessibilitySharedFocusElements:", +); +late final _sel_setAccessibilitySharedTextUIElements_ = objc.registerName( + "setAccessibilitySharedTextUIElements:", +); +late final _sel_setAccessibilityShownMenu_ = objc.registerName( + "setAccessibilityShownMenu:", +); +late final _sel_setAccessibilitySortDirection_ = objc.registerName( + "setAccessibilitySortDirection:", +); +late final _sel_setAccessibilitySplitters_ = objc.registerName( + "setAccessibilitySplitters:", +); +late final _sel_setAccessibilitySubrole_ = objc.registerName( + "setAccessibilitySubrole:", +); +late final _sel_setAccessibilityTabs_ = objc.registerName( + "setAccessibilityTabs:", +); +late final _sel_setAccessibilityTitleUIElement_ = objc.registerName( + "setAccessibilityTitleUIElement:", +); +late final _sel_setAccessibilityTitle_ = objc.registerName( + "setAccessibilityTitle:", +); +late final _sel_setAccessibilityToolbarButton_ = objc.registerName( + "setAccessibilityToolbarButton:", +); +late final _sel_setAccessibilityTopLevelUIElement_ = objc.registerName( + "setAccessibilityTopLevelUIElement:", +); +late final _sel_setAccessibilityURL_ = objc.registerName( + "setAccessibilityURL:", +); +late final _sel_setAccessibilityUnitDescription_ = objc.registerName( + "setAccessibilityUnitDescription:", +); +late final _sel_setAccessibilityUnits_ = objc.registerName( + "setAccessibilityUnits:", +); +late final _sel_setAccessibilityUserInputLabels_ = objc.registerName( + "setAccessibilityUserInputLabels:", +); +late final _sel_setAccessibilityValueDescription_ = objc.registerName( + "setAccessibilityValueDescription:", +); +late final _sel_setAccessibilityValue_ = objc.registerName( + "setAccessibilityValue:", +); +late final _sel_setAccessibilityVerticalScrollBar_ = objc.registerName( + "setAccessibilityVerticalScrollBar:", +); +late final _sel_setAccessibilityVerticalUnitDescription_ = objc.registerName( + "setAccessibilityVerticalUnitDescription:", +); +late final _sel_setAccessibilityVerticalUnits_ = objc.registerName( + "setAccessibilityVerticalUnits:", +); +late final _sel_setAccessibilityVisibleCells_ = objc.registerName( + "setAccessibilityVisibleCells:", +); +late final _sel_setAccessibilityVisibleCharacterRange_ = objc.registerName( + "setAccessibilityVisibleCharacterRange:", +); +late final _sel_setAccessibilityVisibleChildren_ = objc.registerName( + "setAccessibilityVisibleChildren:", +); +late final _sel_setAccessibilityVisibleColumns_ = objc.registerName( + "setAccessibilityVisibleColumns:", +); +late final _sel_setAccessibilityVisibleRows_ = objc.registerName( + "setAccessibilityVisibleRows:", +); +late final _sel_setAccessibilityWarningValue_ = objc.registerName( + "setAccessibilityWarningValue:", +); +late final _sel_setAccessibilityWindow_ = objc.registerName( + "setAccessibilityWindow:", +); +late final _sel_setAccessibilityWindows_ = objc.registerName( + "setAccessibilityWindows:", +); +late final _sel_setAccessibilityZoomButton_ = objc.registerName( + "setAccessibilityZoomButton:", +); +late final _sel_setAccessoryView_ = objc.registerName("setAccessoryView:"); +late final _sel_setActionIsDiscardable_ = objc.registerName( + "setActionIsDiscardable:", +); +late final _sel_setActionName_ = objc.registerName("setActionName:"); +late final _sel_setActionUserInfoValue_forKey_ = objc.registerName( + "setActionUserInfoValue:forKey:", +); +late final _sel_setAction_ = objc.registerName("setAction:"); +late final _sel_setAdditionalSafeAreaInsets_ = objc.registerName( + "setAdditionalSafeAreaInsets:", +); +late final _sel_setAlignment_ = objc.registerName("setAlignment:"); +late final _sel_setAllowedTouchTypes_ = objc.registerName( + "setAllowedTouchTypes:", +); +late final _sel_setAllowsAutomaticKeyEquivalentLocalization_ = objc + .registerName("setAllowsAutomaticKeyEquivalentLocalization:"); +late final _sel_setAllowsAutomaticKeyEquivalentMirroring_ = objc.registerName( + "setAllowsAutomaticKeyEquivalentMirroring:", +); +late final _sel_setAllowsAutomaticWindowTabbing_ = objc.registerName( + "setAllowsAutomaticWindowTabbing:", +); +late final _sel_setAllowsConcurrentViewDrawing_ = objc.registerName( + "setAllowsConcurrentViewDrawing:", +); +late final _sel_setAllowsContextMenuPlugIns_ = objc.registerName( + "setAllowsContextMenuPlugIns:", +); +late final _sel_setAllowsKeyEquivalentWhenHidden_ = objc.registerName( + "setAllowsKeyEquivalentWhenHidden:", +); +late final _sel_setAllowsToolTipsWhenApplicationIsInactive_ = objc.registerName( + "setAllowsToolTipsWhenApplicationIsInactive:", +); +late final _sel_setAlphaValue_ = objc.registerName("setAlphaValue:"); +late final _sel_setAlternate_ = objc.registerName("setAlternate:"); +late final _sel_setAnimatesToDestination_ = objc.registerName( + "setAnimatesToDestination:", +); +late final _sel_setAnimationBehavior_ = objc.registerName( + "setAnimationBehavior:", +); +late final _sel_setAnimations_ = objc.registerName("setAnimations:"); +late final _sel_setAppearanceSource_ = objc.registerName( + "setAppearanceSource:", +); +late final _sel_setAppearance_ = objc.registerName("setAppearance:"); +late final _sel_setAspectRatio_ = objc.registerName("setAspectRatio:"); +late final _sel_setAttributedTitle_ = objc.registerName("setAttributedTitle:"); +late final _sel_setAutodisplay_ = objc.registerName("setAutodisplay:"); +late final _sel_setAutoenablesItems_ = objc.registerName( + "setAutoenablesItems:", +); +late final _sel_setAutomaticallyInsertsWritingToolsItems_ = objc.registerName( + "setAutomaticallyInsertsWritingToolsItems:", +); +late final _sel_setAutorecalculatesContentBorderThickness_forEdge_ = objc + .registerName("setAutorecalculatesContentBorderThickness:forEdge:"); +late final _sel_setAutorecalculatesKeyViewLoop_ = objc.registerName( + "setAutorecalculatesKeyViewLoop:", +); +late final _sel_setAutoresizesSubviews_ = objc.registerName( + "setAutoresizesSubviews:", +); +late final _sel_setAutoresizingMask_ = objc.registerName( + "setAutoresizingMask:", +); +late final _sel_setBackgroundColor_ = objc.registerName("setBackgroundColor:"); +late final _sel_setBackgroundFilters_ = objc.registerName( + "setBackgroundFilters:", +); +late final _sel_setBackingType_ = objc.registerName("setBackingType:"); +late final _sel_setBadge_ = objc.registerName("setBadge:"); +late final _sel_setBaseWritingDirection_ = objc.registerName( + "setBaseWritingDirection:", +); +late final _sel_setBecomesKeyOnlyIfNeeded_ = objc.registerName( + "setBecomesKeyOnlyIfNeeded:", +); +late final _sel_setBoundsOrigin_ = objc.registerName("setBoundsOrigin:"); +late final _sel_setBoundsRotation_ = objc.registerName("setBoundsRotation:"); +late final _sel_setBoundsSize_ = objc.registerName("setBoundsSize:"); +late final _sel_setBounds_ = objc.registerName("setBounds:"); +late final _sel_setCanBecomeVisibleWithoutLogin_ = objc.registerName( + "setCanBecomeVisibleWithoutLogin:", +); +late final _sel_setCanDrawConcurrently_ = objc.registerName( + "setCanDrawConcurrently:", +); +late final _sel_setCanDrawSubviewsIntoLayer_ = objc.registerName( + "setCanDrawSubviewsIntoLayer:", +); +late final _sel_setCanHide_ = objc.registerName("setCanHide:"); +late final _sel_setClipsToBounds_ = objc.registerName("setClipsToBounds:"); +late final _sel_setCollectionBehavior_ = objc.registerName( + "setCollectionBehavior:", +); +late final _sel_setColorSpace_ = objc.registerName("setColorSpace:"); +late final _sel_setColor_ = objc.registerName("setColor:"); +late final _sel_setCompositingFilter_ = objc.registerName( + "setCompositingFilter:", +); +late final _sel_setContentAspectRatio_ = objc.registerName( + "setContentAspectRatio:", +); +late final _sel_setContentBorderThickness_forEdge_ = objc.registerName( + "setContentBorderThickness:forEdge:", +); +late final _sel_setContentFilters_ = objc.registerName("setContentFilters:"); +late final _sel_setContentMaxSize_ = objc.registerName("setContentMaxSize:"); +late final _sel_setContentMinSize_ = objc.registerName("setContentMinSize:"); +late final _sel_setContentResizeIncrements_ = objc.registerName( + "setContentResizeIncrements:", +); +late final _sel_setContentSize_ = objc.registerName("setContentSize:"); +late final _sel_setContentViewController_ = objc.registerName( + "setContentViewController:", +); +late final _sel_setContentView_ = objc.registerName("setContentView:"); +late final _sel_setContextMenuRepresentation_ = objc.registerName( + "setContextMenuRepresentation:", +); +late final _sel_setContinuous_ = objc.registerName("setContinuous:"); +late final _sel_setCurrentAppearance_ = objc.registerName( + "setCurrentAppearance:", +); +late final _sel_setDataSource_ = objc.registerName("setDataSource:"); +late final _sel_setData_forType_ = objc.registerName("setData:forType:"); +late final _sel_setDefaultButtonCell_ = objc.registerName( + "setDefaultButtonCell:", +); +late final _sel_setDelegate_ = objc.registerName("setDelegate:"); +late final _sel_setDepthLimit_ = objc.registerName("setDepthLimit:"); +late final _sel_setDisplaysWhenScreenProfileChanges_ = objc.registerName( + "setDisplaysWhenScreenProfileChanges:", +); +late final _sel_setDocumentEdited_ = objc.registerName("setDocumentEdited:"); +late final _sel_setDraggingFormation_ = objc.registerName( + "setDraggingFormation:", +); +late final _sel_setDrawsBackground_ = objc.registerName("setDrawsBackground:"); +late final _sel_setDynamicDepthLimit_ = objc.registerName( + "setDynamicDepthLimit:", +); +late final _sel_setEditable_ = objc.registerName("setEditable:"); +late final _sel_setEligibleForHandoff_ = objc.registerName( + "setEligibleForHandoff:", +); +late final _sel_setEligibleForPrediction_ = objc.registerName( + "setEligibleForPrediction:", +); +late final _sel_setEligibleForPublicIndexing_ = objc.registerName( + "setEligibleForPublicIndexing:", +); +late final _sel_setEligibleForSearch_ = objc.registerName( + "setEligibleForSearch:", +); +late final _sel_setEnabled_ = objc.registerName("setEnabled:"); +late final _sel_setExcludedFromWindowsMenu_ = objc.registerName( + "setExcludedFromWindowsMenu:", +); +late final _sel_setExpirationDate_ = objc.registerName("setExpirationDate:"); +late final _sel_setFieldEditor_ = objc.registerName("setFieldEditor:"); +late final _sel_setFileAttributes_ = objc.registerName("setFileAttributes:"); +late final _sel_setFilename_ = objc.registerName("setFilename:"); +late final _sel_setFloatingPanel_ = objc.registerName("setFloatingPanel:"); +late final _sel_setFocusRingType_ = objc.registerName("setFocusRingType:"); +late final _sel_setFont_ = objc.registerName("setFont:"); +late final _sel_setFont_range_ = objc.registerName("setFont:range:"); +late final _sel_setFrameAutosaveName_ = objc.registerName( + "setFrameAutosaveName:", +); +late final _sel_setFrameCenterRotation_ = objc.registerName( + "setFrameCenterRotation:", +); +late final _sel_setFrameFromString_ = objc.registerName("setFrameFromString:"); +late final _sel_setFrameOrigin_ = objc.registerName("setFrameOrigin:"); +late final _sel_setFrameRotation_ = objc.registerName("setFrameRotation:"); +late final _sel_setFrameSize_ = objc.registerName("setFrameSize:"); +late final _sel_setFrameTopLeftPoint_ = objc.registerName( + "setFrameTopLeftPoint:", +); +late final _sel_setFrameUsingName_ = objc.registerName("setFrameUsingName:"); +late final _sel_setFrameUsingName_force_ = objc.registerName( + "setFrameUsingName:force:", +); +late final _sel_setFrame_ = objc.registerName("setFrame:"); +late final _sel_setFrame_display_ = objc.registerName("setFrame:display:"); +late final _sel_setFrame_display_animate_ = objc.registerName( + "setFrame:display:animate:", +); +late final _sel_setGestureRecognizers_ = objc.registerName( + "setGestureRecognizers:", +); +late final _sel_setGroupsByEvent_ = objc.registerName("setGroupsByEvent:"); +late final _sel_setHasShadow_ = objc.registerName("setHasShadow:"); +late final _sel_setHidden_ = objc.registerName("setHidden:"); +late final _sel_setHidesOnDeactivate_ = objc.registerName( + "setHidesOnDeactivate:", +); +late final _sel_setHorizontallyResizable_ = objc.registerName( + "setHorizontallyResizable:", +); +late final _sel_setIdentifier_ = objc.registerName("setIdentifier:"); +late final _sel_setIgnoresMouseEvents_ = objc.registerName( + "setIgnoresMouseEvents:", +); +late final _sel_setImage_ = objc.registerName("setImage:"); +late final _sel_setImportsGraphics_ = objc.registerName("setImportsGraphics:"); +late final _sel_setIndentationLevel_ = objc.registerName( + "setIndentationLevel:", +); +late final _sel_setInitialFirstResponder_ = objc.registerName( + "setInitialFirstResponder:", +); +late final _sel_setItemArray_ = objc.registerName("setItemArray:"); +late final _sel_setKeyEquivalentModifierMask_ = objc.registerName( + "setKeyEquivalentModifierMask:", +); +late final _sel_setKeyEquivalent_ = objc.registerName("setKeyEquivalent:"); +late final _sel_setKeyboardFocusRingNeedsDisplayInRect_ = objc.registerName( + "setKeyboardFocusRingNeedsDisplayInRect:", +); +late final _sel_setKeywords_ = objc.registerName("setKeywords:"); +late final _sel_setLayerContentsPlacement_ = objc.registerName( + "setLayerContentsPlacement:", +); +late final _sel_setLayerContentsRedrawPolicy_ = objc.registerName( + "setLayerContentsRedrawPolicy:", +); +late final _sel_setLayerUsesCoreImageFilters_ = objc.registerName( + "setLayerUsesCoreImageFilters:", +); +late final _sel_setLayer_ = objc.registerName("setLayer:"); +late final _sel_setLevel_ = objc.registerName("setLevel:"); +late final _sel_setLevelsOfUndo_ = objc.registerName("setLevelsOfUndo:"); +late final _sel_setMark_ = objc.registerName("setMark:"); +late final _sel_setMaxFullScreenContentSize_ = objc.registerName( + "setMaxFullScreenContentSize:", +); +late final _sel_setMaxSize_ = objc.registerName("setMaxSize:"); +late final _sel_setMaximumLinearExposure_ = objc.registerName( + "setMaximumLinearExposure:", +); +late final _sel_setMenuBarVisible_ = objc.registerName("setMenuBarVisible:"); +late final _sel_setMenuChangedMessagesEnabled_ = objc.registerName( + "setMenuChangedMessagesEnabled:", +); +late final _sel_setMenuRepresentation_ = objc.registerName( + "setMenuRepresentation:", +); +late final _sel_setMenuZone_ = objc.registerName("setMenuZone:"); +late final _sel_setMenu_ = objc.registerName("setMenu:"); +late final _sel_setMinFullScreenContentSize_ = objc.registerName( + "setMinFullScreenContentSize:", +); +late final _sel_setMinSize_ = objc.registerName("setMinSize:"); +late final _sel_setMinimumWidth_ = objc.registerName("setMinimumWidth:"); +late final _sel_setMiniwindowImage_ = objc.registerName("setMiniwindowImage:"); +late final _sel_setMiniwindowTitle_ = objc.registerName("setMiniwindowTitle:"); +late final _sel_setMixedStateImage_ = objc.registerName("setMixedStateImage:"); +late final _sel_setMnemonicLocation_ = objc.registerName( + "setMnemonicLocation:", +); +late final _sel_setMode_ = objc.registerName("setMode:"); +late final _sel_setMouseCoalescingEnabled_ = objc.registerName( + "setMouseCoalescingEnabled:", +); +late final _sel_setMovableByWindowBackground_ = objc.registerName( + "setMovableByWindowBackground:", +); +late final _sel_setMovable_ = objc.registerName("setMovable:"); +late final _sel_setNeedsDisplayInRect_ = objc.registerName( + "setNeedsDisplayInRect:", +); +late final _sel_setNeedsDisplay_ = objc.registerName("setNeedsDisplay:"); +late final _sel_setNeedsLayout_ = objc.registerName("setNeedsLayout:"); +late final _sel_setNeedsSave_ = objc.registerName("setNeedsSave:"); +late final _sel_setNextKeyView_ = objc.registerName("setNextKeyView:"); +late final _sel_setNextResponder_ = objc.registerName("setNextResponder:"); +late final _sel_setNumberOfValidItemsForDrop_ = objc.registerName( + "setNumberOfValidItemsForDrop:", +); +late final _sel_setOffStateImage_ = objc.registerName("setOffStateImage:"); +late final _sel_setOnStateImage_ = objc.registerName("setOnStateImage:"); +late final _sel_setOneShot_ = objc.registerName("setOneShot:"); +late final _sel_setOpaque_ = objc.registerName("setOpaque:"); +late final _sel_setParentWindow_ = objc.registerName("setParentWindow:"); +late final _sel_setPersistentIdentifier_ = objc.registerName( + "setPersistentIdentifier:", +); +late final _sel_setPickerMask_ = objc.registerName("setPickerMask:"); +late final _sel_setPickerMode_ = objc.registerName("setPickerMode:"); +late final _sel_setPostsBoundsChangedNotifications_ = objc.registerName( + "setPostsBoundsChangedNotifications:", +); +late final _sel_setPostsFrameChangedNotifications_ = objc.registerName( + "setPostsFrameChangedNotifications:", +); +late final _sel_setPreferredBackingLocation_ = objc.registerName( + "setPreferredBackingLocation:", +); +late final _sel_setPreferredFilename_ = objc.registerName( + "setPreferredFilename:", +); +late final _sel_setPrefersCompactControlSizeMetrics_ = objc.registerName( + "setPrefersCompactControlSizeMetrics:", +); +late final _sel_setPreparedContentRect_ = objc.registerName( + "setPreparedContentRect:", +); +late final _sel_setPresentationStyle_ = objc.registerName( + "setPresentationStyle:", +); +late final _sel_setPreservesContentDuringLiveResize_ = objc.registerName( + "setPreservesContentDuringLiveResize:", +); +late final _sel_setPreventsApplicationTerminationWhenModal_ = objc.registerName( + "setPreventsApplicationTerminationWhenModal:", +); +late final _sel_setPropertyList_forType_ = objc.registerName( + "setPropertyList:forType:", +); +late final _sel_setReferrerURL_ = objc.registerName("setReferrerURL:"); +late final _sel_setReleasedWhenClosed_ = objc.registerName( + "setReleasedWhenClosed:", +); +late final _sel_setRepresentedFilename_ = objc.registerName( + "setRepresentedFilename:", +); +late final _sel_setRepresentedObject_ = objc.registerName( + "setRepresentedObject:", +); +late final _sel_setRepresentedURL_ = objc.registerName("setRepresentedURL:"); +late final _sel_setRequiredUserInfoKeys_ = objc.registerName( + "setRequiredUserInfoKeys:", +); +late final _sel_setResizeIncrements_ = objc.registerName( + "setResizeIncrements:", +); +late final _sel_setRichText_ = objc.registerName("setRichText:"); +late final _sel_setRunLoopModes_ = objc.registerName("setRunLoopModes:"); +late final _sel_setSelectable_ = objc.registerName("setSelectable:"); +late final _sel_setSelectedItems_ = objc.registerName("setSelectedItems:"); +late final _sel_setSelectedRange_ = objc.registerName("setSelectedRange:"); +late final _sel_setSelectionMode_ = objc.registerName("setSelectionMode:"); +late final _sel_setShadow_ = objc.registerName("setShadow:"); +late final _sel_setSharingType_ = objc.registerName("setSharingType:"); +late final _sel_setShowsAlpha_ = objc.registerName("setShowsAlpha:"); +late final _sel_setShowsResizeIndicator_ = objc.registerName( + "setShowsResizeIndicator:", +); +late final _sel_setShowsSelectionIndicator_ = objc.registerName( + "setShowsSelectionIndicator:", +); +late final _sel_setShowsStateColumn_ = objc.registerName( + "setShowsStateColumn:", +); +late final _sel_setShowsToolbarButton_ = objc.registerName( + "setShowsToolbarButton:", +); +late final _sel_setStartingItemNumber_ = objc.registerName( + "setStartingItemNumber:", +); +late final _sel_setState_ = objc.registerName("setState:"); +late final _sel_setString_ = objc.registerName("setString:"); +late final _sel_setString_forType_ = objc.registerName("setString:forType:"); +late final _sel_setStyleMask_ = objc.registerName("setStyleMask:"); +late final _sel_setSubmenu_ = objc.registerName("setSubmenu:"); +late final _sel_setSubmenu_forItem_ = objc.registerName("setSubmenu:forItem:"); +late final _sel_setSubtitle_ = objc.registerName("setSubtitle:"); +late final _sel_setSubviews_ = objc.registerName("setSubviews:"); +late final _sel_setSupermenu_ = objc.registerName("setSupermenu:"); +late final _sel_setSupportsContinuationStreams_ = objc.registerName( + "setSupportsContinuationStreams:", +); +late final _sel_setTabbingIdentifier_ = objc.registerName( + "setTabbingIdentifier:", +); +late final _sel_setTabbingMode_ = objc.registerName("setTabbingMode:"); +late final _sel_setTag_ = objc.registerName("setTag:"); +late final _sel_setTargetContentIdentifier_ = objc.registerName( + "setTargetContentIdentifier:", +); +late final _sel_setTarget_ = objc.registerName("setTarget:"); +late final _sel_setTearOffMenuRepresentation_ = objc.registerName( + "setTearOffMenuRepresentation:", +); +late final _sel_setTextColor_ = objc.registerName("setTextColor:"); +late final _sel_setTextColor_range_ = objc.registerName("setTextColor:range:"); +late final _sel_setTitleVisibility_ = objc.registerName("setTitleVisibility:"); +late final _sel_setTitleWithMnemonic_ = objc.registerName( + "setTitleWithMnemonic:", +); +late final _sel_setTitleWithRepresentedFilename_ = objc.registerName( + "setTitleWithRepresentedFilename:", +); +late final _sel_setTitle_ = objc.registerName("setTitle:"); +late final _sel_setTitlebarAccessoryViewControllers_ = objc.registerName( + "setTitlebarAccessoryViewControllers:", +); +late final _sel_setTitlebarAppearsTransparent_ = objc.registerName( + "setTitlebarAppearsTransparent:", +); +late final _sel_setTitlebarSeparatorStyle_ = objc.registerName( + "setTitlebarSeparatorStyle:", +); +late final _sel_setToolTip_ = objc.registerName("setToolTip:"); +late final _sel_setToolbarStyle_ = objc.registerName("setToolbarStyle:"); +late final _sel_setToolbar_ = objc.registerName("setToolbar:"); +late final _sel_setUpGState = objc.registerName("setUpGState"); +late final _sel_setUserActivity_ = objc.registerName("setUserActivity:"); +late final _sel_setUserInfo_ = objc.registerName("setUserInfo:"); +late final _sel_setUserInterfaceLayoutDirection_ = objc.registerName( + "setUserInterfaceLayoutDirection:", +); +late final _sel_setUsesFontPanel_ = objc.registerName("setUsesFontPanel:"); +late final _sel_setUsesUserKeyEquivalents_ = objc.registerName( + "setUsesUserKeyEquivalents:", +); +late final _sel_setVerticallyResizable_ = objc.registerName( + "setVerticallyResizable:", +); +late final _sel_setView_ = objc.registerName("setView:"); +late final _sel_setViewsNeedDisplay_ = objc.registerName( + "setViewsNeedDisplay:", +); +late final _sel_setWantsLayer_ = objc.registerName("setWantsLayer:"); +late final _sel_setWantsRestingTouches_ = objc.registerName( + "setWantsRestingTouches:", +); +late final _sel_setWebpageURL_ = objc.registerName("setWebpageURL:"); +late final _sel_setWindowController_ = objc.registerName( + "setWindowController:", +); +late final _sel_setWorksWhenModal_ = objc.registerName("setWorksWhenModal:"); +late final _sel_setWritingToolsCoordinator_ = objc.registerName( + "setWritingToolsCoordinator:", +); +late final _sel_shadow = objc.registerName("shadow"); +late final _sel_sharedColorPanel = objc.registerName("sharedColorPanel"); +late final _sel_sharedColorPanelExists = objc.registerName( + "sharedColorPanelExists", +); +late final _sel_sharingType = objc.registerName("sharingType"); +late final _sel_sheetParent = objc.registerName("sheetParent"); +late final _sel_sheets = objc.registerName("sheets"); +late final _sel_shouldBeTreatedAsInkEvent_ = objc.registerName( + "shouldBeTreatedAsInkEvent:", +); +late final _sel_shouldDelayWindowOrderingForEvent_ = objc.registerName( + "shouldDelayWindowOrderingForEvent:", +); +late final _sel_shouldDrawColor = objc.registerName("shouldDrawColor"); +late final _sel_showContextHelp_ = objc.registerName("showContextHelp:"); +late final _sel_showContextMenuForSelection_ = objc.registerName( + "showContextMenuForSelection:", +); +late final _sel_showDefinitionForAttributedString_atPoint_ = objc.registerName( + "showDefinitionForAttributedString:atPoint:", +); +late final _sel_showDefinitionForAttributedString_range_options_baselineOriginProvider_ = + objc.registerName( + "showDefinitionForAttributedString:range:options:baselineOriginProvider:", + ); +late final _sel_showGuessPanel_ = objc.registerName("showGuessPanel:"); +late final _sel_showWritingTools_ = objc.registerName("showWritingTools:"); +late final _sel_showsAlpha = objc.registerName("showsAlpha"); +late final _sel_showsResizeIndicator = objc.registerName( + "showsResizeIndicator", +); +late final _sel_showsSelectionIndicator = objc.registerName( + "showsSelectionIndicator", +); +late final _sel_showsStateColumn = objc.registerName("showsStateColumn"); +late final _sel_showsToolbarButton = objc.registerName("showsToolbarButton"); +late final _sel_size = objc.registerName("size"); +late final _sel_sizeToFit = objc.registerName("sizeToFit"); +late final _sel_slideDraggedImageTo_ = objc.registerName( + "slideDraggedImageTo:", +); +late final _sel_smartMagnifyWithEvent_ = objc.registerName( + "smartMagnifyWithEvent:", +); +late final _sel_sortSubviewsUsingFunction_context_ = objc.registerName( + "sortSubviewsUsingFunction:context:", +); +late final _sel_springLoadingHighlight = objc.registerName( + "springLoadingHighlight", +); +late final _sel_stage = objc.registerName("stage"); +late final _sel_stageTransition = objc.registerName("stageTransition"); +late final _sel_standardWindowButton_ = objc.registerName( + "standardWindowButton:", +); +late final _sel_standardWindowButton_forStyleMask_ = objc.registerName( + "standardWindowButton:forStyleMask:", +); +late final _sel_startPeriodicEventsAfterDelay_withPeriod_ = objc.registerName( + "startPeriodicEventsAfterDelay:withPeriod:", +); +late final _sel_startingItemNumber = objc.registerName("startingItemNumber"); +late final _sel_state = objc.registerName("state"); +late final _sel_stopPeriodicEvents = objc.registerName("stopPeriodicEvents"); +late final _sel_string = objc.registerName("string"); +late final _sel_stringForType_ = objc.registerName("stringForType:"); +late final _sel_stringWithSavedFrame = objc.registerName( + "stringWithSavedFrame", +); +late final _sel_styleMask = objc.registerName("styleMask"); +late final _sel_submenu = objc.registerName("submenu"); +late final _sel_submenuAction_ = objc.registerName("submenuAction:"); +late final _sel_subscript_ = objc.registerName("subscript:"); +late final _sel_subtitle = objc.registerName("subtitle"); +late final _sel_subtype = objc.registerName("subtype"); +late final _sel_subviews = objc.registerName("subviews"); +late final _sel_supermenu = objc.registerName("supermenu"); +late final _sel_superscript_ = objc.registerName("superscript:"); +late final _sel_superview = objc.registerName("superview"); +late final _sel_supplementalTargetForAction_sender_ = objc.registerName( + "supplementalTargetForAction:sender:", +); +late final _sel_supportsContinuationStreams = objc.registerName( + "supportsContinuationStreams", +); +late final _sel_supportsSecureCoding = objc.registerName( + "supportsSecureCoding", +); +late final _sel_swapWithMark_ = objc.registerName("swapWithMark:"); +late final _sel_swipeWithEvent_ = objc.registerName("swipeWithEvent:"); +late final _sel_symbolicLinkDestination = objc.registerName( + "symbolicLinkDestination", +); +late final _sel_symbolicLinkDestinationURL = objc.registerName( + "symbolicLinkDestinationURL", +); +late final _sel_systemTabletID = objc.registerName("systemTabletID"); +late final _sel_tab = objc.registerName("tab"); +late final _sel_tabGroup = objc.registerName("tabGroup"); +late final _sel_tabbedWindows = objc.registerName("tabbedWindows"); +late final _sel_tabbingIdentifier = objc.registerName("tabbingIdentifier"); +late final _sel_tabbingMode = objc.registerName("tabbingMode"); +late final _sel_tabletID = objc.registerName("tabletID"); +late final _sel_tabletPoint_ = objc.registerName("tabletPoint:"); +late final _sel_tabletProximity_ = objc.registerName("tabletProximity:"); +late final _sel_tag = objc.registerName("tag"); +late final _sel_tangentialPressure = objc.registerName("tangentialPressure"); +late final _sel_target = objc.registerName("target"); +late final _sel_targetContentIdentifier = objc.registerName( + "targetContentIdentifier", +); +late final _sel_tearOffMenuRepresentation = objc.registerName( + "tearOffMenuRepresentation", +); +late final _sel_textColor = objc.registerName("textColor"); +late final _sel_textDidBeginEditing_ = objc.registerName( + "textDidBeginEditing:", +); +late final _sel_textDidChange_ = objc.registerName("textDidChange:"); +late final _sel_textDidEndEditing_ = objc.registerName("textDidEndEditing:"); +late final _sel_textShouldBeginEditing_ = objc.registerName( + "textShouldBeginEditing:", +); +late final _sel_textShouldEndEditing_ = objc.registerName( + "textShouldEndEditing:", +); +late final _sel_tilt = objc.registerName("tilt"); +late final _sel_timestamp = objc.registerName("timestamp"); +late final _sel_title = objc.registerName("title"); +late final _sel_titleVisibility = objc.registerName("titleVisibility"); +late final _sel_titlebarAccessoryViewControllers = objc.registerName( + "titlebarAccessoryViewControllers", +); +late final _sel_titlebarAppearsTransparent = objc.registerName( + "titlebarAppearsTransparent", +); +late final _sel_titlebarSeparatorStyle = objc.registerName( + "titlebarSeparatorStyle", +); +late final _sel_toggleFullScreen_ = objc.registerName("toggleFullScreen:"); +late final _sel_toggleRuler_ = objc.registerName("toggleRuler:"); +late final _sel_toggleTabBar_ = objc.registerName("toggleTabBar:"); +late final _sel_toggleTabOverview_ = objc.registerName("toggleTabOverview:"); +late final _sel_toggleToolbarShown_ = objc.registerName("toggleToolbarShown:"); +late final _sel_toolTip = objc.registerName("toolTip"); +late final _sel_toolbar = objc.registerName("toolbar"); +late final _sel_toolbarStyle = objc.registerName("toolbarStyle"); +late final _sel_touchesBeganWithEvent_ = objc.registerName( + "touchesBeganWithEvent:", +); +late final _sel_touchesCancelledWithEvent_ = objc.registerName( + "touchesCancelledWithEvent:", +); +late final _sel_touchesEndedWithEvent_ = objc.registerName( + "touchesEndedWithEvent:", +); +late final _sel_touchesForView_ = objc.registerName("touchesForView:"); +late final _sel_touchesMatchingPhase_inView_ = objc.registerName( + "touchesMatchingPhase:inView:", +); +late final _sel_touchesMovedWithEvent_ = objc.registerName( + "touchesMovedWithEvent:", +); +late final _sel_trackEventsMatchingMask_timeout_mode_handler_ = objc + .registerName("trackEventsMatchingMask:timeout:mode:handler:"); +late final _sel_trackSwipeEventWithOptions_dampenAmountThresholdMin_max_usingHandler_ = + objc.registerName( + "trackSwipeEventWithOptions:dampenAmountThresholdMin:max:usingHandler:", + ); +late final _sel_trackingArea = objc.registerName("trackingArea"); +late final _sel_trackingAreas = objc.registerName("trackingAreas"); +late final _sel_trackingNumber = objc.registerName("trackingNumber"); +late final _sel_transferWindowSharingToWindow_completionHandler_ = objc + .registerName("transferWindowSharingToWindow:completionHandler:"); +late final _sel_translateOriginToPoint_ = objc.registerName( + "translateOriginToPoint:", +); +late final _sel_translateRectsNeedingDisplayInRect_by_ = objc.registerName( + "translateRectsNeedingDisplayInRect:by:", +); +late final _sel_transposeWords_ = objc.registerName("transposeWords:"); +late final _sel_transpose_ = objc.registerName("transpose:"); +late final _sel_tryToPerform_with_ = objc.registerName("tryToPerform:with:"); +late final _sel_type = objc.registerName("type"); +late final _sel_types = objc.registerName("types"); +late final _sel_typesFilterableTo_ = objc.registerName("typesFilterableTo:"); +late final _sel_underline_ = objc.registerName("underline:"); +late final _sel_undo = objc.registerName("undo"); +late final _sel_undoActionIsDiscardable = objc.registerName( + "undoActionIsDiscardable", +); +late final _sel_undoActionName = objc.registerName("undoActionName"); +late final _sel_undoActionUserInfoValueForKey_ = objc.registerName( + "undoActionUserInfoValueForKey:", +); +late final _sel_undoCount = objc.registerName("undoCount"); +late final _sel_undoManager = objc.registerName("undoManager"); +late final _sel_undoMenuItemTitle = objc.registerName("undoMenuItemTitle"); +late final _sel_undoMenuTitleForUndoActionName_ = objc.registerName( + "undoMenuTitleForUndoActionName:", +); +late final _sel_undoNestedGroup = objc.registerName("undoNestedGroup"); +late final _sel_uniqueID = objc.registerName("uniqueID"); +late final _sel_unlockFocus = objc.registerName("unlockFocus"); +late final _sel_unregisterDraggedTypes = objc.registerName( + "unregisterDraggedTypes", +); +late final _sel_unscript_ = objc.registerName("unscript:"); +late final _sel_update = objc.registerName("update"); +late final _sel_updateDraggingItemsForDrag_ = objc.registerName( + "updateDraggingItemsForDrag:", +); +late final _sel_updateFromPath_ = objc.registerName("updateFromPath:"); +late final _sel_updateLayer = objc.registerName("updateLayer"); +late final _sel_updateTrackingAreas = objc.registerName("updateTrackingAreas"); +late final _sel_updateUserActivityState_ = objc.registerName( + "updateUserActivityState:", +); +late final _sel_uppercaseWord_ = objc.registerName("uppercaseWord:"); +late final _sel_useOptimizedDrawing_ = objc.registerName( + "useOptimizedDrawing:", +); +late final _sel_userActivity = objc.registerName("userActivity"); +late final _sel_userActivityWasContinued_ = objc.registerName( + "userActivityWasContinued:", +); +late final _sel_userActivityWillSave_ = objc.registerName( + "userActivityWillSave:", +); +late final _sel_userActivity_didReceiveInputStream_outputStream_ = objc + .registerName("userActivity:didReceiveInputStream:outputStream:"); +late final _sel_userData = objc.registerName("userData"); +late final _sel_userInfo = objc.registerName("userInfo"); +late final _sel_userInterfaceLayoutDirection = objc.registerName( + "userInterfaceLayoutDirection", +); +late final _sel_userKeyEquivalent = objc.registerName("userKeyEquivalent"); +late final _sel_userSpaceScaleFactor = objc.registerName( + "userSpaceScaleFactor", +); +late final _sel_userTabbingPreference = objc.registerName( + "userTabbingPreference", +); +late final _sel_usesFontPanel = objc.registerName("usesFontPanel"); +late final _sel_usesUserKeyEquivalents = objc.registerName( + "usesUserKeyEquivalents", +); +late final _sel_validRequestorForSendType_returnType_ = objc.registerName( + "validRequestorForSendType:returnType:", +); +late final _sel_validateMenuItem_ = objc.registerName("validateMenuItem:"); +late final _sel_validateProposedFirstResponder_forEvent_ = objc.registerName( + "validateProposedFirstResponder:forEvent:", +); +late final _sel_validateUserInterfaceItem_ = objc.registerName( + "validateUserInterfaceItem:", +); +late final _sel_vendorDefined = objc.registerName("vendorDefined"); +late final _sel_vendorID = objc.registerName("vendorID"); +late final _sel_vendorPointingDeviceType = objc.registerName( + "vendorPointingDeviceType", +); +late final _sel_view = objc.registerName("view"); +late final _sel_viewDidChangeBackingProperties = objc.registerName( + "viewDidChangeBackingProperties", +); +late final _sel_viewDidChangeEffectiveAppearance = objc.registerName( + "viewDidChangeEffectiveAppearance", +); +late final _sel_viewDidEndLiveResize = objc.registerName( + "viewDidEndLiveResize", +); +late final _sel_viewDidHide = objc.registerName("viewDidHide"); +late final _sel_viewDidMoveToSuperview = objc.registerName( + "viewDidMoveToSuperview", +); +late final _sel_viewDidMoveToWindow = objc.registerName("viewDidMoveToWindow"); +late final _sel_viewDidUnhide = objc.registerName("viewDidUnhide"); +late final _sel_viewForRow_forComponent_ = objc.registerName( + "viewForRow:forComponent:", +); +late final _sel_viewSizeChanged_ = objc.registerName("viewSizeChanged:"); +late final _sel_viewWillDraw = objc.registerName("viewWillDraw"); +late final _sel_viewWillMoveToSuperview_ = objc.registerName( + "viewWillMoveToSuperview:", +); +late final _sel_viewWillMoveToWindow_ = objc.registerName( + "viewWillMoveToWindow:", +); +late final _sel_viewWillStartLiveResize = objc.registerName( + "viewWillStartLiveResize", +); +late final _sel_viewWithTag_ = objc.registerName("viewWithTag:"); +late final _sel_viewsNeedDisplay = objc.registerName("viewsNeedDisplay"); +late final _sel_visibleRect = objc.registerName("visibleRect"); +late final _sel_wantsDefaultClipping = objc.registerName( + "wantsDefaultClipping", +); +late final _sel_wantsForwardedScrollEventsForAxis_ = objc.registerName( + "wantsForwardedScrollEventsForAxis:", +); +late final _sel_wantsLayer = objc.registerName("wantsLayer"); +late final _sel_wantsPeriodicDraggingUpdates = objc.registerName( + "wantsPeriodicDraggingUpdates", +); +late final _sel_wantsRestingTouches = objc.registerName("wantsRestingTouches"); +late final _sel_wantsScrollEventsForSwipeTrackingOnAxis_ = objc.registerName( + "wantsScrollEventsForSwipeTrackingOnAxis:", +); +late final _sel_wantsUpdateLayer = objc.registerName("wantsUpdateLayer"); +late final _sel_webpageURL = objc.registerName("webpageURL"); +late final _sel_widthAdjustLimit = objc.registerName("widthAdjustLimit"); +late final _sel_willOpenMenu_withEvent_ = objc.registerName( + "willOpenMenu:withEvent:", +); +late final _sel_willPresentError_ = objc.registerName("willPresentError:"); +late final _sel_willRemoveSubview_ = objc.registerName("willRemoveSubview:"); +late final _sel_window = objc.registerName("window"); +late final _sel_windowController = objc.registerName("windowController"); +late final _sel_windowDidBecomeKey_ = objc.registerName("windowDidBecomeKey:"); +late final _sel_windowDidBecomeMain_ = objc.registerName( + "windowDidBecomeMain:", +); +late final _sel_windowDidChangeBackingProperties_ = objc.registerName( + "windowDidChangeBackingProperties:", +); +late final _sel_windowDidChangeOcclusionState_ = objc.registerName( + "windowDidChangeOcclusionState:", +); +late final _sel_windowDidChangeScreenProfile_ = objc.registerName( + "windowDidChangeScreenProfile:", +); +late final _sel_windowDidChangeScreen_ = objc.registerName( + "windowDidChangeScreen:", +); +late final _sel_windowDidDeminiaturize_ = objc.registerName( + "windowDidDeminiaturize:", +); +late final _sel_windowDidEndLiveResize_ = objc.registerName( + "windowDidEndLiveResize:", +); +late final _sel_windowDidEndSheet_ = objc.registerName("windowDidEndSheet:"); +late final _sel_windowDidEnterFullScreen_ = objc.registerName( + "windowDidEnterFullScreen:", +); +late final _sel_windowDidEnterVersionBrowser_ = objc.registerName( + "windowDidEnterVersionBrowser:", +); +late final _sel_windowDidExitFullScreen_ = objc.registerName( + "windowDidExitFullScreen:", +); +late final _sel_windowDidExitVersionBrowser_ = objc.registerName( + "windowDidExitVersionBrowser:", +); +late final _sel_windowDidExpose_ = objc.registerName("windowDidExpose:"); +late final _sel_windowDidFailToEnterFullScreen_ = objc.registerName( + "windowDidFailToEnterFullScreen:", +); +late final _sel_windowDidFailToExitFullScreen_ = objc.registerName( + "windowDidFailToExitFullScreen:", +); +late final _sel_windowDidMiniaturize_ = objc.registerName( + "windowDidMiniaturize:", +); +late final _sel_windowDidMove_ = objc.registerName("windowDidMove:"); +late final _sel_windowDidResignKey_ = objc.registerName("windowDidResignKey:"); +late final _sel_windowDidResignMain_ = objc.registerName( + "windowDidResignMain:", +); +late final _sel_windowDidResize_ = objc.registerName("windowDidResize:"); +late final _sel_windowDidUpdate_ = objc.registerName("windowDidUpdate:"); +late final _sel_windowForSharingRequestFromWindow_ = objc.registerName( + "windowForSharingRequestFromWindow:", +); +late final _sel_windowNumber = objc.registerName("windowNumber"); +late final _sel_windowNumberAtPoint_belowWindowWithWindowNumber_ = objc + .registerName("windowNumberAtPoint:belowWindowWithWindowNumber:"); +late final _sel_windowNumbersWithOptions_ = objc.registerName( + "windowNumbersWithOptions:", +); +late final _sel_windowRef = objc.registerName("windowRef"); +late final _sel_windowShouldClose_ = objc.registerName("windowShouldClose:"); +late final _sel_windowShouldZoom_toFrame_ = objc.registerName( + "windowShouldZoom:toFrame:", +); +late final _sel_windowTitlebarLayoutDirection = objc.registerName( + "windowTitlebarLayoutDirection", +); +late final _sel_windowWillBeginSheet_ = objc.registerName( + "windowWillBeginSheet:", +); +late final _sel_windowWillClose_ = objc.registerName("windowWillClose:"); +late final _sel_windowWillEnterFullScreen_ = objc.registerName( + "windowWillEnterFullScreen:", +); +late final _sel_windowWillEnterVersionBrowser_ = objc.registerName( + "windowWillEnterVersionBrowser:", +); +late final _sel_windowWillExitFullScreen_ = objc.registerName( + "windowWillExitFullScreen:", +); +late final _sel_windowWillExitVersionBrowser_ = objc.registerName( + "windowWillExitVersionBrowser:", +); +late final _sel_windowWillMiniaturize_ = objc.registerName( + "windowWillMiniaturize:", +); +late final _sel_windowWillMove_ = objc.registerName("windowWillMove:"); +late final _sel_windowWillResize_toSize_ = objc.registerName( + "windowWillResize:toSize:", +); +late final _sel_windowWillReturnFieldEditor_toObject_ = objc.registerName( + "windowWillReturnFieldEditor:toObject:", +); +late final _sel_windowWillReturnUndoManager_ = objc.registerName( + "windowWillReturnUndoManager:", +); +late final _sel_windowWillStartLiveResize_ = objc.registerName( + "windowWillStartLiveResize:", +); +late final _sel_windowWillUseStandardFrame_defaultFrame_ = objc.registerName( + "windowWillUseStandardFrame:defaultFrame:", +); +late final _sel_windowWithContentViewController_ = objc.registerName( + "windowWithContentViewController:", +); +late final _sel_window_didDecodeRestorableState_ = objc.registerName( + "window:didDecodeRestorableState:", +); +late final _sel_window_shouldDragDocumentWithEvent_from_withPasteboard_ = objc + .registerName("window:shouldDragDocumentWithEvent:from:withPasteboard:"); +late final _sel_window_shouldPopUpDocumentPathMenu_ = objc.registerName( + "window:shouldPopUpDocumentPathMenu:", +); +late final _sel_window_startCustomAnimationToEnterFullScreenOnScreen_withDuration_ = + objc.registerName( + "window:startCustomAnimationToEnterFullScreenOnScreen:withDuration:", + ); +late final _sel_window_startCustomAnimationToEnterFullScreenWithDuration_ = objc + .registerName("window:startCustomAnimationToEnterFullScreenWithDuration:"); +late final _sel_window_startCustomAnimationToExitFullScreenWithDuration_ = objc + .registerName("window:startCustomAnimationToExitFullScreenWithDuration:"); +late final _sel_window_willEncodeRestorableState_ = objc.registerName( + "window:willEncodeRestorableState:", +); +late final _sel_window_willPositionSheet_usingRect_ = objc.registerName( + "window:willPositionSheet:usingRect:", +); +late final _sel_window_willResizeForVersionBrowserWithMaxPreferredSize_maxAllowedSize_ = + objc.registerName( + "window:willResizeForVersionBrowserWithMaxPreferredSize:maxAllowedSize:", + ); +late final _sel_window_willUseFullScreenContentSize_ = objc.registerName( + "window:willUseFullScreenContentSize:", +); +late final _sel_window_willUseFullScreenPresentationOptions_ = objc + .registerName("window:willUseFullScreenPresentationOptions:"); +late final _sel_worksWhenModal = objc.registerName("worksWhenModal"); +late final _sel_writeEPSInsideRect_toPasteboard_ = objc.registerName( + "writeEPSInsideRect:toPasteboard:", +); +late final _sel_writeFileContents_ = objc.registerName("writeFileContents:"); +late final _sel_writeFileWrapper_ = objc.registerName("writeFileWrapper:"); +late final _sel_writeObjects_ = objc.registerName("writeObjects:"); +late final _sel_writePDFInsideRect_toPasteboard_ = objc.registerName( + "writePDFInsideRect:toPasteboard:", +); +late final _sel_writeRTFDToFile_atomically_ = objc.registerName( + "writeRTFDToFile:atomically:", +); +late final _sel_writeToFile_atomically_updateFilenames_ = objc.registerName( + "writeToFile:atomically:updateFilenames:", +); +late final _sel_writeToURL_options_originalContentsURL_error_ = objc + .registerName("writeToURL:options:originalContentsURL:error:"); +late final _sel_writingToolsCoordinator = objc.registerName( + "writingToolsCoordinator", +); +late final _sel_writingToolsItems = objc.registerName("writingToolsItems"); +late final _sel_yank_ = objc.registerName("yank:"); +late final _sel_zoom_ = objc.registerName("zoom:"); typedef instancetype = ffi.Pointer; typedef Dartinstancetype = objc.ObjCObject; diff --git a/pkgs/ffigen/test/test_utils.dart b/pkgs/ffigen/test/test_utils.dart index 666d800678..4acec5070b 100644 --- a/pkgs/ffigen/test/test_utils.dart +++ b/pkgs/ffigen/test/test_utils.dart @@ -21,7 +21,11 @@ import 'package:path/path.dart' as path; import 'package:test/test.dart'; import 'package:yaml/yaml.dart' as yaml; +import 'package:ffigen/src/public_ast/public_ast.dart'; + export 'package:ffigen/src/config_provider/utils.dart'; +export 'package:ffigen/src/public_ast/public_ast.dart' + show ExcludeAllVisitor, IncludeAllVisitor, IncludeSetVisitor, Visitor; Context testContext([FfiGenerator? generator]) { final tmpDir = (Directory( @@ -29,7 +33,7 @@ Context testContext([FfiGenerator? generator]) { )..createSync(recursive: true)).createTempSync(); return Context( createTestLogger(), - generator ?? FfiGenerator(output: Output(dartFile: Uri.file('unused'))), + generator ?? FfiGenerator(visitors: const [IncludeAllVisitor()], output: Output(dartFile: Uri.file('unused'))), tmpDir: tmpDir.path, ); } diff --git a/pkgs/ffigen/test/unit_tests/config_util_test.dart b/pkgs/ffigen/test/unit_tests/config_util_test.dart index b928ed54a4..8f688d52d3 100644 --- a/pkgs/ffigen/test/unit_tests/config_util_test.dart +++ b/pkgs/ffigen/test/unit_tests/config_util_test.dart @@ -8,41 +8,25 @@ import 'package:test/test.dart'; Declaration decl(String name) => Declaration(usr: '', originalName: name); void main() { - group('Declarations utils', () { - test('includeSet', () { - final includer = Declarations.includeSet({'foo', 'bar'}); - expect(includer(decl('foo')), isTrue); - expect(includer(decl('bar')), isTrue); - expect(includer(decl('baz')), isFalse); + group('Visitor utils', () { + test('IncludeSetVisitor', () { + final visitor = IncludeSetVisitor({'foo', 'bar'}); + final structFoo = Struct(originalName: 'foo', usr: 'foo'); + final structBaz = Struct(originalName: 'baz', usr: 'baz'); + visitor.visitStruct(structFoo); + visitor.visitStruct(structBaz); + expect(structFoo.isExcluded, isFalse); + expect(structBaz.isExcluded, isTrue); }); - test('includeMemberSet', () { - final includer = Declarations.includeMemberSet({ - 'foo': {'bar'}, - }); - expect(includer(decl('foo'), 'bar'), isTrue); - expect(includer(decl('foo'), 'baz'), isFalse); - expect(includer(decl('goo'), 'bar'), isTrue); - expect(includer(decl('goo'), 'baz'), isTrue); - }); - - test('renameWithMap', () { - final renamer = Declarations.renameWithMap({'foo': 'bar'}); - expect(renamer(decl('foo')), 'bar'); - expect(renamer(decl('bar')), 'bar'); - expect(renamer(decl('baz')), 'baz'); - }); - - test('renameMemberWithMap', () { - final renamer = Declarations.renameMemberWithMap({ - 'foo': {'bar': 'baz'}, - }); - expect(renamer(decl('foo'), 'bar'), 'baz'); - expect(renamer(decl('foo'), 'baz'), 'baz'); - expect(renamer(decl('foo'), 'bop'), 'bop'); - expect(renamer(decl('goo'), 'bar'), 'bar'); - expect(renamer(decl('goo'), 'baz'), 'baz'); - expect(renamer(decl('goo'), 'bop'), 'bop'); + test('RenameMapVisitor', () { + final visitor = RenameMapVisitor({'foo': 'bar'}); + final structFoo = Struct(originalName: 'foo', usr: 'foo'); + final structBaz = Struct(originalName: 'baz', usr: 'baz'); + visitor.visitStruct(structFoo); + visitor.visitStruct(structBaz); + expect(structFoo.name, 'bar'); + expect(structBaz.name, 'baz'); }); }); } diff --git a/pkgs/ffigen/test/unit_tests/objc_inheritance_edge_case_test.dart b/pkgs/ffigen/test/unit_tests/objc_inheritance_edge_case_test.dart index 9965822210..4cd930ebbc 100644 --- a/pkgs/ffigen/test/unit_tests/objc_inheritance_edge_case_test.dart +++ b/pkgs/ffigen/test/unit_tests/objc_inheritance_edge_case_test.dart @@ -18,11 +18,9 @@ void main() { externalVersions: const ExternalVersions(), ); final config = FfiGenerator( + visitors: const [IncludeAllVisitor()], output: Output(dartFile: Uri.file('unused')), - objectiveC: const ObjectiveC( - interfaces: Interfaces.includeAll, - categories: Categories.includeAll, - ), + objectiveC: const ObjectiveC(), ); late Context context; final voidType = NativeType(SupportedNativeType.voidType); diff --git a/pkgs/ffigen/tool/generate_code.dart b/pkgs/ffigen/tool/generate_code.dart new file mode 100644 index 0000000000..9f47fd929a --- /dev/null +++ b/pkgs/ffigen/tool/generate_code.dart @@ -0,0 +1,189 @@ +// 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 'dart:io'; +import 'package:ffigen/ffigen.dart'; + +class LibClangVisitor extends Visitor { + static const enums = { + 'CXChildVisitResult', + 'CXCursorKind', + 'CXTypeKind', + 'CXDiagnosticDisplayOptions', + 'CXTranslationUnit_Flags', + 'CXEvalResultKind', + 'CXObjCPropertyAttrKind', + 'CXTypeNullabilityKind', + 'CXTypeLayoutError', + 'CXDiagnosticSeverity', + }; + + static const structs = { + 'CXCursor', + 'CXType', + 'CXSourceLocation', + 'CXString', + 'CXTranslationUnitImpl', + 'CXUnsavedFile', + 'CXSourceRange', + 'CXPlatformAvailability', + 'CXVersion', + }; + + static const functions = { + 'clang_createIndex', + 'clang_disposeIndex', + 'clang_getNumDiagnostics', + 'clang_getDiagnostic', + 'clang_getDiagnosticSeverity', + 'clang_disposeDiagnostic', + 'clang_parseTranslationUnit', + 'clang_disposeTranslationUnit', + 'clang_EvalResult_getKind', + 'clang_EvalResult_getAsInt', + 'clang_EvalResult_getAsLongLong', + 'clang_EvalResult_getAsDouble', + 'clang_EvalResult_getAsStr', + 'clang_EvalResult_dispose', + 'clang_getCString', + 'clang_disposeString', + 'clang_getCursorKind', + 'clang_getCursorKindSpelling', + 'clang_getCursorType', + 'clang_getTypeSpelling', + 'clang_getTypeKindSpelling', + 'clang_getResultType', + 'clang_getTypedefName', + 'clang_getPointeeType', + 'clang_getCanonicalType', + 'clang_Type_getNamedType', + 'clang_Type_getAlignOf', + 'clang_getTypeDeclaration', + 'clang_getTypedefDeclUnderlyingType', + 'clang_getCursorSpelling', + 'clang_getTranslationUnitCursor', + 'clang_formatDiagnostic', + 'clang_visitChildren', + 'clang_Cursor_getNumArguments', + 'clang_Cursor_getArgument', + 'clang_getNumArgTypes', + 'clang_getArgType', + 'clang_isConstQualifiedType', + 'clang_isFunctionTypeVariadic', + 'clang_Cursor_getStorageClass', + 'clang_getCursorResultType', + 'clang_getCursorExtent', + 'clang_getEnumConstantDeclValue', + 'clang_getEnumDeclIntegerType', + 'clang_equalRanges', + 'clang_Cursor_getCommentRange', + 'clang_Cursor_getRawCommentText', + 'clang_Cursor_getBriefCommentText', + 'clang_getCursorLocation', + 'clang_getRangeStart', + 'clang_getRangeEnd', + 'clang_getFileLocation', + 'clang_getFileName', + 'clang_getNumElements', + 'clang_getArrayElementType', + 'clang_Cursor_isMacroFunctionLike', + 'clang_Cursor_isMacroBuiltin', + 'clang_Cursor_Evaluate', + 'clang_Cursor_isAnonymous', + 'clang_Cursor_isAnonymousRecordDecl', + 'clang_getCursorUSR', + 'clang_getFieldDeclBitWidth', + 'clang_Cursor_isFunctionInlined', + 'clang_getCursorDefinition', + 'clang_isCursorDefinition', + 'clang_CXXMethod_isConst', + 'clang_CXXMethod_isStatic', + 'clang_getCursorAvailability', + 'clang_getCursorPlatformAvailability', + 'clang_disposeCXPlatformAvailability', + 'clang_Cursor_isNull', + 'clang_Cursor_hasAttrs', + 'clang_Type_getObjCObjectBaseType', + 'clang_Cursor_getObjCPropertyAttributes', + 'clang_Cursor_getObjCPropertyGetterName', + 'clang_Cursor_getObjCPropertySetterName', + 'clang_Cursor_isObjCOptional', + 'clang_Type_getNullability', + 'clang_Type_getModifiedType', + 'clang_Location_isInSystemHeader', + 'clang_getClangVersion', + 'clang_Type_getNumObjCProtocolRefs', + 'clang_Type_getObjCProtocolDecl', + }; + + const LibClangVisitor(); + + @override + void visitEnum(EnumClass node) { + node.style = EnumStyle.intConstants; + if (node.originalName.isNotEmpty && !enums.contains(node.originalName)) { + node.isExcluded = true; + } + } + + @override + void visitStruct(Struct node) { + if (node.originalName.isNotEmpty && + !structs.contains(node.originalName) && + !node.originalName.contains('Version') && + !node.originalName.contains('PlatformAvailability')) { + node.isExcluded = true; + } + } + + @override + void visitFunc(Func node) { + if (!functions.contains(node.originalName)) { + node.isExcluded = true; + } + } + + @override + void visitTypealias(Typealias node) { + if (RegExp(r'.*time(64)?_t$').hasMatch(node.originalName)) { + node.isExcluded = true; + } + } +} + +void main() { + final root = Platform.script.resolve('../'); + FfiGenerator( + headers: Headers( + entryPoints: [ + root.resolve('third_party/libclang/include/clang-c/Index.h'), + ], + compilerOptions: ['-Ithird_party/libclang/include'], + ignoreSourceErrors: true, + include: + (Uri header) => + header.path.endsWith('wrapper.c') || + header.path.endsWith('Index.h') || + header.path.endsWith('CXString.h'), + ), + visitors: [const LibClangVisitor()], + typedefs: const Typedefs(includeUnused: true), + structs: const Structs(dependencies: CompoundDependencies.full), + output: Output( + preamble: ''' +// Part of the LLVM Project, under the Apache License v2.0 with LLVM +// Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +''', + style: const DynamicLibraryBindings( + wrapperName: 'Clang', + wrapperDocComment: 'Holds bindings to LibClang.', + ), + dartFile: root.resolve( + 'lib/src/header_parser/clang_bindings/clang_bindings.dart', + ), + ), + ).generate(); +} diff --git a/pkgs/ffigen/tool/libclang_config.yaml b/pkgs/ffigen/tool/libclang_config.yaml deleted file mode 100644 index bc8fad04b7..0000000000 --- a/pkgs/ffigen/tool/libclang_config.yaml +++ /dev/null @@ -1,147 +0,0 @@ -# Copyright (c) 2020, 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. - -# Config file for generating the libclang bindings used by this package. - -# ===================== GENERATING BINDINGS ===================== -# cd to project's root, and run - -# dart run ffigen --config tool/libclang_config.yaml -# =============================================================== - -# yaml-language-server: $schema=../ffigen.schema.json - -name: Clang -description: Holds bindings to LibClang. -output: '../lib/src/header_parser/clang_bindings/clang_bindings.dart' -compiler-opts: - - '-Ithird_party/libclang/include' -headers: - entry-points: - - '../third_party/libclang/include/clang-c/Index.h' - include-directives: - - '**wrapper.c' - - '**Index.h' - - '**CXString.h' - -preamble: | - // Part of the LLVM Project, under the Apache License v2.0 with LLVM - // Exceptions. - // See https://llvm.org/LICENSE.txt for license information. - // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - -enums: - include: - - CXChildVisitResult - - CXCursorKind - - CXTypeKind - - CXDiagnosticDisplayOptions - - CXTranslationUnit_Flags - - CXEvalResultKind - - CXObjCPropertyAttrKind - - CXTypeNullabilityKind - - CXTypeLayoutError - as-int: - include: - - .* - -structs: - include: - - CXCursor - - CXType - - CXSourceLocation - - CXString - - CXTranslationUnitImpl - - CXUnsavedFile - - CXSourceRange - -functions: - include: - - clang_createIndex - - clang_disposeIndex - - clang_getNumDiagnostics - - clang_getDiagnostic - - clang_getDiagnosticSeverity - - clang_disposeDiagnostic - - clang_parseTranslationUnit - - clang_disposeTranslationUnit - - clang_EvalResult_getKind - - clang_EvalResult_getAsInt - - clang_EvalResult_getAsLongLong - - clang_EvalResult_getAsDouble - - clang_EvalResult_getAsStr - - clang_EvalResult_dispose - - clang_getCString - - clang_disposeString - - clang_getCursorKind - - clang_getCursorKindSpelling - - clang_getCursorType - - clang_getTypeSpelling - - clang_getTypeKindSpelling - - clang_getResultType - - clang_getTypedefName - - clang_getPointeeType - - clang_getCanonicalType - - clang_Type_getNamedType - - clang_Type_getAlignOf - - clang_getTypeDeclaration - - clang_getTypedefDeclUnderlyingType - - clang_getCursorSpelling - - clang_getTranslationUnitCursor - - clang_formatDiagnostic - - clang_visitChildren - - clang_Cursor_getNumArguments - - clang_Cursor_getArgument - - clang_getNumArgTypes - - clang_getArgType - - clang_isConstQualifiedType - - clang_isFunctionTypeVariadic - - clang_Cursor_getStorageClass - - clang_getCursorResultType - - clang_getCursorExtent - - clang_getEnumConstantDeclValue - - clang_getEnumDeclIntegerType - - clang_equalRanges - - clang_Cursor_getCommentRange - - clang_Cursor_getRawCommentText - - clang_Cursor_getBriefCommentText - - clang_getCursorLocation - - clang_getRangeStart - - clang_getRangeEnd - - clang_getFileLocation - - clang_getFileName - - clang_getNumElements - - clang_getArrayElementType - - clang_Cursor_isMacroFunctionLike - - clang_Cursor_isMacroBuiltin - - clang_Cursor_Evaluate - - clang_Cursor_isAnonymous - - clang_Cursor_isAnonymousRecordDecl - - clang_getCursorUSR - - clang_getFieldDeclBitWidth - - clang_Cursor_isFunctionInlined - - clang_getCursorDefinition - - clang_isCursorDefinition - - clang_CXXMethod_isConst - - clang_CXXMethod_isStatic - - clang_getCursorAvailability - - clang_getCursorPlatformAvailability - - clang_disposeCXPlatformAvailability - - clang_Cursor_isNull - - clang_Cursor_hasAttrs - - clang_Type_getObjCObjectBaseType - - clang_Cursor_getObjCPropertyAttributes - - clang_Cursor_getObjCPropertyGetterName - - clang_Cursor_getObjCPropertySetterName - - clang_Cursor_isObjCOptional - - clang_Type_getNullability - - clang_Type_getModifiedType - - clang_Location_isInSystemHeader - - clang_getClangVersion - - clang_Type_getNumObjCProtocolRefs - - clang_Type_getObjCProtocolDecl - -# time_t typedef varies between platforms, and we don't need it anyway. -typedefs: - exclude: - - .*time(64)?_t diff --git a/pkgs/hooks_runner/test_data/treeshaking_dylib_record_use/tool/ffigen.dart b/pkgs/hooks_runner/test_data/treeshaking_dylib_record_use/tool/ffigen.dart index 1d7b443338..4d4174583e 100644 --- a/pkgs/hooks_runner/test_data/treeshaking_dylib_record_use/tool/ffigen.dart +++ b/pkgs/hooks_runner/test_data/treeshaking_dylib_record_use/tool/ffigen.dart @@ -14,10 +14,7 @@ void main() { headers: Headers( entryPoints: [packageRoot.resolve('src/add.c')], ), - functions: Functions( - include: (_) => true, - recordUse: (_) => true, - ), + visitors: [const IncludeAllVisitor(), const RecordUseVisitor()], output: Output( preamble: ''' // Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file @@ -39,10 +36,7 @@ void main() { headers: Headers( entryPoints: [packageRoot.resolve('src/multiply.c')], ), - functions: Functions( - include: (_) => true, - recordUse: (_) => true, - ), + visitors: [const IncludeAllVisitor(), const RecordUseVisitor()], output: Output( preamble: ''' // Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file diff --git a/pkgs/jni/ffigen.yaml b/pkgs/jni/ffigen.yaml deleted file mode 100644 index 41c2e39be8..0000000000 --- a/pkgs/jni/ffigen.yaml +++ /dev/null @@ -1,165 +0,0 @@ -# Run with `dart run ffigen --config ffigen.yaml`. -name: JniBindings -description: | - Bindings for libdartjni.so which is part of jni plugin. - - It also transitively includes type definitions such as JNIEnv from third_party/jni.h; - - However, functions prefixed JNI_ are not usable because they are in a different shared library. - - Regenerate bindings with `dart run ffigen --config ffigen.yaml`. -output: 'lib/src/third_party/jni_bindings_generated.dart' -headers: - entry-points: - - 'src/dartjni.h' # Exports majority of JNI functions - - 'src/third_party/global_jni_env.h' # Exports GlobalJniEnv type - - 'src/jni_constants.h' - include-directives: - - 'src/dartjni.h' - - 'src/third_party/global_jni_env.h' - - 'third_party/jni.h' # jni.h from Android NDK - - 'src/jni_constants.h' -compiler-opts: - - '-Ithird_party/' -enums: - rename: - 'JniType': 'JniCallType' - 'jobjectRefType': 'JObjectRefType' -functions: - rename: - 'FindClass': 'JniFindClass' - 'GetJavaVM': 'JniGetJavaVM' - exclude: - # Exclude init functions supposed to be defined in loaded DLL, not JNI - - 'JNI_.*' - - 'GetJniContextPtr' - - 'setJniGetters' - - 'jni_log' - # Exclude functions with VarArgs, JNIgen will generate them based on the - # exact arguments needed. - - 'globalEnv_NewObject' - - 'globalEnv_Call(Static|Nonvirtual|)[A-Z][a-z]+Method' - # Inline functions - # keep-sorted start - - 'acquire_lock' - - 'attach_thread' - - 'check_exception' - - 'destroy_cond' - - 'destroy_lock' - - 'init_cond' - - 'init_lock' - - 'load_class' - - 'load_class_global_ref' - - 'load_class_local_ref' - - 'load_class_platform' - - 'load_env' - - 'load_field' - - 'load_method' - - 'load_static_field' - - 'load_static_method' - - 'release_lock' - - 'signal_cond' - - 'thread_id' - - 'to_global_ref' - - 'to_global_ref_result' - - 'wait_for' - # keep-sorted end -structs: - exclude: - - 'JniContext' - - 'JniLocks' - - 'JNIEnv' - - '_JNIEnv' - - 'JNIInvokeInterface' - - '__va_list_tag' - - 'CallbackResult' - rename: - ## opaque struct definitions, base types of jfieldID and jmethodID - '_Dart_FinalizableHandle': 'Dart_FinalizableHandle_' - '_jfieldID': 'jfieldID_' - '_jmethodID': - 'jmethodID_' - #'JNI(.*)': 'Jni$1' -unions: - rename: - 'jvalue': 'JValue' -globals: - exclude: - - 'jni' - - 'jniEnv' - - 'context_getter' - - 'env_getter' -typedefs: - exclude: - - 'va_list' - - '__builtin_va_list' - rename: - 'JNI(.*)': 'Jni$1' - # Primitives - 'jbyte': 'JByteMarker' - 'jboolean': 'JBooleanMarker' - 'jchar': 'JCharMarker' - 'jshort': 'JShortMarker' - 'jint': 'JIntMarker' - 'jlong': 'JLongMarker' - 'jfloat': 'JFloatMarker' - 'jdouble': 'JDoubleMarker' - 'jsize': 'JSizeMarker' - - 'jclass': 'JClassPtr' - 'jobject': 'JObjectPtr' - 'jmethodID': 'JMethodIDPtr' - 'jfieldID': 'JFieldIDPtr' - 'jthrowable': 'JThrowablePtr' - 'jstring': 'JStringPtr' - 'jarray': 'JArrayPtr' - 'jobjectArray': 'JObjectArrayPtr' - 'jbooleanArray': 'JBooleanArrayPtr' - 'jbyteArray': 'JByteArrayPtr' - 'jcharArray': 'JCharArrayPtr' - 'jshortArray': 'JShortArrayPtr' - 'jintArray': 'JIntArrayPtr' - 'jlongArray': 'JLongArrayPtr' - 'jfloatArray': 'JFloatArrayPtr' - 'jdoubleArray': 'JDoubleArrayPtr' - 'jweak': 'JWeakPtr' - 'jvalue': 'JValue' -preamble: | - // Autogenerated file. Do not edit. - // Generated from an annotated version of jni.h provided in Android NDK. - // (NDK Version 23.1.7779620) - // The license for original file is provided below: - - /* - * Copyright (C) 2006 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - /* - * JNI specification, as defined by Sun: - * http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/jniTOC.html - * - * Everything here is expected to be VM-neutral. - */ - - // ignore_for_file: always_specify_types - // ignore_for_file: camel_case_types - // ignore_for_file: non_constant_identifier_names - // ignore_for_file: constant_identifier_names - // ignore_for_file: unused_field - // ignore_for_file: unused_element - // coverage:ignore-file -comments: - style: any - length: full diff --git a/pkgs/jni/lib/src/third_party/global_env_extensions.dart b/pkgs/jni/lib/src/third_party/global_env_extensions.dart index 8080191d5b..0edfa26a8a 100644 --- a/pkgs/jni/lib/src/third_party/global_env_extensions.dart +++ b/pkgs/jni/lib/src/third_party/global_env_extensions.dart @@ -45,17 +45,14 @@ class GlobalJniEnv { late final _GetVersion = ptr.ref.GetVersion.asFunction(isLeaf: true); - DartJIntMarker GetVersion() => _GetVersion().integer; + Dartjint GetVersion() => _GetVersion().integer; late final _DefineClass = ptr.ref.DefineClass.asFunction< - JniClassLookupResult Function( - ffi.Pointer name, - JObjectPtr loader, - ffi.Pointer buf, - DartJIntMarker bufLen)>(); + JniClassLookupResult Function(ffi.Pointer name, + JObjectPtr loader, ffi.Pointer buf, Dartjint bufLen)>(); JClassPtr DefineClass(ffi.Pointer name, JObjectPtr loader, - ffi.Pointer buf, DartJIntMarker bufLen) => + ffi.Pointer buf, Dartjint bufLen) => _DefineClass(name, loader, buf, bufLen).value; late final _FindClass = ptr.ref.FindClass @@ -78,10 +75,10 @@ class GlobalJniEnv { late final _ToReflectedMethod = ptr.ref.ToReflectedMethod.asFunction< JniResult Function( - JClassPtr cls, JMethodIDPtr methodId, DartJBooleanMarker isStatic)>(); + JClassPtr cls, JMethodIDPtr methodId, Dartjboolean isStatic)>(); JObjectPtr ToReflectedMethod( - JClassPtr cls, JMethodIDPtr methodId, DartJBooleanMarker isStatic) => + JClassPtr cls, JMethodIDPtr methodId, Dartjboolean isStatic) => _ToReflectedMethod(cls, methodId, isStatic).objectPointer; late final _GetSuperclass = ptr.ref.GetSuperclass @@ -98,21 +95,21 @@ class GlobalJniEnv { late final _ToReflectedField = ptr.ref.ToReflectedField.asFunction< JniResult Function( - JClassPtr cls, JFieldIDPtr fieldID, DartJBooleanMarker isStatic)>(); + JClassPtr cls, JFieldIDPtr fieldID, Dartjboolean isStatic)>(); JObjectPtr ToReflectedField( - JClassPtr cls, JFieldIDPtr fieldID, DartJBooleanMarker isStatic) => + JClassPtr cls, JFieldIDPtr fieldID, Dartjboolean isStatic) => _ToReflectedField(cls, fieldID, isStatic).objectPointer; late final _Throw = ptr.ref.Throw.asFunction(); - DartJIntMarker Throw(JThrowablePtr obj) => _Throw(obj).integer; + Dartjint Throw(JThrowablePtr obj) => _Throw(obj).integer; late final _ThrowNew = ptr.ref.ThrowNew.asFunction< JniResult Function(JClassPtr clazz, ffi.Pointer message)>(); - DartJIntMarker ThrowNew(JClassPtr clazz, ffi.Pointer message) => + Dartjint ThrowNew(JClassPtr clazz, ffi.Pointer message) => _ThrowNew(clazz, message).integer; late final _ExceptionOccurred = @@ -136,9 +133,9 @@ class GlobalJniEnv { void FatalError(ffi.Pointer msg) => _FatalError(msg).check(); late final _PushLocalFrame = ptr.ref.PushLocalFrame - .asFunction(); + .asFunction(); - DartJIntMarker PushLocalFrame(DartJIntMarker capacity) => + Dartjint PushLocalFrame(Dartjint capacity) => _PushLocalFrame(capacity).integer; late final _PopLocalFrame = @@ -176,9 +173,9 @@ class GlobalJniEnv { JObjectPtr NewLocalRef(JObjectPtr obj) => _NewLocalRef(obj).objectPointer; late final _EnsureLocalCapacity = ptr.ref.EnsureLocalCapacity - .asFunction(); + .asFunction(); - DartJIntMarker EnsureLocalCapacity(DartJIntMarker capacity) => + Dartjint EnsureLocalCapacity(Dartjint capacity) => _EnsureLocalCapacity(capacity).integer; late final _AllocObject = @@ -250,98 +247,98 @@ class GlobalJniEnv { late final _CallByteMethod = ptr.ref.CallByteMethod .asFunction(); - DartJByteMarker CallByteMethod(JObjectPtr obj, JMethodIDPtr methodID) => + Dartjbyte CallByteMethod(JObjectPtr obj, JMethodIDPtr methodID) => _CallByteMethod(obj, methodID).byte; late final _CallByteMethodA = ptr.ref.CallByteMethodA.asFunction< JniResult Function( JObjectPtr obj, JMethodIDPtr methodID, ffi.Pointer args)>(); - DartJByteMarker CallByteMethodA( + Dartjbyte CallByteMethodA( JObjectPtr obj, JMethodIDPtr methodID, ffi.Pointer args) => _CallByteMethodA(obj, methodID, args).byte; late final _CallCharMethod = ptr.ref.CallCharMethod .asFunction(); - DartJCharMarker CallCharMethod(JObjectPtr obj, JMethodIDPtr methodID) => + Dartjchar CallCharMethod(JObjectPtr obj, JMethodIDPtr methodID) => _CallCharMethod(obj, methodID).char; late final _CallCharMethodA = ptr.ref.CallCharMethodA.asFunction< JniResult Function( JObjectPtr obj, JMethodIDPtr methodID, ffi.Pointer args)>(); - DartJCharMarker CallCharMethodA( + Dartjchar CallCharMethodA( JObjectPtr obj, JMethodIDPtr methodID, ffi.Pointer args) => _CallCharMethodA(obj, methodID, args).char; late final _CallShortMethod = ptr.ref.CallShortMethod .asFunction(); - DartJShortMarker CallShortMethod(JObjectPtr obj, JMethodIDPtr methodID) => + Dartjshort CallShortMethod(JObjectPtr obj, JMethodIDPtr methodID) => _CallShortMethod(obj, methodID).short; late final _CallShortMethodA = ptr.ref.CallShortMethodA.asFunction< JniResult Function( JObjectPtr obj, JMethodIDPtr methodID, ffi.Pointer args)>(); - DartJShortMarker CallShortMethodA( + Dartjshort CallShortMethodA( JObjectPtr obj, JMethodIDPtr methodID, ffi.Pointer args) => _CallShortMethodA(obj, methodID, args).short; late final _CallIntMethod = ptr.ref.CallIntMethod .asFunction(); - DartJIntMarker CallIntMethod(JObjectPtr obj, JMethodIDPtr methodID) => + Dartjint CallIntMethod(JObjectPtr obj, JMethodIDPtr methodID) => _CallIntMethod(obj, methodID).integer; late final _CallIntMethodA = ptr.ref.CallIntMethodA.asFunction< JniResult Function( JObjectPtr obj, JMethodIDPtr methodID, ffi.Pointer args)>(); - DartJIntMarker CallIntMethodA( + Dartjint CallIntMethodA( JObjectPtr obj, JMethodIDPtr methodID, ffi.Pointer args) => _CallIntMethodA(obj, methodID, args).integer; late final _CallLongMethod = ptr.ref.CallLongMethod .asFunction(); - DartJLongMarker CallLongMethod(JObjectPtr obj, JMethodIDPtr methodID) => + Dartjlong CallLongMethod(JObjectPtr obj, JMethodIDPtr methodID) => _CallLongMethod(obj, methodID).long; late final _CallLongMethodA = ptr.ref.CallLongMethodA.asFunction< JniResult Function( JObjectPtr obj, JMethodIDPtr methodID, ffi.Pointer args)>(); - DartJLongMarker CallLongMethodA( + Dartjlong CallLongMethodA( JObjectPtr obj, JMethodIDPtr methodID, ffi.Pointer args) => _CallLongMethodA(obj, methodID, args).long; late final _CallFloatMethod = ptr.ref.CallFloatMethod .asFunction(); - DartJFloatMarker CallFloatMethod(JObjectPtr obj, JMethodIDPtr methodID) => + Dartjfloat CallFloatMethod(JObjectPtr obj, JMethodIDPtr methodID) => _CallFloatMethod(obj, methodID).float; late final _CallFloatMethodA = ptr.ref.CallFloatMethodA.asFunction< JniResult Function( JObjectPtr obj, JMethodIDPtr methodID, ffi.Pointer args)>(); - DartJFloatMarker CallFloatMethodA( + Dartjfloat CallFloatMethodA( JObjectPtr obj, JMethodIDPtr methodID, ffi.Pointer args) => _CallFloatMethodA(obj, methodID, args).float; late final _CallDoubleMethod = ptr.ref.CallDoubleMethod .asFunction(); - DartJDoubleMarker CallDoubleMethod(JObjectPtr obj, JMethodIDPtr methodID) => + Dartjdouble CallDoubleMethod(JObjectPtr obj, JMethodIDPtr methodID) => _CallDoubleMethod(obj, methodID).doubleFloat; late final _CallDoubleMethodA = ptr.ref.CallDoubleMethodA.asFunction< JniResult Function( JObjectPtr obj, JMethodIDPtr methodID, ffi.Pointer args)>(); - DartJDoubleMarker CallDoubleMethodA( + Dartjdouble CallDoubleMethodA( JObjectPtr obj, JMethodIDPtr methodID, ffi.Pointer args) => _CallDoubleMethodA(obj, methodID, args).doubleFloat; @@ -400,7 +397,7 @@ class GlobalJniEnv { JniResult Function( JObjectPtr obj, JClassPtr clazz, JMethodIDPtr methodID)>(); - DartJByteMarker CallNonvirtualByteMethod( + Dartjbyte CallNonvirtualByteMethod( JObjectPtr obj, JClassPtr clazz, JMethodIDPtr methodID) => _CallNonvirtualByteMethod(obj, clazz, methodID).byte; @@ -409,7 +406,7 @@ class GlobalJniEnv { JniResult Function(JObjectPtr obj, JClassPtr clazz, JMethodIDPtr methodID, ffi.Pointer args)>(); - DartJByteMarker CallNonvirtualByteMethodA(JObjectPtr obj, JClassPtr clazz, + Dartjbyte CallNonvirtualByteMethodA(JObjectPtr obj, JClassPtr clazz, JMethodIDPtr methodID, ffi.Pointer args) => _CallNonvirtualByteMethodA(obj, clazz, methodID, args).byte; @@ -418,7 +415,7 @@ class GlobalJniEnv { JniResult Function( JObjectPtr obj, JClassPtr clazz, JMethodIDPtr methodID)>(); - DartJCharMarker CallNonvirtualCharMethod( + Dartjchar CallNonvirtualCharMethod( JObjectPtr obj, JClassPtr clazz, JMethodIDPtr methodID) => _CallNonvirtualCharMethod(obj, clazz, methodID).char; @@ -427,7 +424,7 @@ class GlobalJniEnv { JniResult Function(JObjectPtr obj, JClassPtr clazz, JMethodIDPtr methodID, ffi.Pointer args)>(); - DartJCharMarker CallNonvirtualCharMethodA(JObjectPtr obj, JClassPtr clazz, + Dartjchar CallNonvirtualCharMethodA(JObjectPtr obj, JClassPtr clazz, JMethodIDPtr methodID, ffi.Pointer args) => _CallNonvirtualCharMethodA(obj, clazz, methodID, args).char; @@ -436,7 +433,7 @@ class GlobalJniEnv { JniResult Function( JObjectPtr obj, JClassPtr clazz, JMethodIDPtr methodID)>(); - DartJShortMarker CallNonvirtualShortMethod( + Dartjshort CallNonvirtualShortMethod( JObjectPtr obj, JClassPtr clazz, JMethodIDPtr methodID) => _CallNonvirtualShortMethod(obj, clazz, methodID).short; @@ -445,7 +442,7 @@ class GlobalJniEnv { JniResult Function(JObjectPtr obj, JClassPtr clazz, JMethodIDPtr methodID, ffi.Pointer args)>(); - DartJShortMarker CallNonvirtualShortMethodA(JObjectPtr obj, JClassPtr clazz, + Dartjshort CallNonvirtualShortMethodA(JObjectPtr obj, JClassPtr clazz, JMethodIDPtr methodID, ffi.Pointer args) => _CallNonvirtualShortMethodA(obj, clazz, methodID, args).short; @@ -454,7 +451,7 @@ class GlobalJniEnv { JniResult Function( JObjectPtr obj, JClassPtr clazz, JMethodIDPtr methodID)>(); - DartJIntMarker CallNonvirtualIntMethod( + Dartjint CallNonvirtualIntMethod( JObjectPtr obj, JClassPtr clazz, JMethodIDPtr methodID) => _CallNonvirtualIntMethod(obj, clazz, methodID).integer; @@ -463,7 +460,7 @@ class GlobalJniEnv { JniResult Function(JObjectPtr obj, JClassPtr clazz, JMethodIDPtr methodID, ffi.Pointer args)>(); - DartJIntMarker CallNonvirtualIntMethodA(JObjectPtr obj, JClassPtr clazz, + Dartjint CallNonvirtualIntMethodA(JObjectPtr obj, JClassPtr clazz, JMethodIDPtr methodID, ffi.Pointer args) => _CallNonvirtualIntMethodA(obj, clazz, methodID, args).integer; @@ -472,7 +469,7 @@ class GlobalJniEnv { JniResult Function( JObjectPtr obj, JClassPtr clazz, JMethodIDPtr methodID)>(); - DartJLongMarker CallNonvirtualLongMethod( + Dartjlong CallNonvirtualLongMethod( JObjectPtr obj, JClassPtr clazz, JMethodIDPtr methodID) => _CallNonvirtualLongMethod(obj, clazz, methodID).long; @@ -481,7 +478,7 @@ class GlobalJniEnv { JniResult Function(JObjectPtr obj, JClassPtr clazz, JMethodIDPtr methodID, ffi.Pointer args)>(); - DartJLongMarker CallNonvirtualLongMethodA(JObjectPtr obj, JClassPtr clazz, + Dartjlong CallNonvirtualLongMethodA(JObjectPtr obj, JClassPtr clazz, JMethodIDPtr methodID, ffi.Pointer args) => _CallNonvirtualLongMethodA(obj, clazz, methodID, args).long; @@ -490,7 +487,7 @@ class GlobalJniEnv { JniResult Function( JObjectPtr obj, JClassPtr clazz, JMethodIDPtr methodID)>(); - DartJFloatMarker CallNonvirtualFloatMethod( + Dartjfloat CallNonvirtualFloatMethod( JObjectPtr obj, JClassPtr clazz, JMethodIDPtr methodID) => _CallNonvirtualFloatMethod(obj, clazz, methodID).float; @@ -499,7 +496,7 @@ class GlobalJniEnv { JniResult Function(JObjectPtr obj, JClassPtr clazz, JMethodIDPtr methodID, ffi.Pointer args)>(); - DartJFloatMarker CallNonvirtualFloatMethodA(JObjectPtr obj, JClassPtr clazz, + Dartjfloat CallNonvirtualFloatMethodA(JObjectPtr obj, JClassPtr clazz, JMethodIDPtr methodID, ffi.Pointer args) => _CallNonvirtualFloatMethodA(obj, clazz, methodID, args).float; @@ -508,7 +505,7 @@ class GlobalJniEnv { JniResult Function( JObjectPtr obj, JClassPtr clazz, JMethodIDPtr methodID)>(); - DartJDoubleMarker CallNonvirtualDoubleMethod( + Dartjdouble CallNonvirtualDoubleMethod( JObjectPtr obj, JClassPtr clazz, JMethodIDPtr methodID) => _CallNonvirtualDoubleMethod(obj, clazz, methodID).doubleFloat; @@ -517,7 +514,7 @@ class GlobalJniEnv { JniResult Function(JObjectPtr obj, JClassPtr clazz, JMethodIDPtr methodID, ffi.Pointer args)>(); - DartJDoubleMarker CallNonvirtualDoubleMethodA(JObjectPtr obj, JClassPtr clazz, + Dartjdouble CallNonvirtualDoubleMethodA(JObjectPtr obj, JClassPtr clazz, JMethodIDPtr methodID, ffi.Pointer args) => _CallNonvirtualDoubleMethodA(obj, clazz, methodID, args).doubleFloat; @@ -565,49 +562,49 @@ class GlobalJniEnv { .asFunction( isLeaf: true); - DartJByteMarker GetByteField(JObjectPtr obj, JFieldIDPtr fieldID) => + Dartjbyte GetByteField(JObjectPtr obj, JFieldIDPtr fieldID) => _GetByteField(obj, fieldID).byte; late final _GetCharField = ptr.ref.GetCharField .asFunction( isLeaf: true); - DartJCharMarker GetCharField(JObjectPtr obj, JFieldIDPtr fieldID) => + Dartjchar GetCharField(JObjectPtr obj, JFieldIDPtr fieldID) => _GetCharField(obj, fieldID).char; late final _GetShortField = ptr.ref.GetShortField .asFunction( isLeaf: true); - DartJShortMarker GetShortField(JObjectPtr obj, JFieldIDPtr fieldID) => + Dartjshort GetShortField(JObjectPtr obj, JFieldIDPtr fieldID) => _GetShortField(obj, fieldID).short; late final _GetIntField = ptr.ref.GetIntField .asFunction( isLeaf: true); - DartJIntMarker GetIntField(JObjectPtr obj, JFieldIDPtr fieldID) => + Dartjint GetIntField(JObjectPtr obj, JFieldIDPtr fieldID) => _GetIntField(obj, fieldID).integer; late final _GetLongField = ptr.ref.GetLongField .asFunction( isLeaf: true); - DartJLongMarker GetLongField(JObjectPtr obj, JFieldIDPtr fieldID) => + Dartjlong GetLongField(JObjectPtr obj, JFieldIDPtr fieldID) => _GetLongField(obj, fieldID).long; late final _GetFloatField = ptr.ref.GetFloatField .asFunction( isLeaf: true); - DartJFloatMarker GetFloatField(JObjectPtr obj, JFieldIDPtr fieldID) => + Dartjfloat GetFloatField(JObjectPtr obj, JFieldIDPtr fieldID) => _GetFloatField(obj, fieldID).float; late final _GetDoubleField = ptr.ref.GetDoubleField .asFunction( isLeaf: true); - DartJDoubleMarker GetDoubleField(JObjectPtr obj, JFieldIDPtr fieldID) => + Dartjdouble GetDoubleField(JObjectPtr obj, JFieldIDPtr fieldID) => _GetDoubleField(obj, fieldID).doubleFloat; late final _SetObjectField = ptr.ref.SetObjectField.asFunction< @@ -618,63 +615,59 @@ class GlobalJniEnv { _SetObjectField(obj, fieldID, val).check(); late final _SetBooleanField = ptr.ref.SetBooleanField.asFunction< - JThrowablePtr Function(JObjectPtr obj, JFieldIDPtr fieldID, - DartJBooleanMarker val)>(isLeaf: true); + JThrowablePtr Function( + JObjectPtr obj, JFieldIDPtr fieldID, Dartjboolean val)>(isLeaf: true); - void SetBooleanField( - JObjectPtr obj, JFieldIDPtr fieldID, DartJBooleanMarker val) => + void SetBooleanField(JObjectPtr obj, JFieldIDPtr fieldID, Dartjboolean val) => _SetBooleanField(obj, fieldID, val).check(); late final _SetByteField = ptr.ref.SetByteField.asFunction< - JThrowablePtr Function(JObjectPtr obj, JFieldIDPtr fieldID, - DartJByteMarker val)>(isLeaf: true); + JThrowablePtr Function( + JObjectPtr obj, JFieldIDPtr fieldID, Dartjbyte val)>(isLeaf: true); - void SetByteField(JObjectPtr obj, JFieldIDPtr fieldID, DartJByteMarker val) => + void SetByteField(JObjectPtr obj, JFieldIDPtr fieldID, Dartjbyte val) => _SetByteField(obj, fieldID, val).check(); late final _SetCharField = ptr.ref.SetCharField.asFunction< - JThrowablePtr Function(JObjectPtr obj, JFieldIDPtr fieldID, - DartJCharMarker val)>(isLeaf: true); + JThrowablePtr Function( + JObjectPtr obj, JFieldIDPtr fieldID, Dartjchar val)>(isLeaf: true); - void SetCharField(JObjectPtr obj, JFieldIDPtr fieldID, DartJCharMarker val) => + void SetCharField(JObjectPtr obj, JFieldIDPtr fieldID, Dartjchar val) => _SetCharField(obj, fieldID, val).check(); late final _SetShortField = ptr.ref.SetShortField.asFunction< - JThrowablePtr Function(JObjectPtr obj, JFieldIDPtr fieldID, - DartJShortMarker val)>(isLeaf: true); + JThrowablePtr Function( + JObjectPtr obj, JFieldIDPtr fieldID, Dartjshort val)>(isLeaf: true); - void SetShortField( - JObjectPtr obj, JFieldIDPtr fieldID, DartJShortMarker val) => + void SetShortField(JObjectPtr obj, JFieldIDPtr fieldID, Dartjshort val) => _SetShortField(obj, fieldID, val).check(); late final _SetIntField = ptr.ref.SetIntField.asFunction< - JThrowablePtr Function(JObjectPtr obj, JFieldIDPtr fieldID, - DartJIntMarker val)>(isLeaf: true); + JThrowablePtr Function( + JObjectPtr obj, JFieldIDPtr fieldID, Dartjint val)>(isLeaf: true); - void SetIntField(JObjectPtr obj, JFieldIDPtr fieldID, DartJIntMarker val) => + void SetIntField(JObjectPtr obj, JFieldIDPtr fieldID, Dartjint val) => _SetIntField(obj, fieldID, val).check(); late final _SetLongField = ptr.ref.SetLongField.asFunction< - JThrowablePtr Function(JObjectPtr obj, JFieldIDPtr fieldID, - DartJLongMarker val)>(isLeaf: true); + JThrowablePtr Function( + JObjectPtr obj, JFieldIDPtr fieldID, Dartjlong val)>(isLeaf: true); - void SetLongField(JObjectPtr obj, JFieldIDPtr fieldID, DartJLongMarker val) => + void SetLongField(JObjectPtr obj, JFieldIDPtr fieldID, Dartjlong val) => _SetLongField(obj, fieldID, val).check(); late final _SetFloatField = ptr.ref.SetFloatField.asFunction< - JThrowablePtr Function(JObjectPtr obj, JFieldIDPtr fieldID, - DartJFloatMarker val)>(isLeaf: true); + JThrowablePtr Function( + JObjectPtr obj, JFieldIDPtr fieldID, Dartjfloat val)>(isLeaf: true); - void SetFloatField( - JObjectPtr obj, JFieldIDPtr fieldID, DartJFloatMarker val) => + void SetFloatField(JObjectPtr obj, JFieldIDPtr fieldID, Dartjfloat val) => _SetFloatField(obj, fieldID, val).check(); late final _SetDoubleField = ptr.ref.SetDoubleField.asFunction< - JThrowablePtr Function(JObjectPtr obj, JFieldIDPtr fieldID, - DartJDoubleMarker val)>(isLeaf: true); + JThrowablePtr Function( + JObjectPtr obj, JFieldIDPtr fieldID, Dartjdouble val)>(isLeaf: true); - void SetDoubleField( - JObjectPtr obj, JFieldIDPtr fieldID, DartJDoubleMarker val) => + void SetDoubleField(JObjectPtr obj, JFieldIDPtr fieldID, Dartjdouble val) => _SetDoubleField(obj, fieldID, val).check(); late final _GetStaticMethodID = ptr.ref.GetStaticMethodID.asFunction< @@ -718,38 +711,35 @@ class GlobalJniEnv { late final _CallStaticByteMethod = ptr.ref.CallStaticByteMethod .asFunction(); - DartJByteMarker CallStaticByteMethod( - JClassPtr clazz, JMethodIDPtr methodID) => + Dartjbyte CallStaticByteMethod(JClassPtr clazz, JMethodIDPtr methodID) => _CallStaticByteMethod(clazz, methodID).byte; late final _CallStaticByteMethodA = ptr.ref.CallStaticByteMethodA.asFunction< JniResult Function( JClassPtr clazz, JMethodIDPtr methodID, ffi.Pointer args)>(); - DartJByteMarker CallStaticByteMethodA( + Dartjbyte CallStaticByteMethodA( JClassPtr clazz, JMethodIDPtr methodID, ffi.Pointer args) => _CallStaticByteMethodA(clazz, methodID, args).byte; late final _CallStaticCharMethod = ptr.ref.CallStaticCharMethod .asFunction(); - DartJCharMarker CallStaticCharMethod( - JClassPtr clazz, JMethodIDPtr methodID) => + Dartjchar CallStaticCharMethod(JClassPtr clazz, JMethodIDPtr methodID) => _CallStaticCharMethod(clazz, methodID).char; late final _CallStaticCharMethodA = ptr.ref.CallStaticCharMethodA.asFunction< JniResult Function( JClassPtr clazz, JMethodIDPtr methodID, ffi.Pointer args)>(); - DartJCharMarker CallStaticCharMethodA( + Dartjchar CallStaticCharMethodA( JClassPtr clazz, JMethodIDPtr methodID, ffi.Pointer args) => _CallStaticCharMethodA(clazz, methodID, args).char; late final _CallStaticShortMethod = ptr.ref.CallStaticShortMethod .asFunction(); - DartJShortMarker CallStaticShortMethod( - JClassPtr clazz, JMethodIDPtr methodID) => + Dartjshort CallStaticShortMethod(JClassPtr clazz, JMethodIDPtr methodID) => _CallStaticShortMethod(clazz, methodID).short; late final _CallStaticShortMethodA = ptr.ref.CallStaticShortMethodA @@ -757,44 +747,42 @@ class GlobalJniEnv { JniResult Function(JClassPtr clazz, JMethodIDPtr methodID, ffi.Pointer args)>(); - DartJShortMarker CallStaticShortMethodA( + Dartjshort CallStaticShortMethodA( JClassPtr clazz, JMethodIDPtr methodID, ffi.Pointer args) => _CallStaticShortMethodA(clazz, methodID, args).short; late final _CallStaticIntMethod = ptr.ref.CallStaticIntMethod .asFunction(); - DartJIntMarker CallStaticIntMethod(JClassPtr clazz, JMethodIDPtr methodID) => + Dartjint CallStaticIntMethod(JClassPtr clazz, JMethodIDPtr methodID) => _CallStaticIntMethod(clazz, methodID).integer; late final _CallStaticIntMethodA = ptr.ref.CallStaticIntMethodA.asFunction< JniResult Function( JClassPtr clazz, JMethodIDPtr methodID, ffi.Pointer args)>(); - DartJIntMarker CallStaticIntMethodA( + Dartjint CallStaticIntMethodA( JClassPtr clazz, JMethodIDPtr methodID, ffi.Pointer args) => _CallStaticIntMethodA(clazz, methodID, args).integer; late final _CallStaticLongMethod = ptr.ref.CallStaticLongMethod .asFunction(); - DartJLongMarker CallStaticLongMethod( - JClassPtr clazz, JMethodIDPtr methodID) => + Dartjlong CallStaticLongMethod(JClassPtr clazz, JMethodIDPtr methodID) => _CallStaticLongMethod(clazz, methodID).long; late final _CallStaticLongMethodA = ptr.ref.CallStaticLongMethodA.asFunction< JniResult Function( JClassPtr clazz, JMethodIDPtr methodID, ffi.Pointer args)>(); - DartJLongMarker CallStaticLongMethodA( + Dartjlong CallStaticLongMethodA( JClassPtr clazz, JMethodIDPtr methodID, ffi.Pointer args) => _CallStaticLongMethodA(clazz, methodID, args).long; late final _CallStaticFloatMethod = ptr.ref.CallStaticFloatMethod .asFunction(); - DartJFloatMarker CallStaticFloatMethod( - JClassPtr clazz, JMethodIDPtr methodID) => + Dartjfloat CallStaticFloatMethod(JClassPtr clazz, JMethodIDPtr methodID) => _CallStaticFloatMethod(clazz, methodID).float; late final _CallStaticFloatMethodA = ptr.ref.CallStaticFloatMethodA @@ -802,15 +790,14 @@ class GlobalJniEnv { JniResult Function(JClassPtr clazz, JMethodIDPtr methodID, ffi.Pointer args)>(); - DartJFloatMarker CallStaticFloatMethodA( + Dartjfloat CallStaticFloatMethodA( JClassPtr clazz, JMethodIDPtr methodID, ffi.Pointer args) => _CallStaticFloatMethodA(clazz, methodID, args).float; late final _CallStaticDoubleMethod = ptr.ref.CallStaticDoubleMethod .asFunction(); - DartJDoubleMarker CallStaticDoubleMethod( - JClassPtr clazz, JMethodIDPtr methodID) => + Dartjdouble CallStaticDoubleMethod(JClassPtr clazz, JMethodIDPtr methodID) => _CallStaticDoubleMethod(clazz, methodID).doubleFloat; late final _CallStaticDoubleMethodA = ptr.ref.CallStaticDoubleMethodA @@ -818,7 +805,7 @@ class GlobalJniEnv { JniResult Function(JClassPtr clazz, JMethodIDPtr methodID, ffi.Pointer args)>(); - DartJDoubleMarker CallStaticDoubleMethodA( + Dartjdouble CallStaticDoubleMethodA( JClassPtr clazz, JMethodIDPtr methodID, ffi.Pointer args) => _CallStaticDoubleMethodA(clazz, methodID, args).doubleFloat; @@ -862,50 +849,49 @@ class GlobalJniEnv { .asFunction( isLeaf: true); - DartJByteMarker GetStaticByteField(JClassPtr clazz, JFieldIDPtr fieldID) => + Dartjbyte GetStaticByteField(JClassPtr clazz, JFieldIDPtr fieldID) => _GetStaticByteField(clazz, fieldID).byte; late final _GetStaticCharField = ptr.ref.GetStaticCharField .asFunction( isLeaf: true); - DartJCharMarker GetStaticCharField(JClassPtr clazz, JFieldIDPtr fieldID) => + Dartjchar GetStaticCharField(JClassPtr clazz, JFieldIDPtr fieldID) => _GetStaticCharField(clazz, fieldID).char; late final _GetStaticShortField = ptr.ref.GetStaticShortField .asFunction( isLeaf: true); - DartJShortMarker GetStaticShortField(JClassPtr clazz, JFieldIDPtr fieldID) => + Dartjshort GetStaticShortField(JClassPtr clazz, JFieldIDPtr fieldID) => _GetStaticShortField(clazz, fieldID).short; late final _GetStaticIntField = ptr.ref.GetStaticIntField .asFunction( isLeaf: true); - DartJIntMarker GetStaticIntField(JClassPtr clazz, JFieldIDPtr fieldID) => + Dartjint GetStaticIntField(JClassPtr clazz, JFieldIDPtr fieldID) => _GetStaticIntField(clazz, fieldID).integer; late final _GetStaticLongField = ptr.ref.GetStaticLongField .asFunction( isLeaf: true); - DartJLongMarker GetStaticLongField(JClassPtr clazz, JFieldIDPtr fieldID) => + Dartjlong GetStaticLongField(JClassPtr clazz, JFieldIDPtr fieldID) => _GetStaticLongField(clazz, fieldID).long; late final _GetStaticFloatField = ptr.ref.GetStaticFloatField .asFunction( isLeaf: true); - DartJFloatMarker GetStaticFloatField(JClassPtr clazz, JFieldIDPtr fieldID) => + Dartjfloat GetStaticFloatField(JClassPtr clazz, JFieldIDPtr fieldID) => _GetStaticFloatField(clazz, fieldID).float; late final _GetStaticDoubleField = ptr.ref.GetStaticDoubleField .asFunction( isLeaf: true); - DartJDoubleMarker GetStaticDoubleField( - JClassPtr clazz, JFieldIDPtr fieldID) => + Dartjdouble GetStaticDoubleField(JClassPtr clazz, JFieldIDPtr fieldID) => _GetStaticDoubleField(clazz, fieldID).doubleFloat; late final _SetStaticObjectField = ptr.ref.SetStaticObjectField.asFunction< @@ -918,80 +904,78 @@ class GlobalJniEnv { late final _SetStaticBooleanField = ptr.ref.SetStaticBooleanField.asFunction< JThrowablePtr Function(JClassPtr clazz, JFieldIDPtr fieldID, - DartJBooleanMarker val)>(isLeaf: true); + Dartjboolean val)>(isLeaf: true); void SetStaticBooleanField( - JClassPtr clazz, JFieldIDPtr fieldID, DartJBooleanMarker val) => + JClassPtr clazz, JFieldIDPtr fieldID, Dartjboolean val) => _SetStaticBooleanField(clazz, fieldID, val).check(); late final _SetStaticByteField = ptr.ref.SetStaticByteField.asFunction< - JThrowablePtr Function(JClassPtr clazz, JFieldIDPtr fieldID, - DartJByteMarker val)>(isLeaf: true); + JThrowablePtr Function( + JClassPtr clazz, JFieldIDPtr fieldID, Dartjbyte val)>(isLeaf: true); void SetStaticByteField( - JClassPtr clazz, JFieldIDPtr fieldID, DartJByteMarker val) => + JClassPtr clazz, JFieldIDPtr fieldID, Dartjbyte val) => _SetStaticByteField(clazz, fieldID, val).check(); late final _SetStaticCharField = ptr.ref.SetStaticCharField.asFunction< - JThrowablePtr Function(JClassPtr clazz, JFieldIDPtr fieldID, - DartJCharMarker val)>(isLeaf: true); + JThrowablePtr Function( + JClassPtr clazz, JFieldIDPtr fieldID, Dartjchar val)>(isLeaf: true); void SetStaticCharField( - JClassPtr clazz, JFieldIDPtr fieldID, DartJCharMarker val) => + JClassPtr clazz, JFieldIDPtr fieldID, Dartjchar val) => _SetStaticCharField(clazz, fieldID, val).check(); late final _SetStaticShortField = ptr.ref.SetStaticShortField.asFunction< - JThrowablePtr Function(JClassPtr clazz, JFieldIDPtr fieldID, - DartJShortMarker val)>(isLeaf: true); + JThrowablePtr Function( + JClassPtr clazz, JFieldIDPtr fieldID, Dartjshort val)>(isLeaf: true); void SetStaticShortField( - JClassPtr clazz, JFieldIDPtr fieldID, DartJShortMarker val) => + JClassPtr clazz, JFieldIDPtr fieldID, Dartjshort val) => _SetStaticShortField(clazz, fieldID, val).check(); late final _SetStaticIntField = ptr.ref.SetStaticIntField.asFunction< - JThrowablePtr Function(JClassPtr clazz, JFieldIDPtr fieldID, - DartJIntMarker val)>(isLeaf: true); + JThrowablePtr Function( + JClassPtr clazz, JFieldIDPtr fieldID, Dartjint val)>(isLeaf: true); - void SetStaticIntField( - JClassPtr clazz, JFieldIDPtr fieldID, DartJIntMarker val) => + void SetStaticIntField(JClassPtr clazz, JFieldIDPtr fieldID, Dartjint val) => _SetStaticIntField(clazz, fieldID, val).check(); late final _SetStaticLongField = ptr.ref.SetStaticLongField.asFunction< - JThrowablePtr Function(JClassPtr clazz, JFieldIDPtr fieldID, - DartJLongMarker val)>(isLeaf: true); + JThrowablePtr Function( + JClassPtr clazz, JFieldIDPtr fieldID, Dartjlong val)>(isLeaf: true); void SetStaticLongField( - JClassPtr clazz, JFieldIDPtr fieldID, DartJLongMarker val) => + JClassPtr clazz, JFieldIDPtr fieldID, Dartjlong val) => _SetStaticLongField(clazz, fieldID, val).check(); late final _SetStaticFloatField = ptr.ref.SetStaticFloatField.asFunction< - JThrowablePtr Function(JClassPtr clazz, JFieldIDPtr fieldID, - DartJFloatMarker val)>(isLeaf: true); + JThrowablePtr Function( + JClassPtr clazz, JFieldIDPtr fieldID, Dartjfloat val)>(isLeaf: true); void SetStaticFloatField( - JClassPtr clazz, JFieldIDPtr fieldID, DartJFloatMarker val) => + JClassPtr clazz, JFieldIDPtr fieldID, Dartjfloat val) => _SetStaticFloatField(clazz, fieldID, val).check(); late final _SetStaticDoubleField = ptr.ref.SetStaticDoubleField.asFunction< - JThrowablePtr Function(JClassPtr clazz, JFieldIDPtr fieldID, - DartJDoubleMarker val)>(isLeaf: true); + JThrowablePtr Function( + JClassPtr clazz, JFieldIDPtr fieldID, Dartjdouble val)>(isLeaf: true); void SetStaticDoubleField( - JClassPtr clazz, JFieldIDPtr fieldID, DartJDoubleMarker val) => + JClassPtr clazz, JFieldIDPtr fieldID, Dartjdouble val) => _SetStaticDoubleField(clazz, fieldID, val).check(); late final _NewString = ptr.ref.NewString.asFunction< JniResult Function( - ffi.Pointer unicodeChars, DartJIntMarker len)>(); + ffi.Pointer unicodeChars, Dartjint len)>(); - JStringPtr NewString( - ffi.Pointer unicodeChars, DartJIntMarker len) => + JStringPtr NewString(ffi.Pointer unicodeChars, Dartjint len) => _NewString(unicodeChars, len).objectPointer; late final _GetStringLength = ptr.ref.GetStringLength .asFunction(isLeaf: true); - DartJIntMarker GetStringLength(JStringPtr string) => + Dartjint GetStringLength(JStringPtr string) => _GetStringLength(string).integer; late final _GetStringChars = ptr.ref.GetStringChars.asFunction< @@ -1018,7 +1002,7 @@ class GlobalJniEnv { late final _GetStringUTFLength = ptr.ref.GetStringUTFLength .asFunction(isLeaf: true); - DartJIntMarker GetStringUTFLength(JStringPtr string) => + Dartjint GetStringUTFLength(JStringPtr string) => _GetStringUTFLength(string).integer; late final _GetStringUTFChars = ptr.ref.GetStringUTFChars.asFunction< @@ -1038,79 +1022,77 @@ class GlobalJniEnv { late final _GetArrayLength = ptr.ref.GetArrayLength .asFunction(isLeaf: true); - DartJIntMarker GetArrayLength(JArrayPtr array) => - _GetArrayLength(array).integer; + Dartjint GetArrayLength(JArrayPtr array) => _GetArrayLength(array).integer; late final _NewObjectArray = ptr.ref.NewObjectArray.asFunction< - JniResult Function(DartJIntMarker length, JClassPtr elementClass, + JniResult Function(Dartjint length, JClassPtr elementClass, JObjectPtr initialElement)>(); - JObjectArrayPtr NewObjectArray(DartJIntMarker length, JClassPtr elementClass, - JObjectPtr initialElement) => + JObjectArrayPtr NewObjectArray( + Dartjint length, JClassPtr elementClass, JObjectPtr initialElement) => _NewObjectArray(length, elementClass, initialElement).objectPointer; - late final _GetObjectArrayElement = ptr.ref.GetObjectArrayElement.asFunction< - JniResult Function( - JObjectArrayPtr array, DartJIntMarker index)>(isLeaf: true); + late final _GetObjectArrayElement = ptr.ref.GetObjectArrayElement + .asFunction( + isLeaf: true); - JObjectPtr GetObjectArrayElement( - JObjectArrayPtr array, DartJIntMarker index) => + JObjectPtr GetObjectArrayElement(JObjectArrayPtr array, Dartjint index) => _GetObjectArrayElement(array, index).objectPointer; late final _SetObjectArrayElement = ptr.ref.SetObjectArrayElement.asFunction< - JThrowablePtr Function(JObjectArrayPtr array, DartJIntMarker index, - JObjectPtr val)>(isLeaf: true); + JThrowablePtr Function( + JObjectArrayPtr array, Dartjint index, JObjectPtr val)>(isLeaf: true); void SetObjectArrayElement( - JObjectArrayPtr array, DartJIntMarker index, JObjectPtr val) => + JObjectArrayPtr array, Dartjint index, JObjectPtr val) => _SetObjectArrayElement(array, index, val).check(); - late final _NewBooleanArray = ptr.ref.NewBooleanArray - .asFunction(); + late final _NewBooleanArray = + ptr.ref.NewBooleanArray.asFunction(); - JBooleanArrayPtr NewBooleanArray(DartJIntMarker length) => + JBooleanArrayPtr NewBooleanArray(Dartjint length) => _NewBooleanArray(length).objectPointer; - late final _NewByteArray = ptr.ref.NewByteArray - .asFunction(); + late final _NewByteArray = + ptr.ref.NewByteArray.asFunction(); - JByteArrayPtr NewByteArray(DartJIntMarker length) => + JByteArrayPtr NewByteArray(Dartjint length) => _NewByteArray(length).objectPointer; - late final _NewCharArray = ptr.ref.NewCharArray - .asFunction(); + late final _NewCharArray = + ptr.ref.NewCharArray.asFunction(); - JCharArrayPtr NewCharArray(DartJIntMarker length) => + JCharArrayPtr NewCharArray(Dartjint length) => _NewCharArray(length).objectPointer; - late final _NewShortArray = ptr.ref.NewShortArray - .asFunction(); + late final _NewShortArray = + ptr.ref.NewShortArray.asFunction(); - JShortArrayPtr NewShortArray(DartJIntMarker length) => + JShortArrayPtr NewShortArray(Dartjint length) => _NewShortArray(length).objectPointer; - late final _NewIntArray = ptr.ref.NewIntArray - .asFunction(); + late final _NewIntArray = + ptr.ref.NewIntArray.asFunction(); - JIntArrayPtr NewIntArray(DartJIntMarker length) => + JIntArrayPtr NewIntArray(Dartjint length) => _NewIntArray(length).objectPointer; - late final _NewLongArray = ptr.ref.NewLongArray - .asFunction(); + late final _NewLongArray = + ptr.ref.NewLongArray.asFunction(); - JLongArrayPtr NewLongArray(DartJIntMarker length) => + JLongArrayPtr NewLongArray(Dartjint length) => _NewLongArray(length).objectPointer; - late final _NewFloatArray = ptr.ref.NewFloatArray - .asFunction(); + late final _NewFloatArray = + ptr.ref.NewFloatArray.asFunction(); - JFloatArrayPtr NewFloatArray(DartJIntMarker length) => + JFloatArrayPtr NewFloatArray(Dartjint length) => _NewFloatArray(length).objectPointer; - late final _NewDoubleArray = ptr.ref.NewDoubleArray - .asFunction(); + late final _NewDoubleArray = + ptr.ref.NewDoubleArray.asFunction(); - JDoubleArrayPtr NewDoubleArray(DartJIntMarker length) => + JDoubleArrayPtr NewDoubleArray(Dartjint length) => _NewDoubleArray(length).objectPointer; late final _GetBooleanArrayElements = ptr.ref.GetBooleanArrayElements @@ -1182,248 +1164,248 @@ class GlobalJniEnv { late final _ReleaseBooleanArrayElements = ptr.ref.ReleaseBooleanArrayElements .asFunction< JThrowablePtr Function(JBooleanArrayPtr array, - ffi.Pointer elems, DartJIntMarker mode)>(); + ffi.Pointer elems, Dartjint mode)>(); void ReleaseBooleanArrayElements(JBooleanArrayPtr array, - ffi.Pointer elems, DartJIntMarker mode) => + ffi.Pointer elems, Dartjint mode) => _ReleaseBooleanArrayElements(array, elems, mode).check(); late final _ReleaseByteArrayElements = ptr.ref.ReleaseByteArrayElements .asFunction< JThrowablePtr Function(JByteArrayPtr array, - ffi.Pointer elems, DartJIntMarker mode)>(); + ffi.Pointer elems, Dartjint mode)>(); - void ReleaseByteArrayElements(JByteArrayPtr array, - ffi.Pointer elems, DartJIntMarker mode) => + void ReleaseByteArrayElements( + JByteArrayPtr array, ffi.Pointer elems, Dartjint mode) => _ReleaseByteArrayElements(array, elems, mode).check(); late final _ReleaseCharArrayElements = ptr.ref.ReleaseCharArrayElements .asFunction< JThrowablePtr Function(JCharArrayPtr array, - ffi.Pointer elems, DartJIntMarker mode)>(); + ffi.Pointer elems, Dartjint mode)>(); - void ReleaseCharArrayElements(JCharArrayPtr array, - ffi.Pointer elems, DartJIntMarker mode) => + void ReleaseCharArrayElements( + JCharArrayPtr array, ffi.Pointer elems, Dartjint mode) => _ReleaseCharArrayElements(array, elems, mode).check(); late final _ReleaseShortArrayElements = ptr.ref.ReleaseShortArrayElements .asFunction< JThrowablePtr Function(JShortArrayPtr array, - ffi.Pointer elems, DartJIntMarker mode)>(); + ffi.Pointer elems, Dartjint mode)>(); void ReleaseShortArrayElements(JShortArrayPtr array, - ffi.Pointer elems, DartJIntMarker mode) => + ffi.Pointer elems, Dartjint mode) => _ReleaseShortArrayElements(array, elems, mode).check(); late final _ReleaseIntArrayElements = ptr.ref.ReleaseIntArrayElements .asFunction< JThrowablePtr Function(JIntArrayPtr array, - ffi.Pointer elems, DartJIntMarker mode)>(); + ffi.Pointer elems, Dartjint mode)>(); - void ReleaseIntArrayElements(JIntArrayPtr array, - ffi.Pointer elems, DartJIntMarker mode) => + void ReleaseIntArrayElements( + JIntArrayPtr array, ffi.Pointer elems, Dartjint mode) => _ReleaseIntArrayElements(array, elems, mode).check(); late final _ReleaseLongArrayElements = ptr.ref.ReleaseLongArrayElements .asFunction< JThrowablePtr Function(JLongArrayPtr array, - ffi.Pointer elems, DartJIntMarker mode)>(); + ffi.Pointer elems, Dartjint mode)>(); - void ReleaseLongArrayElements(JLongArrayPtr array, - ffi.Pointer elems, DartJIntMarker mode) => + void ReleaseLongArrayElements( + JLongArrayPtr array, ffi.Pointer elems, Dartjint mode) => _ReleaseLongArrayElements(array, elems, mode).check(); late final _ReleaseFloatArrayElements = ptr.ref.ReleaseFloatArrayElements .asFunction< JThrowablePtr Function(JFloatArrayPtr array, - ffi.Pointer elems, DartJIntMarker mode)>(); + ffi.Pointer elems, Dartjint mode)>(); void ReleaseFloatArrayElements(JFloatArrayPtr array, - ffi.Pointer elems, DartJIntMarker mode) => + ffi.Pointer elems, Dartjint mode) => _ReleaseFloatArrayElements(array, elems, mode).check(); late final _ReleaseDoubleArrayElements = ptr.ref.ReleaseDoubleArrayElements .asFunction< JThrowablePtr Function(JDoubleArrayPtr array, - ffi.Pointer elems, DartJIntMarker mode)>(); + ffi.Pointer elems, Dartjint mode)>(); void ReleaseDoubleArrayElements(JDoubleArrayPtr array, - ffi.Pointer elems, DartJIntMarker mode) => + ffi.Pointer elems, Dartjint mode) => _ReleaseDoubleArrayElements(array, elems, mode).check(); late final _GetBooleanArrayRegion = ptr.ref.GetBooleanArrayRegion.asFunction< - JThrowablePtr Function(JBooleanArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf)>(); + JThrowablePtr Function(JBooleanArrayPtr array, Dartjint start, + Dartjint len, ffi.Pointer buf)>(); - void GetBooleanArrayRegion(JBooleanArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf) => + void GetBooleanArrayRegion(JBooleanArrayPtr array, Dartjint start, + Dartjint len, ffi.Pointer buf) => _GetBooleanArrayRegion(array, start, len, buf).check(); late final _GetByteArrayRegion = ptr.ref.GetByteArrayRegion.asFunction< - JThrowablePtr Function(JByteArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf)>(); + JThrowablePtr Function(JByteArrayPtr array, Dartjint start, Dartjint len, + ffi.Pointer buf)>(); - void GetByteArrayRegion(JByteArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf) => + void GetByteArrayRegion(JByteArrayPtr array, Dartjint start, Dartjint len, + ffi.Pointer buf) => _GetByteArrayRegion(array, start, len, buf).check(); late final _GetCharArrayRegion = ptr.ref.GetCharArrayRegion.asFunction< - JThrowablePtr Function(JCharArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf)>(); + JThrowablePtr Function(JCharArrayPtr array, Dartjint start, Dartjint len, + ffi.Pointer buf)>(); - void GetCharArrayRegion(JCharArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf) => + void GetCharArrayRegion(JCharArrayPtr array, Dartjint start, Dartjint len, + ffi.Pointer buf) => _GetCharArrayRegion(array, start, len, buf).check(); late final _GetShortArrayRegion = ptr.ref.GetShortArrayRegion.asFunction< - JThrowablePtr Function(JShortArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf)>(); + JThrowablePtr Function(JShortArrayPtr array, Dartjint start, Dartjint len, + ffi.Pointer buf)>(); - void GetShortArrayRegion(JShortArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf) => + void GetShortArrayRegion(JShortArrayPtr array, Dartjint start, Dartjint len, + ffi.Pointer buf) => _GetShortArrayRegion(array, start, len, buf).check(); late final _GetIntArrayRegion = ptr.ref.GetIntArrayRegion.asFunction< - JThrowablePtr Function(JIntArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf)>(); + JThrowablePtr Function(JIntArrayPtr array, Dartjint start, Dartjint len, + ffi.Pointer buf)>(); - void GetIntArrayRegion(JIntArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf) => + void GetIntArrayRegion(JIntArrayPtr array, Dartjint start, Dartjint len, + ffi.Pointer buf) => _GetIntArrayRegion(array, start, len, buf).check(); late final _GetLongArrayRegion = ptr.ref.GetLongArrayRegion.asFunction< - JThrowablePtr Function(JLongArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf)>(); + JThrowablePtr Function(JLongArrayPtr array, Dartjint start, Dartjint len, + ffi.Pointer buf)>(); - void GetLongArrayRegion(JLongArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf) => + void GetLongArrayRegion(JLongArrayPtr array, Dartjint start, Dartjint len, + ffi.Pointer buf) => _GetLongArrayRegion(array, start, len, buf).check(); late final _GetFloatArrayRegion = ptr.ref.GetFloatArrayRegion.asFunction< - JThrowablePtr Function(JFloatArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf)>(); + JThrowablePtr Function(JFloatArrayPtr array, Dartjint start, Dartjint len, + ffi.Pointer buf)>(); - void GetFloatArrayRegion(JFloatArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf) => + void GetFloatArrayRegion(JFloatArrayPtr array, Dartjint start, Dartjint len, + ffi.Pointer buf) => _GetFloatArrayRegion(array, start, len, buf).check(); late final _GetDoubleArrayRegion = ptr.ref.GetDoubleArrayRegion.asFunction< - JThrowablePtr Function(JDoubleArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf)>(); + JThrowablePtr Function(JDoubleArrayPtr array, Dartjint start, + Dartjint len, ffi.Pointer buf)>(); - void GetDoubleArrayRegion(JDoubleArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf) => + void GetDoubleArrayRegion(JDoubleArrayPtr array, Dartjint start, Dartjint len, + ffi.Pointer buf) => _GetDoubleArrayRegion(array, start, len, buf).check(); late final _SetBooleanArrayRegion = ptr.ref.SetBooleanArrayRegion.asFunction< - JThrowablePtr Function(JBooleanArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf)>(); + JThrowablePtr Function(JBooleanArrayPtr array, Dartjint start, + Dartjint len, ffi.Pointer buf)>(); - void SetBooleanArrayRegion(JBooleanArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf) => + void SetBooleanArrayRegion(JBooleanArrayPtr array, Dartjint start, + Dartjint len, ffi.Pointer buf) => _SetBooleanArrayRegion(array, start, len, buf).check(); late final _SetByteArrayRegion = ptr.ref.SetByteArrayRegion.asFunction< - JThrowablePtr Function(JByteArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf)>(); + JThrowablePtr Function(JByteArrayPtr array, Dartjint start, Dartjint len, + ffi.Pointer buf)>(); - void SetByteArrayRegion(JByteArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf) => + void SetByteArrayRegion(JByteArrayPtr array, Dartjint start, Dartjint len, + ffi.Pointer buf) => _SetByteArrayRegion(array, start, len, buf).check(); late final _SetCharArrayRegion = ptr.ref.SetCharArrayRegion.asFunction< - JThrowablePtr Function(JCharArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf)>(); + JThrowablePtr Function(JCharArrayPtr array, Dartjint start, Dartjint len, + ffi.Pointer buf)>(); - void SetCharArrayRegion(JCharArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf) => + void SetCharArrayRegion(JCharArrayPtr array, Dartjint start, Dartjint len, + ffi.Pointer buf) => _SetCharArrayRegion(array, start, len, buf).check(); late final _SetShortArrayRegion = ptr.ref.SetShortArrayRegion.asFunction< - JThrowablePtr Function(JShortArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf)>(); + JThrowablePtr Function(JShortArrayPtr array, Dartjint start, Dartjint len, + ffi.Pointer buf)>(); - void SetShortArrayRegion(JShortArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf) => + void SetShortArrayRegion(JShortArrayPtr array, Dartjint start, Dartjint len, + ffi.Pointer buf) => _SetShortArrayRegion(array, start, len, buf).check(); late final _SetIntArrayRegion = ptr.ref.SetIntArrayRegion.asFunction< - JThrowablePtr Function(JIntArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf)>(); + JThrowablePtr Function(JIntArrayPtr array, Dartjint start, Dartjint len, + ffi.Pointer buf)>(); - void SetIntArrayRegion(JIntArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf) => + void SetIntArrayRegion(JIntArrayPtr array, Dartjint start, Dartjint len, + ffi.Pointer buf) => _SetIntArrayRegion(array, start, len, buf).check(); late final _SetLongArrayRegion = ptr.ref.SetLongArrayRegion.asFunction< - JThrowablePtr Function(JLongArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf)>(); + JThrowablePtr Function(JLongArrayPtr array, Dartjint start, Dartjint len, + ffi.Pointer buf)>(); - void SetLongArrayRegion(JLongArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf) => + void SetLongArrayRegion(JLongArrayPtr array, Dartjint start, Dartjint len, + ffi.Pointer buf) => _SetLongArrayRegion(array, start, len, buf).check(); late final _SetFloatArrayRegion = ptr.ref.SetFloatArrayRegion.asFunction< - JThrowablePtr Function(JFloatArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf)>(); + JThrowablePtr Function(JFloatArrayPtr array, Dartjint start, Dartjint len, + ffi.Pointer buf)>(); - void SetFloatArrayRegion(JFloatArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf) => + void SetFloatArrayRegion(JFloatArrayPtr array, Dartjint start, Dartjint len, + ffi.Pointer buf) => _SetFloatArrayRegion(array, start, len, buf).check(); late final _SetDoubleArrayRegion = ptr.ref.SetDoubleArrayRegion.asFunction< - JThrowablePtr Function(JDoubleArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf)>(); + JThrowablePtr Function(JDoubleArrayPtr array, Dartjint start, + Dartjint len, ffi.Pointer buf)>(); - void SetDoubleArrayRegion(JDoubleArrayPtr array, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf) => + void SetDoubleArrayRegion(JDoubleArrayPtr array, Dartjint start, Dartjint len, + ffi.Pointer buf) => _SetDoubleArrayRegion(array, start, len, buf).check(); late final _RegisterNatives = ptr.ref.RegisterNatives.asFunction< JniResult Function(JClassPtr clazz, ffi.Pointer methods, - DartJIntMarker nMethods)>(); + Dartjint nMethods)>(); - DartJIntMarker RegisterNatives(JClassPtr clazz, - ffi.Pointer methods, DartJIntMarker nMethods) => + Dartjint RegisterNatives(JClassPtr clazz, + ffi.Pointer methods, Dartjint nMethods) => _RegisterNatives(clazz, methods, nMethods).integer; late final _UnregisterNatives = ptr.ref.UnregisterNatives .asFunction(); - DartJIntMarker UnregisterNatives(JClassPtr clazz) => + Dartjint UnregisterNatives(JClassPtr clazz) => _UnregisterNatives(clazz).integer; late final _MonitorEnter = ptr.ref.MonitorEnter.asFunction(); - DartJIntMarker MonitorEnter(JObjectPtr obj) => _MonitorEnter(obj).integer; + Dartjint MonitorEnter(JObjectPtr obj) => _MonitorEnter(obj).integer; late final _MonitorExit = ptr.ref.MonitorExit.asFunction(); - DartJIntMarker MonitorExit(JObjectPtr obj) => _MonitorExit(obj).integer; + Dartjint MonitorExit(JObjectPtr obj) => _MonitorExit(obj).integer; late final _GetJavaVM = ptr.ref.GetJavaVM - .asFunction> vm)>( + .asFunction> vm)>( isLeaf: true); - DartJIntMarker GetJavaVM(ffi.Pointer> vm) => + Dartjint GetJavaVM(ffi.Pointer> vm) => _GetJavaVM(vm).integer; late final _GetStringRegion = ptr.ref.GetStringRegion.asFunction< - JThrowablePtr Function(JStringPtr str, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf)>(); + JThrowablePtr Function(JStringPtr str, Dartjint start, Dartjint len, + ffi.Pointer buf)>(); - void GetStringRegion(JStringPtr str, DartJIntMarker start, DartJIntMarker len, + void GetStringRegion(JStringPtr str, Dartjint start, Dartjint len, ffi.Pointer buf) => _GetStringRegion(str, start, len, buf).check(); late final _GetStringUTFRegion = ptr.ref.GetStringUTFRegion.asFunction< - JThrowablePtr Function(JStringPtr str, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf)>(); + JThrowablePtr Function(JStringPtr str, Dartjint start, Dartjint len, + ffi.Pointer buf)>(); - void GetStringUTFRegion(JStringPtr str, DartJIntMarker start, - DartJIntMarker len, ffi.Pointer buf) => + void GetStringUTFRegion(JStringPtr str, Dartjint start, Dartjint len, + ffi.Pointer buf) => _GetStringUTFRegion(str, start, len, buf).check(); late final _GetPrimitiveArrayCritical = ptr.ref.GetPrimitiveArrayCritical @@ -1437,11 +1419,11 @@ class GlobalJniEnv { late final _ReleasePrimitiveArrayCritical = ptr.ref.ReleasePrimitiveArrayCritical.asFunction< - JThrowablePtr Function(JArrayPtr array, ffi.Pointer carray, - DartJIntMarker mode)>(); + JThrowablePtr Function( + JArrayPtr array, ffi.Pointer carray, Dartjint mode)>(); void ReleasePrimitiveArrayCritical( - JArrayPtr array, ffi.Pointer carray, DartJIntMarker mode) => + JArrayPtr array, ffi.Pointer carray, Dartjint mode) => _ReleasePrimitiveArrayCritical(array, carray, mode).check(); late final _GetStringCritical = ptr.ref.GetStringCritical.asFunction< @@ -1476,11 +1458,10 @@ class GlobalJniEnv { bool ExceptionCheck() => _ExceptionCheck().boolean; late final _NewDirectByteBuffer = ptr.ref.NewDirectByteBuffer.asFunction< - JniResult Function( - ffi.Pointer address, DartJLongMarker capacity)>(); + JniResult Function(ffi.Pointer address, Dartjlong capacity)>(); JObjectPtr NewDirectByteBuffer( - ffi.Pointer address, DartJLongMarker capacity) => + ffi.Pointer address, Dartjlong capacity) => _NewDirectByteBuffer(address, capacity).objectPointer; late final _GetDirectBufferAddress = ptr.ref.GetDirectBufferAddress @@ -1492,7 +1473,7 @@ class GlobalJniEnv { late final _GetDirectBufferCapacity = ptr.ref.GetDirectBufferCapacity .asFunction(isLeaf: true); - DartJLongMarker GetDirectBufferCapacity(JObjectPtr buf) => + Dartjlong GetDirectBufferCapacity(JObjectPtr buf) => _GetDirectBufferCapacity(buf).long; late final _GetObjectRefType = ptr.ref.GetObjectRefType diff --git a/pkgs/jni/lib/src/third_party/jni_bindings_generated.dart b/pkgs/jni/lib/src/third_party/jni_bindings_generated.dart index 5738cbb659..36c71d5649 100644 --- a/pkgs/jni/lib/src/third_party/jni_bindings_generated.dart +++ b/pkgs/jni/lib/src/third_party/jni_bindings_generated.dart @@ -40,14 +40,6 @@ // ignore_for_file: type=lint, unused_import, deprecated_member_use_from_same_package import 'dart:ffi' as ffi; -/// Bindings for libdartjni.so which is part of jni plugin. -/// -/// It also transitively includes type definitions such as JNIEnv from third_party/jni.h; -/// -/// However, functions prefixed JNI_ are not usable because they are in a different shared library. -/// -/// Regenerate bindings with `dart run ffigen --config ffigen.yaml`. -/// class JniBindings { /// Holds the symbol lookup function. final ffi.Pointer Function(String symbolName) @@ -348,26 +340,19 @@ class JniBindings { late final _setCaptureStackTraceOnRelease = _setCaptureStackTraceOnReleasePtr.asFunction(); - late final ffi.Pointer _tlsKey = - _lookup('tlsKey'); + late final ffi.Pointer _tlsKey = _lookup('tlsKey'); - Dart__darwin_pthread_key_t get tlsKey => _tlsKey.value; + int get tlsKey => _tlsKey.value; - set tlsKey(Dart__darwin_pthread_key_t value) => _tlsKey.value = value; + set tlsKey(int value) => _tlsKey.value = value; } -final class CallbackResult extends ffi.Struct { - external MutexLock lock; - - external ConditionVariable cond; +typedef C_JNIEnv = ffi.Pointer; - @ffi.Int() - external int ready; +final class CallbackResult extends ffi.Opaque {} - external JObjectPtr object; -} - -typedef ConditionVariable = pthread_cond_t; +typedef ConditionVariable = ffi.Int; +typedef DartConditionVariable = int; typedef Dart_FinalizableHandle = ffi.Pointer; final class Dart_FinalizableHandle_ extends ffi.Opaque {} @@ -2700,114 +2685,32 @@ final class GlobalJniEnvStruct extends ffi.Struct { typedef JArrayPtr = JObjectPtr; typedef JBooleanArrayPtr = JArrayPtr; - -/// Primitive types that match up with Java equivalents. typedef JBooleanMarker = ffi.Uint8; -typedef DartJBooleanMarker = int; +typedef Dartjboolean = int; typedef JByteArrayPtr = JArrayPtr; typedef JByteMarker = ffi.Int8; -typedef DartJByteMarker = int; +typedef Dartjbyte = int; typedef JCharArrayPtr = JArrayPtr; typedef JCharMarker = ffi.Uint16; -typedef DartJCharMarker = int; +typedef Dartjchar = int; typedef JClassPtr = JObjectPtr; typedef JDoubleArrayPtr = JArrayPtr; typedef JDoubleMarker = ffi.Double; -typedef DartJDoubleMarker = double; +typedef Dartjdouble = double; typedef JFieldIDPtr = ffi.Pointer; typedef JFloatArrayPtr = JArrayPtr; typedef JFloatMarker = ffi.Float; -typedef DartJFloatMarker = double; +typedef Dartjfloat = double; typedef JIntArrayPtr = JArrayPtr; typedef JIntMarker = ffi.Int32; -typedef DartJIntMarker = int; +typedef Dartjint = int; typedef JLongArrayPtr = JArrayPtr; typedef JLongMarker = ffi.Int64; -typedef DartJLongMarker = int; +typedef Dartjlong = int; typedef JMethodIDPtr = ffi.Pointer; -/// JNI invocation interface. -final class JNIInvokeInterface extends ffi.Struct { - external ffi.Pointer reserved0; - - external ffi.Pointer reserved1; - - external ffi.Pointer reserved2; - - external ffi.Pointer< - ffi.NativeFunction vm)>> - DestroyJavaVM; - - external ffi.Pointer< - ffi.NativeFunction< - JIntMarker Function( - ffi.Pointer vm, - ffi.Pointer> p_env, - ffi.Pointer thr_args)>> AttachCurrentThread; - - external ffi.Pointer< - ffi.NativeFunction vm)>> - DetachCurrentThread; - - external ffi.Pointer< - ffi.NativeFunction< - JIntMarker Function( - ffi.Pointer vm, - ffi.Pointer> p_env, - JIntMarker version)>> GetEnv; - - external ffi.Pointer< - ffi.NativeFunction< - JIntMarker Function( - ffi.Pointer vm, - ffi.Pointer> p_env, - ffi.Pointer thr_args)>> AttachCurrentThreadAsDaemon; - - static ffi.Pointer $allocate( - ffi.Allocator $allocator, { - required ffi.Pointer reserved0, - required ffi.Pointer reserved1, - required ffi.Pointer reserved2, - required ffi.Pointer< - ffi.NativeFunction vm)>> - DestroyJavaVM, - required ffi.Pointer< - ffi.NativeFunction< - JIntMarker Function( - ffi.Pointer vm, - ffi.Pointer> p_env, - ffi.Pointer thr_args)>> - AttachCurrentThread, - required ffi.Pointer< - ffi.NativeFunction vm)>> - DetachCurrentThread, - required ffi.Pointer< - ffi.NativeFunction< - JIntMarker Function( - ffi.Pointer vm, - ffi.Pointer> p_env, - JIntMarker version)>> - GetEnv, - required ffi.Pointer< - ffi.NativeFunction< - JIntMarker Function( - ffi.Pointer vm, - ffi.Pointer> p_env, - ffi.Pointer thr_args)>> - AttachCurrentThreadAsDaemon, - }) => - $allocator() - ..ref.reserved0 = reserved0 - ..ref.reserved1 = reserved1 - ..ref.reserved2 = reserved2 - ..ref.DestroyJavaVM = DestroyJavaVM - ..ref.AttachCurrentThread = AttachCurrentThread - ..ref.DetachCurrentThread = DetachCurrentThread - ..ref.GetEnv = GetEnv - ..ref.AttachCurrentThreadAsDaemon = AttachCurrentThreadAsDaemon; -} +final class JNIInvokeInterface extends ffi.Opaque {} -/// Table of interface function pointers. final class JNINativeInterface extends ffi.Struct { external ffi.Pointer reserved0; @@ -2847,7 +2750,6 @@ final class JNINativeInterface extends ffi.Struct { JFieldIDPtr Function( ffi.Pointer env, JObjectPtr field)>> FromReflectedField; - /// spec doesn't show jboolean parameter external ffi.Pointer< ffi.NativeFunction< JObjectPtr Function( @@ -2866,7 +2768,6 @@ final class JNINativeInterface extends ffi.Struct { JBooleanMarker Function(ffi.Pointer env, JClassPtr clazz1, JClassPtr clazz2)>> IsAssignableFrom; - /// spec doesn't show jboolean parameter external ffi.Pointer< ffi.NativeFunction< JObjectPtr Function(ffi.Pointer env, JClassPtr cls, @@ -4075,7 +3976,6 @@ final class JNINativeInterface extends ffi.Struct { JSizeMarker len, ffi.Pointer buf)>> GetDoubleArrayRegion; - /// spec shows these without const; some jni.h do, some don't external ffi.Pointer< ffi.NativeFunction< ffi.Void Function( @@ -4174,7 +4074,7 @@ final class JNINativeInterface extends ffi.Struct { external ffi.Pointer< ffi.NativeFunction< JIntMarker Function(ffi.Pointer env, - ffi.Pointer> vm)>> GetJavaVM; + ffi.Pointer> vm)>> GetJavaVM; external ffi.Pointer< ffi.NativeFunction< @@ -4254,7 +4154,6 @@ final class JNINativeInterface extends ffi.Struct { JLongMarker Function(ffi.Pointer env, JObjectPtr buf)>> GetDirectBufferCapacity; - /// added in JNI 1.6 external ffi.Pointer< ffi.NativeFunction< ffi.UnsignedInt Function( @@ -5489,7 +5388,7 @@ final class JNINativeInterface extends ffi.Struct { required ffi.Pointer< ffi.NativeFunction< JIntMarker Function(ffi.Pointer env, - ffi.Pointer> vm)>> + ffi.Pointer> vm)>> GetJavaVM, required ffi.Pointer< ffi.NativeFunction< @@ -5818,8 +5717,6 @@ final class JNINativeMethod extends ffi.Struct { } typedef JObjectArrayPtr = JArrayPtr; - -/// Reference types, in C. typedef JObjectPtr = ffi.Pointer; enum JObjectRefType { @@ -5842,9 +5739,7 @@ enum JObjectRefType { typedef JShortArrayPtr = JArrayPtr; typedef JShortMarker = ffi.Int16; -typedef DartJShortMarker = int; - -/// "cardinal indices and sizes" +typedef Dartjshort = int; typedef JSizeMarker = JIntMarker; typedef JStringPtr = JObjectPtr; typedef JThrowablePtr = JObjectPtr; @@ -5879,10 +5774,28 @@ final class JValue extends ffi.Union { typedef JWeakPtr = JObjectPtr; typedef JavaVM = ffi.Pointer; -typedef JavaVM$1 = ffi.Pointer; + +final class JavaVMAttachArgs extends ffi.Struct { + @JIntMarker() + external int version; + + external ffi.Pointer name; + + external JObjectPtr group; + + static ffi.Pointer $allocate( + ffi.Allocator $allocator, { + required int version, + required ffi.Pointer name, + required JObjectPtr group, + }) => + $allocator() + ..ref.version = version + ..ref.name = name + ..ref.group = group; +} final class JavaVMInitArgs extends ffi.Struct { - /// use JNI_VERSION_1_2 or later @JIntMarker() external int version; @@ -5908,8 +5821,6 @@ final class JavaVMInitArgs extends ffi.Struct { ..ref.ignoreUnrecognized = ignoreUnrecognized; } -/// JNI 1.2+ initialization. (As of 1.6, the pre-1.2 structures are no -/// longer supported.) final class JavaVMOption extends ffi.Struct { external ffi.Pointer optionString; @@ -5940,10 +5851,7 @@ enum JniBooleanValues { } enum JniBufferWriteBack { - /// copy content, do not free buffer COMMIT(1), - - /// free buffer w/o copying back ABORT(2); final int value; @@ -6008,25 +5916,12 @@ typedef JniEnv = ffi.Pointer; typedef JniEnv$1 = ffi.Pointer; enum JniErrorCode { - /// no error OK(0), - - /// generic error ERR(-1), - - /// thread detached from the VM EDETACHED(-2), - - /// JNI version error EVERSION(-3), - - /// Out of memory ENOMEM(-4), - - /// VM already created EEXIST(-5), - - /// Invalid argument EINVAL(-6), SINGLETON_EXISTS(-99); @@ -6107,32 +6002,13 @@ enum JniVersions { }; } -typedef MutexLock = pthread_mutex_t; -typedef __darwin_pthread_cond_t = _opaque_pthread_cond_t; -typedef __darwin_pthread_key_t = ffi.UnsignedLong; -typedef Dart__darwin_pthread_key_t = int; -typedef __darwin_pthread_mutex_t = _opaque_pthread_mutex_t; - -final class _opaque_pthread_cond_t extends ffi.Struct { - @ffi.Long() - external int __sig; +typedef MutexLock = ffi.Int; +typedef DartMutexLock = int; - @ffi.Array.multi([40]) - external ffi.Array __opaque; -} - -final class _opaque_pthread_mutex_t extends ffi.Struct { - @ffi.Long() - external int __sig; - - @ffi.Array.multi([56]) - external ffi.Array __opaque; +final class _JavaVM extends ffi.Struct { + external ffi.Pointer functions; } final class jfieldID_ extends ffi.Opaque {} final class jmethodID_ extends ffi.Opaque {} - -typedef pthread_cond_t = __darwin_pthread_cond_t; -typedef pthread_key_t = __darwin_pthread_key_t; -typedef pthread_mutex_t = __darwin_pthread_mutex_t; diff --git a/pkgs/jni/tool/generate_ffi_bindings.dart b/pkgs/jni/tool/generate_ffi_bindings.dart index f61d2e8a6b..f1942fe90e 100644 --- a/pkgs/jni/tool/generate_ffi_bindings.dart +++ b/pkgs/jni/tool/generate_ffi_bindings.dart @@ -9,6 +9,7 @@ import 'dart:io'; import 'package:args/args.dart'; import 'package:ffigen/ffigen.dart' as ffigen; +import 'package:ffigen/src/config_provider/config.dart' as ffigen; import 'package:ffigen/src/context.dart' as ffigen; import 'package:ffigen/src/header_parser.dart' as ffigen; import 'package:logging/logging.dart'; @@ -17,6 +18,181 @@ import 'wrapper_generators/generate_c_extensions.dart'; import 'wrapper_generators/generate_dart_extensions.dart'; import 'wrapper_generators/logging.dart'; +class JniVisitor extends ffigen.Visitor { + static const enumRenames = { + 'JniType': 'JniCallType', + 'jobjectRefType': 'JObjectRefType', + }; + + static const funcRenames = { + 'FindClass': 'JniFindClass', + 'GetJavaVM': 'JniGetJavaVM', + }; + + static const excludedFuncs = { + 'GetJniContextPtr', + 'setJniGetters', + 'jni_log', + 'acquire_lock', + 'attach_thread', + 'check_exception', + 'destroy_cond', + 'destroy_lock', + 'init_cond', + 'init_lock', + 'load_class', + 'load_class_global_ref', + 'load_class_local_ref', + 'load_class_platform', + 'load_env', + 'load_field', + 'load_method', + 'load_static_field', + 'load_static_method', + 'release_lock', + 'signal_cond', + 'thread_id', + 'to_global_ref', + 'to_global_ref_result', + 'wait_for', + }; + + static final globalEnvNewObjectRegExp = RegExp(r'^globalEnv_NewObject$'); + static final globalEnvCallRegExp = RegExp( + r'^globalEnv_Call(Static|Nonvirtual|)[A-Z][a-z]+Method$', + ); + + static const excludedStructs = { + 'JniContext', + 'JniLocks', + 'JNIEnv', + '_JNIEnv', + 'JNIInvokeInterface', + '__va_list_tag', + 'CallbackResult', + }; + + static const structRenames = { + '_Dart_FinalizableHandle': 'Dart_FinalizableHandle_', + '_jfieldID': 'jfieldID_', + '_jmethodID': 'jmethodID_', + }; + + static const excludedGlobals = { + 'jni', + 'jniEnv', + 'context_getter', + 'env_getter', + }; + + static const excludedTypeDefs = { + 'va_list', + '__builtin_va_list', + }; + + static const typedefRenames = { + 'jbyte': 'JByteMarker', + 'jboolean': 'JBooleanMarker', + 'jchar': 'JCharMarker', + 'jshort': 'JShortMarker', + 'jint': 'JIntMarker', + 'jlong': 'JLongMarker', + 'jfloat': 'JFloatMarker', + 'jdouble': 'JDoubleMarker', + 'jsize': 'JSizeMarker', + 'jclass': 'JClassPtr', + 'jobject': 'JObjectPtr', + 'jmethodID': 'JMethodIDPtr', + 'jfieldID': 'JFieldIDPtr', + 'jthrowable': 'JThrowablePtr', + 'jstring': 'JStringPtr', + 'jarray': 'JArrayPtr', + 'jobjectArray': 'JObjectArrayPtr', + 'jbooleanArray': 'JBooleanArrayPtr', + 'jbyteArray': 'JByteArrayPtr', + 'jcharArray': 'JCharArrayPtr', + 'jshortArray': 'JShortArrayPtr', + 'jintArray': 'JIntArrayPtr', + 'jlongArray': 'JLongArrayPtr', + 'jfloatArray': 'JFloatArrayPtr', + 'jdoubleArray': 'JDoubleArrayPtr', + 'jweak': 'JWeakPtr', + 'jvalue': 'JValue', + }; + + const JniVisitor(); + + @override + void visitEnum(ffigen.EnumClass node) { + final renamed = enumRenames[node.originalName]; + if (renamed != null) { + node.name = renamed; + } + node.isExcluded = false; + } + + @override + void visitFunc(ffigen.Func node) { + if (node.originalName.startsWith('JNI_') || + excludedFuncs.contains(node.originalName) || + globalEnvNewObjectRegExp.hasMatch(node.originalName) || + globalEnvCallRegExp.hasMatch(node.originalName)) { + node.isExcluded = true; + return; + } + final renamed = funcRenames[node.originalName]; + if (renamed != null) { + node.name = renamed; + } + node.isExcluded = false; + } + + @override + void visitStruct(ffigen.Struct node) { + if (excludedStructs.contains(node.originalName)) { + node.isExcluded = true; + return; + } + final renamed = structRenames[node.originalName]; + if (renamed != null) { + node.name = renamed; + } + node.isExcluded = false; + } + + @override + void visitUnion(ffigen.Union node) { + if (node.originalName == 'jvalue') { + node.name = 'JValue'; + } + node.isExcluded = false; + } + + @override + void visitGlobal(ffigen.Global node) { + if (excludedGlobals.contains(node.originalName)) { + node.isExcluded = true; + return; + } + node.isExcluded = false; + } + + @override + void visitTypealias(ffigen.Typealias node) { + if (excludedTypeDefs.contains(node.originalName)) { + node.isExcluded = true; + return; + } + final renamed = typedefRenames[node.originalName]; + if (renamed != null) { + node.name = renamed; + } else if (node.originalName.startsWith('JNI')) { + node.name = 'Jni${node.originalName.substring(3)}'; + } + node.isExcluded = false; + } +} + void main(List args) { final levels = Map.fromEntries( Level.LEVELS.map((l) => MapEntry(l.name.toLowerCase(), l)), @@ -61,8 +237,67 @@ void main(List args) { logger.info('Generating FFI bindings for package:jni'); - final config = - ffigen.YamlConfig.fromFile(File('ffigen.yaml'), logger).configAdapter(); + final generator = ffigen.FfiGenerator( + headers: ffigen.Headers( + entryPoints: [ + Uri.file('src/dartjni.h'), + Uri.file('src/third_party/global_jni_env.h'), + Uri.file('src/jni_constants.h'), + ], + include: (uri) { + final path = uri.toFilePath(); + return path.endsWith('src/dartjni.h') || + path.endsWith('src/third_party/global_jni_env.h') || + path.endsWith('third_party/jni.h') || + path.endsWith('src/jni_constants.h'); + }, + compilerOptions: ['-Ithird_party/'], + ignoreSourceErrors: true, + ), + visitors: const [JniVisitor()], + output: ffigen.Output( + style: const ffigen.DynamicLibraryBindings(wrapperName: 'JniBindings'), + preamble: ''' +// Autogenerated file. Do not edit. +// Generated from an annotated version of jni.h provided in Android NDK. +// (NDK Version 23.1.7779620) +// The license for original file is provided below: + +/* + * Copyright (C) 2006 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * JNI specification, as defined by Sun: + * http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/jniTOC.html + * + * Everything here is expected to be VM-neutral. + */ + +// ignore_for_file: always_specify_types +// ignore_for_file: camel_case_types +// ignore_for_file: non_constant_identifier_names +// ignore_for_file: constant_identifier_names +// ignore_for_file: unused_field +// ignore_for_file: unused_element +// coverage:ignore-file +''', + dartFile: Uri.file('lib/src/third_party/jni_bindings_generated.dart'), + ), + ); + final config = ffigen.Config(generator); final library = ffigen.parse(ffigen.Context(logger, config)); final outputFile = File(config.output.dartFile.toFilePath()); library.generateFile(outputFile); diff --git a/pkgs/objective_c/ffigen_c.yaml b/pkgs/objective_c/ffigen_c.yaml deleted file mode 100644 index a41cf5cfc9..0000000000 --- a/pkgs/objective_c/ffigen_c.yaml +++ /dev/null @@ -1,51 +0,0 @@ -# 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/include/dart_api_dl.h' - - 'src/objective_c.h' - - 'src/os_version.h' -ffi-native: - asset-id: 'package:objective_c/objective_c.dylib' -exclude-all-by-default: true -generate-for-package-objective-c: true -sort: true -functions: - include: - - 'newFinalizableHandle' - - 'DOBJC_.*' - leaf: - include: - - '.*' - exclude: - - 'DOBJC_deleteFinalizableHandle' - - 'DOBJC_disposeObjCBlockWithClosure' - - 'DOBJC_newFinalizableBool' - - 'DOBJC_newFinalizableHandle' - - 'DOBJC_awaitWaiter' - rename: - 'DOBJC_(.*)': '$1' -typedefs: - include: - - 'Dart_FinalizableHandle' -structs: - include: - - '_DOBJC_Context' - rename: - '_ObjC(.*)': 'ObjC$1' - '_Dart_FinalizableHandle': 'Dart_FinalizableHandle_' - '_DOBJC_Context': 'DOBJC_Context' -macros: - include: - - 'ILLEGAL_PORT' -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/objective_c.h` etc. - // Regenerate bindings with `dart run tool/generate_code.dart`. - - // coverage:ignore-file diff --git a/pkgs/objective_c/ffigen_objc.yaml b/pkgs/objective_c/ffigen_objc.yaml deleted file mode 100644 index 3dc2299304..0000000000 --- a/pkgs/objective_c/ffigen_objc.yaml +++ /dev/null @@ -1,192 +0,0 @@ -# Generate bindings for the ObjC headers. -# Regenerate bindings with `dart run tool/generate_code.dart`. -name: ObjectiveCBindings -language: objc -output: - bindings: 'lib/src/objective_c_bindings_generated.dart' - objc-bindings: 'src/objective_c_bindings_generated.m' -headers: - entry-points: - - 'src/foundation.h' - - 'src/input_stream_adapter.h' - - 'src/ns_number.h' - - 'src/observer.h' - - 'src/protocol.h' -ffi-native: - asset-id: 'package:objective_c/objective_c.dylib' -exclude-all-by-default: true -include-transitive-objc-categories: false -generate-for-package-objective-c: true -sort: true -library-imports: - collection: 'dart:collection' -external-versions: - # See https://docs.flutter.dev/reference/supported-platforms. - ios: - min: 12.0.0 - macos: - min: 10.14.0 -objc-interfaces: - # Keep in sync with FFIgen's ObjCBuiltInFunctions.builtInInterfaces. - include: - - DOBJCDartInputStreamAdapter - - DOBJCDartInputStreamAdapterWeakHolder - - DOBJCObservation - - DOBJCDartProtocolBuilder - - DOBJCDartProtocol - - NSArray - - NSAttributedString - - NSAttributedStringMarkdownParsingOptions - - NSBundle - - NSCharacterSet - - NSCoder - - NSData - - NSDate - - NSDictionary - - NSEnumerator - - NSError - - NSIndexSet - - NSInputStream - - NSInvocation - - NSItemProvider - - NSLocale - - NSMethodSignature - - NSMutableArray - - NSMutableData - - NSMutableDictionary - - NSMutableIndexSet - - NSMutableOrderedSet - - NSMutableSet - - NSMutableString - - NSNotification - - NSNull - - NSNumber - - NSObject - - NSOutputStream - - NSOrderedCollectionChange - - NSOrderedCollectionDifference - - NSOrderedSet - - NSPort - - NSPortMessage - - NSProgress - - NSRunLoop - - NSSet - - NSStream - - NSString - - NSTimer - - NSURL - - NSURLHandle - - NSValue - - Protocol - rename: - 'DOBJCDartInputStreamAdapter': 'DartInputStreamAdapter' - 'DOBJCDartInputStreamAdapterWeakHolder' : 'DartInputStreamAdapterWeakHolder' - 'DOBJCDartProtocolBuilder': 'DartProtocolBuilder' - 'DOBJCDartProtocol': 'DartProtocol' - member-filter: - NSBundle: - exclude: - # This method is only present in some SDKs, leading to inconsistent - # code generation. - - 'localizedStringForKey:value:table:localizations:' -objc-protocols: - include: - - NSCoding - - NSCopying - - NSFastEnumeration - - NSItemProviderReading - - NSItemProviderWriting - - NSMutableCopying - - NSObject - - NSPortDelegate - - NSSecureCoding - - NSStreamDelegate - - Observer - rename: - 'NSObject': 'NSObjectProtocol' -objc-categories: - include: - - NSDataCreation - - NSExtendedArray - - NSExtendedData - - NSExtendedDate - - NSExtendedDictionary - - NSExtendedEnumerator - - NSExtendedMutableArray - - NSExtendedMutableData - - NSExtendedMutableDictionary - - NSExtendedMutableOrderedSet - - NSExtendedMutableSet - - NSExtendedOrderedSet - - NSExtendedSet - - NSNumberCreation - - NSNumberIsFloat - - NSNumberIsBool - - NSStringExtensionMethods -structs: - include: - - AEDesc - - __CFRunLoop - - __CFString - - CGPoint - - CGRect - - CGSize - - NSEdgeInsets - - NSFastEnumerationState - - _NSRange - - _NSZone - - OpaqueAEDataStorageType - rename: - __CFRunLoop: CFRunLoop - __CFString: CFString - _NSRange: NSRange - _NSZone: NSZone -enums: - include: - - NSAppleEventSendOptions - - NSAttributedStringEnumerationOptions - - NSAttributedStringFormattingOptions - - NSAttributedStringMarkdownInterpretedSyntax - - NSAttributedStringMarkdownParsingFailurePolicy - - NSBinarySearchingOptions - - NSCollectionChangeType - - NSComparisonResult - - NSDataBase64DecodingOptions - - NSDataBase64EncodingOptions - - NSDataCompressionAlgorithm - - NSDataReadingOptions - - NSDataSearchOptions - - NSDataWritingOptions - - NSDecodingFailurePolicy - - NSEnumerationOptions - - NSItemProviderFileOptions - - NSItemProviderRepresentationVisibility - - NSKeyValueChange - - NSKeyValueObservingOptions - - NSKeyValueSetMutationKind - - NSLinguisticTaggerOptions - - NSLocaleLanguageDirection - - NSOrderedCollectionDifferenceCalculationOptions - - NSPropertyListFormat - - NSQualityOfService - - NSSortOptions - - NSStreamEvent - - NSStreamStatus - - NSStringCompareOptions - - NSStringEncodingConversionOptions - - NSStringEnumerationOptions - - NSURLBookmarkCreationOptions - - NSURLBookmarkResolutionOptions - - NSURLHandleStatus -typedefs: - include: - - 'CFStringRef' -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 package:objective_c's ObjC code and the Foundation framework. - // Regenerate bindings with `dart run tool/generate_code.dart`. - - // coverage:ignore-file diff --git a/pkgs/objective_c/ffigen_runtime.yaml b/pkgs/objective_c/ffigen_runtime.yaml deleted file mode 100644 index 5d14eeaf7d..0000000000 --- a/pkgs/objective_c/ffigen_runtime.yaml +++ /dev/null @@ -1,71 +0,0 @@ -# Generate bindings for the ObjC runtime headers. -# Regenerate bindings with `dart run tool/generate_code.dart`. -name: RuntimeBindings -output: 'lib/src/runtime_bindings_generated.dart' -headers: - entry-points: - - 'src/objective_c_runtime.h' -ffi-native: -exclude-all-by-default: true -generate-for-package-objective-c: true -sort: true -functions: - include: - - 'objc_.*' - - 'object_getClass' - - 'sel_registerName' - - 'sel_getName' - - 'protocol_getMethodDescription' - - 'protocol_getName' - leaf: - include: - - '.*' - exclude: - - 'objc_msgSend.*' - rename: - 'sel_registerName': 'registerName' - 'sel_getName': 'getName' - 'objc_getClass': 'getClass' - 'objc_retain': 'objectRetain' - 'objc_retainBlock': 'blockRetain' - 'objc_release': 'objectRelease' - 'objc_autorelease': 'objectAutorelease' - 'objc_msgSend': 'msgSend' - 'objc_msgSend_fpret': 'msgSendFpret' - 'objc_msgSend_stret': 'msgSendStret' - 'object_getClass': 'getObjectClass' - 'objc_copyClassList': 'copyClassList' - 'objc_getProtocol': 'getProtocol' - 'objc_autoreleasePoolPush': 'autoreleasePoolPush' - 'objc_autoreleasePoolPop': 'autoreleasePoolPop' - 'protocol_getMethodDescription': 'getMethodDescription' - 'protocol_getName': 'getProtocolName' -globals: - include: - - '_NSConcrete.*Block' - - NSKeyValueChangeIndexesKey - - NSKeyValueChangeKindKey - - NSKeyValueChangeNewKey - - NSKeyValueChangeNotificationIsPriorKey - - NSKeyValueChangeOldKey - - NSLocalizedDescriptionKey - rename: - '_(.*)': '$1' -structs: - include: - - '_ObjC.*' - rename: - '_ObjC(.*)': 'ObjC$1' -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/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 - // ignore_for_file: unused_element - // coverage:ignore-file diff --git a/pkgs/objective_c/lib/src/c_bindings_generated.dart b/pkgs/objective_c/lib/src/c_bindings_generated.dart index 0367ba9fe8..2698f1e459 100644 --- a/pkgs/objective_c/lib/src/c_bindings_generated.dart +++ b/pkgs/objective_c/lib/src/c_bindings_generated.dart @@ -243,8 +243,26 @@ final class ObjCBlockImpl extends ffi.Struct { ..ref.dispose_port = dispose_port; } +final class ObjCMethodDesc extends ffi.Struct { + external ffi.Pointer name; + + external ffi.Pointer types; + + static ffi.Pointer $allocate( + ffi.Allocator $allocator, { + required ffi.Pointer name, + required ffi.Pointer types, + }) => $allocator() + ..ref.name = name + ..ref.types = types; +} + final class ObjCObjectImpl extends ffi.Opaque {} +final class ObjCProtocolImpl extends ffi.Opaque {} + +final class ObjCSelector extends ffi.Opaque {} + final class _Dart_Isolate extends ffi.Opaque {} final class _Version extends ffi.Struct { diff --git a/pkgs/objective_c/lib/src/objective_c_bindings_exported.dart b/pkgs/objective_c/lib/src/objective_c_bindings_exported.dart index 5e3700d8b4..d2c5b0094f 100644 --- a/pkgs/objective_c/lib/src/objective_c_bindings_exported.dart +++ b/pkgs/objective_c/lib/src/objective_c_bindings_exported.dart @@ -45,6 +45,8 @@ export 'objective_c_bindings_generated.dart' NSCoding$Methods, NSCollectionChangeType, NSComparisonResult, + NSConnection, + NSConnection$Methods, NSCopying, NSCopying$Builder, NSCopying$Methods, @@ -62,12 +64,14 @@ export 'objective_c_bindings_generated.dart' NSDecodingFailurePolicy, NSDictionary, NSDictionary$Methods, + NSDirectoryEnumerationOptions, NSEdgeInsets, NSEnumerationOptions, NSEnumerator, NSEnumerator$Methods, NSError, NSError$Methods, + NSExpressionType, NSExtendedArray, NSExtendedData, NSExtendedDate, @@ -84,6 +88,12 @@ export 'objective_c_bindings_generated.dart' NSFastEnumeration$Builder, NSFastEnumeration$Methods, NSFastEnumerationState, + NSFileManagerItemReplacementOptions, + NSFileManagerResumeSyncBehavior, + NSFileManagerUnmountOptions, + NSFileManagerUploadLocalVersionConflictPolicy, + NSFileVersionAddingOptions, + NSFileVersionReplacingOptions, NSIndexSet, NSIndexSet$Methods, NSInputStream, @@ -156,6 +166,7 @@ export 'objective_c_bindings_generated.dart' NSPortDelegate$Methods, NSPortMessage, NSPortMessage$Methods, + NSPredicateOperatorType, NSProgress, NSProgress$Methods, NSPropertyListFormat, @@ -163,6 +174,8 @@ export 'objective_c_bindings_generated.dart' NSRange, NSRunLoop, NSRunLoop$Methods, + NSSearchPathDirectory, + NSSearchPathDomainMask, NSSecureCoding, NSSecureCoding$Builder, NSSecureCoding$Methods, @@ -182,6 +195,7 @@ export 'objective_c_bindings_generated.dart' NSStringEncodingConversionOptions, NSStringEnumerationOptions, NSStringExtensionMethods, + NSTimeZoneNameStyle, NSTimer, NSTimer$Methods, NSURL, @@ -190,9 +204,14 @@ export 'objective_c_bindings_generated.dart' NSURLBookmarkResolutionOptions, NSURLHandle, NSURLHandle$Methods, + NSURLHandleClient, + NSURLHandleClient$Builder, + NSURLHandleClient$Methods, NSURLHandleStatus, + NSURLRelationship, NSValue, NSValue$Methods, + NSVolumeEnumerationOptions, NSZone, Observer, Observer$Builder, 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 bd139602a5..da19474f23 100644 --- a/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart +++ b/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart @@ -208,6 +208,21 @@ external bool _1wx624s_protocolTrampoline_e3qsqz( ffi.Pointer arg0, ); +@ffi.Native< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) +>() +external void _1wx624s_protocolTrampoline_fjrv01( + ffi.Pointer target, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, +); + @ffi.Native< ffi.Void Function( ffi.Pointer, @@ -270,6 +285,19 @@ external ffi.Pointer _1wx624s_wrapBlockingBlock_18v1jvf( ffi.Pointer context, ); +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) +>(isLeaf: true) +external ffi.Pointer _1wx624s_wrapBlockingBlock_1a22wz( + ffi.Pointer block, + ffi.Pointer listnerBlock, + ffi.Pointer context, +); + @ffi.Native< ffi.Pointer Function( ffi.Pointer, @@ -348,6 +376,19 @@ external ffi.Pointer _1wx624s_wrapBlockingBlock_1sr3ozv( ffi.Pointer context, ); +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) +>(isLeaf: true) +external ffi.Pointer _1wx624s_wrapBlockingBlock_fjrv01( + ffi.Pointer block, + ffi.Pointer listnerBlock, + ffi.Pointer context, +); + @ffi.Native< ffi.Pointer Function( ffi.Pointer, @@ -498,6 +539,13 @@ external ffi.Pointer _1wx624s_wrapListenerBlock_18v1jvf( ffi.Pointer block, ); +@ffi.Native< + ffi.Pointer Function(ffi.Pointer) +>(isLeaf: true) +external ffi.Pointer _1wx624s_wrapListenerBlock_1a22wz( + ffi.Pointer block, +); + @ffi.Native< ffi.Pointer Function(ffi.Pointer) >(isLeaf: true) @@ -540,6 +588,13 @@ external ffi.Pointer _1wx624s_wrapListenerBlock_1sr3ozv( ffi.Pointer block, ); +@ffi.Native< + ffi.Pointer Function(ffi.Pointer) +>(isLeaf: true) +external ffi.Pointer _1wx624s_wrapListenerBlock_fjrv01( + ffi.Pointer block, +); + @ffi.Native< ffi.Pointer Function(ffi.Pointer) >(isLeaf: true) @@ -1395,8 +1450,6 @@ extension DartProtocolBuilder$Methods on DartProtocolBuilder { } } -/// iOS: unavailable -/// macOS: introduced 10.11.0 sealed class NSAppleEventSendOptions { static const NSAppleEventSendNoReply = 1; static const NSAppleEventSendQueueReply = 2; @@ -1722,9 +1775,6 @@ extension type NSAttributedString._(objc.ObjCObject object$) } /// localizedAttributedStringWithFormat: - /// - /// iOS: introduced 15.0.0 - /// macOS: introduced 12.0.0 static NSAttributedString localizedAttributedStringWithFormat( NSAttributedString format, ) { @@ -1743,9 +1793,6 @@ extension type NSAttributedString._(objc.ObjCObject object$) } /// localizedAttributedStringWithFormat:context: - /// - /// iOS: introduced 17.0.0 - /// macOS: introduced 14.0.0 static NSAttributedString localizedAttributedStringWithFormat$1( NSAttributedString format, { required NSDictionary context, @@ -1767,9 +1814,6 @@ extension type NSAttributedString._(objc.ObjCObject object$) } /// localizedAttributedStringWithFormat:options: - /// - /// iOS: introduced 15.0.0 - /// macOS: introduced 12.0.0 static NSAttributedString localizedAttributedStringWithFormat$2( NSAttributedString format, { required int options, @@ -1790,9 +1834,6 @@ extension type NSAttributedString._(objc.ObjCObject object$) } /// localizedAttributedStringWithFormat:options:context: - /// - /// iOS: introduced 17.0.0 - /// macOS: introduced 14.0.0 static NSAttributedString localizedAttributedStringWithFormat$3( NSAttributedString format, { required int options, @@ -1912,9 +1953,6 @@ extension NSAttributedString$Methods on NSAttributedString { } /// initWithContentsOfMarkdownFileAtURL:options:baseURL:error: - /// - /// iOS: introduced 15.0.0 - /// macOS: introduced 12.0.0 NSAttributedString? initWithContentsOfMarkdownFileAtURL( NSURL markdownFile, { NSAttributedStringMarkdownParsingOptions? options, @@ -1949,9 +1987,6 @@ extension NSAttributedString$Methods on NSAttributedString { } /// initWithFormat:options:locale: - /// - /// iOS: introduced 15.0.0 - /// macOS: introduced 12.0.0 NSAttributedString initWithFormat( NSAttributedString format, { required int options, @@ -1976,9 +2011,6 @@ extension NSAttributedString$Methods on NSAttributedString { } /// initWithFormat:options:locale:context: - /// - /// iOS: introduced 17.0.0 - /// macOS: introduced 14.0.0 NSAttributedString initWithFormat$1( NSAttributedString format, { required int options, @@ -2006,9 +2038,6 @@ extension NSAttributedString$Methods on NSAttributedString { } /// initWithMarkdown:options:baseURL:error: - /// - /// iOS: introduced 15.0.0 - /// macOS: introduced 12.0.0 NSAttributedString? initWithMarkdown( NSData markdown, { NSAttributedStringMarkdownParsingOptions? options, @@ -2043,9 +2072,6 @@ extension NSAttributedString$Methods on NSAttributedString { } /// initWithMarkdownString:options:baseURL:error: - /// - /// iOS: introduced 15.0.0 - /// macOS: introduced 12.0.0 NSAttributedString? initWithMarkdownString( NSString markdownString, { NSAttributedStringMarkdownParsingOptions? options, @@ -2143,8 +2169,6 @@ sealed class NSAttributedStringFormattingOptions { static const NSAttributedStringFormattingApplyReplacementIndexAttribute = 2; } -/// iOS: introduced 15.0.0 -/// macOS: introduced 12.0.0 enum NSAttributedStringMarkdownInterpretedSyntax { NSAttributedStringMarkdownInterpretedSyntaxFull(0), NSAttributedStringMarkdownInterpretedSyntaxInlineOnly(1), @@ -2166,8 +2190,6 @@ enum NSAttributedStringMarkdownInterpretedSyntax { }; } -/// iOS: introduced 15.0.0 -/// macOS: introduced 12.0.0 enum NSAttributedStringMarkdownParsingFailurePolicy { NSAttributedStringMarkdownParsingFailureReturnError(0), NSAttributedStringMarkdownParsingFailureReturnPartiallyParsedIfPossible(1); @@ -2188,9 +2210,6 @@ enum NSAttributedStringMarkdownParsingFailurePolicy { } /// NSAttributedStringMarkdownParsingOptions -/// -/// iOS: introduced 15.0.0 -/// macOS: introduced 12.0.0 extension type NSAttributedStringMarkdownParsingOptions._( objc.ObjCObject object$ ) implements objc.ObjCObject, NSObject, NSCopying { @@ -2276,8 +2295,7 @@ extension type NSAttributedStringMarkdownParsingOptions._( extension NSAttributedStringMarkdownParsingOptions$Methods on NSAttributedStringMarkdownParsingOptions { - /// iOS: introduced 15.0.0 - /// macOS: introduced 12.0.0 + /// allowsExtendedAttributes bool get allowsExtendedAttributes { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -2288,8 +2306,7 @@ extension NSAttributedStringMarkdownParsingOptions$Methods return _objc_msgSend_91o635(_$$ref.pointer, _sel_allowsExtendedAttributes); } - /// iOS: introduced 16.0.0 - /// macOS: introduced 13.0.0 + /// appliesSourcePositionAttributes bool get appliesSourcePositionAttributes { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -2303,8 +2320,7 @@ extension NSAttributedStringMarkdownParsingOptions$Methods ); } - /// iOS: introduced 15.0.0 - /// macOS: introduced 12.0.0 + /// failurePolicy NSAttributedStringMarkdownParsingFailurePolicy get failurePolicy { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -2335,8 +2351,7 @@ extension NSAttributedStringMarkdownParsingOptions$Methods ); } - /// iOS: introduced 15.0.0 - /// macOS: introduced 12.0.0 + /// interpretedSyntax NSAttributedStringMarkdownInterpretedSyntax get interpretedSyntax { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -2348,8 +2363,7 @@ extension NSAttributedStringMarkdownParsingOptions$Methods return NSAttributedStringMarkdownInterpretedSyntax.fromValue($ret); } - /// iOS: introduced 15.0.0 - /// macOS: introduced 12.0.0 + /// languageCode NSString? get languageCode { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -2363,8 +2377,7 @@ extension NSAttributedStringMarkdownParsingOptions$Methods : NSString.fromPointer($ret, retain: true, release: true); } - /// iOS: introduced 15.0.0 - /// macOS: introduced 12.0.0 + /// setAllowsExtendedAttributes: set allowsExtendedAttributes(bool value) { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -2379,8 +2392,7 @@ extension NSAttributedStringMarkdownParsingOptions$Methods ); } - /// iOS: introduced 16.0.0 - /// macOS: introduced 13.0.0 + /// setAppliesSourcePositionAttributes: set appliesSourcePositionAttributes(bool value) { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -2395,8 +2407,7 @@ extension NSAttributedStringMarkdownParsingOptions$Methods ); } - /// iOS: introduced 15.0.0 - /// macOS: introduced 12.0.0 + /// setFailurePolicy: set failurePolicy(NSAttributedStringMarkdownParsingFailurePolicy value) { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -2407,8 +2418,7 @@ extension NSAttributedStringMarkdownParsingOptions$Methods _objc_msgSend_mt0t38(_$$ref.pointer, _sel_setFailurePolicy_, value.value); } - /// iOS: introduced 15.0.0 - /// macOS: introduced 12.0.0 + /// setInterpretedSyntax: set interpretedSyntax(NSAttributedStringMarkdownInterpretedSyntax value) { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -2423,8 +2433,7 @@ extension NSAttributedStringMarkdownParsingOptions$Methods ); } - /// iOS: introduced 15.0.0 - /// macOS: introduced 12.0.0 + /// setLanguageCode: set languageCode(NSString? value) { final _$$ref = object$.ref; final _$$ref$1 = value?.ref; @@ -3070,9 +3079,6 @@ extension NSBundle$Methods on NSBundle { } /// localizedAttributedStringForKey:value:table: - /// - /// iOS: introduced 15.0.0 - /// macOS: introduced 12.0.0 NSAttributedString localizedAttributedStringForKey( NSString key, { NSString? value, @@ -4115,14 +4121,12 @@ interface class NSCoding$Builder { isInstanceMethod: true, ), (Dartinstancetype? Function(NSCoder) func) => - ObjCBlock_instancetype_ffiVoid_NSCoder.fromFunction( + ObjCBlock_instancetype_ffiVoid_NSCoder_retained.fromFunction( (ffi.Pointer _, NSCoder arg1) => func(arg1), ), ); } -/// iOS: introduced 13.0.0 -/// macOS: introduced 10.15.0 enum NSCollectionChangeType { NSCollectionChangeInsert(0), NSCollectionChangeRemove(1); @@ -4155,6 +4159,35 @@ enum NSComparisonResult { }; } +/// NSConnection +/// +/// NSConnection +@Deprecated('Use NSXPCConnection instead') +extension type NSConnection._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject { + /// Constructs a [NSConnection] that points to the same underlying object as [other]. + NSConnection.as(objc.ObjCObject other) : object$ = other { + objc.checkOsVersionInternal( + 'NSConnection', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + } + + /// Constructs a [NSConnection] that wraps the given raw object pointer. + NSConnection.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + objc.checkOsVersionInternal( + 'NSConnection', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + } +} + /// NSCopying extension type NSCopying._(objc.ObjCProtocol object$) implements objc.ObjCProtocol { @@ -4246,7 +4279,7 @@ interface class NSCopying$Builder { isInstanceMethod: true, ), (objc.ObjCObject Function(ffi.Pointer) func) => - ObjCBlock_objcObjCObjectImpl_ffiVoid_NSZone.fromFunction( + ObjCBlock_objcObjCObjectImpl_ffiVoid_NSZone_retained.fromFunction( (ffi.Pointer _, ffi.Pointer arg1) => func(arg1), ), ); @@ -4447,9 +4480,6 @@ extension NSData$Methods on NSData { } /// compressedDataUsingAlgorithm:error: - /// - /// iOS: introduced 13.0.0 - /// macOS: introduced 10.15.0 NSData? compressedDataUsingAlgorithm(NSDataCompressionAlgorithm algorithm) { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -4475,9 +4505,6 @@ extension NSData$Methods on NSData { } /// decompressedDataUsingAlgorithm:error: - /// - /// iOS: introduced 13.0.0 - /// macOS: introduced 10.15.0 NSData? decompressedDataUsingAlgorithm(NSDataCompressionAlgorithm algorithm) { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -4751,8 +4778,6 @@ sealed class NSDataBase64EncodingOptions { static const NSDataBase64EncodingEndLineWithLineFeed = 32; } -/// iOS: introduced 13.0.0 -/// macOS: introduced 10.15.0 enum NSDataCompressionAlgorithm { NSDataCompressionAlgorithmLZFSE(0), NSDataCompressionAlgorithmLZ4(1), @@ -5354,6 +5379,14 @@ extension NSDictionary$Methods on NSDictionary { } } +sealed class NSDirectoryEnumerationOptions { + static const NSDirectoryEnumerationSkipsSubdirectoryDescendants = 1; + static const NSDirectoryEnumerationSkipsPackageDescendants = 2; + static const NSDirectoryEnumerationSkipsHiddenFiles = 4; + static const NSDirectoryEnumerationIncludesDirectoriesPostOrder = 8; + static const NSDirectoryEnumerationProducesRelativePathURLs = 16; +} + final class NSEdgeInsets extends ffi.Struct { @ffi.Double() external double top; @@ -5747,8 +5780,7 @@ extension NSError$Methods on NSError { : objc.ObjCObject($ret, retain: true, release: true); } - /// iOS: introduced 14.5.0 - /// macOS: introduced 11.3.0 + /// underlyingErrors NSArray get underlyingErrors { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -5768,6 +5800,42 @@ extension NSError$Methods on NSError { } } +enum NSExpressionType { + NSConstantValueExpressionType(0), + NSEvaluatedObjectExpressionType(1), + NSVariableExpressionType(2), + NSKeyPathExpressionType(3), + NSFunctionExpressionType(4), + NSUnionSetExpressionType(5), + NSIntersectSetExpressionType(6), + NSMinusSetExpressionType(7), + NSSubqueryExpressionType(13), + NSAggregateExpressionType(14), + NSAnyKeyExpressionType(15), + NSBlockExpressionType(19), + NSConditionalExpressionType(20); + + final int value; + const NSExpressionType(this.value); + + static NSExpressionType fromValue(int value) => switch (value) { + 0 => NSConstantValueExpressionType, + 1 => NSEvaluatedObjectExpressionType, + 2 => NSVariableExpressionType, + 3 => NSKeyPathExpressionType, + 4 => NSFunctionExpressionType, + 5 => NSUnionSetExpressionType, + 6 => NSIntersectSetExpressionType, + 7 => NSMinusSetExpressionType, + 13 => NSSubqueryExpressionType, + 14 => NSAggregateExpressionType, + 15 => NSAnyKeyExpressionType, + 19 => NSBlockExpressionType, + 20 => NSConditionalExpressionType, + _ => throw ArgumentError('Unknown value for NSExpressionType: $value'), + }; +} + /// NSExtendedArray extension NSExtendedArray on NSArray { /// arrayByAddingObject: @@ -6632,6 +6700,23 @@ extension NSExtendedData on NSData { /// NSExtendedDate extension NSExtendedDate on NSDate { + /// addTimeInterval: + @Deprecated('Use dateByAddingTimeInterval instead') + objc.ObjCObject addTimeInterval(double seconds) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSDate.addTimeInterval:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_oa8mke( + _$$ref.pointer, + _sel_addTimeInterval_, + seconds, + ); + return objc.ObjCObject($ret, retain: true, release: true); + } + /// compare: NSComparisonResult compare(NSDate other) { final _$$ref = object$.ref; @@ -7198,6 +7283,26 @@ extension NSExtendedMutableArray on NSMutableArray { ); } + /// removeObjectsFromIndices:numIndices: + @Deprecated('Not supported') + void removeObjectsFromIndices( + ffi.Pointer indices, { + required int numIndices, + }) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSMutableArray.removeObjectsFromIndices:numIndices:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_swohtd( + _$$ref.pointer, + _sel_removeObjectsFromIndices_numIndices_, + indices, + numIndices, + ); + } + /// removeObjectsInArray: void removeObjectsInArray(NSArray otherArray) { final _$$ref = object$.ref; @@ -8964,6 +9069,61 @@ final class NSFastEnumerationState extends ffi.Struct { external ffi.Array extra; } +sealed class NSFileManagerItemReplacementOptions { + static const NSFileManagerItemReplacementUsingNewMetadataOnly = 1; + static const NSFileManagerItemReplacementWithoutDeletingBackupItem = 2; +} + +enum NSFileManagerResumeSyncBehavior { + NSFileManagerResumeSyncBehaviorPreserveLocalChanges(0), + NSFileManagerResumeSyncBehaviorAfterUploadWithFailOnConflict(1), + NSFileManagerResumeSyncBehaviorDropLocalChanges(2); + + final int value; + const NSFileManagerResumeSyncBehavior(this.value); + + static NSFileManagerResumeSyncBehavior fromValue(int value) => + switch (value) { + 0 => NSFileManagerResumeSyncBehaviorPreserveLocalChanges, + 1 => NSFileManagerResumeSyncBehaviorAfterUploadWithFailOnConflict, + 2 => NSFileManagerResumeSyncBehaviorDropLocalChanges, + _ => throw ArgumentError( + 'Unknown value for NSFileManagerResumeSyncBehavior: $value', + ), + }; +} + +sealed class NSFileManagerUnmountOptions { + static const NSFileManagerUnmountAllPartitionsAndEjectDisk = 1; + static const NSFileManagerUnmountWithoutUI = 2; +} + +enum NSFileManagerUploadLocalVersionConflictPolicy { + NSFileManagerUploadConflictPolicyDefault(0), + NSFileManagerUploadConflictPolicyFailOnConflict(1); + + final int value; + const NSFileManagerUploadLocalVersionConflictPolicy(this.value); + + static NSFileManagerUploadLocalVersionConflictPolicy fromValue( + int value, + ) => switch (value) { + 0 => NSFileManagerUploadConflictPolicyDefault, + 1 => NSFileManagerUploadConflictPolicyFailOnConflict, + _ => throw ArgumentError( + 'Unknown value for NSFileManagerUploadLocalVersionConflictPolicy: $value', + ), + }; +} + +sealed class NSFileVersionAddingOptions { + static const NSFileVersionAddingByMoving = 1; +} + +sealed class NSFileVersionReplacingOptions { + static const NSFileVersionReplacingByMoving = 1; +} + /// NSIndexSet extension type NSIndexSet._(objc.ObjCObject object$) implements @@ -9836,7 +9996,7 @@ extension NSInvocation$Methods on NSInvocation { ffi.Pointer> imp, ) { final _$$ref = object$.ref; - _objc_msgSend_hk6irj(_$$ref.pointer, _sel_invokeUsingIMP_, imp); + _objc_msgSend_agmudd(_$$ref.pointer, _sel_invokeUsingIMP_, imp); } /// invokeWithTarget: @@ -11515,7 +11675,7 @@ interface class NSMutableCopying$Builder { isInstanceMethod: true, ), (objc.ObjCObject Function(ffi.Pointer) func) => - ObjCBlock_objcObjCObjectImpl_ffiVoid_NSZone.fromFunction( + ObjCBlock_objcObjCObjectImpl_ffiVoid_NSZone_retained.fromFunction( (ffi.Pointer _, ffi.Pointer arg1) => func(arg1), ), ); @@ -11732,9 +11892,6 @@ extension type NSMutableData._(objc.ObjCObject object$) extension NSMutableData$Methods on NSMutableData { /// compressedDataUsingAlgorithm:error: - /// - /// iOS: introduced 13.0.0 - /// macOS: introduced 10.15.0 NSMutableData? compressedDataUsingAlgorithm( NSDataCompressionAlgorithm algorithm, ) { @@ -11762,9 +11919,6 @@ extension NSMutableData$Methods on NSMutableData { } /// decompressedDataUsingAlgorithm:error: - /// - /// iOS: introduced 13.0.0 - /// macOS: introduced 10.15.0 NSMutableData? decompressedDataUsingAlgorithm( NSDataCompressionAlgorithm algorithm, ) { @@ -14022,9 +14176,6 @@ extension NSMutableString$Methods on NSMutableString { } /// initWithValidatedFormat:validFormatSpecifiers:error: - /// - /// iOS: introduced 16.0.0 - /// macOS: introduced 13.0.0 NSMutableString? initWithValidatedFormat( NSString format, { required NSString validFormatSpecifiers, @@ -14056,9 +14207,6 @@ extension NSMutableString$Methods on NSMutableString { } /// initWithValidatedFormat:validFormatSpecifiers:locale:error: - /// - /// iOS: introduced 16.0.0 - /// macOS: introduced 13.0.0 NSMutableString? initWithValidatedFormat$1( NSString format, { required NSString validFormatSpecifiers, @@ -15127,7 +15275,7 @@ extension type NSObject._(objc.ObjCObject object$) iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); - return _objc_msgSend_1pa9f4m( + return _objc_msgSend_13lsk7w( _class_NSObject, _sel_instanceMethodForSelector_, aSelector, @@ -15285,6 +15433,18 @@ extension NSObject$Methods on NSObject { ); } + /// finalize + @Deprecated('Objective-C garbage collection is no longer supported') + void finalize() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSObject.finalize', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_finalize); + } + /// forwardInvocation: void forwardInvocation(NSInvocation anInvocation) { final _$$ref = object$.ref; @@ -15378,7 +15538,7 @@ extension NSObject$Methods on NSObject { iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); - return _objc_msgSend_1pa9f4m( + return _objc_msgSend_13lsk7w( _$$ref.pointer, _sel_methodForSelector_, aSelector, @@ -16743,9 +16903,6 @@ interface class NSObjectProtocol$Builder { } /// NSOrderedCollectionChange -/// -/// iOS: introduced 13.0.0 -/// macOS: introduced 10.15.0 extension type NSOrderedCollectionChange._(objc.ObjCObject object$) implements objc.ObjCObject, NSObject { /// Constructs a [NSOrderedCollectionChange] that points to the same underlying object as [other]. @@ -16809,9 +16966,6 @@ extension type NSOrderedCollectionChange._(objc.ObjCObject object$) } /// changeWithObject:type:index: - /// - /// iOS: introduced 13.0.0 - /// macOS: introduced 10.15.0 static NSOrderedCollectionChange changeWithObject( objc.ObjCObject? anObject, { required NSCollectionChangeType type, @@ -16838,9 +16992,6 @@ extension type NSOrderedCollectionChange._(objc.ObjCObject object$) } /// changeWithObject:type:index:associatedIndex: - /// - /// iOS: introduced 13.0.0 - /// macOS: introduced 10.15.0 static NSOrderedCollectionChange changeWithObject$1( objc.ObjCObject? anObject, { required NSCollectionChangeType type, @@ -16886,8 +17037,7 @@ extension type NSOrderedCollectionChange._(objc.ObjCObject object$) } extension NSOrderedCollectionChange$Methods on NSOrderedCollectionChange { - /// iOS: introduced 13.0.0 - /// macOS: introduced 10.15.0 + /// associatedIndex int get associatedIndex { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -16898,8 +17048,7 @@ extension NSOrderedCollectionChange$Methods on NSOrderedCollectionChange { return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_associatedIndex); } - /// iOS: introduced 13.0.0 - /// macOS: introduced 10.15.0 + /// changeType NSCollectionChangeType get changeType { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -16911,8 +17060,7 @@ extension NSOrderedCollectionChange$Methods on NSOrderedCollectionChange { return NSCollectionChangeType.fromValue($ret); } - /// iOS: introduced 13.0.0 - /// macOS: introduced 10.15.0 + /// index int get index { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -16924,9 +17072,6 @@ extension NSOrderedCollectionChange$Methods on NSOrderedCollectionChange { } /// initWithObject:type:index: - /// - /// iOS: introduced 13.0.0 - /// macOS: introduced 10.15.0 NSOrderedCollectionChange initWithObject( objc.ObjCObject? anObject, { required NSCollectionChangeType type, @@ -16954,9 +17099,6 @@ extension NSOrderedCollectionChange$Methods on NSOrderedCollectionChange { } /// initWithObject:type:index:associatedIndex: - /// - /// iOS: introduced 13.0.0 - /// macOS: introduced 10.15.0 NSOrderedCollectionChange initWithObject$1( objc.ObjCObject? anObject, { required NSCollectionChangeType type, @@ -16985,8 +17127,7 @@ extension NSOrderedCollectionChange$Methods on NSOrderedCollectionChange { ); } - /// iOS: introduced 13.0.0 - /// macOS: introduced 10.15.0 + /// object objc.ObjCObject? get object { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -17002,9 +17143,6 @@ extension NSOrderedCollectionChange$Methods on NSOrderedCollectionChange { } /// NSOrderedCollectionDifference -/// -/// iOS: introduced 13.0.0 -/// macOS: introduced 10.15.0 extension type NSOrderedCollectionDifference._(objc.ObjCObject object$) implements objc.ObjCObject, NSObject, NSFastEnumeration { /// Constructs a [NSOrderedCollectionDifference] that points to the same underlying object as [other]. @@ -17103,9 +17241,6 @@ extension NSOrderedCollectionDifference$Methods } /// differenceByTransformingChangesWithBlock: - /// - /// iOS: introduced 13.0.0 - /// macOS: introduced 10.15.0 NSOrderedCollectionDifference differenceByTransformingChangesWithBlock( objc.ObjCBlock< NSOrderedCollectionChange Function(NSOrderedCollectionChange) @@ -17131,8 +17266,7 @@ extension NSOrderedCollectionDifference$Methods ); } - /// iOS: introduced 13.0.0 - /// macOS: introduced 10.15.0 + /// hasChanges bool get hasChanges { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -17163,9 +17297,6 @@ extension NSOrderedCollectionDifference$Methods } /// initWithChanges: - /// - /// iOS: introduced 13.0.0 - /// macOS: introduced 10.15.0 NSOrderedCollectionDifference initWithChanges(NSArray changes) { final _$$ref = object$.ref; final _$$ref$1 = changes.ref; @@ -17187,9 +17318,6 @@ extension NSOrderedCollectionDifference$Methods } /// initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects: - /// - /// iOS: introduced 13.0.0 - /// macOS: introduced 10.15.0 NSOrderedCollectionDifference initWithInsertIndexes( NSIndexSet inserts, { NSArray? insertedObjects, @@ -17222,9 +17350,6 @@ extension NSOrderedCollectionDifference$Methods } /// initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:additionalChanges: - /// - /// iOS: introduced 13.0.0 - /// macOS: introduced 10.15.0 NSOrderedCollectionDifference initWithInsertIndexes$1( NSIndexSet inserts, { NSArray? insertedObjects, @@ -17259,8 +17384,7 @@ extension NSOrderedCollectionDifference$Methods ); } - /// iOS: introduced 13.0.0 - /// macOS: introduced 10.15.0 + /// insertions NSArray get insertions { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -17273,9 +17397,6 @@ extension NSOrderedCollectionDifference$Methods } /// inverseDifference - /// - /// iOS: introduced 13.0.0 - /// macOS: introduced 10.15.0 NSOrderedCollectionDifference inverseDifference() { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -17291,8 +17412,7 @@ extension NSOrderedCollectionDifference$Methods ); } - /// iOS: introduced 13.0.0 - /// macOS: introduced 10.15.0 + /// removals NSArray get removals { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -17305,8 +17425,6 @@ extension NSOrderedCollectionDifference$Methods } } -/// iOS: introduced 13.0.0 -/// macOS: introduced 10.15.0 sealed class NSOrderedCollectionDifferenceCalculationOptions { static const NSOrderedCollectionDifferenceCalculationOmitInsertedObjects = 1; static const NSOrderedCollectionDifferenceCalculationOmitRemovedObjects = 2; @@ -18134,6 +18252,31 @@ extension type NSPort._(objc.ObjCObject object$) } extension NSPort$Methods on NSPort { + /// addConnection:toRunLoop:forMode: + @Deprecated('Use NSXPCConnection instead') + void addConnection( + NSConnection conn, { + required NSRunLoop toRunLoop, + required NSString forMode, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = conn.ref; + final _$$ref$2 = toRunLoop.ref; + final _$$ref$3 = forMode.ref; + objc.checkOsVersionInternal( + 'NSPort.addConnection:toRunLoop:forMode:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_r8gdi7( + _$$ref.pointer, + _sel_addConnection_toRunLoop_forMode_, + _$$ref$1.pointer, + _$$ref$2.pointer, + _$$ref$3.pointer, + ); + } + /// delegate NSPortDelegate? delegate() { final _$$ref = object$.ref; @@ -18195,6 +18338,31 @@ extension NSPort$Methods on NSPort { return _objc_msgSend_91o635(_$$ref.pointer, _sel_isValid); } + /// removeConnection:fromRunLoop:forMode: + @Deprecated('Use NSXPCConnection instead') + void removeConnection( + NSConnection conn, { + required NSRunLoop fromRunLoop, + required NSString forMode, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = conn.ref; + final _$$ref$2 = fromRunLoop.ref; + final _$$ref$3 = forMode.ref; + objc.checkOsVersionInternal( + 'NSPort.removeConnection:fromRunLoop:forMode:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_r8gdi7( + _$$ref.pointer, + _sel_removeConnection_fromRunLoop_forMode_, + _$$ref$1.pointer, + _$$ref$2.pointer, + _$$ref$3.pointer, + ); + } + /// removeFromRunLoop:forMode: void removeFromRunLoop(NSRunLoop runLoop, {required NSString forMode}) { final _$$ref = object$.ref; @@ -18617,6 +18785,46 @@ extension NSPortMessage$Methods on NSPortMessage { } } +enum NSPredicateOperatorType { + NSLessThanPredicateOperatorType(0), + NSLessThanOrEqualToPredicateOperatorType(1), + NSGreaterThanPredicateOperatorType(2), + NSGreaterThanOrEqualToPredicateOperatorType(3), + NSEqualToPredicateOperatorType(4), + NSNotEqualToPredicateOperatorType(5), + NSMatchesPredicateOperatorType(6), + NSLikePredicateOperatorType(7), + NSBeginsWithPredicateOperatorType(8), + NSEndsWithPredicateOperatorType(9), + NSInPredicateOperatorType(10), + NSCustomSelectorPredicateOperatorType(11), + NSContainsPredicateOperatorType(99), + NSBetweenPredicateOperatorType(100); + + final int value; + const NSPredicateOperatorType(this.value); + + static NSPredicateOperatorType fromValue(int value) => switch (value) { + 0 => NSLessThanPredicateOperatorType, + 1 => NSLessThanOrEqualToPredicateOperatorType, + 2 => NSGreaterThanPredicateOperatorType, + 3 => NSGreaterThanOrEqualToPredicateOperatorType, + 4 => NSEqualToPredicateOperatorType, + 5 => NSNotEqualToPredicateOperatorType, + 6 => NSMatchesPredicateOperatorType, + 7 => NSLikePredicateOperatorType, + 8 => NSBeginsWithPredicateOperatorType, + 9 => NSEndsWithPredicateOperatorType, + 10 => NSInPredicateOperatorType, + 11 => NSCustomSelectorPredicateOperatorType, + 99 => NSContainsPredicateOperatorType, + 100 => NSBetweenPredicateOperatorType, + _ => throw ArgumentError( + 'Unknown value for NSPredicateOperatorType: $value', + ), + }; +} + /// NSProgress extension type NSProgress._(objc.ObjCObject object$) implements objc.ObjCObject, NSObject { @@ -18644,9 +18852,6 @@ extension type NSProgress._(objc.ObjCObject object$) ); /// addSubscriberForFileURL:withPublishingHandler: - /// - /// iOS: unavailable - /// macOS: introduced 10.9.0 static objc.ObjCObject addSubscriberForFileURL( NSURL url, { required objc.ObjCBlock< @@ -18758,9 +18963,6 @@ extension type NSProgress._(objc.ObjCObject object$) } /// removeSubscriber: - /// - /// iOS: unavailable - /// macOS: introduced 10.9.0 static void removeSubscriber(objc.ObjCObject subscriber) { final _$$ref = subscriber.ref; objc.checkOsVersionInternal( @@ -19015,8 +19217,7 @@ extension NSProgress$Methods on NSProgress { return _objc_msgSend_91o635(_$$ref.pointer, _sel_isIndeterminate); } - /// iOS: unavailable - /// macOS: introduced 10.9.0 + /// isOld bool get isOld { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -19139,9 +19340,6 @@ extension NSProgress$Methods on NSProgress { } /// publish - /// - /// iOS: unavailable - /// macOS: introduced 10.9.0 void publish() { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -19471,9 +19669,6 @@ extension NSProgress$Methods on NSProgress { } /// unpublish - /// - /// iOS: unavailable - /// macOS: introduced 10.9.0 void unpublish() { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -19716,6 +19911,78 @@ extension NSRunLoop$Methods on NSRunLoop { } } +enum NSSearchPathDirectory { + NSApplicationDirectory(1), + NSDemoApplicationDirectory(2), + NSDeveloperApplicationDirectory(3), + NSAdminApplicationDirectory(4), + NSLibraryDirectory(5), + NSDeveloperDirectory(6), + NSUserDirectory(7), + NSDocumentationDirectory(8), + NSDocumentDirectory(9), + NSCoreServiceDirectory(10), + NSAutosavedInformationDirectory(11), + NSDesktopDirectory(12), + NSCachesDirectory(13), + NSApplicationSupportDirectory(14), + NSDownloadsDirectory(15), + NSInputMethodsDirectory(16), + NSMoviesDirectory(17), + NSMusicDirectory(18), + NSPicturesDirectory(19), + NSPrinterDescriptionDirectory(20), + NSSharedPublicDirectory(21), + NSPreferencePanesDirectory(22), + NSApplicationScriptsDirectory(23), + NSItemReplacementDirectory(99), + NSAllApplicationsDirectory(100), + NSAllLibrariesDirectory(101), + NSTrashDirectory(102); + + final int value; + const NSSearchPathDirectory(this.value); + + static NSSearchPathDirectory fromValue(int value) => switch (value) { + 1 => NSApplicationDirectory, + 2 => NSDemoApplicationDirectory, + 3 => NSDeveloperApplicationDirectory, + 4 => NSAdminApplicationDirectory, + 5 => NSLibraryDirectory, + 6 => NSDeveloperDirectory, + 7 => NSUserDirectory, + 8 => NSDocumentationDirectory, + 9 => NSDocumentDirectory, + 10 => NSCoreServiceDirectory, + 11 => NSAutosavedInformationDirectory, + 12 => NSDesktopDirectory, + 13 => NSCachesDirectory, + 14 => NSApplicationSupportDirectory, + 15 => NSDownloadsDirectory, + 16 => NSInputMethodsDirectory, + 17 => NSMoviesDirectory, + 18 => NSMusicDirectory, + 19 => NSPicturesDirectory, + 20 => NSPrinterDescriptionDirectory, + 21 => NSSharedPublicDirectory, + 22 => NSPreferencePanesDirectory, + 23 => NSApplicationScriptsDirectory, + 99 => NSItemReplacementDirectory, + 100 => NSAllApplicationsDirectory, + 101 => NSAllLibrariesDirectory, + 102 => NSTrashDirectory, + _ => throw ArgumentError('Unknown value for NSSearchPathDirectory: $value'), + }; +} + +sealed class NSSearchPathDomainMask { + static const NSUserDomainMask = 1; + static const NSLocalDomainMask = 2; + static const NSNetworkDomainMask = 4; + static const NSSystemDomainMask = 8; + static const NSAllDomainsMask = 65535; +} + /// NSSecureCoding extension type NSSecureCoding._(objc.ObjCProtocol object$) implements objc.ObjCProtocol, NSCoding { @@ -19952,7 +20219,7 @@ interface class NSSecureCoding$Builder { isInstanceMethod: true, ), (Dartinstancetype? Function(NSCoder) func) => - ObjCBlock_instancetype_ffiVoid_NSCoder.fromFunction( + ObjCBlock_instancetype_ffiVoid_NSCoder_retained.fromFunction( (ffi.Pointer _, NSCoder arg1) => func(arg1), ), ); @@ -21289,9 +21556,6 @@ extension NSString$Methods on NSString { } /// initWithValidatedFormat:validFormatSpecifiers:error: - /// - /// iOS: introduced 16.0.0 - /// macOS: introduced 13.0.0 NSString? initWithValidatedFormat( NSString format, { required NSString validFormatSpecifiers, @@ -21323,9 +21587,6 @@ extension NSString$Methods on NSString { } /// initWithValidatedFormat:validFormatSpecifiers:locale:error: - /// - /// iOS: introduced 16.0.0 - /// macOS: introduced 13.0.0 NSString? initWithValidatedFormat$1( NSString format, { required NSString validFormatSpecifiers, @@ -22689,6 +22950,28 @@ extension NSStringExtensionMethods on NSString { } } +enum NSTimeZoneNameStyle { + NSTimeZoneNameStyleStandard(0), + NSTimeZoneNameStyleShortStandard(1), + NSTimeZoneNameStyleDaylightSaving(2), + NSTimeZoneNameStyleShortDaylightSaving(3), + NSTimeZoneNameStyleGeneric(4), + NSTimeZoneNameStyleShortGeneric(5); + + final int value; + const NSTimeZoneNameStyle(this.value); + + static NSTimeZoneNameStyle fromValue(int value) => switch (value) { + 0 => NSTimeZoneNameStyleStandard, + 1 => NSTimeZoneNameStyleShortStandard, + 2 => NSTimeZoneNameStyleDaylightSaving, + 3 => NSTimeZoneNameStyleShortDaylightSaving, + 4 => NSTimeZoneNameStyleGeneric, + 5 => NSTimeZoneNameStyleShortGeneric, + _ => throw ArgumentError('Unknown value for NSTimeZoneNameStyle: $value'), + }; +} + /// NSTimer extension type NSTimer._(objc.ObjCObject object$) implements objc.ObjCObject, NSObject { @@ -23126,9 +23409,6 @@ extension type NSURL._(objc.ObjCObject object$) } /// URLWithString:encodingInvalidCharacters: - /// - /// iOS: introduced 17.0.0 - /// macOS: introduced 14.0.0 static NSURL? URLWithString$1( NSString URLString, { required bool encodingInvalidCharacters, @@ -23782,6 +24062,36 @@ extension NSURL$Methods on NSURL { return NSURL.fromPointer($ret, retain: false, release: true); } + /// initWithScheme:host:path: + @Deprecated( + 'Use NSURLComponents instead, which lets you create a valid URL with any valid combination of URL components and subcomponents (not just scheme, host and path), and lets you set components and subcomponents with either percent-encoded or un-percent-encoded strings.', + ) + NSURL? initWithScheme( + NSString scheme, { + NSString? host, + required NSString path, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = scheme.ref; + final _$$ref$2 = host?.ref; + final _$$ref$3 = path.ref; + objc.checkOsVersionInternal( + 'NSURL.initWithScheme:host:path:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_11spmsz( + _$$ref.retainAndReturnPointer(), + _sel_initWithScheme_host_path_, + _$$ref$1.pointer, + _$$ref$2?.pointer ?? ffi.nullptr, + _$$ref$3.pointer, + ); + return $ret.address == 0 + ? null + : NSURL.fromPointer($ret, retain: false, release: true); + } + /// initWithString: NSURL? initWithString(NSString URLString) { final _$$ref = object$.ref; @@ -23797,9 +24107,6 @@ extension NSURL$Methods on NSURL { } /// initWithString:encodingInvalidCharacters: - /// - /// iOS: introduced 17.0.0 - /// macOS: introduced 14.0.0 NSURL? initWithString$1( NSString URLString, { required bool encodingInvalidCharacters, @@ -23855,8 +24162,7 @@ extension NSURL$Methods on NSURL { return _objc_msgSend_91o635(_$$ref.pointer, _sel_isFileURL); } - /// iOS: introduced 2.0.0, deprecated 13.0.0 - /// macOS: introduced 10.2.0, deprecated 10.15.0 + /// parameterString @Deprecated( 'The parameterString method is deprecated. Post deprecation for applications linked with or after the macOS 10.15, and for all iOS, watchOS, and tvOS applications, parameterString will always return nil, and the path method will return the complete path including the semicolon separator and params component if the URL string contains them.', ) @@ -24156,6 +24462,23 @@ extension type NSURLHandle._(objc.ObjCObject object$) _class_NSURLHandle, ); + /// URLHandleClassForURL: + @Deprecated('Deprecated') + static objc.ObjCObject URLHandleClassForURL(NSURL anURL) { + final _$$ref = anURL.ref; + objc.checkOsVersionInternal( + 'NSURLHandle.URLHandleClassForURL:', + iOS: (true, null), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _class_NSURLHandle, + _sel_URLHandleClassForURL_, + _$$ref.pointer, + ); + return objc.ObjCObject($ret, retain: true, release: true); + } + /// alloc static NSURLHandle alloc() { final $ret = _objc_msgSend_151sglz(_class_NSURLHandle, _sel_alloc); @@ -24172,204 +24495,1147 @@ extension type NSURLHandle._(objc.ObjCObject object$) return NSURLHandle.fromPointer($ret, retain: false, release: true); } + /// cachedHandleForURL: + @Deprecated('Deprecated') + static NSURLHandle cachedHandleForURL(NSURL anURL) { + final _$$ref = anURL.ref; + objc.checkOsVersionInternal( + 'NSURLHandle.cachedHandleForURL:', + iOS: (true, null), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _class_NSURLHandle, + _sel_cachedHandleForURL_, + _$$ref.pointer, + ); + return NSURLHandle.fromPointer($ret, retain: true, release: true); + } + + /// canInitWithURL: + @Deprecated('Deprecated') + static bool canInitWithURL(NSURL anURL) { + final _$$ref = anURL.ref; + objc.checkOsVersionInternal( + 'NSURLHandle.canInitWithURL:', + iOS: (true, null), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_19nvye5( + _class_NSURLHandle, + _sel_canInitWithURL_, + _$$ref.pointer, + ); + } + /// new static NSURLHandle new$() { final $ret = _objc_msgSend_151sglz(_class_NSURLHandle, _sel_new); return NSURLHandle.fromPointer($ret, retain: false, release: true); } + /// registerURLHandleClass: + @Deprecated('Deprecated') + static void registerURLHandleClass(objc.ObjCObject anURLHandleSubclass) { + final _$$ref = anURLHandleSubclass.ref; + objc.checkOsVersionInternal( + 'NSURLHandle.registerURLHandleClass:', + iOS: (true, null), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_xtuoz7( + _class_NSURLHandle, + _sel_registerURLHandleClass_, + _$$ref.pointer, + ); + } + /// Returns a new instance of NSURLHandle constructed with the default `new` method. NSURLHandle() : this.as(new$().object$); } extension NSURLHandle$Methods on NSURLHandle { - /// init - NSURLHandle init() { - final _$$ref$44 = object$.ref; + /// addClient: + @Deprecated('Deprecated') + void addClient(NSURLHandleClient client) { + final _$$ref = object$.ref; + final _$$ref$1 = client.ref; objc.checkOsVersionInternal( - 'NSURLHandle.init', - iOS: (false, (2, 0, 0)), + 'NSURLHandle.addClient:', + iOS: (true, null), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_addClient_, _$$ref$1.pointer); + } + + /// availableResourceData + @Deprecated('Deprecated') + NSData availableResourceData() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURLHandle.availableResourceData', + iOS: (true, null), macOS: (false, (10, 0, 0)), ); final $ret = _objc_msgSend_151sglz( - _$$ref$44.retainAndReturnPointer(), - _sel_init, + _$$ref.pointer, + _sel_availableResourceData, ); - return NSURLHandle.fromPointer($ret, retain: false, release: true); + return NSData.fromPointer($ret, retain: true, release: true); } -} - -enum NSURLHandleStatus { - NSURLHandleNotLoaded(0), - NSURLHandleLoadSucceeded(1), - NSURLHandleLoadInProgress(2), - NSURLHandleLoadFailed(3); - - final int value; - const NSURLHandleStatus(this.value); - - static NSURLHandleStatus fromValue(int value) => switch (value) { - 0 => NSURLHandleNotLoaded, - 1 => NSURLHandleLoadSucceeded, - 2 => NSURLHandleLoadInProgress, - 3 => NSURLHandleLoadFailed, - _ => throw ArgumentError('Unknown value for NSURLHandleStatus: $value'), - }; -} -/// NSValue -extension type NSValue._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject, NSCopying, NSSecureCoding { - /// Constructs a [NSValue] that points to the same underlying object as [other]. - NSValue.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); + /// backgroundLoadDidFailWithReason: + @Deprecated('Deprecated') + void backgroundLoadDidFailWithReason(NSString reason) { + final _$$ref = object$.ref; + final _$$ref$1 = reason.ref; + objc.checkOsVersionInternal( + 'NSURLHandle.backgroundLoadDidFailWithReason:', + iOS: (true, null), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_backgroundLoadDidFailWithReason_, + _$$ref$1.pointer, + ); } - /// Constructs a [NSValue] that wraps the given raw object pointer. - NSValue.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); + /// beginLoadInBackground + @Deprecated('Deprecated') + void beginLoadInBackground() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURLHandle.beginLoadInBackground', + iOS: (true, null), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_beginLoadInBackground); } - /// Returns whether [obj] is an instance of [NSValue]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSValue, - ); - - /// alloc - static NSValue alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSValue, _sel_alloc); - return NSValue.fromPointer($ret, retain: false, release: true); + /// cancelLoadInBackground + @Deprecated('Deprecated') + void cancelLoadInBackground() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURLHandle.cancelLoadInBackground', + iOS: (true, null), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_cancelLoadInBackground); } - /// allocWithZone: - static NSValue allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSValue, - _sel_allocWithZone_, - zone, + /// didLoadBytes:loadComplete: + @Deprecated('Deprecated') + void didLoadBytes(NSData newBytes, {required bool loadComplete}) { + final _$$ref = object$.ref; + final _$$ref$1 = newBytes.ref; + objc.checkOsVersionInternal( + 'NSURLHandle.didLoadBytes:loadComplete:', + iOS: (true, null), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_6p7ndb( + _$$ref.pointer, + _sel_didLoadBytes_loadComplete_, + _$$ref$1.pointer, + loadComplete, ); - return NSValue.fromPointer($ret, retain: false, release: true); } - /// new - static NSValue new$() { - final $ret = _objc_msgSend_151sglz(_class_NSValue, _sel_new); - return NSValue.fromPointer($ret, retain: false, release: true); + /// endLoadInBackground + @Deprecated('Deprecated') + void endLoadInBackground() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURLHandle.endLoadInBackground', + iOS: (true, null), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_endLoadInBackground); } - /// supportsSecureCoding - static bool getSupportsSecureCoding() { - return _objc_msgSend_91o635(_class_NSValue, _sel_supportsSecureCoding); + /// expectedResourceDataSize + @Deprecated('Deprecated') + int expectedResourceDataSize() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURLHandle.expectedResourceDataSize', + iOS: (true, null), + macOS: (false, (10, 3, 0)), + ); + return _objc_msgSend_1k101e3(_$$ref.pointer, _sel_expectedResourceDataSize); } - /// Returns a new instance of NSValue constructed with the default `new` method. - NSValue() : this.as(new$().object$); -} - -extension NSValue$Methods on NSValue { - /// encodeWithCoder: - void encodeWithCoder(NSCoder coder) { - final _$$ref$36 = object$.ref; - final _$$ref$37 = coder.ref; - _objc_msgSend_xtuoz7( - _$$ref$36.pointer, - _sel_encodeWithCoder_, - _$$ref$37.pointer, + /// failureReason + @Deprecated('Deprecated') + NSString failureReason() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURLHandle.failureReason', + iOS: (true, null), + macOS: (false, (10, 0, 0)), ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_failureReason); + return NSString.fromPointer($ret, retain: true, release: true); } - /// getValue:size: - void getValue(ffi.Pointer value, {required int size}) { + /// flushCachedData + @Deprecated('Deprecated') + void flushCachedData() { final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSValue.getValue:size:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + 'NSURLHandle.flushCachedData', + iOS: (true, null), + macOS: (false, (10, 0, 0)), ); - _objc_msgSend_zuf90e(_$$ref.pointer, _sel_getValue_size_, value, size); + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_flushCachedData); } /// init - NSValue init() { - final _$$ref$45 = object$.ref; + NSURLHandle init() { + final _$$ref$44 = object$.ref; objc.checkOsVersionInternal( - 'NSValue.init', + 'NSURLHandle.init', iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); final $ret = _objc_msgSend_151sglz( - _$$ref$45.retainAndReturnPointer(), + _$$ref$44.retainAndReturnPointer(), _sel_init, ); - return NSValue.fromPointer($ret, retain: false, release: true); + return NSURLHandle.fromPointer($ret, retain: false, release: true); } - /// initWithBytes:objCType: - NSValue initWithBytes( - ffi.Pointer value, { - required ffi.Pointer objCType, - }) { - final _$$ref$1 = object$.ref; - final $ret = _objc_msgSend_e9mncn( - _$$ref$1.retainAndReturnPointer(), - _sel_initWithBytes_objCType_, - value, - objCType, + /// initWithURL:cached: + @Deprecated('Deprecated') + objc.ObjCObject initWithURL(NSURL anURL, {required bool cached}) { + final _$$ref = object$.ref; + final _$$ref$1 = anURL.ref; + objc.checkOsVersionInternal( + 'NSURLHandle.initWithURL:cached:', + iOS: (true, null), + macOS: (false, (10, 0, 0)), ); - return NSValue.fromPointer($ret, retain: false, release: true); + final $ret = _objc_msgSend_17amj0z( + _$$ref.retainAndReturnPointer(), + _sel_initWithURL_cached_, + _$$ref$1.pointer, + cached, + ); + return objc.ObjCObject($ret, retain: false, release: true); } - /// initWithCoder: - NSValue? initWithCoder(NSCoder coder) { - final _$$ref$52 = object$.ref; - final _$$ref$53 = coder.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref$52.retainAndReturnPointer(), - _sel_initWithCoder_, - _$$ref$53.pointer, + /// loadInBackground + @Deprecated('Deprecated') + void loadInBackground() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURLHandle.loadInBackground', + iOS: (true, null), + macOS: (false, (10, 0, 0)), ); - return $ret.address == 0 - ? null - : NSValue.fromPointer($ret, retain: false, release: true); + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_loadInBackground); } - /// objCType - ffi.Pointer get objCType { + /// loadInForeground + @Deprecated('Deprecated') + NSData loadInForeground() { final _$$ref = object$.ref; - return _objc_msgSend_1fuqfwb(_$$ref.pointer, _sel_objCType); + objc.checkOsVersionInternal( + 'NSURLHandle.loadInForeground', + iOS: (true, null), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_loadInForeground); + return NSData.fromPointer($ret, retain: true, release: true); } -} -final class NSZone extends ffi.Opaque {} + /// propertyForKey: + @Deprecated('Deprecated') + objc.ObjCObject propertyForKey(NSString propertyKey) { + final _$$ref = object$.ref; + final _$$ref$1 = propertyKey.ref; + objc.checkOsVersionInternal( + 'NSURLHandle.propertyForKey:', + iOS: (true, null), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_propertyForKey_, + _$$ref$1.pointer, + ); + return objc.ObjCObject($ret, retain: true, release: true); + } -/// Construction methods for `objc.ObjCBlock)>`. -abstract final class ObjCBlock_NSArray_ffiVoid { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock)> fromPointer( - ffi.Pointer pointer, { - bool retain = false, - bool release = false, - }) => objc.ObjCBlock)>( - pointer, - retain: retain, - release: release, - ); + /// propertyForKeyIfAvailable: + @Deprecated('Deprecated') + objc.ObjCObject propertyForKeyIfAvailable(NSString propertyKey) { + final _$$ref = object$.ref; + final _$$ref$1 = propertyKey.ref; + objc.checkOsVersionInternal( + 'NSURLHandle.propertyForKeyIfAvailable:', + iOS: (true, null), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_propertyForKeyIfAvailable_, + _$$ref$1.pointer, + ); + return objc.ObjCObject($ret, retain: true, release: true); + } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock)> - fromFunctionPointer( + /// removeClient: + @Deprecated('Deprecated') + void removeClient(NSURLHandleClient client) { + final _$$ref = object$.ref; + final _$$ref$1 = client.ref; + objc.checkOsVersionInternal( + 'NSURLHandle.removeClient:', + iOS: (true, null), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_removeClient_, _$$ref$1.pointer); + } + + /// resourceData + @Deprecated('Deprecated') + NSData resourceData() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURLHandle.resourceData', + iOS: (true, null), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_resourceData); + return NSData.fromPointer($ret, retain: true, release: true); + } + + /// status + @Deprecated('Deprecated') + NSURLHandleStatus status() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURLHandle.status', + iOS: (true, null), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_jtzjjr(_$$ref.pointer, _sel_status); + return NSURLHandleStatus.fromValue($ret); + } + + /// writeData: + @Deprecated('Deprecated') + bool writeData(NSData data) { + final _$$ref = object$.ref; + final _$$ref$1 = data.ref; + objc.checkOsVersionInternal( + 'NSURLHandle.writeData:', + iOS: (true, null), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_writeData_, + _$$ref$1.pointer, + ); + } + + /// writeProperty:forKey: + @Deprecated('Deprecated') + bool writeProperty( + objc.ObjCObject propertyValue, { + required NSString forKey, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = propertyValue.ref; + final _$$ref$2 = forKey.ref; + objc.checkOsVersionInternal( + 'NSURLHandle.writeProperty:forKey:', + iOS: (true, null), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_1lsax7n( + _$$ref.pointer, + _sel_writeProperty_forKey_, + _$$ref$1.pointer, + _$$ref$2.pointer, + ); + } +} + +/// NSURLHandleClient +@Deprecated('Deprecated') +extension type NSURLHandleClient._(objc.ObjCProtocol object$) + implements objc.ObjCProtocol { + /// Constructs a [NSURLHandleClient] that points to the same underlying object as [other]. + NSURLHandleClient.as(objc.ObjCObject other) : object$ = other; + + /// Constructs a [NSURLHandleClient] that wraps the given raw object pointer. + NSURLHandleClient.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLHandleClient]. + static bool conformsTo(objc.ObjCObject obj) { + return _objc_msgSend_e3qsqz( + obj.ref.pointer, + _sel_conformsToProtocol_, + _protocol_NSURLHandleClient, + ); + } +} + +extension NSURLHandleClient$Methods on NSURLHandleClient { + /// URLHandle:resourceDataDidBecomeAvailable: + @Deprecated('Deprecated') + void URLHandle( + NSURLHandle sender, { + required NSData resourceDataDidBecomeAvailable, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = sender.ref; + final _$$ref$2 = resourceDataDidBecomeAvailable.ref; + objc.checkOsVersionInternal( + 'NSURLHandleClient.URLHandle:resourceDataDidBecomeAvailable:', + iOS: (true, null), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_pfv6jd( + _$$ref.pointer, + _sel_URLHandle_resourceDataDidBecomeAvailable_, + _$$ref$1.pointer, + _$$ref$2.pointer, + ); + } + + /// URLHandle:resourceDidFailLoadingWithReason: + @Deprecated('Deprecated') + void URLHandle$1( + NSURLHandle sender, { + required NSString resourceDidFailLoadingWithReason, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = sender.ref; + final _$$ref$2 = resourceDidFailLoadingWithReason.ref; + objc.checkOsVersionInternal( + 'NSURLHandleClient.URLHandle:resourceDidFailLoadingWithReason:', + iOS: (true, null), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_pfv6jd( + _$$ref.pointer, + _sel_URLHandle_resourceDidFailLoadingWithReason_, + _$$ref$1.pointer, + _$$ref$2.pointer, + ); + } + + /// URLHandleResourceDidBeginLoading: + @Deprecated('Deprecated') + void URLHandleResourceDidBeginLoading(NSURLHandle sender) { + final _$$ref = object$.ref; + final _$$ref$1 = sender.ref; + objc.checkOsVersionInternal( + 'NSURLHandleClient.URLHandleResourceDidBeginLoading:', + iOS: (true, null), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_URLHandleResourceDidBeginLoading_, + _$$ref$1.pointer, + ); + } + + /// URLHandleResourceDidCancelLoading: + @Deprecated('Deprecated') + void URLHandleResourceDidCancelLoading(NSURLHandle sender) { + final _$$ref = object$.ref; + final _$$ref$1 = sender.ref; + objc.checkOsVersionInternal( + 'NSURLHandleClient.URLHandleResourceDidCancelLoading:', + iOS: (true, null), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_URLHandleResourceDidCancelLoading_, + _$$ref$1.pointer, + ); + } + + /// URLHandleResourceDidFinishLoading: + @Deprecated('Deprecated') + void URLHandleResourceDidFinishLoading(NSURLHandle sender) { + final _$$ref = object$.ref; + final _$$ref$1 = sender.ref; + objc.checkOsVersionInternal( + 'NSURLHandleClient.URLHandleResourceDidFinishLoading:', + iOS: (true, null), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_URLHandleResourceDidFinishLoading_, + _$$ref$1.pointer, + ); + } +} + +interface class NSURLHandleClient$Builder { + /// Returns the [objc.Protocol] object for this protocol. + static objc.Protocol get $protocol => + objc.Protocol.fromPointer(_protocol_NSURLHandleClient.cast()); + + /// Builds an object that implements the NSURLHandleClient protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + /// + /// If `$keepIsolateAlive` is true, this protocol will keep this isolate + /// alive until it is garbage collected by both Dart and ObjC. + static NSURLHandleClient implement({ + required void Function(NSURLHandle, NSData) + URLHandle_resourceDataDidBecomeAvailable_, + required void Function(NSURLHandle, NSString) + URLHandle_resourceDidFailLoadingWithReason_, + required void Function(NSURLHandle) URLHandleResourceDidBeginLoading_, + required void Function(NSURLHandle) URLHandleResourceDidCancelLoading_, + required void Function(NSURLHandle) URLHandleResourceDidFinishLoading_, + bool $keepIsolateAlive = true, + }) { + final builder = objc.ObjCProtocolBuilder(debugName: 'NSURLHandleClient'); + NSURLHandleClient$Builder + .URLHandle_resourceDataDidBecomeAvailable_.implement( + builder, + URLHandle_resourceDataDidBecomeAvailable_, + ); + NSURLHandleClient$Builder + .URLHandle_resourceDidFailLoadingWithReason_.implement( + builder, + URLHandle_resourceDidFailLoadingWithReason_, + ); + NSURLHandleClient$Builder.URLHandleResourceDidBeginLoading_.implement( + builder, + URLHandleResourceDidBeginLoading_, + ); + NSURLHandleClient$Builder.URLHandleResourceDidCancelLoading_.implement( + builder, + URLHandleResourceDidCancelLoading_, + ); + NSURLHandleClient$Builder.URLHandleResourceDidFinishLoading_.implement( + builder, + URLHandleResourceDidFinishLoading_, + ); + builder.addProtocol($protocol); + return NSURLHandleClient.as( + builder.build(keepIsolateAlive: $keepIsolateAlive), + ); + } + + /// Adds the implementation of the NSURLHandleClient protocol to an existing + /// [objc.ObjCProtocolBuilder]. + /// + /// Note: You cannot call this method after you have called `builder.build`. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, { + required void Function(NSURLHandle, NSData) + URLHandle_resourceDataDidBecomeAvailable_, + required void Function(NSURLHandle, NSString) + URLHandle_resourceDidFailLoadingWithReason_, + required void Function(NSURLHandle) URLHandleResourceDidBeginLoading_, + required void Function(NSURLHandle) URLHandleResourceDidCancelLoading_, + required void Function(NSURLHandle) URLHandleResourceDidFinishLoading_, + bool $keepIsolateAlive = true, + }) { + NSURLHandleClient$Builder + .URLHandle_resourceDataDidBecomeAvailable_.implement( + builder, + URLHandle_resourceDataDidBecomeAvailable_, + ); + NSURLHandleClient$Builder + .URLHandle_resourceDidFailLoadingWithReason_.implement( + builder, + URLHandle_resourceDidFailLoadingWithReason_, + ); + NSURLHandleClient$Builder.URLHandleResourceDidBeginLoading_.implement( + builder, + URLHandleResourceDidBeginLoading_, + ); + NSURLHandleClient$Builder.URLHandleResourceDidCancelLoading_.implement( + builder, + URLHandleResourceDidCancelLoading_, + ); + NSURLHandleClient$Builder.URLHandleResourceDidFinishLoading_.implement( + builder, + URLHandleResourceDidFinishLoading_, + ); + builder.addProtocol($protocol); + } + + /// Builds an object that implements the NSURLHandleClient protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All + /// methods that can be implemented as listeners will be. + /// + /// If `$keepIsolateAlive` is true, this protocol will keep this isolate + /// alive until it is garbage collected by both Dart and ObjC. + static NSURLHandleClient implementAsListener({ + required void Function(NSURLHandle, NSData) + URLHandle_resourceDataDidBecomeAvailable_, + required void Function(NSURLHandle, NSString) + URLHandle_resourceDidFailLoadingWithReason_, + required void Function(NSURLHandle) URLHandleResourceDidBeginLoading_, + required void Function(NSURLHandle) URLHandleResourceDidCancelLoading_, + required void Function(NSURLHandle) URLHandleResourceDidFinishLoading_, + bool $keepIsolateAlive = true, + }) { + final builder = objc.ObjCProtocolBuilder(debugName: 'NSURLHandleClient'); + NSURLHandleClient$Builder + .URLHandle_resourceDataDidBecomeAvailable_.implementAsListener( + builder, + URLHandle_resourceDataDidBecomeAvailable_, + ); + NSURLHandleClient$Builder + .URLHandle_resourceDidFailLoadingWithReason_.implementAsListener( + builder, + URLHandle_resourceDidFailLoadingWithReason_, + ); + NSURLHandleClient$Builder + .URLHandleResourceDidBeginLoading_.implementAsListener( + builder, + URLHandleResourceDidBeginLoading_, + ); + NSURLHandleClient$Builder + .URLHandleResourceDidCancelLoading_.implementAsListener( + builder, + URLHandleResourceDidCancelLoading_, + ); + NSURLHandleClient$Builder + .URLHandleResourceDidFinishLoading_.implementAsListener( + builder, + URLHandleResourceDidFinishLoading_, + ); + builder.addProtocol($protocol); + return NSURLHandleClient.as( + builder.build(keepIsolateAlive: $keepIsolateAlive), + ); + } + + /// Adds the implementation of the NSURLHandleClient protocol to an existing + /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will + /// be. + /// + /// Note: You cannot call this method after you have called `builder.build`. + static void addToBuilderAsListener( + objc.ObjCProtocolBuilder builder, { + required void Function(NSURLHandle, NSData) + URLHandle_resourceDataDidBecomeAvailable_, + required void Function(NSURLHandle, NSString) + URLHandle_resourceDidFailLoadingWithReason_, + required void Function(NSURLHandle) URLHandleResourceDidBeginLoading_, + required void Function(NSURLHandle) URLHandleResourceDidCancelLoading_, + required void Function(NSURLHandle) URLHandleResourceDidFinishLoading_, + bool $keepIsolateAlive = true, + }) { + NSURLHandleClient$Builder + .URLHandle_resourceDataDidBecomeAvailable_.implementAsListener( + builder, + URLHandle_resourceDataDidBecomeAvailable_, + ); + NSURLHandleClient$Builder + .URLHandle_resourceDidFailLoadingWithReason_.implementAsListener( + builder, + URLHandle_resourceDidFailLoadingWithReason_, + ); + NSURLHandleClient$Builder + .URLHandleResourceDidBeginLoading_.implementAsListener( + builder, + URLHandleResourceDidBeginLoading_, + ); + NSURLHandleClient$Builder + .URLHandleResourceDidCancelLoading_.implementAsListener( + builder, + URLHandleResourceDidCancelLoading_, + ); + NSURLHandleClient$Builder + .URLHandleResourceDidFinishLoading_.implementAsListener( + builder, + URLHandleResourceDidFinishLoading_, + ); + builder.addProtocol($protocol); + } + + /// Builds an object that implements the NSURLHandleClient protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All + /// methods that can be implemented as blocking listeners will be. + /// + /// If `$keepIsolateAlive` is true, this protocol will keep this isolate + /// alive until it is garbage collected by both Dart and ObjC. + static NSURLHandleClient implementAsBlocking({ + required void Function(NSURLHandle, NSData) + URLHandle_resourceDataDidBecomeAvailable_, + required void Function(NSURLHandle, NSString) + URLHandle_resourceDidFailLoadingWithReason_, + required void Function(NSURLHandle) URLHandleResourceDidBeginLoading_, + required void Function(NSURLHandle) URLHandleResourceDidCancelLoading_, + required void Function(NSURLHandle) URLHandleResourceDidFinishLoading_, + bool $keepIsolateAlive = true, + }) { + final builder = objc.ObjCProtocolBuilder(debugName: 'NSURLHandleClient'); + NSURLHandleClient$Builder + .URLHandle_resourceDataDidBecomeAvailable_.implementAsBlocking( + builder, + URLHandle_resourceDataDidBecomeAvailable_, + ); + NSURLHandleClient$Builder + .URLHandle_resourceDidFailLoadingWithReason_.implementAsBlocking( + builder, + URLHandle_resourceDidFailLoadingWithReason_, + ); + NSURLHandleClient$Builder + .URLHandleResourceDidBeginLoading_.implementAsBlocking( + builder, + URLHandleResourceDidBeginLoading_, + ); + NSURLHandleClient$Builder + .URLHandleResourceDidCancelLoading_.implementAsBlocking( + builder, + URLHandleResourceDidCancelLoading_, + ); + NSURLHandleClient$Builder + .URLHandleResourceDidFinishLoading_.implementAsBlocking( + builder, + URLHandleResourceDidFinishLoading_, + ); + builder.addProtocol($protocol); + return NSURLHandleClient.as( + builder.build(keepIsolateAlive: $keepIsolateAlive), + ); + } + + /// Adds the implementation of the NSURLHandleClient protocol to an existing + /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as blocking + /// listeners will be. + /// + /// Note: You cannot call this method after you have called `builder.build`. + static void addToBuilderAsBlocking( + objc.ObjCProtocolBuilder builder, { + required void Function(NSURLHandle, NSData) + URLHandle_resourceDataDidBecomeAvailable_, + required void Function(NSURLHandle, NSString) + URLHandle_resourceDidFailLoadingWithReason_, + required void Function(NSURLHandle) URLHandleResourceDidBeginLoading_, + required void Function(NSURLHandle) URLHandleResourceDidCancelLoading_, + required void Function(NSURLHandle) URLHandleResourceDidFinishLoading_, + bool $keepIsolateAlive = true, + }) { + NSURLHandleClient$Builder + .URLHandle_resourceDataDidBecomeAvailable_.implementAsBlocking( + builder, + URLHandle_resourceDataDidBecomeAvailable_, + ); + NSURLHandleClient$Builder + .URLHandle_resourceDidFailLoadingWithReason_.implementAsBlocking( + builder, + URLHandle_resourceDidFailLoadingWithReason_, + ); + NSURLHandleClient$Builder + .URLHandleResourceDidBeginLoading_.implementAsBlocking( + builder, + URLHandleResourceDidBeginLoading_, + ); + NSURLHandleClient$Builder + .URLHandleResourceDidCancelLoading_.implementAsBlocking( + builder, + URLHandleResourceDidCancelLoading_, + ); + NSURLHandleClient$Builder + .URLHandleResourceDidFinishLoading_.implementAsBlocking( + builder, + URLHandleResourceDidFinishLoading_, + ); + builder.addProtocol($protocol); + } + + /// URLHandle:resourceDataDidBecomeAvailable: + static final URLHandle_resourceDataDidBecomeAvailable_ = + objc.ObjCProtocolListenableMethod( + _protocol_NSURLHandleClient, + _sel_URLHandle_resourceDataDidBecomeAvailable_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_fjrv01) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSURLHandleClient, + _sel_URLHandle_resourceDataDidBecomeAvailable_, + isRequired: true, + isInstanceMethod: true, + ), + (void Function(NSURLHandle, NSData) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData.fromFunction( + (ffi.Pointer _, NSURLHandle arg1, NSData arg2) => + func(arg1, arg2), + ), + (void Function(NSURLHandle, NSData) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData.listener( + (ffi.Pointer _, NSURLHandle arg1, NSData arg2) => + func(arg1, arg2), + ), + (void Function(NSURLHandle, NSData) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData.blocking( + (ffi.Pointer _, NSURLHandle arg1, NSData arg2) => + func(arg1, arg2), + ), + ); + + /// URLHandle:resourceDidFailLoadingWithReason: + static final URLHandle_resourceDidFailLoadingWithReason_ = + objc.ObjCProtocolListenableMethod( + _protocol_NSURLHandleClient, + _sel_URLHandle_resourceDidFailLoadingWithReason_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_fjrv01) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSURLHandleClient, + _sel_URLHandle_resourceDidFailLoadingWithReason_, + isRequired: true, + isInstanceMethod: true, + ), + (void Function(NSURLHandle, NSString) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString.fromFunction( + (ffi.Pointer _, NSURLHandle arg1, NSString arg2) => + func(arg1, arg2), + ), + (void Function(NSURLHandle, NSString) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString.listener( + (ffi.Pointer _, NSURLHandle arg1, NSString arg2) => + func(arg1, arg2), + ), + (void Function(NSURLHandle, NSString) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString.blocking( + (ffi.Pointer _, NSURLHandle arg1, NSString arg2) => + func(arg1, arg2), + ), + ); + + /// URLHandleResourceDidBeginLoading: + static final URLHandleResourceDidBeginLoading_ = + objc.ObjCProtocolListenableMethod( + _protocol_NSURLHandleClient, + _sel_URLHandleResourceDidBeginLoading_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_18v1jvf) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSURLHandleClient, + _sel_URLHandleResourceDidBeginLoading_, + isRequired: true, + isInstanceMethod: true, + ), + (void Function(NSURLHandle) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLHandle.fromFunction( + (ffi.Pointer _, NSURLHandle arg1) => func(arg1), + ), + (void Function(NSURLHandle) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLHandle.listener( + (ffi.Pointer _, NSURLHandle arg1) => func(arg1), + ), + (void Function(NSURLHandle) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLHandle.blocking( + (ffi.Pointer _, NSURLHandle arg1) => func(arg1), + ), + ); + + /// URLHandleResourceDidCancelLoading: + static final URLHandleResourceDidCancelLoading_ = + objc.ObjCProtocolListenableMethod( + _protocol_NSURLHandleClient, + _sel_URLHandleResourceDidCancelLoading_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_18v1jvf) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSURLHandleClient, + _sel_URLHandleResourceDidCancelLoading_, + isRequired: true, + isInstanceMethod: true, + ), + (void Function(NSURLHandle) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLHandle.fromFunction( + (ffi.Pointer _, NSURLHandle arg1) => func(arg1), + ), + (void Function(NSURLHandle) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLHandle.listener( + (ffi.Pointer _, NSURLHandle arg1) => func(arg1), + ), + (void Function(NSURLHandle) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLHandle.blocking( + (ffi.Pointer _, NSURLHandle arg1) => func(arg1), + ), + ); + + /// URLHandleResourceDidFinishLoading: + static final URLHandleResourceDidFinishLoading_ = + objc.ObjCProtocolListenableMethod( + _protocol_NSURLHandleClient, + _sel_URLHandleResourceDidFinishLoading_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_18v1jvf) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSURLHandleClient, + _sel_URLHandleResourceDidFinishLoading_, + isRequired: true, + isInstanceMethod: true, + ), + (void Function(NSURLHandle) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLHandle.fromFunction( + (ffi.Pointer _, NSURLHandle arg1) => func(arg1), + ), + (void Function(NSURLHandle) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLHandle.listener( + (ffi.Pointer _, NSURLHandle arg1) => func(arg1), + ), + (void Function(NSURLHandle) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLHandle.blocking( + (ffi.Pointer _, NSURLHandle arg1) => func(arg1), + ), + ); +} + +enum NSURLHandleStatus { + NSURLHandleNotLoaded(0), + NSURLHandleLoadSucceeded(1), + NSURLHandleLoadInProgress(2), + NSURLHandleLoadFailed(3); + + final int value; + const NSURLHandleStatus(this.value); + + static NSURLHandleStatus fromValue(int value) => switch (value) { + 0 => NSURLHandleNotLoaded, + 1 => NSURLHandleLoadSucceeded, + 2 => NSURLHandleLoadInProgress, + 3 => NSURLHandleLoadFailed, + _ => throw ArgumentError('Unknown value for NSURLHandleStatus: $value'), + }; +} + +enum NSURLRelationship { + NSURLRelationshipContains(0), + NSURLRelationshipSame(1), + NSURLRelationshipOther(2); + + final int value; + const NSURLRelationship(this.value); + + static NSURLRelationship fromValue(int value) => switch (value) { + 0 => NSURLRelationshipContains, + 1 => NSURLRelationshipSame, + 2 => NSURLRelationshipOther, + _ => throw ArgumentError('Unknown value for NSURLRelationship: $value'), + }; +} + +/// NSValue +extension type NSValue._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject, NSCopying, NSSecureCoding { + /// Constructs a [NSValue] that points to the same underlying object as [other]. + NSValue.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NSValue] that wraps the given raw object pointer. + NSValue.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + assert(isA(object$)); + } + + /// Returns whether [obj] is an instance of [NSValue]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSValue, + ); + + /// alloc + static NSValue alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSValue, _sel_alloc); + return NSValue.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NSValue allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSValue, + _sel_allocWithZone_, + zone, + ); + return NSValue.fromPointer($ret, retain: false, release: true); + } + + /// new + static NSValue new$() { + final $ret = _objc_msgSend_151sglz(_class_NSValue, _sel_new); + return NSValue.fromPointer($ret, retain: false, release: true); + } + + /// supportsSecureCoding + static bool getSupportsSecureCoding() { + return _objc_msgSend_91o635(_class_NSValue, _sel_supportsSecureCoding); + } + + /// Returns a new instance of NSValue constructed with the default `new` method. + NSValue() : this.as(new$().object$); +} + +extension NSValue$Methods on NSValue { + /// encodeWithCoder: + void encodeWithCoder(NSCoder coder) { + final _$$ref$36 = object$.ref; + final _$$ref$37 = coder.ref; + _objc_msgSend_xtuoz7( + _$$ref$36.pointer, + _sel_encodeWithCoder_, + _$$ref$37.pointer, + ); + } + + /// getValue:size: + void getValue(ffi.Pointer value, {required int size}) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSValue.getValue:size:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + _objc_msgSend_zuf90e(_$$ref.pointer, _sel_getValue_size_, value, size); + } + + /// init + NSValue init() { + final _$$ref$45 = object$.ref; + objc.checkOsVersionInternal( + 'NSValue.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref$45.retainAndReturnPointer(), + _sel_init, + ); + return NSValue.fromPointer($ret, retain: false, release: true); + } + + /// initWithBytes:objCType: + NSValue initWithBytes( + ffi.Pointer value, { + required ffi.Pointer objCType, + }) { + final _$$ref$1 = object$.ref; + final $ret = _objc_msgSend_e9mncn( + _$$ref$1.retainAndReturnPointer(), + _sel_initWithBytes_objCType_, + value, + objCType, + ); + return NSValue.fromPointer($ret, retain: false, release: true); + } + + /// initWithCoder: + NSValue? initWithCoder(NSCoder coder) { + final _$$ref$52 = object$.ref; + final _$$ref$53 = coder.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref$52.retainAndReturnPointer(), + _sel_initWithCoder_, + _$$ref$53.pointer, + ); + return $ret.address == 0 + ? null + : NSValue.fromPointer($ret, retain: false, release: true); + } + + /// objCType + ffi.Pointer get objCType { + final _$$ref = object$.ref; + return _objc_msgSend_1fuqfwb(_$$ref.pointer, _sel_objCType); + } +} + +sealed class NSVolumeEnumerationOptions { + static const NSVolumeEnumerationSkipHiddenVolumes = 2; + static const NSVolumeEnumerationProduceFileReferenceURLs = 4; +} + +final class NSZone extends ffi.Opaque {} + +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_NSArray_ffiVoid { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock)> fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => objc.ObjCBlock)>( + pointer, + retain: retain, + release: release, + ); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> + fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer arg0) @@ -24640,41 +25906,498 @@ extension ObjCBlock_NSComparisonResult_objcObjCObjectImpl_objcObjCObjectImpl$Cal } } -/// Construction methods for `objc.ObjCBlock, NSString)>`. -abstract final class ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString { +/// Construction methods for `objc.ObjCBlock, NSString)>`. +abstract final class ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock, NSString)> + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => objc.ObjCBlock, NSString)>( + pointer, + retain: retain, + release: release, + ); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSString)> + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) + > + > + ptr, + ) => objc.ObjCBlock, NSString)>( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock, NSString)> + fromFunction( + NSItemProviderRepresentationVisibility Function( + ffi.Pointer, + NSString, + ) + fn, { + bool keepIsolateAlive = true, + }) => objc.ObjCBlock, NSString)>( + objc.newClosureBlock(_closureCallable, ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return fn( + arg0, + NSString.fromPointer(arg1, retain: true, release: true), + ).value; + }, keepIsolateAlive), + retain: false, + release: true, + ); + + static int _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) + > + >() + .asFunction< + int Function(ffi.Pointer, ffi.Pointer) + >()(arg0, arg1); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline, 0) + .cast(); + static int _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ) => + (objc.getBlockClosure(block) + as int Function( + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline, 0) + .cast(); +} + +/// Call operator for `objc.ObjCBlock, NSString)>`. +extension ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString$CallExtension + on objc.ObjCBlock, NSString)> { + NSItemProviderRepresentationVisibility call( + ffi.Pointer arg0, + NSString arg1, + ) { + final _$$ref = arg1.ref; + return NSItemProviderRepresentationVisibility.fromValue( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ) + > + >() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(ref.pointer, arg0, _$$ref.pointer), + ); + } +} + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + NSOrderedCollectionChange Function(NSOrderedCollectionChange) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + NSOrderedCollectionChange Function(NSOrderedCollectionChange) + >(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + NSOrderedCollectionChange Function(NSOrderedCollectionChange) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ) + > + > + ptr, + ) => + objc.ObjCBlock< + NSOrderedCollectionChange Function(NSOrderedCollectionChange) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + NSOrderedCollectionChange Function(NSOrderedCollectionChange) + > + fromFunction( + NSOrderedCollectionChange Function(NSOrderedCollectionChange) fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + NSOrderedCollectionChange Function(NSOrderedCollectionChange) + >( + objc.newClosureBlock(_closureCallable, ( + ffi.Pointer arg0, + ) { + final _$$ref = fn( + NSOrderedCollectionChange.fromPointer( + arg0, + retain: true, + release: true, + ), + ).ref; + return _$$ref.retainAndAutorelease(); + }, keepIsolateAlive), + retain: false, + release: true, + ); + + static ffi.Pointer _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); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static ffi.Pointer _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) => + (objc.getBlockClosure(block) + as ffi.Pointer Function( + ffi.Pointer, + ))(arg0); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange$CallExtension + on + objc.ObjCBlock< + NSOrderedCollectionChange Function(NSOrderedCollectionChange) + > { + NSOrderedCollectionChange call(NSOrderedCollectionChange arg0) { + final _$$ref$1 = arg0.ref; + return NSOrderedCollectionChange.fromPointer( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + >()(ref.pointer, _$$ref$1.pointer), + retain: true, + release: true, + ); + } +} + +/// Construction methods for `objc.ObjCBlock? Function(NSProgress)>`. +abstract final class ObjCBlock_NSProgressUnpublishingHandler_NSProgress { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + objc.ObjCBlock? Function(NSProgress) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock? Function(NSProgress)>( + pointer, + retain: retain, + release: release, + ); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + objc.ObjCBlock? Function(NSProgress) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ) + > + > + ptr, + ) => + objc.ObjCBlock? Function(NSProgress)>( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + objc.ObjCBlock? Function(NSProgress) + > + fromFunction( + objc.ObjCBlock? Function(NSProgress) fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock? Function(NSProgress)>( + objc.newClosureBlock(_closureCallable, ( + ffi.Pointer arg0, + ) { + final _$$ref = fn( + NSProgress.fromPointer(arg0, retain: true, release: true), + )?.ref; + return _$$ref?.retainAndAutorelease() ?? ffi.nullptr; + }, keepIsolateAlive), + retain: false, + release: true, + ); + + static ffi.Pointer _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); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static ffi.Pointer _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) => + (objc.getBlockClosure(block) + as ffi.Pointer Function( + ffi.Pointer, + ))(arg0); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock? Function(NSProgress)>`. +extension ObjCBlock_NSProgressUnpublishingHandler_NSProgress$CallExtension + on + objc.ObjCBlock< + objc.ObjCBlock? Function(NSProgress) + > { + objc.ObjCBlock? call(NSProgress arg0) { + final _$$ref$1 = arg0.ref; + return ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + >()(ref.pointer, _$$ref$1.pointer) + .address == + 0 + ? null + : ObjCBlock_ffiVoid.fromPointer( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + >()(ref.pointer, _$$ref$1.pointer), + retain: true, + release: true, + ); + } +} + +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_NSProgress_ffiVoidNSDataNSError { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock, NSString)> + static objc.ObjCBlock< + NSProgress? Function(objc.ObjCBlock) + > fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => objc.ObjCBlock, NSString)>( - pointer, - retain: retain, - release: release, - ); + }) => + objc.ObjCBlock< + NSProgress? Function( + objc.ObjCBlock, + ) + >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, NSString)> + static objc.ObjCBlock< + NSProgress? Function(objc.ObjCBlock) + > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer Function( + ffi.Pointer arg0, ) > > ptr, - ) => objc.ObjCBlock, NSString)>( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); + ) => + objc.ObjCBlock< + NSProgress? Function( + objc.ObjCBlock, + ) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); /// Creates a block from a Dart function. /// @@ -24684,109 +26407,134 @@ abstract final class ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NS /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock, NSString)> + static objc.ObjCBlock< + NSProgress? Function(objc.ObjCBlock) + > fromFunction( - NSItemProviderRepresentationVisibility Function( - ffi.Pointer, - NSString, - ) + NSProgress? Function(objc.ObjCBlock) fn, { bool keepIsolateAlive = true, - }) => objc.ObjCBlock, NSString)>( - objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - return fn( - arg0, - NSString.fromPointer(arg1, retain: true, release: true), - ).value; - }, keepIsolateAlive), - retain: false, - release: true, - ); + }) => + objc.ObjCBlock< + NSProgress? Function( + objc.ObjCBlock, + ) + >( + objc.newClosureBlock(_closureCallable, ( + ffi.Pointer arg0, + ) { + final _$$ref = fn( + ObjCBlock_ffiVoid_NSData_NSError.fromPointer( + arg0, + retain: true, + release: true, + ), + )?.ref; + return _$$ref?.retainAndAutorelease() ?? ffi.nullptr; + }, keepIsolateAlive), + retain: false, + release: true, + ); - static int _fnPtrTrampoline( + static ffi.Pointer _fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, ) => block.ref.target .cast< ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer Function( + ffi.Pointer arg0, ) > >() .asFunction< - int Function(ffi.Pointer, ffi.Pointer) - >()(arg0, arg1); + ffi.Pointer Function( + ffi.Pointer, + ) + >()(arg0); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Long Function( + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ) - >(_fnPtrTrampoline, 0) + >(_fnPtrTrampoline) .cast(); - static int _closureTrampoline( + static ffi.Pointer _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, ) => (objc.getBlockClosure(block) - as int Function( - ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1); + as ffi.Pointer Function( + ffi.Pointer, + ))(arg0); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< - ffi.Long Function( + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ) - >(_closureTrampoline, 0) + >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock, NSString)>`. -extension ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString$CallExtension - on objc.ObjCBlock, NSString)> { - NSItemProviderRepresentationVisibility call( - ffi.Pointer arg0, - NSString arg1, - ) { - final _$$ref = arg1.ref; - return NSItemProviderRepresentationVisibility.fromValue( - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ) - > - >() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >()(ref.pointer, arg0, _$$ref.pointer), - ); +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_NSProgress_ffiVoidNSDataNSError$CallExtension + on + objc.ObjCBlock< + NSProgress? Function( + objc.ObjCBlock, + ) + > { + NSProgress? call(objc.ObjCBlock arg0) { + final _$$ref$1 = arg0.ref; + return ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + >()(ref.pointer, _$$ref$1.pointer) + .address == + 0 + ? null + : NSProgress.fromPointer( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + >()(ref.pointer, _$$ref$1.pointer), + retain: true, + release: true, + ); } } -/// Construction methods for `objc.ObjCBlock`. -abstract final class ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange { +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_NSProgress_ffiVoidNSURLboolNSError { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - NSOrderedCollectionChange Function(NSOrderedCollectionChange) + NSProgress? Function( + objc.ObjCBlock, + ) > fromPointer( ffi.Pointer pointer, { @@ -24794,7 +26542,9 @@ abstract final class ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChan bool release = false, }) => objc.ObjCBlock< - NSOrderedCollectionChange Function(NSOrderedCollectionChange) + NSProgress? Function( + objc.ObjCBlock, + ) >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. @@ -24803,20 +26553,24 @@ abstract final class ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChan /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - NSOrderedCollectionChange Function(NSOrderedCollectionChange) + NSProgress? Function( + objc.ObjCBlock, + ) > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer arg0, + ffi.Pointer arg0, ) > > ptr, ) => objc.ObjCBlock< - NSOrderedCollectionChange Function(NSOrderedCollectionChange) + NSProgress? Function( + objc.ObjCBlock, + ) >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, @@ -24832,26 +26586,33 @@ abstract final class ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChan /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - NSOrderedCollectionChange Function(NSOrderedCollectionChange) + NSProgress? Function( + objc.ObjCBlock, + ) > fromFunction( - NSOrderedCollectionChange Function(NSOrderedCollectionChange) fn, { + NSProgress? Function( + objc.ObjCBlock, + ) + fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< - NSOrderedCollectionChange Function(NSOrderedCollectionChange) + NSProgress? Function( + objc.ObjCBlock, + ) >( objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, + ffi.Pointer arg0, ) { final _$$ref = fn( - NSOrderedCollectionChange.fromPointer( + ObjCBlock_ffiVoid_NSURL_bool_NSError.fromPointer( arg0, retain: true, release: true, ), - ).ref; - return _$$ref.retainAndAutorelease(); + )?.ref; + return _$$ref?.retainAndAutorelease() ?? ffi.nullptr; }, keepIsolateAlive), retain: false, release: true, @@ -24859,92 +26620,120 @@ abstract final class ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChan static ffi.Pointer _fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, ) => block.ref.target .cast< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer arg0, + ffi.Pointer arg0, ) > >() .asFunction< ffi.Pointer Function( - ffi.Pointer, + ffi.Pointer, ) >()(arg0); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Pointer Function( ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static ffi.Pointer _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, ) => (objc.getBlockClosure(block) as ffi.Pointer Function( - ffi.Pointer, + ffi.Pointer, ))(arg0); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Pointer Function( ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange$CallExtension +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_NSProgress_ffiVoidNSURLboolNSError$CallExtension on objc.ObjCBlock< - NSOrderedCollectionChange Function(NSOrderedCollectionChange) + NSProgress? Function( + objc.ObjCBlock, + ) > { - NSOrderedCollectionChange call(NSOrderedCollectionChange arg0) { + NSProgress? call( + objc.ObjCBlock arg0, + ) { final _$$ref$1 = arg0.ref; - return NSOrderedCollectionChange.fromPointer( - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer block, - ffi.Pointer arg0, - ) - > - >() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - >()(ref.pointer, _$$ref$1.pointer), - retain: true, - release: true, - ); + return ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + >()(ref.pointer, _$$ref$1.pointer) + .address == + 0 + ? null + : NSProgress.fromPointer( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + >()(ref.pointer, _$$ref$1.pointer), + retain: true, + release: true, + ); } } -/// Construction methods for `objc.ObjCBlock? Function(NSProgress)>`. -abstract final class ObjCBlock_NSProgressUnpublishingHandler_NSProgress { +/// Construction methods for `objc.ObjCBlock, NSString, objc.ObjCBlock)>`. +abstract final class ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - objc.ObjCBlock? Function(NSProgress) + NSProgress? Function( + ffi.Pointer, + NSString, + objc.ObjCBlock, + ) > fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, }) => - objc.ObjCBlock? Function(NSProgress)>( - pointer, - retain: retain, - release: release, - ); + objc.ObjCBlock< + NSProgress? Function( + ffi.Pointer, + NSString, + objc.ObjCBlock, + ) + >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. /// @@ -24952,19 +26741,31 @@ abstract final class ObjCBlock_NSProgressUnpublishingHandler_NSProgress { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - objc.ObjCBlock? Function(NSProgress) + NSProgress? Function( + ffi.Pointer, + NSString, + objc.ObjCBlock, + ) > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) > > ptr, ) => - objc.ObjCBlock? Function(NSProgress)>( + objc.ObjCBlock< + NSProgress? Function( + ffi.Pointer, + NSString, + objc.ObjCBlock, + ) + >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, release: true, @@ -24979,18 +26780,41 @@ abstract final class ObjCBlock_NSProgressUnpublishingHandler_NSProgress { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - objc.ObjCBlock? Function(NSProgress) + NSProgress? Function( + ffi.Pointer, + NSString, + objc.ObjCBlock, + ) > fromFunction( - objc.ObjCBlock? Function(NSProgress) fn, { + NSProgress? Function( + ffi.Pointer, + NSString, + objc.ObjCBlock, + ) + fn, { bool keepIsolateAlive = true, }) => - objc.ObjCBlock? Function(NSProgress)>( + objc.ObjCBlock< + NSProgress? Function( + ffi.Pointer, + NSString, + objc.ObjCBlock, + ) + >( objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { final _$$ref = fn( - NSProgress.fromPointer(arg0, retain: true, release: true), + arg0, + NSString.fromPointer(arg1, retain: true, release: true), + ObjCBlock_ffiVoid_NSData_NSError.fromPointer( + arg2, + retain: true, + release: true, + ), )?.ref; return _$$ref?.retainAndAutorelease() ?? ffi.nullptr; }, keepIsolateAlive), @@ -24998,101 +26822,136 @@ abstract final class ObjCBlock_NSProgressUnpublishingHandler_NSProgress { release: true, ); - static ffi.Pointer _fnPtrTrampoline( + static ffi.Pointer _fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) => block.ref.target .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) > >() .asFunction< - ffi.Pointer Function( + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) - >()(arg0); + >()(arg0, arg1, arg2); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function( + ffi.Pointer Function( ffi.Pointer, + ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); - static ffi.Pointer _closureTrampoline( + static ffi.Pointer _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) => (objc.getBlockClosure(block) - as ffi.Pointer Function( + as ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, - ))(arg0); + ffi.Pointer, + ))(arg0, arg1, arg2); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function( + ffi.Pointer Function( ffi.Pointer, + ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock? Function(NSProgress)>`. -extension ObjCBlock_NSProgressUnpublishingHandler_NSProgress$CallExtension +/// Call operator for `objc.ObjCBlock, NSString, objc.ObjCBlock)>`. +extension ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError$CallExtension on objc.ObjCBlock< - objc.ObjCBlock? Function(NSProgress) + NSProgress? Function( + ffi.Pointer, + NSString, + objc.ObjCBlock, + ) > { - objc.ObjCBlock? call(NSProgress arg0) { - final _$$ref$1 = arg0.ref; + NSProgress? call( + ffi.Pointer arg0, + NSString arg1, + objc.ObjCBlock arg2, + ) { + final _$$ref$1 = arg1.ref; + final _$$ref$2 = arg2.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Pointer Function( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) > >() .asFunction< - ffi.Pointer Function( + ffi.Pointer Function( ffi.Pointer, + ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) - >()(ref.pointer, _$$ref$1.pointer) + >()(ref.pointer, arg0, _$$ref$1.pointer, _$$ref$2.pointer) .address == 0 ? null - : ObjCBlock_ffiVoid.fromPointer( + : NSProgress.fromPointer( ref.pointer.ref.invoke .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Pointer Function( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) > >() .asFunction< - ffi.Pointer Function( + ffi.Pointer Function( ffi.Pointer, + ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) - >()(ref.pointer, _$$ref$1.pointer), + >()(ref.pointer, arg0, _$$ref$1.pointer, _$$ref$2.pointer), retain: true, release: true, ); } } -/// Construction methods for `objc.ObjCBlock)>`. -abstract final class ObjCBlock_NSProgress_ffiVoidNSDataNSError { +/// Construction methods for `objc.ObjCBlock?, NSError?)>)>`. +abstract final class ObjCBlock_NSProgress_ffiVoididNSItemProviderWritingNSError { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - NSProgress? Function(objc.ObjCBlock) + NSProgress? Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError?) + >, + ) > fromPointer( ffi.Pointer pointer, { @@ -25101,7 +26960,9 @@ abstract final class ObjCBlock_NSProgress_ffiVoidNSDataNSError { }) => objc.ObjCBlock< NSProgress? Function( - objc.ObjCBlock, + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError?) + >, ) >(pointer, retain: retain, release: release); @@ -25111,7 +26972,11 @@ abstract final class ObjCBlock_NSProgress_ffiVoidNSDataNSError { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - NSProgress? Function(objc.ObjCBlock) + NSProgress? Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError?) + >, + ) > fromFunctionPointer( ffi.Pointer< @@ -25125,7 +26990,9 @@ abstract final class ObjCBlock_NSProgress_ffiVoidNSDataNSError { ) => objc.ObjCBlock< NSProgress? Function( - objc.ObjCBlock, + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError?) + >, ) >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), @@ -25142,23 +27009,33 @@ abstract final class ObjCBlock_NSProgress_ffiVoidNSDataNSError { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - NSProgress? Function(objc.ObjCBlock) + NSProgress? Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError?) + >, + ) > fromFunction( - NSProgress? Function(objc.ObjCBlock) + NSProgress? Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError?) + >, + ) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< NSProgress? Function( - objc.ObjCBlock, + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError?) + >, ) >( objc.newClosureBlock(_closureCallable, ( ffi.Pointer arg0, ) { final _$$ref = fn( - ObjCBlock_ffiVoid_NSData_NSError.fromPointer( + ObjCBlock_ffiVoid_idNSItemProviderWriting_NSError.fromPointer( arg0, retain: true, release: true, @@ -25212,15 +27089,22 @@ abstract final class ObjCBlock_NSProgress_ffiVoidNSDataNSError { .cast(); } -/// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_NSProgress_ffiVoidNSDataNSError$CallExtension +/// Call operator for `objc.ObjCBlock?, NSError?)>)>`. +extension ObjCBlock_NSProgress_ffiVoididNSItemProviderWritingNSError$CallExtension on objc.ObjCBlock< NSProgress? Function( - objc.ObjCBlock, + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError?) + >, ) > { - NSProgress? call(objc.ObjCBlock arg0) { + NSProgress? call( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError?) + > + arg0, + ) { final _$$ref$1 = arg0.ref; return ref.pointer.ref.invoke .cast< @@ -25262,12 +27146,235 @@ extension ObjCBlock_NSProgress_ffiVoidNSDataNSError$CallExtension } } -/// Construction methods for `objc.ObjCBlock)>`. -abstract final class ObjCBlock_NSProgress_ffiVoidNSURLboolNSError { +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_NSString_ffiVoid { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock)> fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => objc.ObjCBlock)>( + pointer, + retain: retain, + release: release, + ); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer arg0) + > + > + ptr, + ) => objc.ObjCBlock)>( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock)> fromFunction( + NSString Function(ffi.Pointer) fn, { + bool keepIsolateAlive = true, + }) => objc.ObjCBlock)>( + objc.newClosureBlock(_closureCallable, (ffi.Pointer arg0) { + final _$$ref = fn(arg0).ref; + return _$$ref.retainAndAutorelease(); + }, keepIsolateAlive), + retain: false, + release: true, + ); + + static ffi.Pointer _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); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static ffi.Pointer _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) => + (objc.getBlockClosure(block) + as ffi.Pointer Function(ffi.Pointer))( + arg0, + ); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_NSString_ffiVoid$CallExtension + on objc.ObjCBlock)> { + NSString call(ffi.Pointer arg0) { + return NSString.fromPointer( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + >()(ref.pointer, arg0), + retain: true, + release: true, + ); + } +} + +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_NSUInteger_ffiVoid { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock)> + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => objc.ObjCBlock)>( + pointer, + retain: retain, + release: release, + ); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction arg0)> + > + ptr, + ) => objc.ObjCBlock)>( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock)> + fromFunction( + int Function(ffi.Pointer) fn, { + bool keepIsolateAlive = true, + }) => objc.ObjCBlock)>( + objc.newClosureBlock(_closureCallable, (ffi.Pointer arg0) { + return fn(arg0); + }, keepIsolateAlive), + retain: false, + release: true, + ); + + static int _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) => block.ref.target + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer arg0) + > + >() + .asFunction)>()(arg0); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline, 0) + .cast(); + static int _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) => (objc.getBlockClosure(block) as int Function(ffi.Pointer))( + arg0, + ); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline, 0) + .cast(); +} + +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_NSUInteger_ffiVoid$CallExtension + on objc.ObjCBlock)> { + int call(ffi.Pointer arg0) { + return ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer block, + ffi.Pointer arg0, + ) + > + >() + .asFunction< + int Function(ffi.Pointer, ffi.Pointer) + >()(ref.pointer, arg0); + } +} + +/// Construction methods for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)>`. +abstract final class ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObjectImpl_NSUInteger { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - NSProgress? Function( - objc.ObjCBlock, + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong, ) > fromPointer( @@ -25276,8 +27383,11 @@ abstract final class ObjCBlock_NSProgress_ffiVoidNSURLboolNSError { bool release = false, }) => objc.ObjCBlock< - NSProgress? Function( - objc.ObjCBlock, + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong, ) >(pointer, retain: retain, release: release); @@ -25287,23 +27397,32 @@ abstract final class ObjCBlock_NSProgress_ffiVoidNSURLboolNSError { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - NSProgress? Function( - objc.ObjCBlock, + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong, ) > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, + ffi.UnsignedLong Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + ffi.UnsignedLong arg3, ) > > ptr, ) => objc.ObjCBlock< - NSProgress? Function( - objc.ObjCBlock, + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong, ) >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), @@ -25320,190 +27439,179 @@ abstract final class ObjCBlock_NSProgress_ffiVoidNSURLboolNSError { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - NSProgress? Function( - objc.ObjCBlock, + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong, ) > fromFunction( - NSProgress? Function( - objc.ObjCBlock, + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + int, ) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< - NSProgress? Function( - objc.ObjCBlock, + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong, ) >( objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + int arg3, ) { - final _$$ref = fn( - ObjCBlock_ffiVoid_NSURL_bool_NSError.fromPointer( - arg0, - retain: true, - release: true, - ), - )?.ref; - return _$$ref?.retainAndAutorelease() ?? ffi.nullptr; + return fn(arg0, arg1, arg2, arg3); }, keepIsolateAlive), retain: false, release: true, ); - static ffi.Pointer _fnPtrTrampoline( + static int _fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + int arg3, ) => block.ref.target .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, + ffi.UnsignedLong Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + ffi.UnsignedLong arg3, ) > >() .asFunction< - ffi.Pointer Function( - ffi.Pointer, + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + int, ) - >()(arg0); + >()(arg0, arg1, arg2, arg3); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, + ffi.UnsignedLong Function( ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong, ) - >(_fnPtrTrampoline) + >(_fnPtrTrampoline, 0) .cast(); - static ffi.Pointer _closureTrampoline( + static int _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + int arg3, ) => (objc.getBlockClosure(block) - as ffi.Pointer Function( - ffi.Pointer, - ))(arg0); + as int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + int, + ))(arg0, arg1, arg2, arg3); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, + ffi.UnsignedLong Function( ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong, ) - >(_closureTrampoline) + >(_closureTrampoline, 0) .cast(); } -/// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_NSProgress_ffiVoidNSURLboolNSError$CallExtension +/// Call operator for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)>`. +extension ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObjectImpl_NSUInteger$CallExtension on objc.ObjCBlock< - NSProgress? Function( - objc.ObjCBlock, + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong, ) > { - NSProgress? call( - objc.ObjCBlock arg0, + int call( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + int arg3, ) { - final _$$ref$1 = arg0.ref; return ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer block, - ffi.Pointer arg0, - ) - > - >() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - >()(ref.pointer, _$$ref$1.pointer) - .address == - 0 - ? null - : NSProgress.fromPointer( - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer block, - ffi.Pointer arg0, - ) - > - >() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - >()(ref.pointer, _$$ref$1.pointer), - retain: true, - release: true, - ); + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + ffi.UnsignedLong arg3, + ) + > + >() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + int, + ) + >()(ref.pointer, arg0, arg1, arg2, arg3); } } -/// Construction methods for `objc.ObjCBlock, NSString, objc.ObjCBlock)>`. -abstract final class ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError { +/// Construction methods for `objc.ObjCBlock Function(ffi.Pointer)>`. +abstract final class ObjCBlock_NSZone_ffiVoid { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - NSProgress? Function( - ffi.Pointer, - NSString, - objc.ObjCBlock, - ) - > + static objc.ObjCBlock Function(ffi.Pointer)> fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => - objc.ObjCBlock< - NSProgress? Function( - ffi.Pointer, - NSString, - objc.ObjCBlock, - ) - >(pointer, retain: retain, release: release); + }) => objc.ObjCBlock Function(ffi.Pointer)>( + pointer, + retain: retain, + release: release, + ); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock< - NSProgress? Function( - ffi.Pointer, - NSString, - objc.ObjCBlock, - ) - > + static objc.ObjCBlock Function(ffi.Pointer)> fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ) + ffi.Pointer Function(ffi.Pointer arg0) > > ptr, - ) => - objc.ObjCBlock< - NSProgress? Function( - ffi.Pointer, - NSString, - objc.ObjCBlock, - ) - >( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); + ) => objc.ObjCBlock Function(ffi.Pointer)>( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); /// Creates a block from a Dart function. /// @@ -25513,178 +27621,82 @@ abstract final class ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock< - NSProgress? Function( - ffi.Pointer, - NSString, - objc.ObjCBlock, - ) - > + static objc.ObjCBlock Function(ffi.Pointer)> fromFunction( - NSProgress? Function( - ffi.Pointer, - NSString, - objc.ObjCBlock, - ) - fn, { + ffi.Pointer Function(ffi.Pointer) fn, { bool keepIsolateAlive = true, - }) => - objc.ObjCBlock< - NSProgress? Function( - ffi.Pointer, - NSString, - objc.ObjCBlock, - ) - >( - objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ) { - final _$$ref = fn( - arg0, - NSString.fromPointer(arg1, retain: true, release: true), - ObjCBlock_ffiVoid_NSData_NSError.fromPointer( - arg2, - retain: true, - release: true, - ), - )?.ref; - return _$$ref?.retainAndAutorelease() ?? ffi.nullptr; - }, keepIsolateAlive), - retain: false, - release: true, - ); + }) => objc.ObjCBlock Function(ffi.Pointer)>( + objc.newClosureBlock(_closureCallable, (ffi.Pointer arg0) { + return fn(arg0); + }, keepIsolateAlive), + retain: false, + release: true, + ); - static ffi.Pointer _fnPtrTrampoline( + static ffi.Pointer _fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, ) => block.ref.target .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ) + ffi.Pointer Function(ffi.Pointer arg0) > >() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >()(arg0, arg1, arg2); + .asFunction Function(ffi.Pointer)>()(arg0); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); - static ffi.Pointer _closureTrampoline( + static ffi.Pointer _closureTrampoline( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, ) => (objc.getBlockClosure(block) - as ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1, arg2); + as ffi.Pointer Function(ffi.Pointer))(arg0); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock, NSString, objc.ObjCBlock)>`. -extension ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError$CallExtension - on - objc.ObjCBlock< - NSProgress? Function( +/// Call operator for `objc.ObjCBlock Function(ffi.Pointer)>`. +extension ObjCBlock_NSZone_ffiVoid$CallExtension + on objc.ObjCBlock Function(ffi.Pointer)> { + ffi.Pointer call(ffi.Pointer arg0) { + return ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, - NSString, - objc.ObjCBlock, ) - > { - NSProgress? call( - ffi.Pointer arg0, - NSString arg1, - objc.ObjCBlock arg2, - ) { - final _$$ref$1 = arg1.ref; - final _$$ref$2 = arg2.ref; - return ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ) - > - >() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >()(ref.pointer, arg0, _$$ref$1.pointer, _$$ref$2.pointer) - .address == - 0 - ? null - : NSProgress.fromPointer( - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ) - > - >() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >()(ref.pointer, arg0, _$$ref$1.pointer, _$$ref$2.pointer), - retain: true, - release: true, - ); + >()(ref.pointer, arg0); } } -/// Construction methods for `objc.ObjCBlock?, NSError?)>)>`. -abstract final class ObjCBlock_NSProgress_ffiVoididNSItemProviderWritingNSError { +/// Construction methods for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>`. +abstract final class ObjCBlock_bool_KeyType_ObjectType_bool { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - NSProgress? Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) - >, + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) > fromPointer( @@ -25693,10 +27705,10 @@ abstract final class ObjCBlock_NSProgress_ffiVoididNSItemProviderWritingNSError bool release = false, }) => objc.ObjCBlock< - NSProgress? Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) - >, + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) >(pointer, retain: retain, release: release); @@ -25706,27 +27718,29 @@ abstract final class ObjCBlock_NSProgress_ffiVoididNSItemProviderWritingNSError /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - NSProgress? Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) - >, + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, + ffi.Bool Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) > > ptr, ) => objc.ObjCBlock< - NSProgress? Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) - >, + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), @@ -25743,174 +27757,171 @@ abstract final class ObjCBlock_NSProgress_ffiVoididNSItemProviderWritingNSError /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - NSProgress? Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) - >, + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) > fromFunction( - NSProgress? Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) - >, - ) - fn, { + bool Function(objc.ObjCObject, objc.ObjCObject, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< - NSProgress? Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) - >, + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) >( objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - final _$$ref = fn( - ObjCBlock_ffiVoid_idNSItemProviderWriting_NSError.fromPointer( - arg0, - retain: true, - release: true, - ), - )?.ref; - return _$$ref?.retainAndAutorelease() ?? ffi.nullptr; + return fn( + objc.ObjCObject(arg0, retain: true, release: true), + objc.ObjCObject(arg1, retain: true, release: true), + arg2, + ); }, keepIsolateAlive), retain: false, release: true, ); - static ffi.Pointer _fnPtrTrampoline( + static bool _fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) => block.ref.target .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, + ffi.Bool Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) > >() .asFunction< - ffi.Pointer Function( - ffi.Pointer, + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) - >()(arg0); + >()(arg0, arg1, arg2); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, + ffi.Bool Function( ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) - >(_fnPtrTrampoline) + >(_fnPtrTrampoline, false) .cast(); - static ffi.Pointer _closureTrampoline( + static bool _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) => (objc.getBlockClosure(block) - as ffi.Pointer Function( - ffi.Pointer, - ))(arg0); + as bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, + ffi.Bool Function( ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) - >(_closureTrampoline) + >(_closureTrampoline, false) .cast(); } -/// Call operator for `objc.ObjCBlock?, NSError?)>)>`. -extension ObjCBlock_NSProgress_ffiVoididNSItemProviderWritingNSError$CallExtension +/// Call operator for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>`. +extension ObjCBlock_bool_KeyType_ObjectType_bool$CallExtension on objc.ObjCBlock< - NSProgress? Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) - >, + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) > { - NSProgress? call( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) - > - arg0, + bool call( + objc.ObjCObject arg0, + objc.ObjCObject arg1, + ffi.Pointer arg2, ) { - final _$$ref$1 = arg0.ref; + final _$$ref = arg0.ref; + final _$$ref$1 = arg1.ref; return ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer block, - ffi.Pointer arg0, - ) - > - >() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - >()(ref.pointer, _$$ref$1.pointer) - .address == - 0 - ? null - : NSProgress.fromPointer( - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer block, - ffi.Pointer arg0, - ) - > - >() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - >()(ref.pointer, _$$ref$1.pointer), - retain: true, - release: true, - ); + .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, + ) + >()(ref.pointer, _$$ref.pointer, _$$ref$1.pointer, arg2); } } -/// Construction methods for `objc.ObjCBlock)>`. -abstract final class ObjCBlock_NSString_ffiVoid { +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_bool_NSUInteger_bool { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock)> fromPointer( + static objc.ObjCBlock< + ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) + > + fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => objc.ObjCBlock)>( - pointer, - retain: retain, - release: release, - ); + }) => + objc.ObjCBlock< + ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) + >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock)> + static objc.ObjCBlock< + ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) + > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer arg0) + ffi.Bool Function(ffi.UnsignedLong arg0, ffi.Pointer arg1) > > ptr, - ) => objc.ObjCBlock)>( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); + ) => + objc.ObjCBlock< + ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); /// Creates a block from a Dart function. /// @@ -25920,112 +27931,149 @@ abstract final class ObjCBlock_NSString_ffiVoid { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock)> fromFunction( - NSString Function(ffi.Pointer) fn, { + static objc.ObjCBlock< + ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) + > + fromFunction( + bool Function(int, ffi.Pointer) fn, { bool keepIsolateAlive = true, - }) => objc.ObjCBlock)>( - objc.newClosureBlock(_closureCallable, (ffi.Pointer arg0) { - final _$$ref = fn(arg0).ref; - return _$$ref.retainAndAutorelease(); - }, keepIsolateAlive), - retain: false, - release: true, - ); + }) => + objc.ObjCBlock< + ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) + >( + objc.newClosureBlock(_closureCallable, ( + int arg0, + ffi.Pointer arg1, + ) { + return fn(arg0, arg1); + }, keepIsolateAlive), + retain: false, + release: true, + ); - static ffi.Pointer _fnPtrTrampoline( + static bool _fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + int arg0, + ffi.Pointer arg1, ) => block.ref.target .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer arg0) + ffi.Bool Function(ffi.UnsignedLong arg0, ffi.Pointer arg1) > >() - .asFunction< - ffi.Pointer Function(ffi.Pointer) - >()(arg0); + .asFunction)>()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function( + ffi.Bool Function( ffi.Pointer, - ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, ) - >(_fnPtrTrampoline) + >(_fnPtrTrampoline, false) .cast(); - static ffi.Pointer _closureTrampoline( + static bool _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + int arg0, + ffi.Pointer arg1, ) => (objc.getBlockClosure(block) - as ffi.Pointer Function(ffi.Pointer))( - arg0, - ); + as bool Function(int, ffi.Pointer))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function( + ffi.Bool Function( ffi.Pointer, - ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, ) - >(_closureTrampoline) + >(_closureTrampoline, false) .cast(); } -/// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_NSString_ffiVoid$CallExtension - on objc.ObjCBlock)> { - NSString call(ffi.Pointer arg0) { - return NSString.fromPointer( - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer block, - ffi.Pointer arg0, - ) - > - >() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_bool_NSUInteger_bool$CallExtension + on + objc.ObjCBlock< + ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) + > { + bool call(int arg0, ffi.Pointer arg1) { + return ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer block, + ffi.UnsignedLong arg0, + ffi.Pointer arg1, ) - >()(ref.pointer, arg0), - retain: true, - release: true, - ); + > + >() + .asFunction< + bool Function( + ffi.Pointer, + int, + ffi.Pointer, + ) + >()(ref.pointer, arg0, arg1); } } -/// Construction methods for `objc.ObjCBlock)>`. -abstract final class ObjCBlock_NSUInteger_ffiVoid { +/// Construction methods for `objc.ObjCBlock, ffi.UnsignedLong, ffi.Pointer)>`. +abstract final class ObjCBlock_bool_ObjectType_NSUInteger_bool { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock)> + static objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) + > fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => objc.ObjCBlock)>( - pointer, - retain: retain, - release: release, - ); + }) => + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) + >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock)> + static objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) + > fromFunctionPointer( ffi.Pointer< - ffi.NativeFunction arg0)> + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer arg0, + ffi.UnsignedLong arg1, + ffi.Pointer arg2, + ) + > > ptr, - ) => objc.ObjCBlock)>( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); + ) => + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); /// Creates a block from a Dart function. /// @@ -26035,81 +28083,134 @@ abstract final class ObjCBlock_NSUInteger_ffiVoid { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock)> + static objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) + > fromFunction( - int Function(ffi.Pointer) fn, { + bool Function(objc.ObjCObject, int, ffi.Pointer) fn, { bool keepIsolateAlive = true, - }) => objc.ObjCBlock)>( - objc.newClosureBlock(_closureCallable, (ffi.Pointer arg0) { - return fn(arg0); - }, keepIsolateAlive), - retain: false, - release: true, - ); + }) => + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) + >( + objc.newClosureBlock(_closureCallable, ( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, + ) { + return fn( + objc.ObjCObject(arg0, retain: true, release: true), + arg1, + arg2, + ); + }, keepIsolateAlive), + retain: false, + release: true, + ); - static int _fnPtrTrampoline( + static bool _fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, ) => block.ref.target .cast< ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer arg0) + ffi.Bool Function( + ffi.Pointer arg0, + ffi.UnsignedLong arg1, + ffi.Pointer arg2, + ) > >() - .asFunction)>()(arg0); + .asFunction< + bool Function( + ffi.Pointer, + int, + ffi.Pointer, + ) + >()(arg0, arg1, arg2); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< - ffi.UnsignedLong Function( + ffi.Bool Function( ffi.Pointer, - ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, ) - >(_fnPtrTrampoline, 0) + >(_fnPtrTrampoline, false) .cast(); - static int _closureTrampoline( + static bool _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - ) => (objc.getBlockClosure(block) as int Function(ffi.Pointer))( - arg0, - ); + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, + ) => + (objc.getBlockClosure(block) + as bool Function( + ffi.Pointer, + int, + ffi.Pointer, + ))(arg0, arg1, arg2); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< - ffi.UnsignedLong Function( + ffi.Bool Function( ffi.Pointer, - ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, ) - >(_closureTrampoline, 0) + >(_closureTrampoline, false) .cast(); } -/// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_NSUInteger_ffiVoid$CallExtension - on objc.ObjCBlock)> { - int call(ffi.Pointer arg0) { +/// Call operator for `objc.ObjCBlock, ffi.UnsignedLong, ffi.Pointer)>`. +extension ObjCBlock_bool_ObjectType_NSUInteger_bool$CallExtension + on + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) + > { + bool call(objc.ObjCObject arg0, int arg1, ffi.Pointer arg2) { + final _$$ref = arg0.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< - ffi.UnsignedLong Function( + ffi.Bool Function( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, + ffi.UnsignedLong arg1, + ffi.Pointer arg2, ) > >() .asFunction< - int Function(ffi.Pointer, ffi.Pointer) - >()(ref.pointer, arg0); + bool Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ) + >()(ref.pointer, _$$ref.pointer, arg1, arg2); } } -/// Construction methods for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)>`. -abstract final class ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObjectImpl_NSUInteger { +/// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. +abstract final class ObjCBlock_bool_ObjectType_bool { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.UnsignedLong, - ) + ffi.Bool Function(ffi.Pointer, ffi.Pointer) > fromPointer( ffi.Pointer pointer, { @@ -26117,11 +28218,9 @@ abstract final class ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObj bool release = false, }) => objc.ObjCBlock< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.UnsignedLong, + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, ) >(pointer, retain: retain, release: release); @@ -26131,32 +28230,23 @@ abstract final class ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObj /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.UnsignedLong, - ) + ffi.Bool Function(ffi.Pointer, ffi.Pointer) > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer> arg2, - ffi.UnsignedLong arg3, + ffi.Bool Function( + ffi.Pointer arg0, + ffi.Pointer arg1, ) > > ptr, ) => objc.ObjCBlock< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.UnsignedLong, + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, ) >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), @@ -26173,156 +28263,212 @@ abstract final class ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObj /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.UnsignedLong, - ) + ffi.Bool Function(ffi.Pointer, ffi.Pointer) > fromFunction( - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - int, - ) - fn, { + bool Function(objc.ObjCObject, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.UnsignedLong, + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, ) >( objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer> arg2, - int arg3, + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return fn(arg0, arg1, arg2, arg3); + return fn(objc.ObjCObject(arg0, retain: true, release: true), arg1); }, keepIsolateAlive), retain: false, release: true, ); - static int _fnPtrTrampoline( + static bool _fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer> arg2, - int arg3, + ffi.Pointer arg0, + ffi.Pointer arg1, ) => block.ref.target .cast< ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer> arg2, - ffi.UnsignedLong arg3, + ffi.Bool Function( + ffi.Pointer arg0, + ffi.Pointer arg1, ) > >() .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - int, - ) - >()(arg0, arg1, arg2, arg3); + bool Function(ffi.Pointer, ffi.Pointer) + >()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< - ffi.UnsignedLong Function( + ffi.Bool Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.UnsignedLong, + ffi.Pointer, + ffi.Pointer, ) - >(_fnPtrTrampoline, 0) + >(_fnPtrTrampoline, false) .cast(); - static int _closureTrampoline( + static bool _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer> arg2, - int arg3, + ffi.Pointer arg0, + ffi.Pointer arg1, ) => (objc.getBlockClosure(block) - as int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - int, - ))(arg0, arg1, arg2, arg3); + as bool Function( + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< - ffi.UnsignedLong Function( + ffi.Bool Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.UnsignedLong, + ffi.Pointer, + ffi.Pointer, ) - >(_closureTrampoline, 0) + >(_closureTrampoline, false) .cast(); } -/// Call operator for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)>`. -extension ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObjectImpl_NSUInteger$CallExtension +/// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. +extension ObjCBlock_bool_ObjectType_bool$CallExtension on objc.ObjCBlock< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.UnsignedLong, + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, ) > { - int call( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer> arg2, - int arg3, - ) { + bool call(objc.ObjCObject arg0, ffi.Pointer arg1) { + final _$$ref = arg0.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< - ffi.UnsignedLong Function( + ffi.Bool Function( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer> arg2, - ffi.UnsignedLong arg3, + ffi.Pointer arg0, + ffi.Pointer arg1, ) > >() .asFunction< - int Function( + bool Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - int, + ffi.Pointer, + ffi.Pointer, ) - >()(ref.pointer, arg0, arg1, arg2, arg3); + >()(ref.pointer, _$$ref.pointer, arg1); } } -/// Construction methods for `objc.ObjCBlock Function(ffi.Pointer)>`. -abstract final class ObjCBlock_NSZone_ffiVoid { +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_bool_ffiVoid { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock Function(ffi.Pointer)> + static objc.ObjCBlock)> fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => objc.ObjCBlock)>( + pointer, + retain: retain, + release: release, + ); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction arg0)> + > + ptr, + ) => objc.ObjCBlock)>( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock)> fromFunction( + bool Function(ffi.Pointer) fn, { + bool keepIsolateAlive = true, + }) => objc.ObjCBlock)>( + objc.newClosureBlock(_closureCallable, (ffi.Pointer arg0) { + return fn(arg0); + }, keepIsolateAlive), + retain: false, + release: true, + ); + + static bool _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) => block.ref.target + .cast arg0)>>() + .asFunction)>()(arg0); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline, false) + .cast(); + static bool _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) => (objc.getBlockClosure(block) as bool Function(ffi.Pointer))( + arg0, + ); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline, false) + .cast(); +} + +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_bool_ffiVoid$CallExtension + on objc.ObjCBlock)> { + bool call(ffi.Pointer arg0) { + return ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer block, + ffi.Pointer arg0, + ) + > + >() + .asFunction< + bool Function(ffi.Pointer, ffi.Pointer) + >()(ref.pointer, arg0); + } +} + +/// Construction methods for `objc.ObjCBlock, Protocol)>`. +abstract final class ObjCBlock_bool_ffiVoid_Protocol { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock, Protocol)> fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => objc.ObjCBlock Function(ffi.Pointer)>( + }) => objc.ObjCBlock, Protocol)>( pointer, retain: retain, release: release, @@ -26333,15 +28479,18 @@ abstract final class ObjCBlock_NSZone_ffiVoid { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock Function(ffi.Pointer)> + static objc.ObjCBlock, Protocol)> fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer arg0) + ffi.Bool Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) > > ptr, - ) => objc.ObjCBlock Function(ffi.Pointer)>( + ) => objc.ObjCBlock, Protocol)>( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, release: true, @@ -26355,83 +28504,97 @@ abstract final class ObjCBlock_NSZone_ffiVoid { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock Function(ffi.Pointer)> + static objc.ObjCBlock, Protocol)> fromFunction( - ffi.Pointer Function(ffi.Pointer) fn, { + bool Function(ffi.Pointer, Protocol) fn, { bool keepIsolateAlive = true, - }) => objc.ObjCBlock Function(ffi.Pointer)>( - objc.newClosureBlock(_closureCallable, (ffi.Pointer arg0) { - return fn(arg0); + }) => objc.ObjCBlock, Protocol)>( + objc.newClosureBlock(_closureCallable, ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return fn(arg0, Protocol.fromPointer(arg1, retain: true, release: true)); }, keepIsolateAlive), retain: false, release: true, ); - static ffi.Pointer _fnPtrTrampoline( + static bool _fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0, + ffi.Pointer arg1, ) => block.ref.target .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer arg0) + ffi.Bool Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) > >() - .asFunction Function(ffi.Pointer)>()(arg0); + .asFunction< + bool Function(ffi.Pointer, ffi.Pointer) + >()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) - >(_fnPtrTrampoline) + >(_fnPtrTrampoline, false) .cast(); - static ffi.Pointer _closureTrampoline( + static bool _closureTrampoline( ffi.Pointer block, ffi.Pointer arg0, + ffi.Pointer arg1, ) => (objc.getBlockClosure(block) - as ffi.Pointer Function(ffi.Pointer))(arg0); + as bool Function( + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< - ffi.Pointer Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) - >(_closureTrampoline) + >(_closureTrampoline, false) .cast(); } -/// Call operator for `objc.ObjCBlock Function(ffi.Pointer)>`. -extension ObjCBlock_NSZone_ffiVoid$CallExtension - on objc.ObjCBlock Function(ffi.Pointer)> { - ffi.Pointer call(ffi.Pointer arg0) { +/// Call operator for `objc.ObjCBlock, Protocol)>`. +extension ObjCBlock_bool_ffiVoid_Protocol$CallExtension + on objc.ObjCBlock, Protocol)> { + bool call(ffi.Pointer arg0, Protocol arg1) { + final _$$ref = arg1.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Bool Function( ffi.Pointer block, ffi.Pointer arg0, + ffi.Pointer arg1, ) > >() .asFunction< - ffi.Pointer Function( + bool Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) - >()(ref.pointer, arg0); + >()(ref.pointer, arg0, _$$ref.pointer); } } -/// Construction methods for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>`. -abstract final class ObjCBlock_bool_KeyType_ObjectType_bool { +/// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. +abstract final class ObjCBlock_bool_ffiVoid_objcObjCObjectImpl { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) + ffi.Bool Function(ffi.Pointer, ffi.Pointer) > fromPointer( ffi.Pointer pointer, { @@ -26440,9 +28603,8 @@ abstract final class ObjCBlock_bool_KeyType_ObjectType_bool { }) => objc.ObjCBlock< ffi.Bool Function( + ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ) >(pointer, retain: retain, release: release); @@ -26452,19 +28614,14 @@ abstract final class ObjCBlock_bool_KeyType_ObjectType_bool { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) + ffi.Bool Function(ffi.Pointer, ffi.Pointer) > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Bool Function( - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, ) > > @@ -26472,9 +28629,8 @@ abstract final class ObjCBlock_bool_KeyType_ObjectType_bool { ) => objc.ObjCBlock< ffi.Bool Function( + ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ) >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), @@ -26491,33 +28647,23 @@ abstract final class ObjCBlock_bool_KeyType_ObjectType_bool { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) + ffi.Bool Function(ffi.Pointer, ffi.Pointer) > fromFunction( - bool Function(objc.ObjCObject, objc.ObjCObject, ffi.Pointer) fn, { + bool Function(ffi.Pointer, objc.ObjCObject) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< ffi.Bool Function( + ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ) >( objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, ) { - return fn( - objc.ObjCObject(arg0, retain: true, release: true), - objc.ObjCObject(arg1, retain: true, release: true), - arg2, - ); + return fn(arg0, objc.ObjCObject(arg1, retain: true, release: true)); }, keepIsolateAlive), retain: false, release: true, @@ -26525,104 +28671,86 @@ abstract final class ObjCBlock_bool_KeyType_ObjectType_bool { static bool _fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, ) => block.ref.target .cast< ffi.NativeFunction< ffi.Bool Function( - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, ) > >() .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >()(arg0, arg1, arg2); + bool Function(ffi.Pointer, ffi.Pointer) + >()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Bool Function( ffi.Pointer, + ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ) >(_fnPtrTrampoline, false) .cast(); static bool _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, ) => (objc.getBlockClosure(block) as bool Function( + ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1, arg2); + ))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Bool Function( ffi.Pointer, + ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ) >(_closureTrampoline, false) .cast(); } -/// Call operator for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>`. -extension ObjCBlock_bool_KeyType_ObjectType_bool$CallExtension +/// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. +extension ObjCBlock_bool_ffiVoid_objcObjCObjectImpl$CallExtension on objc.ObjCBlock< ffi.Bool Function( + ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ) > { - bool call( - objc.ObjCObject arg0, - objc.ObjCObject arg1, - ffi.Pointer arg2, - ) { - final _$$ref = arg0.ref; - final _$$ref$1 = arg1.ref; + bool call(ffi.Pointer arg0, objc.ObjCObject arg1) { + final _$$ref = arg1.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, ) > >() .asFunction< bool Function( ffi.Pointer, + ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ) - >()(ref.pointer, _$$ref.pointer, _$$ref$1.pointer, arg2); + >()(ref.pointer, arg0, _$$ref.pointer); } } -/// Construction methods for `objc.ObjCBlock)>`. -abstract final class ObjCBlock_bool_NSUInteger_bool { +/// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. +abstract final class ObjCBlock_bool_ffiVoid_objcObjCSelector { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Bool Function(ffi.Pointer, ffi.Pointer) > fromPointer( ffi.Pointer pointer, { @@ -26630,7 +28758,7 @@ abstract final class ObjCBlock_bool_NSUInteger_bool { bool release = false, }) => objc.ObjCBlock< - ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Bool Function(ffi.Pointer, ffi.Pointer) >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. @@ -26639,18 +28767,21 @@ abstract final class ObjCBlock_bool_NSUInteger_bool { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Bool Function(ffi.Pointer, ffi.Pointer) > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Bool Function(ffi.UnsignedLong arg0, ffi.Pointer arg1) + ffi.Bool Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) > > ptr, ) => objc.ObjCBlock< - ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Bool Function(ffi.Pointer, ffi.Pointer) >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, @@ -26666,18 +28797,18 @@ abstract final class ObjCBlock_bool_NSUInteger_bool { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Bool Function(ffi.Pointer, ffi.Pointer) > fromFunction( - bool Function(int, ffi.Pointer) fn, { + bool Function(ffi.Pointer, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< - ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Bool Function(ffi.Pointer, ffi.Pointer) >( objc.newClosureBlock(_closureCallable, ( - int arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + ffi.Pointer arg1, ) { return fn(arg0, arg1); }, keepIsolateAlive), @@ -26687,127 +28818,105 @@ abstract final class ObjCBlock_bool_NSUInteger_bool { static bool _fnPtrTrampoline( ffi.Pointer block, - int arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + ffi.Pointer arg1, ) => block.ref.target .cast< ffi.NativeFunction< - ffi.Bool Function(ffi.UnsignedLong arg0, ffi.Pointer arg1) + ffi.Bool Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) > >() - .asFunction)>()(arg0, arg1); + .asFunction< + bool Function(ffi.Pointer, ffi.Pointer) + >()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Bool Function( ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) >(_fnPtrTrampoline, false) .cast(); static bool _closureTrampoline( ffi.Pointer block, - int arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + ffi.Pointer arg1, ) => (objc.getBlockClosure(block) - as bool Function(int, ffi.Pointer))(arg0, arg1); + as bool Function( + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Bool Function( ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) >(_closureTrampoline, false) .cast(); } -/// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_bool_NSUInteger_bool$CallExtension +/// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. +extension ObjCBlock_bool_ffiVoid_objcObjCSelector$CallExtension on objc.ObjCBlock< - ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ) > { - bool call(int arg0, ffi.Pointer arg1) { + bool call(ffi.Pointer arg0, ffi.Pointer arg1) { return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer block, - ffi.UnsignedLong arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + ffi.Pointer arg1, ) > >() .asFunction< bool Function( ffi.Pointer, - int, - ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) >()(ref.pointer, arg0, arg1); } } -/// Construction methods for `objc.ObjCBlock, ffi.UnsignedLong, ffi.Pointer)>`. -abstract final class ObjCBlock_bool_ObjectType_NSUInteger_bool { +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - > - fromPointer( + static objc.ObjCBlock fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => - objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - >(pointer, retain: retain, release: release); + }) => objc.ObjCBlock( + pointer, + retain: retain, + release: release, + ); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - > - fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer arg0, - ffi.UnsignedLong arg1, - ffi.Pointer arg2, - ) - > - > - ptr, - ) => - objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - >( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer> ptr, + ) => objc.ObjCBlock( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); /// Creates a block from a Dart function. /// @@ -26817,134 +28926,178 @@ abstract final class ObjCBlock_bool_ObjectType_NSUInteger_bool { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - > - fromFunction( - bool Function(objc.ObjCObject, int, ffi.Pointer) fn, { + static objc.ObjCBlock fromFunction( + void Function() fn, { bool keepIsolateAlive = true, - }) => - objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - >( - objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, - ) { - return fn( - objc.ObjCObject(arg0, retain: true, release: true), - arg1, - arg2, - ); - }, keepIsolateAlive), - retain: false, - release: true, - ); + }) => objc.ObjCBlock( + objc.newClosureBlock(_closureCallable, () { + return fn(); + }, keepIsolateAlive), + retain: false, + release: true, + ); - static bool _fnPtrTrampoline( + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock listener( + void Function() fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _listenerCallable.nativeFunction.cast(), + () { + return fn(); + }, + keepIsolateAlive, + ); + final wrapper = _1wx624s_wrapListenerBlock_1pl9qdv(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock( + wrapper, + retain: false, + release: true, + ); + } + + /// Creates a blocking block from a Dart function. + /// + /// This callback can be invoked from any native thread, and will block the + /// caller until the callback is handled by the Dart isolate that created + /// the block. Async functions are not supported. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. If the owner isolate + /// has shut down, and the block is invoked by native code, it may block + /// indefinitely, or have other undefined behavior. + static objc.ObjCBlock blocking( + void Function() fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _blockingCallable.nativeFunction.cast(), + () { + return fn(); + }, + keepIsolateAlive, + ); + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + () { + return fn(); + }, + keepIsolateAlive, + ); + final wrapper = _1wx624s_wrapBlockingBlock_1pl9qdv( + raw, + rawListener, + objc.objCContext, + ); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock( + wrapper, + retain: false, + release: true, + ); + } + + static void _listenerTrampoline(ffi.Pointer block) { + (objc.getBlockClosure(block) as void Function())(); + objc.objectRelease(block.cast()); + } + + static ffi.NativeCallable)> + _listenerCallable = + ffi.NativeCallable< + ffi.Void Function(ffi.Pointer) + >.listener(_listenerTrampoline) + ..keepIsolateAlive = false; + static void _blockingTrampoline( 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, + ffi.Pointer waiter, + ) { + try { + (objc.getBlockClosure(block) as void Function())(); + } catch (e) { + } finally { + objc.signalWaiter(waiter); + objc.objectRelease(block.cast()); + } + } + + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, ffi.Pointer) + > + _blockingCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, ) - > - >() - .asFunction< - bool Function( - ffi.Pointer, - int, - ffi.Pointer, - ) - >()(arg0, arg1, arg2); + >.isolateLocal(_blockingTrampoline) + ..keepIsolateAlive = false; + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, ffi.Pointer) + > + _blockingListenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_blockingTrampoline) + ..keepIsolateAlive = false; + static void _fnPtrTrampoline(ffi.Pointer block) => block + .ref + .target + .cast>() + .asFunction()(); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - >(_fnPtrTrampoline, false) + ffi.Void Function(ffi.Pointer) + >(_fnPtrTrampoline) .cast(); - static bool _closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, - ) => - (objc.getBlockClosure(block) - as bool Function( - ffi.Pointer, - int, - ffi.Pointer, - ))(arg0, arg1, arg2); - static ffi.Pointer _closureCallable = - ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - >(_closureTrampoline, false) + static void _closureTrampoline(ffi.Pointer block) => + (objc.getBlockClosure(block) as void Function())(); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer) + >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock, ffi.UnsignedLong, ffi.Pointer)>`. -extension ObjCBlock_bool_ObjectType_NSUInteger_bool$CallExtension - on - objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - > { - bool call(objc.ObjCObject arg0, int arg1, ffi.Pointer arg2) { - final _$$ref = arg0.ref; +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid$CallExtension + on objc.ObjCBlock { + void call() { return ref.pointer.ref.invoke .cast< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.UnsignedLong arg1, - ffi.Pointer arg2, - ) + ffi.Void Function(ffi.Pointer block) > >() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ) - >()(ref.pointer, _$$ref.pointer, arg1, arg2); + .asFunction)>()( + ref.pointer, + ); } } -/// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. -abstract final class ObjCBlock_bool_ObjectType_bool { +/// Construction methods for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>`. +abstract final class ObjCBlock_ffiVoid_KeyType_ObjectType_bool { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, ffi.Pointer) + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) > fromPointer( ffi.Pointer pointer, { @@ -26952,7 +29105,8 @@ abstract final class ObjCBlock_bool_ObjectType_bool { bool release = false, }) => objc.ObjCBlock< - ffi.Bool Function( + ffi.Void Function( + ffi.Pointer, ffi.Pointer, ffi.Pointer, ) @@ -26964,21 +29118,27 @@ abstract final class ObjCBlock_bool_ObjectType_bool { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, ffi.Pointer) + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Bool Function( + ffi.Void Function( ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg1, + ffi.Pointer arg2, ) > > ptr, ) => objc.ObjCBlock< - ffi.Bool Function( + ffi.Void Function( + ffi.Pointer, ffi.Pointer, ffi.Pointer, ) @@ -26997,530 +29157,363 @@ abstract final class ObjCBlock_bool_ObjectType_bool { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, ffi.Pointer) + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) > fromFunction( - bool Function(objc.ObjCObject, ffi.Pointer) fn, { + void Function(objc.ObjCObject, objc.ObjCObject, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< - ffi.Bool Function( + ffi.Void Function( + ffi.Pointer, ffi.Pointer, ffi.Pointer, ) >( objc.newClosureBlock(_closureCallable, ( ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return fn(objc.ObjCObject(arg0, retain: true, release: true), arg1); + return fn( + objc.ObjCObject(arg0, retain: true, release: true), + objc.ObjCObject(arg1, retain: true, release: true), + arg2, + ); }, keepIsolateAlive), retain: false, release: true, ); - static 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); - static ffi.Pointer _fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(_fnPtrTrampoline, false) - .cast(); - static bool _closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ) => - (objc.getBlockClosure(block) - as bool Function( - ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1); - static ffi.Pointer _closureCallable = - ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(_closureTrampoline, false) - .cast(); -} - -/// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. -extension ObjCBlock_bool_ObjectType_bool$CallExtension - on - objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ) - > { - bool call(objc.ObjCObject arg0, ffi.Pointer arg1) { - final _$$ref = arg0.ref; - return ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ) - > - >() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >()(ref.pointer, _$$ref.pointer, arg1); - } -} - -/// Construction methods for `objc.ObjCBlock)>`. -abstract final class ObjCBlock_bool_ffiVoid { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock)> fromPointer( - ffi.Pointer pointer, { - bool retain = false, - bool release = false, - }) => objc.ObjCBlock)>( - pointer, - retain: retain, - release: release, - ); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock)> - fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction arg0)> - > - ptr, - ) => objc.ObjCBlock)>( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); - - /// Creates a block from a Dart function. + /// Creates a listener block from a Dart function. /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock)> fromFunction( - bool Function(ffi.Pointer) fn, { + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + listener( + void Function(objc.ObjCObject, objc.ObjCObject, ffi.Pointer) fn, { bool keepIsolateAlive = true, - }) => objc.ObjCBlock)>( - objc.newClosureBlock(_closureCallable, (ffi.Pointer arg0) { - return fn(arg0); - }, keepIsolateAlive), - retain: false, - release: true, - ); - - static bool _fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ) => block.ref.target - .cast arg0)>>() - .asFunction)>()(arg0); - static ffi.Pointer _fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ) - >(_fnPtrTrampoline, false) - .cast(); - static bool _closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ) => (objc.getBlockClosure(block) as bool Function(ffi.Pointer))( - arg0, - ); - static ffi.Pointer _closureCallable = - ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ) - >(_closureTrampoline, false) - .cast(); -} - -/// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_bool_ffiVoid$CallExtension - on objc.ObjCBlock)> { - bool call(ffi.Pointer arg0) { - return ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer block, - ffi.Pointer arg0, - ) - > - >() - .asFunction< - bool Function(ffi.Pointer, ffi.Pointer) - >()(ref.pointer, arg0); + }) { + final raw = objc.newClosureBlock(_listenerCallable.nativeFunction.cast(), ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + return fn( + objc.ObjCObject(arg0, retain: false, release: true), + objc.ObjCObject(arg1, retain: false, release: true), + arg2, + ); + }, keepIsolateAlive); + final wrapper = _1wx624s_wrapListenerBlock_1o83rbn(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(wrapper, retain: false, release: true); } -} - -/// Construction methods for `objc.ObjCBlock, Protocol)>`. -abstract final class ObjCBlock_bool_ffiVoid_Protocol { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock, Protocol)> - fromPointer( - ffi.Pointer pointer, { - bool retain = false, - bool release = false, - }) => objc.ObjCBlock, Protocol)>( - pointer, - retain: retain, - release: release, - ); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock, Protocol)> - fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) - > - > - ptr, - ) => objc.ObjCBlock, Protocol)>( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); - /// Creates a block from a Dart function. + /// Creates a blocking block from a Dart function. /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. + /// This callback can be invoked from any native thread, and will block the + /// caller until the callback is handled by the Dart isolate that created + /// the block. Async functions are not supported. /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive - /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock, Protocol)> - fromFunction( - bool Function(ffi.Pointer, Protocol) fn, { + /// until it is garbage collected by both Dart and ObjC. If the owner isolate + /// has shut down, and the block is invoked by native code, it may block + /// indefinitely, or have other undefined behavior. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + blocking( + void Function(objc.ObjCObject, objc.ObjCObject, ffi.Pointer) fn, { bool keepIsolateAlive = true, - }) => objc.ObjCBlock, Protocol)>( - objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, + }) { + final raw = objc.newClosureBlock(_blockingCallable.nativeFunction.cast(), ( + ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return fn(arg0, Protocol.fromPointer(arg1, retain: true, release: true)); - }, keepIsolateAlive), - retain: false, - release: true, - ); + return fn( + objc.ObjCObject(arg0, retain: false, release: true), + objc.ObjCObject(arg1, retain: false, release: true), + arg2, + ); + }, keepIsolateAlive); + final rawListener = objc + .newClosureBlock(_blockingListenerCallable.nativeFunction.cast(), ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + return fn( + objc.ObjCObject(arg0, retain: false, release: true), + objc.ObjCObject(arg1, retain: false, release: true), + arg2, + ); + }, keepIsolateAlive); + final wrapper = _1wx624s_wrapBlockingBlock_1o83rbn( + raw, + rawListener, + objc.objCContext, + ); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(wrapper, retain: false, release: true); + } - static bool _fnPtrTrampoline( + static void _listenerTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, - ) => block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2); + objc.objectRelease(block.cast()); + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) - > - >() - .asFunction< - bool Function(ffi.Pointer, ffi.Pointer) - >()(arg0, arg1); - static ffi.Pointer _fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(_fnPtrTrampoline, false) - .cast(); - static bool _closureTrampoline( + >.listener(_listenerTrampoline) + ..keepIsolateAlive = false; + static void _blockingTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer waiter, + ffi.Pointer arg0, ffi.Pointer arg1, - ) => + ffi.Pointer arg2, + ) { + try { (objc.getBlockClosure(block) - as bool Function( - ffi.Pointer, + as void Function( ffi.Pointer, - ))(arg0, arg1); - static ffi.Pointer _closureCallable = - ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(_closureTrampoline, false) - .cast(); -} + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2); + } catch (e) { + } finally { + objc.signalWaiter(waiter); + objc.objectRelease(block.cast()); + } + } -/// Call operator for `objc.ObjCBlock, Protocol)>`. -extension ObjCBlock_bool_ffiVoid_Protocol$CallExtension - on objc.ObjCBlock, Protocol)> { - bool call(ffi.Pointer arg0, Protocol arg1) { - final _$$ref = arg1.ref; - return ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ) - > - >() - .asFunction< - bool Function( + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.isolateLocal(_blockingTrampoline) + ..keepIsolateAlive = false; + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingListenerCallable = + ffi.NativeCallable< + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) - >()(ref.pointer, arg0, _$$ref.pointer); - } -} - -/// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. -abstract final class ObjCBlock_bool_ffiVoid_objcObjCObjectImpl { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, ffi.Pointer) - > - fromPointer( - ffi.Pointer pointer, { - bool retain = false, - bool release = false, - }) => - objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ) - >(pointer, retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, ffi.Pointer) - > - fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) - > - > - ptr, - ) => - objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ) - >( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - /// - /// If `keepIsolateAlive` is true, this block will keep this isolate alive - /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, ffi.Pointer) - > - fromFunction( - bool Function(ffi.Pointer, objc.ObjCObject) fn, { - bool keepIsolateAlive = true, - }) => - objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ) - >( - objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - return fn(arg0, objc.ObjCObject(arg1, retain: true, release: true)); - }, keepIsolateAlive), - retain: false, - release: true, - ); - - static bool _fnPtrTrampoline( + >.listener(_blockingTrampoline) + ..keepIsolateAlive = false; + static void _fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2, ) => block.ref.target .cast< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer arg0, + ffi.Void Function( + ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2, ) > >() .asFunction< - bool Function(ffi.Pointer, ffi.Pointer) - >()(arg0, arg1); + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(arg0, arg1, arg2); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Bool Function( + ffi.Void Function( ffi.Pointer, - ffi.Pointer, ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) - >(_fnPtrTrampoline, false) + >(_fnPtrTrampoline) .cast(); - static bool _closureTrampoline( + static void _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2, ) => (objc.getBlockClosure(block) - as bool Function( - ffi.Pointer, + as void Function( ffi.Pointer, - ))(arg0, arg1); + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< - ffi.Bool Function( + ffi.Void Function( ffi.Pointer, - ffi.Pointer, ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) - >(_closureTrampoline, false) + >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. -extension ObjCBlock_bool_ffiVoid_objcObjCObjectImpl$CallExtension +/// Call operator for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>`. +extension ObjCBlock_ffiVoid_KeyType_ObjectType_bool$CallExtension on objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, + ffi.Void Function( + ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) > { - bool call(ffi.Pointer arg0, objc.ObjCObject arg1) { - final _$$ref = arg1.ref; + void call( + objc.ObjCObject arg0, + objc.ObjCObject arg1, + ffi.Pointer arg2, + ) { + final _$$ref = arg0.ref; + final _$$ref$1 = arg1.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Void Function( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2, ) > >() .asFunction< - bool Function( + void Function( ffi.Pointer, - ffi.Pointer, ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) - >()(ref.pointer, arg0, _$$ref.pointer); + >()(ref.pointer, _$$ref.pointer, _$$ref$1.pointer, arg2); } } -/// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. -abstract final class ObjCBlock_bool_ffiVoid_objcObjCSelector { +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSData_NSError { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, ffi.Pointer) - > - fromPointer( + static objc.ObjCBlock fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => - objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, ffi.Pointer) - >(pointer, retain: retain, release: release); + }) => objc.ObjCBlock( + pointer, + retain: retain, + release: release, + ); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, ffi.Pointer) - > + static objc.ObjCBlock fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, ) > > ptr, - ) => - objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, ffi.Pointer) - >( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); + ) => objc.ObjCBlock( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); /// Creates a block from a Dart function. /// @@ -27530,127 +29523,349 @@ abstract final class ObjCBlock_bool_ffiVoid_objcObjCSelector { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, ffi.Pointer) - > - fromFunction( - bool Function(ffi.Pointer, ffi.Pointer) fn, { + static objc.ObjCBlock fromFunction( + void Function(NSData?, NSError?) fn, { bool keepIsolateAlive = true, - }) => - objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, ffi.Pointer) - >( - objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - return fn(arg0, arg1); - }, keepIsolateAlive), - retain: false, - release: true, + }) => objc.ObjCBlock( + objc.newClosureBlock(_closureCallable, ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return fn( + arg0.address == 0 + ? null + : NSData.fromPointer(arg0, retain: true, release: true), + arg1.address == 0 + ? null + : NSError.fromPointer(arg1, retain: true, release: true), ); + }, keepIsolateAlive), + retain: false, + release: true, + ); - static bool _fnPtrTrampoline( + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock listener( + void Function(NSData?, NSError?) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock(_listenerCallable.nativeFunction.cast(), ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return fn( + arg0.address == 0 + ? null + : NSData.fromPointer(arg0, retain: false, release: true), + arg1.address == 0 + ? null + : NSError.fromPointer(arg1, retain: false, release: true), + ); + }, keepIsolateAlive); + final wrapper = _1wx624s_wrapListenerBlock_pfv6jd(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock( + wrapper, + retain: false, + release: true, + ); + } + + /// Creates a blocking block from a Dart function. + /// + /// This callback can be invoked from any native thread, and will block the + /// caller until the callback is handled by the Dart isolate that created + /// the block. Async functions are not supported. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. If the owner isolate + /// has shut down, and the block is invoked by native code, it may block + /// indefinitely, or have other undefined behavior. + static objc.ObjCBlock blocking( + void Function(NSData?, NSError?) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock(_blockingCallable.nativeFunction.cast(), ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return fn( + arg0.address == 0 + ? null + : NSData.fromPointer(arg0, retain: false, release: true), + arg1.address == 0 + ? null + : NSError.fromPointer(arg1, retain: false, release: true), + ); + }, keepIsolateAlive); + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return fn( + arg0.address == 0 + ? null + : NSData.fromPointer(arg0, retain: false, release: true), + arg1.address == 0 + ? null + : NSError.fromPointer(arg1, retain: false, release: true), + ); + }, + keepIsolateAlive, + ); + final wrapper = _1wx624s_wrapBlockingBlock_pfv6jd( + raw, + rawListener, + objc.objCContext, + ); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock( + wrapper, + retain: false, + release: true, + ); + } + + static void _listenerTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1); + objc.objectRelease(block.cast()); + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_listenerTrampoline) + ..keepIsolateAlive = false; + static void _blockingTrampoline( + ffi.Pointer block, + ffi.Pointer waiter, + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + try { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1); + } catch (e) { + } finally { + objc.signalWaiter(waiter); + objc.objectRelease(block.cast()); + } + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.isolateLocal(_blockingTrampoline) + ..keepIsolateAlive = false; + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingListenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_blockingTrampoline) + ..keepIsolateAlive = false; + static void _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, + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, ) > >() .asFunction< - bool Function(ffi.Pointer, ffi.Pointer) + void Function( + ffi.Pointer, + ffi.Pointer, + ) >()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Bool Function( + ffi.Void Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) - >(_fnPtrTrampoline, false) + >(_fnPtrTrampoline) .cast(); - static bool _closureTrampoline( + static void _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + ffi.Pointer arg1, ) => (objc.getBlockClosure(block) - as bool Function( - ffi.Pointer, - ffi.Pointer, + as void Function( + ffi.Pointer, + ffi.Pointer, ))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< - ffi.Bool Function( + ffi.Void Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) - >(_closureTrampoline, false) + >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. -extension ObjCBlock_bool_ffiVoid_objcObjCSelector$CallExtension - on - objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ) - > { - bool call(ffi.Pointer arg0, ffi.Pointer arg1) { +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSData_NSError$CallExtension + on objc.ObjCBlock { + void call(NSData? arg0, NSError? arg1) { + final _$$ref = arg0?.ref; + final _$$ref$1 = arg1?.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Void Function( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + ffi.Pointer arg1, ) > >() .asFunction< - bool Function( + void Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) - >()(ref.pointer, arg0, arg1); + >()( + ref.pointer, + _$$ref?.pointer ?? ffi.nullptr, + _$$ref$1?.pointer ?? ffi.nullptr, + ); } } -/// Construction methods for `objc.ObjCBlock`. -abstract final class ObjCBlock_ffiVoid { +/// Construction methods for `objc.ObjCBlock?, NSError)>, ffi.Pointer, NSDictionary)>`. +abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObjectImpl_NSDictionary { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock fromPointer( + static objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + ffi.Pointer, + NSDictionary, + ) + > + fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => objc.ObjCBlock( - pointer, - retain: retain, - release: release, - ); + }) => + objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + ffi.Pointer, + 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. - static objc.ObjCBlock fromFunctionPointer( - ffi.Pointer> ptr, - ) => objc.ObjCBlock( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); + static objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + ffi.Pointer, + NSDictionary, + ) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + > + ptr, + ) => + objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + ffi.Pointer, + NSDictionary, + ) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); /// Creates a block from a Dart function. /// @@ -27660,16 +29875,53 @@ abstract final class ObjCBlock_ffiVoid { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock fromFunction( - void Function() fn, { + static objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + ffi.Pointer, + NSDictionary, + ) + > + fromFunction( + void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + objc.ObjCObject, + NSDictionary, + ) + fn, { bool keepIsolateAlive = true, - }) => objc.ObjCBlock( - objc.newClosureBlock(_closureCallable, () { - return fn(); - }, keepIsolateAlive), - retain: false, - release: true, - ); + }) => + objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + ffi.Pointer, + NSDictionary, + ) + >( + objc.newClosureBlock(_closureCallable, ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + return fn( + ObjCBlock_ffiVoid_idNSSecureCoding_NSError.fromPointer( + arg0, + retain: true, + release: true, + ), + objc.ObjCObject(arg1, retain: true, release: true), + NSDictionary.fromPointer(arg2, retain: true, release: true), + ); + }, keepIsolateAlive), + retain: false, + release: true, + ); /// Creates a listener block from a Dart function. /// @@ -27680,24 +29932,52 @@ abstract final class ObjCBlock_ffiVoid { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock listener( - void Function() fn, { + static objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + ffi.Pointer, + NSDictionary, + ) + > + listener( + void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + objc.ObjCObject, + NSDictionary, + ) + fn, { bool keepIsolateAlive = true, }) { - final raw = objc.newClosureBlock( - _listenerCallable.nativeFunction.cast(), - () { - return fn(); - }, - keepIsolateAlive, - ); - final wrapper = _1wx624s_wrapListenerBlock_1pl9qdv(raw); + final raw = objc.newClosureBlock(_listenerCallable.nativeFunction.cast(), ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + return fn( + ObjCBlock_ffiVoid_idNSSecureCoding_NSError.fromPointer( + arg0, + retain: false, + release: true, + ), + objc.ObjCObject(arg1, retain: false, release: true), + NSDictionary.fromPointer(arg2, retain: false, release: true), + ); + }, keepIsolateAlive); + final wrapper = _1wx624s_wrapListenerBlock_1b3bb6a(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock( - wrapper, - retain: false, - release: true, - ); + return objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + ffi.Pointer, + NSDictionary, + ) + >(wrapper, retain: false, release: true); } /// Creates a blocking block from a Dart function. @@ -27710,55 +29990,122 @@ abstract final class ObjCBlock_ffiVoid { /// until it is garbage collected by both Dart and ObjC. If the owner isolate /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock blocking( - void Function() fn, { + static objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + ffi.Pointer, + NSDictionary, + ) + > + blocking( + void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + objc.ObjCObject, + NSDictionary, + ) + fn, { bool keepIsolateAlive = true, }) { - final raw = objc.newClosureBlock( - _blockingCallable.nativeFunction.cast(), - () { - return fn(); - }, - keepIsolateAlive, - ); - final rawListener = objc.newClosureBlock( - _blockingListenerCallable.nativeFunction.cast(), - () { - return fn(); - }, - keepIsolateAlive, - ); - final wrapper = _1wx624s_wrapBlockingBlock_1pl9qdv( + final raw = objc.newClosureBlock(_blockingCallable.nativeFunction.cast(), ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + return fn( + ObjCBlock_ffiVoid_idNSSecureCoding_NSError.fromPointer( + arg0, + retain: false, + release: true, + ), + objc.ObjCObject(arg1, retain: false, release: true), + NSDictionary.fromPointer(arg2, retain: false, release: true), + ); + }, keepIsolateAlive); + final rawListener = objc + .newClosureBlock(_blockingListenerCallable.nativeFunction.cast(), ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + return fn( + ObjCBlock_ffiVoid_idNSSecureCoding_NSError.fromPointer( + arg0, + retain: false, + release: true, + ), + objc.ObjCObject(arg1, retain: false, release: true), + NSDictionary.fromPointer(arg2, retain: false, release: true), + ); + }, keepIsolateAlive); + final wrapper = _1wx624s_wrapBlockingBlock_1b3bb6a( raw, rawListener, objc.objCContext, ); objc.objectRelease(raw.cast()); objc.objectRelease(rawListener.cast()); - return objc.ObjCBlock( - wrapper, - retain: false, - release: true, - ); + return objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + ffi.Pointer, + NSDictionary, + ) + >(wrapper, retain: false, release: true); } - static void _listenerTrampoline(ffi.Pointer block) { - (objc.getBlockClosure(block) as void Function())(); + static void _listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2); objc.objectRelease(block.cast()); } - static ffi.NativeCallable)> + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > _listenerCallable = ffi.NativeCallable< - ffi.Void Function(ffi.Pointer) + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) >.listener(_listenerTrampoline) ..keepIsolateAlive = false; static void _blockingTrampoline( ffi.Pointer block, ffi.Pointer waiter, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { try { - (objc.getBlockClosure(block) as void Function())(); + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2); } catch (e) { } finally { objc.signalWaiter(waiter); @@ -27767,120 +30114,178 @@ abstract final class ObjCBlock_ffiVoid { } static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, ffi.Pointer) + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) > _blockingCallable = ffi.NativeCallable< ffi.Void Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) >.isolateLocal(_blockingTrampoline) ..keepIsolateAlive = false; static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, ffi.Pointer) + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) > _blockingListenerCallable = ffi.NativeCallable< ffi.Void Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) >.listener(_blockingTrampoline) ..keepIsolateAlive = false; - static void _fnPtrTrampoline(ffi.Pointer block) => block - .ref - .target - .cast>() - .asFunction()(); + static void _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); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer) + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) >(_fnPtrTrampoline) .cast(); - static void _closureTrampoline(ffi.Pointer block) => - (objc.getBlockClosure(block) as void Function())(); + static void _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer) + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid$CallExtension - on objc.ObjCBlock { - void call() { +/// Call operator for `objc.ObjCBlock?, NSError)>, ffi.Pointer, NSDictionary)>`. +extension ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObjectImpl_NSDictionary$CallExtension + on + objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + ffi.Pointer, + NSDictionary, + ) + > { + void call( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + > + arg0, + objc.ObjCObject arg1, + NSDictionary arg2, + ) { + final _$$ref = arg0.ref; + final _$$ref$1 = arg1.ref; + final _$$ref$2 = arg2.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block) + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) > >() - .asFunction)>()( - ref.pointer, - ); + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(ref.pointer, _$$ref.pointer, _$$ref$1.pointer, _$$ref$2.pointer); } } -/// Construction methods for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>`. -abstract final class ObjCBlock_ffiVoid_KeyType_ObjectType_bool { +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_NSRange_bool { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > + static objc.ObjCBlock)> fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(pointer, retain: retain, release: release); + }) => objc.ObjCBlock)>( + pointer, + retain: retain, + release: release, + ); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > + static objc.ObjCBlock)> fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ) + ffi.Void Function(NSRange arg0, ffi.Pointer arg1) > > ptr, - ) => - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); + ) => objc.ObjCBlock)>( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); /// Creates a block from a Dart function. /// @@ -27890,38 +30295,20 @@ abstract final class ObjCBlock_ffiVoid_KeyType_ObjectType_bool { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > + static objc.ObjCBlock)> fromFunction( - void Function(objc.ObjCObject, objc.ObjCObject, ffi.Pointer) fn, { + void Function(NSRange, ffi.Pointer) fn, { bool keepIsolateAlive = true, - }) => - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >( - objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ) { - return fn( - objc.ObjCObject(arg0, retain: true, release: true), - objc.ObjCObject(arg1, retain: true, release: true), - arg2, - ); - }, keepIsolateAlive), - retain: false, - release: true, - ); + }) => objc.ObjCBlock)>( + objc.newClosureBlock(_closureCallable, ( + NSRange arg0, + ffi.Pointer arg1, + ) { + return fn(arg0, arg1); + }, keepIsolateAlive), + retain: false, + release: true, + ); /// Creates a listener block from a Dart function. /// @@ -27932,37 +30319,24 @@ abstract final class ObjCBlock_ffiVoid_KeyType_ObjectType_bool { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > + static objc.ObjCBlock)> listener( - void Function(objc.ObjCObject, objc.ObjCObject, ffi.Pointer) fn, { + void Function(NSRange, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_listenerCallable.nativeFunction.cast(), ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + NSRange arg0, + ffi.Pointer arg1, ) { - return fn( - objc.ObjCObject(arg0, retain: false, release: true), - objc.ObjCObject(arg1, retain: false, release: true), - arg2, - ); + return fn(arg0, arg1); }, keepIsolateAlive); - final wrapper = _1wx624s_wrapListenerBlock_1o83rbn(raw); + final wrapper = _1wx624s_wrapListenerBlock_zkjmn1(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(wrapper, retain: false, release: true); + return objc.ObjCBlock)>( + wrapper, + retain: false, + release: true, + ); } /// Creates a blocking block from a Dart function. @@ -27975,76 +30349,52 @@ abstract final class ObjCBlock_ffiVoid_KeyType_ObjectType_bool { /// until it is garbage collected by both Dart and ObjC. If the owner isolate /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > + static objc.ObjCBlock)> blocking( - void Function(objc.ObjCObject, objc.ObjCObject, ffi.Pointer) fn, { + void Function(NSRange, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_blockingCallable.nativeFunction.cast(), ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + NSRange arg0, + ffi.Pointer arg1, ) { - return fn( - objc.ObjCObject(arg0, retain: false, release: true), - objc.ObjCObject(arg1, retain: false, release: true), - arg2, - ); + return fn(arg0, arg1); }, keepIsolateAlive); - final rawListener = objc - .newClosureBlock(_blockingListenerCallable.nativeFunction.cast(), ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ) { - return fn( - objc.ObjCObject(arg0, retain: false, release: true), - objc.ObjCObject(arg1, retain: false, release: true), - arg2, - ); - }, keepIsolateAlive); - final wrapper = _1wx624s_wrapBlockingBlock_1o83rbn( + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + (NSRange arg0, ffi.Pointer arg1) { + return fn(arg0, arg1); + }, + keepIsolateAlive, + ); + final wrapper = _1wx624s_wrapBlockingBlock_zkjmn1( raw, rawListener, objc.objCContext, ); objc.objectRelease(raw.cast()); objc.objectRelease(rawListener.cast()); - return objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(wrapper, retain: false, release: true); + return objc.ObjCBlock)>( + wrapper, + retain: false, + release: true, + ); } static void _listenerTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + NSRange arg0, + ffi.Pointer arg1, ) { (objc.getBlockClosure(block) - as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1, arg2); + as void Function(NSRange, ffi.Pointer))(arg0, arg1); objc.objectRelease(block.cast()); } static ffi.NativeCallable< ffi.Void Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + NSRange, ffi.Pointer, ) > @@ -28052,8 +30402,7 @@ abstract final class ObjCBlock_ffiVoid_KeyType_ObjectType_bool { ffi.NativeCallable< ffi.Void Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + NSRange, ffi.Pointer, ) >.listener(_listenerTrampoline) @@ -28061,17 +30410,12 @@ abstract final class ObjCBlock_ffiVoid_KeyType_ObjectType_bool { static void _blockingTrampoline( ffi.Pointer block, ffi.Pointer waiter, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + NSRange arg0, + ffi.Pointer arg1, ) { try { (objc.getBlockClosure(block) - as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1, arg2); + as void Function(NSRange, ffi.Pointer))(arg0, arg1); } catch (e) { } finally { objc.signalWaiter(waiter); @@ -28083,8 +30427,7 @@ abstract final class ObjCBlock_ffiVoid_KeyType_ObjectType_bool { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + NSRange, ffi.Pointer, ) > @@ -28093,8 +30436,7 @@ abstract final class ObjCBlock_ffiVoid_KeyType_ObjectType_bool { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + NSRange, ffi.Pointer, ) >.isolateLocal(_blockingTrampoline) @@ -28103,8 +30445,7 @@ abstract final class ObjCBlock_ffiVoid_KeyType_ObjectType_bool { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + NSRange, ffi.Pointer, ) > @@ -28113,141 +30454,116 @@ abstract final class ObjCBlock_ffiVoid_KeyType_ObjectType_bool { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + NSRange, ffi.Pointer, ) >.listener(_blockingTrampoline) ..keepIsolateAlive = false; static void _fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + NSRange arg0, + ffi.Pointer arg1, ) => block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ) + ffi.Void Function(NSRange arg0, ffi.Pointer arg1) > >() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >()(arg0, arg1, arg2); + .asFunction)>()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + NSRange, ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static void _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + NSRange arg0, + ffi.Pointer arg1, ) => (objc.getBlockClosure(block) - as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1, arg2); + as void Function(NSRange, ffi.Pointer))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + NSRange, ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>`. -extension ObjCBlock_ffiVoid_KeyType_ObjectType_bool$CallExtension - on - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > { - void call( - objc.ObjCObject arg0, - objc.ObjCObject arg1, - ffi.Pointer arg2, - ) { - final _$$ref = arg0.ref; - final _$$ref$1 = arg1.ref; +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_NSRange_bool$CallExtension + on objc.ObjCBlock)> { + void call(NSRange arg0, ffi.Pointer arg1) { return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + NSRange arg0, + ffi.Pointer arg1, ) > >() .asFunction< void Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + NSRange, ffi.Pointer, ) - >()(ref.pointer, _$$ref.pointer, _$$ref$1.pointer, arg2); + >()(ref.pointer, arg0, arg1); } } -/// Construction methods for `objc.ObjCBlock`. -abstract final class ObjCBlock_ffiVoid_NSData_NSError { +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock fromPointer( + static objc.ObjCBlock< + ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) + > + fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => objc.ObjCBlock( - pointer, - retain: retain, - release: release, - ); + }) => + objc.ObjCBlock< + ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) + >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock + static objc.ObjCBlock< + ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) + > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function( ffi.Pointer arg0, - ffi.Pointer arg1, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3, ) > > ptr, - ) => objc.ObjCBlock( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); + ) => + objc.ObjCBlock< + ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); /// Creates a block from a Dart function. /// @@ -28257,26 +30573,34 @@ abstract final class ObjCBlock_ffiVoid_NSData_NSError { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock fromFunction( - void Function(NSData?, NSError?) fn, { + static objc.ObjCBlock< + ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) + > + fromFunction( + void Function(NSString?, NSRange, NSRange, ffi.Pointer) fn, { bool keepIsolateAlive = true, - }) => objc.ObjCBlock( - objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - return fn( - arg0.address == 0 - ? null - : NSData.fromPointer(arg0, retain: true, release: true), - arg1.address == 0 - ? null - : NSError.fromPointer(arg1, retain: true, release: true), + }) => + objc.ObjCBlock< + ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) + >( + objc.newClosureBlock(_closureCallable, ( + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3, + ) { + return fn( + arg0.address == 0 + ? null + : NSString.fromPointer(arg0, retain: true, release: true), + arg1, + arg2, + arg3, + ); + }, keepIsolateAlive), + retain: false, + release: true, ); - }, keepIsolateAlive), - retain: false, - release: true, - ); /// Creates a listener block from a Dart function. /// @@ -28287,30 +30611,33 @@ abstract final class ObjCBlock_ffiVoid_NSData_NSError { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock listener( - void Function(NSData?, NSError?) fn, { + static objc.ObjCBlock< + ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) + > + listener( + void Function(NSString?, NSRange, NSRange, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_listenerCallable.nativeFunction.cast(), ( ffi.Pointer arg0, - ffi.Pointer arg1, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3, ) { return fn( arg0.address == 0 ? null - : NSData.fromPointer(arg0, retain: false, release: true), - arg1.address == 0 - ? null - : NSError.fromPointer(arg1, retain: false, release: true), + : NSString.fromPointer(arg0, retain: false, release: true), + arg1, + arg2, + arg3, ); }, keepIsolateAlive); - final wrapper = _1wx624s_wrapListenerBlock_pfv6jd(raw); + final wrapper = _1wx624s_wrapListenerBlock_lmc3p5(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock( - wrapper, - retain: false, - release: true, - ); + return objc.ObjCBlock< + ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) + >(wrapper, retain: false, release: true); } /// Creates a blocking block from a Dart function. @@ -28323,64 +30650,70 @@ abstract final class ObjCBlock_ffiVoid_NSData_NSError { /// until it is garbage collected by both Dart and ObjC. If the owner isolate /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock blocking( - void Function(NSData?, NSError?) fn, { + static objc.ObjCBlock< + ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) + > + blocking( + void Function(NSString?, NSRange, NSRange, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_blockingCallable.nativeFunction.cast(), ( ffi.Pointer arg0, - ffi.Pointer arg1, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3, ) { return fn( arg0.address == 0 ? null - : NSData.fromPointer(arg0, retain: false, release: true), - arg1.address == 0 - ? null - : NSError.fromPointer(arg1, retain: false, release: true), + : NSString.fromPointer(arg0, retain: false, release: true), + arg1, + arg2, + arg3, ); }, keepIsolateAlive); - final rawListener = objc.newClosureBlock( - _blockingListenerCallable.nativeFunction.cast(), - ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - return fn( - arg0.address == 0 - ? null - : NSData.fromPointer(arg0, retain: false, release: true), - arg1.address == 0 - ? null - : NSError.fromPointer(arg1, retain: false, release: true), - ); - }, - keepIsolateAlive, - ); - final wrapper = _1wx624s_wrapBlockingBlock_pfv6jd( + final rawListener = objc + .newClosureBlock(_blockingListenerCallable.nativeFunction.cast(), ( + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3, + ) { + return fn( + arg0.address == 0 + ? null + : NSString.fromPointer(arg0, retain: false, release: true), + arg1, + arg2, + arg3, + ); + }, keepIsolateAlive); + final wrapper = _1wx624s_wrapBlockingBlock_lmc3p5( raw, rawListener, objc.objCContext, ); objc.objectRelease(raw.cast()); objc.objectRelease(rawListener.cast()); - return objc.ObjCBlock( - wrapper, - retain: false, - release: true, - ); + return objc.ObjCBlock< + ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) + >(wrapper, retain: false, release: true); } static void _listenerTrampoline( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3, ) { (objc.getBlockClosure(block) as void Function( ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1); + NSRange, + NSRange, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3); objc.objectRelease(block.cast()); } @@ -28388,7 +30721,9 @@ abstract final class ObjCBlock_ffiVoid_NSData_NSError { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + NSRange, + NSRange, + ffi.Pointer, ) > _listenerCallable = @@ -28396,7 +30731,9 @@ abstract final class ObjCBlock_ffiVoid_NSData_NSError { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + NSRange, + NSRange, + ffi.Pointer, ) >.listener(_listenerTrampoline) ..keepIsolateAlive = false; @@ -28404,14 +30741,18 @@ abstract final class ObjCBlock_ffiVoid_NSData_NSError { ffi.Pointer block, ffi.Pointer waiter, ffi.Pointer arg0, - ffi.Pointer arg1, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3, ) { try { (objc.getBlockClosure(block) as void Function( ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1); + NSRange, + NSRange, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3); } catch (e) { } finally { objc.signalWaiter(waiter); @@ -28424,7 +30765,9 @@ abstract final class ObjCBlock_ffiVoid_NSData_NSError { ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, + NSRange, + NSRange, + ffi.Pointer, ) > _blockingCallable = @@ -28433,7 +30776,9 @@ abstract final class ObjCBlock_ffiVoid_NSData_NSError { ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, + NSRange, + NSRange, + ffi.Pointer, ) >.isolateLocal(_blockingTrampoline) ..keepIsolateAlive = false; @@ -28442,7 +30787,9 @@ abstract final class ObjCBlock_ffiVoid_NSData_NSError { ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, + NSRange, + NSRange, + ffi.Pointer, ) > _blockingListenerCallable = @@ -28451,72 +30798,97 @@ abstract final class ObjCBlock_ffiVoid_NSData_NSError { ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, + NSRange, + NSRange, + ffi.Pointer, ) >.listener(_blockingTrampoline) ..keepIsolateAlive = false; static void _fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3, ) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer arg0, - ffi.Pointer arg1, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3, ) > >() .asFunction< void Function( ffi.Pointer, - ffi.Pointer, + NSRange, + NSRange, + ffi.Pointer, ) - >()(arg0, arg1); + >()(arg0, arg1, arg2, arg3); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + NSRange, + NSRange, + ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static void _closureTrampoline( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3, ) => (objc.getBlockClosure(block) as void Function( ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1); + NSRange, + NSRange, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + NSRange, + NSRange, + ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSData_NSError$CallExtension - on objc.ObjCBlock { - void call(NSData? arg0, NSError? arg1) { +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool$CallExtension + on + objc.ObjCBlock< + ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) + > { + void call( + NSString? arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3, + ) { final _$$ref = arg0?.ref; - final _$$ref$1 = arg1?.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3, ) > >() @@ -28524,82 +30896,49 @@ extension ObjCBlock_ffiVoid_NSData_NSError$CallExtension void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + NSRange, + NSRange, + ffi.Pointer, ) - >()( - ref.pointer, - _$$ref?.pointer ?? ffi.nullptr, - _$$ref$1?.pointer ?? ffi.nullptr, - ); + >()(ref.pointer, _$$ref?.pointer ?? ffi.nullptr, arg1, arg2, arg3); } } -/// Construction methods for `objc.ObjCBlock?, NSError)>, ffi.Pointer, NSDictionary)>`. -abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObjectImpl_NSDictionary { +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_NSString_bool { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, - ffi.Pointer, - NSDictionary, - ) - > + static objc.ObjCBlock)> fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => - objc.ObjCBlock< - ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, - ffi.Pointer, - NSDictionary, - ) - >(pointer, retain: retain, release: release); + }) => objc.ObjCBlock)>( + pointer, + retain: retain, + release: release, + ); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock< - ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, - ffi.Pointer, - NSDictionary, - ) - > + static objc.ObjCBlock)> fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + ffi.Pointer arg0, + ffi.Pointer arg1, ) > > ptr, - ) => - objc.ObjCBlock< - ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, - ffi.Pointer, - NSDictionary, - ) - >( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); + ) => objc.ObjCBlock)>( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); /// Creates a block from a Dart function. /// @@ -28609,53 +30948,20 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock< - ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, - ffi.Pointer, - NSDictionary, - ) - > + static objc.ObjCBlock)> fromFunction( - void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, - objc.ObjCObject, - NSDictionary, - ) - fn, { + void Function(NSString, ffi.Pointer) fn, { bool keepIsolateAlive = true, - }) => - objc.ObjCBlock< - ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, - ffi.Pointer, - NSDictionary, - ) - >( - objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ) { - return fn( - ObjCBlock_ffiVoid_idNSSecureCoding_NSError.fromPointer( - arg0, - retain: true, - release: true, - ), - objc.ObjCObject(arg1, retain: true, release: true), - NSDictionary.fromPointer(arg2, retain: true, release: true), - ); - }, keepIsolateAlive), - retain: false, - release: true, - ); + }) => objc.ObjCBlock)>( + objc.newClosureBlock(_closureCallable, ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return fn(NSString.fromPointer(arg0, retain: true, release: true), arg1); + }, keepIsolateAlive), + retain: false, + release: true, + ); /// Creates a listener block from a Dart function. /// @@ -28666,52 +30972,24 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock< - ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, - ffi.Pointer, - NSDictionary, - ) - > + static objc.ObjCBlock)> listener( - void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, - objc.ObjCObject, - NSDictionary, - ) - fn, { + void Function(NSString, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_listenerCallable.nativeFunction.cast(), ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return fn( - ObjCBlock_ffiVoid_idNSSecureCoding_NSError.fromPointer( - arg0, - retain: false, - release: true, - ), - objc.ObjCObject(arg1, retain: false, release: true), - NSDictionary.fromPointer(arg2, retain: false, release: true), - ); + return fn(NSString.fromPointer(arg0, retain: false, release: true), arg1); }, keepIsolateAlive); - final wrapper = _1wx624s_wrapListenerBlock_1b3bb6a(raw); + final wrapper = _1wx624s_wrapListenerBlock_t8l8el(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock< - ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, - ffi.Pointer, - NSDictionary, - ) - >(wrapper, retain: false, release: true); + return objc.ObjCBlock)>( + wrapper, + retain: false, + release: true, + ); } /// Creates a blocking block from a Dart function. @@ -28724,122 +31002,82 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO /// until it is garbage collected by both Dart and ObjC. If the owner isolate /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock< - ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, - ffi.Pointer, - NSDictionary, - ) - > + static objc.ObjCBlock)> blocking( - void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, - objc.ObjCObject, - NSDictionary, - ) - fn, { + void Function(NSString, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_blockingCallable.nativeFunction.cast(), ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return fn( - ObjCBlock_ffiVoid_idNSSecureCoding_NSError.fromPointer( - arg0, - retain: false, - release: true, - ), - objc.ObjCObject(arg1, retain: false, release: true), - NSDictionary.fromPointer(arg2, retain: false, release: true), - ); + return fn(NSString.fromPointer(arg0, retain: false, release: true), arg1); }, keepIsolateAlive); - final rawListener = objc - .newClosureBlock(_blockingListenerCallable.nativeFunction.cast(), ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ) { - return fn( - ObjCBlock_ffiVoid_idNSSecureCoding_NSError.fromPointer( - arg0, - retain: false, - release: true, - ), - objc.ObjCObject(arg1, retain: false, release: true), - NSDictionary.fromPointer(arg2, retain: false, release: true), - ); - }, keepIsolateAlive); - final wrapper = _1wx624s_wrapBlockingBlock_1b3bb6a( + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0, ffi.Pointer arg1) { + return fn( + NSString.fromPointer(arg0, retain: false, release: true), + arg1, + ); + }, + keepIsolateAlive, + ); + final wrapper = _1wx624s_wrapBlockingBlock_t8l8el( raw, rawListener, objc.objCContext, ); objc.objectRelease(raw.cast()); objc.objectRelease(rawListener.cast()); - return objc.ObjCBlock< - ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, - ffi.Pointer, - NSDictionary, - ) - >(wrapper, retain: false, release: true); + return objc.ObjCBlock)>( + wrapper, + retain: false, + release: true, + ); } static void _listenerTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + ffi.Pointer arg0, + ffi.Pointer arg1, ) { (objc.getBlockClosure(block) as void Function( - ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1, arg2); + ffi.Pointer, + ))(arg0, arg1); objc.objectRelease(block.cast()); } static ffi.NativeCallable< ffi.Void Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) > _listenerCallable = ffi.NativeCallable< ffi.Void Function( - ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ) >.listener(_listenerTrampoline) ..keepIsolateAlive = false; static void _blockingTrampoline( ffi.Pointer block, ffi.Pointer waiter, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + ffi.Pointer arg0, + ffi.Pointer arg1, ) { try { (objc.getBlockClosure(block) as void Function( - ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1, arg2); + ffi.Pointer, + ))(arg0, arg1); } catch (e) { } finally { objc.signalWaiter(waiter); @@ -28851,9 +31089,8 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) > _blockingCallable = @@ -28861,9 +31098,8 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) >.isolateLocal(_blockingTrampoline) ..keepIsolateAlive = false; @@ -28871,9 +31107,8 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) > _blockingListenerCallable = @@ -28881,122 +31116,90 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) >.listener(_blockingTrampoline) ..keepIsolateAlive = false; static void _fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + ffi.Pointer arg0, + ffi.Pointer arg1, ) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + ffi.Pointer arg0, + ffi.Pointer arg1, ) > >() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >()(arg0, arg1, arg2); + void Function(ffi.Pointer, ffi.Pointer) + >()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static void _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + ffi.Pointer arg0, + ffi.Pointer arg1, ) => (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, ffi.Pointer, - ))(arg0, arg1, arg2); + ffi.Pointer, + ))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock?, NSError)>, ffi.Pointer, NSDictionary)>`. -extension ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObjectImpl_NSDictionary$CallExtension - on - objc.ObjCBlock< - ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, - ffi.Pointer, - NSDictionary, - ) - > { - void call( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - > - arg0, - objc.ObjCObject arg1, - NSDictionary arg2, - ) { +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_NSString_bool$CallExtension + on objc.ObjCBlock)> { + void call(NSString arg0, ffi.Pointer arg1) { final _$$ref = arg0.ref; - final _$$ref$1 = arg1.ref; - final _$$ref$2 = arg2.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + ffi.Pointer arg0, + ffi.Pointer arg1, ) > >() .asFunction< void Function( - ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ) - >()(ref.pointer, _$$ref.pointer, _$$ref$1.pointer, _$$ref$2.pointer); + >()(ref.pointer, _$$ref.pointer, arg1); } } -/// Construction methods for `objc.ObjCBlock)>`. -abstract final class ObjCBlock_ffiVoid_NSRange_bool { +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSTimer { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock)> - fromPointer( + static objc.ObjCBlock fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => objc.ObjCBlock)>( + }) => objc.ObjCBlock( pointer, retain: retain, release: release, @@ -29007,15 +31210,14 @@ abstract final class ObjCBlock_ffiVoid_NSRange_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. - static objc.ObjCBlock)> - fromFunctionPointer( + static objc.ObjCBlock fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(NSRange arg0, ffi.Pointer arg1) + ffi.Void Function(ffi.Pointer arg0) > > ptr, - ) => objc.ObjCBlock)>( + ) => objc.ObjCBlock( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, release: true, @@ -29029,16 +31231,14 @@ abstract final class ObjCBlock_ffiVoid_NSRange_bool { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock)> - fromFunction( - void Function(NSRange, ffi.Pointer) fn, { + static objc.ObjCBlock fromFunction( + void Function(NSTimer) fn, { bool keepIsolateAlive = true, - }) => objc.ObjCBlock)>( + }) => objc.ObjCBlock( objc.newClosureBlock(_closureCallable, ( - NSRange arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, ) { - return fn(arg0, arg1); + return fn(NSTimer.fromPointer(arg0, retain: true, release: true)); }, keepIsolateAlive), retain: false, release: true, @@ -29053,20 +31253,18 @@ abstract final class ObjCBlock_ffiVoid_NSRange_bool { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock)> - listener( - void Function(NSRange, ffi.Pointer) fn, { + static objc.ObjCBlock listener( + void Function(NSTimer) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_listenerCallable.nativeFunction.cast(), ( - NSRange arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, ) { - return fn(arg0, arg1); + return fn(NSTimer.fromPointer(arg0, retain: false, release: true)); }, keepIsolateAlive); - final wrapper = _1wx624s_wrapListenerBlock_zkjmn1(raw); + final wrapper = _1wx624s_wrapListenerBlock_xtuoz7(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock)>( + return objc.ObjCBlock( wrapper, retain: false, release: true, @@ -29083,32 +31281,30 @@ abstract final class ObjCBlock_ffiVoid_NSRange_bool { /// until it is garbage collected by both Dart and ObjC. If the owner isolate /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock)> - blocking( - void Function(NSRange, ffi.Pointer) fn, { + static objc.ObjCBlock blocking( + void Function(NSTimer) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_blockingCallable.nativeFunction.cast(), ( - NSRange arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, ) { - return fn(arg0, arg1); + return fn(NSTimer.fromPointer(arg0, retain: false, release: true)); }, keepIsolateAlive); final rawListener = objc.newClosureBlock( _blockingListenerCallable.nativeFunction.cast(), - (NSRange arg0, ffi.Pointer arg1) { - return fn(arg0, arg1); + (ffi.Pointer arg0) { + return fn(NSTimer.fromPointer(arg0, retain: false, release: true)); }, keepIsolateAlive, ); - final wrapper = _1wx624s_wrapBlockingBlock_zkjmn1( + final wrapper = _1wx624s_wrapBlockingBlock_xtuoz7( raw, rawListener, objc.objCContext, ); objc.objectRelease(raw.cast()); objc.objectRelease(rawListener.cast()); - return objc.ObjCBlock)>( + return objc.ObjCBlock( wrapper, retain: false, release: true, @@ -29117,39 +31313,35 @@ abstract final class ObjCBlock_ffiVoid_NSRange_bool { static void _listenerTrampoline( ffi.Pointer block, - NSRange arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, ) { (objc.getBlockClosure(block) - as void Function(NSRange, ffi.Pointer))(arg0, arg1); + as void Function(ffi.Pointer))(arg0); objc.objectRelease(block.cast()); } static ffi.NativeCallable< ffi.Void Function( ffi.Pointer, - NSRange, - ffi.Pointer, + ffi.Pointer, ) > _listenerCallable = ffi.NativeCallable< ffi.Void Function( ffi.Pointer, - NSRange, - ffi.Pointer, + ffi.Pointer, ) >.listener(_listenerTrampoline) ..keepIsolateAlive = false; static void _blockingTrampoline( ffi.Pointer block, ffi.Pointer waiter, - NSRange arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, ) { try { (objc.getBlockClosure(block) - as void Function(NSRange, ffi.Pointer))(arg0, arg1); + as void Function(ffi.Pointer))(arg0); } catch (e) { } finally { objc.signalWaiter(waiter); @@ -29161,8 +31353,7 @@ abstract final class ObjCBlock_ffiVoid_NSRange_bool { ffi.Void Function( ffi.Pointer, ffi.Pointer, - NSRange, - ffi.Pointer, + ffi.Pointer, ) > _blockingCallable = @@ -29170,8 +31361,7 @@ abstract final class ObjCBlock_ffiVoid_NSRange_bool { ffi.Void Function( ffi.Pointer, ffi.Pointer, - NSRange, - ffi.Pointer, + ffi.Pointer, ) >.isolateLocal(_blockingTrampoline) ..keepIsolateAlive = false; @@ -29179,8 +31369,7 @@ abstract final class ObjCBlock_ffiVoid_NSRange_bool { ffi.Void Function( ffi.Pointer, ffi.Pointer, - NSRange, - ffi.Pointer, + ffi.Pointer, ) > _blockingListenerCallable = @@ -29188,78 +31377,72 @@ abstract final class ObjCBlock_ffiVoid_NSRange_bool { ffi.Void Function( ffi.Pointer, ffi.Pointer, - NSRange, - ffi.Pointer, + ffi.Pointer, ) >.listener(_blockingTrampoline) ..keepIsolateAlive = false; static void _fnPtrTrampoline( ffi.Pointer block, - NSRange arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, ) => block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function(NSRange arg0, ffi.Pointer arg1) + ffi.Void Function(ffi.Pointer arg0) > >() - .asFunction)>()(arg0, arg1); + .asFunction)>()(arg0); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, - NSRange, - ffi.Pointer, + ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static void _closureTrampoline( ffi.Pointer block, - NSRange arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, ) => (objc.getBlockClosure(block) - as void Function(NSRange, ffi.Pointer))(arg0, arg1); + as void Function(ffi.Pointer))(arg0); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, - NSRange, - ffi.Pointer, + ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_ffiVoid_NSRange_bool$CallExtension - on objc.ObjCBlock)> { - void call(NSRange arg0, ffi.Pointer arg1) { +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSTimer$CallExtension + on objc.ObjCBlock { + void call(NSTimer arg0) { + final _$$ref = arg0.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, - NSRange arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, ) > >() .asFunction< void Function( ffi.Pointer, - NSRange, - ffi.Pointer, + ffi.Pointer, ) - >()(ref.pointer, arg0, arg1); + >()(ref.pointer, _$$ref.pointer); } } -/// Construction methods for `objc.ObjCBlock)>`. -abstract final class ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool { +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_NSUInteger_bool { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) + ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) > fromPointer( ffi.Pointer pointer, { @@ -29267,7 +31450,7 @@ abstract final class ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool { bool release = false, }) => objc.ObjCBlock< - ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) + ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. @@ -29276,23 +31459,18 @@ abstract final class ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) + ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3, - ) + ffi.Void Function(ffi.UnsignedLong arg0, ffi.Pointer arg1) > > ptr, ) => objc.ObjCBlock< - ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) + ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, @@ -29308,29 +31486,20 @@ abstract final class ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) + ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) > fromFunction( - void Function(NSString?, NSRange, NSRange, ffi.Pointer) fn, { + void Function(int, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< - ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) + ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) >( objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3, + int arg0, + ffi.Pointer arg1, ) { - return fn( - arg0.address == 0 - ? null - : NSString.fromPointer(arg0, retain: true, release: true), - arg1, - arg2, - arg3, - ); + return fn(arg0, arg1); }, keepIsolateAlive), retain: false, release: true, @@ -29346,31 +31515,22 @@ abstract final class ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) + ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) > listener( - void Function(NSString?, NSRange, NSRange, ffi.Pointer) fn, { + void Function(int, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_listenerCallable.nativeFunction.cast(), ( - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3, + int arg0, + ffi.Pointer arg1, ) { - return fn( - arg0.address == 0 - ? null - : NSString.fromPointer(arg0, retain: false, release: true), - arg1, - arg2, - arg3, - ); + return fn(arg0, arg1); }, keepIsolateAlive); - final wrapper = _1wx624s_wrapListenerBlock_lmc3p5(raw); + final wrapper = _1wx624s_wrapListenerBlock_q5jeyk(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< - ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) + ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) >(wrapper, retain: false, release: true); } @@ -29385,44 +31545,26 @@ abstract final class ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool { /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. static objc.ObjCBlock< - ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) + ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) > blocking( - void Function(NSString?, NSRange, NSRange, ffi.Pointer) fn, { + void Function(int, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_blockingCallable.nativeFunction.cast(), ( - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3, + int arg0, + ffi.Pointer arg1, ) { - return fn( - arg0.address == 0 - ? null - : NSString.fromPointer(arg0, retain: false, release: true), - arg1, - arg2, - arg3, - ); + return fn(arg0, arg1); }, keepIsolateAlive); - final rawListener = objc - .newClosureBlock(_blockingListenerCallable.nativeFunction.cast(), ( - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3, - ) { - return fn( - arg0.address == 0 - ? null - : NSString.fromPointer(arg0, retain: false, release: true), - arg1, - arg2, - arg3, - ); - }, keepIsolateAlive); - final wrapper = _1wx624s_wrapBlockingBlock_lmc3p5( + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + (int arg0, ffi.Pointer arg1) { + return fn(arg0, arg1); + }, + keepIsolateAlive, + ); + final wrapper = _1wx624s_wrapBlockingBlock_q5jeyk( raw, rawListener, objc.objCContext, @@ -29430,33 +31572,26 @@ abstract final class ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool { objc.objectRelease(raw.cast()); objc.objectRelease(rawListener.cast()); return objc.ObjCBlock< - ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) + ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) >(wrapper, retain: false, release: true); } static void _listenerTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3, + int arg0, + ffi.Pointer arg1, ) { - (objc.getBlockClosure(block) - as void Function( - ffi.Pointer, - NSRange, - NSRange, - ffi.Pointer, - ))(arg0, arg1, arg2, arg3); + (objc.getBlockClosure(block) as void Function(int, ffi.Pointer))( + arg0, + arg1, + ); objc.objectRelease(block.cast()); } static ffi.NativeCallable< ffi.Void Function( ffi.Pointer, - ffi.Pointer, - NSRange, - NSRange, + ffi.UnsignedLong, ffi.Pointer, ) > @@ -29464,9 +31599,7 @@ abstract final class ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool { ffi.NativeCallable< ffi.Void Function( ffi.Pointer, - ffi.Pointer, - NSRange, - NSRange, + ffi.UnsignedLong, ffi.Pointer, ) >.listener(_listenerTrampoline) @@ -29474,19 +31607,12 @@ abstract final class ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool { static void _blockingTrampoline( ffi.Pointer block, ffi.Pointer waiter, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3, + int arg0, + ffi.Pointer arg1, ) { try { (objc.getBlockClosure(block) - as void Function( - ffi.Pointer, - NSRange, - NSRange, - ffi.Pointer, - ))(arg0, arg1, arg2, arg3); + as void Function(int, ffi.Pointer))(arg0, arg1); } catch (e) { } finally { objc.signalWaiter(waiter); @@ -29498,9 +31624,7 @@ abstract final class ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSRange, - NSRange, + ffi.UnsignedLong, ffi.Pointer, ) > @@ -29509,9 +31633,7 @@ abstract final class ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSRange, - NSRange, + ffi.UnsignedLong, ffi.Pointer, ) >.isolateLocal(_blockingTrampoline) @@ -29520,9 +31642,7 @@ abstract final class ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSRange, - NSRange, + ffi.UnsignedLong, ffi.Pointer, ) > @@ -29531,122 +31651,84 @@ abstract final class ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSRange, - NSRange, + ffi.UnsignedLong, ffi.Pointer, ) >.listener(_blockingTrampoline) ..keepIsolateAlive = false; static void _fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3, + int arg0, + ffi.Pointer arg1, ) => block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3, - ) + ffi.Void Function(ffi.UnsignedLong arg0, ffi.Pointer arg1) > >() - .asFunction< - void Function( - ffi.Pointer, - NSRange, - NSRange, - ffi.Pointer, - ) - >()(arg0, arg1, arg2, arg3); + .asFunction)>()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, - ffi.Pointer, - NSRange, - NSRange, + ffi.UnsignedLong, ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static void _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3, + int arg0, + ffi.Pointer arg1, ) => (objc.getBlockClosure(block) - as void Function( - ffi.Pointer, - NSRange, - NSRange, - ffi.Pointer, - ))(arg0, arg1, arg2, arg3); + as void Function(int, ffi.Pointer))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, - ffi.Pointer, - NSRange, - NSRange, + ffi.UnsignedLong, ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool$CallExtension +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_NSUInteger_bool$CallExtension on objc.ObjCBlock< - ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) + ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) > { - void call( - NSString? arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3, - ) { - final _$$ref = arg0?.ref; + void call(int arg0, ffi.Pointer arg1) { return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3, + ffi.UnsignedLong arg0, + ffi.Pointer arg1, ) > >() .asFunction< void Function( ffi.Pointer, - ffi.Pointer, - NSRange, - NSRange, + int, ffi.Pointer, ) - >()(ref.pointer, _$$ref?.pointer ?? ffi.nullptr, arg1, arg2, arg3); + >()(ref.pointer, arg0, arg1); } } -/// Construction methods for `objc.ObjCBlock)>`. -abstract final class ObjCBlock_ffiVoid_NSString_bool { +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSURL_NSError { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock)> - fromPointer( + static objc.ObjCBlock fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => objc.ObjCBlock)>( + }) => objc.ObjCBlock( pointer, retain: retain, release: release, @@ -29657,18 +31739,18 @@ abstract final class ObjCBlock_ffiVoid_NSString_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. - static objc.ObjCBlock)> + static objc.ObjCBlock fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function( ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg1, ) > > ptr, - ) => objc.ObjCBlock)>( + ) => objc.ObjCBlock( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, release: true, @@ -29682,16 +31764,22 @@ abstract final class ObjCBlock_ffiVoid_NSString_bool { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock)> - fromFunction( - void Function(NSString, ffi.Pointer) fn, { + static objc.ObjCBlock fromFunction( + void Function(NSURL?, NSError?) fn, { bool keepIsolateAlive = true, - }) => objc.ObjCBlock)>( + }) => objc.ObjCBlock( objc.newClosureBlock(_closureCallable, ( ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg1, ) { - return fn(NSString.fromPointer(arg0, retain: true, release: true), arg1); + return fn( + arg0.address == 0 + ? null + : NSURL.fromPointer(arg0, retain: true, release: true), + arg1.address == 0 + ? null + : NSError.fromPointer(arg1, retain: true, release: true), + ); }, keepIsolateAlive), retain: false, release: true, @@ -29706,20 +31794,26 @@ abstract final class ObjCBlock_ffiVoid_NSString_bool { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock)> - listener( - void Function(NSString, ffi.Pointer) fn, { + static objc.ObjCBlock listener( + void Function(NSURL?, NSError?) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_listenerCallable.nativeFunction.cast(), ( ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg1, ) { - return fn(NSString.fromPointer(arg0, retain: false, release: true), arg1); + return fn( + arg0.address == 0 + ? null + : NSURL.fromPointer(arg0, retain: false, release: true), + arg1.address == 0 + ? null + : NSError.fromPointer(arg1, retain: false, release: true), + ); }, keepIsolateAlive); - final wrapper = _1wx624s_wrapListenerBlock_t8l8el(raw); + final wrapper = _1wx624s_wrapListenerBlock_pfv6jd(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock)>( + return objc.ObjCBlock( wrapper, retain: false, release: true, @@ -29736,35 +31830,48 @@ abstract final class ObjCBlock_ffiVoid_NSString_bool { /// until it is garbage collected by both Dart and ObjC. If the owner isolate /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock)> - blocking( - void Function(NSString, ffi.Pointer) fn, { + static objc.ObjCBlock blocking( + void Function(NSURL?, NSError?) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_blockingCallable.nativeFunction.cast(), ( ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg1, ) { - return fn(NSString.fromPointer(arg0, retain: false, release: true), arg1); + return fn( + arg0.address == 0 + ? null + : NSURL.fromPointer(arg0, retain: false, release: true), + arg1.address == 0 + ? null + : NSError.fromPointer(arg1, retain: false, release: true), + ); }, keepIsolateAlive); final rawListener = objc.newClosureBlock( _blockingListenerCallable.nativeFunction.cast(), - (ffi.Pointer arg0, ffi.Pointer arg1) { + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { return fn( - NSString.fromPointer(arg0, retain: false, release: true), - arg1, + arg0.address == 0 + ? null + : NSURL.fromPointer(arg0, retain: false, release: true), + arg1.address == 0 + ? null + : NSError.fromPointer(arg1, retain: false, release: true), ); }, keepIsolateAlive, ); - final wrapper = _1wx624s_wrapBlockingBlock_t8l8el( + final wrapper = _1wx624s_wrapBlockingBlock_pfv6jd( raw, rawListener, objc.objCContext, ); objc.objectRelease(raw.cast()); objc.objectRelease(rawListener.cast()); - return objc.ObjCBlock)>( + return objc.ObjCBlock( wrapper, retain: false, release: true, @@ -29774,12 +31881,12 @@ abstract final class ObjCBlock_ffiVoid_NSString_bool { static void _listenerTrampoline( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg1, ) { (objc.getBlockClosure(block) as void Function( ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ))(arg0, arg1); objc.objectRelease(block.cast()); } @@ -29788,7 +31895,7 @@ abstract final class ObjCBlock_ffiVoid_NSString_bool { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ) > _listenerCallable = @@ -29796,7 +31903,7 @@ abstract final class ObjCBlock_ffiVoid_NSString_bool { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ) >.listener(_listenerTrampoline) ..keepIsolateAlive = false; @@ -29804,13 +31911,13 @@ abstract final class ObjCBlock_ffiVoid_NSString_bool { ffi.Pointer block, ffi.Pointer waiter, ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg1, ) { try { (objc.getBlockClosure(block) as void Function( ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ))(arg0, arg1); } catch (e) { } finally { @@ -29824,7 +31931,7 @@ abstract final class ObjCBlock_ffiVoid_NSString_bool { ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ) > _blockingCallable = @@ -29833,7 +31940,7 @@ abstract final class ObjCBlock_ffiVoid_NSString_bool { ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ) >.isolateLocal(_blockingTrampoline) ..keepIsolateAlive = false; @@ -29842,7 +31949,7 @@ abstract final class ObjCBlock_ffiVoid_NSString_bool { ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ) > _blockingListenerCallable = @@ -29851,68 +31958,72 @@ abstract final class ObjCBlock_ffiVoid_NSString_bool { ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ) >.listener(_blockingTrampoline) ..keepIsolateAlive = false; static void _fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg1, ) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg1, ) > >() .asFunction< - void Function(ffi.Pointer, ffi.Pointer) + void Function( + ffi.Pointer, + ffi.Pointer, + ) >()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static void _closureTrampoline( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg1, ) => (objc.getBlockClosure(block) as void Function( ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_ffiVoid_NSString_bool$CallExtension - on objc.ObjCBlock)> { - void call(NSString arg0, ffi.Pointer arg1) { - final _$$ref = arg0.ref; +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSURL_NSError$CallExtension + on objc.ObjCBlock { + void call(NSURL? arg0, NSError? arg1) { + final _$$ref = arg0?.ref; + final _$$ref$1 = arg1?.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg1, ) > >() @@ -29920,20 +32031,25 @@ extension ObjCBlock_ffiVoid_NSString_bool$CallExtension void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ) - >()(ref.pointer, _$$ref.pointer, arg1); + >()( + ref.pointer, + _$$ref?.pointer ?? ffi.nullptr, + _$$ref$1?.pointer ?? ffi.nullptr, + ); } } -/// Construction methods for `objc.ObjCBlock`. -abstract final class ObjCBlock_ffiVoid_NSTimer { +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSURL_bool_NSError { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock fromPointer( + static objc.ObjCBlock + fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => objc.ObjCBlock( + }) => objc.ObjCBlock( pointer, retain: retain, release: release, @@ -29944,14 +32060,19 @@ abstract final class ObjCBlock_ffiVoid_NSTimer { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunctionPointer( + static objc.ObjCBlock + fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0) + ffi.Void Function( + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2, + ) > > ptr, - ) => objc.ObjCBlock( + ) => objc.ObjCBlock( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, release: true, @@ -29965,14 +32086,25 @@ abstract final class ObjCBlock_ffiVoid_NSTimer { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock fromFunction( - void Function(NSTimer) fn, { + static objc.ObjCBlock + fromFunction( + void Function(NSURL?, bool, NSError?) fn, { bool keepIsolateAlive = true, - }) => objc.ObjCBlock( + }) => objc.ObjCBlock( objc.newClosureBlock(_closureCallable, ( ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2, ) { - return fn(NSTimer.fromPointer(arg0, retain: true, release: true)); + return fn( + arg0.address == 0 + ? null + : NSURL.fromPointer(arg0, retain: true, release: true), + arg1, + arg2.address == 0 + ? null + : NSError.fromPointer(arg2, retain: true, release: true), + ); }, keepIsolateAlive), retain: false, release: true, @@ -29987,18 +32119,28 @@ abstract final class ObjCBlock_ffiVoid_NSTimer { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock listener( - void Function(NSTimer) fn, { + static objc.ObjCBlock listener( + void Function(NSURL?, bool, NSError?) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_listenerCallable.nativeFunction.cast(), ( ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2, ) { - return fn(NSTimer.fromPointer(arg0, retain: false, release: true)); + return fn( + arg0.address == 0 + ? null + : NSURL.fromPointer(arg0, retain: false, release: true), + arg1, + arg2.address == 0 + ? null + : NSError.fromPointer(arg2, retain: false, release: true), + ); }, keepIsolateAlive); - final wrapper = _1wx624s_wrapListenerBlock_xtuoz7(raw); + final wrapper = _1wx624s_wrapListenerBlock_rnu2c5(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock( + return objc.ObjCBlock( wrapper, retain: false, release: true, @@ -30015,30 +32157,49 @@ abstract final class ObjCBlock_ffiVoid_NSTimer { /// until it is garbage collected by both Dart and ObjC. If the owner isolate /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock blocking( - void Function(NSTimer) fn, { + static objc.ObjCBlock blocking( + void Function(NSURL?, bool, NSError?) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_blockingCallable.nativeFunction.cast(), ( ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2, ) { - return fn(NSTimer.fromPointer(arg0, retain: false, release: true)); + return fn( + arg0.address == 0 + ? null + : NSURL.fromPointer(arg0, retain: false, release: true), + arg1, + arg2.address == 0 + ? null + : NSError.fromPointer(arg2, retain: false, release: true), + ); }, keepIsolateAlive); - final rawListener = objc.newClosureBlock( - _blockingListenerCallable.nativeFunction.cast(), - (ffi.Pointer arg0) { - return fn(NSTimer.fromPointer(arg0, retain: false, release: true)); - }, - keepIsolateAlive, - ); - final wrapper = _1wx624s_wrapBlockingBlock_xtuoz7( + final rawListener = objc + .newClosureBlock(_blockingListenerCallable.nativeFunction.cast(), ( + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2, + ) { + return fn( + arg0.address == 0 + ? null + : NSURL.fromPointer(arg0, retain: false, release: true), + arg1, + arg2.address == 0 + ? null + : NSError.fromPointer(arg2, retain: false, release: true), + ); + }, keepIsolateAlive); + final wrapper = _1wx624s_wrapBlockingBlock_rnu2c5( raw, rawListener, objc.objCContext, ); objc.objectRelease(raw.cast()); objc.objectRelease(rawListener.cast()); - return objc.ObjCBlock( + return objc.ObjCBlock( wrapper, retain: false, release: true, @@ -30048,9 +32209,15 @@ abstract final class ObjCBlock_ffiVoid_NSTimer { static void _listenerTrampoline( ffi.Pointer block, ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2, ) { (objc.getBlockClosure(block) - as void Function(ffi.Pointer))(arg0); + as void Function( + ffi.Pointer, + bool, + ffi.Pointer, + ))(arg0, arg1, arg2); objc.objectRelease(block.cast()); } @@ -30058,6 +32225,8 @@ abstract final class ObjCBlock_ffiVoid_NSTimer { ffi.Void Function( ffi.Pointer, ffi.Pointer, + ffi.Bool, + ffi.Pointer, ) > _listenerCallable = @@ -30065,6 +32234,8 @@ abstract final class ObjCBlock_ffiVoid_NSTimer { ffi.Void Function( ffi.Pointer, ffi.Pointer, + ffi.Bool, + ffi.Pointer, ) >.listener(_listenerTrampoline) ..keepIsolateAlive = false; @@ -30072,10 +32243,16 @@ abstract final class ObjCBlock_ffiVoid_NSTimer { ffi.Pointer block, ffi.Pointer waiter, ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2, ) { try { (objc.getBlockClosure(block) - as void Function(ffi.Pointer))(arg0); + as void Function( + ffi.Pointer, + bool, + ffi.Pointer, + ))(arg0, arg1, arg2); } catch (e) { } finally { objc.signalWaiter(waiter); @@ -30088,6 +32265,8 @@ abstract final class ObjCBlock_ffiVoid_NSTimer { ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Bool, + ffi.Pointer, ) > _blockingCallable = @@ -30096,6 +32275,8 @@ abstract final class ObjCBlock_ffiVoid_NSTimer { ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Bool, + ffi.Pointer, ) >.isolateLocal(_blockingTrampoline) ..keepIsolateAlive = false; @@ -30104,6 +32285,8 @@ abstract final class ObjCBlock_ffiVoid_NSTimer { ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Bool, + ffi.Pointer, ) > _blockingListenerCallable = @@ -30112,54 +32295,81 @@ abstract final class ObjCBlock_ffiVoid_NSTimer { ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Bool, + ffi.Pointer, ) >.listener(_blockingTrampoline) ..keepIsolateAlive = false; static void _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.Void Function( + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2, + ) > >() - .asFunction)>()(arg0); + .asFunction< + void Function( + ffi.Pointer, + bool, + ffi.Pointer, + ) + >()(arg0, arg1, arg2); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, + ffi.Bool, + ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static void _closureTrampoline( ffi.Pointer block, ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2, ) => (objc.getBlockClosure(block) - as void Function(ffi.Pointer))(arg0); + as void Function( + ffi.Pointer, + bool, + ffi.Pointer, + ))(arg0, arg1, arg2); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, + ffi.Bool, + ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSTimer$CallExtension - on objc.ObjCBlock { - void call(NSTimer arg0) { - final _$$ref = arg0.ref; +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSURL_bool_NSError$CallExtension + on objc.ObjCBlock { + void call(NSURL? arg0, bool arg1, NSError? arg2) { + final _$$ref = arg0?.ref; + final _$$ref$1 = arg2?.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2, ) > >() @@ -30167,16 +32377,23 @@ extension ObjCBlock_ffiVoid_NSTimer$CallExtension void Function( ffi.Pointer, ffi.Pointer, + bool, + ffi.Pointer, ) - >()(ref.pointer, _$$ref.pointer); + >()( + ref.pointer, + _$$ref?.pointer ?? ffi.nullptr, + arg1, + _$$ref$1?.pointer ?? ffi.nullptr, + ); } } -/// Construction methods for `objc.ObjCBlock)>`. -abstract final class ObjCBlock_ffiVoid_NSUInteger_bool { +/// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. +abstract final class ObjCBlock_ffiVoid_ObjectType_bool { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Void Function(ffi.Pointer, ffi.Pointer) > fromPointer( ffi.Pointer pointer, { @@ -30184,7 +32401,10 @@ abstract final class ObjCBlock_ffiVoid_NSUInteger_bool { bool release = false, }) => objc.ObjCBlock< - ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. @@ -30193,18 +32413,24 @@ abstract final class ObjCBlock_ffiVoid_NSUInteger_bool { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Void Function(ffi.Pointer, ffi.Pointer) > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(ffi.UnsignedLong arg0, ffi.Pointer arg1) + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) > > ptr, ) => objc.ObjCBlock< - ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, @@ -30220,20 +32446,23 @@ abstract final class ObjCBlock_ffiVoid_NSUInteger_bool { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Void Function(ffi.Pointer, ffi.Pointer) > fromFunction( - void Function(int, ffi.Pointer) fn, { + void Function(objc.ObjCObject, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< - ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) >( objc.newClosureBlock(_closureCallable, ( - int arg0, + ffi.Pointer arg0, ffi.Pointer arg1, ) { - return fn(arg0, arg1); + return fn(objc.ObjCObject(arg0, retain: true, release: true), arg1); }, keepIsolateAlive), retain: false, release: true, @@ -30249,22 +32478,22 @@ abstract final class ObjCBlock_ffiVoid_NSUInteger_bool { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Void Function(ffi.Pointer, ffi.Pointer) > listener( - void Function(int, ffi.Pointer) fn, { + void Function(objc.ObjCObject, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_listenerCallable.nativeFunction.cast(), ( - int arg0, + ffi.Pointer arg0, ffi.Pointer arg1, ) { - return fn(arg0, arg1); + return fn(objc.ObjCObject(arg0, retain: false, release: true), arg1); }, keepIsolateAlive); - final wrapper = _1wx624s_wrapListenerBlock_q5jeyk(raw); + final wrapper = _1wx624s_wrapListenerBlock_t8l8el(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< - ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Void Function(ffi.Pointer, ffi.Pointer) >(wrapper, retain: false, release: true); } @@ -30279,26 +32508,26 @@ abstract final class ObjCBlock_ffiVoid_NSUInteger_bool { /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. static objc.ObjCBlock< - ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Void Function(ffi.Pointer, ffi.Pointer) > blocking( - void Function(int, ffi.Pointer) fn, { + void Function(objc.ObjCObject, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_blockingCallable.nativeFunction.cast(), ( - int arg0, + ffi.Pointer arg0, ffi.Pointer arg1, ) { - return fn(arg0, arg1); + return fn(objc.ObjCObject(arg0, retain: false, release: true), arg1); }, keepIsolateAlive); final rawListener = objc.newClosureBlock( _blockingListenerCallable.nativeFunction.cast(), - (int arg0, ffi.Pointer arg1) { - return fn(arg0, arg1); + (ffi.Pointer arg0, ffi.Pointer arg1) { + return fn(objc.ObjCObject(arg0, retain: false, release: true), arg1); }, keepIsolateAlive, ); - final wrapper = _1wx624s_wrapBlockingBlock_q5jeyk( + final wrapper = _1wx624s_wrapBlockingBlock_t8l8el( raw, rawListener, objc.objCContext, @@ -30306,26 +32535,27 @@ abstract final class ObjCBlock_ffiVoid_NSUInteger_bool { objc.objectRelease(raw.cast()); objc.objectRelease(rawListener.cast()); return objc.ObjCBlock< - ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Void Function(ffi.Pointer, ffi.Pointer) >(wrapper, retain: false, release: true); } static void _listenerTrampoline( ffi.Pointer block, - int arg0, + ffi.Pointer arg0, ffi.Pointer arg1, ) { - (objc.getBlockClosure(block) as void Function(int, ffi.Pointer))( - arg0, - arg1, - ); + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1); objc.objectRelease(block.cast()); } static ffi.NativeCallable< ffi.Void Function( ffi.Pointer, - ffi.UnsignedLong, + ffi.Pointer, ffi.Pointer, ) > @@ -30333,7 +32563,7 @@ abstract final class ObjCBlock_ffiVoid_NSUInteger_bool { ffi.NativeCallable< ffi.Void Function( ffi.Pointer, - ffi.UnsignedLong, + ffi.Pointer, ffi.Pointer, ) >.listener(_listenerTrampoline) @@ -30341,12 +32571,15 @@ abstract final class ObjCBlock_ffiVoid_NSUInteger_bool { static void _blockingTrampoline( ffi.Pointer block, ffi.Pointer waiter, - int arg0, + ffi.Pointer arg0, ffi.Pointer arg1, ) { try { (objc.getBlockClosure(block) - as void Function(int, ffi.Pointer))(arg0, arg1); + as void Function( + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1); } catch (e) { } finally { objc.signalWaiter(waiter); @@ -30358,7 +32591,7 @@ abstract final class ObjCBlock_ffiVoid_NSUInteger_bool { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, + ffi.Pointer, ffi.Pointer, ) > @@ -30367,7 +32600,7 @@ abstract final class ObjCBlock_ffiVoid_NSUInteger_bool { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, + ffi.Pointer, ffi.Pointer, ) >.isolateLocal(_blockingTrampoline) @@ -30376,7 +32609,7 @@ abstract final class ObjCBlock_ffiVoid_NSUInteger_bool { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, + ffi.Pointer, ffi.Pointer, ) > @@ -30385,62 +32618,74 @@ abstract final class ObjCBlock_ffiVoid_NSUInteger_bool { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, + ffi.Pointer, ffi.Pointer, ) >.listener(_blockingTrampoline) ..keepIsolateAlive = false; static void _fnPtrTrampoline( ffi.Pointer block, - int arg0, + ffi.Pointer arg0, ffi.Pointer arg1, ) => block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function(ffi.UnsignedLong arg0, ffi.Pointer arg1) + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) > >() - .asFunction)>()(arg0, arg1); + .asFunction< + void Function(ffi.Pointer, ffi.Pointer) + >()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, - ffi.UnsignedLong, + ffi.Pointer, ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static void _closureTrampoline( ffi.Pointer block, - int arg0, + ffi.Pointer arg0, ffi.Pointer arg1, ) => (objc.getBlockClosure(block) - as void Function(int, ffi.Pointer))(arg0, arg1); + as void Function( + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, - ffi.UnsignedLong, + ffi.Pointer, ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_ffiVoid_NSUInteger_bool$CallExtension +/// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. +extension ObjCBlock_ffiVoid_ObjectType_bool$CallExtension on objc.ObjCBlock< - ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) > { - void call(int arg0, ffi.Pointer arg1) { + void call(objc.ObjCObject arg0, ffi.Pointer arg1) { + final _$$ref = arg0.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, - ffi.UnsignedLong arg0, + ffi.Pointer arg0, ffi.Pointer arg1, ) > @@ -30448,21 +32693,21 @@ extension ObjCBlock_ffiVoid_NSUInteger_bool$CallExtension .asFunction< void Function( ffi.Pointer, - int, + ffi.Pointer, ffi.Pointer, ) - >()(ref.pointer, arg0, arg1); + >()(ref.pointer, _$$ref.pointer, arg1); } } -/// Construction methods for `objc.ObjCBlock`. -abstract final class ObjCBlock_ffiVoid_NSURL_NSError { +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock fromPointer( + static objc.ObjCBlock)> fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => objc.ObjCBlock( + }) => objc.ObjCBlock)>( pointer, retain: retain, release: release, @@ -30473,18 +32718,13 @@ abstract final class ObjCBlock_ffiVoid_NSURL_NSError { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock + static objc.ObjCBlock)> fromFunctionPointer( ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) - > + ffi.NativeFunction arg0)> > ptr, - ) => objc.ObjCBlock( + ) => objc.ObjCBlock)>( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, release: true, @@ -30498,22 +32738,12 @@ abstract final class ObjCBlock_ffiVoid_NSURL_NSError { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock fromFunction( - void Function(NSURL?, NSError?) fn, { + static objc.ObjCBlock)> fromFunction( + void Function(ffi.Pointer) fn, { bool keepIsolateAlive = true, - }) => objc.ObjCBlock( - objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - return fn( - arg0.address == 0 - ? null - : NSURL.fromPointer(arg0, retain: true, release: true), - arg1.address == 0 - ? null - : NSError.fromPointer(arg1, retain: true, release: true), - ); + }) => objc.ObjCBlock)>( + objc.newClosureBlock(_closureCallable, (ffi.Pointer arg0) { + return fn(arg0); }, keepIsolateAlive), retain: false, release: true, @@ -30528,26 +32758,18 @@ abstract final class ObjCBlock_ffiVoid_NSURL_NSError { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock listener( - void Function(NSURL?, NSError?) fn, { + static objc.ObjCBlock)> listener( + void Function(ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_listenerCallable.nativeFunction.cast(), ( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, ) { - return fn( - arg0.address == 0 - ? null - : NSURL.fromPointer(arg0, retain: false, release: true), - arg1.address == 0 - ? null - : NSError.fromPointer(arg1, retain: false, release: true), - ); + return fn(arg0); }, keepIsolateAlive); - final wrapper = _1wx624s_wrapListenerBlock_pfv6jd(raw); + final wrapper = _1wx624s_wrapListenerBlock_ovsamd(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock( + return objc.ObjCBlock)>( wrapper, retain: false, release: true, @@ -30564,48 +32786,30 @@ abstract final class ObjCBlock_ffiVoid_NSURL_NSError { /// until it is garbage collected by both Dart and ObjC. If the owner isolate /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock blocking( - void Function(NSURL?, NSError?) fn, { + static objc.ObjCBlock)> blocking( + void Function(ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_blockingCallable.nativeFunction.cast(), ( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, ) { - return fn( - arg0.address == 0 - ? null - : NSURL.fromPointer(arg0, retain: false, release: true), - arg1.address == 0 - ? null - : NSError.fromPointer(arg1, retain: false, release: true), - ); + return fn(arg0); }, keepIsolateAlive); final rawListener = objc.newClosureBlock( _blockingListenerCallable.nativeFunction.cast(), - ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - return fn( - arg0.address == 0 - ? null - : NSURL.fromPointer(arg0, retain: false, release: true), - arg1.address == 0 - ? null - : NSError.fromPointer(arg1, retain: false, release: true), - ); + (ffi.Pointer arg0) { + return fn(arg0); }, keepIsolateAlive, ); - final wrapper = _1wx624s_wrapBlockingBlock_pfv6jd( + final wrapper = _1wx624s_wrapBlockingBlock_ovsamd( raw, rawListener, objc.objCContext, ); objc.objectRelease(raw.cast()); objc.objectRelease(rawListener.cast()); - return objc.ObjCBlock( + return objc.ObjCBlock)>( wrapper, retain: false, release: true, @@ -30614,45 +32818,32 @@ abstract final class ObjCBlock_ffiVoid_NSURL_NSError { static void _listenerTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, ) { - (objc.getBlockClosure(block) - as void Function( - ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1); + (objc.getBlockClosure(block) as void Function(ffi.Pointer))(arg0); objc.objectRelease(block.cast()); } static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) + ffi.Void Function(ffi.Pointer, ffi.Pointer) > _listenerCallable = ffi.NativeCallable< ffi.Void Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ) >.listener(_listenerTrampoline) ..keepIsolateAlive = false; static void _blockingTrampoline( ffi.Pointer block, ffi.Pointer waiter, - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, ) { try { - (objc.getBlockClosure(block) - as void Function( - ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1); + (objc.getBlockClosure(block) as void Function(ffi.Pointer))( + arg0, + ); } catch (e) { } finally { objc.signalWaiter(waiter); @@ -30664,8 +32855,7 @@ abstract final class ObjCBlock_ffiVoid_NSURL_NSError { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ) > _blockingCallable = @@ -30673,8 +32863,7 @@ abstract final class ObjCBlock_ffiVoid_NSURL_NSError { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ) >.isolateLocal(_blockingTrampoline) ..keepIsolateAlive = false; @@ -30682,8 +32871,7 @@ abstract final class ObjCBlock_ffiVoid_NSURL_NSError { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ) > _blockingListenerCallable = @@ -30691,99 +32879,68 @@ abstract final class ObjCBlock_ffiVoid_NSURL_NSError { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ) >.listener(_blockingTrampoline) ..keepIsolateAlive = false; static void _fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, ) => block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) - > - >() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ) - >()(arg0, arg1); + .cast arg0)>>() + .asFunction)>()(arg0); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static void _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ) => - (objc.getBlockClosure(block) - as void Function( - ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1); + ffi.Pointer arg0, + ) => (objc.getBlockClosure(block) as void Function(ffi.Pointer))( + arg0, + ); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSURL_NSError$CallExtension - on objc.ObjCBlock { - void call(NSURL? arg0, NSError? arg1) { - final _$$ref = arg0?.ref; - final _$$ref$1 = arg1?.ref; +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid$CallExtension + on objc.ObjCBlock)> { + void call(ffi.Pointer arg0) { return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, ) > >() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >()( - ref.pointer, - _$$ref?.pointer ?? ffi.nullptr, - _$$ref$1?.pointer ?? ffi.nullptr, - ); + void Function(ffi.Pointer, ffi.Pointer) + >()(ref.pointer, arg0); } } -/// Construction methods for `objc.ObjCBlock`. -abstract final class ObjCBlock_ffiVoid_NSURL_bool_NSError { +/// Construction methods for `objc.ObjCBlock, NSCoder)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock + static objc.ObjCBlock, NSCoder)> fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => objc.ObjCBlock( + }) => objc.ObjCBlock, NSCoder)>( pointer, retain: retain, release: release, @@ -30794,19 +32951,18 @@ abstract final class ObjCBlock_ffiVoid_NSURL_bool_NSError { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock + static objc.ObjCBlock, NSCoder)> fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2, + ffi.Pointer arg0, + ffi.Pointer arg1, ) > > ptr, - ) => objc.ObjCBlock( + ) => objc.ObjCBlock, NSCoder)>( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, release: true, @@ -30820,25 +32976,16 @@ abstract final class ObjCBlock_ffiVoid_NSURL_bool_NSError { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock + static objc.ObjCBlock, NSCoder)> fromFunction( - void Function(NSURL?, bool, NSError?) fn, { + void Function(ffi.Pointer, NSCoder) fn, { bool keepIsolateAlive = true, - }) => objc.ObjCBlock( + }) => objc.ObjCBlock, NSCoder)>( objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2, + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return fn( - arg0.address == 0 - ? null - : NSURL.fromPointer(arg0, retain: true, release: true), - arg1, - arg2.address == 0 - ? null - : NSError.fromPointer(arg2, retain: true, release: true), - ); + return fn(arg0, NSCoder.fromPointer(arg1, retain: true, release: true)); }, keepIsolateAlive), retain: false, release: true, @@ -30853,28 +33000,20 @@ abstract final class ObjCBlock_ffiVoid_NSURL_bool_NSError { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock listener( - void Function(NSURL?, bool, NSError?) fn, { + static objc.ObjCBlock, NSCoder)> + listener( + void Function(ffi.Pointer, NSCoder) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_listenerCallable.nativeFunction.cast(), ( - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2, + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return fn( - arg0.address == 0 - ? null - : NSURL.fromPointer(arg0, retain: false, release: true), - arg1, - arg2.address == 0 - ? null - : NSError.fromPointer(arg2, retain: false, release: true), - ); + return fn(arg0, NSCoder.fromPointer(arg1, retain: false, release: true)); }, keepIsolateAlive); - final wrapper = _1wx624s_wrapListenerBlock_rnu2c5(raw); + final wrapper = _1wx624s_wrapListenerBlock_18v1jvf(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock( + return objc.ObjCBlock, NSCoder)>( wrapper, retain: false, release: true, @@ -30891,49 +33030,35 @@ abstract final class ObjCBlock_ffiVoid_NSURL_bool_NSError { /// until it is garbage collected by both Dart and ObjC. If the owner isolate /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock blocking( - void Function(NSURL?, bool, NSError?) fn, { + static objc.ObjCBlock, NSCoder)> + blocking( + void Function(ffi.Pointer, NSCoder) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_blockingCallable.nativeFunction.cast(), ( - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2, + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return fn( - arg0.address == 0 - ? null - : NSURL.fromPointer(arg0, retain: false, release: true), - arg1, - arg2.address == 0 - ? null - : NSError.fromPointer(arg2, retain: false, release: true), - ); + return fn(arg0, NSCoder.fromPointer(arg1, retain: false, release: true)); }, keepIsolateAlive); - final rawListener = objc - .newClosureBlock(_blockingListenerCallable.nativeFunction.cast(), ( - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2, - ) { - return fn( - arg0.address == 0 - ? null - : NSURL.fromPointer(arg0, retain: false, release: true), - arg1, - arg2.address == 0 - ? null - : NSError.fromPointer(arg2, retain: false, release: true), - ); - }, keepIsolateAlive); - final wrapper = _1wx624s_wrapBlockingBlock_rnu2c5( + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0, ffi.Pointer arg1) { + return fn( + arg0, + NSCoder.fromPointer(arg1, retain: false, release: true), + ); + }, + keepIsolateAlive, + ); + final wrapper = _1wx624s_wrapBlockingBlock_18v1jvf( raw, rawListener, objc.objCContext, ); objc.objectRelease(raw.cast()); objc.objectRelease(rawListener.cast()); - return objc.ObjCBlock( + return objc.ObjCBlock, NSCoder)>( wrapper, retain: false, release: true, @@ -30942,24 +33067,21 @@ abstract final class ObjCBlock_ffiVoid_NSURL_bool_NSError { static void _listenerTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2, + ffi.Pointer arg0, + ffi.Pointer arg1, ) { (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer, - bool, - ffi.Pointer, - ))(arg0, arg1, arg2); + ))(arg0, arg1); objc.objectRelease(block.cast()); } static ffi.NativeCallable< ffi.Void Function( ffi.Pointer, - ffi.Pointer, - ffi.Bool, + ffi.Pointer, ffi.Pointer, ) > @@ -30967,8 +33089,7 @@ abstract final class ObjCBlock_ffiVoid_NSURL_bool_NSError { ffi.NativeCallable< ffi.Void Function( ffi.Pointer, - ffi.Pointer, - ffi.Bool, + ffi.Pointer, ffi.Pointer, ) >.listener(_listenerTrampoline) @@ -30976,17 +33097,15 @@ abstract final class ObjCBlock_ffiVoid_NSURL_bool_NSError { static void _blockingTrampoline( ffi.Pointer block, ffi.Pointer waiter, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2, + ffi.Pointer arg0, + ffi.Pointer arg1, ) { try { (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer, - bool, - ffi.Pointer, - ))(arg0, arg1, arg2); + ))(arg0, arg1); } catch (e) { } finally { objc.signalWaiter(waiter); @@ -30998,8 +33117,7 @@ abstract final class ObjCBlock_ffiVoid_NSURL_bool_NSError { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Bool, + ffi.Pointer, ffi.Pointer, ) > @@ -31008,8 +33126,7 @@ abstract final class ObjCBlock_ffiVoid_NSURL_bool_NSError { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Bool, + ffi.Pointer, ffi.Pointer, ) >.isolateLocal(_blockingTrampoline) @@ -31018,8 +33135,7 @@ abstract final class ObjCBlock_ffiVoid_NSURL_bool_NSError { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Bool, + ffi.Pointer, ffi.Pointer, ) > @@ -31028,148 +33144,117 @@ abstract final class ObjCBlock_ffiVoid_NSURL_bool_NSError { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Bool, + ffi.Pointer, ffi.Pointer, ) >.listener(_blockingTrampoline) ..keepIsolateAlive = false; static void _fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2, + ffi.Pointer arg0, + ffi.Pointer arg1, ) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2, + ffi.Pointer arg0, + ffi.Pointer arg1, ) > >() .asFunction< - void Function( - ffi.Pointer, - bool, - ffi.Pointer, - ) - >()(arg0, arg1, arg2); + void Function(ffi.Pointer, ffi.Pointer) + >()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, - ffi.Pointer, - ffi.Bool, + ffi.Pointer, ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static void _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2, + ffi.Pointer arg0, + ffi.Pointer arg1, ) => (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer, - bool, - ffi.Pointer, - ))(arg0, arg1, arg2); + ))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, - ffi.Pointer, - ffi.Bool, + ffi.Pointer, ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSURL_bool_NSError$CallExtension - on objc.ObjCBlock { - void call(NSURL? arg0, bool arg1, NSError? arg2) { - final _$$ref = arg0?.ref; - final _$$ref$1 = arg2?.ref; +/// Call operator for `objc.ObjCBlock, NSCoder)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSCoder$CallExtension + on objc.ObjCBlock, NSCoder)> { + void call(ffi.Pointer arg0, NSCoder arg1) { + final _$$ref = arg1.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2, + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, ) > >() .asFunction< void Function( ffi.Pointer, - ffi.Pointer, - bool, + ffi.Pointer, ffi.Pointer, ) - >()( - ref.pointer, - _$$ref?.pointer ?? ffi.nullptr, - arg1, - _$$ref$1?.pointer ?? ffi.nullptr, - ); + >()(ref.pointer, arg0, _$$ref.pointer); } } -/// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. -abstract final class ObjCBlock_ffiVoid_ObjectType_bool { +/// Construction methods for `objc.ObjCBlock, NSPortMessage)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSPortMessage { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.Pointer) - > + static objc.ObjCBlock, NSPortMessage)> fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ) - >(pointer, retain: retain, release: release); + }) => objc.ObjCBlock, NSPortMessage)>( + pointer, + retain: retain, + release: release, + ); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.Pointer) - > + static objc.ObjCBlock, NSPortMessage)> fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + ffi.Pointer arg1, ) > > ptr, - ) => - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ) - >( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); + ) => objc.ObjCBlock, NSPortMessage)>( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); /// Creates a block from a Dart function. /// @@ -31179,28 +33264,23 @@ abstract final class ObjCBlock_ffiVoid_ObjectType_bool { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.Pointer) - > + static objc.ObjCBlock, NSPortMessage)> fromFunction( - void Function(objc.ObjCObject, ffi.Pointer) fn, { + void Function(ffi.Pointer, NSPortMessage) fn, { bool keepIsolateAlive = true, - }) => - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ) - >( - objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - return fn(objc.ObjCObject(arg0, retain: true, release: true), arg1); - }, keepIsolateAlive), - retain: false, - release: true, + }) => objc.ObjCBlock, NSPortMessage)>( + objc.newClosureBlock(_closureCallable, ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return fn( + arg0, + NSPortMessage.fromPointer(arg1, retain: true, release: true), ); + }, keepIsolateAlive), + retain: false, + release: true, + ); /// Creates a listener block from a Dart function. /// @@ -31211,23 +33291,24 @@ abstract final class ObjCBlock_ffiVoid_ObjectType_bool { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.Pointer) - > + static objc.ObjCBlock, NSPortMessage)> listener( - void Function(objc.ObjCObject, ffi.Pointer) fn, { + void Function(ffi.Pointer, NSPortMessage) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_listenerCallable.nativeFunction.cast(), ( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return fn(objc.ObjCObject(arg0, retain: false, release: true), arg1); + return fn( + arg0, + NSPortMessage.fromPointer(arg1, retain: false, release: true), + ); }, keepIsolateAlive); - final wrapper = _1wx624s_wrapListenerBlock_t8l8el(raw); + final wrapper = _1wx624s_wrapListenerBlock_18v1jvf(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.Pointer) + ffi.Void Function(ffi.Pointer, NSPortMessage) >(wrapper, retain: false, release: true); } @@ -31241,27 +33322,31 @@ abstract final class ObjCBlock_ffiVoid_ObjectType_bool { /// until it is garbage collected by both Dart and ObjC. If the owner isolate /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.Pointer) - > + static objc.ObjCBlock, NSPortMessage)> blocking( - void Function(objc.ObjCObject, ffi.Pointer) fn, { + void Function(ffi.Pointer, NSPortMessage) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_blockingCallable.nativeFunction.cast(), ( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return fn(objc.ObjCObject(arg0, retain: false, release: true), arg1); + return fn( + arg0, + NSPortMessage.fromPointer(arg1, retain: false, release: true), + ); }, keepIsolateAlive); final rawListener = objc.newClosureBlock( _blockingListenerCallable.nativeFunction.cast(), - (ffi.Pointer arg0, ffi.Pointer arg1) { - return fn(objc.ObjCObject(arg0, retain: false, release: true), arg1); + (ffi.Pointer arg0, ffi.Pointer arg1) { + return fn( + arg0, + NSPortMessage.fromPointer(arg1, retain: false, release: true), + ); }, keepIsolateAlive, ); - final wrapper = _1wx624s_wrapBlockingBlock_t8l8el( + final wrapper = _1wx624s_wrapBlockingBlock_18v1jvf( raw, rawListener, objc.objCContext, @@ -31269,19 +33354,19 @@ abstract final class ObjCBlock_ffiVoid_ObjectType_bool { objc.objectRelease(raw.cast()); objc.objectRelease(rawListener.cast()); return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.Pointer) + ffi.Void Function(ffi.Pointer, NSPortMessage) >(wrapper, retain: false, release: true); } static void _listenerTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + ffi.Pointer arg1, ) { (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer, - ffi.Pointer, ))(arg0, arg1); objc.objectRelease(block.cast()); } @@ -31289,30 +33374,30 @@ abstract final class ObjCBlock_ffiVoid_ObjectType_bool { static ffi.NativeCallable< ffi.Void Function( ffi.Pointer, + ffi.Pointer, ffi.Pointer, - ffi.Pointer, ) > _listenerCallable = ffi.NativeCallable< ffi.Void Function( ffi.Pointer, + ffi.Pointer, ffi.Pointer, - ffi.Pointer, ) >.listener(_listenerTrampoline) ..keepIsolateAlive = false; static void _blockingTrampoline( ffi.Pointer block, ffi.Pointer waiter, - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + ffi.Pointer arg1, ) { try { (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer, - ffi.Pointer, ))(arg0, arg1); } catch (e) { } finally { @@ -31325,8 +33410,8 @@ abstract final class ObjCBlock_ffiVoid_ObjectType_bool { ffi.Void Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer, - ffi.Pointer, ) > _blockingCallable = @@ -31334,8 +33419,8 @@ abstract final class ObjCBlock_ffiVoid_ObjectType_bool { ffi.Void Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer, - ffi.Pointer, ) >.isolateLocal(_blockingTrampoline) ..keepIsolateAlive = false; @@ -31343,8 +33428,8 @@ abstract final class ObjCBlock_ffiVoid_ObjectType_bool { ffi.Void Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer, - ffi.Pointer, ) > _blockingListenerCallable = @@ -31352,117 +33437,124 @@ abstract final class ObjCBlock_ffiVoid_ObjectType_bool { ffi.Void Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer, - ffi.Pointer, ) >.listener(_blockingTrampoline) ..keepIsolateAlive = false; static void _fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + ffi.Pointer arg1, ) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + ffi.Pointer arg1, ) > >() .asFunction< - void Function(ffi.Pointer, ffi.Pointer) + void Function(ffi.Pointer, ffi.Pointer) >()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, + ffi.Pointer, ffi.Pointer, - ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static void _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + ffi.Pointer arg1, ) => (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer, - ffi.Pointer, ))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, + ffi.Pointer, ffi.Pointer, - ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. -extension ObjCBlock_ffiVoid_ObjectType_bool$CallExtension - on - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ) - > { - void call(objc.ObjCObject arg0, ffi.Pointer arg1) { - final _$$ref = arg0.ref; +/// Call operator for `objc.ObjCBlock, NSPortMessage)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSPortMessage$CallExtension + on objc.ObjCBlock, NSPortMessage)> { + void call(ffi.Pointer arg0, NSPortMessage arg1) { + final _$$ref = arg1.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + ffi.Pointer arg1, ) > >() .asFunction< void Function( ffi.Pointer, + ffi.Pointer, ffi.Pointer, - ffi.Pointer, ) - >()(ref.pointer, _$$ref.pointer, arg1); + >()(ref.pointer, arg0, _$$ref.pointer); } } -/// Construction methods for `objc.ObjCBlock)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid { +/// Construction methods for `objc.ObjCBlock, NSRange, ffi.Pointer)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock)> fromPointer( + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + > + fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => objc.ObjCBlock)>( - pointer, - retain: retain, - release: release, - ); + }) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock)> + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + > fromFunctionPointer( ffi.Pointer< - ffi.NativeFunction arg0)> + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2, + ) + > > ptr, - ) => objc.ObjCBlock)>( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); + ) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); /// Creates a block from a Dart function. /// @@ -31472,16 +33564,26 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock)> fromFunction( - void Function(ffi.Pointer) fn, { + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + > + fromFunction( + void Function(ffi.Pointer, NSRange, ffi.Pointer) fn, { bool keepIsolateAlive = true, - }) => objc.ObjCBlock)>( - objc.newClosureBlock(_closureCallable, (ffi.Pointer arg0) { - return fn(arg0); - }, keepIsolateAlive), - retain: false, - release: true, - ); + }) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + >( + objc.newClosureBlock(_closureCallable, ( + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2, + ) { + return fn(arg0, arg1, arg2); + }, keepIsolateAlive), + retain: false, + release: true, + ); /// Creates a listener block from a Dart function. /// @@ -31492,22 +33594,25 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock)> listener( - void Function(ffi.Pointer) fn, { + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + > + listener( + void Function(ffi.Pointer, NSRange, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_listenerCallable.nativeFunction.cast(), ( ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2, ) { - return fn(arg0); + return fn(arg0, arg1, arg2); }, keepIsolateAlive); - final wrapper = _1wx624s_wrapListenerBlock_ovsamd(raw); + final wrapper = _1wx624s_wrapListenerBlock_1q8ia8l(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock)>( - wrapper, - retain: false, - release: true, - ); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + >(wrapper, retain: false, release: true); } /// Creates a blocking block from a Dart function. @@ -31520,52 +33625,69 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid { /// until it is garbage collected by both Dart and ObjC. If the owner isolate /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock)> blocking( - void Function(ffi.Pointer) fn, { + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + > + blocking( + void Function(ffi.Pointer, NSRange, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_blockingCallable.nativeFunction.cast(), ( ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2, ) { - return fn(arg0); + return fn(arg0, arg1, arg2); }, keepIsolateAlive); final rawListener = objc.newClosureBlock( _blockingListenerCallable.nativeFunction.cast(), - (ffi.Pointer arg0) { - return fn(arg0); + (ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { + return fn(arg0, arg1, arg2); }, keepIsolateAlive, ); - final wrapper = _1wx624s_wrapBlockingBlock_ovsamd( + final wrapper = _1wx624s_wrapBlockingBlock_1q8ia8l( raw, rawListener, objc.objCContext, ); objc.objectRelease(raw.cast()); objc.objectRelease(rawListener.cast()); - return objc.ObjCBlock)>( - wrapper, - retain: false, - release: true, - ); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + >(wrapper, retain: false, release: true); } static void _listenerTrampoline( ffi.Pointer block, ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2, ) { - (objc.getBlockClosure(block) as void Function(ffi.Pointer))(arg0); + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + NSRange, + ffi.Pointer, + ))(arg0, arg1, arg2); objc.objectRelease(block.cast()); } static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, ffi.Pointer) + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSRange, + ffi.Pointer, + ) > _listenerCallable = ffi.NativeCallable< ffi.Void Function( ffi.Pointer, ffi.Pointer, + NSRange, + ffi.Pointer, ) >.listener(_listenerTrampoline) ..keepIsolateAlive = false; @@ -31573,11 +33695,16 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid { ffi.Pointer block, ffi.Pointer waiter, ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2, ) { try { - (objc.getBlockClosure(block) as void Function(ffi.Pointer))( - arg0, - ); + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + NSRange, + ffi.Pointer, + ))(arg0, arg1, arg2); } catch (e) { } finally { objc.signalWaiter(waiter); @@ -31590,6 +33717,8 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid { ffi.Pointer, ffi.Pointer, ffi.Pointer, + NSRange, + ffi.Pointer, ) > _blockingCallable = @@ -31598,6 +33727,8 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid { ffi.Pointer, ffi.Pointer, ffi.Pointer, + NSRange, + ffi.Pointer, ) >.isolateLocal(_blockingTrampoline) ..keepIsolateAlive = false; @@ -31606,6 +33737,8 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid { ffi.Pointer, ffi.Pointer, ffi.Pointer, + NSRange, + ffi.Pointer, ) > _blockingListenerCallable = @@ -31614,93 +33747,142 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid { ffi.Pointer, ffi.Pointer, ffi.Pointer, + NSRange, + ffi.Pointer, ) >.listener(_blockingTrampoline) ..keepIsolateAlive = false; static void _fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2, ) => block.ref.target - .cast arg0)>>() - .asFunction)>()(arg0); + .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); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, + NSRange, + ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static void _closureTrampoline( ffi.Pointer block, ffi.Pointer arg0, - ) => (objc.getBlockClosure(block) as void Function(ffi.Pointer))( - arg0, - ); + NSRange arg1, + ffi.Pointer arg2, + ) => + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + NSRange, + ffi.Pointer, + ))(arg0, arg1, arg2); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, + NSRange, + ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_ffiVoid_ffiVoid$CallExtension - on objc.ObjCBlock)> { - void call(ffi.Pointer arg0) { +/// Call operator for `objc.ObjCBlock, NSRange, ffi.Pointer)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSRange_bool$CallExtension + on + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSRange, + ffi.Pointer, + ) + > { + void call( + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2, + ) { return ref.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) - >()(ref.pointer, arg0); + void Function( + ffi.Pointer, + ffi.Pointer, + NSRange, + ffi.Pointer, + ) + >()(ref.pointer, arg0, arg1, arg2); } } -/// Construction methods for `objc.ObjCBlock, NSCoder)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { +/// Construction methods for `objc.ObjCBlock, NSStream, ffi.UnsignedLong)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock, NSCoder)> + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSStream, ffi.UnsignedLong) + > fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => objc.ObjCBlock, NSCoder)>( - pointer, - retain: retain, - release: release, - ); + }) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSStream, ffi.UnsignedLong) + >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, NSCoder)> + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSStream, ffi.UnsignedLong) + > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function( ffi.Pointer arg0, ffi.Pointer arg1, + ffi.UnsignedLong arg2, ) > > ptr, - ) => objc.ObjCBlock, NSCoder)>( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); + ) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSStream, ffi.UnsignedLong) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); /// Creates a block from a Dart function. /// @@ -31710,20 +33892,30 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock, NSCoder)> + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSStream, ffi.UnsignedLong) + > fromFunction( - void Function(ffi.Pointer, NSCoder) fn, { + void Function(ffi.Pointer, NSStream, int) fn, { bool keepIsolateAlive = true, - }) => objc.ObjCBlock, NSCoder)>( - objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - return fn(arg0, NSCoder.fromPointer(arg1, retain: true, release: true)); - }, keepIsolateAlive), - retain: false, - release: true, - ); + }) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSStream, ffi.UnsignedLong) + >( + objc.newClosureBlock(_closureCallable, ( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ) { + return fn( + arg0, + NSStream.fromPointer(arg1, retain: true, release: true), + arg2, + ); + }, keepIsolateAlive), + retain: false, + release: true, + ); /// Creates a listener block from a Dart function. /// @@ -31734,24 +33926,29 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock, NSCoder)> + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSStream, ffi.UnsignedLong) + > listener( - void Function(ffi.Pointer, NSCoder) fn, { + void Function(ffi.Pointer, NSStream, int) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_listenerCallable.nativeFunction.cast(), ( ffi.Pointer arg0, ffi.Pointer arg1, + int arg2, ) { - return fn(arg0, NSCoder.fromPointer(arg1, retain: false, release: true)); + return fn( + arg0, + NSStream.fromPointer(arg1, retain: false, release: true), + arg2, + ); }, keepIsolateAlive); - final wrapper = _1wx624s_wrapListenerBlock_18v1jvf(raw); + final wrapper = _1wx624s_wrapListenerBlock_hoampi(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock, NSCoder)>( - wrapper, - retain: false, - release: true, - ); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSStream, ffi.UnsignedLong) + >(wrapper, retain: false, release: true); } /// Creates a blocking block from a Dart function. @@ -31764,51 +33961,63 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { /// until it is garbage collected by both Dart and ObjC. If the owner isolate /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock, NSCoder)> + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSStream, ffi.UnsignedLong) + > blocking( - void Function(ffi.Pointer, NSCoder) fn, { + void Function(ffi.Pointer, NSStream, int) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_blockingCallable.nativeFunction.cast(), ( ffi.Pointer arg0, ffi.Pointer arg1, + int arg2, ) { - return fn(arg0, NSCoder.fromPointer(arg1, retain: false, release: true)); + return fn( + arg0, + NSStream.fromPointer(arg1, retain: false, release: true), + arg2, + ); }, keepIsolateAlive); final rawListener = objc.newClosureBlock( _blockingListenerCallable.nativeFunction.cast(), - (ffi.Pointer arg0, ffi.Pointer arg1) { + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ) { return fn( arg0, - NSCoder.fromPointer(arg1, retain: false, release: true), + NSStream.fromPointer(arg1, retain: false, release: true), + arg2, ); }, keepIsolateAlive, ); - final wrapper = _1wx624s_wrapBlockingBlock_18v1jvf( + final wrapper = _1wx624s_wrapBlockingBlock_hoampi( raw, rawListener, objc.objCContext, ); objc.objectRelease(raw.cast()); objc.objectRelease(rawListener.cast()); - return objc.ObjCBlock, NSCoder)>( - wrapper, - retain: false, - release: true, - ); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSStream, ffi.UnsignedLong) + >(wrapper, retain: false, release: true); } static void _listenerTrampoline( ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, + int arg2, ) { (objc.getBlockClosure(block) as void Function( ffi.Pointer, ffi.Pointer, - ))(arg0, arg1); + int, + ))(arg0, arg1, arg2); objc.objectRelease(block.cast()); } @@ -31817,6 +34026,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong, ) > _listenerCallable = @@ -31825,6 +34035,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong, ) >.listener(_listenerTrampoline) ..keepIsolateAlive = false; @@ -31833,13 +34044,15 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { ffi.Pointer waiter, ffi.Pointer arg0, ffi.Pointer arg1, + int arg2, ) { try { (objc.getBlockClosure(block) as void Function( ffi.Pointer, ffi.Pointer, - ))(arg0, arg1); + int, + ))(arg0, arg1, arg2); } catch (e) { } finally { objc.signalWaiter(waiter); @@ -31853,6 +34066,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong, ) > _blockingCallable = @@ -31862,6 +34076,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong, ) >.isolateLocal(_blockingTrampoline) ..keepIsolateAlive = false; @@ -31871,6 +34086,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong, ) > _blockingListenerCallable = @@ -31880,6 +34096,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong, ) >.listener(_blockingTrampoline) ..keepIsolateAlive = false; @@ -31887,24 +34104,31 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, + int arg2, ) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer arg0, ffi.Pointer arg1, + ffi.UnsignedLong arg2, ) > >() .asFunction< - void Function(ffi.Pointer, ffi.Pointer) - >()(arg0, arg1); + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ) + >()(arg0, arg1, arg2); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong, ) >(_fnPtrTrampoline) .cast(); @@ -31912,27 +34136,33 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, + int arg2, ) => (objc.getBlockClosure(block) as void Function( ffi.Pointer, ffi.Pointer, - ))(arg0, arg1); + int, + ))(arg0, arg1, arg2); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock, NSCoder)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSCoder$CallExtension - on objc.ObjCBlock, NSCoder)> { - void call(ffi.Pointer arg0, NSCoder arg1) { +/// Call operator for `objc.ObjCBlock, NSStream, ffi.UnsignedLong)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent$CallExtension + on + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSStream, ffi.UnsignedLong) + > { + void call(ffi.Pointer arg0, NSStream arg1, int arg2) { final _$$ref = arg1.ref; return ref.pointer.ref.invoke .cast< @@ -31941,6 +34171,7 @@ extension ObjCBlock_ffiVoid_ffiVoid_NSCoder$CallExtension ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, + ffi.UnsignedLong arg2, ) > >() @@ -31949,46 +34180,80 @@ extension ObjCBlock_ffiVoid_ffiVoid_NSCoder$CallExtension ffi.Pointer, ffi.Pointer, ffi.Pointer, + int, ) - >()(ref.pointer, arg0, _$$ref.pointer); + >()(ref.pointer, arg0, _$$ref.pointer, arg2); } } -/// Construction methods for `objc.ObjCBlock, NSPortMessage)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSPortMessage { +/// Construction methods for `objc.ObjCBlock, NSString, ffi.Pointer, NSDictionary, ffi.Pointer)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDictionary_ffiVoid { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock, NSPortMessage)> + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSString, + ffi.Pointer, + NSDictionary, + ffi.Pointer, + ) + > fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => objc.ObjCBlock, NSPortMessage)>( - pointer, - retain: retain, - release: release, - ); + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSString, + ffi.Pointer, + NSDictionary, + ffi.Pointer, + ) + >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, NSPortMessage)> + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSString, + ffi.Pointer, + NSDictionary, + ffi.Pointer, + ) + > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function( ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, ) > > ptr, - ) => objc.ObjCBlock, NSPortMessage)>( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); + ) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSString, + ffi.Pointer, + NSDictionary, + ffi.Pointer, + ) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); /// Creates a block from a Dart function. /// @@ -31998,23 +34263,53 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSPortMessage { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock, NSPortMessage)> + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSString, + ffi.Pointer, + NSDictionary, + ffi.Pointer, + ) + > fromFunction( - void Function(ffi.Pointer, NSPortMessage) fn, { + void Function( + ffi.Pointer, + NSString, + objc.ObjCObject, + NSDictionary, + ffi.Pointer, + ) + fn, { bool keepIsolateAlive = true, - }) => objc.ObjCBlock, NSPortMessage)>( - objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - return fn( - arg0, - NSPortMessage.fromPointer(arg1, retain: true, release: true), + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSString, + ffi.Pointer, + NSDictionary, + ffi.Pointer, + ) + >( + objc.newClosureBlock(_closureCallable, ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ) { + return fn( + arg0, + NSString.fromPointer(arg1, retain: true, release: true), + objc.ObjCObject(arg2, retain: true, release: true), + NSDictionary.fromPointer(arg3, retain: true, release: true), + arg4, + ); + }, keepIsolateAlive), + retain: false, + release: true, ); - }, keepIsolateAlive), - retain: false, - release: true, - ); /// Creates a listener block from a Dart function. /// @@ -32025,24 +34320,51 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSPortMessage { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock, NSPortMessage)> + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSString, + ffi.Pointer, + NSDictionary, + ffi.Pointer, + ) + > listener( - void Function(ffi.Pointer, NSPortMessage) fn, { + void Function( + ffi.Pointer, + NSString, + objc.ObjCObject, + NSDictionary, + ffi.Pointer, + ) + fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_listenerCallable.nativeFunction.cast(), ( ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, ) { return fn( arg0, - NSPortMessage.fromPointer(arg1, retain: false, release: true), + NSString.fromPointer(arg1, retain: false, release: true), + objc.ObjCObject(arg2, retain: false, release: true), + NSDictionary.fromPointer(arg3, retain: false, release: true), + arg4, ); }, keepIsolateAlive); - final wrapper = _1wx624s_wrapListenerBlock_18v1jvf(raw); + final wrapper = _1wx624s_wrapListenerBlock_1sr3ozv(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSPortMessage) + ffi.Void Function( + ffi.Pointer, + NSString, + ffi.Pointer, + NSDictionary, + ffi.Pointer, + ) >(wrapper, retain: false, release: true); } @@ -32056,31 +34378,58 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSPortMessage { /// until it is garbage collected by both Dart and ObjC. If the owner isolate /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock, NSPortMessage)> + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSString, + ffi.Pointer, + NSDictionary, + ffi.Pointer, + ) + > blocking( - void Function(ffi.Pointer, NSPortMessage) fn, { + void Function( + ffi.Pointer, + NSString, + objc.ObjCObject, + NSDictionary, + ffi.Pointer, + ) + fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_blockingCallable.nativeFunction.cast(), ( ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, ) { return fn( arg0, - NSPortMessage.fromPointer(arg1, retain: false, release: true), + NSString.fromPointer(arg1, retain: false, release: true), + objc.ObjCObject(arg2, retain: false, release: true), + NSDictionary.fromPointer(arg3, retain: false, release: true), + arg4, ); }, keepIsolateAlive); - final rawListener = objc.newClosureBlock( - _blockingListenerCallable.nativeFunction.cast(), - (ffi.Pointer arg0, ffi.Pointer arg1) { - return fn( - arg0, - NSPortMessage.fromPointer(arg1, retain: false, release: true), - ); - }, - keepIsolateAlive, - ); - final wrapper = _1wx624s_wrapBlockingBlock_18v1jvf( + final rawListener = objc + .newClosureBlock(_blockingListenerCallable.nativeFunction.cast(), ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ) { + return fn( + arg0, + NSString.fromPointer(arg1, retain: false, release: true), + objc.ObjCObject(arg2, retain: false, release: true), + NSDictionary.fromPointer(arg3, retain: false, release: true), + arg4, + ); + }, keepIsolateAlive); + final wrapper = _1wx624s_wrapBlockingBlock_1sr3ozv( raw, rawListener, objc.objCContext, @@ -32088,7 +34437,13 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSPortMessage { objc.objectRelease(raw.cast()); objc.objectRelease(rawListener.cast()); return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSPortMessage) + ffi.Void Function( + ffi.Pointer, + NSString, + ffi.Pointer, + NSDictionary, + ffi.Pointer, + ) >(wrapper, retain: false, release: true); } @@ -32096,12 +34451,18 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSPortMessage { ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, ) { (objc.getBlockClosure(block) as void Function( ffi.Pointer, ffi.Pointer, - ))(arg0, arg1); + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3, arg4); objc.objectRelease(block.cast()); } @@ -32110,6 +34471,9 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSPortMessage { ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) > _listenerCallable = @@ -32118,6 +34482,9 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSPortMessage { ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) >.listener(_listenerTrampoline) ..keepIsolateAlive = false; @@ -32126,13 +34493,19 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSPortMessage { ffi.Pointer waiter, ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, ) { try { (objc.getBlockClosure(block) as void Function( ffi.Pointer, ffi.Pointer, - ))(arg0, arg1); + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3, arg4); } catch (e) { } finally { objc.signalWaiter(waiter); @@ -32146,6 +34519,9 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSPortMessage { ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) > _blockingCallable = @@ -32155,6 +34531,9 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSPortMessage { ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) >.isolateLocal(_blockingTrampoline) ..keepIsolateAlive = false; @@ -32164,6 +34543,9 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSPortMessage { ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) > _blockingListenerCallable = @@ -32173,6 +34555,9 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSPortMessage { ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) >.listener(_blockingTrampoline) ..keepIsolateAlive = false; @@ -32180,24 +34565,39 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSPortMessage { ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, ) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, ) > >() .asFunction< - void Function(ffi.Pointer, ffi.Pointer) - >()(arg0, arg1); + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(arg0, arg1, arg2, arg3, arg4); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); @@ -32205,28 +34605,54 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSPortMessage { ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, ) => (objc.getBlockClosure(block) as void Function( ffi.Pointer, ffi.Pointer, - ))(arg0, arg1); + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3, arg4); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock, NSPortMessage)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSPortMessage$CallExtension - on objc.ObjCBlock, NSPortMessage)> { - void call(ffi.Pointer arg0, NSPortMessage arg1) { +/// Call operator for `objc.ObjCBlock, NSString, ffi.Pointer, NSDictionary, ffi.Pointer)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDictionary_ffiVoid$CallExtension + on + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSString, + ffi.Pointer, + NSDictionary, + ffi.Pointer, + ) + > { + void call( + ffi.Pointer arg0, + NSString arg1, + objc.ObjCObject arg2, + NSDictionary arg3, + ffi.Pointer arg4, + ) { final _$$ref = arg1.ref; + final _$$ref$1 = arg2.ref; + final _$$ref$2 = arg3.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< @@ -32234,6 +34660,9 @@ extension ObjCBlock_ffiVoid_ffiVoid_NSPortMessage$CallExtension ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, ) > >() @@ -32242,16 +34671,26 @@ extension ObjCBlock_ffiVoid_ffiVoid_NSPortMessage$CallExtension ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) - >()(ref.pointer, arg0, _$$ref.pointer); + >()( + ref.pointer, + arg0, + _$$ref.pointer, + _$$ref$1.pointer, + _$$ref$2.pointer, + arg4, + ); } } -/// Construction methods for `objc.ObjCBlock, NSRange, ffi.Pointer)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool { +/// Construction methods for `objc.ObjCBlock, ffi.UnsignedLong)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSUInteger { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) > fromPointer( ffi.Pointer pointer, { @@ -32259,7 +34698,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool { bool release = false, }) => objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. @@ -32268,22 +34707,18 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2, - ) + ffi.Void Function(ffi.Pointer arg0, ffi.UnsignedLong arg1) > > ptr, ) => objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, @@ -32299,21 +34734,20 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) > fromFunction( - void Function(ffi.Pointer, NSRange, ffi.Pointer) fn, { + void Function(ffi.Pointer, int) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) >( objc.newClosureBlock(_closureCallable, ( ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2, + int arg1, ) { - return fn(arg0, arg1, arg2); + return fn(arg0, arg1); }, keepIsolateAlive), retain: false, release: true, @@ -32329,23 +34763,22 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) > listener( - void Function(ffi.Pointer, NSRange, ffi.Pointer) fn, { + void Function(ffi.Pointer, int) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_listenerCallable.nativeFunction.cast(), ( ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2, + int arg1, ) { - return fn(arg0, arg1, arg2); + return fn(arg0, arg1); }, keepIsolateAlive); - final wrapper = _1wx624s_wrapListenerBlock_1q8ia8l(raw); + final wrapper = _1wx624s_wrapListenerBlock_zuf90e(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) >(wrapper, retain: false, release: true); } @@ -32360,27 +34793,26 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool { /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) > blocking( - void Function(ffi.Pointer, NSRange, ffi.Pointer) fn, { + void Function(ffi.Pointer, int) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_blockingCallable.nativeFunction.cast(), ( ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2, + int arg1, ) { - return fn(arg0, arg1, arg2); + return fn(arg0, arg1); }, keepIsolateAlive); final rawListener = objc.newClosureBlock( _blockingListenerCallable.nativeFunction.cast(), - (ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { - return fn(arg0, arg1, arg2); + (ffi.Pointer arg0, int arg1) { + return fn(arg0, arg1); }, keepIsolateAlive, ); - final wrapper = _1wx624s_wrapBlockingBlock_1q8ia8l( + final wrapper = _1wx624s_wrapBlockingBlock_zuf90e( raw, rawListener, objc.objCContext, @@ -32388,22 +34820,19 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool { objc.objectRelease(raw.cast()); objc.objectRelease(rawListener.cast()); return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) >(wrapper, retain: false, release: true); } static void _listenerTrampoline( ffi.Pointer block, ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2, + int arg1, ) { - (objc.getBlockClosure(block) - as void Function( - ffi.Pointer, - NSRange, - ffi.Pointer, - ))(arg0, arg1, arg2); + (objc.getBlockClosure(block) as void Function(ffi.Pointer, int))( + arg0, + arg1, + ); objc.objectRelease(block.cast()); } @@ -32411,8 +34840,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool { ffi.Void Function( ffi.Pointer, ffi.Pointer, - NSRange, - ffi.Pointer, + ffi.UnsignedLong, ) > _listenerCallable = @@ -32420,8 +34848,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool { ffi.Void Function( ffi.Pointer, ffi.Pointer, - NSRange, - ffi.Pointer, + ffi.UnsignedLong, ) >.listener(_listenerTrampoline) ..keepIsolateAlive = false; @@ -32429,16 +34856,11 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool { ffi.Pointer block, ffi.Pointer waiter, ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2, + int arg1, ) { try { (objc.getBlockClosure(block) - as void Function( - ffi.Pointer, - NSRange, - ffi.Pointer, - ))(arg0, arg1, arg2); + as void Function(ffi.Pointer, int))(arg0, arg1); } catch (e) { } finally { objc.signalWaiter(waiter); @@ -32451,8 +34873,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool { ffi.Pointer, ffi.Pointer, ffi.Pointer, - NSRange, - ffi.Pointer, + ffi.UnsignedLong, ) > _blockingCallable = @@ -32461,8 +34882,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool { ffi.Pointer, ffi.Pointer, ffi.Pointer, - NSRange, - ffi.Pointer, + ffi.UnsignedLong, ) >.isolateLocal(_blockingTrampoline) ..keepIsolateAlive = false; @@ -32471,8 +34891,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool { ffi.Pointer, ffi.Pointer, ffi.Pointer, - NSRange, - ffi.Pointer, + ffi.UnsignedLong, ) > _blockingListenerCallable = @@ -32481,86 +34900,62 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool { ffi.Pointer, ffi.Pointer, ffi.Pointer, - NSRange, - ffi.Pointer, + ffi.UnsignedLong, ) >.listener(_blockingTrampoline) ..keepIsolateAlive = false; static void _fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2, + int arg1, ) => 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); + ffi.Void Function(ffi.Pointer arg0, ffi.UnsignedLong arg1) + > + >() + .asFunction, int)>()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - NSRange, - ffi.Pointer, + ffi.UnsignedLong, ) >(_fnPtrTrampoline) .cast(); static void _closureTrampoline( ffi.Pointer block, ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2, + int arg1, ) => (objc.getBlockClosure(block) - as void Function( - ffi.Pointer, - NSRange, - ffi.Pointer, - ))(arg0, arg1, arg2); + as void Function(ffi.Pointer, int))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - NSRange, - ffi.Pointer, + ffi.UnsignedLong, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock, NSRange, ffi.Pointer)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSRange_bool$CallExtension +/// Call operator for `objc.ObjCBlock, ffi.UnsignedLong)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSUInteger$CallExtension on objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSRange, - ffi.Pointer, - ) + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) > { - void call( - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2, - ) { + void call(ffi.Pointer arg0, int arg1) { return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2, + ffi.UnsignedLong arg1, ) > >() @@ -32568,55 +34963,47 @@ extension ObjCBlock_ffiVoid_ffiVoid_NSRange_bool$CallExtension void Function( ffi.Pointer, ffi.Pointer, - NSRange, - ffi.Pointer, + int, ) - >()(ref.pointer, arg0, arg1, arg2); + >()(ref.pointer, arg0, arg1); } } -/// Construction methods for `objc.ObjCBlock, NSStream, ffi.UnsignedLong)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { +/// Construction methods for `objc.ObjCBlock, NSURLHandle)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSStream, ffi.UnsignedLong) - > + static objc.ObjCBlock, NSURLHandle)> fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSStream, ffi.UnsignedLong) - >(pointer, retain: retain, release: release); + }) => objc.ObjCBlock, NSURLHandle)>( + pointer, + retain: retain, + release: release, + ); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSStream, ffi.UnsignedLong) - > + static objc.ObjCBlock, NSURLHandle)> fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function( ffi.Pointer arg0, ffi.Pointer arg1, - ffi.UnsignedLong arg2, ) > > ptr, - ) => - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSStream, ffi.UnsignedLong) - >( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); + ) => objc.ObjCBlock, NSURLHandle)>( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); /// Creates a block from a Dart function. /// @@ -32626,30 +35013,23 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSStream, ffi.UnsignedLong) - > + static objc.ObjCBlock, NSURLHandle)> fromFunction( - void Function(ffi.Pointer, NSStream, int) fn, { + void Function(ffi.Pointer, NSURLHandle) fn, { bool keepIsolateAlive = true, - }) => - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSStream, ffi.UnsignedLong) - >( - objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, - ) { - return fn( - arg0, - NSStream.fromPointer(arg1, retain: true, release: true), - arg2, - ); - }, keepIsolateAlive), - retain: false, - release: true, + }) => objc.ObjCBlock, NSURLHandle)>( + objc.newClosureBlock(_closureCallable, ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return fn( + arg0, + NSURLHandle.fromPointer(arg1, retain: true, release: true), ); + }, keepIsolateAlive), + retain: false, + release: true, + ); /// Creates a listener block from a Dart function. /// @@ -32660,28 +35040,24 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSStream, ffi.UnsignedLong) - > + static objc.ObjCBlock, NSURLHandle)> listener( - void Function(ffi.Pointer, NSStream, int) fn, { + void Function(ffi.Pointer, NSURLHandle) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_listenerCallable.nativeFunction.cast(), ( ffi.Pointer arg0, ffi.Pointer arg1, - int arg2, ) { return fn( arg0, - NSStream.fromPointer(arg1, retain: false, release: true), - arg2, + NSURLHandle.fromPointer(arg1, retain: false, release: true), ); }, keepIsolateAlive); - final wrapper = _1wx624s_wrapListenerBlock_hoampi(raw); + final wrapper = _1wx624s_wrapListenerBlock_18v1jvf(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSStream, ffi.UnsignedLong) + ffi.Void Function(ffi.Pointer, NSURLHandle) >(wrapper, retain: false, release: true); } @@ -32695,40 +35071,31 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { /// until it is garbage collected by both Dart and ObjC. If the owner isolate /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSStream, ffi.UnsignedLong) - > + static objc.ObjCBlock, NSURLHandle)> blocking( - void Function(ffi.Pointer, NSStream, int) fn, { + void Function(ffi.Pointer, NSURLHandle) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_blockingCallable.nativeFunction.cast(), ( ffi.Pointer arg0, ffi.Pointer arg1, - int arg2, ) { return fn( arg0, - NSStream.fromPointer(arg1, retain: false, release: true), - arg2, + NSURLHandle.fromPointer(arg1, retain: false, release: true), ); }, keepIsolateAlive); final rawListener = objc.newClosureBlock( _blockingListenerCallable.nativeFunction.cast(), - ( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, - ) { + (ffi.Pointer arg0, ffi.Pointer arg1) { return fn( arg0, - NSStream.fromPointer(arg1, retain: false, release: true), - arg2, + NSURLHandle.fromPointer(arg1, retain: false, release: true), ); }, keepIsolateAlive, ); - final wrapper = _1wx624s_wrapBlockingBlock_hoampi( + final wrapper = _1wx624s_wrapBlockingBlock_18v1jvf( raw, rawListener, objc.objCContext, @@ -32736,7 +35103,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { objc.objectRelease(raw.cast()); objc.objectRelease(rawListener.cast()); return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSStream, ffi.UnsignedLong) + ffi.Void Function(ffi.Pointer, NSURLHandle) >(wrapper, retain: false, release: true); } @@ -32744,14 +35111,12 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, - int arg2, ) { (objc.getBlockClosure(block) as void Function( ffi.Pointer, ffi.Pointer, - int, - ))(arg0, arg1, arg2); + ))(arg0, arg1); objc.objectRelease(block.cast()); } @@ -32760,7 +35125,6 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, ) > _listenerCallable = @@ -32769,7 +35133,6 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, ) >.listener(_listenerTrampoline) ..keepIsolateAlive = false; @@ -32778,15 +35141,13 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { ffi.Pointer waiter, ffi.Pointer arg0, ffi.Pointer arg1, - int arg2, ) { try { (objc.getBlockClosure(block) as void Function( ffi.Pointer, ffi.Pointer, - int, - ))(arg0, arg1, arg2); + ))(arg0, arg1); } catch (e) { } finally { objc.signalWaiter(waiter); @@ -32800,7 +35161,6 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, ) > _blockingCallable = @@ -32810,7 +35170,6 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, ) >.isolateLocal(_blockingTrampoline) ..keepIsolateAlive = false; @@ -32820,7 +35179,6 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, ) > _blockingListenerCallable = @@ -32830,7 +35188,6 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, ) >.listener(_blockingTrampoline) ..keepIsolateAlive = false; @@ -32838,31 +35195,24 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, - int arg2, ) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer arg0, ffi.Pointer arg1, - ffi.UnsignedLong arg2, ) > >() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ) - >()(arg0, arg1, arg2); + void Function(ffi.Pointer, ffi.Pointer) + >()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, ) >(_fnPtrTrampoline) .cast(); @@ -32870,33 +35220,27 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, - int arg2, ) => (objc.getBlockClosure(block) as void Function( ffi.Pointer, ffi.Pointer, - int, - ))(arg0, arg1, arg2); + ))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock, NSStream, ffi.UnsignedLong)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent$CallExtension - on - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSStream, ffi.UnsignedLong) - > { - void call(ffi.Pointer arg0, NSStream arg1, int arg2) { +/// Call operator for `objc.ObjCBlock, NSURLHandle)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLHandle$CallExtension + on objc.ObjCBlock, NSURLHandle)> { + void call(ffi.Pointer arg0, NSURLHandle arg1) { final _$$ref = arg1.ref; return ref.pointer.ref.invoke .cast< @@ -32905,7 +35249,6 @@ extension ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent$CallExtension ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, - ffi.UnsignedLong arg2, ) > >() @@ -32914,23 +35257,16 @@ extension ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent$CallExtension ffi.Pointer, ffi.Pointer, ffi.Pointer, - int, ) - >()(ref.pointer, arg0, _$$ref.pointer, arg2); + >()(ref.pointer, arg0, _$$ref.pointer); } } -/// Construction methods for `objc.ObjCBlock, NSString, ffi.Pointer, NSDictionary, ffi.Pointer)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDictionary_ffiVoid { +/// Construction methods for `objc.ObjCBlock, NSURLHandle, NSData)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSString, - ffi.Pointer, - NSDictionary, - ffi.Pointer, - ) + ffi.Void Function(ffi.Pointer, NSURLHandle, NSData) > fromPointer( ffi.Pointer pointer, { @@ -32938,13 +35274,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDic bool release = false, }) => objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSString, - ffi.Pointer, - NSDictionary, - ffi.Pointer, - ) + ffi.Void Function(ffi.Pointer, NSURLHandle, NSData) >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. @@ -32953,13 +35283,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDic /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSString, - ffi.Pointer, - NSDictionary, - ffi.Pointer, - ) + ffi.Void Function(ffi.Pointer, NSURLHandle, NSData) > fromFunctionPointer( ffi.Pointer< @@ -32968,21 +35292,13 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDic ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, ) > > ptr, ) => objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSString, - ffi.Pointer, - NSDictionary, - ffi.Pointer, - ) + ffi.Void Function(ffi.Pointer, NSURLHandle, NSData) >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, @@ -32998,47 +35314,24 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDic /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSString, - ffi.Pointer, - NSDictionary, - ffi.Pointer, - ) + ffi.Void Function(ffi.Pointer, NSURLHandle, NSData) > fromFunction( - void Function( - ffi.Pointer, - NSString, - objc.ObjCObject, - NSDictionary, - ffi.Pointer, - ) - fn, { + void Function(ffi.Pointer, NSURLHandle, NSData) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSString, - ffi.Pointer, - NSDictionary, - ffi.Pointer, - ) + ffi.Void Function(ffi.Pointer, NSURLHandle, NSData) >( objc.newClosureBlock(_closureCallable, ( ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, ) { return fn( arg0, - NSString.fromPointer(arg1, retain: true, release: true), - objc.ObjCObject(arg2, retain: true, release: true), - NSDictionary.fromPointer(arg3, retain: true, release: true), - arg4, + NSURLHandle.fromPointer(arg1, retain: true, release: true), + NSData.fromPointer(arg2, retain: true, release: true), ); }, keepIsolateAlive), retain: false, @@ -33055,50 +35348,27 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDic /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSString, - ffi.Pointer, - NSDictionary, - ffi.Pointer, - ) + ffi.Void Function(ffi.Pointer, NSURLHandle, NSData) > listener( - void Function( - ffi.Pointer, - NSString, - objc.ObjCObject, - NSDictionary, - ffi.Pointer, - ) - fn, { + void Function(ffi.Pointer, NSURLHandle, NSData) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_listenerCallable.nativeFunction.cast(), ( ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, ) { return fn( arg0, - NSString.fromPointer(arg1, retain: false, release: true), - objc.ObjCObject(arg2, retain: false, release: true), - NSDictionary.fromPointer(arg3, retain: false, release: true), - arg4, + NSURLHandle.fromPointer(arg1, retain: false, release: true), + NSData.fromPointer(arg2, retain: false, release: true), ); }, keepIsolateAlive); - final wrapper = _1wx624s_wrapListenerBlock_1sr3ozv(raw); + final wrapper = _1wx624s_wrapListenerBlock_fjrv01(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSString, - ffi.Pointer, - NSDictionary, - ffi.Pointer, - ) + ffi.Void Function(ffi.Pointer, NSURLHandle, NSData) >(wrapper, retain: false, release: true); } @@ -33113,38 +35383,21 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDic /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSString, - ffi.Pointer, - NSDictionary, - ffi.Pointer, - ) + ffi.Void Function(ffi.Pointer, NSURLHandle, NSData) > blocking( - void Function( - ffi.Pointer, - NSString, - objc.ObjCObject, - NSDictionary, - ffi.Pointer, - ) - fn, { + void Function(ffi.Pointer, NSURLHandle, NSData) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_blockingCallable.nativeFunction.cast(), ( ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, ) { return fn( arg0, - NSString.fromPointer(arg1, retain: false, release: true), - objc.ObjCObject(arg2, retain: false, release: true), - NSDictionary.fromPointer(arg3, retain: false, release: true), - arg4, + NSURLHandle.fromPointer(arg1, retain: false, release: true), + NSData.fromPointer(arg2, retain: false, release: true), ); }, keepIsolateAlive); final rawListener = objc @@ -33152,18 +35405,14 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDic ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, ) { return fn( arg0, - NSString.fromPointer(arg1, retain: false, release: true), - objc.ObjCObject(arg2, retain: false, release: true), - NSDictionary.fromPointer(arg3, retain: false, release: true), - arg4, + NSURLHandle.fromPointer(arg1, retain: false, release: true), + NSData.fromPointer(arg2, retain: false, release: true), ); }, keepIsolateAlive); - final wrapper = _1wx624s_wrapBlockingBlock_1sr3ozv( + final wrapper = _1wx624s_wrapBlockingBlock_fjrv01( raw, rawListener, objc.objCContext, @@ -33171,13 +35420,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDic objc.objectRelease(raw.cast()); objc.objectRelease(rawListener.cast()); return objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSString, - ffi.Pointer, - NSDictionary, - ffi.Pointer, - ) + ffi.Void Function(ffi.Pointer, NSURLHandle, NSData) >(wrapper, retain: false, release: true); } @@ -33186,17 +35429,13 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDic ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, ) { (objc.getBlockClosure(block) as void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1, arg2, arg3, arg4); + ))(arg0, arg1, arg2); objc.objectRelease(block.cast()); } @@ -33206,8 +35445,6 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDic ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ) > _listenerCallable = @@ -33217,8 +35454,6 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDic ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ) >.listener(_listenerTrampoline) ..keepIsolateAlive = false; @@ -33228,8 +35463,6 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDic ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, ) { try { (objc.getBlockClosure(block) @@ -33237,9 +35470,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDic ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1, arg2, arg3, arg4); + ))(arg0, arg1, arg2); } catch (e) { } finally { objc.signalWaiter(waiter); @@ -33254,8 +35485,6 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDic ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ) > _blockingCallable = @@ -33266,8 +35495,6 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDic ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ) >.isolateLocal(_blockingTrampoline) ..keepIsolateAlive = false; @@ -33278,8 +35505,6 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDic ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ) > _blockingListenerCallable = @@ -33290,8 +35515,6 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDic ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ) >.listener(_blockingTrampoline) ..keepIsolateAlive = false; @@ -33300,8 +35523,6 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDic ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, ) => block.ref.target .cast< ffi.NativeFunction< @@ -33309,8 +35530,6 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDic ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, ) > >() @@ -33319,10 +35538,8 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDic ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ) - >()(arg0, arg1, arg2, arg3, arg4); + >()(arg0, arg1, arg2); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( @@ -33330,8 +35547,6 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDic ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); @@ -33340,17 +35555,13 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDic ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, ) => (objc.getBlockClosure(block) as void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1, arg2, arg3, arg4); + ))(arg0, arg1, arg2); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( @@ -33358,35 +35569,20 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDic ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock, NSString, ffi.Pointer, NSDictionary, ffi.Pointer)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDictionary_ffiVoid$CallExtension +/// Call operator for `objc.ObjCBlock, NSURLHandle, NSData)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData$CallExtension on objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSString, - ffi.Pointer, - NSDictionary, - ffi.Pointer, - ) + ffi.Void Function(ffi.Pointer, NSURLHandle, NSData) > { - void call( - ffi.Pointer arg0, - NSString arg1, - objc.ObjCObject arg2, - NSDictionary arg3, - ffi.Pointer arg4, - ) { + void call(ffi.Pointer arg0, NSURLHandle arg1, NSData arg2) { final _$$ref = arg1.ref; final _$$ref$1 = arg2.ref; - final _$$ref$2 = arg3.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< @@ -33395,8 +35591,6 @@ extension ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDictionary_ffi ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, ) > >() @@ -33406,25 +35600,16 @@ extension ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDictionary_ffi ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ) - >()( - ref.pointer, - arg0, - _$$ref.pointer, - _$$ref$1.pointer, - _$$ref$2.pointer, - arg4, - ); + >()(ref.pointer, arg0, _$$ref.pointer, _$$ref$1.pointer); } } -/// Construction methods for `objc.ObjCBlock, ffi.UnsignedLong)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSUInteger { +/// Construction methods for `objc.ObjCBlock, NSURLHandle, NSString)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) + ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) > fromPointer( ffi.Pointer pointer, { @@ -33432,7 +35617,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSUInteger { bool release = false, }) => objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) + ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. @@ -33441,18 +35626,22 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSUInteger { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) + ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, ffi.UnsignedLong arg1) + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) > > ptr, ) => objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) + ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, @@ -33468,20 +35657,25 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSUInteger { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) + ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) > fromFunction( - void Function(ffi.Pointer, int) fn, { + void Function(ffi.Pointer, NSURLHandle, NSString) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) + ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) >( objc.newClosureBlock(_closureCallable, ( ffi.Pointer arg0, - int arg1, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return fn(arg0, arg1); + return fn( + arg0, + NSURLHandle.fromPointer(arg1, retain: true, release: true), + NSString.fromPointer(arg2, retain: true, release: true), + ); }, keepIsolateAlive), retain: false, release: true, @@ -33497,22 +35691,27 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSUInteger { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) + ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) > listener( - void Function(ffi.Pointer, int) fn, { + void Function(ffi.Pointer, NSURLHandle, NSString) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_listenerCallable.nativeFunction.cast(), ( ffi.Pointer arg0, - int arg1, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return fn(arg0, arg1); + return fn( + arg0, + NSURLHandle.fromPointer(arg1, retain: false, release: true), + NSString.fromPointer(arg2, retain: false, release: true), + ); }, keepIsolateAlive); - final wrapper = _1wx624s_wrapListenerBlock_zuf90e(raw); + final wrapper = _1wx624s_wrapListenerBlock_fjrv01(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) + ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) >(wrapper, retain: false, release: true); } @@ -33527,26 +35726,36 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSUInteger { /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) + ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) > blocking( - void Function(ffi.Pointer, int) fn, { + void Function(ffi.Pointer, NSURLHandle, NSString) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_blockingCallable.nativeFunction.cast(), ( ffi.Pointer arg0, - int arg1, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return fn(arg0, arg1); + return fn( + arg0, + NSURLHandle.fromPointer(arg1, retain: false, release: true), + NSString.fromPointer(arg2, retain: false, release: true), + ); }, keepIsolateAlive); - final rawListener = objc.newClosureBlock( - _blockingListenerCallable.nativeFunction.cast(), - (ffi.Pointer arg0, int arg1) { - return fn(arg0, arg1); - }, - keepIsolateAlive, - ); - final wrapper = _1wx624s_wrapBlockingBlock_zuf90e( + final rawListener = objc + .newClosureBlock(_blockingListenerCallable.nativeFunction.cast(), ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + return fn( + arg0, + NSURLHandle.fromPointer(arg1, retain: false, release: true), + NSString.fromPointer(arg2, retain: false, release: true), + ); + }, keepIsolateAlive); + final wrapper = _1wx624s_wrapBlockingBlock_fjrv01( raw, rawListener, objc.objCContext, @@ -33554,19 +35763,22 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSUInteger { objc.objectRelease(raw.cast()); objc.objectRelease(rawListener.cast()); return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) + ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) >(wrapper, retain: false, release: true); } static void _listenerTrampoline( ffi.Pointer block, ffi.Pointer arg0, - int arg1, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - (objc.getBlockClosure(block) as void Function(ffi.Pointer, int))( - arg0, - arg1, - ); + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2); objc.objectRelease(block.cast()); } @@ -33574,7 +35786,8 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSUInteger { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, + ffi.Pointer, + ffi.Pointer, ) > _listenerCallable = @@ -33582,7 +35795,8 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSUInteger { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, + ffi.Pointer, + ffi.Pointer, ) >.listener(_listenerTrampoline) ..keepIsolateAlive = false; @@ -33590,11 +35804,16 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSUInteger { ffi.Pointer block, ffi.Pointer waiter, ffi.Pointer arg0, - int arg1, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { try { (objc.getBlockClosure(block) - as void Function(ffi.Pointer, int))(arg0, arg1); + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2); } catch (e) { } finally { objc.signalWaiter(waiter); @@ -33607,7 +35826,8 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSUInteger { ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, + ffi.Pointer, + ffi.Pointer, ) > _blockingCallable = @@ -33616,7 +35836,8 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSUInteger { ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, + ffi.Pointer, + ffi.Pointer, ) >.isolateLocal(_blockingTrampoline) ..keepIsolateAlive = false; @@ -33625,7 +35846,8 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSUInteger { ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, + ffi.Pointer, + ffi.Pointer, ) > _blockingListenerCallable = @@ -33634,62 +35856,84 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSUInteger { ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, + ffi.Pointer, + ffi.Pointer, ) >.listener(_blockingTrampoline) ..keepIsolateAlive = false; static void _fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0, - int arg1, + ffi.Pointer arg1, + ffi.Pointer arg2, ) => block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, ffi.UnsignedLong arg1) + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) > >() - .asFunction, int)>()(arg0, arg1); + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(arg0, arg1, arg2); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, + ffi.Pointer, + ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static void _closureTrampoline( ffi.Pointer block, ffi.Pointer arg0, - int arg1, + ffi.Pointer arg1, + ffi.Pointer arg2, ) => (objc.getBlockClosure(block) - as void Function(ffi.Pointer, int))(arg0, arg1); + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, + ffi.Pointer, + ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock, ffi.UnsignedLong)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSUInteger$CallExtension +/// Call operator for `objc.ObjCBlock, NSURLHandle, NSString)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString$CallExtension on objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) + ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) > { - void call(ffi.Pointer arg0, int arg1) { + void call(ffi.Pointer arg0, NSURLHandle arg1, NSString arg2) { + final _$$ref = arg1.ref; + final _$$ref$1 = arg2.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, ffi.Pointer arg0, - ffi.UnsignedLong arg1, + ffi.Pointer arg1, + ffi.Pointer arg2, ) > >() @@ -33697,9 +35941,10 @@ extension ObjCBlock_ffiVoid_ffiVoid_NSUInteger$CallExtension void Function( ffi.Pointer, ffi.Pointer, - int, + ffi.Pointer, + ffi.Pointer, ) - >()(ref.pointer, arg0, arg1); + >()(ref.pointer, arg0, _$$ref.pointer, _$$ref$1.pointer); } } @@ -35418,7 +37663,7 @@ extension ObjCBlock_ffiVoid_unichar_NSUInteger$CallExtension } /// Construction methods for `objc.ObjCBlock?> Function(ffi.Pointer, NSCoder)>`. -abstract final class ObjCBlock_instancetype_ffiVoid_NSCoder { +abstract final class ObjCBlock_instancetype_ffiVoid_NSCoder_retained { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< objc.Retained?> Function( @@ -35559,7 +37804,7 @@ abstract final class ObjCBlock_instancetype_ffiVoid_NSCoder { } /// Call operator for `objc.ObjCBlock?> Function(ffi.Pointer, NSCoder)>`. -extension ObjCBlock_instancetype_ffiVoid_NSCoder$CallExtension +extension ObjCBlock_instancetype_ffiVoid_NSCoder_retained$CallExtension on objc.ObjCBlock< objc.Retained?> Function( @@ -35922,7 +38167,7 @@ extension ObjCBlock_objcObjCObjectImpl_ffiVoid$CallExtension } /// Construction methods for `objc.ObjCBlock> Function(ffi.Pointer, ffi.Pointer)>`. -abstract final class ObjCBlock_objcObjCObjectImpl_ffiVoid_NSZone { +abstract final class ObjCBlock_objcObjCObjectImpl_ffiVoid_NSZone_retained { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< objc.Retained> Function( @@ -36060,7 +38305,7 @@ abstract final class ObjCBlock_objcObjCObjectImpl_ffiVoid_NSZone { } /// Call operator for `objc.ObjCBlock> Function(ffi.Pointer, ffi.Pointer)>`. -extension ObjCBlock_objcObjCObjectImpl_ffiVoid_NSZone$CallExtension +extension ObjCBlock_objcObjCObjectImpl_ffiVoid_NSZone_retained$CallExtension on objc.ObjCBlock< objc.Retained> Function( @@ -37069,6 +39314,26 @@ final _class_DOBJCObservation = objc.getClass( _class_DOBJCObservation_raw, ).cast(), ); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSAppleEventDescriptor', +) +external ffi.Pointer _class_NSAppleEventDescriptor_raw; +final _class_NSAppleEventDescriptor = objc.getClass( + "NSAppleEventDescriptor", + () => ffi.Native.addressOf>( + _class_NSAppleEventDescriptor_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSArchiver', +) +external ffi.Pointer _class_NSArchiver_raw; +final _class_NSArchiver = objc.getClass( + "NSArchiver", + () => ffi.Native.addressOf>( + _class_NSArchiver_raw, + ).cast(), +); @ffi.Native>(symbol: 'OBJC_CLASS_\$_NSArray') external ffi.Pointer _class_NSArray_raw; final _class_NSArray = objc.getClass( @@ -37106,6 +39371,16 @@ final _class_NSBundle = objc.getClass( _class_NSBundle_raw, ).cast(), ); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSCalendarDate', +) +external ffi.Pointer _class_NSCalendarDate_raw; +final _class_NSCalendarDate = objc.getClass( + "NSCalendarDate", + () => ffi.Native.addressOf>( + _class_NSCalendarDate_raw, + ).cast(), +); @ffi.Native>( symbol: 'OBJC_CLASS_\$_NSCharacterSet', ) @@ -37116,6 +39391,16 @@ final _class_NSCharacterSet = objc.getClass( _class_NSCharacterSet_raw, ).cast(), ); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSClassDescription', +) +external ffi.Pointer _class_NSClassDescription_raw; +final _class_NSClassDescription = objc.getClass( + "NSClassDescription", + () => ffi.Native.addressOf>( + _class_NSClassDescription_raw, + ).cast(), +); @ffi.Native>(symbol: 'OBJC_CLASS_\$_NSCoder') external ffi.Pointer _class_NSCoder_raw; final _class_NSCoder = objc.getClass( @@ -37124,6 +39409,16 @@ final _class_NSCoder = objc.getClass( _class_NSCoder_raw, ).cast(), ); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSConnection', +) +external ffi.Pointer _class_NSConnection_raw; +final _class_NSConnection = objc.getClass( + "NSConnection", + () => ffi.Native.addressOf>( + _class_NSConnection_raw, + ).cast(), +); @ffi.Native>(symbol: 'OBJC_CLASS_\$_NSData') external ffi.Pointer _class_NSData_raw; final _class_NSData = objc.getClass( @@ -37150,6 +39445,36 @@ final _class_NSDictionary = objc.getClass( _class_NSDictionary_raw, ).cast(), ); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSDirectoryEnumerator', +) +external ffi.Pointer _class_NSDirectoryEnumerator_raw; +final _class_NSDirectoryEnumerator = objc.getClass( + "NSDirectoryEnumerator", + () => ffi.Native.addressOf>( + _class_NSDirectoryEnumerator_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSDistantObject', +) +external ffi.Pointer _class_NSDistantObject_raw; +final _class_NSDistantObject = objc.getClass( + "NSDistantObject", + () => ffi.Native.addressOf>( + _class_NSDistantObject_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSDistantObjectRequest', +) +external ffi.Pointer _class_NSDistantObjectRequest_raw; +final _class_NSDistantObjectRequest = objc.getClass( + "NSDistantObjectRequest", + () => ffi.Native.addressOf>( + _class_NSDistantObjectRequest_raw, + ).cast(), +); @ffi.Native>( symbol: 'OBJC_CLASS_\$_NSEnumerator', ) @@ -37168,6 +39493,54 @@ final _class_NSError = objc.getClass( _class_NSError_raw, ).cast(), ); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSException', +) +external ffi.Pointer _class_NSException_raw; +final _class_NSException = objc.getClass( + "NSException", + () => ffi.Native.addressOf>( + _class_NSException_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSExpression', +) +external ffi.Pointer _class_NSExpression_raw; +final _class_NSExpression = objc.getClass( + "NSExpression", + () => ffi.Native.addressOf>( + _class_NSExpression_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSFileManager', +) +external ffi.Pointer _class_NSFileManager_raw; +final _class_NSFileManager = objc.getClass( + "NSFileManager", + () => ffi.Native.addressOf>( + _class_NSFileManager_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSFileVersion', +) +external ffi.Pointer _class_NSFileVersion_raw; +final _class_NSFileVersion = objc.getClass( + "NSFileVersion", + () => ffi.Native.addressOf>( + _class_NSFileVersion_raw, + ).cast(), +); +@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSHost') +external ffi.Pointer _class_NSHost_raw; +final _class_NSHost = objc.getClass( + "NSHost", + () => ffi.Native.addressOf>( + _class_NSHost_raw, + ).cast(), +); @ffi.Native>( symbol: 'OBJC_CLASS_\$_NSIndexSet', ) @@ -37208,6 +39581,27 @@ final _class_NSItemProvider = objc.getClass( _class_NSItemProvider_raw, ).cast(), ); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSKeyValueSharedObserversSnapshot', +) +external ffi.Pointer +_class_NSKeyValueSharedObserversSnapshot_raw; +final _class_NSKeyValueSharedObserversSnapshot = objc.getClass( + "NSKeyValueSharedObserversSnapshot", + () => ffi.Native.addressOf>( + _class_NSKeyValueSharedObserversSnapshot_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSKeyedArchiver', +) +external ffi.Pointer _class_NSKeyedArchiver_raw; +final _class_NSKeyedArchiver = objc.getClass( + "NSKeyedArchiver", + () => ffi.Native.addressOf>( + _class_NSKeyedArchiver_raw, + ).cast(), +); @ffi.Native>(symbol: 'OBJC_CLASS_\$_NSLocale') external ffi.Pointer _class_NSLocale_raw; final _class_NSLocale = objc.getClass( @@ -37361,6 +39755,16 @@ final _class_NSOrderedSet = objc.getClass( _class_NSOrderedSet_raw, ).cast(), ); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSOrthography', +) +external ffi.Pointer _class_NSOrthography_raw; +final _class_NSOrthography = objc.getClass( + "NSOrthography", + () => ffi.Native.addressOf>( + _class_NSOrthography_raw, + ).cast(), +); @ffi.Native>( symbol: 'OBJC_CLASS_\$_NSOutputStream', ) @@ -37371,6 +39775,16 @@ final _class_NSOutputStream = objc.getClass( _class_NSOutputStream_raw, ).cast(), ); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSPersonNameComponents', +) +external ffi.Pointer _class_NSPersonNameComponents_raw; +final _class_NSPersonNameComponents = objc.getClass( + "NSPersonNameComponents", + () => ffi.Native.addressOf>( + _class_NSPersonNameComponents_raw, + ).cast(), +); @ffi.Native>(symbol: 'OBJC_CLASS_\$_NSPort') external ffi.Pointer _class_NSPort_raw; final _class_NSPort = objc.getClass( @@ -37379,6 +39793,16 @@ final _class_NSPort = objc.getClass( _class_NSPort_raw, ).cast(), ); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSPortCoder', +) +external ffi.Pointer _class_NSPortCoder_raw; +final _class_NSPortCoder = objc.getClass( + "NSPortCoder", + () => ffi.Native.addressOf>( + _class_NSPortCoder_raw, + ).cast(), +); @ffi.Native>( symbol: 'OBJC_CLASS_\$_NSPortMessage', ) @@ -37389,6 +39813,26 @@ final _class_NSPortMessage = objc.getClass( _class_NSPortMessage_raw, ).cast(), ); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSPortNameServer', +) +external ffi.Pointer _class_NSPortNameServer_raw; +final _class_NSPortNameServer = objc.getClass( + "NSPortNameServer", + () => ffi.Native.addressOf>( + _class_NSPortNameServer_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSPredicate', +) +external ffi.Pointer _class_NSPredicate_raw; +final _class_NSPredicate = objc.getClass( + "NSPredicate", + () => ffi.Native.addressOf>( + _class_NSPredicate_raw, + ).cast(), +); @ffi.Native>( symbol: 'OBJC_CLASS_\$_NSProgress', ) @@ -37399,6 +39843,14 @@ final _class_NSProgress = objc.getClass( _class_NSProgress_raw, ).cast(), ); +@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSProxy') +external ffi.Pointer _class_NSProxy_raw; +final _class_NSProxy = objc.getClass( + "NSProxy", + () => ffi.Native.addressOf>( + _class_NSProxy_raw, + ).cast(), +); @ffi.Native>(symbol: 'OBJC_CLASS_\$_NSRunLoop') external ffi.Pointer _class_NSRunLoop_raw; final _class_NSRunLoop = objc.getClass( @@ -37407,6 +39859,46 @@ final _class_NSRunLoop = objc.getClass( _class_NSRunLoop_raw, ).cast(), ); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSScriptClassDescription', +) +external ffi.Pointer _class_NSScriptClassDescription_raw; +final _class_NSScriptClassDescription = objc.getClass( + "NSScriptClassDescription", + () => ffi.Native.addressOf>( + _class_NSScriptClassDescription_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSScriptCommand', +) +external ffi.Pointer _class_NSScriptCommand_raw; +final _class_NSScriptCommand = objc.getClass( + "NSScriptCommand", + () => ffi.Native.addressOf>( + _class_NSScriptCommand_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSScriptCommandDescription', +) +external ffi.Pointer _class_NSScriptCommandDescription_raw; +final _class_NSScriptCommandDescription = objc.getClass( + "NSScriptCommandDescription", + () => ffi.Native.addressOf>( + _class_NSScriptCommandDescription_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSScriptObjectSpecifier', +) +external ffi.Pointer _class_NSScriptObjectSpecifier_raw; +final _class_NSScriptObjectSpecifier = objc.getClass( + "NSScriptObjectSpecifier", + () => ffi.Native.addressOf>( + _class_NSScriptObjectSpecifier_raw, + ).cast(), +); @ffi.Native>(symbol: 'OBJC_CLASS_\$_NSSet') external ffi.Pointer _class_NSSet_raw; final _class_NSSet = objc.getClass( @@ -37431,6 +39923,24 @@ final _class_NSString = objc.getClass( _class_NSString_raw, ).cast(), ); +@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSThread') +external ffi.Pointer _class_NSThread_raw; +final _class_NSThread = objc.getClass( + "NSThread", + () => ffi.Native.addressOf>( + _class_NSThread_raw, + ).cast(), +); +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_NSTimeZone', +) +external ffi.Pointer _class_NSTimeZone_raw; +final _class_NSTimeZone = objc.getClass( + "NSTimeZone", + () => ffi.Native.addressOf>( + _class_NSTimeZone_raw, + ).cast(), +); @ffi.Native>(symbol: 'OBJC_CLASS_\$_NSTimer') external ffi.Pointer _class_NSTimer_raw; final _class_NSTimer = objc.getClass( @@ -37648,6 +40158,23 @@ final _objc_msgSend_134vhyh = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_13lsk7w = 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_13mclwd = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -39229,23 +41756,6 @@ final _objc_msgSend_1p4gbjy = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_1pa9f4m = 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_1pl40xc = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -40059,6 +42569,25 @@ final _objc_msgSend_6jmuyz = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_6p7ndb = 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, + ) + >(); final _objc_msgSend_6peh6o = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -40327,6 +42856,23 @@ final _objc_msgSend_a3wp08 = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_agmudd = 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_arew0j = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -40867,23 +43413,6 @@ final _objc_msgSend_hiwitm = objc.msgSendPointer bool, ) >(); -final _objc_msgSend_hk6irj = 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_hwm8nu = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -40966,6 +43495,21 @@ final _objc_msgSend_jsclrq = objc.msgSendPointer int, ) >(); +final _objc_msgSend_jtzjjr = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); final _objc_msgSend_k1x6mt = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -41466,6 +44010,27 @@ final _objc_msgSend_r49ehc = objc.msgSendPointer bool, ) >(); +final _objc_msgSend_r8gdi7 = 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, + ) + >(); final _objc_msgSend_rc4ypv = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -41529,6 +44094,25 @@ final _objc_msgSend_s92gih = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_swohtd = 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 _objc_msgSend_sz90oi = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -41898,6 +44482,15 @@ final _objc_msgSend_zug4wi = objc.msgSendPointer ) external ffi.Pointer _protocol_NSCoding_raw(); final _protocol_NSCoding = objc.getProtocol("NSCoding", _protocol_NSCoding_raw); +@ffi.Native Function()>( + symbol: '_1wx624s_NSConnectionDelegate', +) +external ffi.Pointer +_protocol_NSConnectionDelegate_raw(); +final _protocol_NSConnectionDelegate = objc.getProtocol( + "NSConnectionDelegate", + _protocol_NSConnectionDelegate_raw, +); @ffi.Native Function()>( symbol: '_1wx624s_NSCopying', ) @@ -41914,6 +44507,15 @@ final _protocol_NSFastEnumeration = objc.getProtocol( "NSFastEnumeration", _protocol_NSFastEnumeration_raw, ); +@ffi.Native Function()>( + symbol: '_1wx624s_NSFileManagerDelegate', +) +external ffi.Pointer +_protocol_NSFileManagerDelegate_raw(); +final _protocol_NSFileManagerDelegate = objc.getProtocol( + "NSFileManagerDelegate", + _protocol_NSFileManagerDelegate_raw, +); @ffi.Native Function()>( symbol: '_1wx624s_NSItemProviderReading', ) @@ -41932,6 +44534,15 @@ final _protocol_NSItemProviderWriting = objc.getProtocol( "NSItemProviderWriting", _protocol_NSItemProviderWriting_raw, ); +@ffi.Native Function()>( + symbol: '_1wx624s_NSKeyedArchiverDelegate', +) +external ffi.Pointer +_protocol_NSKeyedArchiverDelegate_raw(); +final _protocol_NSKeyedArchiverDelegate = objc.getProtocol( + "NSKeyedArchiverDelegate", + _protocol_NSKeyedArchiverDelegate_raw, +); @ffi.Native Function()>( symbol: '_1wx624s_NSMutableCopying', ) @@ -41953,6 +44564,15 @@ final _protocol_NSPortDelegate = objc.getProtocol( "NSPortDelegate", _protocol_NSPortDelegate_raw, ); +@ffi.Native Function()>( + symbol: '_1wx624s_NSPredicateValidating', +) +external ffi.Pointer +_protocol_NSPredicateValidating_raw(); +final _protocol_NSPredicateValidating = objc.getProtocol( + "NSPredicateValidating", + _protocol_NSPredicateValidating_raw, +); @ffi.Native Function()>( symbol: '_1wx624s_NSSecureCoding', ) @@ -41969,11 +44589,38 @@ final _protocol_NSStreamDelegate = objc.getProtocol( "NSStreamDelegate", _protocol_NSStreamDelegate_raw, ); +@ffi.Native Function()>( + symbol: '_1wx624s_NSURLHandleClient', +) +external ffi.Pointer _protocol_NSURLHandleClient_raw(); +final _protocol_NSURLHandleClient = objc.getProtocol( + "NSURLHandleClient", + _protocol_NSURLHandleClient_raw, +); @ffi.Native Function()>( symbol: '_1wx624s_Observer', ) external ffi.Pointer _protocol_Observer_raw(); final _protocol_Observer = objc.getProtocol("Observer", _protocol_Observer_raw); +late final _sel_ISOCountryCodes = objc.registerName("ISOCountryCodes"); +late final _sel_ISOCurrencyCodes = objc.registerName("ISOCurrencyCodes"); +late final _sel_ISOLanguageCodes = objc.registerName("ISOLanguageCodes"); +late final _sel_URL = objc.registerName("URL"); +late final _sel_URLByAppendingPathComponent_ = objc.registerName( + "URLByAppendingPathComponent:", +); +late final _sel_URLByAppendingPathComponent_isDirectory_ = objc.registerName( + "URLByAppendingPathComponent:isDirectory:", +); +late final _sel_URLByAppendingPathExtension_ = objc.registerName( + "URLByAppendingPathExtension:", +); +late final _sel_URLByDeletingLastPathComponent = objc.registerName( + "URLByDeletingLastPathComponent", +); +late final _sel_URLByDeletingPathExtension = objc.registerName( + "URLByDeletingPathExtension", +); late final _sel_URLByResolvingAliasFileAtURL_options_error_ = objc.registerName( "URLByResolvingAliasFileAtURL:options:error:", ); @@ -41981,9 +44628,19 @@ late final _sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsS objc.registerName( "URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:", ); +late final _sel_URLByResolvingSymlinksInPath = objc.registerName( + "URLByResolvingSymlinksInPath", +); +late final _sel_URLByStandardizingPath = objc.registerName( + "URLByStandardizingPath", +); late final _sel_URLForAuxiliaryExecutable_ = objc.registerName( "URLForAuxiliaryExecutable:", ); +late final _sel_URLForDirectory_inDomain_appropriateForURL_create_error_ = objc + .registerName("URLForDirectory:inDomain:appropriateForURL:create:error:"); +late final _sel_URLForPublishingUbiquitousItemAtURL_expirationDate_error_ = objc + .registerName("URLForPublishingUbiquitousItemAtURL:expirationDate:error:"); late final _sel_URLForResource_withExtension_ = objc.registerName( "URLForResource:withExtension:", ); @@ -41996,6 +44653,54 @@ late final _sel_URLForResource_withExtension_subdirectory_inBundleWithURL_ = ); late final _sel_URLForResource_withExtension_subdirectory_localization_ = objc .registerName("URLForResource:withExtension:subdirectory:localization:"); +late final _sel_URLForUbiquityContainerIdentifier_ = objc.registerName( + "URLForUbiquityContainerIdentifier:", +); +late final _sel_URLFragmentAllowedCharacterSet = objc.registerName( + "URLFragmentAllowedCharacterSet", +); +late final _sel_URLHandleClassForURL_ = objc.registerName( + "URLHandleClassForURL:", +); +late final _sel_URLHandleResourceDidBeginLoading_ = objc.registerName( + "URLHandleResourceDidBeginLoading:", +); +late final _sel_URLHandleResourceDidCancelLoading_ = objc.registerName( + "URLHandleResourceDidCancelLoading:", +); +late final _sel_URLHandleResourceDidFinishLoading_ = objc.registerName( + "URLHandleResourceDidFinishLoading:", +); +late final _sel_URLHandleUsingCache_ = objc.registerName( + "URLHandleUsingCache:", +); +late final _sel_URLHandle_resourceDataDidBecomeAvailable_ = objc.registerName( + "URLHandle:resourceDataDidBecomeAvailable:", +); +late final _sel_URLHandle_resourceDidFailLoadingWithReason_ = objc.registerName( + "URLHandle:resourceDidFailLoadingWithReason:", +); +late final _sel_URLHostAllowedCharacterSet = objc.registerName( + "URLHostAllowedCharacterSet", +); +late final _sel_URLPasswordAllowedCharacterSet = objc.registerName( + "URLPasswordAllowedCharacterSet", +); +late final _sel_URLPathAllowedCharacterSet = objc.registerName( + "URLPathAllowedCharacterSet", +); +late final _sel_URLQueryAllowedCharacterSet = objc.registerName( + "URLQueryAllowedCharacterSet", +); +late final _sel_URLResourceDidCancelLoading_ = objc.registerName( + "URLResourceDidCancelLoading:", +); +late final _sel_URLResourceDidFinishLoading_ = objc.registerName( + "URLResourceDidFinishLoading:", +); +late final _sel_URLUserAllowedCharacterSet = objc.registerName( + "URLUserAllowedCharacterSet", +); late final _sel_URLWithDataRepresentation_relativeToURL_ = objc.registerName( "URLWithDataRepresentation:relativeToURL:", ); @@ -42006,6 +44711,15 @@ late final _sel_URLWithString_encodingInvalidCharacters_ = objc.registerName( late final _sel_URLWithString_relativeToURL_ = objc.registerName( "URLWithString:relativeToURL:", ); +late final _sel_URL_resourceDataDidBecomeAvailable_ = objc.registerName( + "URL:resourceDataDidBecomeAvailable:", +); +late final _sel_URL_resourceDidFailLoadingWithReason_ = objc.registerName( + "URL:resourceDidFailLoadingWithReason:", +); +late final _sel_URLsForDirectory_inDomains_ = objc.registerName( + "URLsForDirectory:inDomains:", +); late final _sel_URLsForResourcesWithExtension_subdirectory_ = objc.registerName( "URLsForResourcesWithExtension:subdirectory:", ); @@ -42016,6 +44730,13 @@ late final _sel_URLsForResourcesWithExtension_subdirectory_inBundleWithURL_ = late final _sel_URLsForResourcesWithExtension_subdirectory_localization_ = objc .registerName("URLsForResourcesWithExtension:subdirectory:localization:"); late final _sel_UTF8String = objc.registerName("UTF8String"); +late final _sel_abbreviation = objc.registerName("abbreviation"); +late final _sel_abbreviationDictionary = objc.registerName( + "abbreviationDictionary", +); +late final _sel_abbreviationForDate_ = objc.registerName( + "abbreviationForDate:", +); late final _sel_absoluteString = objc.registerName("absoluteString"); late final _sel_absoluteURL = objc.registerName("absoluteURL"); late final _sel_absoluteURLWithDataRepresentation_relativeToURL_ = objc @@ -42023,10 +44744,17 @@ late final _sel_absoluteURLWithDataRepresentation_relativeToURL_ = objc late final _sel_acceptInputForMode_beforeDate_ = objc.registerName( "acceptInputForMode:beforeDate:", ); +late final _sel_accessInstanceVariablesDirectly = objc.registerName( + "accessInstanceVariablesDirectly", +); late final _sel_adapter = objc.registerName("adapter"); late final _sel_addChild_withPendingUnitCount_ = objc.registerName( "addChild:withPendingUnitCount:", ); +late final _sel_addClient_ = objc.registerName("addClient:"); +late final _sel_addConnection_toRunLoop_forMode_ = objc.registerName( + "addConnection:toRunLoop:forMode:", +); late final _sel_addData_ = objc.registerName("addData:"); late final _sel_addEntriesFromDictionary_ = objc.registerName( "addEntriesFromDictionary:", @@ -42039,32 +44767,107 @@ late final _sel_addObjectsFromArray_ = objc.registerName( "addObjectsFromArray:", ); late final _sel_addObjects_count_ = objc.registerName("addObjects:count:"); +late final _sel_addObserver_forKeyPath_options_context_ = objc.registerName( + "addObserver:forKeyPath:options:context:", +); +late final _sel_addObserver_toObjectsAtIndexes_forKeyPath_options_context_ = + objc.registerName( + "addObserver:toObjectsAtIndexes:forKeyPath:options:context:", + ); late final _sel_addPort_forMode_ = objc.registerName("addPort:forMode:"); late final _sel_addProtocol_ = objc.registerName("addProtocol:"); +late final _sel_addRequestMode_ = objc.registerName("addRequestMode:"); +late final _sel_addRunLoop_ = objc.registerName("addRunLoop:"); late final _sel_addSubscriberForFileURL_withPublishingHandler_ = objc .registerName("addSubscriberForFileURL:withPublishingHandler:"); +late final _sel_addTimeInterval_ = objc.registerName("addTimeInterval:"); late final _sel_addTimer_forMode_ = objc.registerName("addTimer:forMode:"); +late final _sel_addVersionOfItemAtURL_withContentsOfURL_options_error_ = objc + .registerName("addVersionOfItemAtURL:withContentsOfURL:options:error:"); +late final _sel_address = objc.registerName("address"); +late final _sel_addresses = objc.registerName("addresses"); +late final _sel_aeDesc = objc.registerName("aeDesc"); late final _sel_allBundles = objc.registerName("allBundles"); +late final _sel_allConnections = objc.registerName("allConnections"); late final _sel_allFrameworks = objc.registerName("allFrameworks"); late final _sel_allKeys = objc.registerName("allKeys"); late final _sel_allKeysForObject_ = objc.registerName("allKeysForObject:"); +late final _sel_allLanguages = objc.registerName("allLanguages"); late final _sel_allObjects = objc.registerName("allObjects"); +late final _sel_allScripts = objc.registerName("allScripts"); late final _sel_allValues = objc.registerName("allValues"); late final _sel_alloc = objc.registerName("alloc"); late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); +late final _sel_allowEvaluation = objc.registerName("allowEvaluation"); +late final _sel_allowEvaluationWithValidator_error_ = objc.registerName( + "allowEvaluationWithValidator:error:", +); +late final _sel_allowedClasses = objc.registerName("allowedClasses"); late final _sel_allowsExtendedAttributes = objc.registerName( "allowsExtendedAttributes", ); +late final _sel_allowsKeyedCoding = objc.registerName("allowsKeyedCoding"); +late final _sel_allowsWeakReference = objc.registerName("allowsWeakReference"); late final _sel_alphanumericCharacterSet = objc.registerName( "alphanumericCharacterSet", ); +late final _sel_alternateQuotationBeginDelimiter = objc.registerName( + "alternateQuotationBeginDelimiter", +); +late final _sel_alternateQuotationEndDelimiter = objc.registerName( + "alternateQuotationEndDelimiter", +); late final _sel_anyObject = objc.registerName("anyObject"); late final _sel_appStoreReceiptURL = objc.registerName("appStoreReceiptURL"); late final _sel_appendBytes_length_ = objc.registerName("appendBytes:length:"); late final _sel_appendData_ = objc.registerName("appendData:"); +late final _sel_appendFormat_ = objc.registerName("appendFormat:"); +late final _sel_appendString_ = objc.registerName("appendString:"); +late final _sel_appleEvent = objc.registerName("appleEvent"); +late final _sel_appleEventClassCode = objc.registerName("appleEventClassCode"); +late final _sel_appleEventCode = objc.registerName("appleEventCode"); +late final _sel_appleEventCodeForArgumentWithName_ = objc.registerName( + "appleEventCodeForArgumentWithName:", +); +late final _sel_appleEventCodeForKey_ = objc.registerName( + "appleEventCodeForKey:", +); +late final _sel_appleEventCodeForReturnType = objc.registerName( + "appleEventCodeForReturnType", +); +late final _sel_appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_ = + objc.registerName( + "appleEventWithEventClass:eventID:targetDescriptor:returnID:transactionID:", + ); late final _sel_appliesSourcePositionAttributes = objc.registerName( "appliesSourcePositionAttributes", ); +late final _sel_applyDifference_ = objc.registerName("applyDifference:"); +late final _sel_applyTransform_reverse_range_updatedRange_ = objc.registerName( + "applyTransform:reverse:range:updatedRange:", +); +late final _sel_archiveRootObject_toFile_ = objc.registerName( + "archiveRootObject:toFile:", +); +late final _sel_archivedDataWithRootObject_ = objc.registerName( + "archivedDataWithRootObject:", +); +late final _sel_archivedDataWithRootObject_requiringSecureCoding_error_ = objc + .registerName("archivedDataWithRootObject:requiringSecureCoding:error:"); +late final _sel_archiverData = objc.registerName("archiverData"); +late final _sel_archiverDidFinish_ = objc.registerName("archiverDidFinish:"); +late final _sel_archiverWillFinish_ = objc.registerName("archiverWillFinish:"); +late final _sel_archiver_didEncodeObject_ = objc.registerName( + "archiver:didEncodeObject:", +); +late final _sel_archiver_willEncodeObject_ = objc.registerName( + "archiver:willEncodeObject:", +); +late final _sel_archiver_willReplaceObject_withObject_ = objc.registerName( + "archiver:willReplaceObject:withObject:", +); +late final _sel_argumentNames = objc.registerName("argumentNames"); +late final _sel_arguments = objc.registerName("arguments"); late final _sel_argumentsRetained = objc.registerName("argumentsRetained"); late final _sel_array = objc.registerName("array"); late final _sel_arrayByAddingObject_ = objc.registerName( @@ -42073,25 +44876,104 @@ late final _sel_arrayByAddingObject_ = objc.registerName( late final _sel_arrayByAddingObjectsFromArray_ = objc.registerName( "arrayByAddingObjectsFromArray:", ); +late final _sel_arrayByApplyingDifference_ = objc.registerName( + "arrayByApplyingDifference:", +); late final _sel_arrayWithArray_ = objc.registerName("arrayWithArray:"); late final _sel_arrayWithCapacity_ = objc.registerName("arrayWithCapacity:"); +late final _sel_arrayWithContentsOfFile_ = objc.registerName( + "arrayWithContentsOfFile:", +); +late final _sel_arrayWithContentsOfURL_ = objc.registerName( + "arrayWithContentsOfURL:", +); +late final _sel_arrayWithContentsOfURL_error_ = objc.registerName( + "arrayWithContentsOfURL:error:", +); late final _sel_arrayWithObject_ = objc.registerName("arrayWithObject:"); late final _sel_arrayWithObjects_ = objc.registerName("arrayWithObjects:"); late final _sel_arrayWithObjects_count_ = objc.registerName( "arrayWithObjects:count:", ); late final _sel_associatedIndex = objc.registerName("associatedIndex"); +late final _sel_attemptRecoveryFromError_optionIndex_ = objc.registerName( + "attemptRecoveryFromError:optionIndex:", +); +late final _sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_ = + objc.registerName( + "attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:", + ); +late final _sel_attributeDescriptorForKeyword_ = objc.registerName( + "attributeDescriptorForKeyword:", +); +late final _sel_attributeKeys = objc.registerName("attributeKeys"); +late final _sel_attribute_atIndex_effectiveRange_ = objc.registerName( + "attribute:atIndex:effectiveRange:", +); +late final _sel_attribute_atIndex_longestEffectiveRange_inRange_ = objc + .registerName("attribute:atIndex:longestEffectiveRange:inRange:"); +late final _sel_attributedStringByInflectingString = objc.registerName( + "attributedStringByInflectingString", +); +late final _sel_attributedSubstringFromRange_ = objc.registerName( + "attributedSubstringFromRange:", +); late final _sel_attributesAtIndex_effectiveRange_ = objc.registerName( "attributesAtIndex:effectiveRange:", ); +late final _sel_attributesAtIndex_longestEffectiveRange_inRange_ = objc + .registerName("attributesAtIndex:longestEffectiveRange:inRange:"); +late final _sel_attributesOfFileSystemForPath_error_ = objc.registerName( + "attributesOfFileSystemForPath:error:", +); +late final _sel_attributesOfItemAtPath_error_ = objc.registerName( + "attributesOfItemAtPath:error:", +); +late final _sel_authenticateComponents_withData_ = objc.registerName( + "authenticateComponents:withData:", +); +late final _sel_authenticationDataForComponents_ = objc.registerName( + "authenticationDataForComponents:", +); +late final _sel_autoContentAccessingProxy = objc.registerName( + "autoContentAccessingProxy", +); +late final _sel_automaticallyNotifiesObserversForKey_ = objc.registerName( + "automaticallyNotifiesObserversForKey:", +); late final _sel_autorelease = objc.registerName("autorelease"); +late final _sel_autoupdatingCurrentLocale = objc.registerName( + "autoupdatingCurrentLocale", +); +late final _sel_availableLocaleIdentifiers = objc.registerName( + "availableLocaleIdentifiers", +); +late final _sel_availableResourceData = objc.registerName( + "availableResourceData", +); late final _sel_availableStringEncodings = objc.registerName( "availableStringEncodings", ); +late final _sel_awakeAfterUsingCoder_ = objc.registerName( + "awakeAfterUsingCoder:", +); +late final _sel_backgroundLoadDidFailWithReason_ = objc.registerName( + "backgroundLoadDidFailWithReason:", +); +late final _sel_base64EncodedDataWithOptions_ = objc.registerName( + "base64EncodedDataWithOptions:", +); +late final _sel_base64EncodedStringWithOptions_ = objc.registerName( + "base64EncodedStringWithOptions:", +); +late final _sel_base64Encoding = objc.registerName("base64Encoding"); late final _sel_baseURL = objc.registerName("baseURL"); late final _sel_becomeCurrentWithPendingUnitCount_ = objc.registerName( "becomeCurrentWithPendingUnitCount:", ); +late final _sel_beginLoadInBackground = objc.registerName( + "beginLoadInBackground", +); late final _sel_bitmapRepresentation = objc.registerName( "bitmapRepresentation", ); @@ -42103,6 +44985,7 @@ late final _sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeT "bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:", ); late final _sel_boolValue = objc.registerName("boolValue"); +late final _sel_booleanValue = objc.registerName("booleanValue"); late final _sel_buildInstance_ = objc.registerName("buildInstance:"); late final _sel_builtInPlugInsPath = objc.registerName("builtInPlugInsPath"); late final _sel_builtInPlugInsURL = objc.registerName("builtInPlugInsURL"); @@ -42116,17 +44999,48 @@ late final _sel_bundleWithIdentifier_ = objc.registerName( late final _sel_bundleWithPath_ = objc.registerName("bundleWithPath:"); late final _sel_bundleWithURL_ = objc.registerName("bundleWithURL:"); late final _sel_bytes = objc.registerName("bytes"); +late final _sel_cString = objc.registerName("cString"); +late final _sel_cStringLength = objc.registerName("cStringLength"); late final _sel_cStringUsingEncoding_ = objc.registerName( "cStringUsingEncoding:", ); +late final _sel_cachedHandleForURL_ = objc.registerName("cachedHandleForURL:"); +late final _sel_calendarDate = objc.registerName("calendarDate"); +late final _sel_calendarFormat = objc.registerName("calendarFormat"); +late final _sel_calendarIdentifier = objc.registerName("calendarIdentifier"); +late final _sel_callStackReturnAddresses = objc.registerName( + "callStackReturnAddresses", +); +late final _sel_callStackSymbols = objc.registerName("callStackSymbols"); late final _sel_canBeConvertedToEncoding_ = objc.registerName( "canBeConvertedToEncoding:", ); +late final _sel_canInitWithURL_ = objc.registerName("canInitWithURL:"); late final _sel_canLoadObjectOfClass_ = objc.registerName( "canLoadObjectOfClass:", ); late final _sel_cancel = objc.registerName("cancel"); +late final _sel_cancelLoadInBackground = objc.registerName( + "cancelLoadInBackground", +); +late final _sel_cancelPerformSelector_target_argument_ = objc.registerName( + "cancelPerformSelector:target:argument:", +); +late final _sel_cancelPerformSelectorsWithTarget_ = objc.registerName( + "cancelPerformSelectorsWithTarget:", +); +late final _sel_cancelPreviousPerformRequestsWithTarget_ = objc.registerName( + "cancelPreviousPerformRequestsWithTarget:", +); +late final _sel_cancelPreviousPerformRequestsWithTarget_selector_object_ = objc + .registerName("cancelPreviousPerformRequestsWithTarget:selector:object:"); late final _sel_cancellationHandler = objc.registerName("cancellationHandler"); +late final _sel_canonicalLanguageIdentifierFromString_ = objc.registerName( + "canonicalLanguageIdentifierFromString:", +); +late final _sel_canonicalLocaleIdentifierFromString_ = objc.registerName( + "canonicalLocaleIdentifierFromString:", +); late final _sel_capitalizedLetterCharacterSet = objc.registerName( "capitalizedLetterCharacterSet", ); @@ -42137,6 +45051,12 @@ late final _sel_capitalizedStringWithLocale_ = objc.registerName( late final _sel_caseInsensitiveCompare_ = objc.registerName( "caseInsensitiveCompare:", ); +late final _sel_changeCurrentDirectoryPath_ = objc.registerName( + "changeCurrentDirectoryPath:", +); +late final _sel_changeFileAttributes_atPath_ = objc.registerName( + "changeFileAttributes:atPath:", +); late final _sel_changeType = objc.registerName("changeType"); late final _sel_changeWithObject_type_index_ = objc.registerName( "changeWithObject:type:index:", @@ -42145,6 +45065,9 @@ late final _sel_changeWithObject_type_index_associatedIndex_ = objc .registerName("changeWithObject:type:index:associatedIndex:"); late final _sel_charValue = objc.registerName("charValue"); late final _sel_characterAtIndex_ = objc.registerName("characterAtIndex:"); +late final _sel_characterDirectionForLanguage_ = objc.registerName( + "characterDirectionForLanguage:", +); late final _sel_characterIsMember_ = objc.registerName("characterIsMember:"); late final _sel_characterSetWithBitmapRepresentation_ = objc.registerName( "characterSetWithBitmapRepresentation:", @@ -42158,10 +45081,55 @@ late final _sel_characterSetWithContentsOfFile_ = objc.registerName( late final _sel_characterSetWithRange_ = objc.registerName( "characterSetWithRange:", ); +late final _sel_checkPromisedItemIsReachableAndReturnError_ = objc.registerName( + "checkPromisedItemIsReachableAndReturnError:", +); +late final _sel_checkResourceIsReachableAndReturnError_ = objc.registerName( + "checkResourceIsReachableAndReturnError:", +); +late final _sel_childSpecifier = objc.registerName("childSpecifier"); late final _sel_class = objc.registerName("class"); +late final _sel_classCode = objc.registerName("classCode"); +late final _sel_classDescription = objc.registerName("classDescription"); +late final _sel_classDescriptionForClass_ = objc.registerName( + "classDescriptionForClass:", +); +late final _sel_classDescriptionForKey_ = objc.registerName( + "classDescriptionForKey:", +); +late final _sel_classFallbacksForKeyedArchiver = objc.registerName( + "classFallbacksForKeyedArchiver", +); +late final _sel_classForArchiver = objc.registerName("classForArchiver"); +late final _sel_classForCoder = objc.registerName("classForCoder"); +late final _sel_classForKeyedArchiver = objc.registerName( + "classForKeyedArchiver", +); +late final _sel_classForKeyedUnarchiver = objc.registerName( + "classForKeyedUnarchiver", +); +late final _sel_classForPortCoder = objc.registerName("classForPortCoder"); +late final _sel_className = objc.registerName("className"); +late final _sel_classNameEncodedForTrueClassName_ = objc.registerName( + "classNameEncodedForTrueClassName:", +); +late final _sel_classNameForClass_ = objc.registerName("classNameForClass:"); late final _sel_classNamed_ = objc.registerName("classNamed:"); late final _sel_close = objc.registerName("close"); late final _sel_code = objc.registerName("code"); +late final _sel_coerceToDescriptorType_ = objc.registerName( + "coerceToDescriptorType:", +); +late final _sel_coerceValue_forKey_ = objc.registerName("coerceValue:forKey:"); +late final _sel_collationIdentifier = objc.registerName("collationIdentifier"); +late final _sel_collatorIdentifier = objc.registerName("collatorIdentifier"); +late final _sel_collection = objc.registerName("collection"); +late final _sel_commandClassName = objc.registerName("commandClassName"); +late final _sel_commandDescription = objc.registerName("commandDescription"); +late final _sel_commandName = objc.registerName("commandName"); +late final _sel_commonISOCurrencyCodes = objc.registerName( + "commonISOCurrencyCodes", +); late final _sel_commonPrefixWithString_options_ = objc.registerName( "commonPrefixWithString:options:", ); @@ -42173,8 +45141,15 @@ late final _sel_compare_options_range_ = objc.registerName( late final _sel_compare_options_range_locale_ = objc.registerName( "compare:options:range:locale:", ); +late final _sel_completePathIntoString_caseSensitive_matchesIntoArray_filterTypes_ = + objc.registerName( + "completePathIntoString:caseSensitive:matchesIntoArray:filterTypes:", + ); late final _sel_completedUnitCount = objc.registerName("completedUnitCount"); late final _sel_components = objc.registerName("components"); +late final _sel_componentsFromLocaleIdentifier_ = objc.registerName( + "componentsFromLocaleIdentifier:", +); late final _sel_componentsJoinedByString_ = objc.registerName( "componentsJoinedByString:", ); @@ -42184,10 +45159,46 @@ late final _sel_componentsSeparatedByCharactersInSet_ = objc.registerName( late final _sel_componentsSeparatedByString_ = objc.registerName( "componentsSeparatedByString:", ); +late final _sel_componentsToDisplayForPath_ = objc.registerName( + "componentsToDisplayForPath:", +); +late final _sel_compressUsingAlgorithm_error_ = objc.registerName( + "compressUsingAlgorithm:error:", +); late final _sel_compressedDataUsingAlgorithm_error_ = objc.registerName( "compressedDataUsingAlgorithm:error:", ); +late final _sel_configureAsServer = objc.registerName("configureAsServer"); late final _sel_conformsToProtocol_ = objc.registerName("conformsToProtocol:"); +late final _sel_connection = objc.registerName("connection"); +late final _sel_connectionForProxy = objc.registerName("connectionForProxy"); +late final _sel_connectionWithReceivePort_sendPort_ = objc.registerName( + "connectionWithReceivePort:sendPort:", +); +late final _sel_connectionWithRegisteredName_host_ = objc.registerName( + "connectionWithRegisteredName:host:", +); +late final _sel_connectionWithRegisteredName_host_usingNameServer_ = objc + .registerName("connectionWithRegisteredName:host:usingNameServer:"); +late final _sel_connection_handleRequest_ = objc.registerName( + "connection:handleRequest:", +); +late final _sel_connection_shouldMakeNewConnection_ = objc.registerName( + "connection:shouldMakeNewConnection:", +); +late final _sel_constantValue = objc.registerName("constantValue"); +late final _sel_containerClassDescription = objc.registerName( + "containerClassDescription", +); +late final _sel_containerIsObjectBeingTested = objc.registerName( + "containerIsObjectBeingTested", +); +late final _sel_containerIsRangeContainerObject = objc.registerName( + "containerIsRangeContainerObject", +); +late final _sel_containerSpecifier = objc.registerName("containerSpecifier"); +late final _sel_containerURLForSecurityApplicationGroupIdentifier_ = objc + .registerName("containerURLForSecurityApplicationGroupIdentifier:"); late final _sel_containsIndex_ = objc.registerName("containsIndex:"); late final _sel_containsIndexesInRange_ = objc.registerName( "containsIndexesInRange:", @@ -42195,8 +45206,35 @@ late final _sel_containsIndexesInRange_ = objc.registerName( late final _sel_containsIndexes_ = objc.registerName("containsIndexes:"); late final _sel_containsObject_ = objc.registerName("containsObject:"); late final _sel_containsString_ = objc.registerName("containsString:"); +late final _sel_containsValueForKey_ = objc.registerName( + "containsValueForKey:", +); +late final _sel_contentsAtPath_ = objc.registerName("contentsAtPath:"); +late final _sel_contentsEqualAtPath_andPath_ = objc.registerName( + "contentsEqualAtPath:andPath:", +); +late final _sel_contentsOfDirectoryAtPath_error_ = objc.registerName( + "contentsOfDirectoryAtPath:error:", +); +late final _sel_contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_ = + objc.registerName( + "contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error:", + ); late final _sel_controlCharacterSet = objc.registerName("controlCharacterSet"); +late final _sel_conversation = objc.registerName("conversation"); late final _sel_copy = objc.registerName("copy"); +late final _sel_copyItemAtPath_toPath_error_ = objc.registerName( + "copyItemAtPath:toPath:error:", +); +late final _sel_copyItemAtURL_toURL_error_ = objc.registerName( + "copyItemAtURL:toURL:error:", +); +late final _sel_copyPath_toPath_handler_ = objc.registerName( + "copyPath:toPath:handler:", +); +late final _sel_copyScriptingValue_forKey_withProperties_ = objc.registerName( + "copyScriptingValue:forKey:withProperties:", +); late final _sel_copyWithZone_ = objc.registerName("copyWithZone:"); late final _sel_count = objc.registerName("count"); late final _sel_countByEnumeratingWithState_objects_count_ = objc.registerName( @@ -42205,9 +45243,56 @@ late final _sel_countByEnumeratingWithState_objects_count_ = objc.registerName( late final _sel_countOfIndexesInRange_ = objc.registerName( "countOfIndexesInRange:", ); +late final _sel_countryCode = objc.registerName("countryCode"); +late final _sel_createCommandInstance = objc.registerName( + "createCommandInstance", +); +late final _sel_createCommandInstanceWithZone_ = objc.registerName( + "createCommandInstanceWithZone:", +); +late final _sel_createConversationForConnection_ = objc.registerName( + "createConversationForConnection:", +); +late final _sel_createDirectoryAtPath_attributes_ = objc.registerName( + "createDirectoryAtPath:attributes:", +); +late final _sel_createDirectoryAtPath_withIntermediateDirectories_attributes_error_ = + objc.registerName( + "createDirectoryAtPath:withIntermediateDirectories:attributes:error:", + ); +late final _sel_createDirectoryAtURL_withIntermediateDirectories_attributes_error_ = + objc.registerName( + "createDirectoryAtURL:withIntermediateDirectories:attributes:error:", + ); +late final _sel_createFileAtPath_contents_attributes_ = objc.registerName( + "createFileAtPath:contents:attributes:", +); +late final _sel_createSymbolicLinkAtPath_pathContent_ = objc.registerName( + "createSymbolicLinkAtPath:pathContent:", +); +late final _sel_createSymbolicLinkAtPath_withDestinationPath_error_ = objc + .registerName("createSymbolicLinkAtPath:withDestinationPath:error:"); +late final _sel_createSymbolicLinkAtURL_withDestinationURL_error_ = objc + .registerName("createSymbolicLinkAtURL:withDestinationURL:error:"); +late final _sel_currencyCode = objc.registerName("currencyCode"); +late final _sel_currencySymbol = objc.registerName("currencySymbol"); +late final _sel_currentCommand = objc.registerName("currentCommand"); +late final _sel_currentConversation = objc.registerName("currentConversation"); +late final _sel_currentDirectoryPath = objc.registerName( + "currentDirectoryPath", +); +late final _sel_currentHost = objc.registerName("currentHost"); +late final _sel_currentLocale = objc.registerName("currentLocale"); late final _sel_currentMode = objc.registerName("currentMode"); +late final _sel_currentProcessDescriptor = objc.registerName( + "currentProcessDescriptor", +); late final _sel_currentProgress = objc.registerName("currentProgress"); late final _sel_currentRunLoop = objc.registerName("currentRunLoop"); +late final _sel_currentThread = objc.registerName("currentThread"); +late final _sel_currentVersionOfItemAtURL_ = objc.registerName( + "currentVersionOfItemAtURL:", +); late final _sel_data = objc.registerName("data"); late final _sel_dataRepresentation = objc.registerName("dataRepresentation"); late final _sel_dataUsingEncoding_ = objc.registerName("dataUsingEncoding:"); @@ -42230,6 +45315,9 @@ late final _sel_dataWithContentsOfFile_ = objc.registerName( late final _sel_dataWithContentsOfFile_options_error_ = objc.registerName( "dataWithContentsOfFile:options:error:", ); +late final _sel_dataWithContentsOfMappedFile_ = objc.registerName( + "dataWithContentsOfMappedFile:", +); late final _sel_dataWithContentsOfURL_ = objc.registerName( "dataWithContentsOfURL:", ); @@ -42242,6 +45330,25 @@ late final _sel_date = objc.registerName("date"); late final _sel_dateByAddingTimeInterval_ = objc.registerName( "dateByAddingTimeInterval:", ); +late final _sel_dateByAddingYears_months_days_hours_minutes_seconds_ = objc + .registerName("dateByAddingYears:months:days:hours:minutes:seconds:"); +late final _sel_dateValue = objc.registerName("dateValue"); +late final _sel_dateWithCalendarFormat_timeZone_ = objc.registerName( + "dateWithCalendarFormat:timeZone:", +); +late final _sel_dateWithNaturalLanguageString_ = objc.registerName( + "dateWithNaturalLanguageString:", +); +late final _sel_dateWithNaturalLanguageString_locale_ = objc.registerName( + "dateWithNaturalLanguageString:locale:", +); +late final _sel_dateWithString_ = objc.registerName("dateWithString:"); +late final _sel_dateWithString_calendarFormat_ = objc.registerName( + "dateWithString:calendarFormat:", +); +late final _sel_dateWithString_calendarFormat_locale_ = objc.registerName( + "dateWithString:calendarFormat:locale:", +); late final _sel_dateWithTimeIntervalSince1970_ = objc.registerName( "dateWithTimeIntervalSince1970:", ); @@ -42254,16 +45361,106 @@ late final _sel_dateWithTimeIntervalSinceReferenceDate_ = objc.registerName( late final _sel_dateWithTimeInterval_sinceDate_ = objc.registerName( "dateWithTimeInterval:sinceDate:", ); +late final _sel_dateWithYear_month_day_hour_minute_second_timeZone_ = objc + .registerName("dateWithYear:month:day:hour:minute:second:timeZone:"); +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_daylightSavingTimeOffset = objc.registerName( + "daylightSavingTimeOffset", +); +late final _sel_daylightSavingTimeOffsetForDate_ = objc.registerName( + "daylightSavingTimeOffsetForDate:", +); late final _sel_dealloc = objc.registerName("dealloc"); late final _sel_debugDescription = objc.registerName("debugDescription"); late final _sel_debugObserver = objc.registerName("debugObserver"); late final _sel_decimalDigitCharacterSet = objc.registerName( "decimalDigitCharacterSet", ); +late final _sel_decimalSeparator = objc.registerName("decimalSeparator"); +late final _sel_decodeArrayOfObjCType_count_at_ = objc.registerName( + "decodeArrayOfObjCType:count:at:", +); +late final _sel_decodeArrayOfObjectsOfClass_forKey_ = objc.registerName( + "decodeArrayOfObjectsOfClass:forKey:", +); +late final _sel_decodeArrayOfObjectsOfClasses_forKey_ = objc.registerName( + "decodeArrayOfObjectsOfClasses:forKey:", +); +late final _sel_decodeBoolForKey_ = objc.registerName("decodeBoolForKey:"); +late final _sel_decodeBytesForKey_minimumLength_ = objc.registerName( + "decodeBytesForKey:minimumLength:", +); +late final _sel_decodeBytesForKey_returnedLength_ = objc.registerName( + "decodeBytesForKey:returnedLength:", +); +late final _sel_decodeBytesWithMinimumLength_ = objc.registerName( + "decodeBytesWithMinimumLength:", +); +late final _sel_decodeBytesWithReturnedLength_ = objc.registerName( + "decodeBytesWithReturnedLength:", +); late final _sel_decodeDataObject = objc.registerName("decodeDataObject"); +late final _sel_decodeDictionaryWithKeysOfClass_objectsOfClass_forKey_ = objc + .registerName("decodeDictionaryWithKeysOfClass:objectsOfClass:forKey:"); +late final _sel_decodeDictionaryWithKeysOfClasses_objectsOfClasses_forKey_ = + objc.registerName( + "decodeDictionaryWithKeysOfClasses:objectsOfClasses:forKey:", + ); +late final _sel_decodeDoubleForKey_ = objc.registerName("decodeDoubleForKey:"); +late final _sel_decodeFloatForKey_ = objc.registerName("decodeFloatForKey:"); +late final _sel_decodeInt32ForKey_ = objc.registerName("decodeInt32ForKey:"); +late final _sel_decodeInt64ForKey_ = objc.registerName("decodeInt64ForKey:"); +late final _sel_decodeIntForKey_ = objc.registerName("decodeIntForKey:"); +late final _sel_decodeIntegerForKey_ = objc.registerName( + "decodeIntegerForKey:", +); +late final _sel_decodeNXObject = objc.registerName("decodeNXObject"); +late final _sel_decodeObject = objc.registerName("decodeObject"); +late final _sel_decodeObjectForKey_ = objc.registerName("decodeObjectForKey:"); +late final _sel_decodeObjectOfClass_forKey_ = objc.registerName( + "decodeObjectOfClass:forKey:", +); +late final _sel_decodeObjectOfClasses_forKey_ = objc.registerName( + "decodeObjectOfClasses:forKey:", +); +late final _sel_decodePoint = objc.registerName("decodePoint"); +late final _sel_decodePointForKey_ = objc.registerName("decodePointForKey:"); +late final _sel_decodePortObject = objc.registerName("decodePortObject"); +late final _sel_decodePropertyList = objc.registerName("decodePropertyList"); +late final _sel_decodePropertyListForKey_ = objc.registerName( + "decodePropertyListForKey:", +); +late final _sel_decodeRect = objc.registerName("decodeRect"); +late final _sel_decodeRectForKey_ = objc.registerName("decodeRectForKey:"); +late final _sel_decodeSize = objc.registerName("decodeSize"); +late final _sel_decodeSizeForKey_ = objc.registerName("decodeSizeForKey:"); +late final _sel_decodeTopLevelObjectAndReturnError_ = objc.registerName( + "decodeTopLevelObjectAndReturnError:", +); +late final _sel_decodeTopLevelObjectForKey_error_ = objc.registerName( + "decodeTopLevelObjectForKey:error:", +); +late final _sel_decodeTopLevelObjectOfClass_forKey_error_ = objc.registerName( + "decodeTopLevelObjectOfClass:forKey:error:", +); +late final _sel_decodeTopLevelObjectOfClasses_forKey_error_ = objc.registerName( + "decodeTopLevelObjectOfClasses:forKey:error:", +); +late final _sel_decodeValueOfObjCType_at_ = objc.registerName( + "decodeValueOfObjCType:at:", +); late final _sel_decodeValueOfObjCType_at_size_ = objc.registerName( "decodeValueOfObjCType:at:size:", ); +late final _sel_decodeValuesOfObjCTypes_ = objc.registerName( + "decodeValuesOfObjCTypes:", +); +late final _sel_decodingFailurePolicy = objc.registerName( + "decodingFailurePolicy", +); late final _sel_decomposableCharacterSet = objc.registerName( "decomposableCharacterSet", ); @@ -42273,23 +45470,97 @@ late final _sel_decomposedStringWithCanonicalMapping = objc.registerName( late final _sel_decomposedStringWithCompatibilityMapping = objc.registerName( "decomposedStringWithCompatibilityMapping", ); +late final _sel_decompressUsingAlgorithm_error_ = objc.registerName( + "decompressUsingAlgorithm:error:", +); late final _sel_decompressedDataUsingAlgorithm_error_ = objc.registerName( "decompressedDataUsingAlgorithm:error:", ); late final _sel_defaultCStringEncoding = objc.registerName( "defaultCStringEncoding", ); +late final _sel_defaultConnection = objc.registerName("defaultConnection"); +late final _sel_defaultManager = objc.registerName("defaultManager"); +late final _sel_defaultOrthographyForLanguage_ = objc.registerName( + "defaultOrthographyForLanguage:", +); +late final _sel_defaultSubcontainerAttributeKey = objc.registerName( + "defaultSubcontainerAttributeKey", +); +late final _sel_defaultTimeZone = objc.registerName("defaultTimeZone"); late final _sel_delegate = objc.registerName("delegate"); +late final _sel_deleteCharactersInRange_ = objc.registerName( + "deleteCharactersInRange:", +); late final _sel_description = objc.registerName("description"); late final _sel_descriptionInStringsFileFormat = objc.registerName( "descriptionInStringsFileFormat", ); +late final _sel_descriptionWithCalendarFormat_ = objc.registerName( + "descriptionWithCalendarFormat:", +); +late final _sel_descriptionWithCalendarFormat_locale_ = objc.registerName( + "descriptionWithCalendarFormat:locale:", +); +late final _sel_descriptionWithCalendarFormat_timeZone_locale_ = objc + .registerName("descriptionWithCalendarFormat:timeZone:locale:"); late final _sel_descriptionWithLocale_ = objc.registerName( "descriptionWithLocale:", ); late final _sel_descriptionWithLocale_indent_ = objc.registerName( "descriptionWithLocale:indent:", ); +late final _sel_descriptor = objc.registerName("descriptor"); +late final _sel_descriptorAtIndex_ = objc.registerName("descriptorAtIndex:"); +late final _sel_descriptorForKeyword_ = objc.registerName( + "descriptorForKeyword:", +); +late final _sel_descriptorType = objc.registerName("descriptorType"); +late final _sel_descriptorWithApplicationURL_ = objc.registerName( + "descriptorWithApplicationURL:", +); +late final _sel_descriptorWithBoolean_ = objc.registerName( + "descriptorWithBoolean:", +); +late final _sel_descriptorWithBundleIdentifier_ = objc.registerName( + "descriptorWithBundleIdentifier:", +); +late final _sel_descriptorWithDate_ = objc.registerName("descriptorWithDate:"); +late final _sel_descriptorWithDescriptorType_bytes_length_ = objc.registerName( + "descriptorWithDescriptorType:bytes:length:", +); +late final _sel_descriptorWithDescriptorType_data_ = objc.registerName( + "descriptorWithDescriptorType:data:", +); +late final _sel_descriptorWithDouble_ = objc.registerName( + "descriptorWithDouble:", +); +late final _sel_descriptorWithEnumCode_ = objc.registerName( + "descriptorWithEnumCode:", +); +late final _sel_descriptorWithFileURL_ = objc.registerName( + "descriptorWithFileURL:", +); +late final _sel_descriptorWithInt32_ = objc.registerName( + "descriptorWithInt32:", +); +late final _sel_descriptorWithProcessIdentifier_ = objc.registerName( + "descriptorWithProcessIdentifier:", +); +late final _sel_descriptorWithString_ = objc.registerName( + "descriptorWithString:", +); +late final _sel_descriptorWithTypeCode_ = objc.registerName( + "descriptorWithTypeCode:", +); +late final _sel_destinationOfSymbolicLinkAtPath_error_ = objc.registerName( + "destinationOfSymbolicLinkAtPath:error:", +); +late final _sel_detachNewThreadSelector_toTarget_withObject_ = objc + .registerName("detachNewThreadSelector:toTarget:withObject:"); +late final _sel_detachNewThreadWithBlock_ = objc.registerName( + "detachNewThreadWithBlock:", +); late final _sel_developmentLocalization = objc.registerName( "developmentLocalization", ); @@ -42297,6 +45568,15 @@ late final _sel_dictionary = objc.registerName("dictionary"); late final _sel_dictionaryWithCapacity_ = objc.registerName( "dictionaryWithCapacity:", ); +late final _sel_dictionaryWithContentsOfFile_ = objc.registerName( + "dictionaryWithContentsOfFile:", +); +late final _sel_dictionaryWithContentsOfURL_ = objc.registerName( + "dictionaryWithContentsOfURL:", +); +late final _sel_dictionaryWithContentsOfURL_error_ = objc.registerName( + "dictionaryWithContentsOfURL:error:", +); late final _sel_dictionaryWithDictionary_ = objc.registerName( "dictionaryWithDictionary:", ); @@ -42312,26 +45592,136 @@ late final _sel_dictionaryWithObjects_forKeys_ = objc.registerName( late final _sel_dictionaryWithObjects_forKeys_count_ = objc.registerName( "dictionaryWithObjects:forKeys:count:", ); +late final _sel_dictionaryWithSharedKeySet_ = objc.registerName( + "dictionaryWithSharedKeySet:", +); +late final _sel_dictionaryWithValuesForKeys_ = objc.registerName( + "dictionaryWithValuesForKeys:", +); +late final _sel_didChangeValueForKey_ = objc.registerName( + "didChangeValueForKey:", +); +late final _sel_didChangeValueForKey_withSetMutation_usingObjects_ = objc + .registerName("didChangeValueForKey:withSetMutation:usingObjects:"); +late final _sel_didChange_valuesAtIndexes_forKey_ = objc.registerName( + "didChange:valuesAtIndexes:forKey:", +); +late final _sel_didLoadBytes_loadComplete_ = objc.registerName( + "didLoadBytes:loadComplete:", +); late final _sel_differenceByTransformingChangesWithBlock_ = objc.registerName( "differenceByTransformingChangesWithBlock:", ); +late final _sel_differenceFromArray_ = objc.registerName( + "differenceFromArray:", +); +late final _sel_differenceFromArray_withOptions_ = objc.registerName( + "differenceFromArray:withOptions:", +); +late final _sel_differenceFromArray_withOptions_usingEquivalenceTest_ = objc + .registerName("differenceFromArray:withOptions:usingEquivalenceTest:"); +late final _sel_differenceFromOrderedSet_ = objc.registerName( + "differenceFromOrderedSet:", +); +late final _sel_differenceFromOrderedSet_withOptions_ = objc.registerName( + "differenceFromOrderedSet:withOptions:", +); +late final _sel_differenceFromOrderedSet_withOptions_usingEquivalenceTest_ = + objc.registerName( + "differenceFromOrderedSet:withOptions:usingEquivalenceTest:", + ); +late final _sel_directParameter = objc.registerName("directParameter"); +late final _sel_directoryAttributes = objc.registerName("directoryAttributes"); +late final _sel_directoryContentsAtPath_ = objc.registerName( + "directoryContentsAtPath:", +); late final _sel_discreteProgressWithTotalUnitCount_ = objc.registerName( "discreteProgressWithTotalUnitCount:", ); +late final _sel_dispatch = objc.registerName("dispatch"); +late final _sel_dispatchWithComponents_ = objc.registerName( + "dispatchWithComponents:", +); +late final _sel_displayNameAtPath_ = objc.registerName("displayNameAtPath:"); late final _sel_displayNameForKey_value_ = objc.registerName( "displayNameForKey:value:", ); +late final _sel_distantFuture = objc.registerName("distantFuture"); +late final _sel_distantPast = objc.registerName("distantPast"); +late final _sel_doesContain_ = objc.registerName("doesContain:"); late final _sel_doesNotRecognizeSelector_ = objc.registerName( "doesNotRecognizeSelector:", ); late final _sel_domain = objc.registerName("domain"); +late final _sel_dominantLanguage = objc.registerName("dominantLanguage"); +late final _sel_dominantLanguageForScript_ = objc.registerName( + "dominantLanguageForScript:", +); +late final _sel_dominantScript = objc.registerName("dominantScript"); late final _sel_doubleValue = objc.registerName("doubleValue"); late final _sel_earlierDate_ = objc.registerName("earlierDate:"); +late final _sel_edgeInsetsValue = objc.registerName("edgeInsetsValue"); +late final _sel_enableMultipleThreads = objc.registerName( + "enableMultipleThreads", +); +late final _sel_encodeArrayOfObjCType_count_at_ = objc.registerName( + "encodeArrayOfObjCType:count:at:", +); +late final _sel_encodeBool_forKey_ = objc.registerName("encodeBool:forKey:"); +late final _sel_encodeBycopyObject_ = objc.registerName("encodeBycopyObject:"); +late final _sel_encodeByrefObject_ = objc.registerName("encodeByrefObject:"); +late final _sel_encodeBytes_length_ = objc.registerName("encodeBytes:length:"); +late final _sel_encodeBytes_length_forKey_ = objc.registerName( + "encodeBytes:length:forKey:", +); +late final _sel_encodeClassName_intoClassName_ = objc.registerName( + "encodeClassName:intoClassName:", +); +late final _sel_encodeConditionalObject_ = objc.registerName( + "encodeConditionalObject:", +); +late final _sel_encodeConditionalObject_forKey_ = objc.registerName( + "encodeConditionalObject:forKey:", +); late final _sel_encodeDataObject_ = objc.registerName("encodeDataObject:"); +late final _sel_encodeDouble_forKey_ = objc.registerName( + "encodeDouble:forKey:", +); +late final _sel_encodeFloat_forKey_ = objc.registerName("encodeFloat:forKey:"); +late final _sel_encodeInt32_forKey_ = objc.registerName("encodeInt32:forKey:"); +late final _sel_encodeInt64_forKey_ = objc.registerName("encodeInt64:forKey:"); +late final _sel_encodeInt_forKey_ = objc.registerName("encodeInt:forKey:"); +late final _sel_encodeInteger_forKey_ = objc.registerName( + "encodeInteger:forKey:", +); +late final _sel_encodeNXObject_ = objc.registerName("encodeNXObject:"); +late final _sel_encodeObject_ = objc.registerName("encodeObject:"); +late final _sel_encodeObject_forKey_ = objc.registerName( + "encodeObject:forKey:", +); +late final _sel_encodePoint_ = objc.registerName("encodePoint:"); +late final _sel_encodePoint_forKey_ = objc.registerName("encodePoint:forKey:"); +late final _sel_encodePortObject_ = objc.registerName("encodePortObject:"); +late final _sel_encodePropertyList_ = objc.registerName("encodePropertyList:"); +late final _sel_encodeRect_ = objc.registerName("encodeRect:"); +late final _sel_encodeRect_forKey_ = objc.registerName("encodeRect:forKey:"); +late final _sel_encodeRootObject_ = objc.registerName("encodeRootObject:"); +late final _sel_encodeSize_ = objc.registerName("encodeSize:"); +late final _sel_encodeSize_forKey_ = objc.registerName("encodeSize:forKey:"); late final _sel_encodeValueOfObjCType_at_ = objc.registerName( "encodeValueOfObjCType:at:", ); +late final _sel_encodeValuesOfObjCTypes_ = objc.registerName( + "encodeValuesOfObjCTypes:", +); late final _sel_encodeWithCoder_ = objc.registerName("encodeWithCoder:"); +late final _sel_encodedData = objc.registerName("encodedData"); +late final _sel_endLoadInBackground = objc.registerName("endLoadInBackground"); +late final _sel_enumCodeValue = objc.registerName("enumCodeValue"); +late final _sel_enumerateAttribute_inRange_options_usingBlock_ = objc + .registerName("enumerateAttribute:inRange:options:usingBlock:"); +late final _sel_enumerateAttributesInRange_options_usingBlock_ = objc + .registerName("enumerateAttributesInRange:options:usingBlock:"); late final _sel_enumerateByteRangesUsingBlock_ = objc.registerName( "enumerateByteRangesUsingBlock:", ); @@ -42352,6 +45742,10 @@ late final _sel_enumerateKeysAndObjectsWithOptions_usingBlock_ = objc late final _sel_enumerateLinesUsingBlock_ = objc.registerName( "enumerateLinesUsingBlock:", ); +late final _sel_enumerateLinguisticTagsInRange_scheme_options_orthography_usingBlock_ = + objc.registerName( + "enumerateLinguisticTagsInRange:scheme:options:orthography:usingBlock:", + ); late final _sel_enumerateObjectsAtIndexes_options_usingBlock_ = objc .registerName("enumerateObjectsAtIndexes:options:usingBlock:"); late final _sel_enumerateObjectsUsingBlock_ = objc.registerName( @@ -42371,12 +45765,38 @@ late final _sel_enumerateRangesWithOptions_usingBlock_ = objc.registerName( ); late final _sel_enumerateSubstringsInRange_options_usingBlock_ = objc .registerName("enumerateSubstringsInRange:options:usingBlock:"); +late final _sel_enumeratorAtPath_ = objc.registerName("enumeratorAtPath:"); +late final _sel_enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_ = + objc.registerName( + "enumeratorAtURL:includingPropertiesForKeys:options:errorHandler:", + ); +late final _sel_error = objc.registerName("error"); late final _sel_errorWithDomain_code_userInfo_ = objc.registerName( "errorWithDomain:code:userInfo:", ); late final _sel_estimatedTimeRemaining = objc.registerName( "estimatedTimeRemaining", ); +late final _sel_evaluateWithObject_ = objc.registerName("evaluateWithObject:"); +late final _sel_evaluateWithObject_substitutionVariables_ = objc.registerName( + "evaluateWithObject:substitutionVariables:", +); +late final _sel_evaluatedArguments = objc.registerName("evaluatedArguments"); +late final _sel_evaluatedReceivers = objc.registerName("evaluatedReceivers"); +late final _sel_evaluationErrorNumber = objc.registerName( + "evaluationErrorNumber", +); +late final _sel_evaluationErrorSpecifier = objc.registerName( + "evaluationErrorSpecifier", +); +late final _sel_eventClass = objc.registerName("eventClass"); +late final _sel_eventID = objc.registerName("eventID"); +late final _sel_evictUbiquitousItemAtURL_error_ = objc.registerName( + "evictUbiquitousItemAtURL:error:", +); +late final _sel_exceptionWithName_reason_userInfo_ = objc.registerName( + "exceptionWithName:reason:userInfo:", +); late final _sel_exchangeObjectAtIndex_withObjectAtIndex_ = objc.registerName( "exchangeObjectAtIndex:withObjectAtIndex:", ); @@ -42385,21 +45805,187 @@ late final _sel_executableArchitectures = objc.registerName( ); late final _sel_executablePath = objc.registerName("executablePath"); late final _sel_executableURL = objc.registerName("executableURL"); +late final _sel_executeCommand = objc.registerName("executeCommand"); +late final _sel_exemplarCharacterSet = objc.registerName( + "exemplarCharacterSet", +); +late final _sel_exit = objc.registerName("exit"); +late final _sel_expectedResourceDataSize = objc.registerName( + "expectedResourceDataSize", +); +late final _sel_expressionBlock = objc.registerName("expressionBlock"); +late final _sel_expressionForAggregate_ = objc.registerName( + "expressionForAggregate:", +); +late final _sel_expressionForAnyKey = objc.registerName("expressionForAnyKey"); +late final _sel_expressionForBlock_arguments_ = objc.registerName( + "expressionForBlock:arguments:", +); +late final _sel_expressionForConditional_trueExpression_falseExpression_ = objc + .registerName("expressionForConditional:trueExpression:falseExpression:"); +late final _sel_expressionForConstantValue_ = objc.registerName( + "expressionForConstantValue:", +); +late final _sel_expressionForEvaluatedObject = objc.registerName( + "expressionForEvaluatedObject", +); +late final _sel_expressionForFunction_arguments_ = objc.registerName( + "expressionForFunction:arguments:", +); +late final _sel_expressionForFunction_selectorName_arguments_ = objc + .registerName("expressionForFunction:selectorName:arguments:"); +late final _sel_expressionForIntersectSet_with_ = objc.registerName( + "expressionForIntersectSet:with:", +); +late final _sel_expressionForKeyPath_ = objc.registerName( + "expressionForKeyPath:", +); +late final _sel_expressionForMinusSet_with_ = objc.registerName( + "expressionForMinusSet:with:", +); +late final _sel_expressionForSubquery_usingIteratorVariable_predicate_ = objc + .registerName("expressionForSubquery:usingIteratorVariable:predicate:"); +late final _sel_expressionForUnionSet_with_ = objc.registerName( + "expressionForUnionSet:with:", +); +late final _sel_expressionForVariable_ = objc.registerName( + "expressionForVariable:", +); +late final _sel_expressionType = objc.registerName("expressionType"); +late final _sel_expressionValueWithObject_context_ = objc.registerName( + "expressionValueWithObject:context:", +); +late final _sel_expressionWithFormat_ = objc.registerName( + "expressionWithFormat:", +); +late final _sel_expressionWithFormat_argumentArray_ = objc.registerName( + "expressionWithFormat:argumentArray:", +); +late final _sel_failWithError_ = objc.registerName("failWithError:"); late final _sel_failurePolicy = objc.registerName("failurePolicy"); +late final _sel_failureReason = objc.registerName("failureReason"); +late final _sel_falseExpression = objc.registerName("falseExpression"); +late final _sel_familyName = objc.registerName("familyName"); late final _sel_fastestEncoding = objc.registerName("fastestEncoding"); +late final _sel_fetchLatestRemoteVersionOfItemAtURL_completionHandler_ = objc + .registerName("fetchLatestRemoteVersionOfItemAtURL:completionHandler:"); +late final _sel_fileAttributes = objc.registerName("fileAttributes"); +late final _sel_fileAttributesAtPath_traverseLink_ = objc.registerName( + "fileAttributesAtPath:traverseLink:", +); late final _sel_fileCompletedCount = objc.registerName("fileCompletedCount"); +late final _sel_fileCreationDate = objc.registerName("fileCreationDate"); +late final _sel_fileExistsAtPath_ = objc.registerName("fileExistsAtPath:"); +late final _sel_fileExistsAtPath_isDirectory_ = objc.registerName( + "fileExistsAtPath:isDirectory:", +); +late final _sel_fileExtensionHidden = objc.registerName("fileExtensionHidden"); +late final _sel_fileGroupOwnerAccountID = objc.registerName( + "fileGroupOwnerAccountID", +); +late final _sel_fileGroupOwnerAccountName = objc.registerName( + "fileGroupOwnerAccountName", +); +late final _sel_fileHFSCreatorCode = objc.registerName("fileHFSCreatorCode"); +late final _sel_fileHFSTypeCode = objc.registerName("fileHFSTypeCode"); +late final _sel_fileIsAppendOnly = objc.registerName("fileIsAppendOnly"); +late final _sel_fileIsImmutable = objc.registerName("fileIsImmutable"); +late final _sel_fileManager_shouldCopyItemAtPath_toPath_ = objc.registerName( + "fileManager:shouldCopyItemAtPath:toPath:", +); +late final _sel_fileManager_shouldCopyItemAtURL_toURL_ = objc.registerName( + "fileManager:shouldCopyItemAtURL:toURL:", +); +late final _sel_fileManager_shouldLinkItemAtPath_toPath_ = objc.registerName( + "fileManager:shouldLinkItemAtPath:toPath:", +); +late final _sel_fileManager_shouldLinkItemAtURL_toURL_ = objc.registerName( + "fileManager:shouldLinkItemAtURL:toURL:", +); +late final _sel_fileManager_shouldMoveItemAtPath_toPath_ = objc.registerName( + "fileManager:shouldMoveItemAtPath:toPath:", +); +late final _sel_fileManager_shouldMoveItemAtURL_toURL_ = objc.registerName( + "fileManager:shouldMoveItemAtURL:toURL:", +); +late final _sel_fileManager_shouldProceedAfterError_ = objc.registerName( + "fileManager:shouldProceedAfterError:", +); +late final _sel_fileManager_shouldProceedAfterError_copyingItemAtPath_toPath_ = + objc.registerName( + "fileManager:shouldProceedAfterError:copyingItemAtPath:toPath:", + ); +late final _sel_fileManager_shouldProceedAfterError_copyingItemAtURL_toURL_ = + objc.registerName( + "fileManager:shouldProceedAfterError:copyingItemAtURL:toURL:", + ); +late final _sel_fileManager_shouldProceedAfterError_linkingItemAtPath_toPath_ = + objc.registerName( + "fileManager:shouldProceedAfterError:linkingItemAtPath:toPath:", + ); +late final _sel_fileManager_shouldProceedAfterError_linkingItemAtURL_toURL_ = + objc.registerName( + "fileManager:shouldProceedAfterError:linkingItemAtURL:toURL:", + ); +late final _sel_fileManager_shouldProceedAfterError_movingItemAtPath_toPath_ = + objc.registerName( + "fileManager:shouldProceedAfterError:movingItemAtPath:toPath:", + ); +late final _sel_fileManager_shouldProceedAfterError_movingItemAtURL_toURL_ = + objc.registerName( + "fileManager:shouldProceedAfterError:movingItemAtURL:toURL:", + ); +late final _sel_fileManager_shouldProceedAfterError_removingItemAtPath_ = objc + .registerName("fileManager:shouldProceedAfterError:removingItemAtPath:"); +late final _sel_fileManager_shouldProceedAfterError_removingItemAtURL_ = objc + .registerName("fileManager:shouldProceedAfterError:removingItemAtURL:"); +late final _sel_fileManager_shouldRemoveItemAtPath_ = objc.registerName( + "fileManager:shouldRemoveItemAtPath:", +); +late final _sel_fileManager_shouldRemoveItemAtURL_ = objc.registerName( + "fileManager:shouldRemoveItemAtURL:", +); +late final _sel_fileManager_willProcessPath_ = objc.registerName( + "fileManager:willProcessPath:", +); +late final _sel_fileModificationDate = objc.registerName( + "fileModificationDate", +); late final _sel_fileOperationKind = objc.registerName("fileOperationKind"); +late final _sel_fileOwnerAccountID = objc.registerName("fileOwnerAccountID"); +late final _sel_fileOwnerAccountName = objc.registerName( + "fileOwnerAccountName", +); late final _sel_filePathURL = objc.registerName("filePathURL"); +late final _sel_filePosixPermissions = objc.registerName( + "filePosixPermissions", +); late final _sel_fileReferenceURL = objc.registerName("fileReferenceURL"); +late final _sel_fileSize = objc.registerName("fileSize"); +late final _sel_fileSystemAttributesAtPath_ = objc.registerName( + "fileSystemAttributesAtPath:", +); +late final _sel_fileSystemFileNumber = objc.registerName( + "fileSystemFileNumber", +); +late final _sel_fileSystemNumber = objc.registerName("fileSystemNumber"); late final _sel_fileSystemRepresentation = objc.registerName( "fileSystemRepresentation", ); +late final _sel_fileSystemRepresentationWithPath_ = objc.registerName( + "fileSystemRepresentationWithPath:", +); late final _sel_fileTotalCount = objc.registerName("fileTotalCount"); +late final _sel_fileType = objc.registerName("fileType"); late final _sel_fileURL = objc.registerName("fileURL"); +late final _sel_fileURLValue = objc.registerName("fileURLValue"); late final _sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_ = objc.registerName( "fileURLWithFileSystemRepresentation:isDirectory:relativeToURL:", ); +late final _sel_fileURLWithPathComponents_ = objc.registerName( + "fileURLWithPathComponents:", +); late final _sel_fileURLWithPath_ = objc.registerName("fileURLWithPath:"); late final _sel_fileURLWithPath_isDirectory_ = objc.registerName( "fileURLWithPath:isDirectory:", @@ -42410,6 +45996,20 @@ late final _sel_fileURLWithPath_isDirectory_relativeToURL_ = objc.registerName( late final _sel_fileURLWithPath_relativeToURL_ = objc.registerName( "fileURLWithPath:relativeToURL:", ); +late final _sel_filterUsingPredicate_ = objc.registerName( + "filterUsingPredicate:", +); +late final _sel_filteredArrayUsingPredicate_ = objc.registerName( + "filteredArrayUsingPredicate:", +); +late final _sel_filteredOrderedSetUsingPredicate_ = objc.registerName( + "filteredOrderedSetUsingPredicate:", +); +late final _sel_filteredSetUsingPredicate_ = objc.registerName( + "filteredSetUsingPredicate:", +); +late final _sel_finalize = objc.registerName("finalize"); +late final _sel_finishEncoding = objc.registerName("finishEncoding"); late final _sel_fire = objc.registerName("fire"); late final _sel_fireDate = objc.registerName("fireDate"); late final _sel_firstIndex = objc.registerName("firstIndex"); @@ -42418,6 +46018,8 @@ late final _sel_firstObjectCommonWithArray_ = objc.registerName( "firstObjectCommonWithArray:", ); late final _sel_floatValue = objc.registerName("floatValue"); +late final _sel_flushCachedData = objc.registerName("flushCachedData"); +late final _sel_flushHostCache = objc.registerName("flushHostCache"); late final _sel_forwardInvocation_ = objc.registerName("forwardInvocation:"); late final _sel_forwardingTargetForSelector_ = objc.registerName( "forwardingTargetForSelector:", @@ -42425,13 +46027,17 @@ late final _sel_forwardingTargetForSelector_ = objc.registerName( late final _sel_fractionCompleted = objc.registerName("fractionCompleted"); late final _sel_fragment = objc.registerName("fragment"); late final _sel_frameLength = objc.registerName("frameLength"); +late final _sel_function = objc.registerName("function"); late final _sel_getArgumentTypeAtIndex_ = objc.registerName( "getArgumentTypeAtIndex:", ); late final _sel_getArgument_atIndex_ = objc.registerName( "getArgument:atIndex:", ); +late final _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_ = objc + .registerName("getBoundStreamsWithBufferSize:inputStream:outputStream:"); late final _sel_getBuffer_length_ = objc.registerName("getBuffer:length:"); +late final _sel_getBytes_ = objc.registerName("getBytes:"); late final _sel_getBytes_length_ = objc.registerName("getBytes:length:"); late final _sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_ = objc.registerName( @@ -42439,15 +46045,25 @@ late final _sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRa ); late final _sel_getBytes_range_ = objc.registerName("getBytes:range:"); late final _sel_getCFRunLoop = objc.registerName("getCFRunLoop"); +late final _sel_getCString_ = objc.registerName("getCString:"); +late final _sel_getCString_maxLength_ = objc.registerName( + "getCString:maxLength:", +); late final _sel_getCString_maxLength_encoding_ = objc.registerName( "getCString:maxLength:encoding:", ); +late final _sel_getCString_maxLength_range_remainingRange_ = objc.registerName( + "getCString:maxLength:range:remainingRange:", +); +late final _sel_getCharacters_ = objc.registerName("getCharacters:"); late final _sel_getCharacters_range_ = objc.registerName( "getCharacters:range:", ); late final _sel_getDOBJCDartProtocolMethodForSelector_ = objc.registerName( "getDOBJCDartProtocolMethodForSelector:", ); +late final _sel_getFileProviderServicesForItemAtURL_completionHandler_ = objc + .registerName("getFileProviderServicesForItemAtURL:completionHandler:"); late final _sel_getFileSystemRepresentation_maxLength_ = objc.registerName( "getFileSystemRepresentation:maxLength:", ); @@ -42457,6 +46073,10 @@ late final _sel_getIndexes_maxCount_inIndexRange_ = objc.registerName( late final _sel_getLineStart_end_contentsEnd_forRange_ = objc.registerName( "getLineStart:end:contentsEnd:forRange:", ); +late final _sel_getNonlocalVersionsOfItemAtURL_completionHandler_ = objc + .registerName("getNonlocalVersionsOfItemAtURL:completionHandler:"); +late final _sel_getObjects_ = objc.registerName("getObjects:"); +late final _sel_getObjects_andKeys_ = objc.registerName("getObjects:andKeys:"); late final _sel_getObjects_andKeys_count_ = objc.registerName( "getObjects:andKeys:count:", ); @@ -42464,34 +46084,81 @@ late final _sel_getObjects_range_ = objc.registerName("getObjects:range:"); late final _sel_getParagraphStart_end_contentsEnd_forRange_ = objc.registerName( "getParagraphStart:end:contentsEnd:forRange:", ); +late final _sel_getPromisedItemResourceValue_forKey_error_ = objc.registerName( + "getPromisedItemResourceValue:forKey:error:", +); +late final _sel_getRelationship_ofDirectoryAtURL_toItemAtURL_error_ = objc + .registerName("getRelationship:ofDirectoryAtURL:toItemAtURL:error:"); +late final _sel_getRelationship_ofDirectory_inDomain_toItemAtURL_error_ = objc + .registerName("getRelationship:ofDirectory:inDomain:toItemAtURL:error:"); late final _sel_getResourceValue_forKey_error_ = objc.registerName( "getResourceValue:forKey:error:", ); late final _sel_getReturnValue_ = objc.registerName("getReturnValue:"); +late final _sel_getStreamsToHostWithName_port_inputStream_outputStream_ = objc + .registerName("getStreamsToHostWithName:port:inputStream:outputStream:"); +late final _sel_getStreamsToHost_port_inputStream_outputStream_ = objc + .registerName("getStreamsToHost:port:inputStream:outputStream:"); +late final _sel_getValue_ = objc.registerName("getValue:"); late final _sel_getValue_size_ = objc.registerName("getValue:size:"); +late final _sel_givenName = objc.registerName("givenName"); +late final _sel_groupingSeparator = objc.registerName("groupingSeparator"); late final _sel_handlePortMessage_ = objc.registerName("handlePortMessage:"); +late final _sel_handleQueryWithUnboundKey_ = objc.registerName( + "handleQueryWithUnboundKey:", +); +late final _sel_handleTakeValue_forUnboundKey_ = objc.registerName( + "handleTakeValue:forUnboundKey:", +); late final _sel_hasBytesAvailable = objc.registerName("hasBytesAvailable"); late final _sel_hasChanges = objc.registerName("hasChanges"); late final _sel_hasDirectoryPath = objc.registerName("hasDirectoryPath"); late final _sel_hasItemConformingToTypeIdentifier_ = objc.registerName( "hasItemConformingToTypeIdentifier:", ); +late final _sel_hasLocalContents = objc.registerName("hasLocalContents"); late final _sel_hasMemberInPlane_ = objc.registerName("hasMemberInPlane:"); +late final _sel_hasOrderedToManyRelationshipForKey_ = objc.registerName( + "hasOrderedToManyRelationshipForKey:", +); late final _sel_hasPrefix_ = objc.registerName("hasPrefix:"); +late final _sel_hasPropertyForKey_ = objc.registerName("hasPropertyForKey:"); +late final _sel_hasReadablePropertyForKey_ = objc.registerName( + "hasReadablePropertyForKey:", +); late final _sel_hasRepresentationConformingToTypeIdentifier_fileOptions_ = objc .registerName("hasRepresentationConformingToTypeIdentifier:fileOptions:"); late final _sel_hasSpaceAvailable = objc.registerName("hasSpaceAvailable"); late final _sel_hasSuffix_ = objc.registerName("hasSuffix:"); +late final _sel_hasThumbnail = objc.registerName("hasThumbnail"); +late final _sel_hasWritablePropertyForKey_ = objc.registerName( + "hasWritablePropertyForKey:", +); late final _sel_hash = objc.registerName("hash"); late final _sel_helpAnchor = objc.registerName("helpAnchor"); late final _sel_holderWithInputStreamAdapter_ = objc.registerName( "holderWithInputStreamAdapter:", ); +late final _sel_homeDirectoryForCurrentUser = objc.registerName( + "homeDirectoryForCurrentUser", +); +late final _sel_homeDirectoryForUser_ = objc.registerName( + "homeDirectoryForUser:", +); late final _sel_host = objc.registerName("host"); +late final _sel_hostWithAddress_ = objc.registerName("hostWithAddress:"); +late final _sel_hostWithName_ = objc.registerName("hostWithName:"); +late final _sel_hourOfDay = objc.registerName("hourOfDay"); late final _sel_illegalCharacterSet = objc.registerName("illegalCharacterSet"); late final _sel_implementMethod_withBlock_withTrampoline_withSignature_ = objc .registerName("implementMethod:withBlock:withTrampoline:withSignature:"); +late final _sel_implementationClassName = objc.registerName( + "implementationClassName", +); late final _sel_increaseLengthBy_ = objc.registerName("increaseLengthBy:"); +late final _sel_independentConversationQueueing = objc.registerName( + "independentConversationQueueing", +); late final _sel_index = objc.registerName("index"); late final _sel_indexGreaterThanIndex_ = objc.registerName( "indexGreaterThanIndex:", @@ -42551,6 +46218,10 @@ late final _sel_indexesPassingTest_ = objc.registerName("indexesPassingTest:"); late final _sel_indexesWithOptions_passingTest_ = objc.registerName( "indexesWithOptions:passingTest:", ); +late final _sel_indicesOfObjectsByEvaluatingObjectSpecifier_ = objc + .registerName("indicesOfObjectsByEvaluatingObjectSpecifier:"); +late final _sel_indicesOfObjectsByEvaluatingWithContainer_count_ = objc + .registerName("indicesOfObjectsByEvaluatingWithContainer:count:"); late final _sel_infoDictionary = objc.registerName("infoDictionary"); late final _sel_init = objc.registerName("init"); late final _sel_initAbsoluteURLWithDataRepresentation_relativeToURL_ = objc @@ -42580,6 +46251,16 @@ late final _sel_initFileURLWithPath_relativeToURL_ = objc.registerName( ); late final _sel_initForKeyPath_ofObject_withObserver_options_context_ = objc .registerName("initForKeyPath:ofObject:withObserver:options:context:"); +late final _sel_initForWritingWithMutableData_ = objc.registerName( + "initForWritingWithMutableData:", +); +late final _sel_initListDescriptor = objc.registerName("initListDescriptor"); +late final _sel_initRecordDescriptor = objc.registerName( + "initRecordDescriptor", +); +late final _sel_initRequiringSecureCoding_ = objc.registerName( + "initRequiringSecureCoding:", +); late final _sel_initToBuffer_capacity_ = objc.registerName( "initToBuffer:capacity:", ); @@ -42587,6 +46268,9 @@ late final _sel_initToFileAtPath_append_ = objc.registerName( "initToFileAtPath:append:", ); late final _sel_initToMemory = objc.registerName("initToMemory"); +late final _sel_initWithAEDescNoCopy_ = objc.registerName( + "initWithAEDescNoCopy:", +); late final _sel_initWithArray_ = objc.registerName("initWithArray:"); late final _sel_initWithArray_copyItems_ = objc.registerName( "initWithArray:copyItems:", @@ -42603,6 +46287,10 @@ late final _sel_initWithBase64EncodedData_options_ = objc.registerName( late final _sel_initWithBase64EncodedString_options_ = objc.registerName( "initWithBase64EncodedString:options:", ); +late final _sel_initWithBase64Encoding_ = objc.registerName( + "initWithBase64Encoding:", +); +late final _sel_initWithBlock_ = objc.registerName("initWithBlock:"); late final _sel_initWithBool_ = objc.registerName("initWithBool:"); late final _sel_initWithBytesNoCopy_length_ = objc.registerName( "initWithBytesNoCopy:length:", @@ -42626,9 +46314,16 @@ late final _sel_initWithBytes_length_encoding_ = objc.registerName( late final _sel_initWithBytes_objCType_ = objc.registerName( "initWithBytes:objCType:", ); +late final _sel_initWithCStringNoCopy_length_freeWhenDone_ = objc.registerName( + "initWithCStringNoCopy:length:freeWhenDone:", +); +late final _sel_initWithCString_ = objc.registerName("initWithCString:"); late final _sel_initWithCString_encoding_ = objc.registerName( "initWithCString:encoding:", ); +late final _sel_initWithCString_length_ = objc.registerName( + "initWithCString:length:", +); late final _sel_initWithCapacity_ = objc.registerName("initWithCapacity:"); late final _sel_initWithChanges_ = objc.registerName("initWithChanges:"); late final _sel_initWithChar_ = objc.registerName("initWithChar:"); @@ -42641,6 +46336,14 @@ late final _sel_initWithCharacters_length_ = objc.registerName( ); late final _sel_initWithClassName_ = objc.registerName("initWithClassName:"); late final _sel_initWithCoder_ = objc.registerName("initWithCoder:"); +late final _sel_initWithCommandDescription_ = objc.registerName( + "initWithCommandDescription:", +); +late final _sel_initWithContainerClassDescription_containerSpecifier_key_ = objc + .registerName("initWithContainerClassDescription:containerSpecifier:key:"); +late final _sel_initWithContainerSpecifier_key_ = objc.registerName( + "initWithContainerSpecifier:key:", +); late final _sel_initWithContentsOfFile_ = objc.registerName( "initWithContentsOfFile:", ); @@ -42653,6 +46356,9 @@ late final _sel_initWithContentsOfFile_options_error_ = objc.registerName( late final _sel_initWithContentsOfFile_usedEncoding_error_ = objc.registerName( "initWithContentsOfFile:usedEncoding:error:", ); +late final _sel_initWithContentsOfMappedFile_ = objc.registerName( + "initWithContentsOfMappedFile:", +); late final _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_ = objc.registerName( "initWithContentsOfMarkdownFileAtURL:options:baseURL:error:", @@ -42663,6 +46369,9 @@ late final _sel_initWithContentsOfURL_ = objc.registerName( late final _sel_initWithContentsOfURL_encoding_error_ = objc.registerName( "initWithContentsOfURL:encoding:error:", ); +late final _sel_initWithContentsOfURL_error_ = objc.registerName( + "initWithContentsOfURL:error:", +); late final _sel_initWithContentsOfURL_options_error_ = objc.registerName( "initWithContentsOfURL:options:error:", ); @@ -42676,6 +46385,12 @@ late final _sel_initWithData_ = objc.registerName("initWithData:"); late final _sel_initWithData_encoding_ = objc.registerName( "initWithData:encoding:", ); +late final _sel_initWithDescriptorType_bytes_length_ = objc.registerName( + "initWithDescriptorType:bytes:length:", +); +late final _sel_initWithDescriptorType_data_ = objc.registerName( + "initWithDescriptorType:data:", +); late final _sel_initWithDictionary_ = objc.registerName("initWithDictionary:"); late final _sel_initWithDictionary_copyItems_ = objc.registerName( "initWithDictionary:copyItems:", @@ -42683,7 +46398,17 @@ late final _sel_initWithDictionary_copyItems_ = objc.registerName( late final _sel_initWithDomain_code_userInfo_ = objc.registerName( "initWithDomain:code:userInfo:", ); +late final _sel_initWithDominantScript_languageMap_ = objc.registerName( + "initWithDominantScript:languageMap:", +); late final _sel_initWithDouble_ = objc.registerName("initWithDouble:"); +late final _sel_initWithEventClass_eventID_targetDescriptor_returnID_transactionID_ = + objc.registerName( + "initWithEventClass:eventID:targetDescriptor:returnID:transactionID:", + ); +late final _sel_initWithExpressionType_ = objc.registerName( + "initWithExpressionType:", +); late final _sel_initWithFileAtPath_ = objc.registerName("initWithFileAtPath:"); late final _sel_initWithFireDate_interval_repeats_block_ = objc.registerName( "initWithFireDate:interval:repeats:block:", @@ -42722,6 +46447,9 @@ late final _sel_initWithItem_typeIdentifier_ = objc.registerName( "initWithItem:typeIdentifier:", ); late final _sel_initWithLength_ = objc.registerName("initWithLength:"); +late final _sel_initWithLocal_connection_ = objc.registerName( + "initWithLocal:connection:", +); late final _sel_initWithLocaleIdentifier_ = objc.registerName( "initWithLocaleIdentifier:", ); @@ -42732,9 +46460,14 @@ late final _sel_initWithMarkdownString_options_baseURL_error_ = objc late final _sel_initWithMarkdown_options_baseURL_error_ = objc.registerName( "initWithMarkdown:options:baseURL:error:", ); +late final _sel_initWithName_ = objc.registerName("initWithName:"); +late final _sel_initWithName_data_ = objc.registerName("initWithName:data:"); late final _sel_initWithName_object_userInfo_ = objc.registerName( "initWithName:object:userInfo:", ); +late final _sel_initWithName_reason_userInfo_ = objc.registerName( + "initWithName:reason:userInfo:", +); late final _sel_initWithObject_ = objc.registerName("initWithObject:"); late final _sel_initWithObject_type_index_ = objc.registerName( "initWithObject:type:index:", @@ -42766,6 +46499,15 @@ late final _sel_initWithParent_userInfo_ = objc.registerName( "initWithParent:userInfo:", ); late final _sel_initWithPath_ = objc.registerName("initWithPath:"); +late final _sel_initWithReceivePort_sendPort_ = objc.registerName( + "initWithReceivePort:sendPort:", +); +late final _sel_initWithReceivePort_sendPort_components_ = objc.registerName( + "initWithReceivePort:sendPort:components:", +); +late final _sel_initWithScheme_host_path_ = objc.registerName( + "initWithScheme:host:path:", +); late final _sel_initWithSendPort_receivePort_components_ = objc.registerName( "initWithSendPort:receivePort:components:", ); @@ -42778,12 +46520,30 @@ late final _sel_initWithString_ = objc.registerName("initWithString:"); late final _sel_initWithString_attributes_ = objc.registerName( "initWithString:attributes:", ); +late final _sel_initWithString_calendarFormat_ = objc.registerName( + "initWithString:calendarFormat:", +); +late final _sel_initWithString_calendarFormat_locale_ = objc.registerName( + "initWithString:calendarFormat:locale:", +); late final _sel_initWithString_encodingInvalidCharacters_ = objc.registerName( "initWithString:encodingInvalidCharacters:", ); late final _sel_initWithString_relativeToURL_ = objc.registerName( "initWithString:relativeToURL:", ); +late final _sel_initWithSuiteName_className_dictionary_ = objc.registerName( + "initWithSuiteName:className:dictionary:", +); +late final _sel_initWithSuiteName_commandName_dictionary_ = objc.registerName( + "initWithSuiteName:commandName:dictionary:", +); +late final _sel_initWithTarget_connection_ = objc.registerName( + "initWithTarget:connection:", +); +late final _sel_initWithTarget_selector_object_ = objc.registerName( + "initWithTarget:selector:object:", +); late final _sel_initWithTimeIntervalSince1970_ = objc.registerName( "initWithTimeIntervalSince1970:", ); @@ -42798,6 +46558,7 @@ late final _sel_initWithTimeInterval_sinceDate_ = objc.registerName( ); late final _sel_initWithURL_ = objc.registerName("initWithURL:"); late final _sel_initWithURL_append_ = objc.registerName("initWithURL:append:"); +late final _sel_initWithURL_cached_ = objc.registerName("initWithURL:cached:"); late final _sel_initWithUTF8String_ = objc.registerName("initWithUTF8String:"); late final _sel_initWithUnsignedChar_ = objc.registerName( "initWithUnsignedChar:", @@ -42823,6 +46584,8 @@ late final _sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_ = objc.registerName( "initWithValidatedFormat:validFormatSpecifiers:locale:error:", ); +late final _sel_initWithYear_month_day_hour_minute_second_timeZone_ = objc + .registerName("initWithYear:month:day:hour:minute:second:timeZone:"); late final _sel_initialize = objc.registerName("initialize"); late final _sel_inputStreamWithData_ = objc.registerName( "inputStreamWithData:", @@ -42834,12 +46597,24 @@ late final _sel_inputStreamWithPort_ = objc.registerName( "inputStreamWithPort:", ); late final _sel_inputStreamWithURL_ = objc.registerName("inputStreamWithURL:"); +late final _sel_insertDescriptor_atIndex_ = objc.registerName( + "insertDescriptor:atIndex:", +); late final _sel_insertObject_atIndex_ = objc.registerName( "insertObject:atIndex:", ); late final _sel_insertObjects_atIndexes_ = objc.registerName( "insertObjects:atIndexes:", ); +late final _sel_insertString_atIndex_ = objc.registerName( + "insertString:atIndex:", +); +late final _sel_insertValue_atIndex_inPropertyWithKey_ = objc.registerName( + "insertValue:atIndex:inPropertyWithKey:", +); +late final _sel_insertValue_inPropertyWithKey_ = objc.registerName( + "insertValue:inPropertyWithKey:", +); late final _sel_insertions = objc.registerName("insertions"); late final _sel_instanceMethodForSelector_ = objc.registerName( "instanceMethodForSelector:", @@ -42850,6 +46625,7 @@ late final _sel_instanceMethodSignatureForSelector_ = objc.registerName( late final _sel_instancesRespondToSelector_ = objc.registerName( "instancesRespondToSelector:", ); +late final _sel_int32Value = objc.registerName("int32Value"); late final _sel_intValue = objc.registerName("intValue"); late final _sel_integerValue = objc.registerName("integerValue"); late final _sel_interpretedSyntax = objc.registerName("interpretedSyntax"); @@ -42865,23 +46641,54 @@ late final _sel_intersectsOrderedSet_ = objc.registerName( ); late final _sel_intersectsSet_ = objc.registerName("intersectsSet:"); late final _sel_invalidate = objc.registerName("invalidate"); +late final _sel_invalidateClassDescriptionCache = objc.registerName( + "invalidateClassDescriptionCache", +); late final _sel_inverseDifference = objc.registerName("inverseDifference"); +late final _sel_inverseForRelationshipKey_ = objc.registerName( + "inverseForRelationshipKey:", +); late final _sel_invertedSet = objc.registerName("invertedSet"); +late final _sel_invocation = objc.registerName("invocation"); late final _sel_invocationWithMethodSignature_ = objc.registerName( "invocationWithMethodSignature:", ); late final _sel_invoke = objc.registerName("invoke"); late final _sel_invokeUsingIMP_ = objc.registerName("invokeUsingIMP:"); late final _sel_invokeWithTarget_ = objc.registerName("invokeWithTarget:"); +late final _sel_isAbsolutePath = objc.registerName("isAbsolutePath"); late final _sel_isBool = objc.registerName("isBool"); +late final _sel_isBycopy = objc.registerName("isBycopy"); +late final _sel_isByref = objc.registerName("isByref"); late final _sel_isCancellable = objc.registerName("isCancellable"); late final _sel_isCancelled = objc.registerName("isCancelled"); +late final _sel_isCaseInsensitiveLike_ = objc.registerName( + "isCaseInsensitiveLike:", +); +late final _sel_isConflict = objc.registerName("isConflict"); +late final _sel_isDaylightSavingTime = objc.registerName( + "isDaylightSavingTime", +); +late final _sel_isDaylightSavingTimeForDate_ = objc.registerName( + "isDaylightSavingTimeForDate:", +); +late final _sel_isDeletableFileAtPath_ = objc.registerName( + "isDeletableFileAtPath:", +); +late final _sel_isDiscardable = objc.registerName("isDiscardable"); +late final _sel_isEnumeratingDirectoryPostOrder = objc.registerName( + "isEnumeratingDirectoryPostOrder", +); late final _sel_isEqualToArray_ = objc.registerName("isEqualToArray:"); +late final _sel_isEqualToAttributedString_ = objc.registerName( + "isEqualToAttributedString:", +); late final _sel_isEqualToData_ = objc.registerName("isEqualToData:"); late final _sel_isEqualToDate_ = objc.registerName("isEqualToDate:"); late final _sel_isEqualToDictionary_ = objc.registerName( "isEqualToDictionary:", ); +late final _sel_isEqualToHost_ = objc.registerName("isEqualToHost:"); late final _sel_isEqualToIndexSet_ = objc.registerName("isEqualToIndexSet:"); late final _sel_isEqualToNumber_ = objc.registerName("isEqualToNumber:"); late final _sel_isEqualToOrderedSet_ = objc.registerName( @@ -42889,32 +46696,80 @@ late final _sel_isEqualToOrderedSet_ = objc.registerName( ); late final _sel_isEqualToSet_ = objc.registerName("isEqualToSet:"); late final _sel_isEqualToString_ = objc.registerName("isEqualToString:"); +late final _sel_isEqualToTimeZone_ = objc.registerName("isEqualToTimeZone:"); +late final _sel_isEqualToValue_ = objc.registerName("isEqualToValue:"); +late final _sel_isEqualTo_ = objc.registerName("isEqualTo:"); late final _sel_isEqual_ = objc.registerName("isEqual:"); +late final _sel_isExecutableFileAtPath_ = objc.registerName( + "isExecutableFileAtPath:", +); +late final _sel_isExecuting = objc.registerName("isExecuting"); late final _sel_isFileReferenceURL = objc.registerName("isFileReferenceURL"); late final _sel_isFileURL = objc.registerName("isFileURL"); late final _sel_isFinished = objc.registerName("isFinished"); late final _sel_isFloat = objc.registerName("isFloat"); +late final _sel_isGreaterThanOrEqualTo_ = objc.registerName( + "isGreaterThanOrEqualTo:", +); +late final _sel_isGreaterThan_ = objc.registerName("isGreaterThan:"); +late final _sel_isHostCacheEnabled = objc.registerName("isHostCacheEnabled"); late final _sel_isIndeterminate = objc.registerName("isIndeterminate"); late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); +late final _sel_isLessThanOrEqualTo_ = objc.registerName( + "isLessThanOrEqualTo:", +); +late final _sel_isLessThan_ = objc.registerName("isLessThan:"); +late final _sel_isLike_ = objc.registerName("isLike:"); late final _sel_isLoaded = objc.registerName("isLoaded"); +late final _sel_isLocationRequiredToCreateForKey_ = objc.registerName( + "isLocationRequiredToCreateForKey:", +); +late final _sel_isMainThread = objc.registerName("isMainThread"); late final _sel_isMemberOfClass_ = objc.registerName("isMemberOfClass:"); +late final _sel_isMultiThreaded = objc.registerName("isMultiThreaded"); +late final _sel_isNotEqualTo_ = objc.registerName("isNotEqualTo:"); late final _sel_isOld = objc.registerName("isOld"); late final _sel_isOneway = objc.registerName("isOneway"); +late final _sel_isOptionalArgumentWithName_ = objc.registerName( + "isOptionalArgumentWithName:", +); late final _sel_isPausable = objc.registerName("isPausable"); late final _sel_isPaused = objc.registerName("isPaused"); late final _sel_isProxy = objc.registerName("isProxy"); +late final _sel_isReadOnlyKey_ = objc.registerName("isReadOnlyKey:"); +late final _sel_isReadableFileAtPath_ = objc.registerName( + "isReadableFileAtPath:", +); +late final _sel_isRecordDescriptor = objc.registerName("isRecordDescriptor"); +late final _sel_isResolved = objc.registerName("isResolved"); late final _sel_isSubclassOfClass_ = objc.registerName("isSubclassOfClass:"); late final _sel_isSubsetOfOrderedSet_ = objc.registerName( "isSubsetOfOrderedSet:", ); late final _sel_isSubsetOfSet_ = objc.registerName("isSubsetOfSet:"); late final _sel_isSupersetOfSet_ = objc.registerName("isSupersetOfSet:"); +late final _sel_isUbiquitousItemAtURL_ = objc.registerName( + "isUbiquitousItemAtURL:", +); late final _sel_isValid = objc.registerName("isValid"); +late final _sel_isWellFormed = objc.registerName("isWellFormed"); +late final _sel_isWritableFileAtPath_ = objc.registerName( + "isWritableFileAtPath:", +); late final _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_ = objc.registerName( "itemProviderVisibilityForRepresentationWithTypeIdentifier:", ); +late final _sel_key = objc.registerName("key"); +late final _sel_keyClassDescription = objc.registerName("keyClassDescription"); late final _sel_keyEnumerator = objc.registerName("keyEnumerator"); +late final _sel_keyPath = objc.registerName("keyPath"); +late final _sel_keyPathsForValuesAffectingValueForKey_ = objc.registerName( + "keyPathsForValuesAffectingValueForKey:", +); +late final _sel_keyWithAppleEventCode_ = objc.registerName( + "keyWithAppleEventCode:", +); late final _sel_keysOfEntriesPassingTest_ = objc.registerName( "keysOfEntriesPassingTest:", ); @@ -42929,18 +46784,45 @@ late final _sel_keysSortedByValueUsingSelector_ = objc.registerName( ); late final _sel_keysSortedByValueWithOptions_usingComparator_ = objc .registerName("keysSortedByValueWithOptions:usingComparator:"); +late final _sel_keywordForDescriptorAtIndex_ = objc.registerName( + "keywordForDescriptorAtIndex:", +); late final _sel_kind = objc.registerName("kind"); +late final _sel_knownTimeZoneNames = objc.registerName("knownTimeZoneNames"); late final _sel_languageCode = objc.registerName("languageCode"); +late final _sel_languageIdentifier = objc.registerName("languageIdentifier"); +late final _sel_languageMap = objc.registerName("languageMap"); +late final _sel_languagesForScript_ = objc.registerName("languagesForScript:"); late final _sel_lastIndex = objc.registerName("lastIndex"); late final _sel_lastObject = objc.registerName("lastObject"); +late final _sel_lastPathComponent = objc.registerName("lastPathComponent"); late final _sel_laterDate_ = objc.registerName("laterDate:"); +late final _sel_leftExpression = objc.registerName("leftExpression"); late final _sel_length = objc.registerName("length"); late final _sel_lengthOfBytesUsingEncoding_ = objc.registerName( "lengthOfBytesUsingEncoding:", ); late final _sel_letterCharacterSet = objc.registerName("letterCharacterSet"); +late final _sel_level = objc.registerName("level"); late final _sel_limitDateForMode_ = objc.registerName("limitDateForMode:"); +late final _sel_lineDirectionForLanguage_ = objc.registerName( + "lineDirectionForLanguage:", +); late final _sel_lineRangeForRange_ = objc.registerName("lineRangeForRange:"); +late final _sel_linguisticTagsInRange_scheme_options_orthography_tokenRanges_ = + objc.registerName( + "linguisticTagsInRange:scheme:options:orthography:tokenRanges:", + ); +late final _sel_linkItemAtPath_toPath_error_ = objc.registerName( + "linkItemAtPath:toPath:error:", +); +late final _sel_linkItemAtURL_toURL_error_ = objc.registerName( + "linkItemAtURL:toURL:error:", +); +late final _sel_linkPath_toPath_handler_ = objc.registerName( + "linkPath:toPath:handler:", +); +late final _sel_listDescriptor = objc.registerName("listDescriptor"); late final _sel_load = objc.registerName("load"); late final _sel_loadAndReturnError_ = objc.registerName("loadAndReturnError:"); late final _sel_loadDataRepresentationForTypeIdentifier_completionHandler_ = @@ -42955,6 +46837,8 @@ late final _sel_loadFileRepresentationForTypeIdentifier_completionHandler_ = objc.registerName( "loadFileRepresentationForTypeIdentifier:completionHandler:", ); +late final _sel_loadInBackground = objc.registerName("loadInBackground"); +late final _sel_loadInForeground = objc.registerName("loadInForeground"); late final _sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_ = objc.registerName( "loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:", @@ -42964,6 +46848,20 @@ late final _sel_loadItemForTypeIdentifier_options_completionHandler_ = objc late final _sel_loadObjectOfClass_completionHandler_ = objc.registerName( "loadObjectOfClass:completionHandler:", ); +late final _sel_loadPreviewImageWithOptions_completionHandler_ = objc + .registerName("loadPreviewImageWithOptions:completionHandler:"); +late final _sel_loadResourceDataNotifyingClient_usingCache_ = objc.registerName( + "loadResourceDataNotifyingClient:usingCache:", +); +late final _sel_localObjects = objc.registerName("localObjects"); +late final _sel_localTimeZone = objc.registerName("localTimeZone"); +late final _sel_localeIdentifier = objc.registerName("localeIdentifier"); +late final _sel_localeIdentifierFromComponents_ = objc.registerName( + "localeIdentifierFromComponents:", +); +late final _sel_localeIdentifierFromWindowsLocaleCode_ = objc.registerName( + "localeIdentifierFromWindowsLocaleCode:", +); late final _sel_localeWithLocaleIdentifier_ = objc.registerName( "localeWithLocaleIdentifier:", ); @@ -43004,9 +46902,16 @@ late final _sel_localizedInfoDictionary = objc.registerName( late final _sel_localizedLowercaseString = objc.registerName( "localizedLowercaseString", ); +late final _sel_localizedName = objc.registerName("localizedName"); +late final _sel_localizedNameOfSavingComputer = objc.registerName( + "localizedNameOfSavingComputer", +); late final _sel_localizedNameOfStringEncoding_ = objc.registerName( "localizedNameOfStringEncoding:", ); +late final _sel_localizedName_locale_ = objc.registerName( + "localizedName:locale:", +); late final _sel_localizedRecoveryOptions = objc.registerName( "localizedRecoveryOptions", ); @@ -43022,9 +46927,36 @@ late final _sel_localizedStandardContainsString_ = objc.registerName( late final _sel_localizedStandardRangeOfString_ = objc.registerName( "localizedStandardRangeOfString:", ); +late final _sel_localizedStringForCalendarIdentifier_ = objc.registerName( + "localizedStringForCalendarIdentifier:", +); +late final _sel_localizedStringForCollationIdentifier_ = objc.registerName( + "localizedStringForCollationIdentifier:", +); +late final _sel_localizedStringForCollatorIdentifier_ = objc.registerName( + "localizedStringForCollatorIdentifier:", +); +late final _sel_localizedStringForCountryCode_ = objc.registerName( + "localizedStringForCountryCode:", +); +late final _sel_localizedStringForCurrencyCode_ = objc.registerName( + "localizedStringForCurrencyCode:", +); late final _sel_localizedStringForKey_value_table_ = objc.registerName( "localizedStringForKey:value:table:", ); +late final _sel_localizedStringForLanguageCode_ = objc.registerName( + "localizedStringForLanguageCode:", +); +late final _sel_localizedStringForLocaleIdentifier_ = objc.registerName( + "localizedStringForLocaleIdentifier:", +); +late final _sel_localizedStringForScriptCode_ = objc.registerName( + "localizedStringForScriptCode:", +); +late final _sel_localizedStringForVariantCode_ = objc.registerName( + "localizedStringForVariantCode:", +); late final _sel_localizedStringWithFormat_ = objc.registerName( "localizedStringWithFormat:", ); @@ -43040,6 +46972,7 @@ late final _sel_longCharacterIsMember_ = objc.registerName( ); late final _sel_longLongValue = objc.registerName("longLongValue"); late final _sel_longValue = objc.registerName("longValue"); +late final _sel_lossyCString = objc.registerName("lossyCString"); late final _sel_lowercaseLetterCharacterSet = objc.registerName( "lowercaseLetterCharacterSet", ); @@ -43047,14 +46980,22 @@ late final _sel_lowercaseString = objc.registerName("lowercaseString"); late final _sel_lowercaseStringWithLocale_ = objc.registerName( "lowercaseStringWithLocale:", ); +late final _sel_main = objc.registerName("main"); late final _sel_mainBundle = objc.registerName("mainBundle"); late final _sel_mainRunLoop = objc.registerName("mainRunLoop"); +late final _sel_mainThread = objc.registerName("mainThread"); +late final _sel_makeNewConnection_sender_ = objc.registerName( + "makeNewConnection:sender:", +); late final _sel_makeObjectsPerformSelector_ = objc.registerName( "makeObjectsPerformSelector:", ); late final _sel_makeObjectsPerformSelector_withObject_ = objc.registerName( "makeObjectsPerformSelector:withObject:", ); +late final _sel_matchesAppleEventCode_ = objc.registerName( + "matchesAppleEventCode:", +); late final _sel_maximumLengthOfBytesUsingEncoding_ = objc.registerName( "maximumLengthOfBytesUsingEncoding:", ); @@ -43066,30 +47007,86 @@ late final _sel_methodSignature = objc.registerName("methodSignature"); late final _sel_methodSignatureForSelector_ = objc.registerName( "methodSignatureForSelector:", ); +late final _sel_middleName = objc.registerName("middleName"); late final _sel_minusOrderedSet_ = objc.registerName("minusOrderedSet:"); late final _sel_minusSet_ = objc.registerName("minusSet:"); +late final _sel_minuteOfHour = objc.registerName("minuteOfHour"); +late final _sel_modificationDate = objc.registerName("modificationDate"); +late final _sel_monthOfYear = objc.registerName("monthOfYear"); +late final _sel_mountedVolumeURLsIncludingResourceValuesForKeys_options_ = objc + .registerName("mountedVolumeURLsIncludingResourceValuesForKeys:options:"); +late final _sel_moveItemAtPath_toPath_error_ = objc.registerName( + "moveItemAtPath:toPath:error:", +); +late final _sel_moveItemAtURL_toURL_error_ = objc.registerName( + "moveItemAtURL:toURL:error:", +); late final _sel_moveObjectsAtIndexes_toIndex_ = objc.registerName( "moveObjectsAtIndexes:toIndex:", ); +late final _sel_movePath_toPath_handler_ = objc.registerName( + "movePath:toPath:handler:", +); late final _sel_msgid = objc.registerName("msgid"); +late final _sel_multipleThreadsEnabled = objc.registerName( + "multipleThreadsEnabled", +); +late final _sel_mutableArrayValueForKeyPath_ = objc.registerName( + "mutableArrayValueForKeyPath:", +); +late final _sel_mutableArrayValueForKey_ = objc.registerName( + "mutableArrayValueForKey:", +); late final _sel_mutableBytes = objc.registerName("mutableBytes"); late final _sel_mutableCopy = objc.registerName("mutableCopy"); late final _sel_mutableCopyWithZone_ = objc.registerName( "mutableCopyWithZone:", ); +late final _sel_mutableOrderedSetValueForKeyPath_ = objc.registerName( + "mutableOrderedSetValueForKeyPath:", +); +late final _sel_mutableOrderedSetValueForKey_ = objc.registerName( + "mutableOrderedSetValueForKey:", +); +late final _sel_mutableSetValueForKeyPath_ = objc.registerName( + "mutableSetValueForKeyPath:", +); +late final _sel_mutableSetValueForKey_ = objc.registerName( + "mutableSetValueForKey:", +); late final _sel_name = objc.registerName("name"); +late final _sel_namePrefix = objc.registerName("namePrefix"); +late final _sel_nameSuffix = objc.registerName("nameSuffix"); +late final _sel_names = objc.registerName("names"); late final _sel_new = objc.registerName("new"); +late final _sel_newScriptingObjectOfClass_forValueForKey_withContentsValue_properties_ = + objc.registerName( + "newScriptingObjectOfClass:forValueForKey:withContentsValue:properties:", + ); late final _sel_newlineCharacterSet = objc.registerName("newlineCharacterSet"); +late final _sel_nextDaylightSavingTimeTransition = objc.registerName( + "nextDaylightSavingTimeTransition", +); +late final _sel_nextDaylightSavingTimeTransitionAfterDate_ = objc.registerName( + "nextDaylightSavingTimeTransitionAfterDate:", +); late final _sel_nextObject = objc.registerName("nextObject"); +late final _sel_nickname = objc.registerName("nickname"); late final _sel_nonBaseCharacterSet = objc.registerName("nonBaseCharacterSet"); +late final _sel_nonretainedObjectValue = objc.registerName( + "nonretainedObjectValue", +); late final _sel_notificationWithName_object_ = objc.registerName( "notificationWithName:object:", ); late final _sel_notificationWithName_object_userInfo_ = objc.registerName( "notificationWithName:object:userInfo:", ); +late final _sel_now = objc.registerName("now"); late final _sel_null = objc.registerName("null"); +late final _sel_nullDescriptor = objc.registerName("nullDescriptor"); late final _sel_numberOfArguments = objc.registerName("numberOfArguments"); +late final _sel_numberOfItems = objc.registerName("numberOfItems"); late final _sel_numberWithBool_ = objc.registerName("numberWithBool:"); late final _sel_numberWithChar_ = objc.registerName("numberWithChar:"); late final _sel_numberWithDouble_ = objc.registerName("numberWithDouble:"); @@ -43131,7 +47128,18 @@ late final _sel_objectForKey_ = objc.registerName("objectForKey:"); late final _sel_objectForKeyedSubscript_ = objc.registerName( "objectForKeyedSubscript:", ); +late final _sel_objectSpecifier = objc.registerName("objectSpecifier"); +late final _sel_objectSpecifierWithDescriptor_ = objc.registerName( + "objectSpecifierWithDescriptor:", +); +late final _sel_objectZone = objc.registerName("objectZone"); late final _sel_objectsAtIndexes_ = objc.registerName("objectsAtIndexes:"); +late final _sel_objectsByEvaluatingSpecifier = objc.registerName( + "objectsByEvaluatingSpecifier", +); +late final _sel_objectsByEvaluatingWithContainers_ = objc.registerName( + "objectsByEvaluatingWithContainers:", +); late final _sel_objectsForKeys_notFoundMarker_ = objc.registerName( "objectsForKeys:notFoundMarker:", ); @@ -43139,10 +47147,15 @@ late final _sel_objectsPassingTest_ = objc.registerName("objectsPassingTest:"); late final _sel_objectsWithOptions_passingTest_ = objc.registerName( "objectsWithOptions:passingTest:", ); +late final _sel_observationInfo = objc.registerName("observationInfo"); late final _sel_observeValueForKeyPath_ofObject_change_context_ = objc .registerName("observeValueForKeyPath:ofObject:change:context:"); late final _sel_open = objc.registerName("open"); +late final _sel_operand = objc.registerName("operand"); late final _sel_orderedSet = objc.registerName("orderedSet"); +late final _sel_orderedSetByApplyingDifference_ = objc.registerName( + "orderedSetByApplyingDifference:", +); late final _sel_orderedSetWithArray_ = objc.registerName( "orderedSetWithArray:", ); @@ -43171,6 +47184,16 @@ late final _sel_orderedSetWithSet_ = objc.registerName("orderedSetWithSet:"); late final _sel_orderedSetWithSet_copyItems_ = objc.registerName( "orderedSetWithSet:copyItems:", ); +late final _sel_originatorNameComponents = objc.registerName( + "originatorNameComponents", +); +late final _sel_orthographyWithDominantScript_languageMap_ = objc.registerName( + "orthographyWithDominantScript:languageMap:", +); +late final _sel_otherVersionsOfItemAtURL_ = objc.registerName( + "otherVersionsOfItemAtURL:", +); +late final _sel_outputFormat = objc.registerName("outputFormat"); late final _sel_outputStreamToBuffer_capacity_ = objc.registerName( "outputStreamToBuffer:capacity:", ); @@ -43186,9 +47209,17 @@ late final _sel_outputStreamWithURL_append_ = objc.registerName( late final _sel_paragraphRangeForRange_ = objc.registerName( "paragraphRangeForRange:", ); +late final _sel_paramDescriptorForKeyword_ = objc.registerName( + "paramDescriptorForKeyword:", +); late final _sel_parameterString = objc.registerName("parameterString"); late final _sel_password = objc.registerName("password"); late final _sel_path = objc.registerName("path"); +late final _sel_pathComponents = objc.registerName("pathComponents"); +late final _sel_pathContentOfSymbolicLinkAtPath_ = objc.registerName( + "pathContentOfSymbolicLinkAtPath:", +); +late final _sel_pathExtension = objc.registerName("pathExtension"); late final _sel_pathForAuxiliaryExecutable_ = objc.registerName( "pathForAuxiliaryExecutable:", ); @@ -43200,29 +47231,91 @@ late final _sel_pathForResource_ofType_inDirectory_ = objc.registerName( ); late final _sel_pathForResource_ofType_inDirectory_forLocalization_ = objc .registerName("pathForResource:ofType:inDirectory:forLocalization:"); +late final _sel_pathWithComponents_ = objc.registerName("pathWithComponents:"); late final _sel_pathsForResourcesOfType_inDirectory_ = objc.registerName( "pathsForResourcesOfType:inDirectory:", ); late final _sel_pathsForResourcesOfType_inDirectory_forLocalization_ = objc .registerName("pathsForResourcesOfType:inDirectory:forLocalization:"); +late final _sel_pathsMatchingExtensions_ = objc.registerName( + "pathsMatchingExtensions:", +); late final _sel_pause = objc.registerName("pause"); +late final _sel_pauseSyncForUbiquitousItemAtURL_completionHandler_ = objc + .registerName("pauseSyncForUbiquitousItemAtURL:completionHandler:"); late final _sel_pausingHandler = objc.registerName("pausingHandler"); late final _sel_performAsCurrentWithPendingUnitCount_usingBlock_ = objc .registerName("performAsCurrentWithPendingUnitCount:usingBlock:"); +late final _sel_performBlock_ = objc.registerName("performBlock:"); +late final _sel_performDefaultImplementation = objc.registerName( + "performDefaultImplementation", +); +late final _sel_performInModes_block_ = objc.registerName( + "performInModes:block:", +); +late final _sel_performSelectorInBackground_withObject_ = objc.registerName( + "performSelectorInBackground:withObject:", +); +late final _sel_performSelectorOnMainThread_withObject_waitUntilDone_ = objc + .registerName("performSelectorOnMainThread:withObject:waitUntilDone:"); +late final _sel_performSelectorOnMainThread_withObject_waitUntilDone_modes_ = + objc.registerName( + "performSelectorOnMainThread:withObject:waitUntilDone:modes:", + ); late final _sel_performSelector_ = objc.registerName("performSelector:"); +late final _sel_performSelector_onThread_withObject_waitUntilDone_ = objc + .registerName("performSelector:onThread:withObject:waitUntilDone:"); +late final _sel_performSelector_onThread_withObject_waitUntilDone_modes_ = objc + .registerName("performSelector:onThread:withObject:waitUntilDone:modes:"); +late final _sel_performSelector_target_argument_order_modes_ = objc + .registerName("performSelector:target:argument:order:modes:"); late final _sel_performSelector_withObject_ = objc.registerName( "performSelector:withObject:", ); +late final _sel_performSelector_withObject_afterDelay_ = objc.registerName( + "performSelector:withObject:afterDelay:", +); +late final _sel_performSelector_withObject_afterDelay_inModes_ = objc + .registerName("performSelector:withObject:afterDelay:inModes:"); late final _sel_performSelector_withObject_withObject_ = objc.registerName( "performSelector:withObject:withObject:", ); +late final _sel_persistentIdentifier = objc.registerName( + "persistentIdentifier", +); +late final _sel_phoneticRepresentation = objc.registerName( + "phoneticRepresentation", +); +late final _sel_pointValue = objc.registerName("pointValue"); +late final _sel_pointerValue = objc.registerName("pointerValue"); late final _sel_port = objc.registerName("port"); +late final _sel_portCoderWithReceivePort_sendPort_components_ = objc + .registerName("portCoderWithReceivePort:sendPort:components:"); +late final _sel_portForName_ = objc.registerName("portForName:"); +late final _sel_portForName_host_ = objc.registerName("portForName:host:"); late final _sel_precomposedStringWithCanonicalMapping = objc.registerName( "precomposedStringWithCanonicalMapping", ); late final _sel_precomposedStringWithCompatibilityMapping = objc.registerName( "precomposedStringWithCompatibilityMapping", ); +late final _sel_predicate = objc.registerName("predicate"); +late final _sel_predicateFormat = objc.registerName("predicateFormat"); +late final _sel_predicateFromMetadataQueryString_ = objc.registerName( + "predicateFromMetadataQueryString:", +); +late final _sel_predicateWithBlock_ = objc.registerName("predicateWithBlock:"); +late final _sel_predicateWithFormat_ = objc.registerName( + "predicateWithFormat:", +); +late final _sel_predicateWithFormat_argumentArray_ = objc.registerName( + "predicateWithFormat:argumentArray:", +); +late final _sel_predicateWithSubstitutionVariables_ = objc.registerName( + "predicateWithSubstitutionVariables:", +); +late final _sel_predicateWithValue_ = objc.registerName("predicateWithValue:"); +late final _sel_preferredLanguages = objc.registerName("preferredLanguages"); late final _sel_preferredLocalizations = objc.registerName( "preferredLocalizations", ); @@ -43234,6 +47327,10 @@ late final _sel_preferredLocalizationsFromArray_forPreferences_ = objc late final _sel_preflightAndReturnError_ = objc.registerName( "preflightAndReturnError:", ); +late final _sel_preservationPriorityForTag_ = objc.registerName( + "preservationPriorityForTag:", +); +late final _sel_previewImageHandler = objc.registerName("previewImageHandler"); late final _sel_principalClass = objc.registerName("principalClass"); late final _sel_privateFrameworksPath = objc.registerName( "privateFrameworksPath", @@ -43246,12 +47343,37 @@ late final _sel_progressWithTotalUnitCount_ = objc.registerName( ); late final _sel_progressWithTotalUnitCount_parent_pendingUnitCount_ = objc .registerName("progressWithTotalUnitCount:parent:pendingUnitCount:"); +late final _sel_promisedItemResourceValuesForKeys_error_ = objc.registerName( + "promisedItemResourceValuesForKeys:error:", +); +late final _sel_propertyForKeyIfAvailable_ = objc.registerName( + "propertyForKeyIfAvailable:", +); late final _sel_propertyForKey_ = objc.registerName("propertyForKey:"); +late final _sel_propertyList = objc.registerName("propertyList"); +late final _sel_propertyListFromStringsFileFormat = objc.registerName( + "propertyListFromStringsFileFormat", +); +late final _sel_proxyWithLocal_connection_ = objc.registerName( + "proxyWithLocal:connection:", +); +late final _sel_proxyWithTarget_connection_ = objc.registerName( + "proxyWithTarget:connection:", +); late final _sel_publish = objc.registerName("publish"); late final _sel_punctuationCharacterSet = objc.registerName( "punctuationCharacterSet", ); +late final _sel_qualityOfService = objc.registerName("qualityOfService"); late final _sel_query = objc.registerName("query"); +late final _sel_quotationBeginDelimiter = objc.registerName( + "quotationBeginDelimiter", +); +late final _sel_quotationEndDelimiter = objc.registerName( + "quotationEndDelimiter", +); +late final _sel_raise = objc.registerName("raise"); +late final _sel_raise_format_ = objc.registerName("raise:format:"); late final _sel_rangeOfCharacterFromSet_ = objc.registerName( "rangeOfCharacterFromSet:", ); @@ -43280,10 +47402,22 @@ late final _sel_rangeOfString_options_range_ = objc.registerName( late final _sel_rangeOfString_options_range_locale_ = objc.registerName( "rangeOfString:options:range:locale:", ); +late final _sel_rangeValue = objc.registerName("rangeValue"); late final _sel_read_maxLength_ = objc.registerName("read:maxLength:"); +late final _sel_readableTypeIdentifiersForItemProvider = objc.registerName( + "readableTypeIdentifiersForItemProvider", +); +late final _sel_reason = objc.registerName("reason"); late final _sel_receivePort = objc.registerName("receivePort"); +late final _sel_receiversSpecifier = objc.registerName("receiversSpecifier"); +late final _sel_recordDescriptor = objc.registerName("recordDescriptor"); late final _sel_recoveryAttempter = objc.registerName("recoveryAttempter"); +late final _sel_rectValue = objc.registerName("rectValue"); +late final _sel_regionCode = objc.registerName("regionCode"); late final _sel_registerClass = objc.registerName("registerClass"); +late final _sel_registerClassDescription_forClass_ = objc.registerName( + "registerClassDescription:forClass:", +); late final _sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_ = objc.registerName( "registerDataRepresentationForTypeIdentifier:visibility:loadHandler:", @@ -43295,11 +47429,19 @@ late final _sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibili late final _sel_registerItemForTypeIdentifier_loadHandler_ = objc.registerName( "registerItemForTypeIdentifier:loadHandler:", ); +late final _sel_registerName_ = objc.registerName("registerName:"); +late final _sel_registerName_withNameServer_ = objc.registerName( + "registerName:withNameServer:", +); late final _sel_registerObjectOfClass_visibility_loadHandler_ = objc .registerName("registerObjectOfClass:visibility:loadHandler:"); late final _sel_registerObject_visibility_ = objc.registerName( "registerObject:visibility:", ); +late final _sel_registerPort_name_ = objc.registerName("registerPort:name:"); +late final _sel_registerURLHandleClass_ = objc.registerName( + "registerURLHandleClass:", +); late final _sel_registeredTypeIdentifiers = objc.registerName( "registeredTypeIdentifiers", ); @@ -43309,6 +47451,7 @@ late final _sel_registeredTypeIdentifiersWithFileOptions_ = objc.registerName( late final _sel_relativePath = objc.registerName("relativePath"); late final _sel_relativeString = objc.registerName("relativeString"); late final _sel_release = objc.registerName("release"); +late final _sel_remoteObjects = objc.registerName("remoteObjects"); late final _sel_removals = objc.registerName("removals"); late final _sel_remove = objc.registerName("remove"); late final _sel_removeAllCachedResourceValues = objc.registerName( @@ -43316,9 +47459,25 @@ late final _sel_removeAllCachedResourceValues = objc.registerName( ); late final _sel_removeAllIndexes = objc.registerName("removeAllIndexes"); late final _sel_removeAllObjects = objc.registerName("removeAllObjects"); +late final _sel_removeAndReturnError_ = objc.registerName( + "removeAndReturnError:", +); late final _sel_removeCachedResourceValueForKey_ = objc.registerName( "removeCachedResourceValueForKey:", ); +late final _sel_removeClient_ = objc.registerName("removeClient:"); +late final _sel_removeConnection_fromRunLoop_forMode_ = objc.registerName( + "removeConnection:fromRunLoop:forMode:", +); +late final _sel_removeDescriptorAtIndex_ = objc.registerName( + "removeDescriptorAtIndex:", +); +late final _sel_removeDescriptorWithKeyword_ = objc.registerName( + "removeDescriptorWithKeyword:", +); +late final _sel_removeFileAtPath_handler_ = objc.registerName( + "removeFileAtPath:handler:", +); late final _sel_removeFromRunLoop_forMode_ = objc.registerName( "removeFromRunLoop:forMode:", ); @@ -43327,6 +47486,12 @@ late final _sel_removeIndexesInRange_ = objc.registerName( "removeIndexesInRange:", ); late final _sel_removeIndexes_ = objc.registerName("removeIndexes:"); +late final _sel_removeItemAtPath_error_ = objc.registerName( + "removeItemAtPath:error:", +); +late final _sel_removeItemAtURL_error_ = objc.registerName( + "removeItemAtURL:error:", +); late final _sel_removeLastObject = objc.registerName("removeLastObject"); late final _sel_removeObjectAtIndex_ = objc.registerName( "removeObjectAtIndex:", @@ -43348,14 +47513,39 @@ late final _sel_removeObjectsAtIndexes_ = objc.registerName( late final _sel_removeObjectsForKeys_ = objc.registerName( "removeObjectsForKeys:", ); +late final _sel_removeObjectsFromIndices_numIndices_ = objc.registerName( + "removeObjectsFromIndices:numIndices:", +); late final _sel_removeObjectsInArray_ = objc.registerName( "removeObjectsInArray:", ); late final _sel_removeObjectsInRange_ = objc.registerName( "removeObjectsInRange:", ); +late final _sel_removeObserver_forKeyPath_ = objc.registerName( + "removeObserver:forKeyPath:", +); +late final _sel_removeObserver_forKeyPath_context_ = objc.registerName( + "removeObserver:forKeyPath:context:", +); +late final _sel_removeObserver_fromObjectsAtIndexes_forKeyPath_ = objc + .registerName("removeObserver:fromObjectsAtIndexes:forKeyPath:"); +late final _sel_removeObserver_fromObjectsAtIndexes_forKeyPath_context_ = objc + .registerName("removeObserver:fromObjectsAtIndexes:forKeyPath:context:"); +late final _sel_removeOtherVersionsOfItemAtURL_error_ = objc.registerName( + "removeOtherVersionsOfItemAtURL:error:", +); +late final _sel_removeParamDescriptorWithKeyword_ = objc.registerName( + "removeParamDescriptorWithKeyword:", +); +late final _sel_removePortForName_ = objc.registerName("removePortForName:"); late final _sel_removePort_forMode_ = objc.registerName("removePort:forMode:"); +late final _sel_removeRequestMode_ = objc.registerName("removeRequestMode:"); +late final _sel_removeRunLoop_ = objc.registerName("removeRunLoop:"); late final _sel_removeSubscriber_ = objc.registerName("removeSubscriber:"); +late final _sel_removeValueAtIndex_fromPropertyWithKey_ = objc.registerName( + "removeValueAtIndex:fromPropertyWithKey:", +); late final _sel_replaceBytesInRange_withBytes_ = objc.registerName( "replaceBytesInRange:withBytes:", ); @@ -43365,9 +47555,19 @@ late final _sel_replaceBytesInRange_withBytes_length_ = objc.registerName( late final _sel_replaceCharactersInRange_withString_ = objc.registerName( "replaceCharactersInRange:withString:", ); +late final _sel_replaceItemAtURL_options_error_ = objc.registerName( + "replaceItemAtURL:options:error:", +); +late final _sel_replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_ = + objc.registerName( + "replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error:", + ); late final _sel_replaceObjectAtIndex_withObject_ = objc.registerName( "replaceObjectAtIndex:withObject:", ); +late final _sel_replaceObject_withObject_ = objc.registerName( + "replaceObject:withObject:", +); late final _sel_replaceObjectsAtIndexes_withObjects_ = objc.registerName( "replaceObjectsAtIndexes:withObjects:", ); @@ -43379,13 +47579,41 @@ late final _sel_replaceObjectsInRange_withObjectsFromArray_range_ = objc late final _sel_replaceObjectsInRange_withObjects_count_ = objc.registerName( "replaceObjectsInRange:withObjects:count:", ); +late final _sel_replaceOccurrencesOfString_withString_options_range_ = objc + .registerName("replaceOccurrencesOfString:withString:options:range:"); +late final _sel_replaceValueAtIndex_inPropertyWithKey_withValue_ = objc + .registerName("replaceValueAtIndex:inPropertyWithKey:withValue:"); +late final _sel_replacementObjectForArchiver_ = objc.registerName( + "replacementObjectForArchiver:", +); +late final _sel_replacementObjectForCoder_ = objc.registerName( + "replacementObjectForCoder:", +); +late final _sel_replacementObjectForKeyedArchiver_ = objc.registerName( + "replacementObjectForKeyedArchiver:", +); +late final _sel_replacementObjectForPortCoder_ = objc.registerName( + "replacementObjectForPortCoder:", +); +late final _sel_replyTimeout = objc.registerName("replyTimeout"); +late final _sel_replyWithException_ = objc.registerName("replyWithException:"); +late final _sel_requestModes = objc.registerName("requestModes"); +late final _sel_requestTimeout = objc.registerName("requestTimeout"); +late final _sel_requiresSecureCoding = objc.registerName( + "requiresSecureCoding", +); late final _sel_reservedSpaceLength = objc.registerName("reservedSpaceLength"); late final _sel_resetBytesInRange_ = objc.registerName("resetBytesInRange:"); +late final _sel_resetSystemTimeZone = objc.registerName("resetSystemTimeZone"); late final _sel_resignCurrent = objc.registerName("resignCurrent"); late final _sel_resolveClassMethod_ = objc.registerName("resolveClassMethod:"); late final _sel_resolveInstanceMethod_ = objc.registerName( "resolveInstanceMethod:", ); +late final _sel_resourceData = objc.registerName("resourceData"); +late final _sel_resourceDataUsingCache_ = objc.registerName( + "resourceDataUsingCache:", +); late final _sel_resourcePath = objc.registerName("resourcePath"); late final _sel_resourceSpecifier = objc.registerName("resourceSpecifier"); late final _sel_resourceURL = objc.registerName("resourceURL"); @@ -43397,14 +47625,37 @@ late final _sel_resourceValuesForKeys_fromBookmarkData_ = objc.registerName( ); late final _sel_respondsToSelector_ = objc.registerName("respondsToSelector:"); late final _sel_resume = objc.registerName("resume"); +late final _sel_resumeExecutionWithResult_ = objc.registerName( + "resumeExecutionWithResult:", +); +late final _sel_resumeSyncForUbiquitousItemAtURL_withBehavior_completionHandler_ = + objc.registerName( + "resumeSyncForUbiquitousItemAtURL:withBehavior:completionHandler:", + ); late final _sel_resumingHandler = objc.registerName("resumingHandler"); late final _sel_retain = objc.registerName("retain"); late final _sel_retainArguments = objc.registerName("retainArguments"); late final _sel_retainCount = objc.registerName("retainCount"); +late final _sel_retainWeakReference = objc.registerName("retainWeakReference"); +late final _sel_returnID = objc.registerName("returnID"); +late final _sel_returnType = objc.registerName("returnType"); late final _sel_reverseObjectEnumerator = objc.registerName( "reverseObjectEnumerator", ); late final _sel_reversedOrderedSet = objc.registerName("reversedOrderedSet"); +late final _sel_rightExpression = objc.registerName("rightExpression"); +late final _sel_rootObject = objc.registerName("rootObject"); +late final _sel_rootProxy = objc.registerName("rootProxy"); +late final _sel_rootProxyForConnectionWithRegisteredName_host_ = objc + .registerName("rootProxyForConnectionWithRegisteredName:host:"); +late final _sel_rootProxyForConnectionWithRegisteredName_host_usingNameServer_ = + objc.registerName( + "rootProxyForConnectionWithRegisteredName:host:usingNameServer:", + ); +late final _sel_run = objc.registerName("run"); +late final _sel_runInNewThread = objc.registerName("runInNewThread"); +late final _sel_runMode_beforeDate_ = objc.registerName("runMode:beforeDate:"); +late final _sel_runUntilDate_ = objc.registerName("runUntilDate:"); late final _sel_scheduleInRunLoop_forMode_ = objc.registerName( "scheduleInRunLoop:forMode:", ); @@ -43417,7 +47668,44 @@ late final _sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_ "scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:", ); late final _sel_scheme = objc.registerName("scheme"); +late final _sel_scriptCode = objc.registerName("scriptCode"); +late final _sel_scriptErrorExpectedTypeDescriptor = objc.registerName( + "scriptErrorExpectedTypeDescriptor", +); +late final _sel_scriptErrorNumber = objc.registerName("scriptErrorNumber"); +late final _sel_scriptErrorOffendingObjectDescriptor = objc.registerName( + "scriptErrorOffendingObjectDescriptor", +); +late final _sel_scriptErrorString = objc.registerName("scriptErrorString"); +late final _sel_scriptingBeginsWith_ = objc.registerName( + "scriptingBeginsWith:", +); +late final _sel_scriptingContains_ = objc.registerName("scriptingContains:"); +late final _sel_scriptingEndsWith_ = objc.registerName("scriptingEndsWith:"); +late final _sel_scriptingIsEqualTo_ = objc.registerName("scriptingIsEqualTo:"); +late final _sel_scriptingIsGreaterThanOrEqualTo_ = objc.registerName( + "scriptingIsGreaterThanOrEqualTo:", +); +late final _sel_scriptingIsGreaterThan_ = objc.registerName( + "scriptingIsGreaterThan:", +); +late final _sel_scriptingIsLessThanOrEqualTo_ = objc.registerName( + "scriptingIsLessThanOrEqualTo:", +); +late final _sel_scriptingIsLessThan_ = objc.registerName( + "scriptingIsLessThan:", +); +late final _sel_scriptingProperties = objc.registerName("scriptingProperties"); +late final _sel_scriptingValueForSpecifier_ = objc.registerName( + "scriptingValueForSpecifier:", +); +late final _sel_secondOfMinute = objc.registerName("secondOfMinute"); +late final _sel_secondsFromGMT = objc.registerName("secondsFromGMT"); +late final _sel_secondsFromGMTForDate_ = objc.registerName( + "secondsFromGMTForDate:", +); late final _sel_selector = objc.registerName("selector"); +late final _sel_selectorForCommand_ = objc.registerName("selectorForCommand:"); late final _sel_self = objc.registerName("self"); late final _sel_sendBeforeDate_ = objc.registerName("sendBeforeDate:"); late final _sel_sendBeforeDate_components_from_reserved_ = objc.registerName( @@ -43425,8 +47713,19 @@ late final _sel_sendBeforeDate_components_from_reserved_ = objc.registerName( ); late final _sel_sendBeforeDate_msgid_components_from_reserved_ = objc .registerName("sendBeforeDate:msgid:components:from:reserved:"); +late final _sel_sendEventWithOptions_timeout_error_ = objc.registerName( + "sendEventWithOptions:timeout:error:", +); late final _sel_sendPort = objc.registerName("sendPort"); +late final _sel_serviceConnectionWithName_rootObject_ = objc.registerName( + "serviceConnectionWithName:rootObject:", +); +late final _sel_serviceConnectionWithName_rootObject_usingNameServer_ = objc + .registerName("serviceConnectionWithName:rootObject:usingNameServer:"); late final _sel_set = objc.registerName("set"); +late final _sel_setAbbreviationDictionary_ = objc.registerName( + "setAbbreviationDictionary:", +); late final _sel_setAllowsExtendedAttributes_ = objc.registerName( "setAllowsExtendedAttributes:", ); @@ -43436,7 +47735,14 @@ late final _sel_setAppliesSourcePositionAttributes_ = objc.registerName( late final _sel_setArgument_atIndex_ = objc.registerName( "setArgument:atIndex:", ); +late final _sel_setArguments_ = objc.registerName("setArguments:"); late final _sel_setArray_ = objc.registerName("setArray:"); +late final _sel_setAttributeDescriptor_forKeyword_ = objc.registerName( + "setAttributeDescriptor:forKeyword:", +); +late final _sel_setAttributes_ofItemAtPath_error_ = objc.registerName( + "setAttributes:ofItemAtPath:error:", +); late final _sel_setByAddingObject_ = objc.registerName("setByAddingObject:"); late final _sel_setByAddingObjectsFromArray_ = objc.registerName( "setByAddingObjectsFromArray:", @@ -43444,22 +47750,49 @@ late final _sel_setByAddingObjectsFromArray_ = objc.registerName( late final _sel_setByAddingObjectsFromSet_ = objc.registerName( "setByAddingObjectsFromSet:", ); +late final _sel_setCalendarFormat_ = objc.registerName("setCalendarFormat:"); late final _sel_setCancellable_ = objc.registerName("setCancellable:"); late final _sel_setCancellationHandler_ = objc.registerName( "setCancellationHandler:", ); +late final _sel_setChildSpecifier_ = objc.registerName("setChildSpecifier:"); +late final _sel_setClassName_forClass_ = objc.registerName( + "setClassName:forClass:", +); late final _sel_setCompletedUnitCount_ = objc.registerName( "setCompletedUnitCount:", ); +late final _sel_setContainerClassDescription_ = objc.registerName( + "setContainerClassDescription:", +); +late final _sel_setContainerIsObjectBeingTested_ = objc.registerName( + "setContainerIsObjectBeingTested:", +); +late final _sel_setContainerIsRangeContainerObject_ = objc.registerName( + "setContainerIsRangeContainerObject:", +); +late final _sel_setContainerSpecifier_ = objc.registerName( + "setContainerSpecifier:", +); late final _sel_setData_ = objc.registerName("setData:"); +late final _sel_setDefaultTimeZone_ = objc.registerName("setDefaultTimeZone:"); late final _sel_setDelegate_ = objc.registerName("setDelegate:"); +late final _sel_setDescriptor_forKeyword_ = objc.registerName( + "setDescriptor:forKeyword:", +); late final _sel_setDictionary_ = objc.registerName("setDictionary:"); +late final _sel_setDirectParameter_ = objc.registerName("setDirectParameter:"); +late final _sel_setDiscardable_ = objc.registerName("setDiscardable:"); late final _sel_setDone = objc.registerName("setDone"); late final _sel_setError_ = objc.registerName("setError:"); late final _sel_setEstimatedTimeRemaining_ = objc.registerName( "setEstimatedTimeRemaining:", ); +late final _sel_setEvaluationErrorNumber_ = objc.registerName( + "setEvaluationErrorNumber:", +); late final _sel_setFailurePolicy_ = objc.registerName("setFailurePolicy:"); +late final _sel_setFamilyName_ = objc.registerName("setFamilyName:"); late final _sel_setFileCompletedCount_ = objc.registerName( "setFileCompletedCount:", ); @@ -43469,9 +47802,19 @@ late final _sel_setFileOperationKind_ = objc.registerName( late final _sel_setFileTotalCount_ = objc.registerName("setFileTotalCount:"); late final _sel_setFileURL_ = objc.registerName("setFileURL:"); late final _sel_setFireDate_ = objc.registerName("setFireDate:"); +late final _sel_setGivenName_ = objc.registerName("setGivenName:"); +late final _sel_setHostCacheEnabled_ = objc.registerName( + "setHostCacheEnabled:", +); +late final _sel_setIndependentConversationQueueing_ = objc.registerName( + "setIndependentConversationQueueing:", +); late final _sel_setInterpretedSyntax_ = objc.registerName( "setInterpretedSyntax:", ); +late final _sel_setKey_ = objc.registerName("setKey:"); +late final _sel_setKeys_triggerChangeNotificationsForDependentKey_ = objc + .registerName("setKeys:triggerChangeNotificationsForDependentKey:"); late final _sel_setKind_ = objc.registerName("setKind:"); late final _sel_setLanguageCode_ = objc.registerName("setLanguageCode:"); late final _sel_setLength_ = objc.registerName("setLength:"); @@ -43481,7 +47824,14 @@ late final _sel_setLocalizedAdditionalDescription_ = objc.registerName( late final _sel_setLocalizedDescription_ = objc.registerName( "setLocalizedDescription:", ); +late final _sel_setMiddleName_ = objc.registerName("setMiddleName:"); late final _sel_setMsgid_ = objc.registerName("setMsgid:"); +late final _sel_setNamePrefix_ = objc.registerName("setNamePrefix:"); +late final _sel_setNameSuffix_ = objc.registerName("setNameSuffix:"); +late final _sel_setName_ = objc.registerName("setName:"); +late final _sel_setNickname_ = objc.registerName("setNickname:"); +late final _sel_setNilValueForKey_ = objc.registerName("setNilValueForKey:"); +late final _sel_setObjectZone_ = objc.registerName("setObjectZone:"); late final _sel_setObject_atIndex_ = objc.registerName("setObject:atIndex:"); late final _sel_setObject_atIndexedSubscript_ = objc.registerName( "setObject:atIndexedSubscript:", @@ -43490,9 +47840,39 @@ late final _sel_setObject_forKey_ = objc.registerName("setObject:forKey:"); late final _sel_setObject_forKeyedSubscript_ = objc.registerName( "setObject:forKeyedSubscript:", ); +late final _sel_setObservationInfo_ = objc.registerName("setObservationInfo:"); +late final _sel_setOutputFormat_ = objc.registerName("setOutputFormat:"); +late final _sel_setParamDescriptor_forKeyword_ = objc.registerName( + "setParamDescriptor:forKeyword:", +); late final _sel_setPausable_ = objc.registerName("setPausable:"); late final _sel_setPausingHandler_ = objc.registerName("setPausingHandler:"); +late final _sel_setPhoneticRepresentation_ = objc.registerName( + "setPhoneticRepresentation:", +); +late final _sel_setPreservationPriority_forTags_ = objc.registerName( + "setPreservationPriority:forTags:", +); +late final _sel_setPreviewImageHandler_ = objc.registerName( + "setPreviewImageHandler:", +); late final _sel_setProperty_forKey_ = objc.registerName("setProperty:forKey:"); +late final _sel_setProtocolForProxy_ = objc.registerName( + "setProtocolForProxy:", +); +late final _sel_setQualityOfService_ = objc.registerName( + "setQualityOfService:", +); +late final _sel_setReceiversSpecifier_ = objc.registerName( + "setReceiversSpecifier:", +); +late final _sel_setReplyTimeout_ = objc.registerName("setReplyTimeout:"); +late final _sel_setRequestTimeout_ = objc.registerName("setRequestTimeout:"); +late final _sel_setRequiresSecureCoding_ = objc.registerName( + "setRequiresSecureCoding:", +); +late final _sel_setResolved_ = objc.registerName("setResolved:"); +late final _sel_setResourceData_ = objc.registerName("setResourceData:"); late final _sel_setResourceValue_forKey_error_ = objc.registerName( "setResourceValue:forKey:error:", ); @@ -43501,22 +47881,56 @@ late final _sel_setResourceValues_error_ = objc.registerName( ); late final _sel_setResumingHandler_ = objc.registerName("setResumingHandler:"); late final _sel_setReturnValue_ = objc.registerName("setReturnValue:"); +late final _sel_setRootObject_ = objc.registerName("setRootObject:"); +late final _sel_setScriptErrorExpectedTypeDescriptor_ = objc.registerName( + "setScriptErrorExpectedTypeDescriptor:", +); +late final _sel_setScriptErrorNumber_ = objc.registerName( + "setScriptErrorNumber:", +); +late final _sel_setScriptErrorOffendingObjectDescriptor_ = objc.registerName( + "setScriptErrorOffendingObjectDescriptor:", +); +late final _sel_setScriptErrorString_ = objc.registerName( + "setScriptErrorString:", +); +late final _sel_setScriptingProperties_ = objc.registerName( + "setScriptingProperties:", +); late final _sel_setSelector_ = objc.registerName("setSelector:"); late final _sel_setSet_ = objc.registerName("setSet:"); +late final _sel_setSharedObservers_ = objc.registerName("setSharedObservers:"); +late final _sel_setStackSize_ = objc.registerName("setStackSize:"); +late final _sel_setString_ = objc.registerName("setString:"); late final _sel_setSuggestedName_ = objc.registerName("setSuggestedName:"); late final _sel_setTarget_ = objc.registerName("setTarget:"); late final _sel_setTemporaryResourceValue_forKey_ = objc.registerName( "setTemporaryResourceValue:forKey:", ); +late final _sel_setThreadPriority_ = objc.registerName("setThreadPriority:"); late final _sel_setThroughput_ = objc.registerName("setThroughput:"); +late final _sel_setTimeZone_ = objc.registerName("setTimeZone:"); late final _sel_setTolerance_ = objc.registerName("setTolerance:"); late final _sel_setTotalUnitCount_ = objc.registerName("setTotalUnitCount:"); +late final _sel_setUbiquitous_itemAtURL_destinationURL_error_ = objc + .registerName("setUbiquitous:itemAtURL:destinationURL:error:"); late final _sel_setUserInfoObject_forKey_ = objc.registerName( "setUserInfoObject:forKey:", ); late final _sel_setUserInfoValueProviderForDomain_provider_ = objc.registerName( "setUserInfoValueProviderForDomain:provider:", ); +late final _sel_setValue_forKeyPath_ = objc.registerName( + "setValue:forKeyPath:", +); +late final _sel_setValue_forKey_ = objc.registerName("setValue:forKey:"); +late final _sel_setValue_forUndefinedKey_ = objc.registerName( + "setValue:forUndefinedKey:", +); +late final _sel_setValuesForKeysWithDictionary_ = objc.registerName( + "setValuesForKeysWithDictionary:", +); +late final _sel_setVersion_ = objc.registerName("setVersion:"); late final _sel_setWithArray_ = objc.registerName("setWithArray:"); late final _sel_setWithCapacity_ = objc.registerName("setWithCapacity:"); late final _sel_setWithObject_ = objc.registerName("setWithObject:"); @@ -43529,6 +47943,9 @@ late final _sel_sharedFrameworksPath = objc.registerName( "sharedFrameworksPath", ); late final _sel_sharedFrameworksURL = objc.registerName("sharedFrameworksURL"); +late final _sel_sharedKeySetForKeys_ = objc.registerName( + "sharedKeySetForKeys:", +); late final _sel_sharedSupportPath = objc.registerName("sharedSupportPath"); late final _sel_sharedSupportURL = objc.registerName("sharedSupportURL"); late final _sel_shiftIndexesStartingAtIndex_by_ = objc.registerName( @@ -43538,6 +47955,13 @@ late final _sel_shortValue = objc.registerName("shortValue"); late final _sel_signatureWithObjCTypes_ = objc.registerName( "signatureWithObjCTypes:", ); +late final _sel_sizeValue = objc.registerName("sizeValue"); +late final _sel_skipDescendants = objc.registerName("skipDescendants"); +late final _sel_skipDescendents = objc.registerName("skipDescendents"); +late final _sel_sleepForTimeInterval_ = objc.registerName( + "sleepForTimeInterval:", +); +late final _sel_sleepUntilDate_ = objc.registerName("sleepUntilDate:"); late final _sel_smallestEncoding = objc.registerName("smallestEncoding"); late final _sel_sortRange_options_usingComparator_ = objc.registerName( "sortRange:options:usingComparator:", @@ -43545,6 +47969,9 @@ late final _sel_sortRange_options_usingComparator_ = objc.registerName( late final _sel_sortUsingComparator_ = objc.registerName( "sortUsingComparator:", ); +late final _sel_sortUsingDescriptors_ = objc.registerName( + "sortUsingDescriptors:", +); late final _sel_sortUsingFunction_context_ = objc.registerName( "sortUsingFunction:context:", ); @@ -43556,6 +47983,9 @@ late final _sel_sortedArrayHint = objc.registerName("sortedArrayHint"); late final _sel_sortedArrayUsingComparator_ = objc.registerName( "sortedArrayUsingComparator:", ); +late final _sel_sortedArrayUsingDescriptors_ = objc.registerName( + "sortedArrayUsingDescriptors:", +); late final _sel_sortedArrayUsingFunction_context_ = objc.registerName( "sortedArrayUsingFunction:context:", ); @@ -43568,31 +47998,65 @@ late final _sel_sortedArrayUsingSelector_ = objc.registerName( late final _sel_sortedArrayWithOptions_usingComparator_ = objc.registerName( "sortedArrayWithOptions:usingComparator:", ); +late final _sel_stackSize = objc.registerName("stackSize"); late final _sel_standardizedURL = objc.registerName("standardizedURL"); +late final _sel_start = objc.registerName("start"); late final _sel_startAccessingSecurityScopedResource = objc.registerName( "startAccessingSecurityScopedResource", ); +late final _sel_startDownloadingUbiquitousItemAtURL_error_ = objc.registerName( + "startDownloadingUbiquitousItemAtURL:error:", +); +late final _sel_statistics = objc.registerName("statistics"); +late final _sel_status = objc.registerName("status"); late final _sel_stopAccessingSecurityScopedResource = objc.registerName( "stopAccessingSecurityScopedResource", ); +late final _sel_storedValueForKey_ = objc.registerName("storedValueForKey:"); late final _sel_streamError = objc.registerName("streamError"); late final _sel_streamStatus = objc.registerName("streamStatus"); late final _sel_stream_handleEvent_ = objc.registerName("stream:handleEvent:"); late final _sel_string = objc.registerName("string"); +late final _sel_stringByAbbreviatingWithTildeInPath = objc.registerName( + "stringByAbbreviatingWithTildeInPath", +); +late final _sel_stringByAddingPercentEncodingWithAllowedCharacters_ = objc + .registerName("stringByAddingPercentEncodingWithAllowedCharacters:"); +late final _sel_stringByAddingPercentEscapesUsingEncoding_ = objc.registerName( + "stringByAddingPercentEscapesUsingEncoding:", +); late final _sel_stringByAppendingFormat_ = objc.registerName( "stringByAppendingFormat:", ); +late final _sel_stringByAppendingPathComponent_ = objc.registerName( + "stringByAppendingPathComponent:", +); +late final _sel_stringByAppendingPathExtension_ = objc.registerName( + "stringByAppendingPathExtension:", +); late final _sel_stringByAppendingString_ = objc.registerName( "stringByAppendingString:", ); late final _sel_stringByApplyingTransform_reverse_ = objc.registerName( "stringByApplyingTransform:reverse:", ); +late final _sel_stringByDeletingLastPathComponent = objc.registerName( + "stringByDeletingLastPathComponent", +); +late final _sel_stringByDeletingPathExtension = objc.registerName( + "stringByDeletingPathExtension", +); +late final _sel_stringByExpandingTildeInPath = objc.registerName( + "stringByExpandingTildeInPath", +); late final _sel_stringByFoldingWithOptions_locale_ = objc.registerName( "stringByFoldingWithOptions:locale:", ); late final _sel_stringByPaddingToLength_withString_startingAtIndex_ = objc .registerName("stringByPaddingToLength:withString:startingAtIndex:"); +late final _sel_stringByRemovingPercentEncoding = objc.registerName( + "stringByRemovingPercentEncoding", +); late final _sel_stringByReplacingCharactersInRange_withString_ = objc .registerName("stringByReplacingCharactersInRange:withString:"); late final _sel_stringByReplacingOccurrencesOfString_withString_ = objc @@ -43601,27 +48065,53 @@ late final _sel_stringByReplacingOccurrencesOfString_withString_options_range_ = objc.registerName( "stringByReplacingOccurrencesOfString:withString:options:range:", ); +late final _sel_stringByReplacingPercentEscapesUsingEncoding_ = objc + .registerName("stringByReplacingPercentEscapesUsingEncoding:"); +late final _sel_stringByResolvingSymlinksInPath = objc.registerName( + "stringByResolvingSymlinksInPath", +); +late final _sel_stringByStandardizingPath = objc.registerName( + "stringByStandardizingPath", +); late final _sel_stringByTrimmingCharactersInSet_ = objc.registerName( "stringByTrimmingCharactersInSet:", ); +late final _sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_ = + objc.registerName( + "stringEncodingForData:encodingOptions:convertedString:usedLossyConversion:", + ); late final _sel_stringValue = objc.registerName("stringValue"); +late final _sel_stringWithCString_ = objc.registerName("stringWithCString:"); late final _sel_stringWithCString_encoding_ = objc.registerName( "stringWithCString:encoding:", ); +late final _sel_stringWithCString_length_ = objc.registerName( + "stringWithCString:length:", +); +late final _sel_stringWithCapacity_ = objc.registerName("stringWithCapacity:"); late final _sel_stringWithCharacters_length_ = objc.registerName( "stringWithCharacters:length:", ); +late final _sel_stringWithContentsOfFile_ = objc.registerName( + "stringWithContentsOfFile:", +); late final _sel_stringWithContentsOfFile_encoding_error_ = objc.registerName( "stringWithContentsOfFile:encoding:error:", ); late final _sel_stringWithContentsOfFile_usedEncoding_error_ = objc .registerName("stringWithContentsOfFile:usedEncoding:error:"); +late final _sel_stringWithContentsOfURL_ = objc.registerName( + "stringWithContentsOfURL:", +); late final _sel_stringWithContentsOfURL_encoding_error_ = objc.registerName( "stringWithContentsOfURL:encoding:error:", ); late final _sel_stringWithContentsOfURL_usedEncoding_error_ = objc.registerName( "stringWithContentsOfURL:usedEncoding:error:", ); +late final _sel_stringWithFileSystemRepresentation_length_ = objc.registerName( + "stringWithFileSystemRepresentation:length:", +); late final _sel_stringWithFormat_ = objc.registerName("stringWithFormat:"); late final _sel_stringWithString_ = objc.registerName("stringWithString:"); late final _sel_stringWithUTF8String_ = objc.registerName( @@ -43629,18 +48119,52 @@ late final _sel_stringWithUTF8String_ = objc.registerName( ); late final _sel_stringWithValidatedFormat_validFormatSpecifiers_error_ = objc .registerName("stringWithValidatedFormat:validFormatSpecifiers:error:"); +late final _sel_stringsByAppendingPaths_ = objc.registerName( + "stringsByAppendingPaths:", +); late final _sel_subarrayWithRange_ = objc.registerName("subarrayWithRange:"); late final _sel_subdataWithRange_ = objc.registerName("subdataWithRange:"); +late final _sel_subpathsAtPath_ = objc.registerName("subpathsAtPath:"); +late final _sel_subpathsOfDirectoryAtPath_error_ = objc.registerName( + "subpathsOfDirectoryAtPath:error:", +); late final _sel_substringFromIndex_ = objc.registerName("substringFromIndex:"); late final _sel_substringToIndex_ = objc.registerName("substringToIndex:"); late final _sel_substringWithRange_ = objc.registerName("substringWithRange:"); late final _sel_suggestedName = objc.registerName("suggestedName"); +late final _sel_suiteName = objc.registerName("suiteName"); late final _sel_superclass = objc.registerName("superclass"); +late final _sel_superclassDescription = objc.registerName( + "superclassDescription", +); +late final _sel_supportsCommand_ = objc.registerName("supportsCommand:"); late final _sel_supportsSecureCoding = objc.registerName( "supportsSecureCoding", ); +late final _sel_suspendExecution = objc.registerName("suspendExecution"); late final _sel_symbolCharacterSet = objc.registerName("symbolCharacterSet"); +late final _sel_systemDefaultPortNameServer = objc.registerName( + "systemDefaultPortNameServer", +); +late final _sel_systemLocale = objc.registerName("systemLocale"); +late final _sel_systemTimeZone = objc.registerName("systemTimeZone"); +late final _sel_systemVersion = objc.registerName("systemVersion"); +late final _sel_takeStoredValue_forKey_ = objc.registerName( + "takeStoredValue:forKey:", +); +late final _sel_takeValue_forKeyPath_ = objc.registerName( + "takeValue:forKeyPath:", +); +late final _sel_takeValue_forKey_ = objc.registerName("takeValue:forKey:"); +late final _sel_takeValuesFromDictionary_ = objc.registerName( + "takeValuesFromDictionary:", +); late final _sel_target = objc.registerName("target"); +late final _sel_temporaryDirectory = objc.registerName("temporaryDirectory"); +late final _sel_temporaryDirectoryURLForNewVersionOfItemAtURL_ = objc + .registerName("temporaryDirectoryURLForNewVersionOfItemAtURL:"); +late final _sel_threadDictionary = objc.registerName("threadDictionary"); +late final _sel_threadPriority = objc.registerName("threadPriority"); late final _sel_throughput = objc.registerName("throughput"); late final _sel_timeInterval = objc.registerName("timeInterval"); late final _sel_timeIntervalSince1970 = objc.registerName( @@ -43655,6 +48179,18 @@ late final _sel_timeIntervalSinceNow = objc.registerName( late final _sel_timeIntervalSinceReferenceDate = objc.registerName( "timeIntervalSinceReferenceDate", ); +late final _sel_timeZone = objc.registerName("timeZone"); +late final _sel_timeZoneDataVersion = objc.registerName("timeZoneDataVersion"); +late final _sel_timeZoneForSecondsFromGMT_ = objc.registerName( + "timeZoneForSecondsFromGMT:", +); +late final _sel_timeZoneWithAbbreviation_ = objc.registerName( + "timeZoneWithAbbreviation:", +); +late final _sel_timeZoneWithName_ = objc.registerName("timeZoneWithName:"); +late final _sel_timeZoneWithName_data_ = objc.registerName( + "timeZoneWithName:data:", +); late final _sel_timerWithTimeInterval_invocation_repeats_ = objc.registerName( "timerWithTimeInterval:invocation:repeats:", ); @@ -43663,13 +48199,40 @@ late final _sel_timerWithTimeInterval_repeats_block_ = objc.registerName( ); late final _sel_timerWithTimeInterval_target_selector_userInfo_repeats_ = objc .registerName("timerWithTimeInterval:target:selector:userInfo:repeats:"); +late final _sel_toManyRelationshipKeys = objc.registerName( + "toManyRelationshipKeys", +); +late final _sel_toOneRelationshipKeys = objc.registerName( + "toOneRelationshipKeys", +); late final _sel_tolerance = objc.registerName("tolerance"); late final _sel_totalUnitCount = objc.registerName("totalUnitCount"); +late final _sel_transactionID = objc.registerName("transactionID"); +late final _sel_trashItemAtURL_resultingItemURL_error_ = objc.registerName( + "trashItemAtURL:resultingItemURL:error:", +); +late final _sel_trueExpression = objc.registerName("trueExpression"); +late final _sel_typeCodeValue = objc.registerName("typeCodeValue"); +late final _sel_typeForArgumentWithName_ = objc.registerName( + "typeForArgumentWithName:", +); +late final _sel_typeForKey_ = objc.registerName("typeForKey:"); +late final _sel_ubiquityIdentityToken = objc.registerName( + "ubiquityIdentityToken", +); +late final _sel_unableToSetNilForKey_ = objc.registerName( + "unableToSetNilForKey:", +); late final _sel_underlyingErrors = objc.registerName("underlyingErrors"); late final _sel_unionOrderedSet_ = objc.registerName("unionOrderedSet:"); late final _sel_unionSet_ = objc.registerName("unionSet:"); late final _sel_unload = objc.registerName("unload"); +late final _sel_unmountVolumeAtURL_options_completionHandler_ = objc + .registerName("unmountVolumeAtURL:options:completionHandler:"); late final _sel_unpublish = objc.registerName("unpublish"); +late final _sel_unresolvedConflictVersionsOfItemAtURL_ = objc.registerName( + "unresolvedConflictVersionsOfItemAtURL:", +); late final _sel_unsignedCharValue = objc.registerName("unsignedCharValue"); late final _sel_unsignedIntValue = objc.registerName("unsignedIntValue"); late final _sel_unsignedIntegerValue = objc.registerName( @@ -43680,6 +48243,10 @@ late final _sel_unsignedLongLongValue = objc.registerName( ); late final _sel_unsignedLongValue = objc.registerName("unsignedLongValue"); late final _sel_unsignedShortValue = objc.registerName("unsignedShortValue"); +late final _sel_uploadLocalVersionOfUbiquitousItemAtURL_withConflictResolutionPolicy_completionHandler_ = + objc.registerName( + "uploadLocalVersionOfUbiquitousItemAtURL:withConflictResolutionPolicy:completionHandler:", + ); late final _sel_uppercaseLetterCharacterSet = objc.registerName( "uppercaseLetterCharacterSet", ); @@ -43687,26 +48254,100 @@ late final _sel_uppercaseString = objc.registerName("uppercaseString"); late final _sel_uppercaseStringWithLocale_ = objc.registerName( "uppercaseStringWithLocale:", ); +late final _sel_useStoredAccessor = objc.registerName("useStoredAccessor"); late final _sel_user = objc.registerName("user"); late final _sel_userInfo = objc.registerName("userInfo"); late final _sel_userInfoValueProviderForDomain_ = objc.registerName( "userInfoValueProviderForDomain:", ); +late final _sel_usesMetricSystem = objc.registerName("usesMetricSystem"); +late final _sel_validateValue_forKeyPath_error_ = objc.registerName( + "validateValue:forKeyPath:error:", +); +late final _sel_validateValue_forKey_error_ = objc.registerName( + "validateValue:forKey:error:", +); +late final _sel_valueAtIndex_inPropertyWithKey_ = objc.registerName( + "valueAtIndex:inPropertyWithKey:", +); +late final _sel_valueForKeyPath_ = objc.registerName("valueForKeyPath:"); +late final _sel_valueForKey_ = objc.registerName("valueForKey:"); +late final _sel_valueForUndefinedKey_ = objc.registerName( + "valueForUndefinedKey:", +); +late final _sel_valueWithBytes_objCType_ = objc.registerName( + "valueWithBytes:objCType:", +); +late final _sel_valueWithEdgeInsets_ = objc.registerName( + "valueWithEdgeInsets:", +); +late final _sel_valueWithName_inPropertyWithKey_ = objc.registerName( + "valueWithName:inPropertyWithKey:", +); +late final _sel_valueWithNonretainedObject_ = objc.registerName( + "valueWithNonretainedObject:", +); +late final _sel_valueWithPoint_ = objc.registerName("valueWithPoint:"); +late final _sel_valueWithPointer_ = objc.registerName("valueWithPointer:"); +late final _sel_valueWithRange_ = objc.registerName("valueWithRange:"); +late final _sel_valueWithRect_ = objc.registerName("valueWithRect:"); +late final _sel_valueWithSize_ = objc.registerName("valueWithSize:"); +late final _sel_valueWithUniqueID_inPropertyWithKey_ = objc.registerName( + "valueWithUniqueID:inPropertyWithKey:", +); +late final _sel_value_withObjCType_ = objc.registerName("value:withObjCType:"); +late final _sel_valuesForKeys_ = objc.registerName("valuesForKeys:"); +late final _sel_variable = objc.registerName("variable"); +late final _sel_variantCode = objc.registerName("variantCode"); +late final _sel_variantFittingPresentationWidth_ = objc.registerName( + "variantFittingPresentationWidth:", +); +late final _sel_version = objc.registerName("version"); late final _sel_versionForClassName_ = objc.registerName( "versionForClassName:", ); +late final _sel_versionOfItemAtURL_forPersistentIdentifier_ = objc.registerName( + "versionOfItemAtURL:forPersistentIdentifier:", +); +late final _sel_visitExpressionKeyPath_scope_key_error_ = objc.registerName( + "visitExpressionKeyPath:scope:key:error:", +); +late final _sel_visitExpression_error_ = objc.registerName( + "visitExpression:error:", +); +late final _sel_visitOperatorType_error_ = objc.registerName( + "visitOperatorType:error:", +); +late final _sel_visitPredicate_error_ = objc.registerName( + "visitPredicate:error:", +); late final _sel_whitespaceAndNewlineCharacterSet = objc.registerName( "whitespaceAndNewlineCharacterSet", ); late final _sel_whitespaceCharacterSet = objc.registerName( "whitespaceCharacterSet", ); +late final _sel_willChangeValueForKey_ = objc.registerName( + "willChangeValueForKey:", +); +late final _sel_willChangeValueForKey_withSetMutation_usingObjects_ = objc + .registerName("willChangeValueForKey:withSetMutation:usingObjects:"); +late final _sel_willChange_valuesAtIndexes_forKey_ = objc.registerName( + "willChange:valuesAtIndexes:forKey:", +); +late final _sel_windowsLocaleCodeFromLocaleIdentifier_ = objc.registerName( + "windowsLocaleCodeFromLocaleIdentifier:", +); late final _sel_writableTypeIdentifiersForItemProvider = objc.registerName( "writableTypeIdentifiersForItemProvider", ); late final _sel_writeBookmarkData_toURL_options_error_ = objc.registerName( "writeBookmarkData:toURL:options:error:", ); +late final _sel_writeData_ = objc.registerName("writeData:"); +late final _sel_writeProperty_forKey_ = objc.registerName( + "writeProperty:forKey:", +); late final _sel_writeToFile_atomically_ = objc.registerName( "writeToFile:atomically:", ); @@ -43727,6 +48368,9 @@ late final _sel_writeToURL_options_error_ = objc.registerName( "writeToURL:options:error:", ); late final _sel_write_maxLength_ = objc.registerName("write:maxLength:"); +late final _sel_yearOfCommonEra = objc.registerName("yearOfCommonEra"); +late final _sel_years_months_days_hours_minutes_seconds_sinceDate_ = objc + .registerName("years:months:days:hours:minutes:seconds:sinceDate:"); late final _sel_zone = objc.registerName("zone"); typedef instancetype = ffi.Pointer; typedef Dartinstancetype = objc.ObjCObject; diff --git a/pkgs/objective_c/src/objective_c_bindings_generated.m b/pkgs/objective_c/src/objective_c_bindings_generated.m index fc48e7dedb..d271c8bdb9 100644 --- a/pkgs/objective_c/src/objective_c_bindings_generated.m +++ b/pkgs/objective_c/src/objective_c_bindings_generated.m @@ -83,6 +83,9 @@ __attribute__((visibility("default"))) __attribute__((used)) Protocol* _1wx624s_NSStreamDelegate(void) { return @protocol(NSStreamDelegate); } +__attribute__((visibility("default"))) __attribute__((used)) +Protocol* _1wx624s_NSURLHandleClient(void) { return @protocol(NSURLHandleClient); } + typedef id (^_ProtocolTrampoline)(void * sel); __attribute__((visibility("default"))) __attribute__((used)) id _1wx624s_protocolTrampoline_1mbt9g9(id target, void * sel) { @@ -529,19 +532,48 @@ _ListenerTrampoline_15 _1wx624s_wrapBlockingBlock_zuf90e( }); } -typedef void (^_ListenerTrampoline_16)(id arg0, unsigned long arg1, BOOL * arg2); +typedef void (^_ListenerTrampoline_16)(void * arg0, id arg1, id arg2); +__attribute__((visibility("default"))) __attribute__((used)) +_ListenerTrampoline_16 _1wx624s_wrapListenerBlock_fjrv01(_ListenerTrampoline_16 block) NS_RETURNS_RETAINED { + return ^void(void * arg0, id arg1, id arg2) { + objc_retainBlock(block); + block(arg0, (__bridge id)(__bridge_retained void*)(arg1), (__bridge id)(__bridge_retained void*)(arg2)); + }; +} + +typedef void (^_BlockingTrampoline_16)(void * waiter, void * arg0, id arg1, id arg2); +__attribute__((visibility("default"))) __attribute__((used)) +_ListenerTrampoline_16 _1wx624s_wrapBlockingBlock_fjrv01( + _BlockingTrampoline_16 block, _BlockingTrampoline_16 listenerBlock, + DOBJC_Context* ctx) NS_RETURNS_RETAINED { + BLOCKING_BLOCK_IMPL(ctx, ^void(void * arg0, id arg1, id arg2), { + objc_retainBlock(block); + block(nil, arg0, (__bridge id)(__bridge_retained void*)(arg1), (__bridge id)(__bridge_retained void*)(arg2)); + }, { + objc_retainBlock(listenerBlock); + listenerBlock(waiter, arg0, (__bridge id)(__bridge_retained void*)(arg1), (__bridge id)(__bridge_retained void*)(arg2)); + }); +} + +typedef void (^_ProtocolTrampoline_13)(void * sel, id arg1, id arg2); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_16 _1wx624s_wrapListenerBlock_1p9ui4q(_ListenerTrampoline_16 block) NS_RETURNS_RETAINED { +void _1wx624s_protocolTrampoline_fjrv01(id target, void * sel, id arg1, id arg2) { + return ((_ProtocolTrampoline_13)((id (*)(id, SEL, SEL))objc_msgSend)(target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1, arg2); +} + +typedef void (^_ListenerTrampoline_17)(id arg0, unsigned long arg1, BOOL * arg2); +__attribute__((visibility("default"))) __attribute__((used)) +_ListenerTrampoline_17 _1wx624s_wrapListenerBlock_1p9ui4q(_ListenerTrampoline_17 block) NS_RETURNS_RETAINED { return ^void(id arg0, unsigned long arg1, BOOL * arg2) { objc_retainBlock(block); block((__bridge id)(__bridge_retained void*)(arg0), arg1, arg2); }; } -typedef void (^_BlockingTrampoline_16)(void * waiter, id arg0, unsigned long arg1, BOOL * arg2); +typedef void (^_BlockingTrampoline_17)(void * waiter, id arg0, unsigned long arg1, BOOL * arg2); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_16 _1wx624s_wrapBlockingBlock_1p9ui4q( - _BlockingTrampoline_16 block, _BlockingTrampoline_16 listenerBlock, +_ListenerTrampoline_17 _1wx624s_wrapBlockingBlock_1p9ui4q( + _BlockingTrampoline_17 block, _BlockingTrampoline_17 listenerBlock, DOBJC_Context* ctx) NS_RETURNS_RETAINED { BLOCKING_BLOCK_IMPL(ctx, ^void(id arg0, unsigned long arg1, BOOL * arg2), { objc_retainBlock(block); @@ -552,19 +584,19 @@ _ListenerTrampoline_16 _1wx624s_wrapBlockingBlock_1p9ui4q( }); } -typedef void (^_ListenerTrampoline_17)(unsigned short * arg0, unsigned long arg1); +typedef void (^_ListenerTrampoline_18)(unsigned short * arg0, unsigned long arg1); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_17 _1wx624s_wrapListenerBlock_vhbh5h(_ListenerTrampoline_17 block) NS_RETURNS_RETAINED { +_ListenerTrampoline_18 _1wx624s_wrapListenerBlock_vhbh5h(_ListenerTrampoline_18 block) NS_RETURNS_RETAINED { return ^void(unsigned short * arg0, unsigned long arg1) { objc_retainBlock(block); block(arg0, arg1); }; } -typedef void (^_BlockingTrampoline_17)(void * waiter, unsigned short * arg0, unsigned long arg1); +typedef void (^_BlockingTrampoline_18)(void * waiter, unsigned short * arg0, unsigned long arg1); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_17 _1wx624s_wrapBlockingBlock_vhbh5h( - _BlockingTrampoline_17 block, _BlockingTrampoline_17 listenerBlock, +_ListenerTrampoline_18 _1wx624s_wrapBlockingBlock_vhbh5h( + _BlockingTrampoline_18 block, _BlockingTrampoline_18 listenerBlock, DOBJC_Context* ctx) NS_RETURNS_RETAINED { BLOCKING_BLOCK_IMPL(ctx, ^void(unsigned short * arg0, unsigned long arg1), { objc_retainBlock(block); @@ -575,34 +607,34 @@ _ListenerTrampoline_17 _1wx624s_wrapBlockingBlock_vhbh5h( }); } -typedef id (^_ProtocolTrampoline_13)(void * sel, id arg1); +typedef id (^_ProtocolTrampoline_14)(void * sel, id arg1); __attribute__((visibility("default"))) __attribute__((used)) id _1wx624s_protocolTrampoline_xr62hr(id target, void * sel, id arg1) { - return ((_ProtocolTrampoline_13)((id (*)(id, SEL, SEL))objc_msgSend)(target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1); + return ((_ProtocolTrampoline_14)((id (*)(id, SEL, SEL))objc_msgSend)(target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1); } -typedef id (^_ProtocolTrampoline_14)(void * sel, struct _NSZone * arg1); +typedef id (^_ProtocolTrampoline_15)(void * sel, struct _NSZone * arg1); __attribute__((visibility("default"))) __attribute__((used)) id _1wx624s_protocolTrampoline_18nsem0(id target, void * sel, struct _NSZone * arg1) { - return ((_ProtocolTrampoline_14)((id (*)(id, SEL, SEL))objc_msgSend)(target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1); + return ((_ProtocolTrampoline_15)((id (*)(id, SEL, SEL))objc_msgSend)(target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1); } -typedef id (^_ProtocolTrampoline_15)(void * sel, struct objc_selector * arg1); +typedef id (^_ProtocolTrampoline_16)(void * sel, struct objc_selector * arg1); __attribute__((visibility("default"))) __attribute__((used)) id _1wx624s_protocolTrampoline_50as9u(id target, void * sel, struct objc_selector * arg1) { - return ((_ProtocolTrampoline_15)((id (*)(id, SEL, SEL))objc_msgSend)(target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1); + return ((_ProtocolTrampoline_16)((id (*)(id, SEL, SEL))objc_msgSend)(target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1); } -typedef id (^_ProtocolTrampoline_16)(void * sel, struct objc_selector * arg1, id arg2); +typedef id (^_ProtocolTrampoline_17)(void * sel, struct objc_selector * arg1, id arg2); __attribute__((visibility("default"))) __attribute__((used)) id _1wx624s_protocolTrampoline_1mllhpc(id target, void * sel, struct objc_selector * arg1, id arg2) { - return ((_ProtocolTrampoline_16)((id (*)(id, SEL, SEL))objc_msgSend)(target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1, arg2); + return ((_ProtocolTrampoline_17)((id (*)(id, SEL, SEL))objc_msgSend)(target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1, arg2); } -typedef id (^_ProtocolTrampoline_17)(void * sel, struct objc_selector * arg1, id arg2, id arg3); +typedef id (^_ProtocolTrampoline_18)(void * sel, struct objc_selector * arg1, id arg2, id arg3); __attribute__((visibility("default"))) __attribute__((used)) id _1wx624s_protocolTrampoline_c7gk2u(id target, void * sel, struct objc_selector * arg1, id arg2, id arg3) { - return ((_ProtocolTrampoline_17)((id (*)(id, SEL, SEL))objc_msgSend)(target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1, arg2, arg3); + return ((_ProtocolTrampoline_18)((id (*)(id, SEL, SEL))objc_msgSend)(target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1, arg2, arg3); } __attribute__((visibility("default"))) __attribute__((used)) diff --git a/pkgs/objective_c/test/interface_lists_test.dart b/pkgs/objective_c/test/interface_lists_test.dart index 19837be516..aafae401b7 100644 --- a/pkgs/objective_c/test/interface_lists_test.dart +++ b/pkgs/objective_c/test/interface_lists_test.dart @@ -32,7 +32,9 @@ void expectSetsEqual(String name, Set expected, Set actual) { void mergeLinewithNext(List lines, String toMerge) { final i = lines.indexOf(toMerge); - lines[i] += lines.removeAt(i + 1); + if (i != -1) { + lines[i] += lines.removeAt(i + 1); + } } void main() { @@ -50,6 +52,10 @@ void main() { bindings, 'extension type NSAttributedStringMarkdownParsingOptions._(', ); + mergeLinewithNext( + bindings, + 'extension type NSAttributedStringMarkdownSourcePosition._(', + ); }); Set findBindings(RegExp re) => diff --git a/pkgs/objective_c/tool/generate_code.dart b/pkgs/objective_c/tool/generate_code.dart index 3e90345299..8a183983f5 100644 --- a/pkgs/objective_c/tool/generate_code.dart +++ b/pkgs/objective_c/tool/generate_code.dart @@ -2,18 +2,17 @@ // 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.in into the +// Re-compile trigger. + +// Runs the FFIgen visitors, then merges tool/data/extra_methods.dart.in into the // Objective C bindings. import 'dart:io'; +import 'dart:isolate'; import 'package:args/args.dart'; -import 'package:ffigen/src/executables/ffigen.dart' as ffigen; -import 'package:yaml/yaml.dart'; +import 'package:ffigen/ffigen.dart'; -const runtimeConfig = 'ffigen_runtime.yaml'; -const cConfig = 'ffigen_c.yaml'; -const objcConfig = 'ffigen_objc.yaml'; const runtimeBindings = 'lib/src/runtime_bindings_generated.dart'; const cBindings = 'lib/src/c_bindings_generated.dart'; const objcBindings = 'lib/src/objective_c_bindings_generated.dart'; @@ -23,8 +22,6 @@ const builtInTypes = '../ffigen/lib/src/code_generator/objc_built_in_types.dart'; const interfaceListTest = 'test/interface_lists_test.dart'; -const ffigenFlags = ['--no-format', '-v', 'severe', '--config']; - void dartCmd(List args) { final exec = Platform.resolvedExecutable; final proc = Process.runSync(exec, args, runInShell: true); @@ -64,13 +61,30 @@ Map parseExtraMethods(String filename) { void mergeExtraMethods(String filename, Map extraMethods) { final out = StringBuffer(); + String? pendingClass; + String? pendingExtra; + for (final line in File(filename).readAsLinesSync()) { out.writeln(line); - final cls = parseClassDecl(line); - final extra = cls == null ? null : extraMethods[cls]; - if (cls != null && extra != null) { - out.writeln(extra); - extraMethods.remove(cls); + if (pendingClass != null) { + if (line.contains('{')) { + out.writeln(pendingExtra); + pendingClass = null; + pendingExtra = null; + } + } else { + final cls = parseClassDecl(line); + final extra = cls == null ? null : extraMethods[cls]; + if (cls != null && extra != null) { + if (line.contains('{')) { + out.writeln(extra); + extraMethods.remove(cls); + } else { + pendingClass = cls; + pendingExtra = extra; + extraMethods.remove(cls); + } + } } } assert(extraMethods.isEmpty); @@ -78,8 +92,467 @@ void mergeExtraMethods(String filename, Map extraMethods) { File(filename).writeAsStringSync(out.toString()); } -List writeBuiltInTypes(String config, String out) { - final yaml = loadYaml(File(config).readAsStringSync()) as YamlMap; +class RuntimeBindingsVisitor extends Visitor { + static const functions = { + 'object_getClass', + 'sel_registerName', + 'sel_getName', + 'protocol_getMethodDescription', + 'protocol_getName', + }; + + static const functionRenames = { + 'sel_registerName': 'registerName', + 'sel_getName': 'getName', + 'objc_getClass': 'getClass', + 'objc_retain': 'objectRetain', + 'objc_retainBlock': 'blockRetain', + 'objc_release': 'objectRelease', + 'objc_autorelease': 'objectAutorelease', + 'objc_msgSend': 'msgSend', + 'objc_msgSend_fpret': 'msgSendFpret', + 'objc_msgSend_stret': 'msgSendStret', + 'object_getClass': 'getObjectClass', + 'objc_copyClassList': 'copyClassList', + 'objc_getProtocol': 'getProtocol', + 'objc_autoreleasePoolPush': 'autoreleasePoolPush', + 'objc_autoreleasePoolPop': 'autoreleasePoolPop', + 'protocol_getMethodDescription': 'getMethodDescription', + 'protocol_getName': 'getProtocolName', + }; + + static const globals = { + 'NSKeyValueChangeIndexesKey', + 'NSKeyValueChangeKindKey', + 'NSKeyValueChangeNewKey', + 'NSKeyValueChangeNotificationIsPriorKey', + 'NSKeyValueChangeOldKey', + 'NSLocalizedDescriptionKey', + }; + + const RuntimeBindingsVisitor(); + + @override + void visitFunc(Func node) { + final isObjc = node.originalName.startsWith('objc_'); + if (!isObjc && !functions.contains(node.originalName)) { + node.isExcluded = true; + return; + } + node.isExcluded = false; + if (!node.originalName.startsWith('objc_msgSend')) { + node.isLeaf = true; + } + final renamed = functionRenames[node.originalName]; + if (renamed != null) { + node.name = renamed; + } + } + + @override + void visitGlobal(Global node) { + if (node.originalName.startsWith('_') && + node.originalName.endsWith('Block')) { + node.isExcluded = false; + node.name = node.originalName.substring(1); + } else if (globals.contains(node.originalName)) { + node.isExcluded = false; + if (node.originalName.startsWith('_')) { + node.name = node.originalName.substring(1); + } + } else { + node.isExcluded = true; + } + } + + @override + void visitStruct(Struct node) { + if (node.originalName.startsWith('_ObjC')) { + node.isExcluded = false; + node.name = 'ObjC${node.originalName.substring(5)}'; + } + } + + @override + void visitEnum(EnumClass node) { + node.isExcluded = true; + } + + @override + void visitMacroConstant(MacroConstant node) { + node.isExcluded = true; + } + + @override + void visitUnnamedEnumConstant(UnnamedEnumConstant node) { + node.isExcluded = true; + } + + @override + void visitUnion(Union node) { + node.isExcluded = true; + } +} + +class CBindingsVisitor extends Visitor { + static const nonLeaf = { + 'DOBJC_deleteFinalizableHandle', + 'DOBJC_disposeObjCBlockWithClosure', + 'DOBJC_newFinalizableBool', + 'DOBJC_newFinalizableHandle', + 'DOBJC_awaitWaiter', + }; + + const CBindingsVisitor(); + + @override + void visitFunc(Func node) { + final isDobjc = node.originalName.startsWith('DOBJC_'); + final isNewFinalizable = node.originalName == 'newFinalizableHandle'; + if (!isDobjc && !isNewFinalizable) { + node.isExcluded = true; + return; + } + node.isExcluded = false; + if (!nonLeaf.contains(node.originalName)) { + node.isLeaf = true; + } + if (isDobjc) { + node.name = node.originalName.substring(6); + } + } + + @override + void visitTypealias(Typealias node) { + if (node.originalName == 'Dart_FinalizableHandle') { + node.isExcluded = false; + } + } + + @override + void visitStruct(Struct node) { + if (node.originalName == '_DOBJC_Context') { + node.isExcluded = false; + node.name = 'DOBJC_Context'; + } else if (node.originalName == '_Dart_FinalizableHandle') { + node.isExcluded = false; + node.name = 'Dart_FinalizableHandle_'; + } else if (node.originalName.startsWith('_ObjC')) { + node.isExcluded = false; + node.name = 'ObjC${node.originalName.substring(5)}'; + } + } + + @override + void visitMacroConstant(MacroConstant node) { + if (node.originalName == 'ILLEGAL_PORT') { + node.isExcluded = false; + } else { + node.isExcluded = true; + } + } + + @override + void visitEnum(EnumClass node) { + node.isExcluded = true; + } + + @override + void visitGlobal(Global node) { + node.isExcluded = true; + } + + @override + void visitUnnamedEnumConstant(UnnamedEnumConstant node) { + node.isExcluded = true; + } + + @override + void visitUnion(Union node) { + node.isExcluded = true; + } +} + +class ObjCBindingsVisitor extends Visitor { + static const interfaces = { + 'DOBJCDartInputStreamAdapter': 'DartInputStreamAdapter', + 'DOBJCDartInputStreamAdapterWeakHolder': + 'DartInputStreamAdapterWeakHolder', + 'DOBJCObservation': 'DOBJCObservation', + 'DOBJCDartProtocolBuilder': 'DartProtocolBuilder', + 'DOBJCDartProtocol': 'DartProtocol', + 'NSArray': 'NSArray', + 'NSAttributedString': 'NSAttributedString', + 'NSAttributedStringMarkdownParsingOptions': + 'NSAttributedStringMarkdownParsingOptions', + 'NSBundle': 'NSBundle', + 'NSCharacterSet': 'NSCharacterSet', + 'NSCoder': 'NSCoder', + 'NSData': 'NSData', + 'NSDate': 'NSDate', + 'NSDictionary': 'NSDictionary', + 'NSEnumerator': 'NSEnumerator', + 'NSError': 'NSError', + 'NSIndexSet': 'NSIndexSet', + 'NSInputStream': 'NSInputStream', + 'NSInvocation': 'NSInvocation', + 'NSItemProvider': 'NSItemProvider', + 'NSLocale': 'NSLocale', + 'NSMethodSignature': 'NSMethodSignature', + 'NSMutableArray': 'NSMutableArray', + 'NSMutableData': 'NSMutableData', + 'NSMutableDictionary': 'NSMutableDictionary', + 'NSMutableIndexSet': 'NSMutableIndexSet', + 'NSMutableOrderedSet': 'NSMutableOrderedSet', + 'NSMutableSet': 'NSMutableSet', + 'NSMutableString': 'NSMutableString', + 'NSNotification': 'NSNotification', + 'NSNull': 'NSNull', + 'NSNumber': 'NSNumber', + 'NSObject': 'NSObject', + 'NSOutputStream': 'NSOutputStream', + 'NSOrderedCollectionChange': 'NSOrderedCollectionChange', + 'NSOrderedCollectionDifference': 'NSOrderedCollectionDifference', + 'NSOrderedSet': 'NSOrderedSet', + 'NSPort': 'NSPort', + 'NSPortMessage': 'NSPortMessage', + 'NSProgress': 'NSProgress', + 'NSRunLoop': 'NSRunLoop', + 'NSSet': 'NSSet', + 'NSStream': 'NSStream', + 'NSString': 'NSString', + 'NSTimer': 'NSTimer', + 'NSURL': 'NSURL', + 'NSURLHandle': 'NSURLHandle', + 'NSValue': 'NSValue', + 'Protocol': 'Protocol', + }; + + static const protocols = { + 'NSCoding': 'NSCoding', + 'NSCopying': 'NSCopying', + 'NSFastEnumeration': 'NSFastEnumeration', + 'NSItemProviderReading': 'NSItemProviderReading', + 'NSItemProviderWriting': 'NSItemProviderWriting', + 'NSMutableCopying': 'NSMutableCopying', + 'NSObject': 'NSObjectProtocol', + 'NSPortDelegate': 'NSPortDelegate', + 'NSSecureCoding': 'NSSecureCoding', + 'NSStreamDelegate': 'NSStreamDelegate', + 'NSURLHandleClient': 'NSURLHandleClient', + 'Observer': 'Observer', + }; + + static const categories = { + 'NSDataCreation', + 'NSExtendedArray', + 'NSExtendedData', + 'NSExtendedDate', + 'NSExtendedDictionary', + 'NSExtendedEnumerator', + 'NSExtendedMutableArray', + 'NSExtendedMutableData', + 'NSExtendedMutableDictionary', + 'NSExtendedMutableOrderedSet', + 'NSExtendedMutableSet', + 'NSExtendedOrderedSet', + 'NSExtendedSet', + 'NSNumberCreation', + 'NSNumberIsFloat', + 'NSNumberIsBool', + 'NSStringExtensionMethods', + }; + + static const structs = { + 'AEDesc': 'AEDesc', + '__CFRunLoop': 'CFRunLoop', + '__CFString': 'CFString', + 'CGPoint': 'CGPoint', + '_CGPoint': 'CGPoint', + 'CGRect': 'CGRect', + '_CGRect': 'CGRect', + 'CGSize': 'CGSize', + '_CGSize': 'CGSize', + 'NSEdgeInsets': 'NSEdgeInsets', + '_NSEdgeInsets': 'NSEdgeInsets', + 'NSFastEnumerationState': 'NSFastEnumerationState', + '_NSFastEnumerationState': 'NSFastEnumerationState', + '_NSRange': 'NSRange', + 'NSRange': 'NSRange', + '_NSZone': 'NSZone', + 'NSZone': 'NSZone', + 'OpaqueAEDataStorageType': 'OpaqueAEDataStorageType', + }; + + static const enums = { + 'NSAppleEventSendOptions', + 'NSAttributedStringEnumerationOptions', + 'NSAttributedStringFormattingOptions', + 'NSAttributedStringMarkdownInterpretedSyntax', + 'NSAttributedStringMarkdownParsingFailurePolicy', + 'NSBinarySearchingOptions', + 'NSCollectionChangeType', + 'NSComparisonResult', + 'NSDataBase64DecodingOptions', + 'NSDataBase64EncodingOptions', + 'NSDataCompressionAlgorithm', + 'NSDataReadingOptions', + 'NSDataSearchOptions', + 'NSDataWritingOptions', + 'NSDecodingFailurePolicy', + 'NSEnumerationOptions', + 'NSItemProviderFileOptions', + 'NSItemProviderRepresentationVisibility', + 'NSKeyValueChange', + 'NSKeyValueObservingOptions', + 'NSKeyValueSetMutationKind', + 'NSLinguisticTaggerOptions', + 'NSLocaleLanguageDirection', + 'NSOrderedCollectionDifferenceCalculationOptions', + 'NSPropertyListFormat', + 'NSQualityOfService', + 'NSSortOptions', + 'NSStreamEvent', + 'NSStreamStatus', + 'NSStringCompareOptions', + 'NSStringEncodingConversionOptions', + 'NSStringEnumerationOptions', + 'NSURLBookmarkCreationOptions', + 'NSURLBookmarkResolutionOptions', + 'NSURLHandleStatus', + }; + + const ObjCBindingsVisitor(); + + @override + void visitFunc(Func node) { + node.isExcluded = true; + } + + @override + void visitObjCInterface(ObjCInterface node) { + final renamed = interfaces[node.originalName]; + if (renamed != null) { + node.isExcluded = false; + node.name = renamed; + } + if (node.originalName == 'NSBundle') { + for (final method in node.methods) { + if (method.originalName == + 'localizedStringForKey:value:table:localizations:') { + method.isExcluded = true; + } + } + } + } + + @override + void visitObjCProtocol(ObjCProtocol node) { + final renamed = protocols[node.originalName]; + if (renamed != null) { + node.isExcluded = false; + node.name = renamed; + } + } + + @override + void visitObjCCategory(ObjCCategory node) { + if (categories.contains(node.originalName)) { + node.isExcluded = false; + } else { + node.isExcluded = true; + } + } + + @override + void visitStruct(Struct node) { + if (node.originalName.isEmpty) { + node.isExcluded = true; + return; + } + final renamed = structs[node.originalName]; + if (renamed != null) { + node.isExcluded = false; + node.name = renamed; + } + } + + @override + void visitEnum(EnumClass node) { + if (enums.contains(node.originalName)) { + node.isExcluded = false; + } else { + node.isExcluded = true; + } + } + + @override + void visitTypealias(Typealias node) { + if (node.originalName == 'CFStringRef') { + node.isExcluded = false; + } + } + + @override + void visitGlobal(Global node) { + node.isExcluded = true; + } + + @override + void visitMacroConstant(MacroConstant node) { + node.isExcluded = true; + } + + @override + void visitUnnamedEnumConstant(UnnamedEnumConstant node) { + node.isExcluded = true; + } + + @override + void visitUnion(Union node) { + node.isExcluded = true; + } +} + +List writeBuiltInTypes(String out, String bindingsFile) { + final bindingsLines = File(bindingsFile).readAsLinesSync(); + Set findBindings(RegExp re) => + bindingsLines.map(re.firstMatch).nonNulls.map((match) => match[1]!).toSet(); + + final genInterfaces = findBindings( + RegExp(r'^extension type ([^_]\w*)\._\( *objc\.ObjCObject '), + ).toList()..sort(); + final genStructs = findBindings( + RegExp(r'^final class (\w+) extends ffi\.(Struct|Opaque)'), + ).toList()..sort(); + final genEnums = findBindings( + RegExp(r'^(?:enum|sealed class) (\w+) {'), + ).toList()..sort(); + final genProtocols = findBindings( + RegExp(r'^extension type ([^_]\w*)\._\(objc\.ObjCProtocol '), + ).toList()..sort(); + final genCategories = findBindings( + RegExp(r'^extension (\w+) on \w+ {'), + ).toList()..sort(); + + final interfacesMap = { + for (final name in genInterfaces) + (ObjCBindingsVisitor.interfaces.entries + .firstWhere((e) => e.value == name, orElse: () => MapEntry(name, name)) + .key): name, + }; + final structsMap = { + for (final name in genStructs) + (ObjCBindingsVisitor.structs.entries + .firstWhere((e) => e.value == name, orElse: () => MapEntry(name, name)) + .key): name, + }; + final protocolsMap = { + for (final name in genProtocols) + (ObjCBindingsVisitor.protocols.entries + .firstWhere((e) => e.value == name, orElse: () => MapEntry(name, name)) + .key): name, + }; final s = StringBuffer(); final exports = {}; @@ -92,20 +565,22 @@ List writeBuiltInTypes(String config, String out) { // Generated by package:objective_c's tool/generate_code.dart. '''); - Iterable writeDecls(String name, String key) { - final decls = yaml[key] as YamlMap; - final renames = decls['rename'] as YamlMap? ?? YamlMap(); - final includes = decls['include'] as YamlList; - - final names = { - for (final inc in includes.map((i) => i as String)) - inc: renames[inc] as String? ?? inc, - }; - exports.addAll(names.values); - final anyRenames = names.entries.any((kv) => kv.key != kv.value); - final elements = anyRenames - ? names.entries.map((kv) => " '${kv.key}': '${kv.value}',") - : names.keys.map((key) => " '$key',"); + void writeDecls( + String name, + Map namesMap, [ + Iterable? namesIterable, + ]) { + final keys = namesIterable ?? namesMap.keys; + final map = + namesIterable != null + ? {for (final k in keys) k: k} + : Map.from(namesMap); + exports.addAll(map.values); + final anyRenames = map.entries.any((kv) => kv.key != kv.value); + final elements = + anyRenames + ? map.entries.map((kv) => " '${kv.key}': '${kv.value}',") + : map.keys.map((key) => " '$key',"); s.write(''' @@ -113,17 +588,22 @@ const $name = { ${elements.join('\n')} }; '''); - return names.values; } - final interfaces = writeDecls('objCBuiltInInterfaces', 'objc-interfaces'); - exports.addAll([for (final name in interfaces) '$name\$Methods']); - writeDecls('objCBuiltInCompounds', 'structs'); - writeDecls('objCBuiltInEnums', 'enums'); - final protocols = writeDecls('objCBuiltInProtocols', 'objc-protocols'); - exports.addAll([for (final name in protocols) '$name\$Methods']); - exports.addAll([for (final name in protocols) '$name\$Builder']); - writeDecls('objCBuiltInCategories', 'objc-categories'); + writeDecls('objCBuiltInInterfaces', interfacesMap); + exports.addAll([ + for (final name in interfacesMap.values) '$name\$Methods', + ]); + writeDecls('objCBuiltInCompounds', structsMap); + writeDecls('objCBuiltInEnums', {}, genEnums); + writeDecls('objCBuiltInProtocols', protocolsMap); + exports.addAll([ + for (final name in protocolsMap.values) '$name\$Methods', + ]); + exports.addAll([ + for (final name in protocolsMap.values) '$name\$Builder', + ]); + writeDecls('objCBuiltInCategories', {}, genCategories); File(out).writeAsStringSync(s.toString()); @@ -145,18 +625,104 @@ export 'objective_c_bindings_generated.dart' } Future run({required bool format}) async { + final pkgUri = await Isolate.resolvePackageUri( + Uri.parse('package:objective_c/objective_c.dart'), + ); + final root = (pkgUri ?? Platform.script).resolve('../'); + print('Generating runtime bindings...'); - await ffigen.main([...ffigenFlags, runtimeConfig]); + FfiGenerator( + headers: Headers(entryPoints: [root.resolve('src/objective_c_runtime.h')]), + visitors: [const RuntimeBindingsVisitor()], + output: Output( + 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/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 +// ignore_for_file: unused_element +// coverage:ignore-file +''', + style: const NativeExternalBindings(), + dartFile: root.resolve(runtimeBindings), + ), + ).generate(); print('Generating C bindings...'); - await ffigen.main([...ffigenFlags, cConfig]); + FfiGenerator( + headers: Headers( + entryPoints: [ + root.resolve('src/include/dart_api_dl.h'), + root.resolve('src/objective_c.h'), + root.resolve('src/os_version.h'), + ], + ), + visitors: [const CBindingsVisitor()], + output: Output( + 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/objective_c.h` etc. +// Regenerate bindings with `dart run tool/generate_code.dart`. + +// coverage:ignore-file +''', + style: const NativeExternalBindings( + assetId: 'package:objective_c/objective_c.dylib', + ), + dartFile: root.resolve(cBindings), + ), + ).generate(); print('Generating ObjC bindings...'); - await ffigen.main([...ffigenFlags, objcConfig]); + FfiGenerator( + headers: Headers( + entryPoints: [ + root.resolve('src/foundation.h'), + root.resolve('src/input_stream_adapter.h'), + root.resolve('src/ns_number.h'), + root.resolve('src/observer.h'), + root.resolve('src/protocol.h'), + ], + ), + structs: const Structs(dependencies: CompoundDependencies.opaque), + objectiveC: const ObjectiveC( + generateForPackageObjectiveC: true, + categories: Categories(includeTransitive: false), + ), + visitors: [const ObjCBindingsVisitor()], + output: Output( + 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 package:objective_c's ObjC code and the Foundation framework. +// Regenerate bindings with `dart run tool/generate_code.dart`. + +// coverage:ignore-file +''', + format: false, + style: const NativeExternalBindings( + assetId: 'package:objective_c/objective_c.dylib', + ), + dartFile: root.resolve(objcBindings), + objectiveCFile: root.resolve('src/objective_c_bindings_generated.m'), + ), + ).generate(); + mergeExtraMethods(objcBindings, parseExtraMethods(extraMethodsFile)); print('Generating objc_built_in_types.dart...'); - final exports = writeBuiltInTypes(objcConfig, builtInTypes); + final exports = writeBuiltInTypes(builtInTypes, objcBindings); print('Generating objc_bindings_exported.dart...'); writeExports(exports, objcExports); From 68bba3a35df3726b124b931a6aa17ddee6656f6a Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Wed, 29 Jul 2026 14:33:17 +1000 Subject: [PATCH 06/37] visitChildren --- .../ffigen/lib/src/public_ast/public_ast.dart | 189 ++++++++++-------- pkgs/ffigen/test/public_ast_visitor_test.dart | 29 +++ .../test/unit_tests/config_util_test.dart | 30 ++- 3 files changed, 158 insertions(+), 90 deletions(-) diff --git a/pkgs/ffigen/lib/src/public_ast/public_ast.dart b/pkgs/ffigen/lib/src/public_ast/public_ast.dart index 787cc3d82a..5ca12562a2 100644 --- a/pkgs/ffigen/lib/src/public_ast/public_ast.dart +++ b/pkgs/ffigen/lib/src/public_ast/public_ast.dart @@ -9,88 +9,42 @@ import '../config_provider.dart'; abstract class Visitor { const Visitor(); - void visitLibrary(PublicAst ast) { - for (final decl in ast.declarations) { - decl.accept(this); - } - } + void visitLibrary(PublicAst ast) => ast.visitChildren(this); - void visitStruct(Struct node) { - if (node.isExcluded) return; - for (final field in node.fields) { - field.accept(this); - } - } + void visitStruct(Struct node) => node.visitChildren(this); - void visitUnion(Union node) { - if (node.isExcluded) return; - for (final field in node.fields) { - field.accept(this); - } - } + void visitUnion(Union node) => node.visitChildren(this); - void visitEnum(EnumClass node) { - if (node.isExcluded) return; - for (final constant in node.constants) { - constant.accept(this); - } - } + void visitEnum(EnumClass node) => node.visitChildren(this); - void visitUnnamedEnumConstant(UnnamedEnumConstant node) {} + void visitUnnamedEnumConstant(UnnamedEnumConstant node) => + node.visitChildren(this); - void visitFunc(Func node) { - if (node.isExcluded) return; - for (final param in node.parameters) { - param.accept(this); - } - } + void visitFunc(Func node) => node.visitChildren(this); - void visitGlobal(Global node) {} + void visitGlobal(Global node) => node.visitChildren(this); - void visitMacroConstant(MacroConstant node) {} + void visitMacroConstant(MacroConstant node) => node.visitChildren(this); - void visitTypealias(Typealias node) {} + void visitTypealias(Typealias node) => node.visitChildren(this); - void visitObjCInterface(ObjCInterface node) { - if (node.isExcluded) return; - for (final method in node.methods) { - method.accept(this); - } - } + void visitObjCInterface(ObjCInterface node) => node.visitChildren(this); - void visitObjCProtocol(ObjCProtocol node) { - if (node.isExcluded) return; - for (final method in node.methods) { - method.accept(this); - } - } + void visitObjCProtocol(ObjCProtocol node) => node.visitChildren(this); - void visitObjCCategory(ObjCCategory node) { - if (node.isExcluded) return; - for (final method in node.methods) { - method.accept(this); - } - } + void visitObjCCategory(ObjCCategory node) => node.visitChildren(this); - void visitCppClass(CppClass node) { - if (node.isExcluded) return; - for (final method in node.methods) { - method.accept(this); - } - for (final field in node.fields) { - field.accept(this); - } - } + void visitCppClass(CppClass node) => node.visitChildren(this); - void visitField(Field node) {} + void visitField(Field node) => node.visitChildren(this); - void visitEnumConstant(EnumConstant node) {} + void visitEnumConstant(EnumConstant node) => node.visitChildren(this); - void visitParameter(Parameter node) {} + void visitParameter(Parameter node) => node.visitChildren(this); - void visitObjCMethod(ObjCMethod node) {} + void visitObjCMethod(ObjCMethod node) => node.visitChildren(this); - void visitCppMethod(CppMethod node) {} + void visitCppMethod(CppMethod node) => node.visitChildren(this); } typedef FfiVisitor = Visitor; @@ -131,6 +85,12 @@ class PublicAst { void accept(Visitor visitor) { visitor.visitLibrary(this); } + + void visitChildren(Visitor visitor) { + for (final decl in declarations) { + decl.accept(visitor); + } + } } typedef FfiAst = PublicAst; @@ -138,10 +98,11 @@ typedef FfiAst = PublicAst; /// Abstract base for all public AST nodes. abstract class AstNode { void accept(Visitor visitor); + void visitChildren(Visitor visitor) {} } /// Top-level declaration public AST element. -abstract class Decl implements AstNode { +abstract class Decl extends AstNode { String get originalName; String get name; set name(String value); @@ -151,7 +112,7 @@ abstract class Decl implements AstNode { set isExcluded(bool value); } -class Struct implements Decl { +class Struct extends Decl { final ast.Struct _binding; Struct(this._binding); @@ -181,6 +142,13 @@ class Struct implements Decl { @override void accept(Visitor visitor) => visitor.visitStruct(this); + + @override + void visitChildren(Visitor visitor) { + for (final field in fields) { + field.accept(visitor); + } + } } class Union implements Decl { @@ -210,6 +178,13 @@ class Union implements Decl { @override void accept(Visitor visitor) => visitor.visitUnion(this); + + @override + void visitChildren(Visitor visitor) { + for (final field in fields) { + field.accept(visitor); + } + } } class EnumClass implements Decl { @@ -243,9 +218,16 @@ class EnumClass implements Decl { @override void accept(Visitor visitor) => visitor.visitEnum(this); + + @override + void visitChildren(Visitor visitor) { + for (final constant in constants) { + constant.accept(visitor); + } + } } -class UnnamedEnumConstant implements Decl { +class UnnamedEnumConstant extends Decl { final ast.UnnamedEnumConstant _binding; UnnamedEnumConstant(this._binding); @@ -273,7 +255,7 @@ class UnnamedEnumConstant implements Decl { void accept(Visitor visitor) => visitor.visitUnnamedEnumConstant(this); } -class Func implements Decl { +class Func extends Decl { final ast.Func _binding; Func(this._binding); @@ -317,9 +299,16 @@ class Func implements Decl { @override void accept(Visitor visitor) => visitor.visitFunc(this); + + @override + void visitChildren(Visitor visitor) { + for (final param in parameters) { + param.accept(visitor); + } + } } -class Global implements Decl { +class Global extends Decl { final ast.Global _binding; Global(this._binding); @@ -349,7 +338,7 @@ class Global implements Decl { void accept(Visitor visitor) => visitor.visitGlobal(this); } -class MacroConstant implements Decl { +class MacroConstant extends Decl { final ast.MacroConstant _binding; MacroConstant(this._binding); @@ -377,7 +366,7 @@ class MacroConstant implements Decl { void accept(Visitor visitor) => visitor.visitMacroConstant(this); } -class Typealias implements Decl { +class Typealias extends Decl { final ast.Typealias _binding; Typealias(this._binding); @@ -404,7 +393,7 @@ class Typealias implements Decl { void accept(Visitor visitor) => visitor.visitTypealias(this); } -class ObjCInterface implements Decl { +class ObjCInterface extends Decl { final ast.ObjCInterface _binding; ObjCInterface(this._binding); @@ -436,9 +425,16 @@ class ObjCInterface implements Decl { @override void accept(Visitor visitor) => visitor.visitObjCInterface(this); + + @override + void visitChildren(Visitor visitor) { + for (final method in methods) { + method.accept(visitor); + } + } } -class ObjCProtocol implements Decl { +class ObjCProtocol extends Decl { final ast.ObjCProtocol _binding; ObjCProtocol(this._binding); @@ -470,9 +466,16 @@ class ObjCProtocol implements Decl { @override void accept(Visitor visitor) => visitor.visitObjCProtocol(this); + + @override + void visitChildren(Visitor visitor) { + for (final method in methods) { + method.accept(visitor); + } + } } -class ObjCCategory implements Decl { +class ObjCCategory extends Decl { final ast.ObjCCategory _binding; ObjCCategory(this._binding); @@ -501,9 +504,16 @@ class ObjCCategory implements Decl { @override void accept(Visitor visitor) => visitor.visitObjCCategory(this); + + @override + void visitChildren(Visitor visitor) { + for (final method in methods) { + method.accept(visitor); + } + } } -class CppClass implements Decl { +class CppClass extends Decl { final ast.CppClass _binding; CppClass(this._binding); @@ -532,10 +542,20 @@ class CppClass implements Decl { @override void accept(Visitor visitor) => visitor.visitCppClass(this); + + @override + void visitChildren(Visitor visitor) { + for (final method in methods) { + method.accept(visitor); + } + for (final field in fields) { + field.accept(visitor); + } + } } /// Member elements -class Field implements AstNode { +class Field extends AstNode { final ast.CompoundMember _member; Field(this._member); @@ -554,7 +574,7 @@ class Field implements AstNode { void accept(Visitor visitor) => visitor.visitField(this); } -class EnumConstant implements AstNode { +class EnumConstant extends AstNode { final ast.EnumConstant _constant; EnumConstant(this._constant); @@ -575,7 +595,7 @@ class EnumConstant implements AstNode { void accept(Visitor visitor) => visitor.visitEnumConstant(this); } -class Parameter implements AstNode { +class Parameter extends AstNode { final ast.Parameter _param; Parameter(this._param); @@ -594,7 +614,7 @@ class Parameter implements AstNode { void accept(Visitor visitor) => visitor.visitParameter(this); } -class ObjCMethod implements AstNode { +class ObjCMethod extends AstNode { final ast.ObjCMethod _method; ObjCMethod(this._method); @@ -622,9 +642,16 @@ class ObjCMethod implements AstNode { @override void accept(Visitor visitor) => visitor.visitObjCMethod(this); + + @override + void visitChildren(Visitor visitor) { + for (final param in parameters) { + param.accept(visitor); + } + } } -class CppMethod implements AstNode { +class CppMethod extends AstNode { final ast.CppMethod _method; CppMethod(this._method); diff --git a/pkgs/ffigen/test/public_ast_visitor_test.dart b/pkgs/ffigen/test/public_ast_visitor_test.dart index 1f73b4c162..0023af107f 100644 --- a/pkgs/ffigen/test/public_ast_visitor_test.dart +++ b/pkgs/ffigen/test/public_ast_visitor_test.dart @@ -88,5 +88,34 @@ void main() { throwsA(isA()), ); }); + + test('Automatic AST walking via visitChildren', () { + final headerUri = Uri.file( + absPath('test/header_parser_tests/function_n_struct.h'), + ); + final autoWalker = _AutoWalkVisitor(); + final generator = FfiGenerator( + headers: Headers(entryPoints: [headerUri]), + output: Output(dartFile: Uri.file('unused.dart')), + visitors: [ + const IncludeAllVisitor(), + autoWalker, + ], + ); + + parser.parse(testContext(generator)); + + // Verify fields were visited without manually looping inside visitStruct + expect(autoWalker.visitedFieldNames, contains('a')); + }); }); } + +class _AutoWalkVisitor extends Visitor { + final visitedFieldNames = []; + + @override + void visitField(Field node) { + visitedFieldNames.add(node.originalName); + } +} diff --git a/pkgs/ffigen/test/unit_tests/config_util_test.dart b/pkgs/ffigen/test/unit_tests/config_util_test.dart index 8f688d52d3..40de362dce 100644 --- a/pkgs/ffigen/test/unit_tests/config_util_test.dart +++ b/pkgs/ffigen/test/unit_tests/config_util_test.dart @@ -1,18 +1,30 @@ -// Copyright (c) 2025, 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 'package:ffigen/ffigen.dart'; +import 'package:ffigen/src/code_generator.dart' as code_gen; import 'package:test/test.dart'; -Declaration decl(String name) => Declaration(usr: '', originalName: name); +import '../test_utils.dart'; + +Struct createStruct(String name) { + final generator = FfiGenerator( + headers: Headers(entryPoints: []), + output: Output(dartFile: Uri.file('unused.dart')), + ); + return Struct( + code_gen.Struct( + context: testContext(generator), + name: name, + originalName: name, + usr: name, + ), + ); +} void main() { group('Visitor utils', () { test('IncludeSetVisitor', () { final visitor = IncludeSetVisitor({'foo', 'bar'}); - final structFoo = Struct(originalName: 'foo', usr: 'foo'); - final structBaz = Struct(originalName: 'baz', usr: 'baz'); + final structFoo = createStruct('foo'); + final structBaz = createStruct('baz'); visitor.visitStruct(structFoo); visitor.visitStruct(structBaz); expect(structFoo.isExcluded, isFalse); @@ -21,8 +33,8 @@ void main() { test('RenameMapVisitor', () { final visitor = RenameMapVisitor({'foo': 'bar'}); - final structFoo = Struct(originalName: 'foo', usr: 'foo'); - final structBaz = Struct(originalName: 'baz', usr: 'baz'); + final structFoo = createStruct('foo'); + final structBaz = createStruct('baz'); visitor.visitStruct(structFoo); visitor.visitStruct(structBaz); expect(structFoo.name, 'bar'); From dbba04814be281918e8fde6b58ab09ed183c6974 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Wed, 29 Jul 2026 14:48:28 +1000 Subject: [PATCH 07/37] callback based visitor --- .../ffigen/lib/src/public_ast/public_ast.dart | 152 +++++++++++++++--- pkgs/ffigen/test/public_ast_visitor_test.dart | 31 ++++ pkgs/ffigen/tool/generate_code.dart | 1 + 3 files changed, 162 insertions(+), 22 deletions(-) diff --git a/pkgs/ffigen/lib/src/public_ast/public_ast.dart b/pkgs/ffigen/lib/src/public_ast/public_ast.dart index 5ca12562a2..a0de5a39db 100644 --- a/pkgs/ffigen/lib/src/public_ast/public_ast.dart +++ b/pkgs/ffigen/lib/src/public_ast/public_ast.dart @@ -6,45 +6,153 @@ import '../code_generator.dart' as ast; import '../config_provider.dart'; /// User-facing Visitor for FFIgen's Public AST. -abstract class Visitor { - const Visitor(); - - void visitLibrary(PublicAst ast) => ast.visitChildren(this); +class Visitor { + final void Function(PublicAst ast)? _visitLibrary; + final void Function(Struct node)? _visitStruct; + final void Function(Union node)? _visitUnion; + final void Function(EnumClass node)? _visitEnum; + final void Function(UnnamedEnumConstant node)? _visitUnnamedEnumConstant; + final void Function(Func node)? _visitFunc; + final void Function(Global node)? _visitGlobal; + final void Function(MacroConstant node)? _visitMacroConstant; + final void Function(Typealias node)? _visitTypealias; + final void Function(ObjCInterface node)? _visitObjCInterface; + final void Function(ObjCProtocol node)? _visitObjCProtocol; + final void Function(ObjCCategory node)? _visitObjCCategory; + final void Function(CppClass node)? _visitCppClass; + final void Function(Field node)? _visitField; + final void Function(EnumConstant node)? _visitEnumConstant; + final void Function(Parameter node)? _visitParameter; + final void Function(ObjCMethod node)? _visitObjCMethod; + final void Function(CppMethod node)? _visitCppMethod; + + const Visitor({ + void Function(PublicAst ast)? visitLibrary, + void Function(Struct node)? visitStruct, + void Function(Union node)? visitUnion, + void Function(EnumClass node)? visitEnum, + void Function(UnnamedEnumConstant node)? visitUnnamedEnumConstant, + void Function(Func node)? visitFunc, + void Function(Global node)? visitGlobal, + void Function(MacroConstant node)? visitMacroConstant, + void Function(Typealias node)? visitTypealias, + void Function(ObjCInterface node)? visitObjCInterface, + void Function(ObjCProtocol node)? visitObjCProtocol, + void Function(ObjCCategory node)? visitObjCCategory, + void Function(CppClass node)? visitCppClass, + void Function(Field node)? visitField, + void Function(EnumConstant node)? visitEnumConstant, + void Function(Parameter node)? visitParameter, + void Function(ObjCMethod node)? visitObjCMethod, + void Function(CppMethod node)? visitCppMethod, + }) : _visitLibrary = visitLibrary, + _visitStruct = visitStruct, + _visitUnion = visitUnion, + _visitEnum = visitEnum, + _visitUnnamedEnumConstant = visitUnnamedEnumConstant, + _visitFunc = visitFunc, + _visitGlobal = visitGlobal, + _visitMacroConstant = visitMacroConstant, + _visitTypealias = visitTypealias, + _visitObjCInterface = visitObjCInterface, + _visitObjCProtocol = visitObjCProtocol, + _visitObjCCategory = visitObjCCategory, + _visitCppClass = visitCppClass, + _visitField = visitField, + _visitEnumConstant = visitEnumConstant, + _visitParameter = visitParameter, + _visitObjCMethod = visitObjCMethod, + _visitCppMethod = visitCppMethod; + + void visitLibrary(PublicAst ast) { + _visitLibrary?.call(ast); + ast.visitChildren(this); + } - void visitStruct(Struct node) => node.visitChildren(this); + void visitStruct(Struct node) { + _visitStruct?.call(node); + node.visitChildren(this); + } - void visitUnion(Union node) => node.visitChildren(this); + void visitUnion(Union node) { + _visitUnion?.call(node); + node.visitChildren(this); + } - void visitEnum(EnumClass node) => node.visitChildren(this); + void visitEnum(EnumClass node) { + _visitEnum?.call(node); + node.visitChildren(this); + } - void visitUnnamedEnumConstant(UnnamedEnumConstant node) => - node.visitChildren(this); + void visitUnnamedEnumConstant(UnnamedEnumConstant node) { + _visitUnnamedEnumConstant?.call(node); + node.visitChildren(this); + } - void visitFunc(Func node) => node.visitChildren(this); + void visitFunc(Func node) { + _visitFunc?.call(node); + node.visitChildren(this); + } - void visitGlobal(Global node) => node.visitChildren(this); + void visitGlobal(Global node) { + _visitGlobal?.call(node); + node.visitChildren(this); + } - void visitMacroConstant(MacroConstant node) => node.visitChildren(this); + void visitMacroConstant(MacroConstant node) { + _visitMacroConstant?.call(node); + node.visitChildren(this); + } - void visitTypealias(Typealias node) => node.visitChildren(this); + void visitTypealias(Typealias node) { + _visitTypealias?.call(node); + node.visitChildren(this); + } - void visitObjCInterface(ObjCInterface node) => node.visitChildren(this); + void visitObjCInterface(ObjCInterface node) { + _visitObjCInterface?.call(node); + node.visitChildren(this); + } - void visitObjCProtocol(ObjCProtocol node) => node.visitChildren(this); + void visitObjCProtocol(ObjCProtocol node) { + _visitObjCProtocol?.call(node); + node.visitChildren(this); + } - void visitObjCCategory(ObjCCategory node) => node.visitChildren(this); + void visitObjCCategory(ObjCCategory node) { + _visitObjCCategory?.call(node); + node.visitChildren(this); + } - void visitCppClass(CppClass node) => node.visitChildren(this); + void visitCppClass(CppClass node) { + _visitCppClass?.call(node); + node.visitChildren(this); + } - void visitField(Field node) => node.visitChildren(this); + void visitField(Field node) { + _visitField?.call(node); + node.visitChildren(this); + } - void visitEnumConstant(EnumConstant node) => node.visitChildren(this); + void visitEnumConstant(EnumConstant node) { + _visitEnumConstant?.call(node); + node.visitChildren(this); + } - void visitParameter(Parameter node) => node.visitChildren(this); + void visitParameter(Parameter node) { + _visitParameter?.call(node); + node.visitChildren(this); + } - void visitObjCMethod(ObjCMethod node) => node.visitChildren(this); + void visitObjCMethod(ObjCMethod node) { + _visitObjCMethod?.call(node); + node.visitChildren(this); + } - void visitCppMethod(CppMethod node) => node.visitChildren(this); + void visitCppMethod(CppMethod node) { + _visitCppMethod?.call(node); + node.visitChildren(this); + } } typedef FfiVisitor = Visitor; diff --git a/pkgs/ffigen/test/public_ast_visitor_test.dart b/pkgs/ffigen/test/public_ast_visitor_test.dart index 0023af107f..b32df91c9b 100644 --- a/pkgs/ffigen/test/public_ast_visitor_test.dart +++ b/pkgs/ffigen/test/public_ast_visitor_test.dart @@ -108,6 +108,37 @@ void main() { // Verify fields were visited without manually looping inside visitStruct expect(autoWalker.visitedFieldNames, contains('a')); }); + + test('Inline callback-based Visitor constructor', () { + final headerUri = Uri.file( + absPath('test/header_parser_tests/function_n_struct.h'), + ); + final visitedFields = []; + final generator = FfiGenerator( + headers: Headers(entryPoints: [headerUri]), + output: Output(dartFile: Uri.file('unused.dart')), + visitors: [ + const IncludeAllVisitor(), + Visitor( + visitFunc: (node) { + if (node.originalName == 'func1') { + node.name = 'inlineRenamedFunc1'; + } + }, + visitField: (node) { + visitedFields.add(node.originalName); + }, + ), + ], + ); + + final library = parser.parse(testContext(generator)); + + final renamedFunc = + library.getBinding('inlineRenamedFunc1') as code_gen.Func; + expect(renamedFunc.name, 'inlineRenamedFunc1'); + expect(visitedFields, contains('a')); + }); }); } diff --git a/pkgs/ffigen/tool/generate_code.dart b/pkgs/ffigen/tool/generate_code.dart index 9f47fd929a..18a5309df4 100644 --- a/pkgs/ffigen/tool/generate_code.dart +++ b/pkgs/ffigen/tool/generate_code.dart @@ -6,6 +6,7 @@ import 'dart:io'; import 'package:ffigen/ffigen.dart'; class LibClangVisitor extends Visitor { + const LibClangVisitor(); static const enums = { 'CXChildVisitResult', 'CXCursorKind', From dcd92184aff8ead3a5fbd48f781edc381ba8ee17 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Wed, 29 Jul 2026 14:56:30 +1000 Subject: [PATCH 08/37] shard the IncludeSetVisitor --- .../example/host_name/tool/ffigen.dart | 2 +- .../example/mini_audio/tool/ffigen.dart | 17 ++--- .../example/sqlite/tool/ffigen.dart | 2 +- .../example/sqlite_no_link/tool/ffigen.dart | 2 +- .../example/sqlite_prebuilt/tool/ffigen.dart | 2 +- .../example/stb_image/tool/ffigen.dart | 2 +- pkgs/ffigen/example/add/tool/ffigen.dart | 2 +- .../example/objective_c/generate_code.dart | 2 +- .../ffigen/lib/src/public_ast/public_ast.dart | 63 +++++++++++++------ .../native_cpp_test/verify_bindings_test.dart | 4 +- .../native_objc_test/deprecated_test.dart | 28 +++------ pkgs/ffigen/test/public_ast_visitor_test.dart | 30 +++++++++ .../test/unit_tests/config_util_test.dart | 2 +- 13 files changed, 105 insertions(+), 53 deletions(-) diff --git a/pkgs/code_assets/example/host_name/tool/ffigen.dart b/pkgs/code_assets/example/host_name/tool/ffigen.dart index cb281fe0d2..1226cc46cc 100644 --- a/pkgs/code_assets/example/host_name/tool/ffigen.dart +++ b/pkgs/code_assets/example/host_name/tool/ffigen.dart @@ -8,7 +8,7 @@ import 'package:ffigen/ffigen.dart'; void main() { final packageRoot = Platform.script.resolve('../'); - const visitors = [IncludeSetVisitor({'gethostname'})]; + const visitors = [IncludeSetVisitor(functions: {'gethostname'})]; final FfiGenerator generator; if (Platform.isWindows) { generator = FfiGenerator( diff --git a/pkgs/code_assets/example/mini_audio/tool/ffigen.dart b/pkgs/code_assets/example/mini_audio/tool/ffigen.dart index 06cc1549f0..6e13e03799 100644 --- a/pkgs/code_assets/example/mini_audio/tool/ffigen.dart +++ b/pkgs/code_assets/example/mini_audio/tool/ffigen.dart @@ -13,13 +13,16 @@ void main() { entryPoints: [packageRoot.resolve('third_party/miniaudio.h')], ), visitors: const [ - IncludeSetVisitor({ - 'ma_engine_init', - 'ma_engine_play_sound', - 'ma_engine_uninit', - 'ma_engine', - 'ma_result', - }), + IncludeSetVisitor( + functions: { + 'ma_engine_init', + 'ma_engine_play_sound', + 'ma_engine_uninit', + }, + structs: {'ma_engine'}, + enums: {'ma_result'}, + typedefs: {'ma_result'}, + ), RecordUseVisitor(), ], enums: const Enums(silenceWarning: true), diff --git a/pkgs/code_assets/example/sqlite/tool/ffigen.dart b/pkgs/code_assets/example/sqlite/tool/ffigen.dart index 2d79ac7521..7921d4c416 100644 --- a/pkgs/code_assets/example/sqlite/tool/ffigen.dart +++ b/pkgs/code_assets/example/sqlite/tool/ffigen.dart @@ -13,7 +13,7 @@ void main() { entryPoints: [packageRoot.resolve('third_party/sqlite/sqlite3.h')], ), visitors: const [ - IncludeSetVisitor({'sqlite3_libversion'}), + IncludeSetVisitor(functions: {'sqlite3_libversion'}), RecordUseVisitor(), ], output: Output( diff --git a/pkgs/code_assets/example/sqlite_no_link/tool/ffigen.dart b/pkgs/code_assets/example/sqlite_no_link/tool/ffigen.dart index 7dd3809c45..76d0e18ddb 100644 --- a/pkgs/code_assets/example/sqlite_no_link/tool/ffigen.dart +++ b/pkgs/code_assets/example/sqlite_no_link/tool/ffigen.dart @@ -13,7 +13,7 @@ void main() { entryPoints: [packageRoot.resolve('third_party/sqlite/sqlite3.h')], ), visitors: const [ - IncludeSetVisitor({'sqlite3_libversion'}), + IncludeSetVisitor(functions: {'sqlite3_libversion'}), RecordUseVisitor(), ], output: Output( diff --git a/pkgs/code_assets/example/sqlite_prebuilt/tool/ffigen.dart b/pkgs/code_assets/example/sqlite_prebuilt/tool/ffigen.dart index 7dd3809c45..76d0e18ddb 100644 --- a/pkgs/code_assets/example/sqlite_prebuilt/tool/ffigen.dart +++ b/pkgs/code_assets/example/sqlite_prebuilt/tool/ffigen.dart @@ -13,7 +13,7 @@ void main() { entryPoints: [packageRoot.resolve('third_party/sqlite/sqlite3.h')], ), visitors: const [ - IncludeSetVisitor({'sqlite3_libversion'}), + IncludeSetVisitor(functions: {'sqlite3_libversion'}), RecordUseVisitor(), ], output: Output( diff --git a/pkgs/code_assets/example/stb_image/tool/ffigen.dart b/pkgs/code_assets/example/stb_image/tool/ffigen.dart index 1ce1a1e9f8..5c0e1d9be4 100644 --- a/pkgs/code_assets/example/stb_image/tool/ffigen.dart +++ b/pkgs/code_assets/example/stb_image/tool/ffigen.dart @@ -13,7 +13,7 @@ void main() { entryPoints: [packageRoot.resolve('third_party/stb_image.h')], ), visitors: const [ - IncludeSetVisitor({'stbi_info'}), + IncludeSetVisitor(functions: {'stbi_info'}), RecordUseVisitor(), ], output: Output( diff --git a/pkgs/ffigen/example/add/tool/ffigen.dart b/pkgs/ffigen/example/add/tool/ffigen.dart index 210acdb2c3..56a22b32ae 100644 --- a/pkgs/ffigen/example/add/tool/ffigen.dart +++ b/pkgs/ffigen/example/add/tool/ffigen.dart @@ -10,7 +10,7 @@ FfiGenerator getConfig(Uri packageRoot) { output: Output(dartFile: packageRoot.resolve('lib/add.g.dart')), headers: Headers(entryPoints: [packageRoot.resolve('src/add.h')]), visitors: [ - const IncludeSetVisitor({'add'}), + const IncludeSetVisitor(functions: {'add'}), ], ); } diff --git a/pkgs/ffigen/example/objective_c/generate_code.dart b/pkgs/ffigen/example/objective_c/generate_code.dart index fa5143d73b..4d3f2cedb9 100644 --- a/pkgs/ffigen/example/objective_c/generate_code.dart +++ b/pkgs/ffigen/example/objective_c/generate_code.dart @@ -23,7 +23,7 @@ final config = FfiGenerator( // set the objectiveC field to a non-null value. objectiveC: const ObjectiveC(), visitors: const [ - IncludeSetVisitor({'AVAudioPlayer'}), + IncludeSetVisitor(objcInterfaces: {'AVAudioPlayer'}), ], output: Output( diff --git a/pkgs/ffigen/lib/src/public_ast/public_ast.dart b/pkgs/ffigen/lib/src/public_ast/public_ast.dart index a0de5a39db..4040d45f24 100644 --- a/pkgs/ffigen/lib/src/public_ast/public_ast.dart +++ b/pkgs/ffigen/lib/src/public_ast/public_ast.dart @@ -862,38 +862,65 @@ class ExcludeAllVisitor extends Visitor { } class IncludeSetVisitor extends Visitor { - final Set names; - - const IncludeSetVisitor(this.names); - - void _check(Decl node) { - node.isExcluded = !names.contains(node.originalName); + final Set? functions; + final Set? structs; + final Set? unions; + final Set? enums; + final Set? unnamedEnumConstants; + final Set? globals; + final Set? macros; + final Set? typedefs; + final Set? objcInterfaces; + final Set? objcProtocols; + final Set? objcCategories; + final Set? cppClasses; + + const IncludeSetVisitor({ + this.functions, + this.structs, + this.unions, + this.enums, + this.unnamedEnumConstants, + this.globals, + this.macros, + this.typedefs, + this.objcInterfaces, + this.objcProtocols, + this.objcCategories, + this.cppClasses, + }); + + void _check(Decl node, Set? set) { + if (set != null) { + node.isExcluded = !set.contains(node.originalName); + } } @override - void visitStruct(Struct node) => _check(node); + void visitStruct(Struct node) => _check(node, structs); @override - void visitUnion(Union node) => _check(node); + void visitUnion(Union node) => _check(node, unions); @override - void visitEnum(EnumClass node) => _check(node); + void visitEnum(EnumClass node) => _check(node, enums); @override - void visitUnnamedEnumConstant(UnnamedEnumConstant node) => _check(node); + void visitUnnamedEnumConstant(UnnamedEnumConstant node) => + _check(node, unnamedEnumConstants); @override - void visitFunc(Func node) => _check(node); + void visitFunc(Func node) => _check(node, functions); @override - void visitGlobal(Global node) => _check(node); + void visitGlobal(Global node) => _check(node, globals); @override - void visitMacroConstant(MacroConstant node) => _check(node); + void visitMacroConstant(MacroConstant node) => _check(node, macros); @override - void visitTypealias(Typealias node) => _check(node); + void visitTypealias(Typealias node) => _check(node, typedefs); @override - void visitObjCInterface(ObjCInterface node) => _check(node); + void visitObjCInterface(ObjCInterface node) => _check(node, objcInterfaces); @override - void visitObjCProtocol(ObjCProtocol node) => _check(node); + void visitObjCProtocol(ObjCProtocol node) => _check(node, objcProtocols); @override - void visitObjCCategory(ObjCCategory node) => _check(node); + void visitObjCCategory(ObjCCategory node) => _check(node, objcCategories); @override - void visitCppClass(CppClass node) => _check(node); + void visitCppClass(CppClass node) => _check(node, cppClasses); } class RecordUseVisitor extends Visitor { diff --git a/pkgs/ffigen/test/native_cpp_test/verify_bindings_test.dart b/pkgs/ffigen/test/native_cpp_test/verify_bindings_test.dart index d307dcf0b6..be74dd0635 100644 --- a/pkgs/ffigen/test/native_cpp_test/verify_bindings_test.dart +++ b/pkgs/ffigen/test/native_cpp_test/verify_bindings_test.dart @@ -46,7 +46,7 @@ void main() { ), cpp: const Cpp(), visitors: [ - IncludeSetVisitor({'Animal', 'FinalizerTestSubject'}), + IncludeSetVisitor(cppClasses: {'Animal', 'FinalizerTestSubject'}), ], ), 'memory_edge_cases': FfiGenerator( @@ -64,7 +64,7 @@ void main() { ), cpp: const Cpp(), visitors: [ - IncludeSetVisitor({'Node'}), + IncludeSetVisitor(cppClasses: {'Node'}), ], ), }; diff --git a/pkgs/ffigen/test/native_objc_test/deprecated_test.dart b/pkgs/ffigen/test/native_objc_test/deprecated_test.dart index fa44dd26cf..e6732a68f4 100644 --- a/pkgs/ffigen/test/native_objc_test/deprecated_test.dart +++ b/pkgs/ffigen/test/native_objc_test/deprecated_test.dart @@ -49,24 +49,16 @@ String bindingsForVersion({Versions? iosVers, Versions? macosVers}) { externalVersions: ExternalVersions(ios: iosVers, macos: macosVers), ), visitors: [ - const IncludeSetVisitor({ - 'DeprecatedInterfaceMethods', - 'DeprecatedInterface', - 'DeprecatedProtocolMethods', - 'DeprecatedProtocol', - 'DeprecatedCategoryMethods', - 'DeprecatedCategory', - 'normalFunction', - 'deprecatedFunction', - 'NormalStruct', - 'DeprecatedStruct', - 'NormalUnion', - 'DeprecatedUnion', - 'NormalEnum', - 'DeprecatedEnum', - 'normalUnnamedEnum', - 'deprecatedUnnamedEnum', - }), + const IncludeSetVisitor( + objcInterfaces: {'DeprecatedInterfaceMethods', 'DeprecatedInterface'}, + objcProtocols: {'DeprecatedProtocolMethods', 'DeprecatedProtocol'}, + objcCategories: {'DeprecatedCategoryMethods', 'DeprecatedCategory'}, + functions: {'normalFunction', 'deprecatedFunction'}, + structs: {'NormalStruct', 'DeprecatedStruct'}, + unions: {'NormalUnion', 'DeprecatedUnion'}, + enums: {'NormalEnum', 'DeprecatedEnum'}, + unnamedEnumConstants: {'normalUnnamedEnum', 'deprecatedUnnamedEnum'}, + ), ], ).generate(logger: createTestLogger()); final file = path.join( diff --git a/pkgs/ffigen/test/public_ast_visitor_test.dart b/pkgs/ffigen/test/public_ast_visitor_test.dart index b32df91c9b..38fa1f3879 100644 --- a/pkgs/ffigen/test/public_ast_visitor_test.dart +++ b/pkgs/ffigen/test/public_ast_visitor_test.dart @@ -139,6 +139,36 @@ void main() { expect(renamedFunc.name, 'inlineRenamedFunc1'); expect(visitedFields, contains('a')); }); + + test('IncludeSetVisitor per-type inclusion', () { + final headerUri = Uri.file( + absPath('test/header_parser_tests/function_n_struct.h'), + ); + final generator = FfiGenerator( + headers: Headers(entryPoints: [headerUri]), + output: Output(dartFile: Uri.file('unused.dart')), + visitors: [ + const IncludeAllVisitor(), + const IncludeSetVisitor( + functions: {'func1'}, + structs: {'Struct1'}, + ), + ], + ); + + final library = parser.parse(testContext(generator)); + + expect(library.getBinding('func1'), isNotNull); + expect( + () => library.getBinding('func2'), + throwsA(isA()), + ); + expect(library.getBinding('Struct1'), isNotNull); + expect( + () => library.getBinding('Struct6'), + throwsA(isA()), + ); + }); }); } diff --git a/pkgs/ffigen/test/unit_tests/config_util_test.dart b/pkgs/ffigen/test/unit_tests/config_util_test.dart index 40de362dce..ed2c635c70 100644 --- a/pkgs/ffigen/test/unit_tests/config_util_test.dart +++ b/pkgs/ffigen/test/unit_tests/config_util_test.dart @@ -22,7 +22,7 @@ Struct createStruct(String name) { void main() { group('Visitor utils', () { test('IncludeSetVisitor', () { - final visitor = IncludeSetVisitor({'foo', 'bar'}); + final visitor = IncludeSetVisitor(structs: {'foo', 'bar'}); final structFoo = createStruct('foo'); final structBaz = createStruct('baz'); visitor.visitStruct(structFoo); From 4e08daf7b7bfcebb130486cfb01c2264fe899eea Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Wed, 29 Jul 2026 15:23:17 +1000 Subject: [PATCH 09/37] flip isExcluded to isIncluded, and make visitor list non-null --- .../lib/src/code_generator/binding.dart | 4 +- .../lib/src/code_generator/compound.dart | 2 +- .../lib/src/code_generator/cpp_class.dart | 2 +- .../lib/src/code_generator/enum_class.dart | 2 +- pkgs/ffigen/lib/src/code_generator/func.dart | 2 +- .../lib/src/code_generator/objc_methods.dart | 2 +- .../lib/src/config_provider/config.dart | 4 +- .../lib/src/config_provider/yaml_config.dart | 20 +-- pkgs/ffigen/lib/src/header_parser/parser.dart | 2 +- .../ffigen/lib/src/public_ast/public_ast.dart | 122 +++++++++--------- .../lib/src/visitor/apply_config_filters.dart | 20 +-- .../header_parser_tests/record_use_test.dart | 2 +- .../large_objc_test.dart | 26 ++-- .../large_integration_tests/large_test.dart | 6 +- pkgs/ffigen/test/public_ast_visitor_test.dart | 4 +- .../test/unit_tests/config_util_test.dart | 4 +- pkgs/ffigen/tool/generate_code.dart | 8 +- pkgs/jni/tool/generate_ffi_bindings.dart | 20 +-- pkgs/objective_c/tool/generate_code.dart | 74 +++++------ 19 files changed, 163 insertions(+), 163 deletions(-) diff --git a/pkgs/ffigen/lib/src/code_generator/binding.dart b/pkgs/ffigen/lib/src/code_generator/binding.dart index 814a6a3a11..2f4d9c6e81 100644 --- a/pkgs/ffigen/lib/src/code_generator/binding.dart +++ b/pkgs/ffigen/lib/src/code_generator/binding.dart @@ -32,8 +32,8 @@ abstract class Binding extends AstNode implements Declaration { final String? dartDoc; final bool isInternal; - /// Whether this binding was explicitly excluded by a user visitor or filter. - bool? userDefinedIsExcluded; + /// Whether this binding was explicitly included or excluded by a user visitor or filter. + bool? userDefinedIsIncluded; /// Whether these bindings should be generated. /// diff --git a/pkgs/ffigen/lib/src/code_generator/compound.dart b/pkgs/ffigen/lib/src/code_generator/compound.dart index 0420b9b304..c073c6d70b 100644 --- a/pkgs/ffigen/lib/src/code_generator/compound.dart +++ b/pkgs/ffigen/lib/src/code_generator/compound.dart @@ -256,7 +256,7 @@ class CompoundMember extends AstNode { final String? dartDoc; final String originalName; final Type type; - bool? userDefinedIsExcluded; + bool? userDefinedIsIncluded; final Symbol _symbol; Symbol get symbol => _symbol; diff --git a/pkgs/ffigen/lib/src/code_generator/cpp_class.dart b/pkgs/ffigen/lib/src/code_generator/cpp_class.dart index 8fdf72e8c4..b9b0263396 100644 --- a/pkgs/ffigen/lib/src/code_generator/cpp_class.dart +++ b/pkgs/ffigen/lib/src/code_generator/cpp_class.dart @@ -23,7 +23,7 @@ class CppMethod extends AstNode with HasLocalScope { final bool isConstant; final bool isStatic; final CppMethodKind kind; - bool? userDefinedIsExcluded; + bool? userDefinedIsIncluded; CppMethod({ required this.name, diff --git a/pkgs/ffigen/lib/src/code_generator/enum_class.dart b/pkgs/ffigen/lib/src/code_generator/enum_class.dart index fb59808259..33034b713c 100644 --- a/pkgs/ffigen/lib/src/code_generator/enum_class.dart +++ b/pkgs/ffigen/lib/src/code_generator/enum_class.dart @@ -308,7 +308,7 @@ class EnumConstant extends AstNode { final String? originalName; final String? dartDoc; final int value; - bool? userDefinedIsExcluded; + bool? userDefinedIsIncluded; final Symbol _symbol; Symbol get symbol => _symbol; diff --git a/pkgs/ffigen/lib/src/code_generator/func.dart b/pkgs/ffigen/lib/src/code_generator/func.dart index 2ee495b7c2..51359da588 100644 --- a/pkgs/ffigen/lib/src/code_generator/func.dart +++ b/pkgs/ffigen/lib/src/code_generator/func.dart @@ -289,7 +289,7 @@ class Parameter extends AstNode { final String originalName; Type type; final bool objCConsumed; - bool? userDefinedIsExcluded; + bool? userDefinedIsIncluded; Symbol symbol; String get name => symbol.name; diff --git a/pkgs/ffigen/lib/src/code_generator/objc_methods.dart b/pkgs/ffigen/lib/src/code_generator/objc_methods.dart index d8d76783cb..521882e53f 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_methods.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_methods.dart @@ -183,7 +183,7 @@ class ObjCMethod extends AstNode with HasLocalScope { final String? dartDoc; final String originalName; Symbol symbol; - bool? userDefinedIsExcluded; + bool? userDefinedIsIncluded; final String originalProtocolMethodName; Type returnType; final List _params; diff --git a/pkgs/ffigen/lib/src/config_provider/config.dart b/pkgs/ffigen/lib/src/config_provider/config.dart index 2fbd76f84f..2c249f05b2 100644 --- a/pkgs/ffigen/lib/src/config_provider/config.dart +++ b/pkgs/ffigen/lib/src/config_provider/config.dart @@ -17,7 +17,7 @@ import 'config_types.dart'; // TODO: Add a code snippet example. final class FfiGenerator { /// User custom visitors to modify/filter AST elements. - final List? visitors; + final List visitors; /// The configuration for header parsing of [FfiGenerator]. final Headers headers; @@ -83,7 +83,7 @@ final class FfiGenerator { final Uri? libclangDylib; const FfiGenerator({ - this.visitors, + this.visitors = const [], this.headers = const Headers(), this.enums = const Enums(), this.functions = const Functions(), diff --git a/pkgs/ffigen/lib/src/config_provider/yaml_config.dart b/pkgs/ffigen/lib/src/config_provider/yaml_config.dart index 518d20fb78..024300668f 100644 --- a/pkgs/ffigen/lib/src/config_provider/yaml_config.dart +++ b/pkgs/ffigen/lib/src/config_provider/yaml_config.dart @@ -1377,13 +1377,13 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { void _applyInclusion(public_ast.Decl node, YamlDeclarationFilters decl) { if (decl.isExplicitlyIncluded(node.originalName)) { - node.isExcluded = false; + node.isIncluded = true; } else if (decl.isExplicitlyExcluded(node.originalName)) { - node.isExcluded = true; + node.isIncluded = false; } else if (decl.excludeAllByDefault) { - node.isExcluded = true; + node.isIncluded = false; } else { - node.isExcluded = false; + node.isIncluded = true; } } @@ -1401,7 +1401,7 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { for (final field in node.fields) { if (!_structDecl.shouldIncludeMember( node.originalName, field.originalName)) { - field.isExcluded = true; + field.isIncluded = false; } else { final fieldRenamed = _structDecl.renameMember( node.originalName, @@ -1424,7 +1424,7 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { for (final field in node.fields) { if (!_unionDecl.shouldIncludeMember( node.originalName, field.originalName)) { - field.isExcluded = true; + field.isIncluded = false; } else { final fieldRenamed = _unionDecl.renameMember( node.originalName, @@ -1452,7 +1452,7 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { if (constant.originalName != null && !_enumClassDecl.shouldIncludeMember( node.originalName, constant.originalName!)) { - constant.isExcluded = true; + constant.isIncluded = false; } else if (constant.originalName != null) { final constantRenamed = _enumClassDecl.renameMember( node.originalName, @@ -1543,7 +1543,7 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { for (final method in node.methods) { if (!_objcInterfaces.shouldIncludeMember( node.originalName, method.originalName)) { - method.isExcluded = true; + method.isIncluded = false; } else { final methodRenamed = _objcInterfaces.renameMember( node.originalName, @@ -1584,7 +1584,7 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { for (final method in node.methods) { if (!_objcProtocols.shouldIncludeMember( node.originalName, method.originalName)) { - method.isExcluded = true; + method.isIncluded = false; } else { final methodRenamed = _objcProtocols.renameMember( node.originalName, @@ -1608,7 +1608,7 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { for (final method in node.methods) { if (!_objcCategories.shouldIncludeMember( node.originalName, method.originalName)) { - method.isExcluded = true; + method.isIncluded = false; } else { final methodRenamed = _objcCategories.renameMember( node.originalName, diff --git a/pkgs/ffigen/lib/src/header_parser/parser.dart b/pkgs/ffigen/lib/src/header_parser/parser.dart index f983ee5513..a481723200 100644 --- a/pkgs/ffigen/lib/src/header_parser/parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/parser.dart @@ -179,7 +179,7 @@ List transformBindings(List rawBindings, Context context) { // Execute Public AST visitors. final publicAst = public_ast.PublicAst.fromBindings(allBindings.toList()); - for (final v in config.visitors ?? const []) { + for (final v in config.visitors) { publicAst.accept(v); } diff --git a/pkgs/ffigen/lib/src/public_ast/public_ast.dart b/pkgs/ffigen/lib/src/public_ast/public_ast.dart index 4040d45f24..84fb538bb5 100644 --- a/pkgs/ffigen/lib/src/public_ast/public_ast.dart +++ b/pkgs/ffigen/lib/src/public_ast/public_ast.dart @@ -216,8 +216,8 @@ abstract class Decl extends AstNode { set name(String value); String get usr; - bool get isExcluded; - set isExcluded(bool value); + bool get isIncluded; + set isIncluded(bool value); } class Struct extends Decl { @@ -238,10 +238,10 @@ class Struct extends Decl { set name(String value) => _binding.symbol.oldName = value; @override - bool get isExcluded => _binding.userDefinedIsExcluded ?? false; + bool get isIncluded => _binding.userDefinedIsIncluded ?? true; @override - set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; + set isIncluded(bool value) => _binding.userDefinedIsIncluded = value; int? get pack => _binding.pack; set pack(int? value) => _binding.pack = value; @@ -277,10 +277,10 @@ class Union implements Decl { set name(String value) => _binding.symbol.oldName = value; @override - bool get isExcluded => _binding.userDefinedIsExcluded ?? false; + bool get isIncluded => _binding.userDefinedIsIncluded ?? true; @override - set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; + set isIncluded(bool value) => _binding.userDefinedIsIncluded = value; List get fields => _binding.members.map(Field.new).toList(); @@ -313,10 +313,10 @@ class EnumClass implements Decl { set name(String value) => _binding.symbol.oldName = value; @override - bool get isExcluded => _binding.userDefinedIsExcluded ?? false; + bool get isIncluded => _binding.userDefinedIsIncluded ?? true; @override - set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; + set isIncluded(bool value) => _binding.userDefinedIsIncluded = value; EnumStyle get style => _binding.style; set style(EnumStyle value) => _binding.style = value; @@ -354,10 +354,10 @@ class UnnamedEnumConstant extends Decl { set name(String value) => _binding.symbol.oldName = value; @override - bool get isExcluded => _binding.userDefinedIsExcluded ?? false; + bool get isIncluded => _binding.userDefinedIsIncluded ?? true; @override - set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; + set isIncluded(bool value) => _binding.userDefinedIsIncluded = value; @override void accept(Visitor visitor) => visitor.visitUnnamedEnumConstant(this); @@ -384,10 +384,10 @@ class Func extends Decl { } @override - bool get isExcluded => _binding.userDefinedIsExcluded ?? false; + bool get isIncluded => _binding.userDefinedIsIncluded ?? true; @override - set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; + set isIncluded(bool value) => _binding.userDefinedIsIncluded = value; bool get exposeSymbolAddress => _binding.exposeSymbolAddress; set exposeSymbolAddress(bool value) => _binding.exposeSymbolAddress = value; @@ -434,10 +434,10 @@ class Global extends Decl { set name(String value) => _binding.symbol.oldName = value; @override - bool get isExcluded => _binding.userDefinedIsExcluded ?? false; + bool get isIncluded => _binding.userDefinedIsIncluded ?? true; @override - set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; + set isIncluded(bool value) => _binding.userDefinedIsIncluded = value; bool get exposeSymbolAddress => _binding.exposeSymbolAddress; set exposeSymbolAddress(bool value) => _binding.exposeSymbolAddress = value; @@ -465,10 +465,10 @@ class MacroConstant extends Decl { set name(String value) => _binding.symbol.oldName = value; @override - bool get isExcluded => _binding.userDefinedIsExcluded ?? false; + bool get isIncluded => _binding.userDefinedIsIncluded ?? true; @override - set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; + set isIncluded(bool value) => _binding.userDefinedIsIncluded = value; @override void accept(Visitor visitor) => visitor.visitMacroConstant(this); @@ -492,10 +492,10 @@ class Typealias extends Decl { set name(String value) => _binding.symbol.oldName = value; @override - bool get isExcluded => _binding.userDefinedIsExcluded ?? false; + bool get isIncluded => _binding.userDefinedIsIncluded ?? true; @override - set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; + set isIncluded(bool value) => _binding.userDefinedIsIncluded = value; @override void accept(Visitor visitor) => visitor.visitTypealias(this); @@ -519,10 +519,10 @@ class ObjCInterface extends Decl { set name(String value) => _binding.symbol.oldName = value; @override - bool get isExcluded => _binding.userDefinedIsExcluded ?? false; + bool get isIncluded => _binding.userDefinedIsIncluded ?? true; @override - set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; + set isIncluded(bool value) => _binding.userDefinedIsIncluded = value; String? get module => _binding.module; set module(String? value) => _binding.module = value; @@ -560,10 +560,10 @@ class ObjCProtocol extends Decl { set name(String value) => _binding.symbol.oldName = value; @override - bool get isExcluded => _binding.userDefinedIsExcluded ?? false; + bool get isIncluded => _binding.userDefinedIsIncluded ?? true; @override - set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; + set isIncluded(bool value) => _binding.userDefinedIsIncluded = value; String? get module => _binding.module; set module(String? value) => _binding.module = value; @@ -601,10 +601,10 @@ class ObjCCategory extends Decl { set name(String value) => _binding.symbol.oldName = value; @override - bool get isExcluded => _binding.userDefinedIsExcluded ?? false; + bool get isIncluded => _binding.userDefinedIsIncluded ?? true; @override - set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; + set isIncluded(bool value) => _binding.userDefinedIsIncluded = value; bool get isObjCImport => _binding.isObjCImport; @@ -639,10 +639,10 @@ class CppClass extends Decl { set name(String value) => _binding.symbol.oldName = value; @override - bool get isExcluded => _binding.userDefinedIsExcluded ?? false; + bool get isIncluded => _binding.userDefinedIsIncluded ?? true; @override - set isExcluded(bool value) => _binding.userDefinedIsExcluded = value; + set isIncluded(bool value) => _binding.userDefinedIsIncluded = value; List get methods => _binding.methods.map(CppMethod.new).toList(); @@ -674,9 +674,9 @@ class Field extends AstNode { set name(String value) => _member.symbol.oldName = value; - bool get isExcluded => _member.userDefinedIsExcluded ?? false; + bool get isIncluded => _member.userDefinedIsIncluded ?? true; - set isExcluded(bool value) => _member.userDefinedIsExcluded = value; + set isIncluded(bool value) => _member.userDefinedIsIncluded = value; @override void accept(Visitor visitor) => visitor.visitField(this); @@ -695,9 +695,9 @@ class EnumConstant extends AstNode { int get value => _constant.value; - bool get isExcluded => _constant.userDefinedIsExcluded ?? false; + bool get isIncluded => _constant.userDefinedIsIncluded ?? true; - set isExcluded(bool value) => _constant.userDefinedIsExcluded = value; + set isIncluded(bool value) => _constant.userDefinedIsIncluded = value; @override void accept(Visitor visitor) => visitor.visitEnumConstant(this); @@ -714,9 +714,9 @@ class Parameter extends AstNode { set name(String value) => _param.symbol.oldName = value; - bool get isExcluded => _param.userDefinedIsExcluded ?? false; + bool get isIncluded => _param.userDefinedIsIncluded ?? true; - set isExcluded(bool value) => _param.userDefinedIsExcluded = value; + set isIncluded(bool value) => _param.userDefinedIsIncluded = value; @override void accept(Visitor visitor) => visitor.visitParameter(this); @@ -742,9 +742,9 @@ class ObjCMethod extends AstNode { bool get isProperty => _method.isProperty; - bool get isExcluded => _method.userDefinedIsExcluded ?? false; + bool get isIncluded => _method.userDefinedIsIncluded ?? true; - set isExcluded(bool value) => _method.userDefinedIsExcluded = value; + set isIncluded(bool value) => _method.userDefinedIsIncluded = value; List get parameters => _method.params.map(Parameter.new).toList(); @@ -770,9 +770,9 @@ class CppMethod extends AstNode { set name(String value) => _method.name.oldName = value; - bool get isExcluded => _method.userDefinedIsExcluded ?? false; + bool get isIncluded => _method.userDefinedIsIncluded ?? true; - set isExcluded(bool value) => _method.userDefinedIsExcluded = value; + set isIncluded(bool value) => _method.userDefinedIsIncluded = value; @override void accept(Visitor visitor) => visitor.visitCppMethod(this); @@ -783,82 +783,82 @@ class IncludeAllVisitor extends Visitor { const IncludeAllVisitor(); @override - void visitStruct(Struct node) => node.isExcluded = false; + void visitStruct(Struct node) => node.isIncluded = true; @override - void visitUnion(Union node) => node.isExcluded = false; + void visitUnion(Union node) => node.isIncluded = true; @override - void visitEnum(EnumClass node) => node.isExcluded = false; + void visitEnum(EnumClass node) => node.isIncluded = true; @override - void visitFunc(Func node) => node.isExcluded = false; + void visitFunc(Func node) => node.isIncluded = true; @override - void visitGlobal(Global node) => node.isExcluded = false; + void visitGlobal(Global node) => node.isIncluded = true; @override - void visitMacroConstant(MacroConstant node) => node.isExcluded = false; + void visitMacroConstant(MacroConstant node) => node.isIncluded = true; @override - void visitTypealias(Typealias node) => node.isExcluded = false; + void visitTypealias(Typealias node) => node.isIncluded = true; @override - void visitObjCInterface(ObjCInterface node) => node.isExcluded = false; + void visitObjCInterface(ObjCInterface node) => node.isIncluded = true; @override - void visitObjCProtocol(ObjCProtocol node) => node.isExcluded = false; + void visitObjCProtocol(ObjCProtocol node) => node.isIncluded = true; @override - void visitObjCCategory(ObjCCategory node) => node.isExcluded = false; + void visitObjCCategory(ObjCCategory node) => node.isIncluded = true; @override void visitUnnamedEnumConstant(UnnamedEnumConstant node) => - node.isExcluded = false; + node.isIncluded = true; @override - void visitCppClass(CppClass node) => node.isExcluded = false; + void visitCppClass(CppClass node) => node.isIncluded = true; } class ExcludeAllVisitor extends Visitor { const ExcludeAllVisitor(); @override - void visitStruct(Struct node) => node.isExcluded = true; + void visitStruct(Struct node) => node.isIncluded = false; @override - void visitUnion(Union node) => node.isExcluded = true; + void visitUnion(Union node) => node.isIncluded = false; @override - void visitEnum(EnumClass node) => node.isExcluded = true; + void visitEnum(EnumClass node) => node.isIncluded = false; @override - void visitFunc(Func node) => node.isExcluded = true; + void visitFunc(Func node) => node.isIncluded = false; @override - void visitGlobal(Global node) => node.isExcluded = true; + void visitGlobal(Global node) => node.isIncluded = false; @override - void visitMacroConstant(MacroConstant node) => node.isExcluded = true; + void visitMacroConstant(MacroConstant node) => node.isIncluded = false; @override - void visitTypealias(Typealias node) => node.isExcluded = true; + void visitTypealias(Typealias node) => node.isIncluded = false; @override - void visitObjCInterface(ObjCInterface node) => node.isExcluded = true; + void visitObjCInterface(ObjCInterface node) => node.isIncluded = false; @override - void visitObjCProtocol(ObjCProtocol node) => node.isExcluded = true; + void visitObjCProtocol(ObjCProtocol node) => node.isIncluded = false; @override - void visitObjCCategory(ObjCCategory node) => node.isExcluded = true; + void visitObjCCategory(ObjCCategory node) => node.isIncluded = false; @override void visitUnnamedEnumConstant(UnnamedEnumConstant node) => - node.isExcluded = true; + node.isIncluded = false; @override - void visitCppClass(CppClass node) => node.isExcluded = true; + void visitCppClass(CppClass node) => node.isIncluded = false; } class IncludeSetVisitor extends Visitor { @@ -892,7 +892,7 @@ class IncludeSetVisitor extends Visitor { void _check(Decl node, Set? set) { if (set != null) { - node.isExcluded = !set.contains(node.originalName); + node.isIncluded = set.contains(node.originalName); } } diff --git a/pkgs/ffigen/lib/src/visitor/apply_config_filters.dart b/pkgs/ffigen/lib/src/visitor/apply_config_filters.dart index f05a0a6d18..3b2a38d27f 100644 --- a/pkgs/ffigen/lib/src/visitor/apply_config_filters.dart +++ b/pkgs/ffigen/lib/src/visitor/apply_config_filters.dart @@ -14,16 +14,16 @@ class ApplyConfigFiltersVisitation extends Visitation { ApplyConfigFiltersVisitation(this.config); void _visitImpl(Binding node) { + if (node.originalName == '') return; + if (node.userDefinedIsIncluded == false) return; + if (node.userDefinedIsIncluded == true) { + directlyIncluded.add(node); + } if (node.isObjCImport && !(config.objectiveC?.generateForPackageObjectiveC ?? false)) { return; } node.visitChildren(visitor); - if (node.originalName == '') return; - if (node.userDefinedIsExcluded == true) return; - if (node.userDefinedIsExcluded == false) { - directlyIncluded.add(node); - } } @override @@ -54,7 +54,7 @@ class ApplyConfigFiltersVisitation extends Visitation { if (node.unavailable) return; node.filterMethods( - (m) => m.userDefinedIsExcluded != true && !m.unavailable, + (m) => m.userDefinedIsIncluded != false && !m.unavailable, ); _visitImpl(node); @@ -69,10 +69,10 @@ class ApplyConfigFiltersVisitation extends Visitation { @override void visitObjCCategory(ObjCCategory node) { node.filterMethods((m) { - if (m.userDefinedIsExcluded == true) return false; + if (m.userDefinedIsIncluded == false) return false; if (m.unavailable) return false; if (node.shouldCopyMethodToInterface(m)) return false; - return m.userDefinedIsExcluded != true; + return m.userDefinedIsIncluded != false; }); _visitImpl(node); } @@ -82,11 +82,11 @@ class ApplyConfigFiltersVisitation extends Visitation { if (node.unavailable) return; node.filterMethods((m) { - if (m.userDefinedIsExcluded == true) return false; + if (m.userDefinedIsIncluded == false) return false; if (m.unavailable) return false; if (m.isClassMethod) return false; - return m.userDefinedIsExcluded != true; + return m.userDefinedIsIncluded != false; }); _visitImpl(node); } diff --git a/pkgs/ffigen/test/header_parser_tests/record_use_test.dart b/pkgs/ffigen/test/header_parser_tests/record_use_test.dart index ce5e1dbbdf..a5d9aabdeb 100644 --- a/pkgs/ffigen/test/header_parser_tests/record_use_test.dart +++ b/pkgs/ffigen/test/header_parser_tests/record_use_test.dart @@ -17,7 +17,7 @@ class _RecordUseVisitor extends Visitor { if (node.originalName == 'sum') { node.name = 'add'; } - node.isExcluded = false; + node.isIncluded = true; node.recordUse = true; } } diff --git a/pkgs/ffigen/test/large_integration_tests/large_objc_test.dart b/pkgs/ffigen/test/large_integration_tests/large_objc_test.dart index 8e7627ac4c..368f3a22fb 100644 --- a/pkgs/ffigen/test/large_integration_tests/large_objc_test.dart +++ b/pkgs/ffigen/test/large_integration_tests/large_objc_test.dart @@ -43,45 +43,45 @@ class _RandomIncludeVisitor extends Visitor { @override void visitFunc(Func node) { - if (!_randInclude('functionDecl', node.usr)) node.isExcluded = true; + if (!_randInclude('functionDecl', node.usr)) node.isIncluded = false; } @override void visitStruct(Struct node) { - if (!_randInclude('structDecl', node.usr)) node.isExcluded = true; + if (!_randInclude('structDecl', node.usr)) node.isIncluded = false; } @override void visitUnion(Union node) { - if (!_randInclude('unionDecl', node.usr)) node.isExcluded = true; + if (!_randInclude('unionDecl', node.usr)) node.isIncluded = false; } @override void visitEnum(EnumClass node) { - if (!_randInclude('enums', node.usr)) node.isExcluded = true; + if (!_randInclude('enums', node.usr)) node.isIncluded = false; } @override void visitUnnamedEnumConstant(UnnamedEnumConstant node) { - if (!_randInclude('unnamedEnumConstants', node.usr)) node.isExcluded = true; + if (!_randInclude('unnamedEnumConstants', node.usr)) node.isIncluded = false; } @override void visitGlobal(Global node) { - if (!_randInclude('globals', node.usr)) node.isExcluded = true; + if (!_randInclude('globals', node.usr)) node.isIncluded = false; } @override void visitTypealias(Typealias node) { - if (!_randInclude('typedefs', node.usr)) node.isExcluded = true; + if (!_randInclude('typedefs', node.usr)) node.isIncluded = false; } @override void visitObjCInterface(ObjCInterface node) { - if (!_randInclude('objcInterfaces', node.usr)) node.isExcluded = true; + if (!_randInclude('objcInterfaces', node.usr)) node.isIncluded = false; for (final m in node.methods) { if (!_randInclude('objcInterfaces.memb', node.usr, m.originalName)) { - m.isExcluded = true; + m.isIncluded = false; } } } @@ -90,21 +90,21 @@ class _RandomIncludeVisitor extends Visitor { void visitObjCProtocol(ObjCProtocol node) { if (!forceIncludedProtocols.contains(node.originalName) && !_randInclude('objcProtocols', node.usr)) { - node.isExcluded = true; + node.isIncluded = false; } for (final m in node.methods) { if (!_randInclude('objcProtocols.memb', node.usr, m.originalName)) { - m.isExcluded = true; + m.isIncluded = false; } } } @override void visitObjCCategory(ObjCCategory node) { - if (!_randInclude('objcCategories', node.usr)) node.isExcluded = true; + if (!_randInclude('objcCategories', node.usr)) node.isIncluded = false; for (final m in node.methods) { if (!_randInclude('objcCategories.memb', node.usr, m.originalName)) { - m.isExcluded = true; + m.isIncluded = false; } } } diff --git a/pkgs/ffigen/test/large_integration_tests/large_test.dart b/pkgs/ffigen/test/large_integration_tests/large_test.dart index 0b075eea1f..9d8583271e 100644 --- a/pkgs/ffigen/test/large_integration_tests/large_test.dart +++ b/pkgs/ffigen/test/large_integration_tests/large_test.dart @@ -202,21 +202,21 @@ class _LargeTestVisitor extends Visitor { void visitFunc(Func node) { if ({'sqlite3_vmprintf', 'sqlite3_vsnprintf', 'sqlite3_str_vappendf'} .contains(node.originalName)) { - node.isExcluded = true; + node.isIncluded = false; } } @override void visitStruct(Struct node) { if (vaRegex.hasMatch(node.originalName)) { - node.isExcluded = true; + node.isIncluded = false; } } @override void visitTypealias(Typealias node) { if (vaRegex.hasMatch(node.originalName)) { - node.isExcluded = true; + node.isIncluded = false; } } } diff --git a/pkgs/ffigen/test/public_ast_visitor_test.dart b/pkgs/ffigen/test/public_ast_visitor_test.dart index 38fa1f3879..cebb177d9a 100644 --- a/pkgs/ffigen/test/public_ast_visitor_test.dart +++ b/pkgs/ffigen/test/public_ast_visitor_test.dart @@ -37,14 +37,14 @@ class CustomExcluderVisitor extends Visitor { @override void visitFunc(Func node) { if (node.originalName == 'func2') { - node.isExcluded = true; + node.isIncluded = false; } } @override void visitStruct(Struct node) { if (node.originalName == 'StructB') { - node.isExcluded = true; + node.isIncluded = false; } } } diff --git a/pkgs/ffigen/test/unit_tests/config_util_test.dart b/pkgs/ffigen/test/unit_tests/config_util_test.dart index ed2c635c70..e5aaff12a3 100644 --- a/pkgs/ffigen/test/unit_tests/config_util_test.dart +++ b/pkgs/ffigen/test/unit_tests/config_util_test.dart @@ -27,8 +27,8 @@ void main() { final structBaz = createStruct('baz'); visitor.visitStruct(structFoo); visitor.visitStruct(structBaz); - expect(structFoo.isExcluded, isFalse); - expect(structBaz.isExcluded, isTrue); + expect(structFoo.isIncluded, isTrue); + expect(structBaz.isIncluded, isFalse); }); test('RenameMapVisitor', () { diff --git a/pkgs/ffigen/tool/generate_code.dart b/pkgs/ffigen/tool/generate_code.dart index 18a5309df4..d898abfd60 100644 --- a/pkgs/ffigen/tool/generate_code.dart +++ b/pkgs/ffigen/tool/generate_code.dart @@ -124,7 +124,7 @@ class LibClangVisitor extends Visitor { void visitEnum(EnumClass node) { node.style = EnumStyle.intConstants; if (node.originalName.isNotEmpty && !enums.contains(node.originalName)) { - node.isExcluded = true; + node.isIncluded = false; } } @@ -134,21 +134,21 @@ class LibClangVisitor extends Visitor { !structs.contains(node.originalName) && !node.originalName.contains('Version') && !node.originalName.contains('PlatformAvailability')) { - node.isExcluded = true; + node.isIncluded = false; } } @override void visitFunc(Func node) { if (!functions.contains(node.originalName)) { - node.isExcluded = true; + node.isIncluded = false; } } @override void visitTypealias(Typealias node) { if (RegExp(r'.*time(64)?_t$').hasMatch(node.originalName)) { - node.isExcluded = true; + node.isIncluded = false; } } } diff --git a/pkgs/jni/tool/generate_ffi_bindings.dart b/pkgs/jni/tool/generate_ffi_bindings.dart index f1942fe90e..a75b83bd3b 100644 --- a/pkgs/jni/tool/generate_ffi_bindings.dart +++ b/pkgs/jni/tool/generate_ffi_bindings.dart @@ -128,7 +128,7 @@ class JniVisitor extends ffigen.Visitor { if (renamed != null) { node.name = renamed; } - node.isExcluded = false; + node.isIncluded = true; } @override @@ -137,27 +137,27 @@ class JniVisitor extends ffigen.Visitor { excludedFuncs.contains(node.originalName) || globalEnvNewObjectRegExp.hasMatch(node.originalName) || globalEnvCallRegExp.hasMatch(node.originalName)) { - node.isExcluded = true; + node.isIncluded = false; return; } final renamed = funcRenames[node.originalName]; if (renamed != null) { node.name = renamed; } - node.isExcluded = false; + node.isIncluded = true; } @override void visitStruct(ffigen.Struct node) { if (excludedStructs.contains(node.originalName)) { - node.isExcluded = true; + node.isIncluded = false; return; } final renamed = structRenames[node.originalName]; if (renamed != null) { node.name = renamed; } - node.isExcluded = false; + node.isIncluded = true; } @override @@ -165,22 +165,22 @@ class JniVisitor extends ffigen.Visitor { if (node.originalName == 'jvalue') { node.name = 'JValue'; } - node.isExcluded = false; + node.isIncluded = true; } @override void visitGlobal(ffigen.Global node) { if (excludedGlobals.contains(node.originalName)) { - node.isExcluded = true; + node.isIncluded = false; return; } - node.isExcluded = false; + node.isIncluded = true; } @override void visitTypealias(ffigen.Typealias node) { if (excludedTypeDefs.contains(node.originalName)) { - node.isExcluded = true; + node.isIncluded = false; return; } final renamed = typedefRenames[node.originalName]; @@ -189,7 +189,7 @@ class JniVisitor extends ffigen.Visitor { } else if (node.originalName.startsWith('JNI')) { node.name = 'Jni${node.originalName.substring(3)}'; } - node.isExcluded = false; + node.isIncluded = true; } } diff --git a/pkgs/objective_c/tool/generate_code.dart b/pkgs/objective_c/tool/generate_code.dart index 8a183983f5..197e13fc60 100644 --- a/pkgs/objective_c/tool/generate_code.dart +++ b/pkgs/objective_c/tool/generate_code.dart @@ -136,10 +136,10 @@ class RuntimeBindingsVisitor extends Visitor { void visitFunc(Func node) { final isObjc = node.originalName.startsWith('objc_'); if (!isObjc && !functions.contains(node.originalName)) { - node.isExcluded = true; + node.isIncluded = false; return; } - node.isExcluded = false; + node.isIncluded = true; if (!node.originalName.startsWith('objc_msgSend')) { node.isLeaf = true; } @@ -153,44 +153,44 @@ class RuntimeBindingsVisitor extends Visitor { void visitGlobal(Global node) { if (node.originalName.startsWith('_') && node.originalName.endsWith('Block')) { - node.isExcluded = false; + node.isIncluded = true; node.name = node.originalName.substring(1); } else if (globals.contains(node.originalName)) { - node.isExcluded = false; + node.isIncluded = true; if (node.originalName.startsWith('_')) { node.name = node.originalName.substring(1); } } else { - node.isExcluded = true; + node.isIncluded = false; } } @override void visitStruct(Struct node) { if (node.originalName.startsWith('_ObjC')) { - node.isExcluded = false; + node.isIncluded = true; node.name = 'ObjC${node.originalName.substring(5)}'; } } @override void visitEnum(EnumClass node) { - node.isExcluded = true; + node.isIncluded = false; } @override void visitMacroConstant(MacroConstant node) { - node.isExcluded = true; + node.isIncluded = false; } @override void visitUnnamedEnumConstant(UnnamedEnumConstant node) { - node.isExcluded = true; + node.isIncluded = false; } @override void visitUnion(Union node) { - node.isExcluded = true; + node.isIncluded = false; } } @@ -210,10 +210,10 @@ class CBindingsVisitor extends Visitor { final isDobjc = node.originalName.startsWith('DOBJC_'); final isNewFinalizable = node.originalName == 'newFinalizableHandle'; if (!isDobjc && !isNewFinalizable) { - node.isExcluded = true; + node.isIncluded = false; return; } - node.isExcluded = false; + node.isIncluded = true; if (!nonLeaf.contains(node.originalName)) { node.isLeaf = true; } @@ -225,20 +225,20 @@ class CBindingsVisitor extends Visitor { @override void visitTypealias(Typealias node) { if (node.originalName == 'Dart_FinalizableHandle') { - node.isExcluded = false; + node.isIncluded = true; } } @override void visitStruct(Struct node) { if (node.originalName == '_DOBJC_Context') { - node.isExcluded = false; + node.isIncluded = true; node.name = 'DOBJC_Context'; } else if (node.originalName == '_Dart_FinalizableHandle') { - node.isExcluded = false; + node.isIncluded = true; node.name = 'Dart_FinalizableHandle_'; } else if (node.originalName.startsWith('_ObjC')) { - node.isExcluded = false; + node.isIncluded = true; node.name = 'ObjC${node.originalName.substring(5)}'; } } @@ -246,30 +246,30 @@ class CBindingsVisitor extends Visitor { @override void visitMacroConstant(MacroConstant node) { if (node.originalName == 'ILLEGAL_PORT') { - node.isExcluded = false; + node.isIncluded = true; } else { - node.isExcluded = true; + node.isIncluded = false; } } @override void visitEnum(EnumClass node) { - node.isExcluded = true; + node.isIncluded = false; } @override void visitGlobal(Global node) { - node.isExcluded = true; + node.isIncluded = false; } @override void visitUnnamedEnumConstant(UnnamedEnumConstant node) { - node.isExcluded = true; + node.isIncluded = false; } @override void visitUnion(Union node) { - node.isExcluded = true; + node.isIncluded = false; } } @@ -426,21 +426,21 @@ class ObjCBindingsVisitor extends Visitor { @override void visitFunc(Func node) { - node.isExcluded = true; + node.isIncluded = false; } @override void visitObjCInterface(ObjCInterface node) { final renamed = interfaces[node.originalName]; if (renamed != null) { - node.isExcluded = false; + node.isIncluded = true; node.name = renamed; } if (node.originalName == 'NSBundle') { for (final method in node.methods) { if (method.originalName == 'localizedStringForKey:value:table:localizations:') { - method.isExcluded = true; + method.isIncluded = false; } } } @@ -450,7 +450,7 @@ class ObjCBindingsVisitor extends Visitor { void visitObjCProtocol(ObjCProtocol node) { final renamed = protocols[node.originalName]; if (renamed != null) { - node.isExcluded = false; + node.isIncluded = true; node.name = renamed; } } @@ -458,21 +458,21 @@ class ObjCBindingsVisitor extends Visitor { @override void visitObjCCategory(ObjCCategory node) { if (categories.contains(node.originalName)) { - node.isExcluded = false; + node.isIncluded = true; } else { - node.isExcluded = true; + node.isIncluded = false; } } @override void visitStruct(Struct node) { if (node.originalName.isEmpty) { - node.isExcluded = true; + node.isIncluded = false; return; } final renamed = structs[node.originalName]; if (renamed != null) { - node.isExcluded = false; + node.isIncluded = true; node.name = renamed; } } @@ -480,37 +480,37 @@ class ObjCBindingsVisitor extends Visitor { @override void visitEnum(EnumClass node) { if (enums.contains(node.originalName)) { - node.isExcluded = false; + node.isIncluded = true; } else { - node.isExcluded = true; + node.isIncluded = false; } } @override void visitTypealias(Typealias node) { if (node.originalName == 'CFStringRef') { - node.isExcluded = false; + node.isIncluded = true; } } @override void visitGlobal(Global node) { - node.isExcluded = true; + node.isIncluded = false; } @override void visitMacroConstant(MacroConstant node) { - node.isExcluded = true; + node.isIncluded = false; } @override void visitUnnamedEnumConstant(UnnamedEnumConstant node) { - node.isExcluded = true; + node.isIncluded = false; } @override void visitUnion(Union node) { - node.isExcluded = true; + node.isIncluded = false; } } From 36358a97984706c8f8abcfdb6b4bf26161854666 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Wed, 29 Jul 2026 16:46:46 +1000 Subject: [PATCH 10/37] per-enum warning --- .../example/mini_audio/tool/ffigen.dart | 1 - .../lib/src/code_generator/enum_class.dart | 4 +++ .../lib/src/code_generator/library.dart | 3 -- .../ffigen/lib/src/code_generator/writer.dart | 34 ++++++++----------- .../lib/src/config_provider/config.dart | 14 -------- .../lib/src/config_provider/yaml_config.dart | 11 ++++-- .../ffigen/lib/src/public_ast/public_ast.dart | 3 ++ pkgs/ffigen/test/public_ast_visitor_test.dart | 22 ++++++++++++ 8 files changed, 52 insertions(+), 40 deletions(-) diff --git a/pkgs/code_assets/example/mini_audio/tool/ffigen.dart b/pkgs/code_assets/example/mini_audio/tool/ffigen.dart index 6e13e03799..e79995d414 100644 --- a/pkgs/code_assets/example/mini_audio/tool/ffigen.dart +++ b/pkgs/code_assets/example/mini_audio/tool/ffigen.dart @@ -25,7 +25,6 @@ void main() { ), RecordUseVisitor(), ], - enums: const Enums(silenceWarning: true), output: Output( dartFile: packageRoot.resolve('lib/src/third_party/miniaudio.g.dart'), recordUseMapping: packageRoot.resolve( diff --git a/pkgs/ffigen/lib/src/code_generator/enum_class.dart b/pkgs/ffigen/lib/src/code_generator/enum_class.dart index 33034b713c..e1896613fa 100644 --- a/pkgs/ffigen/lib/src/code_generator/enum_class.dart +++ b/pkgs/ffigen/lib/src/code_generator/enum_class.dart @@ -58,6 +58,9 @@ class EnumClass extends BindingType with HasLocalScope { final ApiAvailability? apiAvailability; + /// Whether to silence warning for enum integer type mimicking. + bool silenceWarning; + EnumClass({ super.usr, super.originalName, @@ -69,6 +72,7 @@ class EnumClass extends BindingType with HasLocalScope { this.style = EnumStyle.dartEnum, this.isAnonymous = false, this.apiAvailability, + this.silenceWarning = false, }) : nativeType = nativeType ?? intType, enumConstants = enumConstants ?? []; diff --git a/pkgs/ffigen/lib/src/code_generator/library.dart b/pkgs/ffigen/lib/src/code_generator/library.dart index 126a389354..271661c9de 100644 --- a/pkgs/ffigen/lib/src/code_generator/library.dart +++ b/pkgs/ffigen/lib/src/code_generator/library.dart @@ -38,7 +38,6 @@ class Library { context.config.objectiveC?.generateForPackageObjectiveC ?? false, // ignore: deprecated_member_use_from_same_package libraryImports: context.config.libraryImports, - silenceEnumWarning: context.config.enums.silenceWarning, nativeEntryPoints: context.config.headers.entryPoints .map((uri) => uri.toFilePath()) .toList(), @@ -51,7 +50,6 @@ class Library { String? header, bool generateForPackageObjectiveC = false, List libraryImports = const [], - bool silenceEnumWarning = false, List nativeEntryPoints = const [], required Context context, }) { @@ -90,7 +88,6 @@ class Library { header: header, additionalImports: libraryImports.map(context.libs.canonicalize).toList(), generateForPackageObjectiveC: generateForPackageObjectiveC, - silenceEnumWarning: silenceEnumWarning, nativeEntryPoints: nativeEntryPoints, context: context, ); diff --git a/pkgs/ffigen/lib/src/code_generator/writer.dart b/pkgs/ffigen/lib/src/code_generator/writer.dart index 845573a48c..14c00646ca 100644 --- a/pkgs/ffigen/lib/src/code_generator/writer.dart +++ b/pkgs/ffigen/lib/src/code_generator/writer.dart @@ -41,8 +41,6 @@ class Writer { bool get canGenerateSymbolOutput => _canGenerateSymbolOutput; bool _canGenerateSymbolOutput = false; - final bool silenceEnumWarning; - Writer({ required this.lookUpBindings, required this.ffiNativeBindings, @@ -52,7 +50,6 @@ class Writer { this.classDocComment, this.header, required this.generateForPackageObjectiveC, - required this.silenceEnumWarning, required this.nativeEntryPoints, required this.context, }) : symbolAddressWriter = SymbolAddressWriter(context); @@ -186,23 +183,22 @@ const _\$objcVersionCheck = $objcPrefix.ObjCVersionCheck( result.write(s); // Warn about Enum usage in API surface. - if (!silenceEnumWarning) { - final notEnums = _allBindings.where( - (b) => b is! Type || (b as Type).typealiasType is! EnumClass, + final notEnums = _allBindings.where( + (b) => b is! Type || (b as Type).typealiasType is! EnumClass, + ); + final usedEnums = visit(context, _FindEnumsVisitation(), notEnums).enums; + final unSilencedUsedEnums = usedEnums.where((e) => !e.silenceWarning); + if (unSilencedUsedEnums.isNotEmpty) { + final names = + unSilencedUsedEnums.map((e) => e.originalName).toList()..sort(); + context.logger.severe( + 'The integer type used for enums is ' + 'implementation-defined. FFIgen tries to mimic the integer sizes ' + 'chosen by the most common compilers for the various OS and ' + 'architecture combinations. To prevent any crashes, remove the ' + 'enums from your API surface. To rely on the (unsafe!) mimicking, ' + 'you can silence this warning on the EnumClass. Affected enums:\n\t${names.join('\n\t')}', ); - final usedEnums = visit(context, _FindEnumsVisitation(), notEnums).enums; - if (usedEnums.isNotEmpty) { - final names = usedEnums.map((e) => e.originalName).toList()..sort(); - context.logger.severe( - 'The integer type used for enums is ' - 'implementation-defined. FFIgen tries to mimic the integer sizes ' - 'chosen by the most common compilers for the various OS and ' - 'architecture combinations. To prevent any crashes, remove the ' - 'enums from your API surface. To rely on the (unsafe!) mimicking, ' - 'you can silence this warning by adding silence-enum-warning: true ' - 'to the FFIgen config. Affected enums:\n\t${names.join('\n\t')}', - ); - } } _canGenerateSymbolOutput = true; diff --git a/pkgs/ffigen/lib/src/config_provider/config.dart b/pkgs/ffigen/lib/src/config_provider/config.dart index 2c249f05b2..4de6068cd1 100644 --- a/pkgs/ffigen/lib/src/config_provider/config.dart +++ b/pkgs/ffigen/lib/src/config_provider/config.dart @@ -22,9 +22,6 @@ final class FfiGenerator { /// The configuration for header parsing of [FfiGenerator]. final Headers headers; - /// Configuration for enums. - final Enums enums; - /// Configuration for functions. final Functions functions; @@ -85,7 +82,6 @@ final class FfiGenerator { const FfiGenerator({ this.visitors = const [], this.headers = const Headers(), - this.enums = const Enums(), this.functions = const Functions(), this.integers = const Integers(), this.structs = const Structs(), @@ -143,16 +139,6 @@ final class Headers { }); } -/// Configuration for enum declarations. -final class Enums { - /// Whether to silence warning for enum integer type mimicking. - final bool silenceWarning; - - const Enums({ - this.silenceWarning = false, - }); -} - /// Configuration for how to generate enums. enum EnumStyle { /// Generate a real Dart enum. diff --git a/pkgs/ffigen/lib/src/config_provider/yaml_config.dart b/pkgs/ffigen/lib/src/config_provider/yaml_config.dart index 024300668f..124cc35487 100644 --- a/pkgs/ffigen/lib/src/config_provider/yaml_config.dart +++ b/pkgs/ffigen/lib/src/config_provider/yaml_config.dart @@ -1243,6 +1243,7 @@ final class YamlConfig { exposeFunctionTypedefs: _exposeFunctionTypedefs, leafFunctions: _leafFunctions, enumsAsInt: _enumsAsInt, + silenceEnumWarning: _silenceEnumWarning, structPackingOverride: _structPackingOverride, objcInterfaceModules: _objcInterfaceModules, objcProtocolModules: _objcProtocolModules, @@ -1278,9 +1279,6 @@ final class YamlConfig { // ignore: deprecated_member_use_from_same_package imported: structTypeMappings.values.toList(), ), - enums: Enums( - silenceWarning: silenceEnumWarning, - ), unions: Unions( dependencies: _unionDependencies, // ignore: deprecated_member_use_from_same_package @@ -1354,6 +1352,7 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { required YamlIncluder exposeFunctionTypedefs, required YamlIncluder leafFunctions, required YamlIncluder enumsAsInt, + required bool silenceEnumWarning, required StructPackingOverride structPackingOverride, required ObjCModules objcInterfaceModules, required ObjCModules objcProtocolModules, @@ -1371,10 +1370,13 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { _exposeFunctionTypedefs = exposeFunctionTypedefs, _leafFunctions = leafFunctions, _enumsAsInt = enumsAsInt, + _silenceEnumWarning = silenceEnumWarning, _structPackingOverride = structPackingOverride, _objcInterfaceModules = objcInterfaceModules, _objcProtocolModules = objcProtocolModules; + final bool _silenceEnumWarning; + void _applyInclusion(public_ast.Decl node, YamlDeclarationFilters decl) { if (decl.isExplicitlyIncluded(node.originalName)) { node.isIncluded = true; @@ -1448,6 +1450,9 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { if (_enumsAsInt.shouldInclude(node.originalName)) { node.style = EnumStyle.intConstants; } + if (_silenceEnumWarning) { + node.silenceWarning = true; + } for (final constant in node.constants) { if (constant.originalName != null && !_enumClassDecl.shouldIncludeMember( diff --git a/pkgs/ffigen/lib/src/public_ast/public_ast.dart b/pkgs/ffigen/lib/src/public_ast/public_ast.dart index 84fb538bb5..b712958c23 100644 --- a/pkgs/ffigen/lib/src/public_ast/public_ast.dart +++ b/pkgs/ffigen/lib/src/public_ast/public_ast.dart @@ -321,6 +321,9 @@ class EnumClass implements Decl { EnumStyle get style => _binding.style; set style(EnumStyle value) => _binding.style = value; + bool get silenceWarning => _binding.silenceWarning; + set silenceWarning(bool value) => _binding.silenceWarning = value; + List get constants => _binding.enumConstants.map(EnumConstant.new).toList(); diff --git a/pkgs/ffigen/test/public_ast_visitor_test.dart b/pkgs/ffigen/test/public_ast_visitor_test.dart index cebb177d9a..c365593be7 100644 --- a/pkgs/ffigen/test/public_ast_visitor_test.dart +++ b/pkgs/ffigen/test/public_ast_visitor_test.dart @@ -169,6 +169,28 @@ void main() { throwsA(isA()), ); }); + + test('EnumClass.silenceWarning option on public AST', () { + final headerUri = Uri.file( + absPath('test/header_parser_tests/enum_int_mimic.h'), + ); + final generator = FfiGenerator( + headers: Headers(entryPoints: [headerUri]), + output: Output(dartFile: Uri.file('unused.dart')), + visitors: [ + const IncludeAllVisitor(), + Visitor( + visitEnum: (node) { + node.silenceWarning = true; + }, + ), + ], + ); + + final library = parser.parse(testContext(generator)); + final enumClass = library.getBinding('Simple') as code_gen.EnumClass; + expect(enumClass.silenceWarning, isTrue); + }); }); } From cc8cb0b522f362f3f18a88ade3fa31d2df4da155 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Wed, 29 Jul 2026 17:23:22 +1000 Subject: [PATCH 11/37] remove include transitive flags --- pkgs/ffigen/ffigen.schema.json | 9 - pkgs/ffigen/lib/ffigen.dart | 3 - .../src/code_generator/objc_interface.dart | 1 + .../lib/src/config_provider/config.dart | 51 - .../lib/src/config_provider/yaml_config.dart | 92 +- pkgs/ffigen/lib/src/header_parser/parser.dart | 6 +- .../ffigen/lib/src/public_ast/public_ast.dart | 5 + pkgs/ffigen/lib/src/strings.dart | 3 - .../lib/src/visitor/apply_config_filters.dart | 1 + .../lib/src/visitor/find_transitive_deps.dart | 25 +- .../ffigen/lib/src/visitor/list_bindings.dart | 14 +- .../code_generator_test.dart | 4 +- .../category_test_bindings.dart | 616 +- .../native_objc_test/deprecated_test.dart | 1 - .../test/native_objc_test/ns_range_test.dart | 10 +- .../property_test_bindings.dart | 10 - .../protocol_test_bindings.dart | 16 - .../sdk_variable_test_bindings.dart | 5195 +---------------- .../swift_unavailable_test.dart | 9 +- .../native_objc_test/transitive_test.dart | 158 +- .../test/native_objc_test/transitive_test.h | 2 + pkgs/ffigen/test/public_ast_visitor_test.dart | 31 + 22 files changed, 839 insertions(+), 5423 deletions(-) diff --git a/pkgs/ffigen/ffigen.schema.json b/pkgs/ffigen/ffigen.schema.json index 7ffac6ad69..e0893174df 100644 --- a/pkgs/ffigen/ffigen.schema.json +++ b/pkgs/ffigen/ffigen.schema.json @@ -427,15 +427,6 @@ "include-unused-typedefs": { "type": "boolean" }, - "include-transitive-objc-interfaces": { - "type": "boolean" - }, - "include-transitive-objc-protocols": { - "type": "boolean" - }, - "include-transitive-objc-categories": { - "type": "boolean" - }, "generate-for-package-objective-c": { "type": "boolean" }, diff --git a/pkgs/ffigen/lib/ffigen.dart b/pkgs/ffigen/lib/ffigen.dart index ce6a368d23..3c29a7f94e 100644 --- a/pkgs/ffigen/lib/ffigen.dart +++ b/pkgs/ffigen/lib/ffigen.dart @@ -17,7 +17,6 @@ export 'src/code_generator/imports.dart' show ImportedType, LibraryImport; export 'src/config_provider.dart' show BindingStyle, - Categories, CommentLength, CommentStyle, CommentType, @@ -31,12 +30,10 @@ export 'src/config_provider.dart' Functions, Headers, Integers, - Interfaces, NativeExternalBindings, ObjectiveC, Output, PackingValue, - Protocols, Structs, SymbolFile, Typedefs, diff --git a/pkgs/ffigen/lib/src/code_generator/objc_interface.dart b/pkgs/ffigen/lib/src/code_generator/objc_interface.dart index ff1559c68d..40026d83a4 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_interface.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_interface.dart @@ -17,6 +17,7 @@ class ObjCInterface extends BindingType with ObjCMethods, HasLocalScope { final Context context; ObjCInterface? superType; bool filled = false; + bool includeCategories = true; String? _module; String? get module => _module; diff --git a/pkgs/ffigen/lib/src/config_provider/config.dart b/pkgs/ffigen/lib/src/config_provider/config.dart index 4de6068cd1..d8e8c78a47 100644 --- a/pkgs/ffigen/lib/src/config_provider/config.dart +++ b/pkgs/ffigen/lib/src/config_provider/config.dart @@ -262,15 +262,6 @@ final class Unions { /// Configuration for Objective-C. final class ObjectiveC { - /// Declaration filters for Objective-C categories. - final Categories categories; - - /// Declaration filters for Objective-C interfaces. - final Interfaces interfaces; - - /// Declaration filters for Objective-C protocols. - final Protocols protocols; - // 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. @@ -284,54 +275,12 @@ final class ObjectiveC { final ExternalVersions externalVersions; const ObjectiveC({ - this.categories = const Categories(), - this.interfaces = const Interfaces(), - this.protocols = const Protocols(), this.externalVersions = const ExternalVersions(), @Deprecated('Only for internal use.') this.generateForPackageObjectiveC = false, }); } -/// Configuration for Objective-C categories. -final class Categories { - /// If enabled, Objective-C categories that are not explicitly included by - /// the [Declarations], but extend interfaces that are included, - /// will be code-genned as if they were included. If disabled, these - /// transitively included categories will not be generated at all. - final bool includeTransitive; - - const Categories({ - this.includeTransitive = true, - }); -} - -/// Configuration for Objective-C interfaces. -final class Interfaces { - /// If enabled, Objective-C interfaces that are not explicitly included by - /// the [Declarations], but are transitively included by other bindings, - /// will be code-genned as if they were included. If disabled, these - /// transitively included interfaces will be generated as stubs instead. - final bool includeTransitive; - - const Interfaces({ - this.includeTransitive = false, - }); -} - -/// Configuration for Objective-C protocols. -final class Protocols { - /// If enabled, Objective-C protocols that are not explicitly included by - /// the [Declarations], but are transitively included by other bindings, - /// will be code-genned as if they were included. If disabled, these - /// transitively included protocols will not be generated at all. - final bool includeTransitive; - - const Protocols({ - this.includeTransitive = false, - }); -} - /// Configuration for outputting bindings. final class Output { /// The output Dart file for the generated bindings. diff --git a/pkgs/ffigen/lib/src/config_provider/yaml_config.dart b/pkgs/ffigen/lib/src/config_provider/yaml_config.dart index 124cc35487..7cb13715cb 100644 --- a/pkgs/ffigen/lib/src/config_provider/yaml_config.dart +++ b/pkgs/ffigen/lib/src/config_provider/yaml_config.dart @@ -118,27 +118,6 @@ final class YamlConfig { bool get includeUnusedTypedefs => _includeUnusedTypedefs; late bool _includeUnusedTypedefs; - /// If enabled, Objective C interfaces that are not explicitly included by the - /// [YamlDeclarationFilters], but are transitively included by other bindings, - /// will be code-genned as if they were included. If disabled, these - /// transitively included interfaces will be generated as stubs instead. - bool get includeTransitiveObjCInterfaces => _includeTransitiveObjCInterfaces; - late bool _includeTransitiveObjCInterfaces; - - /// If enabled, Objective C protocols that are not explicitly included by the - /// [YamlDeclarationFilters], but are transitively included by other bindings, - /// will be code-genned as if they were included. If disabled, these - /// transitively included protocols will not be generated at all. - bool get includeTransitiveObjCProtocols => _includeTransitiveObjCProtocols; - late bool _includeTransitiveObjCProtocols; - - /// If enabled, Objective C categories that are not explicitly included by - /// the [YamlDeclarationFilters], but extend interfaces that are included, - /// will be code-genned as if they were included. If disabled, these - /// transitively included categories will not be generated at all. - bool get includeTransitiveObjCCategories => _includeTransitiveObjCCategories; - late bool _includeTransitiveObjCCategories; - /// 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. @@ -800,27 +779,6 @@ final class YamlConfig { resultOrDefault: (node) => _includeUnusedTypedefs = node.value as bool, ), - HeterogeneousMapEntry( - key: strings.includeTransitiveObjCInterfaces, - valueConfigSpec: BoolConfigSpec(), - defaultValue: (node) => false, - resultOrDefault: (node) => - _includeTransitiveObjCInterfaces = node.value as bool, - ), - HeterogeneousMapEntry( - key: strings.includeTransitiveObjCProtocols, - valueConfigSpec: BoolConfigSpec(), - defaultValue: (node) => false, - resultOrDefault: (node) => - _includeTransitiveObjCProtocols = node.value as bool, - ), - HeterogeneousMapEntry( - key: strings.includeTransitiveObjCCategories, - valueConfigSpec: BoolConfigSpec(), - defaultValue: (node) => true, - resultOrDefault: (node) => - _includeTransitiveObjCCategories = node.value as bool, - ), HeterogeneousMapEntry( key: strings.generateForPackageObjectiveC, valueConfigSpec: BoolConfigSpec(), @@ -1292,15 +1250,6 @@ final class YamlConfig { ), objectiveC: language == Language.objc ? ObjectiveC( - interfaces: Interfaces( - includeTransitive: includeTransitiveObjCInterfaces, - ), - protocols: Protocols( - includeTransitive: includeTransitiveObjCProtocols, - ), - categories: Categories( - includeTransitive: includeTransitiveObjCCategories, - ), externalVersions: externalVersions, // ignore: deprecated_member_use_from_same_package generateForPackageObjectiveC: generateForPackageObjectiveC, @@ -1605,23 +1554,42 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { @override void visitObjCCategory(public_ast.ObjCCategory node) { if (node.originalName.isEmpty) return; - _applyInclusion(node, _objcCategories); + final isParentInterfaceIncluded = + _objcInterfaces.isExplicitlyIncluded(node.interface.originalName) && + node.interface.includeCategories; + if (_objcCategories.isExplicitlyIncluded(node.originalName)) { + node.isIncluded = true; + } else if (_objcCategories.isExplicitlyExcluded(node.originalName)) { + node.isIncluded = false; + } else if (isParentInterfaceIncluded) { + // Category extends an explicitly included interface with includeCategories=true. + } else if (_objcCategories.excludeAllByDefault) { + node.isIncluded = false; + } else { + node.isIncluded = true; + } + final renamed = _objcCategories.rename(node.originalName); if (renamed != node.originalName) { node.name = renamed; } for (final method in node.methods) { - if (!_objcCategories.shouldIncludeMember( - node.originalName, method.originalName)) { - method.isIncluded = false; - } else { - final methodRenamed = _objcCategories.renameMember( - node.originalName, - method.originalName, - ); - if (methodRenamed != method.originalName) { - _renameObjCMethod(method, methodRenamed); + if (_objcCategories.isExplicitlyIncluded(node.originalName) || + isParentInterfaceIncluded) { + if (!_objcCategories.shouldIncludeMember( + node.originalName, method.originalName)) { + method.isIncluded = false; + } else { + final methodRenamed = _objcCategories.renameMember( + node.originalName, + method.originalName, + ); + if (methodRenamed != method.originalName) { + _renameObjCMethod(method, methodRenamed); + } } + } else if (_objcCategories.excludeAllByDefault) { + method.isIncluded = false; } } } diff --git a/pkgs/ffigen/lib/src/header_parser/parser.dart b/pkgs/ffigen/lib/src/header_parser/parser.dart index a481723200..1dcc4462c0 100644 --- a/pkgs/ffigen/lib/src/header_parser/parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/parser.dart @@ -178,13 +178,13 @@ List transformBindings(List rawBindings, Context context) { visit(context, FixOverriddenMethodsVisitation(context), allBindings); // Execute Public AST visitors. - final publicAst = public_ast.PublicAst.fromBindings(allBindings.toList()); + final publicAst = public_ast.PublicAst.fromBindings(rawBindings); for (final v in config.visitors) { publicAst.accept(v); } final applyConfigFiltersVisitation = ApplyConfigFiltersVisitation(config); - visit(context, applyConfigFiltersVisitation, allBindings); + visit(context, applyConfigFiltersVisitation, rawBindings); final directlyIncluded = applyConfigFiltersVisitation.directlyIncluded; final indirectlyIncluded = applyConfigFiltersVisitation.indirectlyIncluded; final included = directlyIncluded.union(indirectlyIncluded); @@ -214,7 +214,7 @@ List transformBindings(List rawBindings, Context context) { final semiFinalBindings = visit( context, ListBindingsVisitation(config, included, transitives, directTransitives), - included.union(transitives), + included.union(transitives).union(directTransitives), ).bindings; final finalBindings = visit( context, diff --git a/pkgs/ffigen/lib/src/public_ast/public_ast.dart b/pkgs/ffigen/lib/src/public_ast/public_ast.dart index b712958c23..41ce2406fd 100644 --- a/pkgs/ffigen/lib/src/public_ast/public_ast.dart +++ b/pkgs/ffigen/lib/src/public_ast/public_ast.dart @@ -530,6 +530,9 @@ class ObjCInterface extends Decl { String? get module => _binding.module; set module(String? value) => _binding.module = value; + bool get includeCategories => _binding.includeCategories; + set includeCategories(bool value) => _binding.includeCategories = value; + bool get isObjCImport => _binding.isObjCImport; List get methods => _binding.methods.map(ObjCMethod.new).toList(); @@ -611,6 +614,8 @@ class ObjCCategory extends Decl { bool get isObjCImport => _binding.isObjCImport; + ObjCInterface get interface => ObjCInterface(_binding.parent); + List get methods => _binding.methods.map(ObjCMethod.new).toList(); @override diff --git a/pkgs/ffigen/lib/src/strings.dart b/pkgs/ffigen/lib/src/strings.dart index 8258f7a1a8..be2579959b 100644 --- a/pkgs/ffigen/lib/src/strings.dart +++ b/pkgs/ffigen/lib/src/strings.dart @@ -83,9 +83,6 @@ const objcCategories = 'objc-categories'; const excludeAllByDefault = 'exclude-all-by-default'; const includeUnusedTypedefs = 'include-unused-typedefs'; -const includeTransitiveObjCInterfaces = 'include-transitive-objc-interfaces'; -const includeTransitiveObjCProtocols = 'include-transitive-objc-protocols'; -const includeTransitiveObjCCategories = 'include-transitive-objc-categories'; const generateForPackageObjectiveC = 'generate-for-package-objective-c'; // Sub-fields of Declarations. diff --git a/pkgs/ffigen/lib/src/visitor/apply_config_filters.dart b/pkgs/ffigen/lib/src/visitor/apply_config_filters.dart index 3b2a38d27f..4cc95dd3f6 100644 --- a/pkgs/ffigen/lib/src/visitor/apply_config_filters.dart +++ b/pkgs/ffigen/lib/src/visitor/apply_config_filters.dart @@ -61,6 +61,7 @@ class ApplyConfigFiltersVisitation extends Visitation { // If this node is included, include all its super types. if (directlyIncluded.contains(node)) { for (ObjCInterface? t = node; t != null; t = t.superType) { + if (t.isObjCImport) break; if (!indirectlyIncluded.add(t)) break; } } diff --git a/pkgs/ffigen/lib/src/visitor/find_transitive_deps.dart b/pkgs/ffigen/lib/src/visitor/find_transitive_deps.dart index e251850ea5..e22f4cd738 100644 --- a/pkgs/ffigen/lib/src/visitor/find_transitive_deps.dart +++ b/pkgs/ffigen/lib/src/visitor/find_transitive_deps.dart @@ -17,6 +17,18 @@ class FindTransitiveDepsVisitation extends Visitation { transitives.add(node); } + @override + void visitObjCInterface(ObjCInterface node) { + if (node.isObjCImport) return; + transitives.add(node); + } + + @override + void visitObjCProtocol(ObjCProtocol node) { + if (node.isObjCImport) return; + transitives.add(node); + } + @override void visitEnumClass(EnumClass node) { if (node.isAnonymous) return; @@ -52,7 +64,7 @@ class FindDirectTransitiveDepsVisitation extends Visitation { @override void visitObjCInterface(ObjCInterface node) { - _visitImpl(node, config.objectiveC?.interfaces.includeTransitive ?? false); + _visitImpl(node, false); // Always visit the super type, regardless of whether the node is directly // included. This ensures that super types of stubs are also stubs, rather @@ -62,16 +74,17 @@ class FindDirectTransitiveDepsVisitation extends Visitation { // Similarly, always visit the protocols. visitor.visitAll(node.protocols); - // Visit the categories of built-in interfaces that have been explicitly - // included. https://github.com/dart-lang/native/issues/1820 - if (node.isObjCImport && directIncludes.contains(node)) { + // Visit categories of interfaces if includeCategories is true. + if (node.includeCategories && + (includes.contains(node) || + (node.isObjCImport && directIncludes.contains(node)))) { visitor.visitAll(node.categories); } } @override void visitObjCCategory(ObjCCategory node) { - _visitImpl(node, config.objectiveC?.categories.includeTransitive ?? false); + _visitImpl(node, node.parent.includeCategories); // Same as visitObjCInterface's visit of superType. visitor.visit(node.parent); @@ -79,7 +92,7 @@ class FindDirectTransitiveDepsVisitation extends Visitation { @override void visitObjCProtocol(ObjCProtocol node) { - _visitImpl(node, config.objectiveC?.protocols.includeTransitive ?? false); + _visitImpl(node, false); // Same as visitObjCInterface's visit of superType. visitor.visitAll(node.superProtocols); diff --git a/pkgs/ffigen/lib/src/visitor/list_bindings.dart b/pkgs/ffigen/lib/src/visitor/list_bindings.dart index a9568bebb1..a293fd3802 100644 --- a/pkgs/ffigen/lib/src/visitor/list_bindings.dart +++ b/pkgs/ffigen/lib/src/visitor/list_bindings.dart @@ -66,9 +66,7 @@ class ListBindingsVisitation extends Visitation { node.unavailable || !_visitImpl( node, - config.objectiveC?.interfaces.includeTransitive ?? false - ? _IncludeBehavior.configOrTransitive - : _IncludeBehavior.configOnly, + _IncludeBehavior.configOnly, ); if (omit && !node.isObjCImport && directTransitives.contains(node)) { @@ -80,7 +78,7 @@ class ListBindingsVisitation extends Visitation { visitor.visitAll(node.protocols); } - if (includes.contains(node)) { + if (node.includeCategories && includes.contains(node)) { // Always visit the categories of explicitly included interfaces, even if // they're built-in types: https://github.com/dart-lang/native/issues/1820 visitor.visitAll(node.categories); @@ -90,9 +88,7 @@ class ListBindingsVisitation extends Visitation { @override void visitObjCCategory(ObjCCategory node) { final parentIncluded = includes.contains(node.parent); - final behavior = - (config.objectiveC?.categories.includeTransitive ?? false) && - parentIncluded + final behavior = node.parent.includeCategories && parentIncluded ? _IncludeBehavior.configOrDirectTransitive : _IncludeBehavior.configOnly; _visitImpl(node, behavior); @@ -104,9 +100,7 @@ class ListBindingsVisitation extends Visitation { node.unavailable || !_visitImpl( node, - config.objectiveC?.protocols.includeTransitive ?? false - ? _IncludeBehavior.configOrTransitive - : _IncludeBehavior.configOnly, + _IncludeBehavior.configOnly, ); if (omit && !node.isObjCImport && directTransitives.contains(node)) { diff --git a/pkgs/ffigen/test/code_generator_tests/code_generator_test.dart b/pkgs/ffigen/test/code_generator_tests/code_generator_test.dart index cff8785613..96931032aa 100644 --- a/pkgs/ffigen/test/code_generator_tests/code_generator_test.dart +++ b/pkgs/ffigen/test/code_generator_tests/code_generator_test.dart @@ -396,6 +396,7 @@ void main() { context: context, name: 'MyIntegerEnum', style: EnumStyle.intConstants, + silenceWarning: true, enumConstants: [ EnumConstant(name: 'int1', value: 1), EnumConstant(name: 'int2', value: 2), @@ -405,7 +406,6 @@ void main() { final library = Library( context: context, header: '$licenseHeader\n', - silenceEnumWarning: true, bindings: transformBindings([ enum1, enum2, @@ -443,6 +443,7 @@ void main() { context: context, name: 'Enum2', style: EnumStyle.intConstants, + silenceWarning: true, enumConstants: [ EnumConstant(name: 'value1', value: 0), EnumConstant(name: 'value2', value: 1), @@ -489,7 +490,6 @@ void main() { final lib = Library( context: context, header: '$licenseHeader\n', - silenceEnumWarning: true, bindings: transformBindings([ enum1, enum2, diff --git a/pkgs/ffigen/test/native_objc_test/category_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/category_test_bindings.dart index 086eb07d84..8182357469 100644 --- a/pkgs/ffigen/test/native_objc_test/category_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/category_test_bindings.dart @@ -255,6 +255,88 @@ extension Mul on Thing { } } +/// NSItemProvider +extension NSItemProvider on objc.NSURL {} + +/// NSPromisedItems +extension NSPromisedItems on objc.NSURL { + /// checkPromisedItemIsReachableAndReturnError: + bool checkPromisedItemIsReachableAndReturnError() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.checkPromisedItemIsReachableAndReturnError:', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1dom33q( + _$$ref.pointer, + _sel_checkPromisedItemIsReachableAndReturnError_, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret; + } finally { + pkg_ffi.calloc.free($err); + } + } + + /// getPromisedItemResourceValue:forKey:error: + bool getPromisedItemResourceValue( + ffi.Pointer> value, { + required objc.NSString forKey, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = forKey.ref; + objc.checkOsVersionInternal( + 'NSURL.getPromisedItemResourceValue:forKey:error:', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1j9bhml( + _$$ref.pointer, + _sel_getPromisedItemResourceValue_forKey_error_, + value, + _$$ref$1.pointer, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret; + } finally { + pkg_ffi.calloc.free($err); + } + } + + /// promisedItemResourceValuesForKeys:error: + objc.NSDictionary? promisedItemResourceValuesForKeys(objc.NSArray keys) { + final _$$ref = object$.ref; + final _$$ref$1 = keys.ref; + objc.checkOsVersionInternal( + 'NSURL.promisedItemResourceValuesForKeys:error:', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1lhpu4m( + _$$ref.pointer, + _sel_promisedItemResourceValuesForKeys_error_, + _$$ref$1.pointer, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } finally { + pkg_ffi.calloc.free($err); + } + } +} + /// NSString extension NSString on Thing { /// nsStringExtension @@ -264,6 +346,347 @@ extension NSString on Thing { } } +/// NSURLCategory +extension NSURLCategory on objc.NSURL { + /// extensionMethod + int extensionMethod() { + final _$$ref = object$.ref; + return _objc_msgSend_1gcq84o(_$$ref.pointer, _sel_extensionMethod); + } +} + +/// NSURLLoading +extension NSURLLoading on objc.NSURL { + /// URLHandleUsingCache: + @Deprecated('Use NSURLConnection instead') + objc.NSURLHandle? URLHandleUsingCache(bool shouldUseCache) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.URLHandleUsingCache:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1t6aok9( + _$$ref.pointer, + _sel_URLHandleUsingCache_, + shouldUseCache, + ); + return $ret.address == 0 + ? null + : objc.NSURLHandle.fromPointer($ret, retain: true, release: true); + } + + /// loadResourceDataNotifyingClient:usingCache: + @Deprecated('Use NSURLConnection instead') + void loadResourceDataNotifyingClient( + objc.ObjCObject client, { + required bool usingCache, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = client.ref; + objc.checkOsVersionInternal( + 'NSURL.loadResourceDataNotifyingClient:usingCache:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_6p7ndb( + _$$ref.pointer, + _sel_loadResourceDataNotifyingClient_usingCache_, + _$$ref$1.pointer, + usingCache, + ); + } + + /// propertyForKey: + @Deprecated('Use NSURLConnection instead') + objc.ObjCObject? propertyForKey(objc.NSString propertyKey) { + final _$$ref = object$.ref; + final _$$ref$1 = propertyKey.ref; + objc.checkOsVersionInternal( + 'NSURL.propertyForKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_propertyForKey_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } + + /// resourceDataUsingCache: + @Deprecated('Use NSURLConnection instead') + objc.NSData? resourceDataUsingCache(bool shouldUseCache) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.resourceDataUsingCache:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1t6aok9( + _$$ref.pointer, + _sel_resourceDataUsingCache_, + shouldUseCache, + ); + return $ret.address == 0 + ? null + : objc.NSData.fromPointer($ret, retain: true, release: true); + } + + /// setProperty:forKey: + @Deprecated('Use NSURLConnection instead') + bool setProperty(objc.ObjCObject property, {required objc.NSString forKey}) { + final _$$ref = object$.ref; + final _$$ref$1 = property.ref; + final _$$ref$2 = forKey.ref; + objc.checkOsVersionInternal( + 'NSURL.setProperty:forKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_1lsax7n( + _$$ref.pointer, + _sel_setProperty_forKey_, + _$$ref$1.pointer, + _$$ref$2.pointer, + ); + } + + /// setResourceData: + @Deprecated('Use NSURLConnection instead') + bool setResourceData(objc.NSData data) { + final _$$ref = object$.ref; + final _$$ref$1 = data.ref; + objc.checkOsVersionInternal( + 'NSURL.setResourceData:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_setResourceData_, + _$$ref$1.pointer, + ); + } +} + +/// NSURLPathUtilities +extension NSURLPathUtilities on objc.NSURL { + /// URLByAppendingPathComponent: + objc.NSURL? URLByAppendingPathComponent(objc.NSString pathComponent) { + final _$$ref = object$.ref; + final _$$ref$1 = pathComponent.ref; + objc.checkOsVersionInternal( + 'NSURL.URLByAppendingPathComponent:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_URLByAppendingPathComponent_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSURL.fromPointer($ret, retain: true, release: true); + } + + /// URLByAppendingPathComponent:isDirectory: + objc.NSURL? URLByAppendingPathComponent$1( + objc.NSString pathComponent, { + required bool isDirectory, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = pathComponent.ref; + objc.checkOsVersionInternal( + 'NSURL.URLByAppendingPathComponent:isDirectory:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + final $ret = _objc_msgSend_17amj0z( + _$$ref.pointer, + _sel_URLByAppendingPathComponent_isDirectory_, + _$$ref$1.pointer, + isDirectory, + ); + return $ret.address == 0 + ? null + : objc.NSURL.fromPointer($ret, retain: true, release: true); + } + + /// URLByAppendingPathExtension: + objc.NSURL? URLByAppendingPathExtension(objc.NSString pathExtension) { + final _$$ref = object$.ref; + final _$$ref$1 = pathExtension.ref; + objc.checkOsVersionInternal( + 'NSURL.URLByAppendingPathExtension:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_URLByAppendingPathExtension_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSURL.fromPointer($ret, retain: true, release: true); + } + + /// URLByDeletingLastPathComponent + objc.NSURL? get URLByDeletingLastPathComponent { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.URLByDeletingLastPathComponent', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_URLByDeletingLastPathComponent, + ); + return $ret.address == 0 + ? null + : objc.NSURL.fromPointer($ret, retain: true, release: true); + } + + /// URLByDeletingPathExtension + objc.NSURL? get URLByDeletingPathExtension { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.URLByDeletingPathExtension', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_URLByDeletingPathExtension, + ); + return $ret.address == 0 + ? null + : objc.NSURL.fromPointer($ret, retain: true, release: true); + } + + /// URLByResolvingSymlinksInPath + objc.NSURL? get URLByResolvingSymlinksInPath { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.URLByResolvingSymlinksInPath', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_URLByResolvingSymlinksInPath, + ); + return $ret.address == 0 + ? null + : objc.NSURL.fromPointer($ret, retain: true, release: true); + } + + /// URLByStandardizingPath + objc.NSURL? get URLByStandardizingPath { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.URLByStandardizingPath', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_URLByStandardizingPath, + ); + return $ret.address == 0 + ? null + : objc.NSURL.fromPointer($ret, retain: true, release: true); + } + + /// checkResourceIsReachableAndReturnError: + bool checkResourceIsReachableAndReturnError() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.checkResourceIsReachableAndReturnError:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1dom33q( + _$$ref.pointer, + _sel_checkResourceIsReachableAndReturnError_, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret; + } finally { + pkg_ffi.calloc.free($err); + } + } + + /// lastPathComponent + objc.NSString? get lastPathComponent { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.lastPathComponent', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_lastPathComponent); + return $ret.address == 0 + ? null + : objc.NSString.fromPointer($ret, retain: true, release: true); + } + + /// pathComponents + objc.NSArray? get pathComponents { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.pathComponents', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_pathComponents); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// pathExtension + objc.NSString? get pathExtension { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.pathExtension', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_pathExtension); + return $ret.address == 0 + ? null + : objc.NSString.fromPointer($ret, retain: true, release: true); + } + + /// fileURLWithPathComponents: + static objc.NSURL? fileURLWithPathComponents(objc.NSArray components) { + final _$$ref = components.ref; + objc.checkOsVersionInternal( + 'NSURL.fileURLWithPathComponents:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _class_NSURL, + _sel_fileURLWithPathComponents_, + _$$ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSURL.fromPointer($ret, retain: true, release: true); + } +} + /// StaticAndInstanceMethodsWithSameNameCategory extension StaticAndInstanceMethodsWithSameNameCategory on Thing { /// sameNameMethod @@ -415,6 +838,14 @@ final _class_NSString = objc.getClass( _class_NSString_raw, ).cast(), ); +@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSURL') +external ffi.Pointer _class_NSURL_raw; +final _class_NSURL = objc.getClass( + "NSURL", + () => ffi.Native.addressOf>( + _class_NSURL_raw, + ).cast(), +); @ffi.Native>(symbol: 'OBJC_CLASS_\$_Thing') external ffi.Pointer _class_Thing_raw; final _class_Thing = objc.getClass( @@ -438,6 +869,25 @@ final _objc_msgSend_151sglz = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_17amj0z = 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, + ) + >(); final _objc_msgSend_19nvye5 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -472,6 +922,23 @@ final _objc_msgSend_1cwp428 = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_1dom33q = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ) + > + >() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ) + >(); final _objc_msgSend_1gcq84o = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -487,6 +954,65 @@ final _objc_msgSend_1gcq84o = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_1j9bhml = 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>, + ) + >(); +final _objc_msgSend_1lhpu4m = 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_1lsax7n = 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_1q0lyci = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -523,28 +1049,48 @@ final _objc_msgSend_1sotr3r = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_91o635 = objc.msgSendPointer +final _objc_msgSend_1t6aok9 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.Bool, ) > >() .asFunction< - bool Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + bool, ) >(); -final _objc_msgSend_e3qsqz = objc.msgSendPointer +final _objc_msgSend_6p7ndb = 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, + ) + >(); +final _objc_msgSend_91o635 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, ) > >() @@ -552,16 +1098,31 @@ final _objc_msgSend_e3qsqz = objc.msgSendPointer bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, ) >(); -@ffi.Native Function()>( - symbol: '_l3cf7j_CatTestProtocol', -) -external ffi.Pointer _protocol_CatTestProtocol_raw(); -final _protocol_CatTestProtocol = objc.getProtocol( - "CatTestProtocol", - _protocol_CatTestProtocol_raw, +late final _sel_URLByAppendingPathComponent_ = objc.registerName( + "URLByAppendingPathComponent:", +); +late final _sel_URLByAppendingPathComponent_isDirectory_ = objc.registerName( + "URLByAppendingPathComponent:isDirectory:", +); +late final _sel_URLByAppendingPathExtension_ = objc.registerName( + "URLByAppendingPathExtension:", +); +late final _sel_URLByDeletingLastPathComponent = objc.registerName( + "URLByDeletingLastPathComponent", +); +late final _sel_URLByDeletingPathExtension = objc.registerName( + "URLByDeletingPathExtension", +); +late final _sel_URLByResolvingSymlinksInPath = objc.registerName( + "URLByResolvingSymlinksInPath", +); +late final _sel_URLByStandardizingPath = objc.registerName( + "URLByStandardizingPath", +); +late final _sel_URLHandleUsingCache_ = objc.registerName( + "URLHandleUsingCache:", ); late final _sel_add_Y_ = objc.registerName("add:Y:"); late final _sel_alloc = objc.registerName("alloc"); @@ -572,17 +1133,44 @@ late final _sel_anonymousCategoryMethod = objc.registerName( late final _sel_anonymousCategoryStaticMethod = objc.registerName( "anonymousCategoryStaticMethod", ); -late final _sel_conformsToProtocol_ = objc.registerName("conformsToProtocol:"); +late final _sel_checkPromisedItemIsReachableAndReturnError_ = objc.registerName( + "checkPromisedItemIsReachableAndReturnError:", +); +late final _sel_checkResourceIsReachableAndReturnError_ = objc.registerName( + "checkResourceIsReachableAndReturnError:", +); +late final _sel_extensionMethod = objc.registerName("extensionMethod"); +late final _sel_fileURLWithPathComponents_ = objc.registerName( + "fileURLWithPathComponents:", +); +late final _sel_getPromisedItemResourceValue_forKey_error_ = objc.registerName( + "getPromisedItemResourceValue:forKey:error:", +); late final _sel_init = objc.registerName("init"); late final _sel_initWithCoder_ = objc.registerName("initWithCoder:"); late final _sel_instancetypeMethod = objc.registerName("instancetypeMethod"); late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); +late final _sel_lastPathComponent = objc.registerName("lastPathComponent"); +late final _sel_loadResourceDataNotifyingClient_usingCache_ = objc.registerName( + "loadResourceDataNotifyingClient:usingCache:", +); late final _sel_method = objc.registerName("method"); late final _sel_mul_Y_ = objc.registerName("mul:Y:"); late final _sel_new = objc.registerName("new"); late final _sel_nsStringExtension = objc.registerName("nsStringExtension"); +late final _sel_pathComponents = objc.registerName("pathComponents"); +late final _sel_pathExtension = objc.registerName("pathExtension"); +late final _sel_promisedItemResourceValuesForKeys_error_ = objc.registerName( + "promisedItemResourceValuesForKeys:error:", +); +late final _sel_propertyForKey_ = objc.registerName("propertyForKey:"); late final _sel_protoMethod = objc.registerName("protoMethod"); +late final _sel_resourceDataUsingCache_ = objc.registerName( + "resourceDataUsingCache:", +); late final _sel_sameNameMethod = objc.registerName("sameNameMethod"); +late final _sel_setProperty_forKey_ = objc.registerName("setProperty:forKey:"); +late final _sel_setResourceData_ = objc.registerName("setResourceData:"); late final _sel_someProperty = objc.registerName("someProperty"); late final _sel_staticMethod = objc.registerName("staticMethod"); late final _sel_staticProtoMethod = objc.registerName("staticProtoMethod"); diff --git a/pkgs/ffigen/test/native_objc_test/deprecated_test.dart b/pkgs/ffigen/test/native_objc_test/deprecated_test.dart index e6732a68f4..76bd83ea06 100644 --- a/pkgs/ffigen/test/native_objc_test/deprecated_test.dart +++ b/pkgs/ffigen/test/native_objc_test/deprecated_test.dart @@ -45,7 +45,6 @@ String bindingsForVersion({Versions? iosVers, Versions? macosVers}) { ], ), objectiveC: ObjectiveC( - categories: const Categories(includeTransitive: false), externalVersions: ExternalVersions(ios: iosVers, macos: macosVers), ), visitors: [ diff --git a/pkgs/ffigen/test/native_objc_test/ns_range_test.dart b/pkgs/ffigen/test/native_objc_test/ns_range_test.dart index 6db7b5b2af..6f9fb958d6 100644 --- a/pkgs/ffigen/test/native_objc_test/ns_range_test.dart +++ b/pkgs/ffigen/test/native_objc_test/ns_range_test.dart @@ -46,12 +46,10 @@ void main() { ), ], ), - objectiveC: ObjectiveC( - interfaces: Interfaces( - include: (decl) => - {'SFTranscriptionSegment'}.contains(decl.originalName), - ), - ), + objectiveC: const ObjectiveC(), + visitors: const [ + IncludeSetVisitor(objcInterfaces: {'SFTranscriptionSegment'}), + ], ).generate(logger: createTestLogger()); final file = path.join( packagePathForTests, diff --git a/pkgs/ffigen/test/native_objc_test/property_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/property_test_bindings.dart index f29ead197f..92b3a3caf3 100644 --- a/pkgs/ffigen/test/native_objc_test/property_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/property_test_bindings.dart @@ -252,16 +252,6 @@ final _class_PropertyInterface = objc.getClass( _class_PropertyInterface_raw, ).cast(), ); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_UndefinedTemplate', -) -external ffi.Pointer _class_UndefinedTemplate_raw; -final _class_UndefinedTemplate = objc.getClass( - "UndefinedTemplate", - () => ffi.Native.addressOf>( - _class_UndefinedTemplate_raw, - ).cast(), -); final _objc_msgSend_151sglz = objc.msgSendPointer .cast< ffi.NativeFunction< diff --git a/pkgs/ffigen/test/native_objc_test/protocol_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/protocol_test_bindings.dart index a90685fdc4..36425ee0ed 100644 --- a/pkgs/ffigen/test/native_objc_test/protocol_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/protocol_test_bindings.dart @@ -3290,14 +3290,6 @@ final _protocol_EmptyProtocol = objc.getProtocol( "EmptyProtocol", _protocol_EmptyProtocol_raw, ); -@ffi.Native Function()>( - symbol: '_13hhotk_FilteredProtocol', -) -external ffi.Pointer _protocol_FilteredProtocol_raw(); -final _protocol_FilteredProtocol = objc.getProtocol( - "FilteredProtocol", - _protocol_FilteredProtocol_raw, -); @ffi.Native Function()>( symbol: '_13hhotk_MyProtocol', ) @@ -3314,14 +3306,6 @@ final _protocol_SecondaryProtocol = objc.getProtocol( "SecondaryProtocol", _protocol_SecondaryProtocol_raw, ); -@ffi.Native Function()>( - symbol: '_13hhotk_SuperProtocol', -) -external ffi.Pointer _protocol_SuperProtocol_raw(); -final _protocol_SuperProtocol = objc.getProtocol( - "SuperProtocol", - _protocol_SuperProtocol_raw, -); @ffi.Native Function()>( symbol: '_13hhotk_UnusedProtocol', ) diff --git a/pkgs/ffigen/test/native_objc_test/sdk_variable_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/sdk_variable_test_bindings.dart index 2fe7ca4cef..45141a6e73 100644 --- a/pkgs/ffigen/test/native_objc_test/sdk_variable_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/sdk_variable_test_bindings.dart @@ -2,173 +2,11 @@ // // Generated by `package:ffigen`. // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package -@ffi.DefaultAsset('package:ffigen/objc_test') -library; - import 'dart:ffi' as ffi; import 'package:objective_c/objective_c.dart' as objc; import 'package:ffi/ffi.dart' as pkg_ffi; const _$objcVersionCheck = objc.ObjCVersionCheck(9, 4); -@ffi.Native< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) ->(isLeaf: true) -external ffi.Pointer _1hhvgmr_wrapBlockingBlock_15kw6nv( - ffi.Pointer block, - ffi.Pointer listnerBlock, - ffi.Pointer context, -); - -@ffi.Native< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) ->(isLeaf: true) -external ffi.Pointer _1hhvgmr_wrapBlockingBlock_1pl9qdv( - ffi.Pointer block, - ffi.Pointer listnerBlock, - ffi.Pointer context, -); - -@ffi.Native< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) ->(isLeaf: true) -external ffi.Pointer _1hhvgmr_wrapBlockingBlock_4sp4xj( - ffi.Pointer block, - ffi.Pointer listnerBlock, - ffi.Pointer context, -); - -@ffi.Native< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) ->(isLeaf: true) -external ffi.Pointer _1hhvgmr_wrapBlockingBlock_d66md0( - ffi.Pointer block, - ffi.Pointer listnerBlock, - ffi.Pointer context, -); - -@ffi.Native< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) ->(isLeaf: true) -external ffi.Pointer _1hhvgmr_wrapBlockingBlock_pfv6jd( - ffi.Pointer block, - ffi.Pointer listnerBlock, - ffi.Pointer context, -); - -@ffi.Native< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) ->(isLeaf: true) -external ffi.Pointer _1hhvgmr_wrapBlockingBlock_r8gdi7( - ffi.Pointer block, - ffi.Pointer listnerBlock, - ffi.Pointer context, -); - -@ffi.Native< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) ->(isLeaf: true) -external ffi.Pointer _1hhvgmr_wrapBlockingBlock_t8l8el( - ffi.Pointer block, - ffi.Pointer listnerBlock, - ffi.Pointer context, -); - -@ffi.Native< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) ->(isLeaf: true) -external ffi.Pointer _1hhvgmr_wrapBlockingBlock_xtuoz7( - ffi.Pointer block, - ffi.Pointer listnerBlock, - ffi.Pointer context, -); - -@ffi.Native< - ffi.Pointer Function(ffi.Pointer) ->(isLeaf: true) -external ffi.Pointer _1hhvgmr_wrapListenerBlock_15kw6nv( - ffi.Pointer block, -); - -@ffi.Native< - ffi.Pointer Function(ffi.Pointer) ->(isLeaf: true) -external ffi.Pointer _1hhvgmr_wrapListenerBlock_1pl9qdv( - ffi.Pointer block, -); - -@ffi.Native< - ffi.Pointer Function(ffi.Pointer) ->(isLeaf: true) -external ffi.Pointer _1hhvgmr_wrapListenerBlock_4sp4xj( - ffi.Pointer block, -); - -@ffi.Native< - ffi.Pointer Function(ffi.Pointer) ->(isLeaf: true) -external ffi.Pointer _1hhvgmr_wrapListenerBlock_d66md0( - ffi.Pointer block, -); - -@ffi.Native< - ffi.Pointer Function(ffi.Pointer) ->(isLeaf: true) -external ffi.Pointer _1hhvgmr_wrapListenerBlock_pfv6jd( - ffi.Pointer block, -); - -@ffi.Native< - ffi.Pointer Function(ffi.Pointer) ->(isLeaf: true) -external ffi.Pointer _1hhvgmr_wrapListenerBlock_r8gdi7( - ffi.Pointer block, -); - -@ffi.Native< - ffi.Pointer Function(ffi.Pointer) ->(isLeaf: true) -external ffi.Pointer _1hhvgmr_wrapListenerBlock_t8l8el( - ffi.Pointer block, -); - -@ffi.Native< - ffi.Pointer Function(ffi.Pointer) ->(isLeaf: true) -external ffi.Pointer _1hhvgmr_wrapListenerBlock_xtuoz7( - ffi.Pointer block, -); /// WARNING: NSAccessibility is a stub. To generate bindings for this class, include /// NSAccessibility in your config's objc-protocols list. @@ -204,115 +42,6 @@ extension type NSAccessibilityElement._(objc.ObjCProtocol object$) }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); } -enum NSAccessibilityOrientation { - NSAccessibilityOrientationUnknown(0), - NSAccessibilityOrientationVertical(1), - NSAccessibilityOrientationHorizontal(2); - - final int value; - const NSAccessibilityOrientation(this.value); - - static NSAccessibilityOrientation fromValue(int value) => switch (value) { - 0 => NSAccessibilityOrientationUnknown, - 1 => NSAccessibilityOrientationVertical, - 2 => NSAccessibilityOrientationHorizontal, - _ => throw ArgumentError( - 'Unknown value for NSAccessibilityOrientation: $value', - ), - }; -} - -enum NSAccessibilityRulerMarkerType { - NSAccessibilityRulerMarkerTypeUnknown(0), - NSAccessibilityRulerMarkerTypeTabStopLeft(1), - NSAccessibilityRulerMarkerTypeTabStopRight(2), - NSAccessibilityRulerMarkerTypeTabStopCenter(3), - NSAccessibilityRulerMarkerTypeTabStopDecimal(4), - NSAccessibilityRulerMarkerTypeIndentHead(5), - NSAccessibilityRulerMarkerTypeIndentTail(6), - NSAccessibilityRulerMarkerTypeIndentFirstLine(7); - - final int value; - const NSAccessibilityRulerMarkerType(this.value); - - static NSAccessibilityRulerMarkerType fromValue(int value) => switch (value) { - 0 => NSAccessibilityRulerMarkerTypeUnknown, - 1 => NSAccessibilityRulerMarkerTypeTabStopLeft, - 2 => NSAccessibilityRulerMarkerTypeTabStopRight, - 3 => NSAccessibilityRulerMarkerTypeTabStopCenter, - 4 => NSAccessibilityRulerMarkerTypeTabStopDecimal, - 5 => NSAccessibilityRulerMarkerTypeIndentHead, - 6 => NSAccessibilityRulerMarkerTypeIndentTail, - 7 => NSAccessibilityRulerMarkerTypeIndentFirstLine, - _ => throw ArgumentError( - 'Unknown value for NSAccessibilityRulerMarkerType: $value', - ), - }; -} - -enum NSAccessibilitySortDirection { - NSAccessibilitySortDirectionUnknown(0), - NSAccessibilitySortDirectionAscending(1), - NSAccessibilitySortDirectionDescending(2); - - final int value; - const NSAccessibilitySortDirection(this.value); - - static NSAccessibilitySortDirection fromValue(int value) => switch (value) { - 0 => NSAccessibilitySortDirectionUnknown, - 1 => NSAccessibilitySortDirectionAscending, - 2 => NSAccessibilitySortDirectionDescending, - _ => throw ArgumentError( - 'Unknown value for NSAccessibilitySortDirection: $value', - ), - }; -} - -enum NSAccessibilityUnits { - NSAccessibilityUnitsUnknown(0), - NSAccessibilityUnitsInches(1), - NSAccessibilityUnitsCentimeters(2), - NSAccessibilityUnitsPoints(3), - NSAccessibilityUnitsPicas(4); - - final int value; - const NSAccessibilityUnits(this.value); - - static NSAccessibilityUnits fromValue(int value) => switch (value) { - 0 => NSAccessibilityUnitsUnknown, - 1 => NSAccessibilityUnitsInches, - 2 => NSAccessibilityUnitsCentimeters, - 3 => NSAccessibilityUnitsPoints, - 4 => NSAccessibilityUnitsPicas, - _ => throw ArgumentError('Unknown value for NSAccessibilityUnits: $value'), - }; -} - -sealed class NSAlignmentOptions { - static const NSAlignMinXInward = 1; - static const NSAlignMinYInward = 2; - static const NSAlignMaxXInward = 4; - static const NSAlignMaxYInward = 8; - static const NSAlignWidthInward = 16; - static const NSAlignHeightInward = 32; - static const NSAlignMinXOutward = 256; - static const NSAlignMinYOutward = 512; - static const NSAlignMaxXOutward = 1024; - static const NSAlignMaxYOutward = 2048; - static const NSAlignWidthOutward = 4096; - static const NSAlignHeightOutward = 8192; - static const NSAlignMinXNearest = 65536; - static const NSAlignMinYNearest = 131072; - static const NSAlignMaxXNearest = 262144; - static const NSAlignMaxYNearest = 524288; - static const NSAlignWidthNearest = 1048576; - static const NSAlignHeightNearest = 2097152; - static const NSAlignRectFlipped = -9223372036854775808; - static const NSAlignAllEdgesInward = 15; - static const NSAlignAllEdgesOutward = 3840; - static const NSAlignAllEdgesNearest = 983040; -} - /// WARNING: NSAnimatablePropertyContainer is a stub. To generate bindings for this class, include /// NSAnimatablePropertyContainer in your config's objc-protocols list. /// @@ -347,49 +76,6 @@ extension type NSAppearanceCustomization._(objc.ObjCProtocol object$) }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); } -sealed class NSApplicationPresentationOptions { - static const NSApplicationPresentationDefault = 0; - static const NSApplicationPresentationAutoHideDock = 1; - static const NSApplicationPresentationHideDock = 2; - static const NSApplicationPresentationAutoHideMenuBar = 4; - static const NSApplicationPresentationHideMenuBar = 8; - static const NSApplicationPresentationDisableAppleMenu = 16; - static const NSApplicationPresentationDisableProcessSwitching = 32; - static const NSApplicationPresentationDisableForceQuit = 64; - static const NSApplicationPresentationDisableSessionTermination = 128; - static const NSApplicationPresentationDisableHideApplication = 256; - static const NSApplicationPresentationDisableMenuBarTransparency = 512; - static const NSApplicationPresentationFullScreen = 1024; - static const NSApplicationPresentationAutoHideToolbar = 2048; - static const NSApplicationPresentationDisableCursorLocationAssistance = 4096; -} - -sealed class NSAutoresizingMaskOptions { - static const NSViewNotSizable = 0; - static const NSViewMinXMargin = 1; - static const NSViewWidthSizable = 2; - static const NSViewMaxXMargin = 4; - static const NSViewMinYMargin = 8; - static const NSViewHeightSizable = 16; - static const NSViewMaxYMargin = 32; -} - -enum NSBackingStoreType { - NSBackingStoreRetained(0), - NSBackingStoreNonretained(1), - NSBackingStoreBuffered(2); - - final int value; - const NSBackingStoreType(this.value); - - static NSBackingStoreType fromValue(int value) => switch (value) { - 0 => NSBackingStoreRetained, - 1 => NSBackingStoreNonretained, - 2 => NSBackingStoreBuffered, - _ => throw ArgumentError('Unknown value for NSBackingStoreType: $value'), - }; -} - /// NSButtonCell /// /// NSButtonCell @@ -470,18 +156,6 @@ enum NSColorPanelMode { }; } -sealed class NSColorPanelOptions { - static const NSColorPanelGrayModeMask = 1; - static const NSColorPanelRGBModeMask = 2; - static const NSColorPanelCMYKModeMask = 4; - static const NSColorPanelHSBModeMask = 8; - static const NSColorPanelCustomPaletteModeMask = 16; - static const NSColorPanelColorListModeMask = 32; - static const NSColorPanelWheelModeMask = 64; - static const NSColorPanelCrayonModeMask = 128; - static const NSColorPanelAllModesMask = 65535; -} - /// NSColorPicker extension type NSColorPicker._(objc.ObjCObject object$) implements objc.ObjCObject, objc.NSObject, NSColorPickingDefault { @@ -730,304 +404,6 @@ extension type NSColorPickingDefault._(objc.ObjCProtocol object$) }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); } -enum NSDisplayGamut { - NSDisplayGamutSRGB(1), - NSDisplayGamutP3(2); - - final int value; - const NSDisplayGamut(this.value); - - static NSDisplayGamut fromValue(int value) => switch (value) { - 1 => NSDisplayGamutSRGB, - 2 => NSDisplayGamutP3, - _ => throw ArgumentError('Unknown value for NSDisplayGamut: $value'), - }; -} - -sealed class NSDragOperation { - static const NSDragOperationNone = 0; - static const NSDragOperationCopy = 1; - static const NSDragOperationLink = 2; - static const NSDragOperationGeneric = 4; - static const NSDragOperationPrivate = 8; - static const NSDragOperationMove = 16; - static const NSDragOperationDelete = 32; - static const NSDragOperationEvery = -1; - static const NSDragOperationAll_Obsolete = 15; - static const NSDragOperationAll = 15; -} - -enum NSDraggingContext { - NSDraggingContextOutsideApplication(0), - NSDraggingContextWithinApplication(1); - - final int value; - const NSDraggingContext(this.value); - - static NSDraggingContext fromValue(int value) => switch (value) { - 0 => NSDraggingContextOutsideApplication, - 1 => NSDraggingContextWithinApplication, - _ => throw ArgumentError('Unknown value for NSDraggingContext: $value'), - }; -} - -enum NSDraggingFormation { - NSDraggingFormationDefault(0), - NSDraggingFormationNone(1), - NSDraggingFormationPile(2), - NSDraggingFormationList(3), - NSDraggingFormationStack(4); - - final int value; - const NSDraggingFormation(this.value); - - static NSDraggingFormation fromValue(int value) => switch (value) { - 0 => NSDraggingFormationDefault, - 1 => NSDraggingFormationNone, - 2 => NSDraggingFormationPile, - 3 => NSDraggingFormationList, - 4 => NSDraggingFormationStack, - _ => throw ArgumentError('Unknown value for NSDraggingFormation: $value'), - }; -} - -sealed class NSDraggingItemEnumerationOptions { - static const NSDraggingItemEnumerationConcurrent = 1; - static const NSDraggingItemEnumerationClearNonenumeratedImages = 65536; -} - -sealed class NSEventButtonMask { - static const NSEventButtonMaskPenTip = 1; - static const NSEventButtonMaskPenLowerSide = 2; - static const NSEventButtonMaskPenUpperSide = 4; -} - -enum NSEventGestureAxis { - NSEventGestureAxisNone(0), - NSEventGestureAxisHorizontal(1), - NSEventGestureAxisVertical(2); - - final int value; - const NSEventGestureAxis(this.value); - - static NSEventGestureAxis fromValue(int value) => switch (value) { - 0 => NSEventGestureAxisNone, - 1 => NSEventGestureAxisHorizontal, - 2 => NSEventGestureAxisVertical, - _ => throw ArgumentError('Unknown value for NSEventGestureAxis: $value'), - }; -} - -sealed class NSEventMask { - static const NSEventMaskLeftMouseDown = 2; - static const NSEventMaskLeftMouseUp = 4; - static const NSEventMaskRightMouseDown = 8; - static const NSEventMaskRightMouseUp = 16; - static const NSEventMaskMouseMoved = 32; - static const NSEventMaskLeftMouseDragged = 64; - static const NSEventMaskRightMouseDragged = 128; - static const NSEventMaskMouseEntered = 256; - static const NSEventMaskMouseExited = 512; - static const NSEventMaskKeyDown = 1024; - static const NSEventMaskKeyUp = 2048; - static const NSEventMaskFlagsChanged = 4096; - static const NSEventMaskAppKitDefined = 8192; - static const NSEventMaskSystemDefined = 16384; - static const NSEventMaskApplicationDefined = 32768; - static const NSEventMaskPeriodic = 65536; - static const NSEventMaskCursorUpdate = 131072; - static const NSEventMaskScrollWheel = 4194304; - static const NSEventMaskTabletPoint = 8388608; - static const NSEventMaskTabletProximity = 16777216; - static const NSEventMaskOtherMouseDown = 33554432; - static const NSEventMaskOtherMouseUp = 67108864; - static const NSEventMaskOtherMouseDragged = 134217728; - static const NSEventMaskGesture = 536870912; - static const NSEventMaskMagnify = 1073741824; - static const NSEventMaskSwipe = 2147483648; - static const NSEventMaskRotate = 262144; - static const NSEventMaskBeginGesture = 524288; - static const NSEventMaskEndGesture = 1048576; - static const NSEventMaskSmartMagnify = 4294967296; - static const NSEventMaskPressure = 17179869184; - static const NSEventMaskDirectTouch = 137438953472; - static const NSEventMaskChangeMode = 274877906944; - static const NSEventMaskMouseCancelled = 1099511627776; - static const NSEventMaskAny = -1; -} - -sealed class NSEventModifierFlags { - static const NSEventModifierFlagCapsLock = 65536; - static const NSEventModifierFlagShift = 131072; - static const NSEventModifierFlagControl = 262144; - static const NSEventModifierFlagOption = 524288; - static const NSEventModifierFlagCommand = 1048576; - static const NSEventModifierFlagNumericPad = 2097152; - static const NSEventModifierFlagHelp = 4194304; - static const NSEventModifierFlagFunction = 8388608; - static const NSEventModifierFlagDeviceIndependentFlagsMask = 4294901760; -} - -sealed class NSEventPhase { - static const NSEventPhaseNone = 0; - static const NSEventPhaseBegan = 1; - static const NSEventPhaseStationary = 2; - static const NSEventPhaseChanged = 4; - static const NSEventPhaseEnded = 8; - static const NSEventPhaseCancelled = 16; - static const NSEventPhaseMayBegin = 32; -} - -enum NSEventSubtype { - NSEventSubtypeWindowExposed(0), - NSEventSubtypeApplicationActivated(1), - NSEventSubtypeApplicationDeactivated(2), - NSEventSubtypeWindowMoved(4), - NSEventSubtypeScreenChanged(8), - NSEventSubtypeTouch(3); - - static const NSEventSubtypePowerOff = NSEventSubtypeApplicationActivated; - static const NSEventSubtypeMouseEvent = NSEventSubtypeWindowExposed; - static const NSEventSubtypeTabletPoint = NSEventSubtypeApplicationActivated; - static const NSEventSubtypeTabletProximity = - NSEventSubtypeApplicationDeactivated; - - final int value; - const NSEventSubtype(this.value); - - static NSEventSubtype fromValue(int value) => switch (value) { - 0 => NSEventSubtypeWindowExposed, - 1 => NSEventSubtypeApplicationActivated, - 2 => NSEventSubtypeApplicationDeactivated, - 4 => NSEventSubtypeWindowMoved, - 8 => NSEventSubtypeScreenChanged, - 3 => NSEventSubtypeTouch, - _ => throw ArgumentError('Unknown value for NSEventSubtype: $value'), - }; - - @override - String toString() { - if (this == NSEventSubtypeWindowExposed) - return "NSEventSubtype.NSEventSubtypeWindowExposed, NSEventSubtype.NSEventSubtypeMouseEvent"; - if (this == NSEventSubtypeApplicationActivated) - return "NSEventSubtype.NSEventSubtypeApplicationActivated, NSEventSubtype.NSEventSubtypePowerOff, NSEventSubtype.NSEventSubtypeTabletPoint"; - if (this == NSEventSubtypeApplicationDeactivated) - return "NSEventSubtype.NSEventSubtypeApplicationDeactivated, NSEventSubtype.NSEventSubtypeTabletProximity"; - return super.toString(); - } -} - -sealed class NSEventSwipeTrackingOptions { - static const NSEventSwipeTrackingLockDirection = 1; - static const NSEventSwipeTrackingClampGestureAmount = 2; -} - -enum NSEventType { - NSEventTypeLeftMouseDown(1), - NSEventTypeLeftMouseUp(2), - NSEventTypeRightMouseDown(3), - NSEventTypeRightMouseUp(4), - NSEventTypeMouseMoved(5), - NSEventTypeLeftMouseDragged(6), - NSEventTypeRightMouseDragged(7), - NSEventTypeMouseEntered(8), - NSEventTypeMouseExited(9), - NSEventTypeKeyDown(10), - NSEventTypeKeyUp(11), - NSEventTypeFlagsChanged(12), - NSEventTypeAppKitDefined(13), - NSEventTypeSystemDefined(14), - NSEventTypeApplicationDefined(15), - NSEventTypePeriodic(16), - NSEventTypeCursorUpdate(17), - NSEventTypeScrollWheel(22), - NSEventTypeTabletPoint(23), - NSEventTypeTabletProximity(24), - NSEventTypeOtherMouseDown(25), - NSEventTypeOtherMouseUp(26), - NSEventTypeOtherMouseDragged(27), - NSEventTypeGesture(29), - NSEventTypeMagnify(30), - NSEventTypeSwipe(31), - NSEventTypeRotate(18), - NSEventTypeBeginGesture(19), - NSEventTypeEndGesture(20), - NSEventTypeSmartMagnify(32), - NSEventTypeQuickLook(33), - NSEventTypePressure(34), - NSEventTypeDirectTouch(37), - NSEventTypeChangeMode(38), - NSEventTypeMouseCancelled(40); - - final int value; - const NSEventType(this.value); - - static NSEventType fromValue(int value) => switch (value) { - 1 => NSEventTypeLeftMouseDown, - 2 => NSEventTypeLeftMouseUp, - 3 => NSEventTypeRightMouseDown, - 4 => NSEventTypeRightMouseUp, - 5 => NSEventTypeMouseMoved, - 6 => NSEventTypeLeftMouseDragged, - 7 => NSEventTypeRightMouseDragged, - 8 => NSEventTypeMouseEntered, - 9 => NSEventTypeMouseExited, - 10 => NSEventTypeKeyDown, - 11 => NSEventTypeKeyUp, - 12 => NSEventTypeFlagsChanged, - 13 => NSEventTypeAppKitDefined, - 14 => NSEventTypeSystemDefined, - 15 => NSEventTypeApplicationDefined, - 16 => NSEventTypePeriodic, - 17 => NSEventTypeCursorUpdate, - 22 => NSEventTypeScrollWheel, - 23 => NSEventTypeTabletPoint, - 24 => NSEventTypeTabletProximity, - 25 => NSEventTypeOtherMouseDown, - 26 => NSEventTypeOtherMouseUp, - 27 => NSEventTypeOtherMouseDragged, - 29 => NSEventTypeGesture, - 30 => NSEventTypeMagnify, - 31 => NSEventTypeSwipe, - 18 => NSEventTypeRotate, - 19 => NSEventTypeBeginGesture, - 20 => NSEventTypeEndGesture, - 32 => NSEventTypeSmartMagnify, - 33 => NSEventTypeQuickLook, - 34 => NSEventTypePressure, - 37 => NSEventTypeDirectTouch, - 38 => NSEventTypeChangeMode, - 40 => NSEventTypeMouseCancelled, - _ => throw ArgumentError('Unknown value for NSEventType: $value'), - }; -} - -sealed class NSFileWrapperReadingOptions { - static const NSFileWrapperReadingImmediate = 1; - static const NSFileWrapperReadingWithoutMapping = 2; -} - -sealed class NSFileWrapperWritingOptions { - static const NSFileWrapperWritingAtomic = 1; - static const NSFileWrapperWritingWithNameUpdating = 2; -} - -enum NSFocusRingType { - NSFocusRingTypeDefault(0), - NSFocusRingTypeNone(1), - NSFocusRingTypeExterior(2); - - final int value; - const NSFocusRingType(this.value); - - static NSFocusRingType fromValue(int value) => switch (value) { - 0 => NSFocusRingTypeDefault, - 1 => NSFocusRingTypeNone, - 2 => NSFocusRingTypeExterior, - _ => throw ArgumentError('Unknown value for NSFocusRingType: $value'), - }; -} - /// NSImage /// /// NSImage @@ -1060,47 +436,6 @@ extension type NSMenuItemValidation._(objc.ObjCProtocol object$) }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); } -enum NSMenuPresentationStyle { - NSMenuPresentationStyleRegular(0), - NSMenuPresentationStylePalette(1); - - final int value; - const NSMenuPresentationStyle(this.value); - - static NSMenuPresentationStyle fromValue(int value) => switch (value) { - 0 => NSMenuPresentationStyleRegular, - 1 => NSMenuPresentationStylePalette, - _ => throw ArgumentError( - 'Unknown value for NSMenuPresentationStyle: $value', - ), - }; -} - -sealed class NSMenuProperties { - static const NSMenuPropertyItemTitle = 1; - static const NSMenuPropertyItemAttributedTitle = 2; - static const NSMenuPropertyItemKeyEquivalent = 4; - static const NSMenuPropertyItemImage = 8; - static const NSMenuPropertyItemEnabled = 16; - static const NSMenuPropertyItemAccessibilityDescription = 32; -} - -enum NSMenuSelectionMode { - NSMenuSelectionModeAutomatic(0), - NSMenuSelectionModeSelectOne(1), - NSMenuSelectionModeSelectAny(2); - - final int value; - const NSMenuSelectionMode(this.value); - - static NSMenuSelectionMode fromValue(int value) => switch (value) { - 0 => NSMenuSelectionModeAutomatic, - 1 => NSMenuSelectionModeSelectOne, - 2 => NSMenuSelectionModeSelectAny, - _ => throw ArgumentError('Unknown value for NSMenuSelectionMode: $value'), - }; -} - /// NSPanel /// /// NSPanel @@ -1121,108 +456,6 @@ extension type NSPanel._(objc.ObjCObject object$) } } -enum NSPasteboardAccessBehavior { - NSPasteboardAccessBehaviorDefault(0), - NSPasteboardAccessBehaviorAsk(1), - NSPasteboardAccessBehaviorAlwaysAllow(2), - NSPasteboardAccessBehaviorAlwaysDeny(3); - - final int value; - const NSPasteboardAccessBehavior(this.value); - - static NSPasteboardAccessBehavior fromValue(int value) => switch (value) { - 0 => NSPasteboardAccessBehaviorDefault, - 1 => NSPasteboardAccessBehaviorAsk, - 2 => NSPasteboardAccessBehaviorAlwaysAllow, - 3 => NSPasteboardAccessBehaviorAlwaysDeny, - _ => throw ArgumentError( - 'Unknown value for NSPasteboardAccessBehavior: $value', - ), - }; -} - -sealed class NSPasteboardContentsOptions { - static const NSPasteboardContentsCurrentHostOnly = 1; -} - -enum NSPointingDeviceType { - NSPointingDeviceTypeUnknown(0), - NSPointingDeviceTypePen(1), - NSPointingDeviceTypeCursor(2), - NSPointingDeviceTypeEraser(3); - - final int value; - const NSPointingDeviceType(this.value); - - static NSPointingDeviceType fromValue(int value) => switch (value) { - 0 => NSPointingDeviceTypeUnknown, - 1 => NSPointingDeviceTypePen, - 2 => NSPointingDeviceTypeCursor, - 3 => NSPointingDeviceTypeEraser, - _ => throw ArgumentError('Unknown value for NSPointingDeviceType: $value'), - }; -} - -enum NSPressureBehavior { - NSPressureBehaviorUnknown(-1), - NSPressureBehaviorPrimaryDefault(0), - NSPressureBehaviorPrimaryClick(1), - NSPressureBehaviorPrimaryGeneric(2), - NSPressureBehaviorPrimaryAccelerator(3), - NSPressureBehaviorPrimaryDeepClick(5), - NSPressureBehaviorPrimaryDeepDrag(6); - - final int value; - const NSPressureBehavior(this.value); - - static NSPressureBehavior fromValue(int value) => switch (value) { - -1 => NSPressureBehaviorUnknown, - 0 => NSPressureBehaviorPrimaryDefault, - 1 => NSPressureBehaviorPrimaryClick, - 2 => NSPressureBehaviorPrimaryGeneric, - 3 => NSPressureBehaviorPrimaryAccelerator, - 5 => NSPressureBehaviorPrimaryDeepClick, - 6 => NSPressureBehaviorPrimaryDeepDrag, - _ => throw ArgumentError('Unknown value for NSPressureBehavior: $value'), - }; -} - -enum NSRectEdge { - NSRectEdgeMinX(0), - NSRectEdgeMinY(1), - NSRectEdgeMaxX(2), - NSRectEdgeMaxY(3); - - static const NSMinXEdge = NSRectEdgeMinX; - static const NSMinYEdge = NSRectEdgeMinY; - static const NSMaxXEdge = NSRectEdgeMaxX; - static const NSMaxYEdge = NSRectEdgeMaxY; - - final int value; - const NSRectEdge(this.value); - - static NSRectEdge fromValue(int value) => switch (value) { - 0 => NSRectEdgeMinX, - 1 => NSRectEdgeMinY, - 2 => NSRectEdgeMaxX, - 3 => NSRectEdgeMaxY, - _ => throw ArgumentError('Unknown value for NSRectEdge: $value'), - }; - - @override - String toString() { - if (this == NSRectEdgeMinX) - return "NSRectEdge.NSRectEdgeMinX, NSRectEdge.NSMinXEdge"; - if (this == NSRectEdgeMinY) - return "NSRectEdge.NSRectEdgeMinY, NSRectEdge.NSMinYEdge"; - if (this == NSRectEdgeMaxX) - return "NSRectEdge.NSRectEdgeMaxX, NSRectEdge.NSMaxXEdge"; - if (this == NSRectEdgeMaxY) - return "NSRectEdge.NSRectEdgeMaxY, NSRectEdge.NSMaxYEdge"; - return super.toString(); - } -} - /// NSResponder /// /// NSResponder @@ -1243,60 +476,6 @@ extension type NSResponder._(objc.ObjCObject object$) } } -enum NSSelectionDirection { - NSDirectSelection(0), - NSSelectingNext(1), - NSSelectingPrevious(2); - - final int value; - const NSSelectionDirection(this.value); - - static NSSelectionDirection fromValue(int value) => switch (value) { - 0 => NSDirectSelection, - 1 => NSSelectingNext, - 2 => NSSelectingPrevious, - _ => throw ArgumentError('Unknown value for NSSelectionDirection: $value'), - }; -} - -enum NSSpringLoadingHighlight { - NSSpringLoadingHighlightNone(0), - NSSpringLoadingHighlightStandard(1), - NSSpringLoadingHighlightEmphasized(2); - - final int value; - const NSSpringLoadingHighlight(this.value); - - static NSSpringLoadingHighlight fromValue(int value) => switch (value) { - 0 => NSSpringLoadingHighlightNone, - 1 => NSSpringLoadingHighlightStandard, - 2 => NSSpringLoadingHighlightEmphasized, - _ => throw ArgumentError( - 'Unknown value for NSSpringLoadingHighlight: $value', - ), - }; -} - -enum NSTextAlignment { - NSTextAlignmentLeft(0), - NSTextAlignmentCenter(1), - NSTextAlignmentRight(2), - NSTextAlignmentJustified(3), - NSTextAlignmentNatural(4); - - final int value; - const NSTextAlignment(this.value); - - static NSTextAlignment fromValue(int value) => switch (value) { - 0 => NSTextAlignmentLeft, - 1 => NSTextAlignmentCenter, - 2 => NSTextAlignmentRight, - 3 => NSTextAlignmentJustified, - 4 => NSTextAlignmentNatural, - _ => throw ArgumentError('Unknown value for NSTextAlignment: $value'), - }; -} - /// NSTextList extension type NSTextList._(objc.ObjCObject object$) implements @@ -1530,55 +709,6 @@ sealed class NSTextListOptions { static const NSTextListPrependEnclosingMarker = 1; } -enum NSTitlebarSeparatorStyle { - NSTitlebarSeparatorStyleAutomatic(0), - NSTitlebarSeparatorStyleNone(1), - NSTitlebarSeparatorStyleLine(2), - NSTitlebarSeparatorStyleShadow(3); - - final int value; - const NSTitlebarSeparatorStyle(this.value); - - static NSTitlebarSeparatorStyle fromValue(int value) => switch (value) { - 0 => NSTitlebarSeparatorStyleAutomatic, - 1 => NSTitlebarSeparatorStyleNone, - 2 => NSTitlebarSeparatorStyleLine, - 3 => NSTitlebarSeparatorStyleShadow, - _ => throw ArgumentError( - 'Unknown value for NSTitlebarSeparatorStyle: $value', - ), - }; -} - -sealed class NSTouchPhase { - static const NSTouchPhaseBegan = 1; - static const NSTouchPhaseMoved = 2; - static const NSTouchPhaseStationary = 4; - static const NSTouchPhaseEnded = 8; - static const NSTouchPhaseCancelled = 16; - static const NSTouchPhaseTouching = 7; - static const NSTouchPhaseAny = -1; -} - -enum NSTouchType { - NSTouchTypeDirect(0), - NSTouchTypeIndirect(1); - - final int value; - const NSTouchType(this.value); - - static NSTouchType fromValue(int value) => switch (value) { - 0 => NSTouchTypeDirect, - 1 => NSTouchTypeIndirect, - _ => throw ArgumentError('Unknown value for NSTouchType: $value'), - }; -} - -sealed class NSTouchTypeMask { - static const NSTouchTypeMaskDirect = 1; - static const NSTouchTypeMaskIndirect = 2; -} - /// WARNING: NSUserInterfaceItemIdentification is a stub. To generate bindings for this class, include /// NSUserInterfaceItemIdentification in your config's objc-protocols list. /// @@ -1596,22 +726,6 @@ extension type NSUserInterfaceItemIdentification._(objc.ObjCProtocol object$) }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); } -enum NSUserInterfaceLayoutDirection { - NSUserInterfaceLayoutDirectionLeftToRight(0), - NSUserInterfaceLayoutDirectionRightToLeft(1); - - final int value; - const NSUserInterfaceLayoutDirection(this.value); - - static NSUserInterfaceLayoutDirection fromValue(int value) => switch (value) { - 0 => NSUserInterfaceLayoutDirectionLeftToRight, - 1 => NSUserInterfaceLayoutDirectionRightToLeft, - _ => throw ArgumentError( - 'Unknown value for NSUserInterfaceLayoutDirection: $value', - ), - }; -} - /// WARNING: NSUserInterfaceValidations is a stub. To generate bindings for this class, include /// NSUserInterfaceValidations in your config's objc-protocols list. /// @@ -1629,65 +743,6 @@ extension type NSUserInterfaceValidations._(objc.ObjCProtocol object$) }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); } -enum NSViewLayerContentsPlacement { - NSViewLayerContentsPlacementScaleAxesIndependently(0), - NSViewLayerContentsPlacementScaleProportionallyToFit(1), - NSViewLayerContentsPlacementScaleProportionallyToFill(2), - NSViewLayerContentsPlacementCenter(3), - NSViewLayerContentsPlacementTop(4), - NSViewLayerContentsPlacementTopRight(5), - NSViewLayerContentsPlacementRight(6), - NSViewLayerContentsPlacementBottomRight(7), - NSViewLayerContentsPlacementBottom(8), - NSViewLayerContentsPlacementBottomLeft(9), - NSViewLayerContentsPlacementLeft(10), - NSViewLayerContentsPlacementTopLeft(11); - - final int value; - const NSViewLayerContentsPlacement(this.value); - - static NSViewLayerContentsPlacement fromValue(int value) => switch (value) { - 0 => NSViewLayerContentsPlacementScaleAxesIndependently, - 1 => NSViewLayerContentsPlacementScaleProportionallyToFit, - 2 => NSViewLayerContentsPlacementScaleProportionallyToFill, - 3 => NSViewLayerContentsPlacementCenter, - 4 => NSViewLayerContentsPlacementTop, - 5 => NSViewLayerContentsPlacementTopRight, - 6 => NSViewLayerContentsPlacementRight, - 7 => NSViewLayerContentsPlacementBottomRight, - 8 => NSViewLayerContentsPlacementBottom, - 9 => NSViewLayerContentsPlacementBottomLeft, - 10 => NSViewLayerContentsPlacementLeft, - 11 => NSViewLayerContentsPlacementTopLeft, - _ => throw ArgumentError( - 'Unknown value for NSViewLayerContentsPlacement: $value', - ), - }; -} - -enum NSViewLayerContentsRedrawPolicy { - NSViewLayerContentsRedrawNever(0), - NSViewLayerContentsRedrawOnSetNeedsDisplay(1), - NSViewLayerContentsRedrawDuringViewResize(2), - NSViewLayerContentsRedrawBeforeViewResize(3), - NSViewLayerContentsRedrawCrossfade(4); - - final int value; - const NSViewLayerContentsRedrawPolicy(this.value); - - static NSViewLayerContentsRedrawPolicy fromValue(int value) => - switch (value) { - 0 => NSViewLayerContentsRedrawNever, - 1 => NSViewLayerContentsRedrawOnSetNeedsDisplay, - 2 => NSViewLayerContentsRedrawDuringViewResize, - 3 => NSViewLayerContentsRedrawBeforeViewResize, - 4 => NSViewLayerContentsRedrawCrossfade, - _ => throw ArgumentError( - 'Unknown value for NSViewLayerContentsRedrawPolicy: $value', - ), - }; -} - /// NSWindow /// /// NSWindow @@ -1717,272 +772,33 @@ extension type NSWindow._(objc.ObjCObject object$) } } -enum NSWindowAnimationBehavior { - NSWindowAnimationBehaviorDefault(0), - NSWindowAnimationBehaviorNone(2), - NSWindowAnimationBehaviorDocumentWindow(3), - NSWindowAnimationBehaviorUtilityWindow(4), - NSWindowAnimationBehaviorAlertPanel(5); +/// UIPickerView +extension type UIPickerView._(objc.ObjCObject object$) + implements objc.ObjCObject, objc.NSCoding { + /// Constructs a [UIPickerView] that points to the same underlying object as [other]. + UIPickerView.as(objc.ObjCObject other) : object$ = other { + objc.checkOsVersionInternal('UIPickerView', iOS: (false, (2, 0, 0))); + assert(isA(object$)); + } - final int value; - const NSWindowAnimationBehavior(this.value); + /// Constructs a [UIPickerView] that wraps the given raw object pointer. + UIPickerView.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + objc.checkOsVersionInternal('UIPickerView', iOS: (false, (2, 0, 0))); + assert(isA(object$)); + } - static NSWindowAnimationBehavior fromValue(int value) => switch (value) { - 0 => NSWindowAnimationBehaviorDefault, - 2 => NSWindowAnimationBehaviorNone, - 3 => NSWindowAnimationBehaviorDocumentWindow, - 4 => NSWindowAnimationBehaviorUtilityWindow, - 5 => NSWindowAnimationBehaviorAlertPanel, - _ => throw ArgumentError( - 'Unknown value for NSWindowAnimationBehavior: $value', - ), - }; -} - -@Deprecated('Deprecated') -enum NSWindowBackingLocation { - NSWindowBackingLocationDefault(0), - NSWindowBackingLocationVideoMemory(1), - NSWindowBackingLocationMainMemory(2); - - final int value; - const NSWindowBackingLocation(this.value); - - static NSWindowBackingLocation fromValue(int value) => switch (value) { - 0 => NSWindowBackingLocationDefault, - 1 => NSWindowBackingLocationVideoMemory, - 2 => NSWindowBackingLocationMainMemory, - _ => throw ArgumentError( - 'Unknown value for NSWindowBackingLocation: $value', - ), - }; -} - -enum NSWindowButton { - NSWindowCloseButton(0), - NSWindowMiniaturizeButton(1), - NSWindowZoomButton(2), - NSWindowToolbarButton(3), - NSWindowDocumentIconButton(4), - NSWindowDocumentVersionsButton(6); - - final int value; - const NSWindowButton(this.value); - - static NSWindowButton fromValue(int value) => switch (value) { - 0 => NSWindowCloseButton, - 1 => NSWindowMiniaturizeButton, - 2 => NSWindowZoomButton, - 3 => NSWindowToolbarButton, - 4 => NSWindowDocumentIconButton, - 6 => NSWindowDocumentVersionsButton, - _ => throw ArgumentError('Unknown value for NSWindowButton: $value'), - }; -} - -sealed class NSWindowCollectionBehavior { - static const NSWindowCollectionBehaviorDefault = 0; - static const NSWindowCollectionBehaviorCanJoinAllSpaces = 1; - static const NSWindowCollectionBehaviorMoveToActiveSpace = 2; - static const NSWindowCollectionBehaviorManaged = 4; - static const NSWindowCollectionBehaviorTransient = 8; - static const NSWindowCollectionBehaviorStationary = 16; - static const NSWindowCollectionBehaviorParticipatesInCycle = 32; - static const NSWindowCollectionBehaviorIgnoresCycle = 64; - static const NSWindowCollectionBehaviorFullScreenPrimary = 128; - static const NSWindowCollectionBehaviorFullScreenAuxiliary = 256; - static const NSWindowCollectionBehaviorFullScreenNone = 512; - static const NSWindowCollectionBehaviorFullScreenAllowsTiling = 2048; - static const NSWindowCollectionBehaviorFullScreenDisallowsTiling = 4096; - static const NSWindowCollectionBehaviorPrimary = 65536; - static const NSWindowCollectionBehaviorAuxiliary = 131072; - static const NSWindowCollectionBehaviorCanJoinAllApplications = 262144; -} - -enum NSWindowDepth { - NSWindowDepthTwentyfourBitRGB(520), - NSWindowDepthSixtyfourBitRGB(528), - NSWindowDepthOnehundredtwentyeightBitRGB(544); - - final int value; - const NSWindowDepth(this.value); - - static NSWindowDepth fromValue(int value) => switch (value) { - 520 => NSWindowDepthTwentyfourBitRGB, - 528 => NSWindowDepthSixtyfourBitRGB, - 544 => NSWindowDepthOnehundredtwentyeightBitRGB, - _ => throw ArgumentError('Unknown value for NSWindowDepth: $value'), - }; -} - -sealed class NSWindowNumberListOptions { - static const NSWindowNumberListAllApplications = 1; - static const NSWindowNumberListAllSpaces = 16; -} - -sealed class NSWindowOcclusionState { - static const NSWindowOcclusionStateVisible = 2; -} - -enum NSWindowOrderingMode { - NSWindowAbove(1), - NSWindowBelow(-1), - NSWindowOut(0); - - final int value; - const NSWindowOrderingMode(this.value); - - static NSWindowOrderingMode fromValue(int value) => switch (value) { - 1 => NSWindowAbove, - -1 => NSWindowBelow, - 0 => NSWindowOut, - _ => throw ArgumentError('Unknown value for NSWindowOrderingMode: $value'), - }; -} - -enum NSWindowSharingType { - NSWindowSharingNone(0), - NSWindowSharingReadOnly(1); - - final int value; - const NSWindowSharingType(this.value); - - static NSWindowSharingType fromValue(int value) => switch (value) { - 0 => NSWindowSharingNone, - 1 => NSWindowSharingReadOnly, - _ => throw ArgumentError('Unknown value for NSWindowSharingType: $value'), - }; -} - -sealed class NSWindowStyleMask { - static const NSWindowStyleMaskBorderless = 0; - static const NSWindowStyleMaskTitled = 1; - static const NSWindowStyleMaskClosable = 2; - static const NSWindowStyleMaskMiniaturizable = 4; - static const NSWindowStyleMaskResizable = 8; - static const NSWindowStyleMaskTexturedBackground = 256; - static const NSWindowStyleMaskUnifiedTitleAndToolbar = 4096; - static const NSWindowStyleMaskFullScreen = 16384; - static const NSWindowStyleMaskFullSizeContentView = 32768; - static const NSWindowStyleMaskUtilityWindow = 16; - static const NSWindowStyleMaskDocModalWindow = 64; - static const NSWindowStyleMaskNonactivatingPanel = 128; - static const NSWindowStyleMaskHUDWindow = 8192; -} - -enum NSWindowTabbingMode { - NSWindowTabbingModeAutomatic(0), - NSWindowTabbingModePreferred(1), - NSWindowTabbingModeDisallowed(2); - - final int value; - const NSWindowTabbingMode(this.value); - - static NSWindowTabbingMode fromValue(int value) => switch (value) { - 0 => NSWindowTabbingModeAutomatic, - 1 => NSWindowTabbingModePreferred, - 2 => NSWindowTabbingModeDisallowed, - _ => throw ArgumentError('Unknown value for NSWindowTabbingMode: $value'), - }; -} - -enum NSWindowTitleVisibility { - NSWindowTitleVisible(0), - NSWindowTitleHidden(1); - - final int value; - const NSWindowTitleVisibility(this.value); - - static NSWindowTitleVisibility fromValue(int value) => switch (value) { - 0 => NSWindowTitleVisible, - 1 => NSWindowTitleHidden, - _ => throw ArgumentError( - 'Unknown value for NSWindowTitleVisibility: $value', - ), - }; -} - -enum NSWindowToolbarStyle { - NSWindowToolbarStyleAutomatic(0), - NSWindowToolbarStyleExpanded(1), - NSWindowToolbarStylePreference(2), - NSWindowToolbarStyleUnified(3), - NSWindowToolbarStyleUnifiedCompact(4); - - final int value; - const NSWindowToolbarStyle(this.value); - - static NSWindowToolbarStyle fromValue(int value) => switch (value) { - 0 => NSWindowToolbarStyleAutomatic, - 1 => NSWindowToolbarStyleExpanded, - 2 => NSWindowToolbarStylePreference, - 3 => NSWindowToolbarStyleUnified, - 4 => NSWindowToolbarStyleUnifiedCompact, - _ => throw ArgumentError('Unknown value for NSWindowToolbarStyle: $value'), - }; -} - -enum NSWindowUserTabbingPreference { - NSWindowUserTabbingPreferenceManual(0), - NSWindowUserTabbingPreferenceAlways(1), - NSWindowUserTabbingPreferenceInFullScreen(2); - - final int value; - const NSWindowUserTabbingPreference(this.value); - - static NSWindowUserTabbingPreference fromValue(int value) => switch (value) { - 0 => NSWindowUserTabbingPreferenceManual, - 1 => NSWindowUserTabbingPreferenceAlways, - 2 => NSWindowUserTabbingPreferenceInFullScreen, - _ => throw ArgumentError( - 'Unknown value for NSWindowUserTabbingPreference: $value', - ), - }; -} - -enum NSWritingDirection { - NSWritingDirectionNatural(-1), - NSWritingDirectionLeftToRight(0), - NSWritingDirectionRightToLeft(1); - - final int value; - const NSWritingDirection(this.value); - - static NSWritingDirection fromValue(int value) => switch (value) { - -1 => NSWritingDirectionNatural, - 0 => NSWritingDirectionLeftToRight, - 1 => NSWritingDirectionRightToLeft, - _ => throw ArgumentError('Unknown value for NSWritingDirection: $value'), - }; -} - -/// UIPickerView -extension type UIPickerView._(objc.ObjCObject object$) - implements objc.ObjCObject, objc.NSCoding { - /// Constructs a [UIPickerView] that points to the same underlying object as [other]. - UIPickerView.as(objc.ObjCObject other) : object$ = other { - objc.checkOsVersionInternal('UIPickerView', iOS: (false, (2, 0, 0))); - assert(isA(object$)); - } - - /// Constructs a [UIPickerView] that wraps the given raw object pointer. - UIPickerView.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - objc.checkOsVersionInternal('UIPickerView', iOS: (false, (2, 0, 0))); - assert(isA(object$)); - } - - /// Returns whether [obj] is an instance of [UIPickerView]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_UIPickerView, - ); + /// Returns whether [obj] is an instance of [UIPickerView]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_UIPickerView, + ); } extension UIPickerView$Methods on UIPickerView { @@ -2245,98 +1061,6 @@ extension type UIPickerViewDelegate._(objc.ObjCProtocol object$) }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); } -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_CADisplayLink', -) -external ffi.Pointer _class_CADisplayLink_raw; -final _class_CADisplayLink = objc.getClass( - "CADisplayLink", - () => ffi.Native.addressOf>( - _class_CADisplayLink_raw, - ).cast(), -); -@ffi.Native>(symbol: 'OBJC_CLASS_\$_CALayer') -external ffi.Pointer _class_CALayer_raw; -final _class_CALayer = objc.getClass( - "CALayer", - () => ffi.Native.addressOf>( - _class_CALayer_raw, - ).cast(), -); -@ffi.Native>(symbol: 'OBJC_CLASS_\$_CIFilter') -external ffi.Pointer _class_CIFilter_raw; -final _class_CIFilter = objc.getClass( - "CIFilter", - () => ffi.Native.addressOf>( - _class_CIFilter_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSAppearance', -) -external ffi.Pointer _class_NSAppearance_raw; -final _class_NSAppearance = objc.getClass( - "NSAppearance", - () => ffi.Native.addressOf>( - _class_NSAppearance_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSBitmapImageRep', -) -external ffi.Pointer _class_NSBitmapImageRep_raw; -final _class_NSBitmapImageRep = objc.getClass( - "NSBitmapImageRep", - () => ffi.Native.addressOf>( - _class_NSBitmapImageRep_raw, - ).cast(), -); -@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSButton') -external ffi.Pointer _class_NSButton_raw; -final _class_NSButton = objc.getClass( - "NSButton", - () => ffi.Native.addressOf>( - _class_NSButton_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSButtonCell', -) -external ffi.Pointer _class_NSButtonCell_raw; -final _class_NSButtonCell = objc.getClass( - "NSButtonCell", - () => ffi.Native.addressOf>( - _class_NSButtonCell_raw, - ).cast(), -); -@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSColor') -external ffi.Pointer _class_NSColor_raw; -final _class_NSColor = objc.getClass( - "NSColor", - () => ffi.Native.addressOf>( - _class_NSColor_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSColorList', -) -external ffi.Pointer _class_NSColorList_raw; -final _class_NSColorList = objc.getClass( - "NSColorList", - () => ffi.Native.addressOf>( - _class_NSColorList_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSColorPanel', -) -external ffi.Pointer _class_NSColorPanel_raw; -final _class_NSColorPanel = objc.getClass( - "NSColorPanel", - () => ffi.Native.addressOf>( - _class_NSColorPanel_raw, - ).cast(), -); @ffi.Native>( symbol: 'OBJC_CLASS_\$_NSColorPicker', ) @@ -2347,228 +1071,6 @@ final _class_NSColorPicker = objc.getClass( _class_NSColorPicker_raw, ).cast(), ); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSColorSpace', -) -external ffi.Pointer _class_NSColorSpace_raw; -final _class_NSColorSpace = objc.getClass( - "NSColorSpace", - () => ffi.Native.addressOf>( - _class_NSColorSpace_raw, - ).cast(), -); -@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSCursor') -external ffi.Pointer _class_NSCursor_raw; -final _class_NSCursor = objc.getClass( - "NSCursor", - () => ffi.Native.addressOf>( - _class_NSCursor_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSDockTile', -) -external ffi.Pointer _class_NSDockTile_raw; -final _class_NSDockTile = objc.getClass( - "NSDockTile", - () => ffi.Native.addressOf>( - _class_NSDockTile_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSDraggingItem', -) -external ffi.Pointer _class_NSDraggingItem_raw; -final _class_NSDraggingItem = objc.getClass( - "NSDraggingItem", - () => ffi.Native.addressOf>( - _class_NSDraggingItem_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSDraggingSession', -) -external ffi.Pointer _class_NSDraggingSession_raw; -final _class_NSDraggingSession = objc.getClass( - "NSDraggingSession", - () => ffi.Native.addressOf>( - _class_NSDraggingSession_raw, - ).cast(), -); -@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSEvent') -external ffi.Pointer _class_NSEvent_raw; -final _class_NSEvent = objc.getClass( - "NSEvent", - () => ffi.Native.addressOf>( - _class_NSEvent_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSFileWrapper', -) -external ffi.Pointer _class_NSFileWrapper_raw; -final _class_NSFileWrapper = objc.getClass( - "NSFileWrapper", - () => ffi.Native.addressOf>( - _class_NSFileWrapper_raw, - ).cast(), -); -@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSFont') -external ffi.Pointer _class_NSFont_raw; -final _class_NSFont = objc.getClass( - "NSFont", - () => ffi.Native.addressOf>( - _class_NSFont_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSGestureRecognizer', -) -external ffi.Pointer _class_NSGestureRecognizer_raw; -final _class_NSGestureRecognizer = objc.getClass( - "NSGestureRecognizer", - () => ffi.Native.addressOf>( - _class_NSGestureRecognizer_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSGraphicsContext', -) -external ffi.Pointer _class_NSGraphicsContext_raw; -final _class_NSGraphicsContext = objc.getClass( - "NSGraphicsContext", - () => ffi.Native.addressOf>( - _class_NSGraphicsContext_raw, - ).cast(), -); -@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSImage') -external ffi.Pointer _class_NSImage_raw; -final _class_NSImage = objc.getClass( - "NSImage", - () => ffi.Native.addressOf>( - _class_NSImage_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSLayoutGuide', -) -external ffi.Pointer _class_NSLayoutGuide_raw; -final _class_NSLayoutGuide = objc.getClass( - "NSLayoutGuide", - () => ffi.Native.addressOf>( - _class_NSLayoutGuide_raw, - ).cast(), -); -@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSMenu') -external ffi.Pointer _class_NSMenu_raw; -final _class_NSMenu = objc.getClass( - "NSMenu", - () => ffi.Native.addressOf>( - _class_NSMenu_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSMenuItem', -) -external ffi.Pointer _class_NSMenuItem_raw; -final _class_NSMenuItem = objc.getClass( - "NSMenuItem", - () => ffi.Native.addressOf>( - _class_NSMenuItem_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSMenuItemBadge', -) -external ffi.Pointer _class_NSMenuItemBadge_raw; -final _class_NSMenuItemBadge = objc.getClass( - "NSMenuItemBadge", - () => ffi.Native.addressOf>( - _class_NSMenuItemBadge_raw, - ).cast(), -); -@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSPanel') -external ffi.Pointer _class_NSPanel_raw; -final _class_NSPanel = objc.getClass( - "NSPanel", - () => ffi.Native.addressOf>( - _class_NSPanel_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSPasteboard', -) -external ffi.Pointer _class_NSPasteboard_raw; -final _class_NSPasteboard = objc.getClass( - "NSPasteboard", - () => ffi.Native.addressOf>( - _class_NSPasteboard_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSPasteboardItem', -) -external ffi.Pointer _class_NSPasteboardItem_raw; -final _class_NSPasteboardItem = objc.getClass( - "NSPasteboardItem", - () => ffi.Native.addressOf>( - _class_NSPasteboardItem_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSResponder', -) -external ffi.Pointer _class_NSResponder_raw; -final _class_NSResponder = objc.getClass( - "NSResponder", - () => ffi.Native.addressOf>( - _class_NSResponder_raw, - ).cast(), -); -@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSScreen') -external ffi.Pointer _class_NSScreen_raw; -final _class_NSScreen = objc.getClass( - "NSScreen", - () => ffi.Native.addressOf>( - _class_NSScreen_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSScrollView', -) -external ffi.Pointer _class_NSScrollView_raw; -final _class_NSScrollView = objc.getClass( - "NSScrollView", - () => ffi.Native.addressOf>( - _class_NSScrollView_raw, - ).cast(), -); -@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSShadow') -external ffi.Pointer _class_NSShadow_raw; -final _class_NSShadow = objc.getClass( - "NSShadow", - () => ffi.Native.addressOf>( - _class_NSShadow_raw, - ).cast(), -); -@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSText') -external ffi.Pointer _class_NSText_raw; -final _class_NSText = objc.getClass( - "NSText", - () => ffi.Native.addressOf>( - _class_NSText_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSTextInputContext', -) -external ffi.Pointer _class_NSTextInputContext_raw; -final _class_NSTextInputContext = objc.getClass( - "NSTextInputContext", - () => ffi.Native.addressOf>( - _class_NSTextInputContext_raw, - ).cast(), -); @ffi.Native>( symbol: 'OBJC_CLASS_\$_NSTextList', ) @@ -2580,136 +1082,13 @@ final _class_NSTextList = objc.getClass( ).cast(), ); @ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSTitlebarAccessoryViewController', -) -external ffi.Pointer -_class_NSTitlebarAccessoryViewController_raw; -final _class_NSTitlebarAccessoryViewController = objc.getClass( - "NSTitlebarAccessoryViewController", - () => ffi.Native.addressOf>( - _class_NSTitlebarAccessoryViewController_raw, - ).cast(), -); -@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSToolbar') -external ffi.Pointer _class_NSToolbar_raw; -final _class_NSToolbar = objc.getClass( - "NSToolbar", - () => ffi.Native.addressOf>( - _class_NSToolbar_raw, - ).cast(), -); -@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSTouch') -external ffi.Pointer _class_NSTouch_raw; -final _class_NSTouch = objc.getClass( - "NSTouch", - () => ffi.Native.addressOf>( - _class_NSTouch_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSTrackingArea', + symbol: 'OBJC_CLASS_\$_UIPickerView', ) -external ffi.Pointer _class_NSTrackingArea_raw; -final _class_NSTrackingArea = objc.getClass( - "NSTrackingArea", +external ffi.Pointer _class_UIPickerView_raw; +final _class_UIPickerView = objc.getClass( + "UIPickerView", () => ffi.Native.addressOf>( - _class_NSTrackingArea_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSUndoManager', -) -external ffi.Pointer _class_NSUndoManager_raw; -final _class_NSUndoManager = objc.getClass( - "NSUndoManager", - () => ffi.Native.addressOf>( - _class_NSUndoManager_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSUserActivity', -) -external ffi.Pointer _class_NSUserActivity_raw; -final _class_NSUserActivity = objc.getClass( - "NSUserActivity", - () => ffi.Native.addressOf>( - _class_NSUserActivity_raw, - ).cast(), -); -@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSView') -external ffi.Pointer _class_NSView_raw; -final _class_NSView = objc.getClass( - "NSView", - () => ffi.Native.addressOf>( - _class_NSView_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSViewController', -) -external ffi.Pointer _class_NSViewController_raw; -final _class_NSViewController = objc.getClass( - "NSViewController", - () => ffi.Native.addressOf>( - _class_NSViewController_raw, - ).cast(), -); -@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSWindow') -external ffi.Pointer _class_NSWindow_raw; -final _class_NSWindow = objc.getClass( - "NSWindow", - () => ffi.Native.addressOf>( - _class_NSWindow_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSWindowController', -) -external ffi.Pointer _class_NSWindowController_raw; -final _class_NSWindowController = objc.getClass( - "NSWindowController", - () => ffi.Native.addressOf>( - _class_NSWindowController_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSWindowTab', -) -external ffi.Pointer _class_NSWindowTab_raw; -final _class_NSWindowTab = objc.getClass( - "NSWindowTab", - () => ffi.Native.addressOf>( - _class_NSWindowTab_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSWindowTabGroup', -) -external ffi.Pointer _class_NSWindowTabGroup_raw; -final _class_NSWindowTabGroup = objc.getClass( - "NSWindowTabGroup", - () => ffi.Native.addressOf>( - _class_NSWindowTabGroup_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSWritingToolsCoordinator', -) -external ffi.Pointer _class_NSWritingToolsCoordinator_raw; -final _class_NSWritingToolsCoordinator = objc.getClass( - "NSWritingToolsCoordinator", - () => ffi.Native.addressOf>( - _class_NSWritingToolsCoordinator_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_UIPickerView', -) -external ffi.Pointer _class_UIPickerView_raw; -final _class_UIPickerView = objc.getClass( - "UIPickerView", - () => ffi.Native.addressOf>( - _class_UIPickerView_raw, + _class_UIPickerView_raw, ).cast(), ); final _objc_msgSend_12hwf9n = objc.msgSendPointer @@ -3039,23 +1418,6 @@ final _objc_msgSend_cy4jud = objc.msgSendPointer bool, ) >(); -final _objc_msgSend_e3qsqz = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); final _objc_msgSend_exovb9 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -3143,3462 +1505,77 @@ final _objc_msgSend_xtuoz7 = objc.msgSendPointer ffi.Pointer, ) >(); -@ffi.Native Function()>( - symbol: '_1hhvgmr_NSAccessibility', -) -external ffi.Pointer _protocol_NSAccessibility_raw(); -final _protocol_NSAccessibility = objc.getProtocol( - "NSAccessibility", - _protocol_NSAccessibility_raw, -); -@ffi.Native Function()>( - symbol: '_1hhvgmr_NSAccessibilityElement', -) -external ffi.Pointer -_protocol_NSAccessibilityElement_raw(); -final _protocol_NSAccessibilityElement = objc.getProtocol( - "NSAccessibilityElement", - _protocol_NSAccessibilityElement_raw, -); -@ffi.Native Function()>( - symbol: '_1hhvgmr_NSAnimatablePropertyContainer', -) -external ffi.Pointer -_protocol_NSAnimatablePropertyContainer_raw(); -final _protocol_NSAnimatablePropertyContainer = objc.getProtocol( - "NSAnimatablePropertyContainer", - _protocol_NSAnimatablePropertyContainer_raw, -); -@ffi.Native Function()>( - symbol: '_1hhvgmr_NSAppearanceCustomization', -) -external ffi.Pointer -_protocol_NSAppearanceCustomization_raw(); -final _protocol_NSAppearanceCustomization = objc.getProtocol( - "NSAppearanceCustomization", - _protocol_NSAppearanceCustomization_raw, -); -@ffi.Native Function()>( - symbol: '_1hhvgmr_NSChangeSpelling', -) -external ffi.Pointer _protocol_NSChangeSpelling_raw(); -final _protocol_NSChangeSpelling = objc.getProtocol( - "NSChangeSpelling", - _protocol_NSChangeSpelling_raw, -); -@ffi.Native Function()>( - symbol: '_1hhvgmr_NSColorPickingDefault', -) -external ffi.Pointer -_protocol_NSColorPickingDefault_raw(); -final _protocol_NSColorPickingDefault = objc.getProtocol( - "NSColorPickingDefault", - _protocol_NSColorPickingDefault_raw, -); -@ffi.Native Function()>( - symbol: '_1hhvgmr_NSDraggingDestination', -) -external ffi.Pointer -_protocol_NSDraggingDestination_raw(); -final _protocol_NSDraggingDestination = objc.getProtocol( - "NSDraggingDestination", - _protocol_NSDraggingDestination_raw, -); -@ffi.Native Function()>( - symbol: '_1hhvgmr_NSDraggingInfo', -) -external ffi.Pointer _protocol_NSDraggingInfo_raw(); -final _protocol_NSDraggingInfo = objc.getProtocol( - "NSDraggingInfo", - _protocol_NSDraggingInfo_raw, -); -@ffi.Native Function()>( - symbol: '_1hhvgmr_NSDraggingSource', -) -external ffi.Pointer _protocol_NSDraggingSource_raw(); -final _protocol_NSDraggingSource = objc.getProtocol( - "NSDraggingSource", - _protocol_NSDraggingSource_raw, -); -@ffi.Native Function()>( - symbol: '_1hhvgmr_NSIgnoreMisspelledWords', -) -external ffi.Pointer -_protocol_NSIgnoreMisspelledWords_raw(); -final _protocol_NSIgnoreMisspelledWords = objc.getProtocol( - "NSIgnoreMisspelledWords", - _protocol_NSIgnoreMisspelledWords_raw, -); -@ffi.Native Function()>( - symbol: '_1hhvgmr_NSMenuDelegate', -) -external ffi.Pointer _protocol_NSMenuDelegate_raw(); -final _protocol_NSMenuDelegate = objc.getProtocol( - "NSMenuDelegate", - _protocol_NSMenuDelegate_raw, -); -@ffi.Native Function()>( - symbol: '_1hhvgmr_NSMenuItemValidation', -) -external ffi.Pointer -_protocol_NSMenuItemValidation_raw(); -final _protocol_NSMenuItemValidation = objc.getProtocol( - "NSMenuItemValidation", - _protocol_NSMenuItemValidation_raw, -); -@ffi.Native Function()>( - symbol: '_1hhvgmr_NSStandardKeyBindingResponding', -) -external ffi.Pointer -_protocol_NSStandardKeyBindingResponding_raw(); -final _protocol_NSStandardKeyBindingResponding = objc.getProtocol( - "NSStandardKeyBindingResponding", - _protocol_NSStandardKeyBindingResponding_raw, -); -@ffi.Native Function()>( - symbol: '_1hhvgmr_NSTextDelegate', -) -external ffi.Pointer _protocol_NSTextDelegate_raw(); -final _protocol_NSTextDelegate = objc.getProtocol( - "NSTextDelegate", - _protocol_NSTextDelegate_raw, -); -@ffi.Native Function()>( - symbol: '_1hhvgmr_NSUserActivityDelegate', -) -external ffi.Pointer -_protocol_NSUserActivityDelegate_raw(); -final _protocol_NSUserActivityDelegate = objc.getProtocol( - "NSUserActivityDelegate", - _protocol_NSUserActivityDelegate_raw, -); -@ffi.Native Function()>( - symbol: '_1hhvgmr_NSUserActivityRestoring', -) -external ffi.Pointer -_protocol_NSUserActivityRestoring_raw(); -final _protocol_NSUserActivityRestoring = objc.getProtocol( - "NSUserActivityRestoring", - _protocol_NSUserActivityRestoring_raw, -); -@ffi.Native Function()>( - symbol: '_1hhvgmr_NSUserInterfaceItemIdentification', -) -external ffi.Pointer -_protocol_NSUserInterfaceItemIdentification_raw(); -final _protocol_NSUserInterfaceItemIdentification = objc.getProtocol( - "NSUserInterfaceItemIdentification", - _protocol_NSUserInterfaceItemIdentification_raw, -); -@ffi.Native Function()>( - symbol: '_1hhvgmr_NSUserInterfaceValidations', -) -external ffi.Pointer -_protocol_NSUserInterfaceValidations_raw(); -final _protocol_NSUserInterfaceValidations = objc.getProtocol( - "NSUserInterfaceValidations", - _protocol_NSUserInterfaceValidations_raw, -); -@ffi.Native Function()>( - symbol: '_1hhvgmr_NSValidatedUserInterfaceItem', -) -external ffi.Pointer -_protocol_NSValidatedUserInterfaceItem_raw(); -final _protocol_NSValidatedUserInterfaceItem = objc.getProtocol( - "NSValidatedUserInterfaceItem", - _protocol_NSValidatedUserInterfaceItem_raw, -); -@ffi.Native Function()>( - symbol: '_1hhvgmr_NSWindowDelegate', -) -external ffi.Pointer _protocol_NSWindowDelegate_raw(); -final _protocol_NSWindowDelegate = objc.getProtocol( - "NSWindowDelegate", - _protocol_NSWindowDelegate_raw, -); -@ffi.Native Function()>( - symbol: '_1hhvgmr_UIPickerViewDataSource', -) -external ffi.Pointer -_protocol_UIPickerViewDataSource_raw(); -final _protocol_UIPickerViewDataSource = objc.getProtocol( - "UIPickerViewDataSource", - _protocol_UIPickerViewDataSource_raw, -); -@ffi.Native Function()>( - symbol: '_1hhvgmr_UIPickerViewDelegate', -) -external ffi.Pointer -_protocol_UIPickerViewDelegate_raw(); -final _protocol_UIPickerViewDelegate = objc.getProtocol( - "UIPickerViewDelegate", - _protocol_UIPickerViewDelegate_raw, -); -late final _sel_CGEvent = objc.registerName("CGEvent"); -late final _sel_RTFDFromRange_ = objc.registerName("RTFDFromRange:"); -late final _sel_RTFFromRange_ = objc.registerName("RTFFromRange:"); -late final _sel_absoluteX = objc.registerName("absoluteX"); -late final _sel_absoluteY = objc.registerName("absoluteY"); -late final _sel_absoluteZ = objc.registerName("absoluteZ"); -late final _sel_acceptsFirstMouse_ = objc.registerName("acceptsFirstMouse:"); -late final _sel_acceptsFirstResponder = objc.registerName( - "acceptsFirstResponder", -); -late final _sel_acceptsMouseMovedEvents = objc.registerName( - "acceptsMouseMovedEvents", -); -late final _sel_acceptsTouchEvents = objc.registerName("acceptsTouchEvents"); -late final _sel_accessBehavior = objc.registerName("accessBehavior"); -late final _sel_accessibilityActivationPoint = objc.registerName( - "accessibilityActivationPoint", -); -late final _sel_accessibilityAllowedValues = objc.registerName( - "accessibilityAllowedValues", -); -late final _sel_accessibilityApplicationFocusedUIElement = objc.registerName( - "accessibilityApplicationFocusedUIElement", -); -late final _sel_accessibilityAttributedStringForRange_ = objc.registerName( - "accessibilityAttributedStringForRange:", -); -late final _sel_accessibilityAttributedUserInputLabels = objc.registerName( - "accessibilityAttributedUserInputLabels", -); -late final _sel_accessibilityCancelButton = objc.registerName( - "accessibilityCancelButton", -); -late final _sel_accessibilityCellForColumn_row_ = objc.registerName( - "accessibilityCellForColumn:row:", -); -late final _sel_accessibilityChildren = objc.registerName( - "accessibilityChildren", -); -late final _sel_accessibilityChildrenInNavigationOrder = objc.registerName( - "accessibilityChildrenInNavigationOrder", -); -late final _sel_accessibilityClearButton = objc.registerName( - "accessibilityClearButton", -); -late final _sel_accessibilityCloseButton = objc.registerName( - "accessibilityCloseButton", -); -late final _sel_accessibilityColumnCount = objc.registerName( - "accessibilityColumnCount", -); -late final _sel_accessibilityColumnHeaderUIElements = objc.registerName( - "accessibilityColumnHeaderUIElements", -); -late final _sel_accessibilityColumnIndexRange = objc.registerName( - "accessibilityColumnIndexRange", -); -late final _sel_accessibilityColumnTitles = objc.registerName( - "accessibilityColumnTitles", -); -late final _sel_accessibilityColumns = objc.registerName( - "accessibilityColumns", -); -late final _sel_accessibilityContents = objc.registerName( - "accessibilityContents", -); -late final _sel_accessibilityCriticalValue = objc.registerName( - "accessibilityCriticalValue", -); -late final _sel_accessibilityCustomActions = objc.registerName( - "accessibilityCustomActions", -); -late final _sel_accessibilityCustomRotors = objc.registerName( - "accessibilityCustomRotors", -); -late final _sel_accessibilityDecrementButton = objc.registerName( - "accessibilityDecrementButton", -); -late final _sel_accessibilityDefaultButton = objc.registerName( - "accessibilityDefaultButton", -); -late final _sel_accessibilityDisclosedByRow = objc.registerName( - "accessibilityDisclosedByRow", -); -late final _sel_accessibilityDisclosedRows = objc.registerName( - "accessibilityDisclosedRows", -); -late final _sel_accessibilityDisclosureLevel = objc.registerName( - "accessibilityDisclosureLevel", -); -late final _sel_accessibilityDocument = objc.registerName( - "accessibilityDocument", -); -late final _sel_accessibilityExtrasMenuBar = objc.registerName( - "accessibilityExtrasMenuBar", -); -late final _sel_accessibilityFilename = objc.registerName( - "accessibilityFilename", -); -late final _sel_accessibilityFocusedWindow = objc.registerName( - "accessibilityFocusedWindow", -); -late final _sel_accessibilityFrame = objc.registerName("accessibilityFrame"); -late final _sel_accessibilityFrameForRange_ = objc.registerName( - "accessibilityFrameForRange:", -); -late final _sel_accessibilityFullScreenButton = objc.registerName( - "accessibilityFullScreenButton", -); -late final _sel_accessibilityGrowArea = objc.registerName( - "accessibilityGrowArea", -); -late final _sel_accessibilityHandles = objc.registerName( - "accessibilityHandles", -); -late final _sel_accessibilityHeader = objc.registerName("accessibilityHeader"); -late final _sel_accessibilityHelp = objc.registerName("accessibilityHelp"); -late final _sel_accessibilityHorizontalScrollBar = objc.registerName( - "accessibilityHorizontalScrollBar", -); -late final _sel_accessibilityHorizontalUnitDescription = objc.registerName( - "accessibilityHorizontalUnitDescription", -); -late final _sel_accessibilityHorizontalUnits = objc.registerName( - "accessibilityHorizontalUnits", -); -late final _sel_accessibilityIdentifier = objc.registerName( - "accessibilityIdentifier", -); -late final _sel_accessibilityIncrementButton = objc.registerName( - "accessibilityIncrementButton", -); -late final _sel_accessibilityIndex = objc.registerName("accessibilityIndex"); -late final _sel_accessibilityInsertionPointLineNumber = objc.registerName( - "accessibilityInsertionPointLineNumber", -); -late final _sel_accessibilityLabel = objc.registerName("accessibilityLabel"); -late final _sel_accessibilityLabelUIElements = objc.registerName( - "accessibilityLabelUIElements", -); -late final _sel_accessibilityLabelValue = objc.registerName( - "accessibilityLabelValue", -); -late final _sel_accessibilityLayoutPointForScreenPoint_ = objc.registerName( - "accessibilityLayoutPointForScreenPoint:", -); -late final _sel_accessibilityLayoutSizeForScreenSize_ = objc.registerName( - "accessibilityLayoutSizeForScreenSize:", -); -late final _sel_accessibilityLineForIndex_ = objc.registerName( - "accessibilityLineForIndex:", -); -late final _sel_accessibilityLinkedUIElements = objc.registerName( - "accessibilityLinkedUIElements", -); -late final _sel_accessibilityMainWindow = objc.registerName( - "accessibilityMainWindow", -); -late final _sel_accessibilityMarkerGroupUIElement = objc.registerName( - "accessibilityMarkerGroupUIElement", -); -late final _sel_accessibilityMarkerTypeDescription = objc.registerName( - "accessibilityMarkerTypeDescription", -); -late final _sel_accessibilityMarkerUIElements = objc.registerName( - "accessibilityMarkerUIElements", -); -late final _sel_accessibilityMarkerValues = objc.registerName( - "accessibilityMarkerValues", -); -late final _sel_accessibilityMaxValue = objc.registerName( - "accessibilityMaxValue", -); -late final _sel_accessibilityMenuBar = objc.registerName( - "accessibilityMenuBar", -); -late final _sel_accessibilityMinValue = objc.registerName( - "accessibilityMinValue", -); -late final _sel_accessibilityMinimizeButton = objc.registerName( - "accessibilityMinimizeButton", -); -late final _sel_accessibilityNextContents = objc.registerName( - "accessibilityNextContents", -); -late final _sel_accessibilityNumberOfCharacters = objc.registerName( - "accessibilityNumberOfCharacters", -); -late final _sel_accessibilityOrientation = objc.registerName( - "accessibilityOrientation", -); -late final _sel_accessibilityOverflowButton = objc.registerName( - "accessibilityOverflowButton", -); -late final _sel_accessibilityParent = objc.registerName("accessibilityParent"); -late final _sel_accessibilityPerformCancel = objc.registerName( - "accessibilityPerformCancel", -); -late final _sel_accessibilityPerformConfirm = objc.registerName( - "accessibilityPerformConfirm", -); -late final _sel_accessibilityPerformDecrement = objc.registerName( - "accessibilityPerformDecrement", -); -late final _sel_accessibilityPerformDelete = objc.registerName( - "accessibilityPerformDelete", -); -late final _sel_accessibilityPerformIncrement = objc.registerName( - "accessibilityPerformIncrement", -); -late final _sel_accessibilityPerformPick = objc.registerName( - "accessibilityPerformPick", -); -late final _sel_accessibilityPerformPress = objc.registerName( - "accessibilityPerformPress", -); -late final _sel_accessibilityPerformRaise = objc.registerName( - "accessibilityPerformRaise", -); -late final _sel_accessibilityPerformShowAlternateUI = objc.registerName( - "accessibilityPerformShowAlternateUI", -); -late final _sel_accessibilityPerformShowDefaultUI = objc.registerName( - "accessibilityPerformShowDefaultUI", -); -late final _sel_accessibilityPerformShowMenu = objc.registerName( - "accessibilityPerformShowMenu", -); -late final _sel_accessibilityPlaceholderValue = objc.registerName( - "accessibilityPlaceholderValue", -); -late final _sel_accessibilityPreviousContents = objc.registerName( - "accessibilityPreviousContents", -); -late final _sel_accessibilityProxy = objc.registerName("accessibilityProxy"); -late final _sel_accessibilityRTFForRange_ = objc.registerName( - "accessibilityRTFForRange:", -); -late final _sel_accessibilityRangeForIndex_ = objc.registerName( - "accessibilityRangeForIndex:", -); -late final _sel_accessibilityRangeForLine_ = objc.registerName( - "accessibilityRangeForLine:", -); -late final _sel_accessibilityRangeForPosition_ = objc.registerName( - "accessibilityRangeForPosition:", -); -late final _sel_accessibilityRole = objc.registerName("accessibilityRole"); -late final _sel_accessibilityRoleDescription = objc.registerName( - "accessibilityRoleDescription", -); -late final _sel_accessibilityRowCount = objc.registerName( - "accessibilityRowCount", -); -late final _sel_accessibilityRowHeaderUIElements = objc.registerName( - "accessibilityRowHeaderUIElements", -); -late final _sel_accessibilityRowIndexRange = objc.registerName( - "accessibilityRowIndexRange", -); -late final _sel_accessibilityRows = objc.registerName("accessibilityRows"); -late final _sel_accessibilityRulerMarkerType = objc.registerName( - "accessibilityRulerMarkerType", -); -late final _sel_accessibilityScreenPointForLayoutPoint_ = objc.registerName( - "accessibilityScreenPointForLayoutPoint:", -); -late final _sel_accessibilityScreenSizeForLayoutSize_ = objc.registerName( - "accessibilityScreenSizeForLayoutSize:", -); -late final _sel_accessibilitySearchButton = objc.registerName( - "accessibilitySearchButton", -); -late final _sel_accessibilitySearchMenu = objc.registerName( - "accessibilitySearchMenu", -); -late final _sel_accessibilitySelectedCells = objc.registerName( - "accessibilitySelectedCells", -); -late final _sel_accessibilitySelectedChildren = objc.registerName( - "accessibilitySelectedChildren", -); -late final _sel_accessibilitySelectedColumns = objc.registerName( - "accessibilitySelectedColumns", -); -late final _sel_accessibilitySelectedRows = objc.registerName( - "accessibilitySelectedRows", -); -late final _sel_accessibilitySelectedText = objc.registerName( - "accessibilitySelectedText", -); -late final _sel_accessibilitySelectedTextRange = objc.registerName( - "accessibilitySelectedTextRange", -); -late final _sel_accessibilitySelectedTextRanges = objc.registerName( - "accessibilitySelectedTextRanges", +late final _sel_alloc = objc.registerName("alloc"); +late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); +late final _sel_alphaControlAddedOrRemoved_ = objc.registerName( + "alphaControlAddedOrRemoved:", ); -late final _sel_accessibilityServesAsTitleForUIElements = objc.registerName( - "accessibilityServesAsTitleForUIElements", +late final _sel_attachColorList_ = objc.registerName("attachColorList:"); +late final _sel_buttonToolTip = objc.registerName("buttonToolTip"); +late final _sel_colorPanel = objc.registerName("colorPanel"); +late final _sel_dataSource = objc.registerName("dataSource"); +late final _sel_delegate = objc.registerName("delegate"); +late final _sel_detachColorList_ = objc.registerName("detachColorList:"); +late final _sel_encodeWithCoder_ = objc.registerName("encodeWithCoder:"); +late final _sel_init = objc.registerName("init"); +late final _sel_initWithCoder_ = objc.registerName("initWithCoder:"); +late final _sel_initWithMarkerFormat_options_ = objc.registerName( + "initWithMarkerFormat:options:", ); -late final _sel_accessibilitySharedCharacterRange = objc.registerName( - "accessibilitySharedCharacterRange", +late final _sel_initWithMarkerFormat_options_startingItemNumber_ = objc + .registerName("initWithMarkerFormat:options:startingItemNumber:"); +late final _sel_initWithPickerMask_colorPanel_ = objc.registerName( + "initWithPickerMask:colorPanel:", ); -late final _sel_accessibilitySharedFocusElements = objc.registerName( - "accessibilitySharedFocusElements", +late final _sel_insertNewButtonImage_in_ = objc.registerName( + "insertNewButtonImage:in:", ); -late final _sel_accessibilitySharedTextUIElements = objc.registerName( - "accessibilitySharedTextUIElements", +late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); +late final _sel_isOrdered = objc.registerName("isOrdered"); +late final _sel_listOptions = objc.registerName("listOptions"); +late final _sel_markerForItemNumber_ = objc.registerName( + "markerForItemNumber:", ); -late final _sel_accessibilityShownMenu = objc.registerName( - "accessibilityShownMenu", +late final _sel_markerFormat = objc.registerName("markerFormat"); +late final _sel_minContentSize = objc.registerName("minContentSize"); +late final _sel_new = objc.registerName("new"); +late final _sel_numberOfComponents = objc.registerName("numberOfComponents"); +late final _sel_numberOfRowsInComponent_ = objc.registerName( + "numberOfRowsInComponent:", ); -late final _sel_accessibilitySortDirection = objc.registerName( - "accessibilitySortDirection", +late final _sel_provideNewButtonImage = objc.registerName( + "provideNewButtonImage", ); -late final _sel_accessibilitySplitters = objc.registerName( - "accessibilitySplitters", +late final _sel_reloadAllComponents = objc.registerName("reloadAllComponents"); +late final _sel_reloadComponent_ = objc.registerName("reloadComponent:"); +late final _sel_rowSizeForComponent_ = objc.registerName( + "rowSizeForComponent:", ); -late final _sel_accessibilityStringForRange_ = objc.registerName( - "accessibilityStringForRange:", +late final _sel_selectRow_inComponent_animated_ = objc.registerName( + "selectRow:inComponent:animated:", ); -late final _sel_accessibilityStyleRangeForIndex_ = objc.registerName( - "accessibilityStyleRangeForIndex:", +late final _sel_selectedRowInComponent_ = objc.registerName( + "selectedRowInComponent:", ); -late final _sel_accessibilitySubrole = objc.registerName( - "accessibilitySubrole", +late final _sel_setDataSource_ = objc.registerName("setDataSource:"); +late final _sel_setDelegate_ = objc.registerName("setDelegate:"); +late final _sel_setMode_ = objc.registerName("setMode:"); +late final _sel_setShowsSelectionIndicator_ = objc.registerName( + "setShowsSelectionIndicator:", ); -late final _sel_accessibilityTabs = objc.registerName("accessibilityTabs"); -late final _sel_accessibilityTitle = objc.registerName("accessibilityTitle"); -late final _sel_accessibilityTitleUIElement = objc.registerName( - "accessibilityTitleUIElement", +late final _sel_setStartingItemNumber_ = objc.registerName( + "setStartingItemNumber:", ); -late final _sel_accessibilityToolbarButton = objc.registerName( - "accessibilityToolbarButton", +late final _sel_showsSelectionIndicator = objc.registerName( + "showsSelectionIndicator", ); -late final _sel_accessibilityTopLevelUIElement = objc.registerName( - "accessibilityTopLevelUIElement", +late final _sel_startingItemNumber = objc.registerName("startingItemNumber"); +late final _sel_supportsSecureCoding = objc.registerName( + "supportsSecureCoding", ); -late final _sel_accessibilityURL = objc.registerName("accessibilityURL"); -late final _sel_accessibilityUnitDescription = objc.registerName( - "accessibilityUnitDescription", -); -late final _sel_accessibilityUnits = objc.registerName("accessibilityUnits"); -late final _sel_accessibilityUserInputLabels = objc.registerName( - "accessibilityUserInputLabels", -); -late final _sel_accessibilityValue = objc.registerName("accessibilityValue"); -late final _sel_accessibilityValueDescription = objc.registerName( - "accessibilityValueDescription", -); -late final _sel_accessibilityVerticalScrollBar = objc.registerName( - "accessibilityVerticalScrollBar", -); -late final _sel_accessibilityVerticalUnitDescription = objc.registerName( - "accessibilityVerticalUnitDescription", -); -late final _sel_accessibilityVerticalUnits = objc.registerName( - "accessibilityVerticalUnits", -); -late final _sel_accessibilityVisibleCells = objc.registerName( - "accessibilityVisibleCells", -); -late final _sel_accessibilityVisibleCharacterRange = objc.registerName( - "accessibilityVisibleCharacterRange", -); -late final _sel_accessibilityVisibleChildren = objc.registerName( - "accessibilityVisibleChildren", -); -late final _sel_accessibilityVisibleColumns = objc.registerName( - "accessibilityVisibleColumns", -); -late final _sel_accessibilityVisibleRows = objc.registerName( - "accessibilityVisibleRows", -); -late final _sel_accessibilityWarningValue = objc.registerName( - "accessibilityWarningValue", -); -late final _sel_accessibilityWindow = objc.registerName("accessibilityWindow"); -late final _sel_accessibilityWindows = objc.registerName( - "accessibilityWindows", -); -late final _sel_accessibilityZoomButton = objc.registerName( - "accessibilityZoomButton", -); -late final _sel_accessoryView = objc.registerName("accessoryView"); -late final _sel_action = objc.registerName("action"); -late final _sel_activityType = objc.registerName("activityType"); -late final _sel_addChildWindow_ordered_ = objc.registerName( - "addChildWindow:ordered:", -); -late final _sel_addCursorRect_cursor_ = objc.registerName( - "addCursorRect:cursor:", -); -late final _sel_addFileWithPath_ = objc.registerName("addFileWithPath:"); -late final _sel_addFileWrapper_ = objc.registerName("addFileWrapper:"); -late final _sel_addGestureRecognizer_ = objc.registerName( - "addGestureRecognizer:", -); -late final _sel_addGlobalMonitorForEventsMatchingMask_handler_ = objc - .registerName("addGlobalMonitorForEventsMatchingMask:handler:"); -late final _sel_addItemWithTitle_action_keyEquivalent_ = objc.registerName( - "addItemWithTitle:action:keyEquivalent:", -); -late final _sel_addItem_ = objc.registerName("addItem:"); -late final _sel_addLocalMonitorForEventsMatchingMask_handler_ = objc - .registerName("addLocalMonitorForEventsMatchingMask:handler:"); -late final _sel_addRegularFileWithContents_preferredFilename_ = objc - .registerName("addRegularFileWithContents:preferredFilename:"); -late final _sel_addSubview_ = objc.registerName("addSubview:"); -late final _sel_addSubview_positioned_relativeTo_ = objc.registerName( - "addSubview:positioned:relativeTo:", -); -late final _sel_addSymbolicLinkWithDestination_preferredFilename_ = objc - .registerName("addSymbolicLinkWithDestination:preferredFilename:"); -late final _sel_addTabbedWindow_ordered_ = objc.registerName( - "addTabbedWindow:ordered:", -); -late final _sel_addTitlebarAccessoryViewController_ = objc.registerName( - "addTitlebarAccessoryViewController:", -); -late final _sel_addToolTipRect_owner_userData_ = objc.registerName( - "addToolTipRect:owner:userData:", -); -late final _sel_addTrackingArea_ = objc.registerName("addTrackingArea:"); -late final _sel_addTrackingRect_owner_userData_assumeInside_ = objc - .registerName("addTrackingRect:owner:userData:assumeInside:"); -late final _sel_addTypes_owner_ = objc.registerName("addTypes:owner:"); -late final _sel_addUserInfoEntriesFromDictionary_ = objc.registerName( - "addUserInfoEntriesFromDictionary:", -); -late final _sel_additionalSafeAreaInsets = objc.registerName( - "additionalSafeAreaInsets", -); -late final _sel_adjustPageHeightNew_top_bottom_limit_ = objc.registerName( - "adjustPageHeightNew:top:bottom:limit:", -); -late final _sel_adjustPageWidthNew_left_right_limit_ = objc.registerName( - "adjustPageWidthNew:left:right:limit:", -); -late final _sel_adjustScroll_ = objc.registerName("adjustScroll:"); -late final _sel_alignCenter_ = objc.registerName("alignCenter:"); -late final _sel_alignLeft_ = objc.registerName("alignLeft:"); -late final _sel_alignRight_ = objc.registerName("alignRight:"); -late final _sel_alignment = objc.registerName("alignment"); -late final _sel_allTouches = objc.registerName("allTouches"); -late final _sel_alloc = objc.registerName("alloc"); -late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); -late final _sel_allocateGState = objc.registerName("allocateGState"); -late final _sel_allowedTouchTypes = objc.registerName("allowedTouchTypes"); -late final _sel_allowsAutomaticKeyEquivalentLocalization = objc.registerName( - "allowsAutomaticKeyEquivalentLocalization", -); -late final _sel_allowsAutomaticKeyEquivalentMirroring = objc.registerName( - "allowsAutomaticKeyEquivalentMirroring", -); -late final _sel_allowsAutomaticWindowTabbing = objc.registerName( - "allowsAutomaticWindowTabbing", -); -late final _sel_allowsConcurrentViewDrawing = objc.registerName( - "allowsConcurrentViewDrawing", -); -late final _sel_allowsContextMenuPlugIns = objc.registerName( - "allowsContextMenuPlugIns", -); -late final _sel_allowsKeyEquivalentWhenHidden = objc.registerName( - "allowsKeyEquivalentWhenHidden", -); -late final _sel_allowsToolTipsWhenApplicationIsInactive = objc.registerName( - "allowsToolTipsWhenApplicationIsInactive", -); -late final _sel_allowsVibrancy = objc.registerName("allowsVibrancy"); -late final _sel_alpha = objc.registerName("alpha"); -late final _sel_alphaControlAddedOrRemoved_ = objc.registerName( - "alphaControlAddedOrRemoved:", -); -late final _sel_alphaValue = objc.registerName("alphaValue"); -late final _sel_ancestorSharedWithView_ = objc.registerName( - "ancestorSharedWithView:", -); -late final _sel_animatesToDestination = objc.registerName( - "animatesToDestination", -); -late final _sel_animationBehavior = objc.registerName("animationBehavior"); -late final _sel_animationForKey_ = objc.registerName("animationForKey:"); -late final _sel_animationResizeTime_ = objc.registerName( - "animationResizeTime:", -); -late final _sel_animations = objc.registerName("animations"); -late final _sel_animator = objc.registerName("animator"); -late final _sel_appearance = objc.registerName("appearance"); -late final _sel_appearanceNamed_ = objc.registerName("appearanceNamed:"); -late final _sel_appearanceSource = objc.registerName("appearanceSource"); -late final _sel_areCursorRectsEnabled = objc.registerName( - "areCursorRectsEnabled", -); -late final _sel_aspectRatio = objc.registerName("aspectRatio"); -late final _sel_associatedEventsMask = objc.registerName( - "associatedEventsMask", -); -late final _sel_attachColorList_ = objc.registerName("attachColorList:"); -late final _sel_attachedMenu = objc.registerName("attachedMenu"); -late final _sel_attachedSheet = objc.registerName("attachedSheet"); -late final _sel_attributedTitle = objc.registerName("attributedTitle"); -late final _sel_autoenablesItems = objc.registerName("autoenablesItems"); -late final _sel_automaticallyInsertsWritingToolsItems = objc.registerName( - "automaticallyInsertsWritingToolsItems", -); -late final _sel_autorecalculatesContentBorderThicknessForEdge_ = objc - .registerName("autorecalculatesContentBorderThicknessForEdge:"); -late final _sel_autorecalculatesKeyViewLoop = objc.registerName( - "autorecalculatesKeyViewLoop", -); -late final _sel_autoresizesSubviews = objc.registerName("autoresizesSubviews"); -late final _sel_autoresizingMask = objc.registerName("autoresizingMask"); -late final _sel_autoscroll_ = objc.registerName("autoscroll:"); -late final _sel_availableTypeFromArray_ = objc.registerName( - "availableTypeFromArray:", -); -late final _sel_backgroundColor = objc.registerName("backgroundColor"); -late final _sel_backgroundFilters = objc.registerName("backgroundFilters"); -late final _sel_backingAlignedRect_options_ = objc.registerName( - "backingAlignedRect:options:", -); -late final _sel_backingLocation = objc.registerName("backingLocation"); -late final _sel_backingScaleFactor = objc.registerName("backingScaleFactor"); -late final _sel_backingType = objc.registerName("backingType"); -late final _sel_badge = objc.registerName("badge"); -late final _sel_baseWritingDirection = objc.registerName( - "baseWritingDirection", -); -late final _sel_becomeCurrent = objc.registerName("becomeCurrent"); -late final _sel_becomeFirstResponder = objc.registerName( - "becomeFirstResponder", -); -late final _sel_becomeKeyWindow = objc.registerName("becomeKeyWindow"); -late final _sel_becomeMainWindow = objc.registerName("becomeMainWindow"); -late final _sel_becomesKeyOnlyIfNeeded = objc.registerName( - "becomesKeyOnlyIfNeeded", -); -late final _sel_beginCriticalSheet_completionHandler_ = objc.registerName( - "beginCriticalSheet:completionHandler:", -); -late final _sel_beginDocument = objc.registerName("beginDocument"); -late final _sel_beginDraggingSessionWithItems_event_source_ = objc.registerName( - "beginDraggingSessionWithItems:event:source:", -); -late final _sel_beginGestureWithEvent_ = objc.registerName( - "beginGestureWithEvent:", -); -late final _sel_beginPageInRect_atPlacement_ = objc.registerName( - "beginPageInRect:atPlacement:", -); -late final _sel_beginSheet_completionHandler_ = objc.registerName( - "beginSheet:completionHandler:", -); -late final _sel_beginUndoGrouping = objc.registerName("beginUndoGrouping"); -late final _sel_bestMatchFromAppearancesWithNames_ = objc.registerName( - "bestMatchFromAppearancesWithNames:", -); -late final _sel_bitmapImageRepForCachingDisplayInRect_ = objc.registerName( - "bitmapImageRepForCachingDisplayInRect:", -); -late final _sel_bounds = objc.registerName("bounds"); -late final _sel_boundsRotation = objc.registerName("boundsRotation"); -late final _sel_buttonMask = objc.registerName("buttonMask"); -late final _sel_buttonNumber = objc.registerName("buttonNumber"); -late final _sel_buttonToolTip = objc.registerName("buttonToolTip"); -late final _sel_cacheDisplayInRect_toBitmapImageRep_ = objc.registerName( - "cacheDisplayInRect:toBitmapImageRep:", -); -late final _sel_cacheImageInRect_ = objc.registerName("cacheImageInRect:"); -late final _sel_canBecomeKeyView = objc.registerName("canBecomeKeyView"); -late final _sel_canBecomeKeyWindow = objc.registerName("canBecomeKeyWindow"); -late final _sel_canBecomeMainWindow = objc.registerName("canBecomeMainWindow"); -late final _sel_canBecomeVisibleWithoutLogin = objc.registerName( - "canBecomeVisibleWithoutLogin", -); -late final _sel_canDraw = objc.registerName("canDraw"); -late final _sel_canDrawConcurrently = objc.registerName("canDrawConcurrently"); -late final _sel_canDrawSubviewsIntoLayer = objc.registerName( - "canDrawSubviewsIntoLayer", -); -late final _sel_canHide = objc.registerName("canHide"); -late final _sel_canReadItemWithDataConformingToTypes_ = objc.registerName( - "canReadItemWithDataConformingToTypes:", -); -late final _sel_canReadObjectForClasses_options_ = objc.registerName( - "canReadObjectForClasses:options:", -); -late final _sel_canRedo = objc.registerName("canRedo"); -late final _sel_canRepresentDisplayGamut_ = objc.registerName( - "canRepresentDisplayGamut:", -); -late final _sel_canStoreColor = objc.registerName("canStoreColor"); -late final _sel_canUndo = objc.registerName("canUndo"); -late final _sel_cancelOperation_ = objc.registerName("cancelOperation:"); -late final _sel_cancelTracking = objc.registerName("cancelTracking"); -late final _sel_cancelTrackingWithoutAnimation = objc.registerName( - "cancelTrackingWithoutAnimation", -); -late final _sel_capabilityMask = objc.registerName("capabilityMask"); -late final _sel_capitalizeWord_ = objc.registerName("capitalizeWord:"); -late final _sel_cascadeTopLeftFromPoint_ = objc.registerName( - "cascadeTopLeftFromPoint:", -); -late final _sel_cascadingReferenceFrame = objc.registerName( - "cascadingReferenceFrame", -); -late final _sel_center = objc.registerName("center"); -late final _sel_centerScanRect_ = objc.registerName("centerScanRect:"); -late final _sel_centerSelectionInVisibleArea_ = objc.registerName( - "centerSelectionInVisibleArea:", -); -late final _sel_changeCaseOfLetter_ = objc.registerName("changeCaseOfLetter:"); -late final _sel_changeCount = objc.registerName("changeCount"); -late final _sel_changeFont_ = objc.registerName("changeFont:"); -late final _sel_changeModeWithEvent_ = objc.registerName( - "changeModeWithEvent:", -); -late final _sel_changeSpelling_ = objc.registerName("changeSpelling:"); -late final _sel_characters = objc.registerName("characters"); -late final _sel_charactersByApplyingModifiers_ = objc.registerName( - "charactersByApplyingModifiers:", -); -late final _sel_charactersIgnoringModifiers = objc.registerName( - "charactersIgnoringModifiers", -); -late final _sel_checkSpelling_ = objc.registerName("checkSpelling:"); -late final _sel_childWindows = objc.registerName("childWindows"); -late final _sel_clearContents = objc.registerName("clearContents"); -late final _sel_clickCount = objc.registerName("clickCount"); -late final _sel_clipsToBounds = objc.registerName("clipsToBounds"); -late final _sel_close = objc.registerName("close"); -late final _sel_coalescedTouchesForTouch_ = objc.registerName( - "coalescedTouchesForTouch:", -); -late final _sel_collectionBehavior = objc.registerName("collectionBehavior"); -late final _sel_color = objc.registerName("color"); -late final _sel_colorPanel = objc.registerName("colorPanel"); -late final _sel_colorSpace = objc.registerName("colorSpace"); -late final _sel_complete_ = objc.registerName("complete:"); -late final _sel_compositingFilter = objc.registerName("compositingFilter"); -late final _sel_concludeDragOperation_ = objc.registerName( - "concludeDragOperation:", -); -late final _sel_confinementRectForMenu_onScreen_ = objc.registerName( - "confinementRectForMenu:onScreen:", -); -late final _sel_conformsToProtocol_ = objc.registerName("conformsToProtocol:"); -late final _sel_constrainFrameRect_toScreen_ = objc.registerName( - "constrainFrameRect:toScreen:", -); -late final _sel_contentAspectRatio = objc.registerName("contentAspectRatio"); -late final _sel_contentBorderThicknessForEdge_ = objc.registerName( - "contentBorderThicknessForEdge:", -); -late final _sel_contentFilters = objc.registerName("contentFilters"); -late final _sel_contentLayoutGuide = objc.registerName("contentLayoutGuide"); -late final _sel_contentLayoutRect = objc.registerName("contentLayoutRect"); -late final _sel_contentMaxSize = objc.registerName("contentMaxSize"); -late final _sel_contentMinSize = objc.registerName("contentMinSize"); -late final _sel_contentRectForFrameRect_ = objc.registerName( - "contentRectForFrameRect:", -); -late final _sel_contentRectForFrameRect_styleMask_ = objc.registerName( - "contentRectForFrameRect:styleMask:", -); -late final _sel_contentResizeIncrements = objc.registerName( - "contentResizeIncrements", -); -late final _sel_contentView = objc.registerName("contentView"); -late final _sel_contentViewController = objc.registerName( - "contentViewController", -); -late final _sel_context = objc.registerName("context"); -late final _sel_contextMenuKeyDown_ = objc.registerName("contextMenuKeyDown:"); -late final _sel_contextMenuRepresentation = objc.registerName( - "contextMenuRepresentation", -); -late final _sel_convertBaseToScreen_ = objc.registerName( - "convertBaseToScreen:", -); -late final _sel_convertPointFromBacking_ = objc.registerName( - "convertPointFromBacking:", -); -late final _sel_convertPointFromBase_ = objc.registerName( - "convertPointFromBase:", -); -late final _sel_convertPointFromLayer_ = objc.registerName( - "convertPointFromLayer:", -); -late final _sel_convertPointFromScreen_ = objc.registerName( - "convertPointFromScreen:", -); -late final _sel_convertPointToBacking_ = objc.registerName( - "convertPointToBacking:", -); -late final _sel_convertPointToBase_ = objc.registerName("convertPointToBase:"); -late final _sel_convertPointToLayer_ = objc.registerName( - "convertPointToLayer:", -); -late final _sel_convertPointToScreen_ = objc.registerName( - "convertPointToScreen:", -); -late final _sel_convertPoint_fromView_ = objc.registerName( - "convertPoint:fromView:", -); -late final _sel_convertPoint_toView_ = objc.registerName( - "convertPoint:toView:", -); -late final _sel_convertRectFromBacking_ = objc.registerName( - "convertRectFromBacking:", -); -late final _sel_convertRectFromBase_ = objc.registerName( - "convertRectFromBase:", -); -late final _sel_convertRectFromLayer_ = objc.registerName( - "convertRectFromLayer:", -); -late final _sel_convertRectFromScreen_ = objc.registerName( - "convertRectFromScreen:", -); -late final _sel_convertRectToBacking_ = objc.registerName( - "convertRectToBacking:", -); -late final _sel_convertRectToBase_ = objc.registerName("convertRectToBase:"); -late final _sel_convertRectToLayer_ = objc.registerName("convertRectToLayer:"); -late final _sel_convertRectToScreen_ = objc.registerName( - "convertRectToScreen:", -); -late final _sel_convertRect_fromView_ = objc.registerName( - "convertRect:fromView:", -); -late final _sel_convertRect_toView_ = objc.registerName("convertRect:toView:"); -late final _sel_convertScreenToBase_ = objc.registerName( - "convertScreenToBase:", -); -late final _sel_convertSizeFromBacking_ = objc.registerName( - "convertSizeFromBacking:", -); -late final _sel_convertSizeFromBase_ = objc.registerName( - "convertSizeFromBase:", -); -late final _sel_convertSizeFromLayer_ = objc.registerName( - "convertSizeFromLayer:", -); -late final _sel_convertSizeToBacking_ = objc.registerName( - "convertSizeToBacking:", -); -late final _sel_convertSizeToBase_ = objc.registerName("convertSizeToBase:"); -late final _sel_convertSizeToLayer_ = objc.registerName("convertSizeToLayer:"); -late final _sel_convertSize_fromView_ = objc.registerName( - "convertSize:fromView:", -); -late final _sel_convertSize_toView_ = objc.registerName("convertSize:toView:"); -late final _sel_copyFont_ = objc.registerName("copyFont:"); -late final _sel_copyRuler_ = objc.registerName("copyRuler:"); -late final _sel_copy_ = objc.registerName("copy:"); -late final _sel_currentAppearance = objc.registerName("currentAppearance"); -late final _sel_currentDrawingAppearance = objc.registerName( - "currentDrawingAppearance", -); -late final _sel_currentEvent = objc.registerName("currentEvent"); -late final _sel_cursorUpdate_ = objc.registerName("cursorUpdate:"); -late final _sel_customWindowsToEnterFullScreenForWindow_ = objc.registerName( - "customWindowsToEnterFullScreenForWindow:", -); -late final _sel_customWindowsToEnterFullScreenForWindow_onScreen_ = objc - .registerName("customWindowsToEnterFullScreenForWindow:onScreen:"); -late final _sel_customWindowsToExitFullScreenForWindow_ = objc.registerName( - "customWindowsToExitFullScreenForWindow:", -); -late final _sel_cut_ = objc.registerName("cut:"); -late final _sel_data1 = objc.registerName("data1"); -late final _sel_data2 = objc.registerName("data2"); -late final _sel_dataForType_ = objc.registerName("dataForType:"); -late final _sel_dataSource = objc.registerName("dataSource"); -late final _sel_dataWithEPSInsideRect_ = objc.registerName( - "dataWithEPSInsideRect:", -); -late final _sel_dataWithPDFInsideRect_ = objc.registerName( - "dataWithPDFInsideRect:", -); -late final _sel_declareTypes_owner_ = objc.registerName("declareTypes:owner:"); -late final _sel_deepestScreen = objc.registerName("deepestScreen"); -late final _sel_defaultAnimationForKey_ = objc.registerName( - "defaultAnimationForKey:", -); -late final _sel_defaultButtonCell = objc.registerName("defaultButtonCell"); -late final _sel_defaultDepthLimit = objc.registerName("defaultDepthLimit"); -late final _sel_defaultFocusRingType = objc.registerName( - "defaultFocusRingType", -); -late final _sel_defaultMenu = objc.registerName("defaultMenu"); -late final _sel_delegate = objc.registerName("delegate"); -late final _sel_deleteAllSavedUserActivitiesWithCompletionHandler_ = objc - .registerName("deleteAllSavedUserActivitiesWithCompletionHandler:"); -late final _sel_deleteBackwardByDecomposingPreviousCharacter_ = objc - .registerName("deleteBackwardByDecomposingPreviousCharacter:"); -late final _sel_deleteBackward_ = objc.registerName("deleteBackward:"); -late final _sel_deleteForward_ = objc.registerName("deleteForward:"); -late final _sel_deleteSavedUserActivitiesWithPersistentIdentifiers_completionHandler_ = - objc.registerName( - "deleteSavedUserActivitiesWithPersistentIdentifiers:completionHandler:", - ); -late final _sel_deleteToBeginningOfLine_ = objc.registerName( - "deleteToBeginningOfLine:", -); -late final _sel_deleteToBeginningOfParagraph_ = objc.registerName( - "deleteToBeginningOfParagraph:", -); -late final _sel_deleteToEndOfLine_ = objc.registerName("deleteToEndOfLine:"); -late final _sel_deleteToEndOfParagraph_ = objc.registerName( - "deleteToEndOfParagraph:", -); -late final _sel_deleteToMark_ = objc.registerName("deleteToMark:"); -late final _sel_deleteWordBackward_ = objc.registerName("deleteWordBackward:"); -late final _sel_deleteWordForward_ = objc.registerName("deleteWordForward:"); -late final _sel_delete_ = objc.registerName("delete:"); -late final _sel_deltaX = objc.registerName("deltaX"); -late final _sel_deltaY = objc.registerName("deltaY"); -late final _sel_deltaZ = objc.registerName("deltaZ"); -late final _sel_deminiaturize_ = objc.registerName("deminiaturize:"); -late final _sel_depthLimit = objc.registerName("depthLimit"); -late final _sel_detachColorList_ = objc.registerName("detachColorList:"); -late final _sel_detectMetadataForTypes_completionHandler_ = objc.registerName( - "detectMetadataForTypes:completionHandler:", -); -late final _sel_detectPatternsForPatterns_completionHandler_ = objc - .registerName("detectPatternsForPatterns:completionHandler:"); -late final _sel_detectValuesForPatterns_completionHandler_ = objc.registerName( - "detectValuesForPatterns:completionHandler:", -); -late final _sel_device = objc.registerName("device"); -late final _sel_deviceDescription = objc.registerName("deviceDescription"); -late final _sel_deviceID = objc.registerName("deviceID"); -late final _sel_deviceSize = objc.registerName("deviceSize"); -late final _sel_didAddSubview_ = objc.registerName("didAddSubview:"); -late final _sel_didCloseMenu_withEvent_ = objc.registerName( - "didCloseMenu:withEvent:", -); -late final _sel_disableCursorRects = objc.registerName("disableCursorRects"); -late final _sel_disableFlushWindow = objc.registerName("disableFlushWindow"); -late final _sel_disableKeyEquivalentForDefaultButtonCell = objc.registerName( - "disableKeyEquivalentForDefaultButtonCell", -); -late final _sel_disableScreenUpdatesUntilFlush = objc.registerName( - "disableScreenUpdatesUntilFlush", -); -late final _sel_disableUndoRegistration = objc.registerName( - "disableUndoRegistration", -); -late final _sel_discardCachedImage = objc.registerName("discardCachedImage"); -late final _sel_discardCursorRects = objc.registerName("discardCursorRects"); -late final _sel_discardEventsMatchingMask_beforeEvent_ = objc.registerName( - "discardEventsMatchingMask:beforeEvent:", -); -late final _sel_display = objc.registerName("display"); -late final _sel_displayIfNeeded = objc.registerName("displayIfNeeded"); -late final _sel_displayIfNeededIgnoringOpacity = objc.registerName( - "displayIfNeededIgnoringOpacity", -); -late final _sel_displayIfNeededInRectIgnoringOpacity_ = objc.registerName( - "displayIfNeededInRectIgnoringOpacity:", -); -late final _sel_displayIfNeededInRect_ = objc.registerName( - "displayIfNeededInRect:", -); -late final _sel_displayLinkWithTarget_selector_ = objc.registerName( - "displayLinkWithTarget:selector:", -); -late final _sel_displayRectIgnoringOpacity_ = objc.registerName( - "displayRectIgnoringOpacity:", -); -late final _sel_displayRectIgnoringOpacity_inContext_ = objc.registerName( - "displayRectIgnoringOpacity:inContext:", -); -late final _sel_displayRect_ = objc.registerName("displayRect:"); -late final _sel_displaysWhenScreenProfileChanges = objc.registerName( - "displaysWhenScreenProfileChanges", -); -late final _sel_doCommandBySelector_ = objc.registerName( - "doCommandBySelector:", -); -late final _sel_dockTile = objc.registerName("dockTile"); -late final _sel_doubleClickInterval = objc.registerName("doubleClickInterval"); -late final _sel_dragColor_withEvent_fromView_ = objc.registerName( - "dragColor:withEvent:fromView:", -); -late final _sel_dragFile_fromRect_slideBack_event_ = objc.registerName( - "dragFile:fromRect:slideBack:event:", -); -late final _sel_dragImage_at_offset_event_pasteboard_source_slideBack_ = objc - .registerName("dragImage:at:offset:event:pasteboard:source:slideBack:"); -late final _sel_dragPromisedFilesOfTypes_fromRect_source_slideBack_event_ = objc - .registerName("dragPromisedFilesOfTypes:fromRect:source:slideBack:event:"); -late final _sel_draggedImage = objc.registerName("draggedImage"); -late final _sel_draggedImageLocation = objc.registerName( - "draggedImageLocation", -); -late final _sel_draggingDestinationWindow = objc.registerName( - "draggingDestinationWindow", -); -late final _sel_draggingEnded_ = objc.registerName("draggingEnded:"); -late final _sel_draggingEntered_ = objc.registerName("draggingEntered:"); -late final _sel_draggingExited_ = objc.registerName("draggingExited:"); -late final _sel_draggingFormation = objc.registerName("draggingFormation"); -late final _sel_draggingLocation = objc.registerName("draggingLocation"); -late final _sel_draggingPasteboard = objc.registerName("draggingPasteboard"); -late final _sel_draggingSequenceNumber = objc.registerName( - "draggingSequenceNumber", -); -late final _sel_draggingSession_endedAtPoint_operation_ = objc.registerName( - "draggingSession:endedAtPoint:operation:", -); -late final _sel_draggingSession_movedToPoint_ = objc.registerName( - "draggingSession:movedToPoint:", -); -late final _sel_draggingSession_sourceOperationMaskForDraggingContext_ = objc - .registerName("draggingSession:sourceOperationMaskForDraggingContext:"); -late final _sel_draggingSession_willBeginAtPoint_ = objc.registerName( - "draggingSession:willBeginAtPoint:", -); -late final _sel_draggingSource = objc.registerName("draggingSource"); -late final _sel_draggingSourceOperationMask = objc.registerName( - "draggingSourceOperationMask", -); -late final _sel_draggingUpdated_ = objc.registerName("draggingUpdated:"); -late final _sel_drawFocusRingMask = objc.registerName("drawFocusRingMask"); -late final _sel_drawPageBorderWithSize_ = objc.registerName( - "drawPageBorderWithSize:", -); -late final _sel_drawRect_ = objc.registerName("drawRect:"); -late final _sel_drawSheetBorderWithSize_ = objc.registerName( - "drawSheetBorderWithSize:", -); -late final _sel_drawsBackground = objc.registerName("drawsBackground"); -late final _sel_effectiveAppearance = objc.registerName("effectiveAppearance"); -late final _sel_enableCursorRects = objc.registerName("enableCursorRects"); -late final _sel_enableFlushWindow = objc.registerName("enableFlushWindow"); -late final _sel_enableKeyEquivalentForDefaultButtonCell = objc.registerName( - "enableKeyEquivalentForDefaultButtonCell", -); -late final _sel_enableUndoRegistration = objc.registerName( - "enableUndoRegistration", -); -late final _sel_enclosingMenuItem = objc.registerName("enclosingMenuItem"); -late final _sel_enclosingScrollView = objc.registerName("enclosingScrollView"); -late final _sel_encodeWithCoder_ = objc.registerName("encodeWithCoder:"); -late final _sel_endDocument = objc.registerName("endDocument"); -late final _sel_endEditingFor_ = objc.registerName("endEditingFor:"); -late final _sel_endGestureWithEvent_ = objc.registerName( - "endGestureWithEvent:", -); -late final _sel_endPage = objc.registerName("endPage"); -late final _sel_endSheet_ = objc.registerName("endSheet:"); -late final _sel_endSheet_returnCode_ = objc.registerName( - "endSheet:returnCode:", -); -late final _sel_endUndoGrouping = objc.registerName("endUndoGrouping"); -late final _sel_enterExitEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_trackingNumber_userData_ = - objc.registerName( - "enterExitEventWithType:location:modifierFlags:timestamp:windowNumber:context:eventNumber:trackingNumber:userData:", - ); -late final _sel_enterFullScreenMode_withOptions_ = objc.registerName( - "enterFullScreenMode:withOptions:", -); -late final _sel_enumerateDraggingItemsWithOptions_forView_classes_searchOptions_usingBlock_ = - objc.registerName( - "enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:", - ); -late final _sel_eventNumber = objc.registerName("eventNumber"); -late final _sel_eventRef = objc.registerName("eventRef"); -late final _sel_eventWithCGEvent_ = objc.registerName("eventWithCGEvent:"); -late final _sel_eventWithEventRef_ = objc.registerName("eventWithEventRef:"); -late final _sel_exitFullScreenModeWithOptions_ = objc.registerName( - "exitFullScreenModeWithOptions:", -); -late final _sel_expirationDate = objc.registerName("expirationDate"); -late final _sel_fieldEditor_forObject_ = objc.registerName( - "fieldEditor:forObject:", -); -late final _sel_fileAttributes = objc.registerName("fileAttributes"); -late final _sel_fileWrappers = objc.registerName("fileWrappers"); -late final _sel_filename = objc.registerName("filename"); -late final _sel_firstResponder = objc.registerName("firstResponder"); -late final _sel_flagsChanged_ = objc.registerName("flagsChanged:"); -late final _sel_flushBufferedKeyEvents = objc.registerName( - "flushBufferedKeyEvents", -); -late final _sel_flushWindow = objc.registerName("flushWindow"); -late final _sel_flushWindowIfNeeded = objc.registerName("flushWindowIfNeeded"); -late final _sel_focusRingMaskBounds = objc.registerName("focusRingMaskBounds"); -late final _sel_focusRingType = objc.registerName("focusRingType"); -late final _sel_focusView = objc.registerName("focusView"); -late final _sel_font = objc.registerName("font"); -late final _sel_frame = objc.registerName("frame"); -late final _sel_frameAutosaveName = objc.registerName("frameAutosaveName"); -late final _sel_frameCenterRotation = objc.registerName("frameCenterRotation"); -late final _sel_frameRectForContentRect_ = objc.registerName( - "frameRectForContentRect:", -); -late final _sel_frameRectForContentRect_styleMask_ = objc.registerName( - "frameRectForContentRect:styleMask:", -); -late final _sel_frameRotation = objc.registerName("frameRotation"); -late final _sel_gState = objc.registerName("gState"); -late final _sel_generalPasteboard = objc.registerName("generalPasteboard"); -late final _sel_gestureRecognizers = objc.registerName("gestureRecognizers"); -late final _sel_getContinuationStreamsWithCompletionHandler_ = objc - .registerName("getContinuationStreamsWithCompletionHandler:"); -late final _sel_getRectsBeingDrawn_count_ = objc.registerName( - "getRectsBeingDrawn:count:", -); -late final _sel_getRectsExposedDuringLiveResize_count_ = objc.registerName( - "getRectsExposedDuringLiveResize:count:", -); -late final _sel_graphicsContext = objc.registerName("graphicsContext"); -late final _sel_groupingLevel = objc.registerName("groupingLevel"); -late final _sel_groupsByEvent = objc.registerName("groupsByEvent"); -late final _sel_hasActiveWindowSharingSession = objc.registerName( - "hasActiveWindowSharingSession", -); -late final _sel_hasDynamicDepthLimit = objc.registerName( - "hasDynamicDepthLimit", -); -late final _sel_hasPreciseScrollingDeltas = objc.registerName( - "hasPreciseScrollingDeltas", -); -late final _sel_hasShadow = objc.registerName("hasShadow"); -late final _sel_hasSubmenu = objc.registerName("hasSubmenu"); -late final _sel_heightAdjustLimit = objc.registerName("heightAdjustLimit"); -late final _sel_helpRequested_ = objc.registerName("helpRequested:"); -late final _sel_hidesOnDeactivate = objc.registerName("hidesOnDeactivate"); -late final _sel_highlightedItem = objc.registerName("highlightedItem"); -late final _sel_hitTest_ = objc.registerName("hitTest:"); -late final _sel_identifier = objc.registerName("identifier"); -late final _sel_identity = objc.registerName("identity"); -late final _sel_ignoreModifierKeysForDraggingSession_ = objc.registerName( - "ignoreModifierKeysForDraggingSession:", -); -late final _sel_ignoreSpelling_ = objc.registerName("ignoreSpelling:"); -late final _sel_ignoresMouseEvents = objc.registerName("ignoresMouseEvents"); -late final _sel_image = objc.registerName("image"); -late final _sel_importsGraphics = objc.registerName("importsGraphics"); -late final _sel_inLiveResize = objc.registerName("inLiveResize"); -late final _sel_indent_ = objc.registerName("indent:"); -late final _sel_indentationLevel = objc.registerName("indentationLevel"); -late final _sel_indexOfItemWithRepresentedObject_ = objc.registerName( - "indexOfItemWithRepresentedObject:", -); -late final _sel_indexOfItemWithSubmenu_ = objc.registerName( - "indexOfItemWithSubmenu:", -); -late final _sel_indexOfItemWithTag_ = objc.registerName("indexOfItemWithTag:"); -late final _sel_indexOfItemWithTarget_andAction_ = objc.registerName( - "indexOfItemWithTarget:andAction:", -); -late final _sel_indexOfItemWithTitle_ = objc.registerName( - "indexOfItemWithTitle:", -); -late final _sel_indexOfItem_ = objc.registerName("indexOfItem:"); -late final _sel_indexOfPasteboardItem_ = objc.registerName( - "indexOfPasteboardItem:", -); -late final _sel_init = objc.registerName("init"); -late final _sel_initDirectoryWithFileWrappers_ = objc.registerName( - "initDirectoryWithFileWrappers:", -); -late final _sel_initRegularFileWithContents_ = objc.registerName( - "initRegularFileWithContents:", -); -late final _sel_initSymbolicLinkWithDestinationURL_ = objc.registerName( - "initSymbolicLinkWithDestinationURL:", -); -late final _sel_initSymbolicLinkWithDestination_ = objc.registerName( - "initSymbolicLinkWithDestination:", -); -late final _sel_initWithActivityType_ = objc.registerName( - "initWithActivityType:", -); -late final _sel_initWithAppearanceNamed_bundle_ = objc.registerName( - "initWithAppearanceNamed:bundle:", -); -late final _sel_initWithCoder_ = objc.registerName("initWithCoder:"); -late final _sel_initWithContentRect_styleMask_backing_defer_ = objc - .registerName("initWithContentRect:styleMask:backing:defer:"); -late final _sel_initWithContentRect_styleMask_backing_defer_screen_ = objc - .registerName("initWithContentRect:styleMask:backing:defer:screen:"); -late final _sel_initWithFrame_ = objc.registerName("initWithFrame:"); -late final _sel_initWithMarkerFormat_options_ = objc.registerName( - "initWithMarkerFormat:options:", -); -late final _sel_initWithMarkerFormat_options_startingItemNumber_ = objc - .registerName("initWithMarkerFormat:options:startingItemNumber:"); -late final _sel_initWithPath_ = objc.registerName("initWithPath:"); -late final _sel_initWithPickerMask_colorPanel_ = objc.registerName( - "initWithPickerMask:colorPanel:", -); -late final _sel_initWithSerializedRepresentation_ = objc.registerName( - "initWithSerializedRepresentation:", -); -late final _sel_initWithTitle_ = objc.registerName("initWithTitle:"); -late final _sel_initWithTitle_action_keyEquivalent_ = objc.registerName( - "initWithTitle:action:keyEquivalent:", -); -late final _sel_initWithURL_options_error_ = objc.registerName( - "initWithURL:options:error:", -); -late final _sel_initWithWindowRef_ = objc.registerName("initWithWindowRef:"); -late final _sel_initialFirstResponder = objc.registerName( - "initialFirstResponder", -); -late final _sel_inputContext = objc.registerName("inputContext"); -late final _sel_insertBacktab_ = objc.registerName("insertBacktab:"); -late final _sel_insertContainerBreak_ = objc.registerName( - "insertContainerBreak:", -); -late final _sel_insertDoubleQuoteIgnoringSubstitution_ = objc.registerName( - "insertDoubleQuoteIgnoringSubstitution:", -); -late final _sel_insertItemWithTitle_action_keyEquivalent_atIndex_ = objc - .registerName("insertItemWithTitle:action:keyEquivalent:atIndex:"); -late final _sel_insertItem_atIndex_ = objc.registerName("insertItem:atIndex:"); -late final _sel_insertLineBreak_ = objc.registerName("insertLineBreak:"); -late final _sel_insertNewButtonImage_in_ = objc.registerName( - "insertNewButtonImage:in:", -); -late final _sel_insertNewlineIgnoringFieldEditor_ = objc.registerName( - "insertNewlineIgnoringFieldEditor:", -); -late final _sel_insertNewline_ = objc.registerName("insertNewline:"); -late final _sel_insertParagraphSeparator_ = objc.registerName( - "insertParagraphSeparator:", -); -late final _sel_insertSingleQuoteIgnoringSubstitution_ = objc.registerName( - "insertSingleQuoteIgnoringSubstitution:", -); -late final _sel_insertTabIgnoringFieldEditor_ = objc.registerName( - "insertTabIgnoringFieldEditor:", -); -late final _sel_insertTab_ = objc.registerName("insertTab:"); -late final _sel_insertText_ = objc.registerName("insertText:"); -late final _sel_insertTitlebarAccessoryViewController_atIndex_ = objc - .registerName("insertTitlebarAccessoryViewController:atIndex:"); -late final _sel_interpretKeyEvents_ = objc.registerName("interpretKeyEvents:"); -late final _sel_invalidate = objc.registerName("invalidate"); -late final _sel_invalidateCursorRectsForView_ = objc.registerName( - "invalidateCursorRectsForView:", -); -late final _sel_invalidateShadow = objc.registerName("invalidateShadow"); -late final _sel_isARepeat = objc.registerName("isARepeat"); -late final _sel_isAccessibilityAlternateUIVisible = objc.registerName( - "isAccessibilityAlternateUIVisible", -); -late final _sel_isAccessibilityDisclosed = objc.registerName( - "isAccessibilityDisclosed", -); -late final _sel_isAccessibilityEdited = objc.registerName( - "isAccessibilityEdited", -); -late final _sel_isAccessibilityElement = objc.registerName( - "isAccessibilityElement", -); -late final _sel_isAccessibilityEnabled = objc.registerName( - "isAccessibilityEnabled", -); -late final _sel_isAccessibilityExpanded = objc.registerName( - "isAccessibilityExpanded", -); -late final _sel_isAccessibilityFocused = objc.registerName( - "isAccessibilityFocused", -); -late final _sel_isAccessibilityFrontmost = objc.registerName( - "isAccessibilityFrontmost", -); -late final _sel_isAccessibilityHidden = objc.registerName( - "isAccessibilityHidden", -); -late final _sel_isAccessibilityMain = objc.registerName("isAccessibilityMain"); -late final _sel_isAccessibilityMinimized = objc.registerName( - "isAccessibilityMinimized", -); -late final _sel_isAccessibilityModal = objc.registerName( - "isAccessibilityModal", -); -late final _sel_isAccessibilityOrderedByRow = objc.registerName( - "isAccessibilityOrderedByRow", -); -late final _sel_isAccessibilityProtectedContent = objc.registerName( - "isAccessibilityProtectedContent", -); -late final _sel_isAccessibilityRequired = objc.registerName( - "isAccessibilityRequired", -); -late final _sel_isAccessibilitySelected = objc.registerName( - "isAccessibilitySelected", -); -late final _sel_isAccessibilitySelectorAllowed_ = objc.registerName( - "isAccessibilitySelectorAllowed:", -); -late final _sel_isAlternate = objc.registerName("isAlternate"); -late final _sel_isAttached = objc.registerName("isAttached"); -late final _sel_isAutodisplay = objc.registerName("isAutodisplay"); -late final _sel_isCompatibleWithResponsiveScrolling = objc.registerName( - "isCompatibleWithResponsiveScrolling", -); -late final _sel_isContinuous = objc.registerName("isContinuous"); -late final _sel_isDescendantOf_ = objc.registerName("isDescendantOf:"); -late final _sel_isDirectionInvertedFromDevice = objc.registerName( - "isDirectionInvertedFromDevice", -); -late final _sel_isDirectory = objc.registerName("isDirectory"); -late final _sel_isDocumentEdited = objc.registerName("isDocumentEdited"); -late final _sel_isDrawingFindIndicator = objc.registerName( - "isDrawingFindIndicator", -); -late final _sel_isEditable = objc.registerName("isEditable"); -late final _sel_isEligibleForHandoff = objc.registerName( - "isEligibleForHandoff", -); -late final _sel_isEligibleForPrediction = objc.registerName( - "isEligibleForPrediction", -); -late final _sel_isEligibleForPublicIndexing = objc.registerName( - "isEligibleForPublicIndexing", -); -late final _sel_isEligibleForSearch = objc.registerName("isEligibleForSearch"); -late final _sel_isEnabled = objc.registerName("isEnabled"); -late final _sel_isEnteringProximity = objc.registerName("isEnteringProximity"); -late final _sel_isExcludedFromWindowsMenu = objc.registerName( - "isExcludedFromWindowsMenu", -); -late final _sel_isFieldEditor = objc.registerName("isFieldEditor"); -late final _sel_isFlipped = objc.registerName("isFlipped"); -late final _sel_isFloatingPanel = objc.registerName("isFloatingPanel"); -late final _sel_isFlushWindowDisabled = objc.registerName( - "isFlushWindowDisabled", -); -late final _sel_isHidden = objc.registerName("isHidden"); -late final _sel_isHiddenOrHasHiddenAncestor = objc.registerName( - "isHiddenOrHasHiddenAncestor", -); -late final _sel_isHighlighted = objc.registerName("isHighlighted"); -late final _sel_isHorizontallyResizable = objc.registerName( - "isHorizontallyResizable", -); -late final _sel_isInFullScreenMode = objc.registerName("isInFullScreenMode"); -late final _sel_isKeyWindow = objc.registerName("isKeyWindow"); -late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); -late final _sel_isMainWindow = objc.registerName("isMainWindow"); -late final _sel_isMiniaturized = objc.registerName("isMiniaturized"); -late final _sel_isMouseCoalescingEnabled = objc.registerName( - "isMouseCoalescingEnabled", -); -late final _sel_isMovable = objc.registerName("isMovable"); -late final _sel_isMovableByWindowBackground = objc.registerName( - "isMovableByWindowBackground", -); -late final _sel_isOnActiveSpace = objc.registerName("isOnActiveSpace"); -late final _sel_isOneShot = objc.registerName("isOneShot"); -late final _sel_isOpaque = objc.registerName("isOpaque"); -late final _sel_isOrdered = objc.registerName("isOrdered"); -late final _sel_isRedoing = objc.registerName("isRedoing"); -late final _sel_isRegularFile = objc.registerName("isRegularFile"); -late final _sel_isReleasedWhenClosed = objc.registerName( - "isReleasedWhenClosed", -); -late final _sel_isResting = objc.registerName("isResting"); -late final _sel_isRichText = objc.registerName("isRichText"); -late final _sel_isRotatedFromBase = objc.registerName("isRotatedFromBase"); -late final _sel_isRotatedOrScaledFromBase = objc.registerName( - "isRotatedOrScaledFromBase", -); -late final _sel_isRulerVisible = objc.registerName("isRulerVisible"); -late final _sel_isSectionHeader = objc.registerName("isSectionHeader"); -late final _sel_isSelectable = objc.registerName("isSelectable"); -late final _sel_isSeparatorItem = objc.registerName("isSeparatorItem"); -late final _sel_isSheet = objc.registerName("isSheet"); -late final _sel_isSwipeTrackingFromScrollEventsEnabled = objc.registerName( - "isSwipeTrackingFromScrollEventsEnabled", -); -late final _sel_isSymbolicLink = objc.registerName("isSymbolicLink"); -late final _sel_isTornOff = objc.registerName("isTornOff"); -late final _sel_isUndoRegistrationEnabled = objc.registerName( - "isUndoRegistrationEnabled", -); -late final _sel_isUndoing = objc.registerName("isUndoing"); -late final _sel_isVerticallyResizable = objc.registerName( - "isVerticallyResizable", -); -late final _sel_isVisible = objc.registerName("isVisible"); -late final _sel_isZoomed = objc.registerName("isZoomed"); -late final _sel_itemArray = objc.registerName("itemArray"); -late final _sel_itemAtIndex_ = objc.registerName("itemAtIndex:"); -late final _sel_itemChanged_ = objc.registerName("itemChanged:"); -late final _sel_itemWithTag_ = objc.registerName("itemWithTag:"); -late final _sel_itemWithTitle_ = objc.registerName("itemWithTitle:"); -late final _sel_keyCode = objc.registerName("keyCode"); -late final _sel_keyDown_ = objc.registerName("keyDown:"); -late final _sel_keyEquivalent = objc.registerName("keyEquivalent"); -late final _sel_keyEquivalentModifierMask = objc.registerName( - "keyEquivalentModifierMask", -); -late final _sel_keyEventWithType_location_modifierFlags_timestamp_windowNumber_context_characters_charactersIgnoringModifiers_isARepeat_keyCode_ = - objc.registerName( - "keyEventWithType:location:modifierFlags:timestamp:windowNumber:context:characters:charactersIgnoringModifiers:isARepeat:keyCode:", - ); -late final _sel_keyForFileWrapper_ = objc.registerName("keyForFileWrapper:"); -late final _sel_keyRepeatDelay = objc.registerName("keyRepeatDelay"); -late final _sel_keyRepeatInterval = objc.registerName("keyRepeatInterval"); -late final _sel_keyUp_ = objc.registerName("keyUp:"); -late final _sel_keyViewSelectionDirection = objc.registerName( - "keyViewSelectionDirection", -); -late final _sel_keywords = objc.registerName("keywords"); -late final _sel_knowsPageRange_ = objc.registerName("knowsPageRange:"); -late final _sel_layer = objc.registerName("layer"); -late final _sel_layerContentsPlacement = objc.registerName( - "layerContentsPlacement", -); -late final _sel_layerContentsRedrawPolicy = objc.registerName( - "layerContentsRedrawPolicy", -); -late final _sel_layerUsesCoreImageFilters = objc.registerName( - "layerUsesCoreImageFilters", -); -late final _sel_layout = objc.registerName("layout"); -late final _sel_layoutMarginsGuide = objc.registerName("layoutMarginsGuide"); -late final _sel_layoutSubtreeIfNeeded = objc.registerName( - "layoutSubtreeIfNeeded", -); -late final _sel_level = objc.registerName("level"); -late final _sel_levelsOfUndo = objc.registerName("levelsOfUndo"); -late final _sel_listOptions = objc.registerName("listOptions"); -late final _sel_locationForSubmenu_ = objc.registerName("locationForSubmenu:"); -late final _sel_locationInView_ = objc.registerName("locationInView:"); -late final _sel_locationInWindow = objc.registerName("locationInWindow"); -late final _sel_locationOfPrintRect_ = objc.registerName( - "locationOfPrintRect:", -); -late final _sel_lockFocus = objc.registerName("lockFocus"); -late final _sel_lockFocusIfCanDraw = objc.registerName("lockFocusIfCanDraw"); -late final _sel_lockFocusIfCanDrawInContext_ = objc.registerName( - "lockFocusIfCanDrawInContext:", -); -late final _sel_lowercaseWord_ = objc.registerName("lowercaseWord:"); -late final _sel_magnification = objc.registerName("magnification"); -late final _sel_magnifyWithEvent_ = objc.registerName("magnifyWithEvent:"); -late final _sel_makeBackingLayer = objc.registerName("makeBackingLayer"); -late final _sel_makeBaseWritingDirectionLeftToRight_ = objc.registerName( - "makeBaseWritingDirectionLeftToRight:", -); -late final _sel_makeBaseWritingDirectionNatural_ = objc.registerName( - "makeBaseWritingDirectionNatural:", -); -late final _sel_makeBaseWritingDirectionRightToLeft_ = objc.registerName( - "makeBaseWritingDirectionRightToLeft:", -); -late final _sel_makeFirstResponder_ = objc.registerName("makeFirstResponder:"); -late final _sel_makeKeyAndOrderFront_ = objc.registerName( - "makeKeyAndOrderFront:", -); -late final _sel_makeKeyWindow = objc.registerName("makeKeyWindow"); -late final _sel_makeMainWindow = objc.registerName("makeMainWindow"); -late final _sel_makeTextWritingDirectionLeftToRight_ = objc.registerName( - "makeTextWritingDirectionLeftToRight:", -); -late final _sel_makeTextWritingDirectionNatural_ = objc.registerName( - "makeTextWritingDirectionNatural:", -); -late final _sel_makeTextWritingDirectionRightToLeft_ = objc.registerName( - "makeTextWritingDirectionRightToLeft:", -); -late final _sel_markerForItemNumber_ = objc.registerName( - "markerForItemNumber:", -); -late final _sel_markerFormat = objc.registerName("markerFormat"); -late final _sel_matchesContentsOfURL_ = objc.registerName( - "matchesContentsOfURL:", -); -late final _sel_maxFullScreenContentSize = objc.registerName( - "maxFullScreenContentSize", -); -late final _sel_maxSize = objc.registerName("maxSize"); -late final _sel_maximumLinearExposure = objc.registerName( - "maximumLinearExposure", -); -late final _sel_menu = objc.registerName("menu"); -late final _sel_menuBarHeight = objc.registerName("menuBarHeight"); -late final _sel_menuBarVisible = objc.registerName("menuBarVisible"); -late final _sel_menuChangedMessagesEnabled = objc.registerName( - "menuChangedMessagesEnabled", -); -late final _sel_menuChanged_ = objc.registerName("menuChanged:"); -late final _sel_menuDidClose_ = objc.registerName("menuDidClose:"); -late final _sel_menuForEvent_ = objc.registerName("menuForEvent:"); -late final _sel_menuHasKeyEquivalent_forEvent_target_action_ = objc - .registerName("menuHasKeyEquivalent:forEvent:target:action:"); -late final _sel_menuNeedsUpdate_ = objc.registerName("menuNeedsUpdate:"); -late final _sel_menuRepresentation = objc.registerName("menuRepresentation"); -late final _sel_menuWillOpen_ = objc.registerName("menuWillOpen:"); -late final _sel_menuZone = objc.registerName("menuZone"); -late final _sel_menu_updateItem_atIndex_shouldCancel_ = objc.registerName( - "menu:updateItem:atIndex:shouldCancel:", -); -late final _sel_menu_willHighlightItem_ = objc.registerName( - "menu:willHighlightItem:", -); -late final _sel_mergeAllWindows_ = objc.registerName("mergeAllWindows:"); -late final _sel_minContentSize = objc.registerName("minContentSize"); -late final _sel_minFrameWidthWithTitle_styleMask_ = objc.registerName( - "minFrameWidthWithTitle:styleMask:", -); -late final _sel_minFullScreenContentSize = objc.registerName( - "minFullScreenContentSize", -); -late final _sel_minSize = objc.registerName("minSize"); -late final _sel_miniaturize_ = objc.registerName("miniaturize:"); -late final _sel_minimumWidth = objc.registerName("minimumWidth"); -late final _sel_miniwindowImage = objc.registerName("miniwindowImage"); -late final _sel_miniwindowTitle = objc.registerName("miniwindowTitle"); -late final _sel_mixedStateImage = objc.registerName("mixedStateImage"); -late final _sel_mnemonic = objc.registerName("mnemonic"); -late final _sel_mnemonicLocation = objc.registerName("mnemonicLocation"); -late final _sel_mode = objc.registerName("mode"); -late final _sel_modifierFlags = objc.registerName("modifierFlags"); -late final _sel_momentumPhase = objc.registerName("momentumPhase"); -late final _sel_mouseCancelled_ = objc.registerName("mouseCancelled:"); -late final _sel_mouseDownCanMoveWindow = objc.registerName( - "mouseDownCanMoveWindow", -); -late final _sel_mouseDown_ = objc.registerName("mouseDown:"); -late final _sel_mouseDragged_ = objc.registerName("mouseDragged:"); -late final _sel_mouseEntered_ = objc.registerName("mouseEntered:"); -late final _sel_mouseEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_clickCount_pressure_ = - objc.registerName( - "mouseEventWithType:location:modifierFlags:timestamp:windowNumber:context:eventNumber:clickCount:pressure:", - ); -late final _sel_mouseExited_ = objc.registerName("mouseExited:"); -late final _sel_mouseLocation = objc.registerName("mouseLocation"); -late final _sel_mouseLocationOutsideOfEventStream = objc.registerName( - "mouseLocationOutsideOfEventStream", -); -late final _sel_mouseMoved_ = objc.registerName("mouseMoved:"); -late final _sel_mouseUp_ = objc.registerName("mouseUp:"); -late final _sel_mouse_inRect_ = objc.registerName("mouse:inRect:"); -late final _sel_moveBackwardAndModifySelection_ = objc.registerName( - "moveBackwardAndModifySelection:", -); -late final _sel_moveBackward_ = objc.registerName("moveBackward:"); -late final _sel_moveDownAndModifySelection_ = objc.registerName( - "moveDownAndModifySelection:", -); -late final _sel_moveDown_ = objc.registerName("moveDown:"); -late final _sel_moveForwardAndModifySelection_ = objc.registerName( - "moveForwardAndModifySelection:", -); -late final _sel_moveForward_ = objc.registerName("moveForward:"); -late final _sel_moveLeftAndModifySelection_ = objc.registerName( - "moveLeftAndModifySelection:", -); -late final _sel_moveLeft_ = objc.registerName("moveLeft:"); -late final _sel_moveParagraphBackwardAndModifySelection_ = objc.registerName( - "moveParagraphBackwardAndModifySelection:", -); -late final _sel_moveParagraphForwardAndModifySelection_ = objc.registerName( - "moveParagraphForwardAndModifySelection:", -); -late final _sel_moveRightAndModifySelection_ = objc.registerName( - "moveRightAndModifySelection:", -); -late final _sel_moveRight_ = objc.registerName("moveRight:"); -late final _sel_moveTabToNewWindow_ = objc.registerName("moveTabToNewWindow:"); -late final _sel_moveToBeginningOfDocumentAndModifySelection_ = objc - .registerName("moveToBeginningOfDocumentAndModifySelection:"); -late final _sel_moveToBeginningOfDocument_ = objc.registerName( - "moveToBeginningOfDocument:", -); -late final _sel_moveToBeginningOfLineAndModifySelection_ = objc.registerName( - "moveToBeginningOfLineAndModifySelection:", -); -late final _sel_moveToBeginningOfLine_ = objc.registerName( - "moveToBeginningOfLine:", -); -late final _sel_moveToBeginningOfParagraphAndModifySelection_ = objc - .registerName("moveToBeginningOfParagraphAndModifySelection:"); -late final _sel_moveToBeginningOfParagraph_ = objc.registerName( - "moveToBeginningOfParagraph:", -); -late final _sel_moveToEndOfDocumentAndModifySelection_ = objc.registerName( - "moveToEndOfDocumentAndModifySelection:", -); -late final _sel_moveToEndOfDocument_ = objc.registerName( - "moveToEndOfDocument:", -); -late final _sel_moveToEndOfLineAndModifySelection_ = objc.registerName( - "moveToEndOfLineAndModifySelection:", -); -late final _sel_moveToEndOfLine_ = objc.registerName("moveToEndOfLine:"); -late final _sel_moveToEndOfParagraphAndModifySelection_ = objc.registerName( - "moveToEndOfParagraphAndModifySelection:", -); -late final _sel_moveToEndOfParagraph_ = objc.registerName( - "moveToEndOfParagraph:", -); -late final _sel_moveToLeftEndOfLineAndModifySelection_ = objc.registerName( - "moveToLeftEndOfLineAndModifySelection:", -); -late final _sel_moveToLeftEndOfLine_ = objc.registerName( - "moveToLeftEndOfLine:", -); -late final _sel_moveToRightEndOfLineAndModifySelection_ = objc.registerName( - "moveToRightEndOfLineAndModifySelection:", -); -late final _sel_moveToRightEndOfLine_ = objc.registerName( - "moveToRightEndOfLine:", -); -late final _sel_moveUpAndModifySelection_ = objc.registerName( - "moveUpAndModifySelection:", -); -late final _sel_moveUp_ = objc.registerName("moveUp:"); -late final _sel_moveWordBackwardAndModifySelection_ = objc.registerName( - "moveWordBackwardAndModifySelection:", -); -late final _sel_moveWordBackward_ = objc.registerName("moveWordBackward:"); -late final _sel_moveWordForwardAndModifySelection_ = objc.registerName( - "moveWordForwardAndModifySelection:", -); -late final _sel_moveWordForward_ = objc.registerName("moveWordForward:"); -late final _sel_moveWordLeftAndModifySelection_ = objc.registerName( - "moveWordLeftAndModifySelection:", -); -late final _sel_moveWordLeft_ = objc.registerName("moveWordLeft:"); -late final _sel_moveWordRightAndModifySelection_ = objc.registerName( - "moveWordRightAndModifySelection:", -); -late final _sel_moveWordRight_ = objc.registerName("moveWordRight:"); -late final _sel_name = objc.registerName("name"); -late final _sel_namesOfPromisedFilesDroppedAtDestination_ = objc.registerName( - "namesOfPromisedFilesDroppedAtDestination:", -); -late final _sel_needsDisplay = objc.registerName("needsDisplay"); -late final _sel_needsLayout = objc.registerName("needsLayout"); -late final _sel_needsPanelToBecomeKey = objc.registerName( - "needsPanelToBecomeKey", -); -late final _sel_needsSave = objc.registerName("needsSave"); -late final _sel_needsToBeUpdatedFromPath_ = objc.registerName( - "needsToBeUpdatedFromPath:", -); -late final _sel_needsToDrawRect_ = objc.registerName("needsToDrawRect:"); -late final _sel_new = objc.registerName("new"); -late final _sel_newWindowForTab_ = objc.registerName("newWindowForTab:"); -late final _sel_nextEventMatchingMask_ = objc.registerName( - "nextEventMatchingMask:", -); -late final _sel_nextEventMatchingMask_untilDate_inMode_dequeue_ = objc - .registerName("nextEventMatchingMask:untilDate:inMode:dequeue:"); -late final _sel_nextKeyView = objc.registerName("nextKeyView"); -late final _sel_nextResponder = objc.registerName("nextResponder"); -late final _sel_nextValidKeyView = objc.registerName("nextValidKeyView"); -late final _sel_noResponderFor_ = objc.registerName("noResponderFor:"); -late final _sel_normalizedPosition = objc.registerName("normalizedPosition"); -late final _sel_noteFocusRingMaskChanged = objc.registerName( - "noteFocusRingMaskChanged", -); -late final _sel_numberOfComponents = objc.registerName("numberOfComponents"); -late final _sel_numberOfComponentsInPickerView_ = objc.registerName( - "numberOfComponentsInPickerView:", -); -late final _sel_numberOfItems = objc.registerName("numberOfItems"); -late final _sel_numberOfItemsInMenu_ = objc.registerName( - "numberOfItemsInMenu:", -); -late final _sel_numberOfRowsInComponent_ = objc.registerName( - "numberOfRowsInComponent:", -); -late final _sel_numberOfValidItemsForDrop = objc.registerName( - "numberOfValidItemsForDrop", -); -late final _sel_occlusionState = objc.registerName("occlusionState"); -late final _sel_offStateImage = objc.registerName("offStateImage"); -late final _sel_onStateImage = objc.registerName("onStateImage"); -late final _sel_opaqueAncestor = objc.registerName("opaqueAncestor"); -late final _sel_orderBack_ = objc.registerName("orderBack:"); -late final _sel_orderFrontRegardless = objc.registerName( - "orderFrontRegardless", -); -late final _sel_orderFront_ = objc.registerName("orderFront:"); -late final _sel_orderOut_ = objc.registerName("orderOut:"); -late final _sel_orderWindow_relativeTo_ = objc.registerName( - "orderWindow:relativeTo:", -); -late final _sel_otherEventWithType_location_modifierFlags_timestamp_windowNumber_context_subtype_data1_data2_ = - objc.registerName( - "otherEventWithType:location:modifierFlags:timestamp:windowNumber:context:subtype:data1:data2:", - ); -late final _sel_otherMouseDown_ = objc.registerName("otherMouseDown:"); -late final _sel_otherMouseDragged_ = objc.registerName("otherMouseDragged:"); -late final _sel_otherMouseUp_ = objc.registerName("otherMouseUp:"); -late final _sel_pageDownAndModifySelection_ = objc.registerName( - "pageDownAndModifySelection:", -); -late final _sel_pageDown_ = objc.registerName("pageDown:"); -late final _sel_pageFooter = objc.registerName("pageFooter"); -late final _sel_pageHeader = objc.registerName("pageHeader"); -late final _sel_pageUpAndModifySelection_ = objc.registerName( - "pageUpAndModifySelection:", -); -late final _sel_pageUp_ = objc.registerName("pageUp:"); -late final _sel_paletteMenuWithColors_titles_selectionHandler_ = objc - .registerName("paletteMenuWithColors:titles:selectionHandler:"); -late final _sel_paletteMenuWithColors_titles_templateImage_selectionHandler_ = - objc.registerName( - "paletteMenuWithColors:titles:templateImage:selectionHandler:", - ); -late final _sel_parentItem = objc.registerName("parentItem"); -late final _sel_parentWindow = objc.registerName("parentWindow"); -late final _sel_pasteFont_ = objc.registerName("pasteFont:"); -late final _sel_pasteRuler_ = objc.registerName("pasteRuler:"); -late final _sel_paste_ = objc.registerName("paste:"); -late final _sel_pasteboardByFilteringData_ofType_ = objc.registerName( - "pasteboardByFilteringData:ofType:", -); -late final _sel_pasteboardByFilteringFile_ = objc.registerName( - "pasteboardByFilteringFile:", -); -late final _sel_pasteboardByFilteringTypesInPasteboard_ = objc.registerName( - "pasteboardByFilteringTypesInPasteboard:", -); -late final _sel_pasteboardItems = objc.registerName("pasteboardItems"); -late final _sel_pasteboardWithName_ = objc.registerName("pasteboardWithName:"); -late final _sel_pasteboardWithUniqueName = objc.registerName( - "pasteboardWithUniqueName", -); -late final _sel_performActionForItemAtIndex_ = objc.registerName( - "performActionForItemAtIndex:", -); -late final _sel_performAsCurrentDrawingAppearance_ = objc.registerName( - "performAsCurrentDrawingAppearance:", -); -late final _sel_performClose_ = objc.registerName("performClose:"); -late final _sel_performDragOperation_ = objc.registerName( - "performDragOperation:", -); -late final _sel_performKeyEquivalent_ = objc.registerName( - "performKeyEquivalent:", -); -late final _sel_performMiniaturize_ = objc.registerName("performMiniaturize:"); -late final _sel_performMnemonic_ = objc.registerName("performMnemonic:"); -late final _sel_performTextFinderAction_ = objc.registerName( - "performTextFinderAction:", -); -late final _sel_performWindowDragWithEvent_ = objc.registerName( - "performWindowDragWithEvent:", -); -late final _sel_performZoom_ = objc.registerName("performZoom:"); -late final _sel_persistentIdentifier = objc.registerName( - "persistentIdentifier", -); -late final _sel_phase = objc.registerName("phase"); -late final _sel_pickerView_attributedTitleForRow_forComponent_ = objc - .registerName("pickerView:attributedTitleForRow:forComponent:"); -late final _sel_pickerView_didSelectRow_inComponent_ = objc.registerName( - "pickerView:didSelectRow:inComponent:", -); -late final _sel_pickerView_numberOfRowsInComponent_ = objc.registerName( - "pickerView:numberOfRowsInComponent:", -); -late final _sel_pickerView_rowHeightForComponent_ = objc.registerName( - "pickerView:rowHeightForComponent:", -); -late final _sel_pickerView_titleForRow_forComponent_ = objc.registerName( - "pickerView:titleForRow:forComponent:", -); -late final _sel_pickerView_viewForRow_forComponent_reusingView_ = objc - .registerName("pickerView:viewForRow:forComponent:reusingView:"); -late final _sel_pickerView_widthForComponent_ = objc.registerName( - "pickerView:widthForComponent:", -); -late final _sel_pointingDeviceID = objc.registerName("pointingDeviceID"); -late final _sel_pointingDeviceSerialNumber = objc.registerName( - "pointingDeviceSerialNumber", -); -late final _sel_pointingDeviceType = objc.registerName("pointingDeviceType"); -late final _sel_popUpContextMenu_withEvent_forView_ = objc.registerName( - "popUpContextMenu:withEvent:forView:", -); -late final _sel_popUpContextMenu_withEvent_forView_withFont_ = objc - .registerName("popUpContextMenu:withEvent:forView:withFont:"); -late final _sel_popUpMenuPositioningItem_atLocation_inView_ = objc.registerName( - "popUpMenuPositioningItem:atLocation:inView:", -); -late final _sel_postEvent_atStart_ = objc.registerName("postEvent:atStart:"); -late final _sel_postsBoundsChangedNotifications = objc.registerName( - "postsBoundsChangedNotifications", -); -late final _sel_postsFrameChangedNotifications = objc.registerName( - "postsFrameChangedNotifications", -); -late final _sel_preferredBackingLocation = objc.registerName( - "preferredBackingLocation", -); -late final _sel_preferredFilename = objc.registerName("preferredFilename"); -late final _sel_prefersCompactControlSizeMetrics = objc.registerName( - "prefersCompactControlSizeMetrics", -); -late final _sel_prepareContentInRect_ = objc.registerName( - "prepareContentInRect:", -); -late final _sel_prepareForDragOperation_ = objc.registerName( - "prepareForDragOperation:", -); -late final _sel_prepareForNewContentsWithOptions_ = objc.registerName( - "prepareForNewContentsWithOptions:", -); -late final _sel_prepareForReuse = objc.registerName("prepareForReuse"); -late final _sel_prepareWithInvocationTarget_ = objc.registerName( - "prepareWithInvocationTarget:", -); -late final _sel_preparedContentRect = objc.registerName("preparedContentRect"); -late final _sel_presentError_ = objc.registerName("presentError:"); -late final _sel_presentError_modalForWindow_delegate_didPresentSelector_contextInfo_ = - objc.registerName( - "presentError:modalForWindow:delegate:didPresentSelector:contextInfo:", - ); -late final _sel_presentationStyle = objc.registerName("presentationStyle"); -late final _sel_preservesContentDuringLiveResize = objc.registerName( - "preservesContentDuringLiveResize", -); -late final _sel_pressedMouseButtons = objc.registerName("pressedMouseButtons"); -late final _sel_pressure = objc.registerName("pressure"); -late final _sel_pressureBehavior = objc.registerName("pressureBehavior"); -late final _sel_pressureChangeWithEvent_ = objc.registerName( - "pressureChangeWithEvent:", -); -late final _sel_preventsApplicationTerminationWhenModal = objc.registerName( - "preventsApplicationTerminationWhenModal", -); -late final _sel_previewRepresentableActivityItemsForWindow_ = objc.registerName( - "previewRepresentableActivityItemsForWindow:", -); -late final _sel_previousKeyView = objc.registerName("previousKeyView"); -late final _sel_previousLocationInView_ = objc.registerName( - "previousLocationInView:", -); -late final _sel_previousValidKeyView = objc.registerName( - "previousValidKeyView", -); -late final _sel_printJobTitle = objc.registerName("printJobTitle"); -late final _sel_print_ = objc.registerName("print:"); -late final _sel_propertiesToUpdate = objc.registerName("propertiesToUpdate"); -late final _sel_propertyListForType_ = objc.registerName( - "propertyListForType:", -); -late final _sel_provideNewButtonImage = objc.registerName( - "provideNewButtonImage", -); -late final _sel_quickLookPreviewItems_ = objc.registerName( - "quickLookPreviewItems:", -); -late final _sel_quickLookWithEvent_ = objc.registerName("quickLookWithEvent:"); -late final _sel_readFileContentsType_toFile_ = objc.registerName( - "readFileContentsType:toFile:", -); -late final _sel_readFileWrapper = objc.registerName("readFileWrapper"); -late final _sel_readFromURL_options_error_ = objc.registerName( - "readFromURL:options:error:", -); -late final _sel_readObjectsForClasses_options_ = objc.registerName( - "readObjectsForClasses:options:", -); -late final _sel_readRTFDFromFile_ = objc.registerName("readRTFDFromFile:"); -late final _sel_recalculateKeyViewLoop = objc.registerName( - "recalculateKeyViewLoop", -); -late final _sel_rectForPage_ = objc.registerName("rectForPage:"); -late final _sel_rectForSmartMagnificationAtPoint_inRect_ = objc.registerName( - "rectForSmartMagnificationAtPoint:inRect:", -); -late final _sel_rectPreservedDuringLiveResize = objc.registerName( - "rectPreservedDuringLiveResize", -); -late final _sel_redo = objc.registerName("redo"); -late final _sel_redoActionIsDiscardable = objc.registerName( - "redoActionIsDiscardable", -); -late final _sel_redoActionName = objc.registerName("redoActionName"); -late final _sel_redoActionUserInfoValueForKey_ = objc.registerName( - "redoActionUserInfoValueForKey:", -); -late final _sel_redoCount = objc.registerName("redoCount"); -late final _sel_redoMenuItemTitle = objc.registerName("redoMenuItemTitle"); -late final _sel_redoMenuTitleForUndoActionName_ = objc.registerName( - "redoMenuTitleForUndoActionName:", -); -late final _sel_referrerURL = objc.registerName("referrerURL"); -late final _sel_registerForDraggedTypes_ = objc.registerName( - "registerForDraggedTypes:", -); -late final _sel_registerUndoWithTarget_handler_ = objc.registerName( - "registerUndoWithTarget:handler:", -); -late final _sel_registerUndoWithTarget_selector_object_ = objc.registerName( - "registerUndoWithTarget:selector:object:", -); -late final _sel_registeredDraggedTypes = objc.registerName( - "registeredDraggedTypes", -); -late final _sel_regularFileContents = objc.registerName("regularFileContents"); -late final _sel_releaseGState = objc.registerName("releaseGState"); -late final _sel_releaseGlobally = objc.registerName("releaseGlobally"); -late final _sel_reloadAllComponents = objc.registerName("reloadAllComponents"); -late final _sel_reloadComponent_ = objc.registerName("reloadComponent:"); -late final _sel_removeAllActions = objc.registerName("removeAllActions"); -late final _sel_removeAllActionsWithTarget_ = objc.registerName( - "removeAllActionsWithTarget:", -); -late final _sel_removeAllItems = objc.registerName("removeAllItems"); -late final _sel_removeAllToolTips = objc.registerName("removeAllToolTips"); -late final _sel_removeChildWindow_ = objc.registerName("removeChildWindow:"); -late final _sel_removeCursorRect_cursor_ = objc.registerName( - "removeCursorRect:cursor:", -); -late final _sel_removeFileWrapper_ = objc.registerName("removeFileWrapper:"); -late final _sel_removeFrameUsingName_ = objc.registerName( - "removeFrameUsingName:", -); -late final _sel_removeFromSuperview = objc.registerName("removeFromSuperview"); -late final _sel_removeFromSuperviewWithoutNeedingDisplay = objc.registerName( - "removeFromSuperviewWithoutNeedingDisplay", -); -late final _sel_removeGestureRecognizer_ = objc.registerName( - "removeGestureRecognizer:", -); -late final _sel_removeItemAtIndex_ = objc.registerName("removeItemAtIndex:"); -late final _sel_removeItem_ = objc.registerName("removeItem:"); -late final _sel_removeMonitor_ = objc.registerName("removeMonitor:"); -late final _sel_removeTitlebarAccessoryViewControllerAtIndex_ = objc - .registerName("removeTitlebarAccessoryViewControllerAtIndex:"); -late final _sel_removeToolTip_ = objc.registerName("removeToolTip:"); -late final _sel_removeTrackingArea_ = objc.registerName("removeTrackingArea:"); -late final _sel_removeTrackingRect_ = objc.registerName("removeTrackingRect:"); -late final _sel_renewGState = objc.registerName("renewGState"); -late final _sel_replaceCharactersInRange_withRTFD_ = objc.registerName( - "replaceCharactersInRange:withRTFD:", -); -late final _sel_replaceCharactersInRange_withRTF_ = objc.registerName( - "replaceCharactersInRange:withRTF:", -); -late final _sel_replaceCharactersInRange_withString_ = objc.registerName( - "replaceCharactersInRange:withString:", -); -late final _sel_replaceSubview_with_ = objc.registerName( - "replaceSubview:with:", -); -late final _sel_representedFilename = objc.registerName("representedFilename"); -late final _sel_representedObject = objc.registerName("representedObject"); -late final _sel_representedURL = objc.registerName("representedURL"); -late final _sel_requestSharingOfWindowUsingPreview_title_completionHandler_ = - objc.registerName( - "requestSharingOfWindowUsingPreview:title:completionHandler:", - ); -late final _sel_requestSharingOfWindow_completionHandler_ = objc.registerName( - "requestSharingOfWindow:completionHandler:", -); -late final _sel_requiredUserInfoKeys = objc.registerName( - "requiredUserInfoKeys", -); -late final _sel_resetCursorRects = objc.registerName("resetCursorRects"); -late final _sel_resetSpringLoading = objc.registerName("resetSpringLoading"); -late final _sel_resignCurrent = objc.registerName("resignCurrent"); -late final _sel_resignFirstResponder = objc.registerName( - "resignFirstResponder", -); -late final _sel_resignKeyWindow = objc.registerName("resignKeyWindow"); -late final _sel_resignMainWindow = objc.registerName("resignMainWindow"); -late final _sel_resizeFlags = objc.registerName("resizeFlags"); -late final _sel_resizeIncrements = objc.registerName("resizeIncrements"); -late final _sel_resizeSubviewsWithOldSize_ = objc.registerName( - "resizeSubviewsWithOldSize:", -); -late final _sel_resizeWithOldSuperviewSize_ = objc.registerName( - "resizeWithOldSuperviewSize:", -); -late final _sel_restoreCachedImage = objc.registerName("restoreCachedImage"); -late final _sel_restoreUserActivityState_ = objc.registerName( - "restoreUserActivityState:", -); -late final _sel_rightMouseDown_ = objc.registerName("rightMouseDown:"); -late final _sel_rightMouseDragged_ = objc.registerName("rightMouseDragged:"); -late final _sel_rightMouseUp_ = objc.registerName("rightMouseUp:"); -late final _sel_rotateByAngle_ = objc.registerName("rotateByAngle:"); -late final _sel_rotateWithEvent_ = objc.registerName("rotateWithEvent:"); -late final _sel_rotation = objc.registerName("rotation"); -late final _sel_rowSizeForComponent_ = objc.registerName( - "rowSizeForComponent:", -); -late final _sel_runLoopModes = objc.registerName("runLoopModes"); -late final _sel_runToolbarCustomizationPalette_ = objc.registerName( - "runToolbarCustomizationPalette:", -); -late final _sel_safeAreaInsets = objc.registerName("safeAreaInsets"); -late final _sel_safeAreaLayoutGuide = objc.registerName("safeAreaLayoutGuide"); -late final _sel_safeAreaRect = objc.registerName("safeAreaRect"); -late final _sel_saveFrameUsingName_ = objc.registerName("saveFrameUsingName:"); -late final _sel_scaleUnitSquareToSize_ = objc.registerName( - "scaleUnitSquareToSize:", -); -late final _sel_screen = objc.registerName("screen"); -late final _sel_scrollLineDown_ = objc.registerName("scrollLineDown:"); -late final _sel_scrollLineUp_ = objc.registerName("scrollLineUp:"); -late final _sel_scrollPageDown_ = objc.registerName("scrollPageDown:"); -late final _sel_scrollPageUp_ = objc.registerName("scrollPageUp:"); -late final _sel_scrollPoint_ = objc.registerName("scrollPoint:"); -late final _sel_scrollRangeToVisible_ = objc.registerName( - "scrollRangeToVisible:", -); -late final _sel_scrollRectToVisible_ = objc.registerName( - "scrollRectToVisible:", -); -late final _sel_scrollRect_by_ = objc.registerName("scrollRect:by:"); -late final _sel_scrollToBeginningOfDocument_ = objc.registerName( - "scrollToBeginningOfDocument:", -); -late final _sel_scrollToEndOfDocument_ = objc.registerName( - "scrollToEndOfDocument:", -); -late final _sel_scrollWheel_ = objc.registerName("scrollWheel:"); -late final _sel_scrollingDeltaX = objc.registerName("scrollingDeltaX"); -late final _sel_scrollingDeltaY = objc.registerName("scrollingDeltaY"); -late final _sel_sectionHeaderWithTitle_ = objc.registerName( - "sectionHeaderWithTitle:", -); -late final _sel_selectAll_ = objc.registerName("selectAll:"); -late final _sel_selectKeyViewFollowingView_ = objc.registerName( - "selectKeyViewFollowingView:", -); -late final _sel_selectKeyViewPrecedingView_ = objc.registerName( - "selectKeyViewPrecedingView:", -); -late final _sel_selectLine_ = objc.registerName("selectLine:"); -late final _sel_selectNextKeyView_ = objc.registerName("selectNextKeyView:"); -late final _sel_selectNextTab_ = objc.registerName("selectNextTab:"); -late final _sel_selectParagraph_ = objc.registerName("selectParagraph:"); -late final _sel_selectPreviousKeyView_ = objc.registerName( - "selectPreviousKeyView:", -); -late final _sel_selectPreviousTab_ = objc.registerName("selectPreviousTab:"); -late final _sel_selectRow_inComponent_animated_ = objc.registerName( - "selectRow:inComponent:animated:", -); -late final _sel_selectToMark_ = objc.registerName("selectToMark:"); -late final _sel_selectWord_ = objc.registerName("selectWord:"); -late final _sel_selectedItems = objc.registerName("selectedItems"); -late final _sel_selectedRange = objc.registerName("selectedRange"); -late final _sel_selectedRowInComponent_ = objc.registerName( - "selectedRowInComponent:", -); -late final _sel_selectionMode = objc.registerName("selectionMode"); -late final _sel_sendEvent_ = objc.registerName("sendEvent:"); -late final _sel_separatorItem = objc.registerName("separatorItem"); -late final _sel_serializedRepresentation = objc.registerName( - "serializedRepresentation", -); -late final _sel_setAcceptsMouseMovedEvents_ = objc.registerName( - "setAcceptsMouseMovedEvents:", -); -late final _sel_setAcceptsTouchEvents_ = objc.registerName( - "setAcceptsTouchEvents:", -); -late final _sel_setAccessibilityActivationPoint_ = objc.registerName( - "setAccessibilityActivationPoint:", -); -late final _sel_setAccessibilityAllowedValues_ = objc.registerName( - "setAccessibilityAllowedValues:", -); -late final _sel_setAccessibilityAlternateUIVisible_ = objc.registerName( - "setAccessibilityAlternateUIVisible:", -); -late final _sel_setAccessibilityApplicationFocusedUIElement_ = objc - .registerName("setAccessibilityApplicationFocusedUIElement:"); -late final _sel_setAccessibilityAttributedUserInputLabels_ = objc.registerName( - "setAccessibilityAttributedUserInputLabels:", -); -late final _sel_setAccessibilityCancelButton_ = objc.registerName( - "setAccessibilityCancelButton:", -); -late final _sel_setAccessibilityChildrenInNavigationOrder_ = objc.registerName( - "setAccessibilityChildrenInNavigationOrder:", -); -late final _sel_setAccessibilityChildren_ = objc.registerName( - "setAccessibilityChildren:", -); -late final _sel_setAccessibilityClearButton_ = objc.registerName( - "setAccessibilityClearButton:", -); -late final _sel_setAccessibilityCloseButton_ = objc.registerName( - "setAccessibilityCloseButton:", -); -late final _sel_setAccessibilityColumnCount_ = objc.registerName( - "setAccessibilityColumnCount:", -); -late final _sel_setAccessibilityColumnHeaderUIElements_ = objc.registerName( - "setAccessibilityColumnHeaderUIElements:", -); -late final _sel_setAccessibilityColumnIndexRange_ = objc.registerName( - "setAccessibilityColumnIndexRange:", -); -late final _sel_setAccessibilityColumnTitles_ = objc.registerName( - "setAccessibilityColumnTitles:", -); -late final _sel_setAccessibilityColumns_ = objc.registerName( - "setAccessibilityColumns:", -); -late final _sel_setAccessibilityContents_ = objc.registerName( - "setAccessibilityContents:", -); -late final _sel_setAccessibilityCriticalValue_ = objc.registerName( - "setAccessibilityCriticalValue:", -); -late final _sel_setAccessibilityCustomActions_ = objc.registerName( - "setAccessibilityCustomActions:", -); -late final _sel_setAccessibilityCustomRotors_ = objc.registerName( - "setAccessibilityCustomRotors:", -); -late final _sel_setAccessibilityDecrementButton_ = objc.registerName( - "setAccessibilityDecrementButton:", -); -late final _sel_setAccessibilityDefaultButton_ = objc.registerName( - "setAccessibilityDefaultButton:", -); -late final _sel_setAccessibilityDisclosedByRow_ = objc.registerName( - "setAccessibilityDisclosedByRow:", -); -late final _sel_setAccessibilityDisclosedRows_ = objc.registerName( - "setAccessibilityDisclosedRows:", -); -late final _sel_setAccessibilityDisclosed_ = objc.registerName( - "setAccessibilityDisclosed:", -); -late final _sel_setAccessibilityDisclosureLevel_ = objc.registerName( - "setAccessibilityDisclosureLevel:", -); -late final _sel_setAccessibilityDocument_ = objc.registerName( - "setAccessibilityDocument:", -); -late final _sel_setAccessibilityEdited_ = objc.registerName( - "setAccessibilityEdited:", -); -late final _sel_setAccessibilityElement_ = objc.registerName( - "setAccessibilityElement:", -); -late final _sel_setAccessibilityEnabled_ = objc.registerName( - "setAccessibilityEnabled:", -); -late final _sel_setAccessibilityExpanded_ = objc.registerName( - "setAccessibilityExpanded:", -); -late final _sel_setAccessibilityExtrasMenuBar_ = objc.registerName( - "setAccessibilityExtrasMenuBar:", -); -late final _sel_setAccessibilityFilename_ = objc.registerName( - "setAccessibilityFilename:", -); -late final _sel_setAccessibilityFocusedWindow_ = objc.registerName( - "setAccessibilityFocusedWindow:", -); -late final _sel_setAccessibilityFocused_ = objc.registerName( - "setAccessibilityFocused:", -); -late final _sel_setAccessibilityFrame_ = objc.registerName( - "setAccessibilityFrame:", -); -late final _sel_setAccessibilityFrontmost_ = objc.registerName( - "setAccessibilityFrontmost:", -); -late final _sel_setAccessibilityFullScreenButton_ = objc.registerName( - "setAccessibilityFullScreenButton:", -); -late final _sel_setAccessibilityGrowArea_ = objc.registerName( - "setAccessibilityGrowArea:", -); -late final _sel_setAccessibilityHandles_ = objc.registerName( - "setAccessibilityHandles:", -); -late final _sel_setAccessibilityHeader_ = objc.registerName( - "setAccessibilityHeader:", -); -late final _sel_setAccessibilityHelp_ = objc.registerName( - "setAccessibilityHelp:", -); -late final _sel_setAccessibilityHidden_ = objc.registerName( - "setAccessibilityHidden:", -); -late final _sel_setAccessibilityHorizontalScrollBar_ = objc.registerName( - "setAccessibilityHorizontalScrollBar:", -); -late final _sel_setAccessibilityHorizontalUnitDescription_ = objc.registerName( - "setAccessibilityHorizontalUnitDescription:", -); -late final _sel_setAccessibilityHorizontalUnits_ = objc.registerName( - "setAccessibilityHorizontalUnits:", -); -late final _sel_setAccessibilityIdentifier_ = objc.registerName( - "setAccessibilityIdentifier:", -); -late final _sel_setAccessibilityIncrementButton_ = objc.registerName( - "setAccessibilityIncrementButton:", -); -late final _sel_setAccessibilityIndex_ = objc.registerName( - "setAccessibilityIndex:", -); -late final _sel_setAccessibilityInsertionPointLineNumber_ = objc.registerName( - "setAccessibilityInsertionPointLineNumber:", -); -late final _sel_setAccessibilityLabelUIElements_ = objc.registerName( - "setAccessibilityLabelUIElements:", -); -late final _sel_setAccessibilityLabelValue_ = objc.registerName( - "setAccessibilityLabelValue:", -); -late final _sel_setAccessibilityLabel_ = objc.registerName( - "setAccessibilityLabel:", -); -late final _sel_setAccessibilityLinkedUIElements_ = objc.registerName( - "setAccessibilityLinkedUIElements:", -); -late final _sel_setAccessibilityMainWindow_ = objc.registerName( - "setAccessibilityMainWindow:", -); -late final _sel_setAccessibilityMain_ = objc.registerName( - "setAccessibilityMain:", -); -late final _sel_setAccessibilityMarkerGroupUIElement_ = objc.registerName( - "setAccessibilityMarkerGroupUIElement:", -); -late final _sel_setAccessibilityMarkerTypeDescription_ = objc.registerName( - "setAccessibilityMarkerTypeDescription:", -); -late final _sel_setAccessibilityMarkerUIElements_ = objc.registerName( - "setAccessibilityMarkerUIElements:", -); -late final _sel_setAccessibilityMarkerValues_ = objc.registerName( - "setAccessibilityMarkerValues:", -); -late final _sel_setAccessibilityMaxValue_ = objc.registerName( - "setAccessibilityMaxValue:", -); -late final _sel_setAccessibilityMenuBar_ = objc.registerName( - "setAccessibilityMenuBar:", -); -late final _sel_setAccessibilityMinValue_ = objc.registerName( - "setAccessibilityMinValue:", -); -late final _sel_setAccessibilityMinimizeButton_ = objc.registerName( - "setAccessibilityMinimizeButton:", -); -late final _sel_setAccessibilityMinimized_ = objc.registerName( - "setAccessibilityMinimized:", -); -late final _sel_setAccessibilityModal_ = objc.registerName( - "setAccessibilityModal:", -); -late final _sel_setAccessibilityNextContents_ = objc.registerName( - "setAccessibilityNextContents:", -); -late final _sel_setAccessibilityNumberOfCharacters_ = objc.registerName( - "setAccessibilityNumberOfCharacters:", -); -late final _sel_setAccessibilityOrderedByRow_ = objc.registerName( - "setAccessibilityOrderedByRow:", -); -late final _sel_setAccessibilityOrientation_ = objc.registerName( - "setAccessibilityOrientation:", -); -late final _sel_setAccessibilityOverflowButton_ = objc.registerName( - "setAccessibilityOverflowButton:", -); -late final _sel_setAccessibilityParent_ = objc.registerName( - "setAccessibilityParent:", -); -late final _sel_setAccessibilityPlaceholderValue_ = objc.registerName( - "setAccessibilityPlaceholderValue:", -); -late final _sel_setAccessibilityPreviousContents_ = objc.registerName( - "setAccessibilityPreviousContents:", -); -late final _sel_setAccessibilityProtectedContent_ = objc.registerName( - "setAccessibilityProtectedContent:", -); -late final _sel_setAccessibilityProxy_ = objc.registerName( - "setAccessibilityProxy:", -); -late final _sel_setAccessibilityRequired_ = objc.registerName( - "setAccessibilityRequired:", -); -late final _sel_setAccessibilityRoleDescription_ = objc.registerName( - "setAccessibilityRoleDescription:", -); -late final _sel_setAccessibilityRole_ = objc.registerName( - "setAccessibilityRole:", -); -late final _sel_setAccessibilityRowCount_ = objc.registerName( - "setAccessibilityRowCount:", -); -late final _sel_setAccessibilityRowHeaderUIElements_ = objc.registerName( - "setAccessibilityRowHeaderUIElements:", -); -late final _sel_setAccessibilityRowIndexRange_ = objc.registerName( - "setAccessibilityRowIndexRange:", -); -late final _sel_setAccessibilityRows_ = objc.registerName( - "setAccessibilityRows:", -); -late final _sel_setAccessibilityRulerMarkerType_ = objc.registerName( - "setAccessibilityRulerMarkerType:", -); -late final _sel_setAccessibilitySearchButton_ = objc.registerName( - "setAccessibilitySearchButton:", -); -late final _sel_setAccessibilitySearchMenu_ = objc.registerName( - "setAccessibilitySearchMenu:", -); -late final _sel_setAccessibilitySelectedCells_ = objc.registerName( - "setAccessibilitySelectedCells:", -); -late final _sel_setAccessibilitySelectedChildren_ = objc.registerName( - "setAccessibilitySelectedChildren:", -); -late final _sel_setAccessibilitySelectedColumns_ = objc.registerName( - "setAccessibilitySelectedColumns:", -); -late final _sel_setAccessibilitySelectedRows_ = objc.registerName( - "setAccessibilitySelectedRows:", -); -late final _sel_setAccessibilitySelectedTextRange_ = objc.registerName( - "setAccessibilitySelectedTextRange:", -); -late final _sel_setAccessibilitySelectedTextRanges_ = objc.registerName( - "setAccessibilitySelectedTextRanges:", -); -late final _sel_setAccessibilitySelectedText_ = objc.registerName( - "setAccessibilitySelectedText:", -); -late final _sel_setAccessibilitySelected_ = objc.registerName( - "setAccessibilitySelected:", -); -late final _sel_setAccessibilityServesAsTitleForUIElements_ = objc.registerName( - "setAccessibilityServesAsTitleForUIElements:", -); -late final _sel_setAccessibilitySharedCharacterRange_ = objc.registerName( - "setAccessibilitySharedCharacterRange:", -); -late final _sel_setAccessibilitySharedFocusElements_ = objc.registerName( - "setAccessibilitySharedFocusElements:", -); -late final _sel_setAccessibilitySharedTextUIElements_ = objc.registerName( - "setAccessibilitySharedTextUIElements:", -); -late final _sel_setAccessibilityShownMenu_ = objc.registerName( - "setAccessibilityShownMenu:", -); -late final _sel_setAccessibilitySortDirection_ = objc.registerName( - "setAccessibilitySortDirection:", -); -late final _sel_setAccessibilitySplitters_ = objc.registerName( - "setAccessibilitySplitters:", -); -late final _sel_setAccessibilitySubrole_ = objc.registerName( - "setAccessibilitySubrole:", -); -late final _sel_setAccessibilityTabs_ = objc.registerName( - "setAccessibilityTabs:", -); -late final _sel_setAccessibilityTitleUIElement_ = objc.registerName( - "setAccessibilityTitleUIElement:", -); -late final _sel_setAccessibilityTitle_ = objc.registerName( - "setAccessibilityTitle:", -); -late final _sel_setAccessibilityToolbarButton_ = objc.registerName( - "setAccessibilityToolbarButton:", -); -late final _sel_setAccessibilityTopLevelUIElement_ = objc.registerName( - "setAccessibilityTopLevelUIElement:", -); -late final _sel_setAccessibilityURL_ = objc.registerName( - "setAccessibilityURL:", -); -late final _sel_setAccessibilityUnitDescription_ = objc.registerName( - "setAccessibilityUnitDescription:", -); -late final _sel_setAccessibilityUnits_ = objc.registerName( - "setAccessibilityUnits:", -); -late final _sel_setAccessibilityUserInputLabels_ = objc.registerName( - "setAccessibilityUserInputLabels:", -); -late final _sel_setAccessibilityValueDescription_ = objc.registerName( - "setAccessibilityValueDescription:", -); -late final _sel_setAccessibilityValue_ = objc.registerName( - "setAccessibilityValue:", -); -late final _sel_setAccessibilityVerticalScrollBar_ = objc.registerName( - "setAccessibilityVerticalScrollBar:", -); -late final _sel_setAccessibilityVerticalUnitDescription_ = objc.registerName( - "setAccessibilityVerticalUnitDescription:", -); -late final _sel_setAccessibilityVerticalUnits_ = objc.registerName( - "setAccessibilityVerticalUnits:", -); -late final _sel_setAccessibilityVisibleCells_ = objc.registerName( - "setAccessibilityVisibleCells:", -); -late final _sel_setAccessibilityVisibleCharacterRange_ = objc.registerName( - "setAccessibilityVisibleCharacterRange:", -); -late final _sel_setAccessibilityVisibleChildren_ = objc.registerName( - "setAccessibilityVisibleChildren:", -); -late final _sel_setAccessibilityVisibleColumns_ = objc.registerName( - "setAccessibilityVisibleColumns:", -); -late final _sel_setAccessibilityVisibleRows_ = objc.registerName( - "setAccessibilityVisibleRows:", -); -late final _sel_setAccessibilityWarningValue_ = objc.registerName( - "setAccessibilityWarningValue:", -); -late final _sel_setAccessibilityWindow_ = objc.registerName( - "setAccessibilityWindow:", -); -late final _sel_setAccessibilityWindows_ = objc.registerName( - "setAccessibilityWindows:", -); -late final _sel_setAccessibilityZoomButton_ = objc.registerName( - "setAccessibilityZoomButton:", -); -late final _sel_setAccessoryView_ = objc.registerName("setAccessoryView:"); -late final _sel_setActionIsDiscardable_ = objc.registerName( - "setActionIsDiscardable:", -); -late final _sel_setActionName_ = objc.registerName("setActionName:"); -late final _sel_setActionUserInfoValue_forKey_ = objc.registerName( - "setActionUserInfoValue:forKey:", -); -late final _sel_setAction_ = objc.registerName("setAction:"); -late final _sel_setAdditionalSafeAreaInsets_ = objc.registerName( - "setAdditionalSafeAreaInsets:", -); -late final _sel_setAlignment_ = objc.registerName("setAlignment:"); -late final _sel_setAllowedTouchTypes_ = objc.registerName( - "setAllowedTouchTypes:", -); -late final _sel_setAllowsAutomaticKeyEquivalentLocalization_ = objc - .registerName("setAllowsAutomaticKeyEquivalentLocalization:"); -late final _sel_setAllowsAutomaticKeyEquivalentMirroring_ = objc.registerName( - "setAllowsAutomaticKeyEquivalentMirroring:", -); -late final _sel_setAllowsAutomaticWindowTabbing_ = objc.registerName( - "setAllowsAutomaticWindowTabbing:", -); -late final _sel_setAllowsConcurrentViewDrawing_ = objc.registerName( - "setAllowsConcurrentViewDrawing:", -); -late final _sel_setAllowsContextMenuPlugIns_ = objc.registerName( - "setAllowsContextMenuPlugIns:", -); -late final _sel_setAllowsKeyEquivalentWhenHidden_ = objc.registerName( - "setAllowsKeyEquivalentWhenHidden:", -); -late final _sel_setAllowsToolTipsWhenApplicationIsInactive_ = objc.registerName( - "setAllowsToolTipsWhenApplicationIsInactive:", -); -late final _sel_setAlphaValue_ = objc.registerName("setAlphaValue:"); -late final _sel_setAlternate_ = objc.registerName("setAlternate:"); -late final _sel_setAnimatesToDestination_ = objc.registerName( - "setAnimatesToDestination:", -); -late final _sel_setAnimationBehavior_ = objc.registerName( - "setAnimationBehavior:", -); -late final _sel_setAnimations_ = objc.registerName("setAnimations:"); -late final _sel_setAppearanceSource_ = objc.registerName( - "setAppearanceSource:", -); -late final _sel_setAppearance_ = objc.registerName("setAppearance:"); -late final _sel_setAspectRatio_ = objc.registerName("setAspectRatio:"); -late final _sel_setAttributedTitle_ = objc.registerName("setAttributedTitle:"); -late final _sel_setAutodisplay_ = objc.registerName("setAutodisplay:"); -late final _sel_setAutoenablesItems_ = objc.registerName( - "setAutoenablesItems:", -); -late final _sel_setAutomaticallyInsertsWritingToolsItems_ = objc.registerName( - "setAutomaticallyInsertsWritingToolsItems:", -); -late final _sel_setAutorecalculatesContentBorderThickness_forEdge_ = objc - .registerName("setAutorecalculatesContentBorderThickness:forEdge:"); -late final _sel_setAutorecalculatesKeyViewLoop_ = objc.registerName( - "setAutorecalculatesKeyViewLoop:", -); -late final _sel_setAutoresizesSubviews_ = objc.registerName( - "setAutoresizesSubviews:", -); -late final _sel_setAutoresizingMask_ = objc.registerName( - "setAutoresizingMask:", -); -late final _sel_setBackgroundColor_ = objc.registerName("setBackgroundColor:"); -late final _sel_setBackgroundFilters_ = objc.registerName( - "setBackgroundFilters:", -); -late final _sel_setBackingType_ = objc.registerName("setBackingType:"); -late final _sel_setBadge_ = objc.registerName("setBadge:"); -late final _sel_setBaseWritingDirection_ = objc.registerName( - "setBaseWritingDirection:", -); -late final _sel_setBecomesKeyOnlyIfNeeded_ = objc.registerName( - "setBecomesKeyOnlyIfNeeded:", -); -late final _sel_setBoundsOrigin_ = objc.registerName("setBoundsOrigin:"); -late final _sel_setBoundsRotation_ = objc.registerName("setBoundsRotation:"); -late final _sel_setBoundsSize_ = objc.registerName("setBoundsSize:"); -late final _sel_setBounds_ = objc.registerName("setBounds:"); -late final _sel_setCanBecomeVisibleWithoutLogin_ = objc.registerName( - "setCanBecomeVisibleWithoutLogin:", -); -late final _sel_setCanDrawConcurrently_ = objc.registerName( - "setCanDrawConcurrently:", -); -late final _sel_setCanDrawSubviewsIntoLayer_ = objc.registerName( - "setCanDrawSubviewsIntoLayer:", -); -late final _sel_setCanHide_ = objc.registerName("setCanHide:"); -late final _sel_setClipsToBounds_ = objc.registerName("setClipsToBounds:"); -late final _sel_setCollectionBehavior_ = objc.registerName( - "setCollectionBehavior:", -); -late final _sel_setColorSpace_ = objc.registerName("setColorSpace:"); -late final _sel_setColor_ = objc.registerName("setColor:"); -late final _sel_setCompositingFilter_ = objc.registerName( - "setCompositingFilter:", -); -late final _sel_setContentAspectRatio_ = objc.registerName( - "setContentAspectRatio:", -); -late final _sel_setContentBorderThickness_forEdge_ = objc.registerName( - "setContentBorderThickness:forEdge:", -); -late final _sel_setContentFilters_ = objc.registerName("setContentFilters:"); -late final _sel_setContentMaxSize_ = objc.registerName("setContentMaxSize:"); -late final _sel_setContentMinSize_ = objc.registerName("setContentMinSize:"); -late final _sel_setContentResizeIncrements_ = objc.registerName( - "setContentResizeIncrements:", -); -late final _sel_setContentSize_ = objc.registerName("setContentSize:"); -late final _sel_setContentViewController_ = objc.registerName( - "setContentViewController:", -); -late final _sel_setContentView_ = objc.registerName("setContentView:"); -late final _sel_setContextMenuRepresentation_ = objc.registerName( - "setContextMenuRepresentation:", -); -late final _sel_setContinuous_ = objc.registerName("setContinuous:"); -late final _sel_setCurrentAppearance_ = objc.registerName( - "setCurrentAppearance:", -); -late final _sel_setDataSource_ = objc.registerName("setDataSource:"); -late final _sel_setData_forType_ = objc.registerName("setData:forType:"); -late final _sel_setDefaultButtonCell_ = objc.registerName( - "setDefaultButtonCell:", -); -late final _sel_setDelegate_ = objc.registerName("setDelegate:"); -late final _sel_setDepthLimit_ = objc.registerName("setDepthLimit:"); -late final _sel_setDisplaysWhenScreenProfileChanges_ = objc.registerName( - "setDisplaysWhenScreenProfileChanges:", -); -late final _sel_setDocumentEdited_ = objc.registerName("setDocumentEdited:"); -late final _sel_setDraggingFormation_ = objc.registerName( - "setDraggingFormation:", -); -late final _sel_setDrawsBackground_ = objc.registerName("setDrawsBackground:"); -late final _sel_setDynamicDepthLimit_ = objc.registerName( - "setDynamicDepthLimit:", -); -late final _sel_setEditable_ = objc.registerName("setEditable:"); -late final _sel_setEligibleForHandoff_ = objc.registerName( - "setEligibleForHandoff:", -); -late final _sel_setEligibleForPrediction_ = objc.registerName( - "setEligibleForPrediction:", -); -late final _sel_setEligibleForPublicIndexing_ = objc.registerName( - "setEligibleForPublicIndexing:", -); -late final _sel_setEligibleForSearch_ = objc.registerName( - "setEligibleForSearch:", -); -late final _sel_setEnabled_ = objc.registerName("setEnabled:"); -late final _sel_setExcludedFromWindowsMenu_ = objc.registerName( - "setExcludedFromWindowsMenu:", -); -late final _sel_setExpirationDate_ = objc.registerName("setExpirationDate:"); -late final _sel_setFieldEditor_ = objc.registerName("setFieldEditor:"); -late final _sel_setFileAttributes_ = objc.registerName("setFileAttributes:"); -late final _sel_setFilename_ = objc.registerName("setFilename:"); -late final _sel_setFloatingPanel_ = objc.registerName("setFloatingPanel:"); -late final _sel_setFocusRingType_ = objc.registerName("setFocusRingType:"); -late final _sel_setFont_ = objc.registerName("setFont:"); -late final _sel_setFont_range_ = objc.registerName("setFont:range:"); -late final _sel_setFrameAutosaveName_ = objc.registerName( - "setFrameAutosaveName:", -); -late final _sel_setFrameCenterRotation_ = objc.registerName( - "setFrameCenterRotation:", -); -late final _sel_setFrameFromString_ = objc.registerName("setFrameFromString:"); -late final _sel_setFrameOrigin_ = objc.registerName("setFrameOrigin:"); -late final _sel_setFrameRotation_ = objc.registerName("setFrameRotation:"); -late final _sel_setFrameSize_ = objc.registerName("setFrameSize:"); -late final _sel_setFrameTopLeftPoint_ = objc.registerName( - "setFrameTopLeftPoint:", -); -late final _sel_setFrameUsingName_ = objc.registerName("setFrameUsingName:"); -late final _sel_setFrameUsingName_force_ = objc.registerName( - "setFrameUsingName:force:", -); -late final _sel_setFrame_ = objc.registerName("setFrame:"); -late final _sel_setFrame_display_ = objc.registerName("setFrame:display:"); -late final _sel_setFrame_display_animate_ = objc.registerName( - "setFrame:display:animate:", -); -late final _sel_setGestureRecognizers_ = objc.registerName( - "setGestureRecognizers:", -); -late final _sel_setGroupsByEvent_ = objc.registerName("setGroupsByEvent:"); -late final _sel_setHasShadow_ = objc.registerName("setHasShadow:"); -late final _sel_setHidden_ = objc.registerName("setHidden:"); -late final _sel_setHidesOnDeactivate_ = objc.registerName( - "setHidesOnDeactivate:", -); -late final _sel_setHorizontallyResizable_ = objc.registerName( - "setHorizontallyResizable:", -); -late final _sel_setIdentifier_ = objc.registerName("setIdentifier:"); -late final _sel_setIgnoresMouseEvents_ = objc.registerName( - "setIgnoresMouseEvents:", -); -late final _sel_setImage_ = objc.registerName("setImage:"); -late final _sel_setImportsGraphics_ = objc.registerName("setImportsGraphics:"); -late final _sel_setIndentationLevel_ = objc.registerName( - "setIndentationLevel:", -); -late final _sel_setInitialFirstResponder_ = objc.registerName( - "setInitialFirstResponder:", -); -late final _sel_setItemArray_ = objc.registerName("setItemArray:"); -late final _sel_setKeyEquivalentModifierMask_ = objc.registerName( - "setKeyEquivalentModifierMask:", -); -late final _sel_setKeyEquivalent_ = objc.registerName("setKeyEquivalent:"); -late final _sel_setKeyboardFocusRingNeedsDisplayInRect_ = objc.registerName( - "setKeyboardFocusRingNeedsDisplayInRect:", -); -late final _sel_setKeywords_ = objc.registerName("setKeywords:"); -late final _sel_setLayerContentsPlacement_ = objc.registerName( - "setLayerContentsPlacement:", -); -late final _sel_setLayerContentsRedrawPolicy_ = objc.registerName( - "setLayerContentsRedrawPolicy:", -); -late final _sel_setLayerUsesCoreImageFilters_ = objc.registerName( - "setLayerUsesCoreImageFilters:", -); -late final _sel_setLayer_ = objc.registerName("setLayer:"); -late final _sel_setLevel_ = objc.registerName("setLevel:"); -late final _sel_setLevelsOfUndo_ = objc.registerName("setLevelsOfUndo:"); -late final _sel_setMark_ = objc.registerName("setMark:"); -late final _sel_setMaxFullScreenContentSize_ = objc.registerName( - "setMaxFullScreenContentSize:", -); -late final _sel_setMaxSize_ = objc.registerName("setMaxSize:"); -late final _sel_setMaximumLinearExposure_ = objc.registerName( - "setMaximumLinearExposure:", -); -late final _sel_setMenuBarVisible_ = objc.registerName("setMenuBarVisible:"); -late final _sel_setMenuChangedMessagesEnabled_ = objc.registerName( - "setMenuChangedMessagesEnabled:", -); -late final _sel_setMenuRepresentation_ = objc.registerName( - "setMenuRepresentation:", -); -late final _sel_setMenuZone_ = objc.registerName("setMenuZone:"); -late final _sel_setMenu_ = objc.registerName("setMenu:"); -late final _sel_setMinFullScreenContentSize_ = objc.registerName( - "setMinFullScreenContentSize:", -); -late final _sel_setMinSize_ = objc.registerName("setMinSize:"); -late final _sel_setMinimumWidth_ = objc.registerName("setMinimumWidth:"); -late final _sel_setMiniwindowImage_ = objc.registerName("setMiniwindowImage:"); -late final _sel_setMiniwindowTitle_ = objc.registerName("setMiniwindowTitle:"); -late final _sel_setMixedStateImage_ = objc.registerName("setMixedStateImage:"); -late final _sel_setMnemonicLocation_ = objc.registerName( - "setMnemonicLocation:", -); -late final _sel_setMode_ = objc.registerName("setMode:"); -late final _sel_setMouseCoalescingEnabled_ = objc.registerName( - "setMouseCoalescingEnabled:", -); -late final _sel_setMovableByWindowBackground_ = objc.registerName( - "setMovableByWindowBackground:", -); -late final _sel_setMovable_ = objc.registerName("setMovable:"); -late final _sel_setNeedsDisplayInRect_ = objc.registerName( - "setNeedsDisplayInRect:", -); -late final _sel_setNeedsDisplay_ = objc.registerName("setNeedsDisplay:"); -late final _sel_setNeedsLayout_ = objc.registerName("setNeedsLayout:"); -late final _sel_setNeedsSave_ = objc.registerName("setNeedsSave:"); -late final _sel_setNextKeyView_ = objc.registerName("setNextKeyView:"); -late final _sel_setNextResponder_ = objc.registerName("setNextResponder:"); -late final _sel_setNumberOfValidItemsForDrop_ = objc.registerName( - "setNumberOfValidItemsForDrop:", -); -late final _sel_setOffStateImage_ = objc.registerName("setOffStateImage:"); -late final _sel_setOnStateImage_ = objc.registerName("setOnStateImage:"); -late final _sel_setOneShot_ = objc.registerName("setOneShot:"); -late final _sel_setOpaque_ = objc.registerName("setOpaque:"); -late final _sel_setParentWindow_ = objc.registerName("setParentWindow:"); -late final _sel_setPersistentIdentifier_ = objc.registerName( - "setPersistentIdentifier:", -); -late final _sel_setPickerMask_ = objc.registerName("setPickerMask:"); -late final _sel_setPickerMode_ = objc.registerName("setPickerMode:"); -late final _sel_setPostsBoundsChangedNotifications_ = objc.registerName( - "setPostsBoundsChangedNotifications:", -); -late final _sel_setPostsFrameChangedNotifications_ = objc.registerName( - "setPostsFrameChangedNotifications:", -); -late final _sel_setPreferredBackingLocation_ = objc.registerName( - "setPreferredBackingLocation:", -); -late final _sel_setPreferredFilename_ = objc.registerName( - "setPreferredFilename:", -); -late final _sel_setPrefersCompactControlSizeMetrics_ = objc.registerName( - "setPrefersCompactControlSizeMetrics:", -); -late final _sel_setPreparedContentRect_ = objc.registerName( - "setPreparedContentRect:", -); -late final _sel_setPresentationStyle_ = objc.registerName( - "setPresentationStyle:", -); -late final _sel_setPreservesContentDuringLiveResize_ = objc.registerName( - "setPreservesContentDuringLiveResize:", -); -late final _sel_setPreventsApplicationTerminationWhenModal_ = objc.registerName( - "setPreventsApplicationTerminationWhenModal:", -); -late final _sel_setPropertyList_forType_ = objc.registerName( - "setPropertyList:forType:", -); -late final _sel_setReferrerURL_ = objc.registerName("setReferrerURL:"); -late final _sel_setReleasedWhenClosed_ = objc.registerName( - "setReleasedWhenClosed:", -); -late final _sel_setRepresentedFilename_ = objc.registerName( - "setRepresentedFilename:", -); -late final _sel_setRepresentedObject_ = objc.registerName( - "setRepresentedObject:", -); -late final _sel_setRepresentedURL_ = objc.registerName("setRepresentedURL:"); -late final _sel_setRequiredUserInfoKeys_ = objc.registerName( - "setRequiredUserInfoKeys:", -); -late final _sel_setResizeIncrements_ = objc.registerName( - "setResizeIncrements:", -); -late final _sel_setRichText_ = objc.registerName("setRichText:"); -late final _sel_setRunLoopModes_ = objc.registerName("setRunLoopModes:"); -late final _sel_setSelectable_ = objc.registerName("setSelectable:"); -late final _sel_setSelectedItems_ = objc.registerName("setSelectedItems:"); -late final _sel_setSelectedRange_ = objc.registerName("setSelectedRange:"); -late final _sel_setSelectionMode_ = objc.registerName("setSelectionMode:"); -late final _sel_setShadow_ = objc.registerName("setShadow:"); -late final _sel_setSharingType_ = objc.registerName("setSharingType:"); -late final _sel_setShowsAlpha_ = objc.registerName("setShowsAlpha:"); -late final _sel_setShowsResizeIndicator_ = objc.registerName( - "setShowsResizeIndicator:", -); -late final _sel_setShowsSelectionIndicator_ = objc.registerName( - "setShowsSelectionIndicator:", -); -late final _sel_setShowsStateColumn_ = objc.registerName( - "setShowsStateColumn:", -); -late final _sel_setShowsToolbarButton_ = objc.registerName( - "setShowsToolbarButton:", -); -late final _sel_setStartingItemNumber_ = objc.registerName( - "setStartingItemNumber:", -); -late final _sel_setState_ = objc.registerName("setState:"); -late final _sel_setString_ = objc.registerName("setString:"); -late final _sel_setString_forType_ = objc.registerName("setString:forType:"); -late final _sel_setStyleMask_ = objc.registerName("setStyleMask:"); -late final _sel_setSubmenu_ = objc.registerName("setSubmenu:"); -late final _sel_setSubmenu_forItem_ = objc.registerName("setSubmenu:forItem:"); -late final _sel_setSubtitle_ = objc.registerName("setSubtitle:"); -late final _sel_setSubviews_ = objc.registerName("setSubviews:"); -late final _sel_setSupermenu_ = objc.registerName("setSupermenu:"); -late final _sel_setSupportsContinuationStreams_ = objc.registerName( - "setSupportsContinuationStreams:", -); -late final _sel_setTabbingIdentifier_ = objc.registerName( - "setTabbingIdentifier:", -); -late final _sel_setTabbingMode_ = objc.registerName("setTabbingMode:"); -late final _sel_setTag_ = objc.registerName("setTag:"); -late final _sel_setTargetContentIdentifier_ = objc.registerName( - "setTargetContentIdentifier:", -); -late final _sel_setTarget_ = objc.registerName("setTarget:"); -late final _sel_setTearOffMenuRepresentation_ = objc.registerName( - "setTearOffMenuRepresentation:", -); -late final _sel_setTextColor_ = objc.registerName("setTextColor:"); -late final _sel_setTextColor_range_ = objc.registerName("setTextColor:range:"); -late final _sel_setTitleVisibility_ = objc.registerName("setTitleVisibility:"); -late final _sel_setTitleWithMnemonic_ = objc.registerName( - "setTitleWithMnemonic:", -); -late final _sel_setTitleWithRepresentedFilename_ = objc.registerName( - "setTitleWithRepresentedFilename:", -); -late final _sel_setTitle_ = objc.registerName("setTitle:"); -late final _sel_setTitlebarAccessoryViewControllers_ = objc.registerName( - "setTitlebarAccessoryViewControllers:", -); -late final _sel_setTitlebarAppearsTransparent_ = objc.registerName( - "setTitlebarAppearsTransparent:", -); -late final _sel_setTitlebarSeparatorStyle_ = objc.registerName( - "setTitlebarSeparatorStyle:", -); -late final _sel_setToolTip_ = objc.registerName("setToolTip:"); -late final _sel_setToolbarStyle_ = objc.registerName("setToolbarStyle:"); -late final _sel_setToolbar_ = objc.registerName("setToolbar:"); -late final _sel_setUpGState = objc.registerName("setUpGState"); -late final _sel_setUserActivity_ = objc.registerName("setUserActivity:"); -late final _sel_setUserInfo_ = objc.registerName("setUserInfo:"); -late final _sel_setUserInterfaceLayoutDirection_ = objc.registerName( - "setUserInterfaceLayoutDirection:", -); -late final _sel_setUsesFontPanel_ = objc.registerName("setUsesFontPanel:"); -late final _sel_setUsesUserKeyEquivalents_ = objc.registerName( - "setUsesUserKeyEquivalents:", -); -late final _sel_setVerticallyResizable_ = objc.registerName( - "setVerticallyResizable:", -); -late final _sel_setView_ = objc.registerName("setView:"); -late final _sel_setViewsNeedDisplay_ = objc.registerName( - "setViewsNeedDisplay:", -); -late final _sel_setWantsLayer_ = objc.registerName("setWantsLayer:"); -late final _sel_setWantsRestingTouches_ = objc.registerName( - "setWantsRestingTouches:", -); -late final _sel_setWebpageURL_ = objc.registerName("setWebpageURL:"); -late final _sel_setWindowController_ = objc.registerName( - "setWindowController:", -); -late final _sel_setWorksWhenModal_ = objc.registerName("setWorksWhenModal:"); -late final _sel_setWritingToolsCoordinator_ = objc.registerName( - "setWritingToolsCoordinator:", -); -late final _sel_shadow = objc.registerName("shadow"); -late final _sel_sharedColorPanel = objc.registerName("sharedColorPanel"); -late final _sel_sharedColorPanelExists = objc.registerName( - "sharedColorPanelExists", -); -late final _sel_sharingType = objc.registerName("sharingType"); -late final _sel_sheetParent = objc.registerName("sheetParent"); -late final _sel_sheets = objc.registerName("sheets"); -late final _sel_shouldBeTreatedAsInkEvent_ = objc.registerName( - "shouldBeTreatedAsInkEvent:", -); -late final _sel_shouldDelayWindowOrderingForEvent_ = objc.registerName( - "shouldDelayWindowOrderingForEvent:", -); -late final _sel_shouldDrawColor = objc.registerName("shouldDrawColor"); -late final _sel_showContextHelp_ = objc.registerName("showContextHelp:"); -late final _sel_showContextMenuForSelection_ = objc.registerName( - "showContextMenuForSelection:", -); -late final _sel_showDefinitionForAttributedString_atPoint_ = objc.registerName( - "showDefinitionForAttributedString:atPoint:", -); -late final _sel_showDefinitionForAttributedString_range_options_baselineOriginProvider_ = - objc.registerName( - "showDefinitionForAttributedString:range:options:baselineOriginProvider:", - ); -late final _sel_showGuessPanel_ = objc.registerName("showGuessPanel:"); -late final _sel_showWritingTools_ = objc.registerName("showWritingTools:"); -late final _sel_showsAlpha = objc.registerName("showsAlpha"); -late final _sel_showsResizeIndicator = objc.registerName( - "showsResizeIndicator", -); -late final _sel_showsSelectionIndicator = objc.registerName( - "showsSelectionIndicator", -); -late final _sel_showsStateColumn = objc.registerName("showsStateColumn"); -late final _sel_showsToolbarButton = objc.registerName("showsToolbarButton"); -late final _sel_size = objc.registerName("size"); -late final _sel_sizeToFit = objc.registerName("sizeToFit"); -late final _sel_slideDraggedImageTo_ = objc.registerName( - "slideDraggedImageTo:", -); -late final _sel_smartMagnifyWithEvent_ = objc.registerName( - "smartMagnifyWithEvent:", -); -late final _sel_sortSubviewsUsingFunction_context_ = objc.registerName( - "sortSubviewsUsingFunction:context:", -); -late final _sel_springLoadingHighlight = objc.registerName( - "springLoadingHighlight", -); -late final _sel_stage = objc.registerName("stage"); -late final _sel_stageTransition = objc.registerName("stageTransition"); -late final _sel_standardWindowButton_ = objc.registerName( - "standardWindowButton:", -); -late final _sel_standardWindowButton_forStyleMask_ = objc.registerName( - "standardWindowButton:forStyleMask:", -); -late final _sel_startPeriodicEventsAfterDelay_withPeriod_ = objc.registerName( - "startPeriodicEventsAfterDelay:withPeriod:", -); -late final _sel_startingItemNumber = objc.registerName("startingItemNumber"); -late final _sel_state = objc.registerName("state"); -late final _sel_stopPeriodicEvents = objc.registerName("stopPeriodicEvents"); -late final _sel_string = objc.registerName("string"); -late final _sel_stringForType_ = objc.registerName("stringForType:"); -late final _sel_stringWithSavedFrame = objc.registerName( - "stringWithSavedFrame", -); -late final _sel_styleMask = objc.registerName("styleMask"); -late final _sel_submenu = objc.registerName("submenu"); -late final _sel_submenuAction_ = objc.registerName("submenuAction:"); -late final _sel_subscript_ = objc.registerName("subscript:"); -late final _sel_subtitle = objc.registerName("subtitle"); -late final _sel_subtype = objc.registerName("subtype"); -late final _sel_subviews = objc.registerName("subviews"); -late final _sel_supermenu = objc.registerName("supermenu"); -late final _sel_superscript_ = objc.registerName("superscript:"); -late final _sel_superview = objc.registerName("superview"); -late final _sel_supplementalTargetForAction_sender_ = objc.registerName( - "supplementalTargetForAction:sender:", -); -late final _sel_supportsContinuationStreams = objc.registerName( - "supportsContinuationStreams", -); -late final _sel_supportsSecureCoding = objc.registerName( - "supportsSecureCoding", -); -late final _sel_swapWithMark_ = objc.registerName("swapWithMark:"); -late final _sel_swipeWithEvent_ = objc.registerName("swipeWithEvent:"); -late final _sel_symbolicLinkDestination = objc.registerName( - "symbolicLinkDestination", -); -late final _sel_symbolicLinkDestinationURL = objc.registerName( - "symbolicLinkDestinationURL", -); -late final _sel_systemTabletID = objc.registerName("systemTabletID"); -late final _sel_tab = objc.registerName("tab"); -late final _sel_tabGroup = objc.registerName("tabGroup"); -late final _sel_tabbedWindows = objc.registerName("tabbedWindows"); -late final _sel_tabbingIdentifier = objc.registerName("tabbingIdentifier"); -late final _sel_tabbingMode = objc.registerName("tabbingMode"); -late final _sel_tabletID = objc.registerName("tabletID"); -late final _sel_tabletPoint_ = objc.registerName("tabletPoint:"); -late final _sel_tabletProximity_ = objc.registerName("tabletProximity:"); -late final _sel_tag = objc.registerName("tag"); -late final _sel_tangentialPressure = objc.registerName("tangentialPressure"); -late final _sel_target = objc.registerName("target"); -late final _sel_targetContentIdentifier = objc.registerName( - "targetContentIdentifier", -); -late final _sel_tearOffMenuRepresentation = objc.registerName( - "tearOffMenuRepresentation", -); -late final _sel_textColor = objc.registerName("textColor"); -late final _sel_textDidBeginEditing_ = objc.registerName( - "textDidBeginEditing:", -); -late final _sel_textDidChange_ = objc.registerName("textDidChange:"); -late final _sel_textDidEndEditing_ = objc.registerName("textDidEndEditing:"); -late final _sel_textShouldBeginEditing_ = objc.registerName( - "textShouldBeginEditing:", -); -late final _sel_textShouldEndEditing_ = objc.registerName( - "textShouldEndEditing:", -); -late final _sel_tilt = objc.registerName("tilt"); -late final _sel_timestamp = objc.registerName("timestamp"); -late final _sel_title = objc.registerName("title"); -late final _sel_titleVisibility = objc.registerName("titleVisibility"); -late final _sel_titlebarAccessoryViewControllers = objc.registerName( - "titlebarAccessoryViewControllers", -); -late final _sel_titlebarAppearsTransparent = objc.registerName( - "titlebarAppearsTransparent", -); -late final _sel_titlebarSeparatorStyle = objc.registerName( - "titlebarSeparatorStyle", -); -late final _sel_toggleFullScreen_ = objc.registerName("toggleFullScreen:"); -late final _sel_toggleRuler_ = objc.registerName("toggleRuler:"); -late final _sel_toggleTabBar_ = objc.registerName("toggleTabBar:"); -late final _sel_toggleTabOverview_ = objc.registerName("toggleTabOverview:"); -late final _sel_toggleToolbarShown_ = objc.registerName("toggleToolbarShown:"); -late final _sel_toolTip = objc.registerName("toolTip"); -late final _sel_toolbar = objc.registerName("toolbar"); -late final _sel_toolbarStyle = objc.registerName("toolbarStyle"); -late final _sel_touchesBeganWithEvent_ = objc.registerName( - "touchesBeganWithEvent:", -); -late final _sel_touchesCancelledWithEvent_ = objc.registerName( - "touchesCancelledWithEvent:", -); -late final _sel_touchesEndedWithEvent_ = objc.registerName( - "touchesEndedWithEvent:", -); -late final _sel_touchesForView_ = objc.registerName("touchesForView:"); -late final _sel_touchesMatchingPhase_inView_ = objc.registerName( - "touchesMatchingPhase:inView:", -); -late final _sel_touchesMovedWithEvent_ = objc.registerName( - "touchesMovedWithEvent:", -); -late final _sel_trackEventsMatchingMask_timeout_mode_handler_ = objc - .registerName("trackEventsMatchingMask:timeout:mode:handler:"); -late final _sel_trackSwipeEventWithOptions_dampenAmountThresholdMin_max_usingHandler_ = - objc.registerName( - "trackSwipeEventWithOptions:dampenAmountThresholdMin:max:usingHandler:", - ); -late final _sel_trackingArea = objc.registerName("trackingArea"); -late final _sel_trackingAreas = objc.registerName("trackingAreas"); -late final _sel_trackingNumber = objc.registerName("trackingNumber"); -late final _sel_transferWindowSharingToWindow_completionHandler_ = objc - .registerName("transferWindowSharingToWindow:completionHandler:"); -late final _sel_translateOriginToPoint_ = objc.registerName( - "translateOriginToPoint:", -); -late final _sel_translateRectsNeedingDisplayInRect_by_ = objc.registerName( - "translateRectsNeedingDisplayInRect:by:", -); -late final _sel_transposeWords_ = objc.registerName("transposeWords:"); -late final _sel_transpose_ = objc.registerName("transpose:"); -late final _sel_tryToPerform_with_ = objc.registerName("tryToPerform:with:"); -late final _sel_type = objc.registerName("type"); -late final _sel_types = objc.registerName("types"); -late final _sel_typesFilterableTo_ = objc.registerName("typesFilterableTo:"); -late final _sel_underline_ = objc.registerName("underline:"); -late final _sel_undo = objc.registerName("undo"); -late final _sel_undoActionIsDiscardable = objc.registerName( - "undoActionIsDiscardable", -); -late final _sel_undoActionName = objc.registerName("undoActionName"); -late final _sel_undoActionUserInfoValueForKey_ = objc.registerName( - "undoActionUserInfoValueForKey:", -); -late final _sel_undoCount = objc.registerName("undoCount"); -late final _sel_undoManager = objc.registerName("undoManager"); -late final _sel_undoMenuItemTitle = objc.registerName("undoMenuItemTitle"); -late final _sel_undoMenuTitleForUndoActionName_ = objc.registerName( - "undoMenuTitleForUndoActionName:", -); -late final _sel_undoNestedGroup = objc.registerName("undoNestedGroup"); -late final _sel_uniqueID = objc.registerName("uniqueID"); -late final _sel_unlockFocus = objc.registerName("unlockFocus"); -late final _sel_unregisterDraggedTypes = objc.registerName( - "unregisterDraggedTypes", -); -late final _sel_unscript_ = objc.registerName("unscript:"); -late final _sel_update = objc.registerName("update"); -late final _sel_updateDraggingItemsForDrag_ = objc.registerName( - "updateDraggingItemsForDrag:", -); -late final _sel_updateFromPath_ = objc.registerName("updateFromPath:"); -late final _sel_updateLayer = objc.registerName("updateLayer"); -late final _sel_updateTrackingAreas = objc.registerName("updateTrackingAreas"); -late final _sel_updateUserActivityState_ = objc.registerName( - "updateUserActivityState:", -); -late final _sel_uppercaseWord_ = objc.registerName("uppercaseWord:"); -late final _sel_useOptimizedDrawing_ = objc.registerName( - "useOptimizedDrawing:", -); -late final _sel_userActivity = objc.registerName("userActivity"); -late final _sel_userActivityWasContinued_ = objc.registerName( - "userActivityWasContinued:", -); -late final _sel_userActivityWillSave_ = objc.registerName( - "userActivityWillSave:", -); -late final _sel_userActivity_didReceiveInputStream_outputStream_ = objc - .registerName("userActivity:didReceiveInputStream:outputStream:"); -late final _sel_userData = objc.registerName("userData"); -late final _sel_userInfo = objc.registerName("userInfo"); -late final _sel_userInterfaceLayoutDirection = objc.registerName( - "userInterfaceLayoutDirection", -); -late final _sel_userKeyEquivalent = objc.registerName("userKeyEquivalent"); -late final _sel_userSpaceScaleFactor = objc.registerName( - "userSpaceScaleFactor", -); -late final _sel_userTabbingPreference = objc.registerName( - "userTabbingPreference", -); -late final _sel_usesFontPanel = objc.registerName("usesFontPanel"); -late final _sel_usesUserKeyEquivalents = objc.registerName( - "usesUserKeyEquivalents", -); -late final _sel_validRequestorForSendType_returnType_ = objc.registerName( - "validRequestorForSendType:returnType:", -); -late final _sel_validateMenuItem_ = objc.registerName("validateMenuItem:"); -late final _sel_validateProposedFirstResponder_forEvent_ = objc.registerName( - "validateProposedFirstResponder:forEvent:", -); -late final _sel_validateUserInterfaceItem_ = objc.registerName( - "validateUserInterfaceItem:", -); -late final _sel_vendorDefined = objc.registerName("vendorDefined"); -late final _sel_vendorID = objc.registerName("vendorID"); -late final _sel_vendorPointingDeviceType = objc.registerName( - "vendorPointingDeviceType", -); -late final _sel_view = objc.registerName("view"); -late final _sel_viewDidChangeBackingProperties = objc.registerName( - "viewDidChangeBackingProperties", -); -late final _sel_viewDidChangeEffectiveAppearance = objc.registerName( - "viewDidChangeEffectiveAppearance", -); -late final _sel_viewDidEndLiveResize = objc.registerName( - "viewDidEndLiveResize", -); -late final _sel_viewDidHide = objc.registerName("viewDidHide"); -late final _sel_viewDidMoveToSuperview = objc.registerName( - "viewDidMoveToSuperview", -); -late final _sel_viewDidMoveToWindow = objc.registerName("viewDidMoveToWindow"); -late final _sel_viewDidUnhide = objc.registerName("viewDidUnhide"); -late final _sel_viewForRow_forComponent_ = objc.registerName( - "viewForRow:forComponent:", +late final _sel_viewForRow_forComponent_ = objc.registerName( + "viewForRow:forComponent:", ); late final _sel_viewSizeChanged_ = objc.registerName("viewSizeChanged:"); -late final _sel_viewWillDraw = objc.registerName("viewWillDraw"); -late final _sel_viewWillMoveToSuperview_ = objc.registerName( - "viewWillMoveToSuperview:", -); -late final _sel_viewWillMoveToWindow_ = objc.registerName( - "viewWillMoveToWindow:", -); -late final _sel_viewWillStartLiveResize = objc.registerName( - "viewWillStartLiveResize", -); -late final _sel_viewWithTag_ = objc.registerName("viewWithTag:"); -late final _sel_viewsNeedDisplay = objc.registerName("viewsNeedDisplay"); -late final _sel_visibleRect = objc.registerName("visibleRect"); -late final _sel_wantsDefaultClipping = objc.registerName( - "wantsDefaultClipping", -); -late final _sel_wantsForwardedScrollEventsForAxis_ = objc.registerName( - "wantsForwardedScrollEventsForAxis:", -); -late final _sel_wantsLayer = objc.registerName("wantsLayer"); -late final _sel_wantsPeriodicDraggingUpdates = objc.registerName( - "wantsPeriodicDraggingUpdates", -); -late final _sel_wantsRestingTouches = objc.registerName("wantsRestingTouches"); -late final _sel_wantsScrollEventsForSwipeTrackingOnAxis_ = objc.registerName( - "wantsScrollEventsForSwipeTrackingOnAxis:", -); -late final _sel_wantsUpdateLayer = objc.registerName("wantsUpdateLayer"); -late final _sel_webpageURL = objc.registerName("webpageURL"); -late final _sel_widthAdjustLimit = objc.registerName("widthAdjustLimit"); -late final _sel_willOpenMenu_withEvent_ = objc.registerName( - "willOpenMenu:withEvent:", -); -late final _sel_willPresentError_ = objc.registerName("willPresentError:"); -late final _sel_willRemoveSubview_ = objc.registerName("willRemoveSubview:"); -late final _sel_window = objc.registerName("window"); -late final _sel_windowController = objc.registerName("windowController"); -late final _sel_windowDidBecomeKey_ = objc.registerName("windowDidBecomeKey:"); -late final _sel_windowDidBecomeMain_ = objc.registerName( - "windowDidBecomeMain:", -); -late final _sel_windowDidChangeBackingProperties_ = objc.registerName( - "windowDidChangeBackingProperties:", -); -late final _sel_windowDidChangeOcclusionState_ = objc.registerName( - "windowDidChangeOcclusionState:", -); -late final _sel_windowDidChangeScreenProfile_ = objc.registerName( - "windowDidChangeScreenProfile:", -); -late final _sel_windowDidChangeScreen_ = objc.registerName( - "windowDidChangeScreen:", -); -late final _sel_windowDidDeminiaturize_ = objc.registerName( - "windowDidDeminiaturize:", -); -late final _sel_windowDidEndLiveResize_ = objc.registerName( - "windowDidEndLiveResize:", -); -late final _sel_windowDidEndSheet_ = objc.registerName("windowDidEndSheet:"); -late final _sel_windowDidEnterFullScreen_ = objc.registerName( - "windowDidEnterFullScreen:", -); -late final _sel_windowDidEnterVersionBrowser_ = objc.registerName( - "windowDidEnterVersionBrowser:", -); -late final _sel_windowDidExitFullScreen_ = objc.registerName( - "windowDidExitFullScreen:", -); -late final _sel_windowDidExitVersionBrowser_ = objc.registerName( - "windowDidExitVersionBrowser:", -); -late final _sel_windowDidExpose_ = objc.registerName("windowDidExpose:"); -late final _sel_windowDidFailToEnterFullScreen_ = objc.registerName( - "windowDidFailToEnterFullScreen:", -); -late final _sel_windowDidFailToExitFullScreen_ = objc.registerName( - "windowDidFailToExitFullScreen:", -); -late final _sel_windowDidMiniaturize_ = objc.registerName( - "windowDidMiniaturize:", -); -late final _sel_windowDidMove_ = objc.registerName("windowDidMove:"); -late final _sel_windowDidResignKey_ = objc.registerName("windowDidResignKey:"); -late final _sel_windowDidResignMain_ = objc.registerName( - "windowDidResignMain:", -); -late final _sel_windowDidResize_ = objc.registerName("windowDidResize:"); -late final _sel_windowDidUpdate_ = objc.registerName("windowDidUpdate:"); -late final _sel_windowForSharingRequestFromWindow_ = objc.registerName( - "windowForSharingRequestFromWindow:", -); -late final _sel_windowNumber = objc.registerName("windowNumber"); -late final _sel_windowNumberAtPoint_belowWindowWithWindowNumber_ = objc - .registerName("windowNumberAtPoint:belowWindowWithWindowNumber:"); -late final _sel_windowNumbersWithOptions_ = objc.registerName( - "windowNumbersWithOptions:", -); -late final _sel_windowRef = objc.registerName("windowRef"); -late final _sel_windowShouldClose_ = objc.registerName("windowShouldClose:"); -late final _sel_windowShouldZoom_toFrame_ = objc.registerName( - "windowShouldZoom:toFrame:", -); -late final _sel_windowTitlebarLayoutDirection = objc.registerName( - "windowTitlebarLayoutDirection", -); -late final _sel_windowWillBeginSheet_ = objc.registerName( - "windowWillBeginSheet:", -); -late final _sel_windowWillClose_ = objc.registerName("windowWillClose:"); -late final _sel_windowWillEnterFullScreen_ = objc.registerName( - "windowWillEnterFullScreen:", -); -late final _sel_windowWillEnterVersionBrowser_ = objc.registerName( - "windowWillEnterVersionBrowser:", -); -late final _sel_windowWillExitFullScreen_ = objc.registerName( - "windowWillExitFullScreen:", -); -late final _sel_windowWillExitVersionBrowser_ = objc.registerName( - "windowWillExitVersionBrowser:", -); -late final _sel_windowWillMiniaturize_ = objc.registerName( - "windowWillMiniaturize:", -); -late final _sel_windowWillMove_ = objc.registerName("windowWillMove:"); -late final _sel_windowWillResize_toSize_ = objc.registerName( - "windowWillResize:toSize:", -); -late final _sel_windowWillReturnFieldEditor_toObject_ = objc.registerName( - "windowWillReturnFieldEditor:toObject:", -); -late final _sel_windowWillReturnUndoManager_ = objc.registerName( - "windowWillReturnUndoManager:", -); -late final _sel_windowWillStartLiveResize_ = objc.registerName( - "windowWillStartLiveResize:", -); -late final _sel_windowWillUseStandardFrame_defaultFrame_ = objc.registerName( - "windowWillUseStandardFrame:defaultFrame:", -); -late final _sel_windowWithContentViewController_ = objc.registerName( - "windowWithContentViewController:", -); -late final _sel_window_didDecodeRestorableState_ = objc.registerName( - "window:didDecodeRestorableState:", -); -late final _sel_window_shouldDragDocumentWithEvent_from_withPasteboard_ = objc - .registerName("window:shouldDragDocumentWithEvent:from:withPasteboard:"); -late final _sel_window_shouldPopUpDocumentPathMenu_ = objc.registerName( - "window:shouldPopUpDocumentPathMenu:", -); -late final _sel_window_startCustomAnimationToEnterFullScreenOnScreen_withDuration_ = - objc.registerName( - "window:startCustomAnimationToEnterFullScreenOnScreen:withDuration:", - ); -late final _sel_window_startCustomAnimationToEnterFullScreenWithDuration_ = objc - .registerName("window:startCustomAnimationToEnterFullScreenWithDuration:"); -late final _sel_window_startCustomAnimationToExitFullScreenWithDuration_ = objc - .registerName("window:startCustomAnimationToExitFullScreenWithDuration:"); -late final _sel_window_willEncodeRestorableState_ = objc.registerName( - "window:willEncodeRestorableState:", -); -late final _sel_window_willPositionSheet_usingRect_ = objc.registerName( - "window:willPositionSheet:usingRect:", -); -late final _sel_window_willResizeForVersionBrowserWithMaxPreferredSize_maxAllowedSize_ = - objc.registerName( - "window:willResizeForVersionBrowserWithMaxPreferredSize:maxAllowedSize:", - ); -late final _sel_window_willUseFullScreenContentSize_ = objc.registerName( - "window:willUseFullScreenContentSize:", -); -late final _sel_window_willUseFullScreenPresentationOptions_ = objc - .registerName("window:willUseFullScreenPresentationOptions:"); -late final _sel_worksWhenModal = objc.registerName("worksWhenModal"); -late final _sel_writeEPSInsideRect_toPasteboard_ = objc.registerName( - "writeEPSInsideRect:toPasteboard:", -); -late final _sel_writeFileContents_ = objc.registerName("writeFileContents:"); -late final _sel_writeFileWrapper_ = objc.registerName("writeFileWrapper:"); -late final _sel_writeObjects_ = objc.registerName("writeObjects:"); -late final _sel_writePDFInsideRect_toPasteboard_ = objc.registerName( - "writePDFInsideRect:toPasteboard:", -); -late final _sel_writeRTFDToFile_atomically_ = objc.registerName( - "writeRTFDToFile:atomically:", -); -late final _sel_writeToFile_atomically_updateFilenames_ = objc.registerName( - "writeToFile:atomically:updateFilenames:", -); -late final _sel_writeToURL_options_originalContentsURL_error_ = objc - .registerName("writeToURL:options:originalContentsURL:error:"); -late final _sel_writingToolsCoordinator = objc.registerName( - "writingToolsCoordinator", -); -late final _sel_writingToolsItems = objc.registerName("writingToolsItems"); -late final _sel_yank_ = objc.registerName("yank:"); -late final _sel_zoom_ = objc.registerName("zoom:"); typedef instancetype = ffi.Pointer; typedef Dartinstancetype = objc.ObjCObject; diff --git a/pkgs/ffigen/test/native_objc_test/swift_unavailable_test.dart b/pkgs/ffigen/test/native_objc_test/swift_unavailable_test.dart index 84aa4a59b1..da5be5fb2b 100644 --- a/pkgs/ffigen/test/native_objc_test/swift_unavailable_test.dart +++ b/pkgs/ffigen/test/native_objc_test/swift_unavailable_test.dart @@ -47,11 +47,10 @@ void main() { ), ], ), - objectiveC: ObjectiveC( - interfaces: Interfaces( - include: (decl) => {'Animal'}.contains(decl.originalName), - ), - ), + objectiveC: const ObjectiveC(), + visitors: const [ + IncludeSetVisitor(objcInterfaces: {'Animal'}), + ], ).generate(logger: createTestLogger()); final file = path.join( packagePathForTests, diff --git a/pkgs/ffigen/test/native_objc_test/transitive_test.dart b/pkgs/ffigen/test/native_objc_test/transitive_test.dart index 371987996f..1bc098f7d2 100644 --- a/pkgs/ffigen/test/native_objc_test/transitive_test.dart +++ b/pkgs/ffigen/test/native_objc_test/transitive_test.dart @@ -15,9 +15,7 @@ import 'package:test/test.dart'; import '../test_utils.dart'; String generate({ - bool includeTransitiveObjCInterfaces = false, - bool includeTransitiveObjCProtocols = false, - bool includeTransitiveObjCCategories = false, + bool includeTransitiveObjCCategories = true, }) { FfiGenerator( output: Output( @@ -47,27 +45,35 @@ String generate({ ), ], ), - objectiveC: ObjectiveC( - interfaces: Interfaces( - include: (decl) => { - 'DirectlyIncluded', - 'DirectlyIncludedWithProtocol', - 'DirectlyIncludedIntForCat', - 'Bug2935DirectInterface', - }.contains(decl.originalName), - includeTransitive: includeTransitiveObjCInterfaces, + objectiveC: const ObjectiveC(), + visitors: [ + Visitor( + visitObjCInterface: (node) { + if ({ + 'DirectlyIncluded', + 'DirectlyIncludedWithProtocol', + 'DirectlyIncludedIntForCat', + 'Bug2935DirectInterface', + }.contains(node.originalName)) { + node.isIncluded = true; + } + node.includeCategories = includeTransitiveObjCCategories; + }, + visitObjCProtocol: (node) { + if ({'DirectlyIncludedProtocol'}.contains(node.originalName)) { + node.isIncluded = true; + } + }, + visitObjCCategory: (node) { + if ({'DirectlyIncludedCategory'}.contains(node.originalName)) { + node.isIncluded = true; + } + }, + visitEnum: (node) { + node.silenceWarning = true; + }, ), - protocols: Protocols( - include: (decl) => - {'DirectlyIncludedProtocol'}.contains(decl.originalName), - includeTransitive: includeTransitiveObjCProtocols, - ), - categories: Categories( - include: (decl) => - {'DirectlyIncludedCategory'}.contains(decl.originalName), - includeTransitive: includeTransitiveObjCCategories, - ), - ), + ], ).generate(logger: createTestLogger()); final file = path.join( packagePathForTests, @@ -87,30 +93,31 @@ void main() { Inclusion incItf(String name) { final classDef = bindings.contains( - 'extension type $name._(objc.ObjCObject ', + RegExp('extension type \\b$name\\._\\(objc\\.ObjCObject '), ); - final stubWarn = bindings.contains('WARNING: $name is a stub.'); final isInst = bindings.contains( '/// Returns whether [obj] is an instance of [$name].', ); - final any = bindings.contains(RegExp('\\W$name\\W')); - if (classDef && stubWarn && !isInst && any) return Inclusion.stubbed; - if (classDef && !stubWarn && isInst && any) return Inclusion.included; - if (!classDef && !stubWarn && !isInst && !any) return Inclusion.omitted; + final any = bindings.contains(RegExp('\\b$name\\b')); + if (classDef && !isInst && any) return Inclusion.stubbed; + if (classDef && isInst && any) return Inclusion.included; + if (!classDef && !isInst && !any) return Inclusion.omitted; throw Exception( - 'Bad interface: $name ($classDef, $stubWarn, $isInst, $any)', + 'Bad interface: $name ($classDef, $isInst, $any)', ); } Inclusion incProto(String name) { final classDef = bindings.contains( - 'extension type $name._(objc.ObjCProtocol ', + RegExp('extension type \\b$name\\._\\(objc\\.ObjCProtocol '), + ); + final stubWarn = bindings.contains( + RegExp('WARNING: \\b$name is a stub\\.'), ); - final stubWarn = bindings.contains('WARNING: $name is a stub.'); final hasImpl = bindings.contains( '/// Adds the implementation of the $name protocol', ); - final any = bindings.contains(RegExp('\\W$name\\W')); + final any = bindings.contains(RegExp('\\b$name\\b')); if (classDef && stubWarn && !hasImpl && any) return Inclusion.stubbed; if (classDef && !stubWarn && hasImpl && any) return Inclusion.included; if (!classDef && !stubWarn && !hasImpl && !any) return Inclusion.omitted; @@ -120,53 +127,16 @@ void main() { } Inclusion incCat(String name) { - final classDef = bindings.contains('extension $name '); - final any = bindings.contains(RegExp('\\W$name\\W')); + final classDef = bindings.contains(RegExp('extension \\b$name\\b')); + final any = bindings.contains(RegExp('\\b$name\\b')); if (classDef && any) return Inclusion.included; if (!classDef && !any) return Inclusion.omitted; - throw Exception('Bad protocol: $name ($classDef, $any)'); + throw Exception('Bad category: $name ($classDef, $any)'); } group('transitive interfaces', () { - test('included', () { - bindings = generate(includeTransitiveObjCInterfaces: true); - - expect(incItf('DoublyTransitive'), Inclusion.included); - expect(incItf('TransitiveSuper'), Inclusion.included); - expect(incItf('Transitive'), Inclusion.included); - expect(incItf('SuperSuperType'), Inclusion.included); - expect(incItf('DoublySuperTransitive'), Inclusion.included); - expect(incItf('SuperTransitive'), Inclusion.included); - expect(incItf('SuperType'), Inclusion.included); - expect(incItf('DirectlyIncluded'), Inclusion.included); - expect(incItf('NotIncludedSuperType'), Inclusion.omitted); - expect(incItf('NotIncludedTransitive'), Inclusion.omitted); - expect(incItf('NotIncludedSuperType'), Inclusion.omitted); - expect(incItf('Bug2935DirectInterface'), Inclusion.included); - expect(incItf('Bug2935TransitiveInterface'), Inclusion.included); - expect(incItf('Bug2935TransitiveBlockInterface'), Inclusion.included); - - expect(bindings.contains('doubleMethod'), isTrue); - expect(bindings.contains('transitiveSuperMethod'), isTrue); - expect(bindings.contains('transitiveMethod'), isTrue); - expect(bindings.contains('superSuperMethod'), isTrue); - expect(bindings.contains('doublySuperMethod'), isTrue); - expect(bindings.contains('superTransitiveMethod'), isTrue); - expect(bindings.contains('superMethod'), isTrue); - expect(bindings.contains('directMethod'), isTrue); - expect(bindings.contains('notIncludedSuperMethod'), isFalse); - expect(bindings.contains('notIncludedTransitiveMethod'), isFalse); - expect(bindings.contains('notIncludedMethod'), isFalse); - expect(bindings.contains('bug2935DirectInterfaceMethod'), isTrue); - expect(bindings.contains('bug2935TransitiveInterfaceMethod'), isTrue); - expect( - bindings.contains('bug2935TransitiveBlockInterfaceMethod'), - isTrue, - ); - }); - test('stubbed', () { - bindings = generate(includeTransitiveObjCInterfaces: false); + bindings = generate(); expect(incItf('DoublyTransitive'), Inclusion.omitted); expect(incItf('TransitiveSuper'), Inclusion.stubbed); @@ -204,46 +174,8 @@ void main() { }); group('transitive protocols', () { - test('included', () { - bindings = generate(includeTransitiveObjCProtocols: true); - - expect(incProto('DoublyTransitiveProtocol'), Inclusion.included); - expect(incProto('TransitiveSuperProtocol'), Inclusion.included); - expect(incProto('TransitiveProtocol'), Inclusion.included); - expect(incProto('SuperSuperProtocol'), Inclusion.included); - expect(incProto('DoublySuperTransitiveProtocol'), Inclusion.included); - expect(incProto('SuperTransitiveProtocol'), Inclusion.included); - expect(incProto('SuperProtocol'), Inclusion.included); - expect(incProto('AnotherSuperProtocol'), Inclusion.included); - expect(incProto('DirectlyIncludedProtocol'), Inclusion.included); - expect(incProto('NotIncludedSuperProtocol'), Inclusion.omitted); - expect(incProto('NotIncludedTransitiveProtocol'), Inclusion.omitted); - expect(incProto('NotIncludedProtocol'), Inclusion.omitted); - expect(incProto('SuperFromInterfaceProtocol'), Inclusion.included); - expect(incProto('TransitiveFromInterfaceProtocol'), Inclusion.included); - expect(incItf('DirectlyIncludedWithProtocol'), Inclusion.included); - expect(incProto('Bug2935TransitiveProtocol'), Inclusion.included); - - expect(bindings.contains('doubleProtoMethod'), isTrue); - expect(bindings.contains('transitiveSuperProtoMethod'), isTrue); - expect(bindings.contains('transitiveProtoMethod'), isTrue); - expect(bindings.contains('superSuperProtoMethod'), isTrue); - expect(bindings.contains('doublySuperProtoMethod'), isTrue); - expect(bindings.contains('superTransitiveProtoMethod'), isTrue); - expect(bindings.contains('superProtoMethod'), isTrue); - expect(bindings.contains('anotherSuperProtoMethod'), isTrue); - expect(bindings.contains('directProtoMethod'), isTrue); - expect(bindings.contains('notIncludedSuperProtoMethod'), isFalse); - expect(bindings.contains('notIncludedTransitiveProtoMethod'), isFalse); - expect(bindings.contains('notIncludedProtoMethod'), isFalse); - expect(bindings.contains('superFromInterfaceProtoMethod'), isTrue); - expect(bindings.contains('transitiveFromInterfaceProtoMethod'), isTrue); - expect(bindings.contains('directlyIncludedWithProtoMethod'), isTrue); - expect(bindings.contains('bug2935TransitiveProtocolMethod'), isTrue); - }); - test('not included', () { - bindings = generate(includeTransitiveObjCProtocols: false); + bindings = generate(); expect(incProto('DoublyTransitiveProtocol'), Inclusion.omitted); expect(incProto('TransitiveSuperProtocol'), Inclusion.stubbed); diff --git a/pkgs/ffigen/test/native_objc_test/transitive_test.h b/pkgs/ffigen/test/native_objc_test/transitive_test.h index b5bd49e15f..76489a0369 100644 --- a/pkgs/ffigen/test/native_objc_test/transitive_test.h +++ b/pkgs/ffigen/test/native_objc_test/transitive_test.h @@ -2,6 +2,8 @@ // 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 + // === Interfaces === @interface DoublyTransitive {} diff --git a/pkgs/ffigen/test/public_ast_visitor_test.dart b/pkgs/ffigen/test/public_ast_visitor_test.dart index c365593be7..1aafd9d2f2 100644 --- a/pkgs/ffigen/test/public_ast_visitor_test.dart +++ b/pkgs/ffigen/test/public_ast_visitor_test.dart @@ -191,6 +191,37 @@ void main() { final enumClass = library.getBinding('Simple') as code_gen.EnumClass; expect(enumClass.silenceWarning, isTrue); }); + + test('ObjCInterface.includeCategories option on public AST', () { + final headerUri = Uri.file( + absPath('test/native_objc_test/transitive_test.h'), + ); + final generator = FfiGenerator( + headers: Headers(entryPoints: [headerUri]), + output: Output(dartFile: Uri.file('unused.dart')), + objectiveC: const ObjectiveC(), + visitors: [ + const IncludeSetVisitor( + objcInterfaces: {'DirectlyIncludedIntForCat'}, + ), + Visitor( + visitObjCInterface: (node) { + if (node.originalName == 'DirectlyIncludedIntForCat') { + expect(node.includeCategories, isTrue); + node.includeCategories = false; + expect(node.includeCategories, isFalse); + } + }, + ), + ], + ); + + final library = parser.parse(testContext(generator)); + final interface = + library.getBinding('DirectlyIncludedIntForCat') + as code_gen.ObjCInterface; + expect(interface.includeCategories, isFalse); + }); }); } From 13f437006d1cb85aeb37262341e51b2f5e419122 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Wed, 29 Jul 2026 17:29:39 +1000 Subject: [PATCH 12/37] missed some files --- .../lib/src/config_provider/yaml_config.dart | 2 ++ pkgs/ffigen/lib/src/header_parser/parser.dart | 9 ++++++-- .../src/visitor/fill_method_dependencies.dart | 1 + .../lib/src/visitor/find_transitive_deps.dart | 12 +++++++---- .../protocol_test_bindings.dart | 21 ------------------- 5 files changed, 18 insertions(+), 27 deletions(-) diff --git a/pkgs/ffigen/lib/src/config_provider/yaml_config.dart b/pkgs/ffigen/lib/src/config_provider/yaml_config.dart index 7cb13715cb..3351e6a6d0 100644 --- a/pkgs/ffigen/lib/src/config_provider/yaml_config.dart +++ b/pkgs/ffigen/lib/src/config_provider/yaml_config.dart @@ -1333,6 +1333,8 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { node.isIncluded = false; } else if (decl.excludeAllByDefault) { node.isIncluded = false; + } else if (node is public_ast.ObjCInterface && node.isObjCImport) { + node.isIncluded = false; } else { node.isIncluded = true; } diff --git a/pkgs/ffigen/lib/src/header_parser/parser.dart b/pkgs/ffigen/lib/src/header_parser/parser.dart index 1dcc4462c0..c2ebd04b65 100644 --- a/pkgs/ffigen/lib/src/header_parser/parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/parser.dart @@ -178,13 +178,18 @@ List transformBindings(List rawBindings, Context context) { visit(context, FixOverriddenMethodsVisitation(context), allBindings); // Execute Public AST visitors. - final publicAst = public_ast.PublicAst.fromBindings(rawBindings); + final allBindingsWithImports = allBindings.union( + rawBindings.where((b) => b.isObjCImport).toSet(), + ); + final publicAst = public_ast.PublicAst.fromBindings( + allBindingsWithImports.toList(), + ); for (final v in config.visitors) { publicAst.accept(v); } final applyConfigFiltersVisitation = ApplyConfigFiltersVisitation(config); - visit(context, applyConfigFiltersVisitation, rawBindings); + visit(context, applyConfigFiltersVisitation, allBindingsWithImports); final directlyIncluded = applyConfigFiltersVisitation.directlyIncluded; final indirectlyIncluded = applyConfigFiltersVisitation.indirectlyIncluded; final included = directlyIncluded.union(indirectlyIncluded); diff --git a/pkgs/ffigen/lib/src/visitor/fill_method_dependencies.dart b/pkgs/ffigen/lib/src/visitor/fill_method_dependencies.dart index 4de98d583f..3dbfe1e70f 100644 --- a/pkgs/ffigen/lib/src/visitor/fill_method_dependencies.dart +++ b/pkgs/ffigen/lib/src/visitor/fill_method_dependencies.dart @@ -95,6 +95,7 @@ class _MethodDepAdderVisitation extends Visitation { @override void visitObjCInterface(ObjCInterface node) { + if (node.isObjCImport) return; if (!finalBindings.contains(node)) { node.generateAsStub = true; finalBindings.add(node); diff --git a/pkgs/ffigen/lib/src/visitor/find_transitive_deps.dart b/pkgs/ffigen/lib/src/visitor/find_transitive_deps.dart index e22f4cd738..8398c7d2e7 100644 --- a/pkgs/ffigen/lib/src/visitor/find_transitive_deps.dart +++ b/pkgs/ffigen/lib/src/visitor/find_transitive_deps.dart @@ -31,14 +31,18 @@ class FindTransitiveDepsVisitation extends Visitation { @override void visitEnumClass(EnumClass node) { - if (node.isAnonymous) return; - visitBinding(node); + node.visitChildren(visitor); + if (!node.isAnonymous) { + transitives.add(node); + } } @override void visitTypealias(Typealias node) { - if (node.isAnonymous) return; - visitBinding(node); + node.visitChildren(visitor); + if (!node.isAnonymous) { + transitives.add(node); + } } } diff --git a/pkgs/ffigen/test/native_objc_test/protocol_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/protocol_test_bindings.dart index 36425ee0ed..7100665a4f 100644 --- a/pkgs/ffigen/test/native_objc_test/protocol_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/protocol_test_bindings.dart @@ -646,27 +646,6 @@ interface class MyProtocol$Builder { ); } -/// NSString -/// -/// NSString -extension type NSString._(objc.ObjCObject object$) - implements - objc.ObjCObject, - objc.NSObject, - objc.NSCopying, - objc.NSMutableCopying, - objc.NSSecureCoding { - /// Constructs a [NSString] that points to the same underlying object as [other]. - NSString.as(objc.ObjCObject other) : object$ = other {} - - /// Constructs a [NSString] that wraps the given raw object pointer. - NSString.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) {} -} - /// Construction methods for `objc.ObjCBlock)>`. abstract final class ObjCBlock_Int32_ffiVoid { /// Returns a block that wraps the given raw block pointer. From c2ed9c8ddd00b8f3a6807d840a8cf3f90efb9568 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Wed, 29 Jul 2026 18:07:28 +1000 Subject: [PATCH 13/37] Move more bools to the AST --- .../libclang-example/generated_bindings.dart | 15 +- pkgs/ffigen/lib/ffigen.dart | 5 - .../lib/src/code_generator/compound.dart | 3 + .../lib/src/code_generator/library.dart | 28 +++- .../src/code_generator/objc_interface.dart | 1 + .../lib/src/code_generator/objc_protocol.dart | 1 + .../lib/src/code_generator/typealias.dart | 26 +++- .../ffigen/lib/src/code_generator/writer.dart | 4 +- .../lib/src/config_provider/config.dart | 145 +----------------- .../lib/src/config_provider/config_types.dart | 7 +- .../lib/src/config_provider/yaml_config.dart | 108 +++++++------ pkgs/ffigen/lib/src/header_parser/parser.dart | 2 +- .../sub_parsers/classdecl_parser.dart | 8 +- .../sub_parsers/compounddecl_parser.dart | 14 +- .../sub_parsers/enumdecl_parser.dart | 1 - .../sub_parsers/functiondecl_parser.dart | 10 +- .../sub_parsers/objccategorydecl_parser.dart | 10 +- .../sub_parsers/objcinterfacedecl_parser.dart | 8 +- .../sub_parsers/objcprotocoldecl_parser.dart | 10 +- .../type_extractor/extractor.dart | 33 +--- .../ffigen/lib/src/public_ast/public_ast.dart | 50 +++--- .../ffigen/lib/src/visitor/list_bindings.dart | 14 +- .../lib/src/visitor/opaque_compounds.dart | 17 +- .../reserved_keyword_collision_test.dart | 6 +- .../_expected_typedef_bindings.dart | 9 +- .../test/header_parser_tests/sort_test.dart | 6 +- .../_expected_libclang_bindings.dart | 8 +- .../large_objc_test.dart | 40 ++--- .../large_integration_tests/large_test.dart | 12 +- .../native_objc_test/transitive_test.dart | 8 +- pkgs/ffigen/test/public_ast_visitor_test.dart | 10 +- pkgs/ffigen/test/test_utils.dart | 6 +- pkgs/ffigen/tool/generate_code.dart | 15 +- 33 files changed, 245 insertions(+), 395 deletions(-) diff --git a/pkgs/ffigen/example/libclang-example/generated_bindings.dart b/pkgs/ffigen/example/libclang-example/generated_bindings.dart index 6bba59bdc5..bda253f448 100644 --- a/pkgs/ffigen/example/libclang-example/generated_bindings.dart +++ b/pkgs/ffigen/example/libclang-example/generated_bindings.dart @@ -7,7 +7,6 @@ // // Generated by `package:ffigen`. // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package -import 'custom_import.dart' as custom_import; import 'dart:ffi' as ffi; /// Holds bindings to LibClang. @@ -4407,9 +4406,7 @@ class LibClang { } late final _clang_getFileTimePtr = - _lookup>( - 'clang_getFileTime', - ); + _lookup>('clang_getFileTime'); late final _clang_getFileTime = _clang_getFileTimePtr .asFunction(); @@ -7483,7 +7480,7 @@ class _SymbolAddresses { get clang_getFileLocation => _library._clang_getFileLocationPtr; ffi.Pointer> get clang_getFileName => _library._clang_getFileNamePtr; - ffi.Pointer> + ffi.Pointer> get clang_getFileTime => _library._clang_getFileTimePtr; ffi.Pointer< ffi.NativeFunction)> @@ -9654,7 +9651,9 @@ enum CXCursorKind { } /// A fast container representing a set of CXCursors. -typedef CXCursorSet = ffi.Pointer; +typedef CXCursorSet = ffi.Pointer; + +final class CXCursorSetImpl extends ffi.Opaque {} /// Visitor invoked for each cursor found by a traversal. /// @@ -12067,3 +12066,7 @@ final class IndexerCallbacks extends ffi.Struct { ..ref.indexDeclaration = indexDeclaration ..ref.indexEntityReference = indexEntityReference; } + +typedef __darwin_time_t = ffi.Long; +typedef Dart__darwin_time_t = int; +typedef time_t = __darwin_time_t; diff --git a/pkgs/ffigen/lib/ffigen.dart b/pkgs/ffigen/lib/ffigen.dart index 3c29a7f94e..0fdc230c52 100644 --- a/pkgs/ffigen/lib/ffigen.dart +++ b/pkgs/ffigen/lib/ffigen.dart @@ -24,20 +24,15 @@ export 'src/config_provider.dart' Declaration, DynamicLibraryBindings, EnumStyle, - Enums, ExternalVersions, FfiGenerator, Functions, Headers, - Integers, NativeExternalBindings, ObjectiveC, Output, PackingValue, - Structs, SymbolFile, - Typedefs, - Unions, VarArgFunction, Version, Versions, diff --git a/pkgs/ffigen/lib/src/code_generator/compound.dart b/pkgs/ffigen/lib/src/code_generator/compound.dart index c073c6d70b..616d20b07e 100644 --- a/pkgs/ffigen/lib/src/code_generator/compound.dart +++ b/pkgs/ffigen/lib/src/code_generator/compound.dart @@ -20,6 +20,8 @@ abstract class Compound extends BindingType with HasLocalScope { /// A function can be safely pass this struct by value if it's complete. bool isIncomplete; + CompoundDependencies dependencies; + final List members; bool get isOpaque => members.isEmpty; @@ -45,6 +47,7 @@ abstract class Compound extends BindingType with HasLocalScope { super.originalName, required super.name, this.isIncomplete = false, + this.dependencies = CompoundDependencies.full, super.dartDoc, List? members, super.isInternal, diff --git a/pkgs/ffigen/lib/src/code_generator/library.dart b/pkgs/ffigen/lib/src/code_generator/library.dart index 271661c9de..970cedee73 100644 --- a/pkgs/ffigen/lib/src/code_generator/library.dart +++ b/pkgs/ffigen/lib/src/code_generator/library.dart @@ -63,15 +63,27 @@ class Library { ? outputStyle.assetId : null; - for (final binding in bindings.whereType()) { - final loadFromNativeAsset = binding.loadFromNativeAsset; - - // At the moment, all bindings share their native config. - if (loadFromNativeAsset) nativeAssetId = outputStyleAssetId; - - (loadFromNativeAsset ? nativeBindings : lookupBindings).add(binding); + for (final binding in bindings) { + if (binding is LookUpBinding) { + if (binding is Global && + !binding.exposeSymbolAddress && + binding.constantValue != null) { + continue; + } + final loadFromNativeAsset = binding.loadFromNativeAsset; + + // At the moment, all bindings share their native config. + if (loadFromNativeAsset) nativeAssetId = outputStyleAssetId; + + (loadFromNativeAsset ? nativeBindings : lookupBindings).add(binding); + } } - final noLookUpBindings = bindings.whereType().toList(); + final noLookUpBindings = [ + ...bindings.whereType(), + ...bindings.whereType().where( + (g) => !g.exposeSymbolAddress && g.constantValue != null, + ), + ]; final hasNoLookupNativeHelper = noLookUpBindings.any( (b) => b.hasNativeHelperFunctions, ); diff --git a/pkgs/ffigen/lib/src/code_generator/objc_interface.dart b/pkgs/ffigen/lib/src/code_generator/objc_interface.dart index 40026d83a4..2b7a1b5661 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_interface.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_interface.dart @@ -25,6 +25,7 @@ class ObjCInterface extends BindingType with ObjCMethods, HasLocalScope { _module = value; classObject = ObjCClassGlobal('_class_$originalName', originalName, value); } + late NoLookUpBinding classObject; late final ObjCInternalGlobal _isKindOfClass; late final ObjCMsgSendFunc _isKindOfClassMsgSend; diff --git a/pkgs/ffigen/lib/src/code_generator/objc_protocol.dart b/pkgs/ffigen/lib/src/code_generator/objc_protocol.dart index 9b5e77c006..4a88596533 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_protocol.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_protocol.dart @@ -28,6 +28,7 @@ class ObjCProtocol extends BindingType with ObjCMethods, HasLocalScope { loaderSymbol, ); } + late ObjCProtocolGlobal _protocolPointer; late final ObjCInternalGlobal _conformsTo; late final ObjCMsgSendFunc _conformsToMsgSend; diff --git a/pkgs/ffigen/lib/src/code_generator/typealias.dart b/pkgs/ffigen/lib/src/code_generator/typealias.dart index dbd3687156..5263d14635 100644 --- a/pkgs/ffigen/lib/src/code_generator/typealias.dart +++ b/pkgs/ffigen/lib/src/code_generator/typealias.dart @@ -26,6 +26,9 @@ class Typealias extends BindingType { // Don't code gen this alias at all, just use the [type] directly. bool isAnonymous; + bool includeUnused; + bool useSupportedTypedefs; + /// Creates a Typealias. /// /// If [genFfiDartType] is true, a binding is generated for the Ffi Dart type @@ -38,6 +41,8 @@ class Typealias extends BindingType { required Type type, bool genFfiDartType = false, bool isInternal = false, + bool includeUnused = false, + bool useSupportedTypedefs = true, }) { final funcType = _getFunctionTypeFromPointer(type); if (funcType != null) { @@ -48,6 +53,8 @@ class Typealias extends BindingType { type: funcType, genFfiDartType: genFfiDartType, isInternal: isInternal, + includeUnused: includeUnused, + useSupportedTypedefs: useSupportedTypedefs, ), ), ); @@ -62,6 +69,8 @@ class Typealias extends BindingType { type: type, genFfiDartType: genFfiDartType, isInternal: isInternal, + includeUnused: includeUnused, + useSupportedTypedefs: useSupportedTypedefs, ); } return Typealias._( @@ -72,6 +81,8 @@ class Typealias extends BindingType { type: type, genFfiDartType: genFfiDartType, isInternal: isInternal, + includeUnused: includeUnused, + useSupportedTypedefs: useSupportedTypedefs, ); } @@ -79,7 +90,16 @@ class Typealias extends BindingType { required String usr, required String name, required Type type, - }) : this._(usr: usr, name: name, type: type, isAnonymous: true); + bool includeUnused = false, + bool useSupportedTypedefs = true, + }) : this._( + usr: usr, + name: name, + type: type, + isAnonymous: true, + includeUnused: includeUnused, + useSupportedTypedefs: useSupportedTypedefs, + ); Typealias._({ super.usr, @@ -90,6 +110,8 @@ class Typealias extends BindingType { bool genFfiDartType = false, super.isInternal, this.isAnonymous = false, + this.includeUnused = false, + this.useSupportedTypedefs = true, }) : _ffiDartAliasName = genFfiDartType ? Symbol('Dart$name', SymbolKind.klass) : null, @@ -244,6 +266,8 @@ class ObjCInstanceType extends Typealias { required super.type, super.genFfiDartType, super.isInternal, + super.includeUnused, + super.useSupportedTypedefs, }) : super._(); @override diff --git a/pkgs/ffigen/lib/src/code_generator/writer.dart b/pkgs/ffigen/lib/src/code_generator/writer.dart index 14c00646ca..605c898247 100644 --- a/pkgs/ffigen/lib/src/code_generator/writer.dart +++ b/pkgs/ffigen/lib/src/code_generator/writer.dart @@ -189,8 +189,8 @@ const _\$objcVersionCheck = $objcPrefix.ObjCVersionCheck( final usedEnums = visit(context, _FindEnumsVisitation(), notEnums).enums; final unSilencedUsedEnums = usedEnums.where((e) => !e.silenceWarning); if (unSilencedUsedEnums.isNotEmpty) { - final names = - unSilencedUsedEnums.map((e) => e.originalName).toList()..sort(); + final names = unSilencedUsedEnums.map((e) => e.originalName).toList() + ..sort(); context.logger.severe( 'The integer type used for enums is ' 'implementation-defined. FFIgen tries to mimic the integer sizes ' diff --git a/pkgs/ffigen/lib/src/config_provider/config.dart b/pkgs/ffigen/lib/src/config_provider/config.dart index d8e8c78a47..6f757e1a39 100644 --- a/pkgs/ffigen/lib/src/config_provider/config.dart +++ b/pkgs/ffigen/lib/src/config_provider/config.dart @@ -25,12 +25,6 @@ final class FfiGenerator { /// Configuration for functions. final Functions functions; - /// Configuration for integer types. - final Integers integers; - - /// Configuration for structs. - final Structs structs; - /// C++ specific configuration. /// /// If `null`, C++ class bindings will not be generated. @@ -39,12 +33,6 @@ final class FfiGenerator { /// may change or be removed in a future version without a deprecation notice. final Cpp? cpp; - /// Configuration for typedefs. - final Typedefs typedefs; - - /// Configuration for unions. - final Unions unions; - /// Objective-C specific configuration. /// /// If `null`, will only generate for C. @@ -83,11 +71,7 @@ final class FfiGenerator { this.visitors = const [], this.headers = const Headers(), this.functions = const Functions(), - this.integers = const Integers(), - this.structs = const Structs(), this.cpp, - this.typedefs = const Typedefs(), - this.unions = const Unions(), this.objectiveC, required this.output, @Deprecated( @@ -160,77 +144,7 @@ final class Functions { /// signatures. final Map> varArgs; - const Functions({ - this.varArgs = const >{}, - }); -} - -/// Configuration for integer types. -final class Integers { - /// Integer types imported from other Dart files. - // TODO(https://github.com/dart-lang/native/issues/2595): Change type. - @Deprecated( - 'This field will change type. See ' - 'https://github.com/dart-lang/native/issues/2595.', - ) - final List imported; - - const Integers({ - @Deprecated( - 'This field will change type. See ' - 'https://github.com/dart-lang/native/issues/2595.', - ) - this.imported = const [], - }); -} - -/// Configuration for struct declarations. -final class Structs { - /// Whether structs that are dependencies should be included. - final CompoundDependencies dependencies; - - /// Structs imported from other Dart files. - // TODO(https://github.com/dart-lang/native/issues/2595): Change type. - @Deprecated( - 'This field will change type. See ' - 'https://github.com/dart-lang/native/issues/2595.', - ) - final List imported; - - const Structs({ - this.dependencies = CompoundDependencies.opaque, - @Deprecated( - 'This field will change type. See ' - 'https://github.com/dart-lang/native/issues/2595.', - ) - this.imported = const [], - }); -} - -/// Configuration for typedefs. -final class Typedefs { - /// Typedefs imported from other Dart files. - @Deprecated( - 'This field will change type. See ' - 'https://github.com/dart-lang/native/issues/2595.', - ) - final List imported; - - /// If enabled, unused typedefs will also be generated. - final bool includeUnused; - - /// If typedef of supported types(int8_t) should be directly used. - final bool useSupportedTypedefs; - - const Typedefs({ - @Deprecated( - 'This field will change type. See ' - 'https://github.com/dart-lang/native/issues/2595.', - ) - this.imported = const [], - this.includeUnused = false, - this.useSupportedTypedefs = true, - }); + const Functions({this.varArgs = const >{}}); } /// Configuration for C++. @@ -238,28 +152,6 @@ final class Cpp { const Cpp(); } -/// Configuration for union declarations. -final class Unions { - /// Whether unions that are dependencies should be included. - final CompoundDependencies dependencies; - - /// Unions imported from other Dart files. - @Deprecated( - 'This field will change type. See ' - 'https://github.com/dart-lang/native/issues/2595.', - ) - final List imported; - - const Unions({ - this.dependencies = CompoundDependencies.opaque, - @Deprecated( - 'This field will change type. See ' - 'https://github.com/dart-lang/native/issues/2595.', - ) - this.imported = const [], - }); -} - /// Configuration for Objective-C. final class ObjectiveC { // Undocumented option that changes code generation for package:objective_c. @@ -370,39 +262,4 @@ final class DynamicLibraryBindings implements BindingStyle { extension type Config(FfiGenerator ffiGen) implements FfiGenerator { // ignore: deprecated_member_use_from_same_package Map get importedTypesByUsr => ffiGen.importedTypesByUsr; - - // Override declarative user spec with what FFIgen internals expect. - Map get typedefTypeMappings => - Map.fromEntries( - // ignore: deprecated_member_use_from_same_package - ffiGen.typedefs.imported.map( - (import) => MapEntry(import.nativeType, import), - ), - ); - - Map get structTypeMappings => - Map.fromEntries( - // ignore: deprecated_member_use_from_same_package - ffiGen.structs.imported.map( - (import) => MapEntry(import.nativeType, import), - ), - ); - - // Override declarative user spec with what FFIgen internals expect. - Map get unionTypeMappings => - Map.fromEntries( - // ignore: deprecated_member_use_from_same_package - ffiGen.unions.imported.map( - (import) => MapEntry(import.nativeType, import), - ), - ); - - // Override declarative user spec with what FFIgen internals expect. - Map get importedIntegers => - Map.fromEntries( - // ignore: deprecated_member_use_from_same_package - ffiGen.integers.imported.map( - (import) => MapEntry(import.nativeType, import), - ), - ); } diff --git a/pkgs/ffigen/lib/src/config_provider/config_types.dart b/pkgs/ffigen/lib/src/config_provider/config_types.dart index 6ec968487f..da19f9ecdc 100644 --- a/pkgs/ffigen/lib/src/config_provider/config_types.dart +++ b/pkgs/ffigen/lib/src/config_provider/config_types.dart @@ -12,7 +12,6 @@ import 'package:pub_semver/pub_semver.dart'; import 'package:quiver/pattern.dart' as quiver; import '../code_generator.dart'; -import 'config.dart'; import 'path_finder.dart'; export 'package:pub_semver/pub_semver.dart' show Version; @@ -138,10 +137,12 @@ final class YamlDeclarationFilters { _includer.shouldInclude(name, excludeAllByDefault); /// Checks if a name is explicitly included by an include pattern. - bool isExplicitlyIncluded(String name) => _includer.isExplicitlyIncluded(name); + bool isExplicitlyIncluded(String name) => + _includer.isExplicitlyIncluded(name); /// Checks if a name is explicitly excluded by an exclude pattern. - bool isExplicitlyExcluded(String name) => _includer.isExplicitlyExcluded(name); + bool isExplicitlyExcluded(String name) => + _includer.isExplicitlyExcluded(name); /// Checks if the symbol address should be included for this name. bool shouldIncludeSymbolAddress(String name) => diff --git a/pkgs/ffigen/lib/src/config_provider/yaml_config.dart b/pkgs/ffigen/lib/src/config_provider/yaml_config.dart index 3351e6a6d0..6bb912b728 100644 --- a/pkgs/ffigen/lib/src/config_provider/yaml_config.dart +++ b/pkgs/ffigen/lib/src/config_provider/yaml_config.dart @@ -1205,6 +1205,10 @@ final class YamlConfig { structPackingOverride: _structPackingOverride, objcInterfaceModules: _objcInterfaceModules, objcProtocolModules: _objcProtocolModules, + structDependencies: _structDependencies, + unionDependencies: _unionDependencies, + includeUnusedTypedefs: _includeUnusedTypedefs, + useSupportedTypedefs: _useSupportedTypedefs, ); return FfiGenerator( @@ -1229,25 +1233,7 @@ final class YamlConfig { wrapperDocComment: wrapperDocComment, ), ), - functions: Functions( - varArgs: varArgFunctions, - ), - structs: Structs( - dependencies: _structDependencies, - // ignore: deprecated_member_use_from_same_package - imported: structTypeMappings.values.toList(), - ), - unions: Unions( - dependencies: _unionDependencies, - // ignore: deprecated_member_use_from_same_package - imported: unionTypeMappings.values.toList(), - ), - typedefs: Typedefs( - useSupportedTypedefs: useSupportedTypedefs, - includeUnused: includeUnusedTypedefs, - // ignore: deprecated_member_use_from_same_package - imported: typedefTypeMappings.values.toList(), - ), + functions: Functions(varArgs: varArgFunctions), objectiveC: language == Language.objc ? ObjectiveC( externalVersions: externalVersions, @@ -1260,8 +1246,6 @@ final class YamlConfig { // ignore: deprecated_member_use_from_same_package importedTypesByUsr: usrTypeMappings, // ignore: deprecated_member_use_from_same_package - integers: Integers(imported: nativeTypeMappings.values.toList()), - // ignore: deprecated_member_use_from_same_package libclangDylib: libclangDylib, ); } @@ -1285,6 +1269,10 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { final StructPackingOverride _structPackingOverride; final ObjCModules _objcInterfaceModules; final ObjCModules _objcProtocolModules; + final CompoundDependencies _structDependencies; + final CompoundDependencies _unionDependencies; + final bool _includeUnusedTypedefs; + final bool _useSupportedTypedefs; YamlConfigAstVisitor({ required YamlDeclarationFilters functionDecl, @@ -1305,24 +1293,32 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { required StructPackingOverride structPackingOverride, required ObjCModules objcInterfaceModules, required ObjCModules objcProtocolModules, - }) : _functionDecl = functionDecl, - _structDecl = structDecl, - _unionDecl = unionDecl, - _enumClassDecl = enumClassDecl, - _unnamedEnumConstants = unnamedEnumConstants, - _globals = globals, - _macroDecl = macroDecl, - _typedefs = typedefs, - _objcInterfaces = objcInterfaces, - _objcProtocols = objcProtocols, - _objcCategories = objcCategories, - _exposeFunctionTypedefs = exposeFunctionTypedefs, - _leafFunctions = leafFunctions, - _enumsAsInt = enumsAsInt, - _silenceEnumWarning = silenceEnumWarning, - _structPackingOverride = structPackingOverride, - _objcInterfaceModules = objcInterfaceModules, - _objcProtocolModules = objcProtocolModules; + required CompoundDependencies structDependencies, + required CompoundDependencies unionDependencies, + required bool includeUnusedTypedefs, + required bool useSupportedTypedefs, + }) : _functionDecl = functionDecl, + _structDecl = structDecl, + _unionDecl = unionDecl, + _enumClassDecl = enumClassDecl, + _unnamedEnumConstants = unnamedEnumConstants, + _globals = globals, + _macroDecl = macroDecl, + _typedefs = typedefs, + _objcInterfaces = objcInterfaces, + _objcProtocols = objcProtocols, + _objcCategories = objcCategories, + _exposeFunctionTypedefs = exposeFunctionTypedefs, + _leafFunctions = leafFunctions, + _enumsAsInt = enumsAsInt, + _silenceEnumWarning = silenceEnumWarning, + _structPackingOverride = structPackingOverride, + _objcInterfaceModules = objcInterfaceModules, + _objcProtocolModules = objcProtocolModules, + _structDependencies = structDependencies, + _unionDependencies = unionDependencies, + _includeUnusedTypedefs = includeUnusedTypedefs, + _useSupportedTypedefs = useSupportedTypedefs; final bool _silenceEnumWarning; @@ -1342,18 +1338,23 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { @override void visitStruct(public_ast.Struct node) { + node.dependencies = _structDependencies; _applyInclusion(node, _structDecl); final renamed = _structDecl.rename(node.originalName); if (renamed != node.originalName) { node.name = renamed; } - final pack = _structPackingOverride.getOverridenPackValue(node.originalName); + final pack = _structPackingOverride.getOverridenPackValue( + node.originalName, + ); if (pack != null) { node.pack = pack.value; } for (final field in node.fields) { if (!_structDecl.shouldIncludeMember( - node.originalName, field.originalName)) { + node.originalName, + field.originalName, + )) { field.isIncluded = false; } else { final fieldRenamed = _structDecl.renameMember( @@ -1369,6 +1370,7 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { @override void visitUnion(public_ast.Union node) { + node.dependencies = _unionDependencies; _applyInclusion(node, _unionDecl); final renamed = _unionDecl.rename(node.originalName); if (renamed != node.originalName) { @@ -1376,7 +1378,9 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { } for (final field in node.fields) { if (!_unionDecl.shouldIncludeMember( - node.originalName, field.originalName)) { + node.originalName, + field.originalName, + )) { field.isIncluded = false; } else { final fieldRenamed = _unionDecl.renameMember( @@ -1407,7 +1411,9 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { for (final constant in node.constants) { if (constant.originalName != null && !_enumClassDecl.shouldIncludeMember( - node.originalName, constant.originalName!)) { + node.originalName, + constant.originalName!, + )) { constant.isIncluded = false; } else if (constant.originalName != null) { final constantRenamed = _enumClassDecl.renameMember( @@ -1480,6 +1486,8 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { @override void visitTypealias(public_ast.Typealias node) { + node.includeUnused = _includeUnusedTypedefs; + node.useSupportedTypedefs = _useSupportedTypedefs; _applyInclusion(node, _typedefs); final renamed = _typedefs.rename(node.originalName); if (renamed != node.originalName) { @@ -1498,7 +1506,9 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { if (mod != null) node.module = mod; for (final method in node.methods) { if (!_objcInterfaces.shouldIncludeMember( - node.originalName, method.originalName)) { + node.originalName, + method.originalName, + )) { method.isIncluded = false; } else { final methodRenamed = _objcInterfaces.renameMember( @@ -1539,7 +1549,9 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { if (mod != null) node.module = mod; for (final method in node.methods) { if (!_objcProtocols.shouldIncludeMember( - node.originalName, method.originalName)) { + node.originalName, + method.originalName, + )) { method.isIncluded = false; } else { final methodRenamed = _objcProtocols.renameMember( @@ -1558,7 +1570,7 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { if (node.originalName.isEmpty) return; final isParentInterfaceIncluded = _objcInterfaces.isExplicitlyIncluded(node.interface.originalName) && - node.interface.includeCategories; + node.interface.includeCategories; if (_objcCategories.isExplicitlyIncluded(node.originalName)) { node.isIncluded = true; } else if (_objcCategories.isExplicitlyExcluded(node.originalName)) { @@ -1579,7 +1591,9 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { if (_objcCategories.isExplicitlyIncluded(node.originalName) || isParentInterfaceIncluded) { if (!_objcCategories.shouldIncludeMember( - node.originalName, method.originalName)) { + node.originalName, + method.originalName, + )) { method.isIncluded = false; } else { final methodRenamed = _objcCategories.renameMember( diff --git a/pkgs/ffigen/lib/src/header_parser/parser.dart b/pkgs/ffigen/lib/src/header_parser/parser.dart index c2ebd04b65..beb12cdf50 100644 --- a/pkgs/ffigen/lib/src/header_parser/parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/parser.dart @@ -201,7 +201,7 @@ List transformBindings(List rawBindings, Context context) { ).byValueCompounds; visit( context, - ClearOpaqueCompoundMembersVisitation(config, byValueCompounds, included), + ClearOpaqueCompoundMembersVisitation(byValueCompounds, included), allBindings, ); diff --git a/pkgs/ffigen/lib/src/header_parser/sub_parsers/classdecl_parser.dart b/pkgs/ffigen/lib/src/header_parser/sub_parsers/classdecl_parser.dart index 06b0bb59b1..fb9cbbb405 100644 --- a/pkgs/ffigen/lib/src/header_parser/sub_parsers/classdecl_parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/sub_parsers/classdecl_parser.dart @@ -56,7 +56,13 @@ CppClass? parseClassDeclaration(Context context, clang_types.CXCursor cursor) { if (kind == clang_types.CXCursorKind.CXCursor_CXXMethod) { _parseAnyMethod(context, child, className, methods, CppMethodKind.method); } else if (kind == clang_types.CXCursorKind.CXCursor_Constructor) { - _parseAnyMethod(context, child, className, methods, CppMethodKind.constructor); + _parseAnyMethod( + context, + child, + className, + methods, + CppMethodKind.constructor, + ); } }); diff --git a/pkgs/ffigen/lib/src/header_parser/sub_parsers/compounddecl_parser.dart b/pkgs/ffigen/lib/src/header_parser/sub_parsers/compounddecl_parser.dart index 16b5d21271..04cef10514 100644 --- a/pkgs/ffigen/lib/src/header_parser/sub_parsers/compounddecl_parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/sub_parsers/compounddecl_parser.dart @@ -12,20 +12,10 @@ import 'api_availability.dart'; Compound? parseStructDeclaration( clang_types.CXCursor cursor, Context context, -) => _parseCompoundDeclaration( - cursor, - context, - 'Struct', - Struct.new, -); +) => _parseCompoundDeclaration(cursor, context, 'Struct', Struct.new); Compound? parseUnionDeclaration(clang_types.CXCursor cursor, Context context) => - _parseCompoundDeclaration( - cursor, - context, - 'Union', - Union.new, - ); + _parseCompoundDeclaration(cursor, context, 'Union', Union.new); /// Holds temporary information regarding [compound] while parsing. class _ParsedCompound { diff --git a/pkgs/ffigen/lib/src/header_parser/sub_parsers/enumdecl_parser.dart b/pkgs/ffigen/lib/src/header_parser/sub_parsers/enumdecl_parser.dart index 7db69fbf08..e8e0f7955e 100644 --- a/pkgs/ffigen/lib/src/header_parser/sub_parsers/enumdecl_parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/sub_parsers/enumdecl_parser.dart @@ -4,7 +4,6 @@ import '../../code_generator.dart'; import '../../config_provider/config.dart'; -import '../../config_provider/config_types.dart'; import '../../context.dart'; import '../clang_bindings/clang_bindings.dart' as clang_types; import '../type_extractor/cxtypekindmap.dart'; diff --git a/pkgs/ffigen/lib/src/header_parser/sub_parsers/functiondecl_parser.dart b/pkgs/ffigen/lib/src/header_parser/sub_parsers/functiondecl_parser.dart index c34367a71b..bf2a6d925d 100644 --- a/pkgs/ffigen/lib/src/header_parser/sub_parsers/functiondecl_parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/sub_parsers/functiondecl_parser.dart @@ -40,14 +40,8 @@ List parseFunctionDeclaration( final returnType = cursor.returnType().toCodeGenType(context); - final ( - :parameters, - :hasIncompleteStruct, - :hasUnimplementedType, - ) = parseParameters( - context, - cursor, - ); + final (:parameters, :hasIncompleteStruct, :hasUnimplementedType) = + parseParameters(context, cursor); if (clang.clang_Cursor_isFunctionInlined(cursor) != 0 && clang.clang_Cursor_getStorageClass(cursor) != diff --git a/pkgs/ffigen/lib/src/header_parser/sub_parsers/objccategorydecl_parser.dart b/pkgs/ffigen/lib/src/header_parser/sub_parsers/objccategorydecl_parser.dart index 5856b770ad..667583456c 100644 --- a/pkgs/ffigen/lib/src/header_parser/sub_parsers/objccategorydecl_parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/sub_parsers/objccategorydecl_parser.dart @@ -81,19 +81,13 @@ ObjCCategory? parseObjCCategoryDeclaration( ); break; case clang_types.CXCursorKind.CXCursor_ObjCPropertyDecl: - final (getter, setter) = parseObjCProperty( - context, - child, - name, - ); + final (getter, setter) = parseObjCProperty(context, child, name); category.addMethod(getter); category.addMethod(setter); break; case clang_types.CXCursorKind.CXCursor_ObjCInstanceMethodDecl: case clang_types.CXCursorKind.CXCursor_ObjCClassMethodDecl: - category.addMethod( - parseObjCMethod(context, child, name), - ); + category.addMethod(parseObjCMethod(context, child, name)); break; } }); diff --git a/pkgs/ffigen/lib/src/header_parser/sub_parsers/objcinterfacedecl_parser.dart b/pkgs/ffigen/lib/src/header_parser/sub_parsers/objcinterfacedecl_parser.dart index 4f93201c8a..de1ae2c240 100644 --- a/pkgs/ffigen/lib/src/header_parser/sub_parsers/objcinterfacedecl_parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/sub_parsers/objcinterfacedecl_parser.dart @@ -3,7 +3,6 @@ // BSD-style license that can be found in the LICENSE file. import '../../code_generator.dart'; -import '../../config_provider/config.dart'; import '../../context.dart'; import '../clang_bindings/clang_bindings.dart' as clang_types; import '../utils.dart'; @@ -257,12 +256,7 @@ ObjCMethod? parseObjCMethod( cursor.visitChildren((child) { switch (child.kind) { case clang_types.CXCursorKind.CXCursor_ParmDecl: - final p = _parseMethodParam( - context, - child, - declName, - methodName, - ); + final p = _parseMethodParam(context, child, declName, methodName); if (p == null) { hasError = true; } else { diff --git a/pkgs/ffigen/lib/src/header_parser/sub_parsers/objcprotocoldecl_parser.dart b/pkgs/ffigen/lib/src/header_parser/sub_parsers/objcprotocoldecl_parser.dart index 1a6957b85f..6c9a1a72b0 100644 --- a/pkgs/ffigen/lib/src/header_parser/sub_parsers/objcprotocoldecl_parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/sub_parsers/objcprotocoldecl_parser.dart @@ -87,19 +87,13 @@ ObjCProtocol? parseObjCProtocolDeclaration( } break; case clang_types.CXCursorKind.CXCursor_ObjCPropertyDecl: - final (getter, setter) = parseObjCProperty( - context, - child, - name, - ); + final (getter, setter) = parseObjCProperty(context, child, name); protocol.addMethod(getter); protocol.addMethod(setter); break; case clang_types.CXCursorKind.CXCursor_ObjCInstanceMethodDecl: case clang_types.CXCursorKind.CXCursor_ObjCClassMethodDecl: - protocol.addMethod( - parseObjCMethod(context, child, name), - ); + protocol.addMethod(parseObjCMethod(context, child, name)); break; } }); diff --git a/pkgs/ffigen/lib/src/header_parser/type_extractor/extractor.dart b/pkgs/ffigen/lib/src/header_parser/type_extractor/extractor.dart index 484b38eca0..11edb411d1 100644 --- a/pkgs/ffigen/lib/src/header_parser/type_extractor/extractor.dart +++ b/pkgs/ffigen/lib/src/header_parser/type_extractor/extractor.dart @@ -148,10 +148,7 @@ Type getCodeGenType( if (typeSpellKey.startsWith('const ')) { typeSpellKey = typeSpellKey.replaceFirst('const ', ''); } - if (context.config.importedIntegers.containsKey(typeSpellKey)) { - context.logger.fine(' Type $typeSpellKey mapped from type-map.'); - return context.config.importedIntegers[typeSpellKey]!; - } else if (cxTypeKindToImportedTypes.containsKey(typeSpellKey)) { + if (cxTypeKindToImportedTypes.containsKey(typeSpellKey)) { return cxTypeKindToImportedTypes[typeSpellKey]!; } else { context.logger.fine( @@ -184,19 +181,13 @@ Type? _createTypeFromCursor( // those two types are ABI compatible, so just return bool regardless. return BooleanType(); } - if (config.typedefTypeMappings.containsKey(spelling)) { - logger.fine(' Type $spelling mapped from type-map'); - return config.typedefTypeMappings[spelling]!; - } // Get name from supported typedef name if config allows. - if (config.typedefs.useSupportedTypedefs) { - if (suportedTypedefToSuportedNativeType.containsKey(spelling)) { - logger.fine(' Type Mapped from supported typedef'); - return NativeType(suportedTypedefToSuportedNativeType[spelling]!); - } else if (supportedTypedefToImportedType.containsKey(spelling)) { - logger.fine(' Type Mapped from supported typedef'); - return supportedTypedefToImportedType[spelling]!; - } + if (suportedTypedefToSuportedNativeType.containsKey(spelling)) { + logger.fine(' Type Mapped from supported typedef'); + return NativeType(suportedTypedefToSuportedNativeType[spelling]!); + } else if (supportedTypedefToImportedType.containsKey(spelling)) { + logger.fine(' Type Mapped from supported typedef'); + return supportedTypedefToImportedType[spelling]!; } final typealias = parseTypedefDeclaration(context, cursor); @@ -245,22 +236,12 @@ Type? _extractfromRecord( clang_types.CXCursor cursor, ) { final logger = context.logger; - final config = context.config; logger.fine('${_padding}_extractfromRecord: ${cursor.completeStringRepr()}'); - final declSpelling = cursor.spelling(); final cursorKind = clang.clang_getCursorKind(cursor); if (cursorKind == clang_types.CXCursorKind.CXCursor_StructDecl) { - if (config.structTypeMappings.containsKey(declSpelling)) { - logger.fine(' Type Mapped from type-map'); - return config.structTypeMappings[declSpelling]!; - } return parseStructDeclaration(cursor, context); } else if (cursorKind == clang_types.CXCursorKind.CXCursor_UnionDecl) { - if (config.unionTypeMappings.containsKey(declSpelling)) { - logger.fine(' Type Mapped from type-map'); - return config.unionTypeMappings[declSpelling]!; - } return parseUnionDeclaration(cursor, context); } diff --git a/pkgs/ffigen/lib/src/public_ast/public_ast.dart b/pkgs/ffigen/lib/src/public_ast/public_ast.dart index 41ce2406fd..477953d588 100644 --- a/pkgs/ffigen/lib/src/public_ast/public_ast.dart +++ b/pkgs/ffigen/lib/src/public_ast/public_ast.dart @@ -45,24 +45,24 @@ class Visitor { void Function(Parameter node)? visitParameter, void Function(ObjCMethod node)? visitObjCMethod, void Function(CppMethod node)? visitCppMethod, - }) : _visitLibrary = visitLibrary, - _visitStruct = visitStruct, - _visitUnion = visitUnion, - _visitEnum = visitEnum, - _visitUnnamedEnumConstant = visitUnnamedEnumConstant, - _visitFunc = visitFunc, - _visitGlobal = visitGlobal, - _visitMacroConstant = visitMacroConstant, - _visitTypealias = visitTypealias, - _visitObjCInterface = visitObjCInterface, - _visitObjCProtocol = visitObjCProtocol, - _visitObjCCategory = visitObjCCategory, - _visitCppClass = visitCppClass, - _visitField = visitField, - _visitEnumConstant = visitEnumConstant, - _visitParameter = visitParameter, - _visitObjCMethod = visitObjCMethod, - _visitCppMethod = visitCppMethod; + }) : _visitLibrary = visitLibrary, + _visitStruct = visitStruct, + _visitUnion = visitUnion, + _visitEnum = visitEnum, + _visitUnnamedEnumConstant = visitUnnamedEnumConstant, + _visitFunc = visitFunc, + _visitGlobal = visitGlobal, + _visitMacroConstant = visitMacroConstant, + _visitTypealias = visitTypealias, + _visitObjCInterface = visitObjCInterface, + _visitObjCProtocol = visitObjCProtocol, + _visitObjCCategory = visitObjCCategory, + _visitCppClass = visitCppClass, + _visitField = visitField, + _visitEnumConstant = visitEnumConstant, + _visitParameter = visitParameter, + _visitObjCMethod = visitObjCMethod, + _visitCppMethod = visitCppMethod; void visitLibrary(PublicAst ast) { _visitLibrary?.call(ast); @@ -246,6 +246,9 @@ class Struct extends Decl { int? get pack => _binding.pack; set pack(int? value) => _binding.pack = value; + CompoundDependencies get dependencies => _binding.dependencies; + set dependencies(CompoundDependencies value) => _binding.dependencies = value; + List get fields => _binding.members.map(Field.new).toList(); @override @@ -282,6 +285,9 @@ class Union implements Decl { @override set isIncluded(bool value) => _binding.userDefinedIsIncluded = value; + CompoundDependencies get dependencies => _binding.dependencies; + set dependencies(CompoundDependencies value) => _binding.dependencies = value; + List get fields => _binding.members.map(Field.new).toList(); @override @@ -500,6 +506,12 @@ class Typealias extends Decl { @override set isIncluded(bool value) => _binding.userDefinedIsIncluded = value; + bool get includeUnused => _binding.includeUnused; + set includeUnused(bool value) => _binding.includeUnused = value; + + bool get useSupportedTypedefs => _binding.useSupportedTypedefs; + set useSupportedTypedefs(bool value) => _binding.useSupportedTypedefs = value; + @override void accept(Visitor visitor) => visitor.visitTypealias(this); } @@ -990,5 +1002,3 @@ class RenameMapVisitor extends Visitor { @override void visitCppClass(CppClass node) => _rename(node); } - - diff --git a/pkgs/ffigen/lib/src/visitor/list_bindings.dart b/pkgs/ffigen/lib/src/visitor/list_bindings.dart index a293fd3802..9de7459da7 100644 --- a/pkgs/ffigen/lib/src/visitor/list_bindings.dart +++ b/pkgs/ffigen/lib/src/visitor/list_bindings.dart @@ -63,11 +63,7 @@ class ListBindingsVisitation extends Visitation { @override void visitObjCInterface(ObjCInterface node) { final omit = - node.unavailable || - !_visitImpl( - node, - _IncludeBehavior.configOnly, - ); + node.unavailable || !_visitImpl(node, _IncludeBehavior.configOnly); if (omit && !node.isObjCImport && directTransitives.contains(node)) { node.generateAsStub = true; @@ -97,11 +93,7 @@ class ListBindingsVisitation extends Visitation { @override void visitObjCProtocol(ObjCProtocol node) { final omit = - node.unavailable || - !_visitImpl( - node, - _IncludeBehavior.configOnly, - ); + node.unavailable || !_visitImpl(node, _IncludeBehavior.configOnly); if (omit && !node.isObjCImport && directTransitives.contains(node)) { node.generateAsStub = true; @@ -124,7 +116,7 @@ class ListBindingsVisitation extends Visitation { void visitTypealias(Typealias node) { _visitImpl( node, - config.typedefs.includeUnused + node.includeUnused ? _IncludeBehavior.configOnly : _IncludeBehavior.configAndTransitive, ); diff --git a/pkgs/ffigen/lib/src/visitor/opaque_compounds.dart b/pkgs/ffigen/lib/src/visitor/opaque_compounds.dart index 4b1cedf1c1..0fe407dbae 100644 --- a/pkgs/ffigen/lib/src/visitor/opaque_compounds.dart +++ b/pkgs/ffigen/lib/src/visitor/opaque_compounds.dart @@ -3,7 +3,6 @@ // BSD-style license that can be found in the LICENSE file. import '../code_generator.dart'; -import '../config_provider/config.dart' show Config; import '../config_provider/config_types.dart' show CompoundDependencies; import 'ast.dart'; @@ -36,31 +35,25 @@ class FindByValueCompoundsVisitation extends Visitation { } class ClearOpaqueCompoundMembersVisitation extends Visitation { - final Config config; final Set byValueCompounds; final Set included; - ClearOpaqueCompoundMembersVisitation( - this.config, - this.byValueCompounds, - this.included, - ); + ClearOpaqueCompoundMembersVisitation(this.byValueCompounds, this.included); - void _visitImpl(Compound node, CompoundDependencies compondDepsConfig) { + void _visitImpl(Compound node) { // If a compound isn't referred to by value, isn't explicitly included by // the config filters, and the config is using opaque deps, convert the // compound to be opaque by deleting its members. if (!byValueCompounds.contains(node) && (node.originalName.isEmpty || !included.contains(node)) && - compondDepsConfig == CompoundDependencies.opaque) { + node.dependencies == CompoundDependencies.opaque) { node.members.clear(); } } @override - void visitStruct(Struct node) => - _visitImpl(node, config.structs.dependencies); + void visitStruct(Struct node) => _visitImpl(node); @override - void visitUnion(Union node) => _visitImpl(node, config.unions.dependencies); + void visitUnion(Union node) => _visitImpl(node); } diff --git a/pkgs/ffigen/test/collision_tests/reserved_keyword_collision_test.dart b/pkgs/ffigen/test/collision_tests/reserved_keyword_collision_test.dart index 653bfb8a3a..1e907bee77 100644 --- a/pkgs/ffigen/test/collision_tests/reserved_keyword_collision_test.dart +++ b/pkgs/ffigen/test/collision_tests/reserved_keyword_collision_test.dart @@ -33,8 +33,10 @@ void main() { ), ], ), - visitors: const [IncludeAllVisitor()], - typedefs: const Typedefs(includeUnused: true), + visitors: [ + const IncludeAllVisitor(), + Visitor(visitTypealias: (node) => node.includeUnused = true), + ], ), ), ); diff --git a/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_typedef_bindings.dart b/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_typedef_bindings.dart index 7d2414c949..edb6c0de4e 100644 --- a/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_typedef_bindings.dart +++ b/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_typedef_bindings.dart @@ -61,7 +61,9 @@ class Bindings { late final _func3Ptr = _lookup< - ffi.NativeFunction + ffi.NativeFunction< + ffi.Void Function(SpecifiedTypeAsIntPtr, NestingASpecifiedType) + > >('func3'); late final _func3 = _func3Ptr.asFunction(); @@ -101,8 +103,9 @@ typedef NamedFunctionProto = typedef NamedFunctionProtoFunction = ffi.Void Function(); typedef DartNamedFunctionProtoFunction = void Function(); typedef NamedStructInTypedef = _NamedStructInTypedef; -typedef NestingASpecifiedType = ffi.IntPtr; -typedef DartNestingASpecifiedType = int; +typedef NestingASpecifiedType = SpecifiedTypeAsIntPtr; +typedef SpecifiedTypeAsIntPtr = ffi.Char; +typedef DartSpecifiedTypeAsIntPtr = int; final class Struct1 extends ffi.Struct { external NamedFunctionProto named; diff --git a/pkgs/ffigen/test/header_parser_tests/sort_test.dart b/pkgs/ffigen/test/header_parser_tests/sort_test.dart index bca6438f15..8c27bce36f 100644 --- a/pkgs/ffigen/test/header_parser_tests/sort_test.dart +++ b/pkgs/ffigen/test/header_parser_tests/sort_test.dart @@ -31,8 +31,10 @@ void main() { ), ], ), - visitors: const [IncludeAllVisitor()], - typedefs: const Typedefs(includeUnused: true), + visitors: [ + const IncludeAllVisitor(), + Visitor(visitTypealias: (node) => node.includeUnused = true), + ], ), ), ); diff --git a/pkgs/ffigen/test/large_integration_tests/_expected_libclang_bindings.dart b/pkgs/ffigen/test/large_integration_tests/_expected_libclang_bindings.dart index 35c30efc15..c58e7d2628 100644 --- a/pkgs/ffigen/test/large_integration_tests/_expected_libclang_bindings.dart +++ b/pkgs/ffigen/test/large_integration_tests/_expected_libclang_bindings.dart @@ -3652,9 +3652,7 @@ class LibClang { } late final _clang_getFileTimePtr = - _lookup>( - 'clang_getFileTime', - ); + _lookup>('clang_getFileTime'); late final _clang_getFileTime = _clang_getFileTimePtr .asFunction(); @@ -9124,3 +9122,7 @@ final class IndexerCallbacks extends ffi.Struct { ..ref.indexDeclaration = indexDeclaration ..ref.indexEntityReference = indexEntityReference; } + +typedef __darwin_time_t = ffi.Long; +typedef Dart__darwin_time_t = int; +typedef time_t = __darwin_time_t; diff --git a/pkgs/ffigen/test/large_integration_tests/large_objc_test.dart b/pkgs/ffigen/test/large_integration_tests/large_objc_test.dart index 368f3a22fb..b60b27aece 100644 --- a/pkgs/ffigen/test/large_integration_tests/large_objc_test.dart +++ b/pkgs/ffigen/test/large_integration_tests/large_objc_test.dart @@ -14,7 +14,6 @@ import 'dart:io'; import 'package:ffigen/ffigen.dart'; import 'package:ffigen/src/code_generator/utils.dart'; -import 'package:ffigen/src/public_ast/public_ast.dart'; import 'package:path/path.dart' as path; import 'package:test/test.dart'; @@ -43,69 +42,64 @@ class _RandomIncludeVisitor extends Visitor { @override void visitFunc(Func node) { - if (!_randInclude('functionDecl', node.usr)) node.isIncluded = false; + node.isIncluded = _randInclude('functionDecl', node.usr); } @override void visitStruct(Struct node) { - if (!_randInclude('structDecl', node.usr)) node.isIncluded = false; + node.isIncluded = _randInclude('structDecl', node.usr); } @override void visitUnion(Union node) { - if (!_randInclude('unionDecl', node.usr)) node.isIncluded = false; + node.isIncluded = _randInclude('unionDecl', node.usr); } @override void visitEnum(EnumClass node) { - if (!_randInclude('enums', node.usr)) node.isIncluded = false; + node.isIncluded = _randInclude('enums', node.usr); } @override void visitUnnamedEnumConstant(UnnamedEnumConstant node) { - if (!_randInclude('unnamedEnumConstants', node.usr)) node.isIncluded = false; + node.isIncluded = _randInclude('unnamedEnumConstants', node.usr); } @override void visitGlobal(Global node) { - if (!_randInclude('globals', node.usr)) node.isIncluded = false; + node.isIncluded = _randInclude('globals', node.usr); } @override void visitTypealias(Typealias node) { - if (!_randInclude('typedefs', node.usr)) node.isIncluded = false; + node.isIncluded = _randInclude('typedefs', node.usr); } @override void visitObjCInterface(ObjCInterface node) { - if (!_randInclude('objcInterfaces', node.usr)) node.isIncluded = false; + node.isIncluded = _randInclude('objcInterfaces', node.usr); for (final m in node.methods) { - if (!_randInclude('objcInterfaces.memb', node.usr, m.originalName)) { - m.isIncluded = false; - } + m.isIncluded = + _randInclude('objcInterfaces.memb', node.usr, m.originalName); } } @override void visitObjCProtocol(ObjCProtocol node) { - if (!forceIncludedProtocols.contains(node.originalName) && - !_randInclude('objcProtocols', node.usr)) { - node.isIncluded = false; - } + node.isIncluded = forceIncludedProtocols.contains(node.originalName) || + _randInclude('objcProtocols', node.usr); for (final m in node.methods) { - if (!_randInclude('objcProtocols.memb', node.usr, m.originalName)) { - m.isIncluded = false; - } + m.isIncluded = + _randInclude('objcProtocols.memb', node.usr, m.originalName); } } @override void visitObjCCategory(ObjCCategory node) { - if (!_randInclude('objcCategories', node.usr)) node.isIncluded = false; + node.isIncluded = _randInclude('objcCategories', node.usr); for (final m in node.methods) { - if (!_randInclude('objcCategories.memb', node.usr, m.originalName)) { - m.isIncluded = false; - } + m.isIncluded = + _randInclude('objcCategories.memb', node.usr, m.originalName); } } } diff --git a/pkgs/ffigen/test/large_integration_tests/large_test.dart b/pkgs/ffigen/test/large_integration_tests/large_test.dart index 9d8583271e..0d075ea74c 100644 --- a/pkgs/ffigen/test/large_integration_tests/large_test.dart +++ b/pkgs/ffigen/test/large_integration_tests/large_test.dart @@ -2,7 +2,6 @@ // 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 'package:ffigen/src/code_generator/imports.dart'; import 'package:ffigen/src/config_provider/config.dart'; import 'package:ffigen/src/config_provider/config_types.dart'; import 'package:ffigen/src/context.dart'; @@ -65,10 +64,6 @@ void main() { ].any((filename) => header.pathSegments.last == filename), ), visitors: const [IncludeAllVisitor()], - typedefs: Typedefs( - // ignore: deprecated_member_use_from_same_package - imported: [ImportedType(ffiImport, 'Int64', 'int', 'time_t')], - ), ); final library = parse(Context(logger, generator)); final context = testContext(); @@ -200,8 +195,11 @@ class _LargeTestVisitor extends Visitor { @override void visitFunc(Func node) { - if ({'sqlite3_vmprintf', 'sqlite3_vsnprintf', 'sqlite3_str_vappendf'} - .contains(node.originalName)) { + if ({ + 'sqlite3_vmprintf', + 'sqlite3_vsnprintf', + 'sqlite3_str_vappendf', + }.contains(node.originalName)) { node.isIncluded = false; } } diff --git a/pkgs/ffigen/test/native_objc_test/transitive_test.dart b/pkgs/ffigen/test/native_objc_test/transitive_test.dart index 1bc098f7d2..074b4f04b3 100644 --- a/pkgs/ffigen/test/native_objc_test/transitive_test.dart +++ b/pkgs/ffigen/test/native_objc_test/transitive_test.dart @@ -14,9 +14,7 @@ import 'package:path/path.dart' as path; import 'package:test/test.dart'; import '../test_utils.dart'; -String generate({ - bool includeTransitiveObjCCategories = true, -}) { +String generate({bool includeTransitiveObjCCategories = true}) { FfiGenerator( output: Output( dartFile: Uri.file( @@ -102,9 +100,7 @@ void main() { if (classDef && !isInst && any) return Inclusion.stubbed; if (classDef && isInst && any) return Inclusion.included; if (!classDef && !isInst && !any) return Inclusion.omitted; - throw Exception( - 'Bad interface: $name ($classDef, $isInst, $any)', - ); + throw Exception('Bad interface: $name ($classDef, $isInst, $any)'); } Inclusion incProto(String name) { diff --git a/pkgs/ffigen/test/public_ast_visitor_test.dart b/pkgs/ffigen/test/public_ast_visitor_test.dart index 1aafd9d2f2..8884fea82b 100644 --- a/pkgs/ffigen/test/public_ast_visitor_test.dart +++ b/pkgs/ffigen/test/public_ast_visitor_test.dart @@ -97,10 +97,7 @@ void main() { final generator = FfiGenerator( headers: Headers(entryPoints: [headerUri]), output: Output(dartFile: Uri.file('unused.dart')), - visitors: [ - const IncludeAllVisitor(), - autoWalker, - ], + visitors: [const IncludeAllVisitor(), autoWalker], ); parser.parse(testContext(generator)); @@ -149,10 +146,7 @@ void main() { output: Output(dartFile: Uri.file('unused.dart')), visitors: [ const IncludeAllVisitor(), - const IncludeSetVisitor( - functions: {'func1'}, - structs: {'Struct1'}, - ), + const IncludeSetVisitor(functions: {'func1'}, structs: {'Struct1'}), ], ); diff --git a/pkgs/ffigen/test/test_utils.dart b/pkgs/ffigen/test/test_utils.dart index 4acec5070b..f833042b01 100644 --- a/pkgs/ffigen/test/test_utils.dart +++ b/pkgs/ffigen/test/test_utils.dart @@ -33,7 +33,11 @@ Context testContext([FfiGenerator? generator]) { )..createSync(recursive: true)).createTempSync(); return Context( createTestLogger(), - generator ?? FfiGenerator(visitors: const [IncludeAllVisitor()], output: Output(dartFile: Uri.file('unused'))), + generator ?? + FfiGenerator( + visitors: const [IncludeAllVisitor()], + output: Output(dartFile: Uri.file('unused')), + ), tmpDir: tmpDir.path, ); } diff --git a/pkgs/ffigen/tool/generate_code.dart b/pkgs/ffigen/tool/generate_code.dart index d898abfd60..a4ea16ca71 100644 --- a/pkgs/ffigen/tool/generate_code.dart +++ b/pkgs/ffigen/tool/generate_code.dart @@ -118,8 +118,6 @@ class LibClangVisitor extends Visitor { 'clang_Type_getObjCProtocolDecl', }; - const LibClangVisitor(); - @override void visitEnum(EnumClass node) { node.style = EnumStyle.intConstants; @@ -130,6 +128,7 @@ class LibClangVisitor extends Visitor { @override void visitStruct(Struct node) { + node.dependencies = CompoundDependencies.full; if (node.originalName.isNotEmpty && !structs.contains(node.originalName) && !node.originalName.contains('Version') && @@ -147,6 +146,7 @@ class LibClangVisitor extends Visitor { @override void visitTypealias(Typealias node) { + node.includeUnused = true; if (RegExp(r'.*time(64)?_t$').hasMatch(node.originalName)) { node.isIncluded = false; } @@ -162,15 +162,12 @@ void main() { ], compilerOptions: ['-Ithird_party/libclang/include'], ignoreSourceErrors: true, - include: - (Uri header) => - header.path.endsWith('wrapper.c') || - header.path.endsWith('Index.h') || - header.path.endsWith('CXString.h'), + include: (Uri header) => + header.path.endsWith('wrapper.c') || + header.path.endsWith('Index.h') || + header.path.endsWith('CXString.h'), ), visitors: [const LibClangVisitor()], - typedefs: const Typedefs(includeUnused: true), - structs: const Structs(dependencies: CompoundDependencies.full), output: Output( preamble: ''' // Part of the LLVM Project, under the Apache License v2.0 with LLVM From 30fde52a8e381ba2775fb31948eda18a5c8c5ad4 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Thu, 30 Jul 2026 14:43:44 +1000 Subject: [PATCH 14/37] cleaning --- .../code_generator/objc_built_in_types.dart | 117 +- pkgs/ffigen/pubspec.yaml | 1 + pkgs/ffigen/tool/diff_bindings_with_main.sh | 73 + pkgs/ffigen/tool/summarize_bindings.dart | 286 + .../lib/src/c_bindings_generated.dart | 18 - .../lib/src/objc_built_in_types.dart | 145 + .../src/objective_c_bindings_exported.dart | 117 +- .../src/objective_c_bindings_generated.dart | 20359 ++++++++++++---- .../src/objective_c_bindings_generated.m | 183 +- pkgs/objective_c/tool/generate_code.dart | 37 +- 10 files changed, 15795 insertions(+), 5541 deletions(-) create mode 100755 pkgs/ffigen/tool/diff_bindings_with_main.sh create mode 100644 pkgs/ffigen/tool/summarize_bindings.dart create mode 100644 pkgs/objective_c/lib/src/objc_built_in_types.dart diff --git a/pkgs/ffigen/lib/src/code_generator/objc_built_in_types.dart b/pkgs/ffigen/lib/src/code_generator/objc_built_in_types.dart index 3da4a090ca..3dc26d65b1 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_built_in_types.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_built_in_types.dart @@ -10,12 +10,15 @@ const objCBuiltInInterfaces = { 'DOBJCDartInputStreamAdapterWeakHolder': 'DartInputStreamAdapterWeakHolder', 'DOBJCDartProtocol': 'DartProtocol', 'DOBJCDartProtocolBuilder': 'DartProtocolBuilder', + 'NSArchiver': 'NSArchiver', 'NSArray': 'NSArray', 'NSAttributedString': 'NSAttributedString', 'NSAttributedStringMarkdownParsingOptions': 'NSAttributedStringMarkdownParsingOptions', 'NSBundle': 'NSBundle', + 'NSCalendarDate': 'NSCalendarDate', 'NSCharacterSet': 'NSCharacterSet', + 'NSClassDescription': 'NSClassDescription', 'NSCoder': 'NSCoder', 'NSConnection': 'NSConnection', 'NSData': 'NSData', @@ -23,10 +26,13 @@ const objCBuiltInInterfaces = { 'NSDictionary': 'NSDictionary', 'NSEnumerator': 'NSEnumerator', 'NSError': 'NSError', + 'NSFileManager': 'NSFileManager', + 'NSHost': 'NSHost', 'NSIndexSet': 'NSIndexSet', 'NSInputStream': 'NSInputStream', 'NSInvocation': 'NSInvocation', - 'NSItemProvider': 'NSItemProvider', + 'NSKeyValueSharedObserversSnapshot': 'NSKeyValueSharedObserversSnapshot', + 'NSKeyedArchiver': 'NSKeyedArchiver', 'NSLocale': 'NSLocale', 'NSMethodSignature': 'NSMethodSignature', 'NSMutableArray': 'NSMutableArray', @@ -43,14 +49,20 @@ const objCBuiltInInterfaces = { 'NSOrderedCollectionChange': 'NSOrderedCollectionChange', 'NSOrderedCollectionDifference': 'NSOrderedCollectionDifference', 'NSOrderedSet': 'NSOrderedSet', + 'NSOrthography': 'NSOrthography', 'NSOutputStream': 'NSOutputStream', 'NSPort': 'NSPort', + 'NSPortCoder': 'NSPortCoder', 'NSPortMessage': 'NSPortMessage', + 'NSPredicate': 'NSPredicate', 'NSProgress': 'NSProgress', 'NSRunLoop': 'NSRunLoop', + 'NSScriptObjectSpecifier': 'NSScriptObjectSpecifier', 'NSSet': 'NSSet', 'NSStream': 'NSStream', 'NSString': 'NSString', + 'NSThread': 'NSThread', + 'NSTimeZone': 'NSTimeZone', 'NSTimer': 'NSTimer', 'NSURL': 'NSURL', 'NSURLHandle': 'NSURLHandle', @@ -88,15 +100,7 @@ const objCBuiltInEnums = { 'NSDataSearchOptions', 'NSDataWritingOptions', 'NSDecodingFailurePolicy', - 'NSDirectoryEnumerationOptions', 'NSEnumerationOptions', - 'NSExpressionType', - 'NSFileManagerItemReplacementOptions', - 'NSFileManagerResumeSyncBehavior', - 'NSFileManagerUnmountOptions', - 'NSFileManagerUploadLocalVersionConflictPolicy', - 'NSFileVersionAddingOptions', - 'NSFileVersionReplacingOptions', 'NSItemProviderFileOptions', 'NSItemProviderRepresentationVisibility', 'NSKeyValueChange', @@ -105,23 +109,17 @@ const objCBuiltInEnums = { 'NSLinguisticTaggerOptions', 'NSLocaleLanguageDirection', 'NSOrderedCollectionDifferenceCalculationOptions', - 'NSPredicateOperatorType', 'NSPropertyListFormat', 'NSQualityOfService', - 'NSSearchPathDirectory', - 'NSSearchPathDomainMask', 'NSSortOptions', 'NSStreamEvent', 'NSStreamStatus', 'NSStringCompareOptions', 'NSStringEncodingConversionOptions', 'NSStringEnumerationOptions', - 'NSTimeZoneNameStyle', 'NSURLBookmarkCreationOptions', 'NSURLBookmarkResolutionOptions', 'NSURLHandleStatus', - 'NSURLRelationship', - 'NSVolumeEnumerationOptions', }; const objCBuiltInProtocols = { @@ -140,12 +138,41 @@ const objCBuiltInProtocols = { }; const objCBuiltInCategories = { + 'NSArchiverCallback', + 'NSArrayCreation', + 'NSArrayDiffing', + 'NSArrayPathExtensions', + 'NSAttributedStringCreateFromMarkdown', + 'NSAttributedStringFormatting', + 'NSBundleExtensionMethods', + 'NSBundleResourceRequestAdditions', + 'NSCalendarDateExtras', + 'NSClassDescriptionPrimitives', + 'NSCoderMethods', + 'NSComparisonMethods', + 'NSCopyLinkMoveHandler', + 'NSDataBase64Encoding', + 'NSDataCompression', 'NSDataCreation', + 'NSDateCreation', + 'NSDecimalNumberExtensions', + 'NSDelayedPerforming', + 'NSDeprecated', + 'NSDeprecatedKeyValueCoding', + 'NSDeprecatedKeyValueObservingCustomization', + 'NSDeprecatedMethods', + 'NSDictionaryCreation', + 'NSDiscardableContentProxy', + 'NSDistributedObjects', + 'NSErrorRecoveryAttempting', 'NSExtendedArray', + 'NSExtendedAttributedString', + 'NSExtendedCoder', 'NSExtendedData', 'NSExtendedDate', 'NSExtendedDictionary', 'NSExtendedEnumerator', + 'NSExtendedLocale', 'NSExtendedMutableArray', 'NSExtendedMutableData', 'NSExtendedMutableDictionary', @@ -153,8 +180,68 @@ const objCBuiltInCategories = { 'NSExtendedMutableSet', 'NSExtendedOrderedSet', 'NSExtendedSet', + 'NSExtendedStringPropertyListParsing', + 'NSFileAttributes', + 'NSGenericFastEnumeration', + 'NSGeometryCoding', + 'NSGeometryKeyedCoding', + 'NSInputStreamExtensions', + 'NSItemProvider', + 'NSKeyValueCoding', + 'NSKeyValueObserverNotification', + 'NSKeyValueObserverRegistration', + 'NSKeyValueObserving', + 'NSKeyValueObservingCustomization', + 'NSKeyValueSharedObserverRegistration', + 'NSKeyValueSorting', + 'NSKeyedArchiverObjectSubstitution', + 'NSKeyedUnarchiverObjectSubstitution', + 'NSLinguisticAnalysis', + 'NSLocaleCreation', + 'NSLocaleGeneralInfo', + 'NSMorphology', + 'NSMutableArrayCreation', + 'NSMutableArrayDiffing', + 'NSMutableDataCompression', + 'NSMutableDataCreation', + 'NSMutableDictionaryCreation', + 'NSMutableOrderedSetCreation', + 'NSMutableOrderedSetDiffing', + 'NSMutableSetCreation', + 'NSMutableStringExtensionMethods', + 'NSNotificationCreation', 'NSNumberCreation', 'NSNumberIsBool', 'NSNumberIsFloat', + 'NSOrderedPerform', + 'NSOrderedSetCreation', + 'NSOrderedSetDiffing', + 'NSOutputStreamExtensions', + 'NSPredicateSupport', + 'NSPromisedItems', + 'NSRunLoopConveniences', + 'NSScriptClassDescription', + 'NSScriptKeyValueCoding', + 'NSScriptObjectSpecifiers', + 'NSScripting', + 'NSScriptingComparisonMethods', + 'NSSetCreation', + 'NSSharedKeySetDictionary', + 'NSSocketStreamCreationExtensions', + 'NSSortDescriptorSorting', + 'NSStreamBoundPairCreationExtensions', + 'NSStringDeprecated', + 'NSStringEncodingDetection', 'NSStringExtensionMethods', + 'NSStringPathExtensions', + 'NSThreadPerformAdditions', + 'NSTypedstreamCompatibility', + 'NSURLClient', + 'NSURLLoading', + 'NSURLPathUtilities', + 'NSURLUtilities', + 'NSValueCreation', + 'NSValueExtensionMethods', + 'NSValueGeometryExtensions', + 'NSValueRangeExtensions', }; diff --git a/pkgs/ffigen/pubspec.yaml b/pkgs/ffigen/pubspec.yaml index fd5bf56eb0..9d892a13aa 100644 --- a/pkgs/ffigen/pubspec.yaml +++ b/pkgs/ffigen/pubspec.yaml @@ -40,6 +40,7 @@ dependencies: dev_dependencies: async: ^2.11.0 + analyzer: ^8.1.1 dart_flutter_team_lints: ^3.5.2 json_schema: ^5.1.1 leak_tracker: ^11.0.2 diff --git a/pkgs/ffigen/tool/diff_bindings_with_main.sh b/pkgs/ffigen/tool/diff_bindings_with_main.sh new file mode 100755 index 0000000000..98663a8697 --- /dev/null +++ b/pkgs/ffigen/tool/diff_bindings_with_main.sh @@ -0,0 +1,73 @@ +#!/usr/bin/env 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. + +set -euo pipefail + +if [ "$#" -ne 1 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then + echo "Usage: $0 " + echo "Compares the binding summary of a Dart file against its version on the main branch." + exit 1 +fi + +FILE_PATH="$1" + +if [ ! -f "$FILE_PATH" ]; then + echo "Error: File '$FILE_PATH' does not exist." >&2 + exit 1 +fi + +REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null)" || { + echo "Error: Not in a git repository." >&2 + exit 1 +} + +SUMMARIZE_SCRIPT="$REPO_ROOT/pkgs/ffigen/tool/summarize_bindings.dart" +if [ ! -f "$SUMMARIZE_SCRIPT" ]; then + echo "Error: summarize_bindings.dart not found at '$SUMMARIZE_SCRIPT'." >&2 + exit 1 +fi + +REPO_RELATIVE_PATH="$(git ls-files --full-name "$FILE_PATH" 2>/dev/null)" +if [ -z "$REPO_RELATIVE_PATH" ]; then + PREFIX="$(git rev-parse --show-prefix)" + REPO_RELATIVE_PATH="${PREFIX}${FILE_PATH}" +fi + +if git rev-parse --verify main >/dev/null 2>&1; then + MAIN_REF="main" +elif git rev-parse --verify origin/main >/dev/null 2>&1; then + MAIN_REF="origin/main" +else + echo "Error: Could not find 'main' or 'origin/main' branch." >&2 + exit 1 +fi + +if ! git show "$MAIN_REF:$REPO_RELATIVE_PATH" >/dev/null 2>&1; then + echo "Error: File '$REPO_RELATIVE_PATH' does not exist on '$MAIN_REF'." >&2 + exit 1 +fi + +PACKAGE_CONFIG="$REPO_ROOT/pkgs/ffigen/.dart_tool/package_config.json" +if [ -f "$PACKAGE_CONFIG" ]; then + DART_CMD=(dart --packages="$PACKAGE_CONFIG" "$SUMMARIZE_SCRIPT") +else + DART_CMD=(dart run "$SUMMARIZE_SCRIPT") +fi + +if command -v colordiff >/dev/null 2>&1; then + DIFF_CMD=(colordiff -u --label "main/$REPO_RELATIVE_PATH" --label "current/$REPO_RELATIVE_PATH") +else + DIFF_CMD=(diff -u --label "main/$REPO_RELATIVE_PATH" --label "current/$REPO_RELATIVE_PATH") +fi + +DIFF_OUTPUT=$("${DIFF_CMD[@]}" \ + <("${DART_CMD[@]}" <(git show "$MAIN_REF:$REPO_RELATIVE_PATH")) \ + <("${DART_CMD[@]}" "$FILE_PATH") || true) + +if [ -z "$DIFF_OUTPUT" ]; then + echo "No binding differences found between main and current branch." +else + printf "%s\n" "$DIFF_OUTPUT" +fi diff --git a/pkgs/ffigen/tool/summarize_bindings.dart b/pkgs/ffigen/tool/summarize_bindings.dart new file mode 100644 index 0000000000..3d23e0b61d --- /dev/null +++ b/pkgs/ffigen/tool/summarize_bindings.dart @@ -0,0 +1,286 @@ +// 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 'dart:convert'; +import 'dart:io'; + +import 'package:analyzer/dart/analysis/features.dart'; +import 'package:analyzer/dart/analysis/utilities.dart'; +import 'package:analyzer/dart/ast/ast.dart'; +import 'package:args/args.dart'; + +class MemberSummary { + final String sortName; + final String formatted; + + MemberSummary({required this.sortName, required this.formatted}); +} + +class DeclarationSummary { + final String sortName; + final String formatted; + final List members; + + DeclarationSummary({ + required this.sortName, + required this.formatted, + List? members, + }) : members = members ?? []; +} + +List _extractMembers(ClassMember member, String containerName) { + final result = []; + if (member is ConstructorDeclaration) { + final name = member.name?.lexeme; + if (name == null) { + result.add( + MemberSummary(sortName: containerName, formatted: containerName), + ); + } else { + final fullName = '$containerName.$name'; + result.add(MemberSummary(sortName: fullName, formatted: fullName)); + } + } else if (member is MethodDeclaration) { + final name = member.name.lexeme; + if (member.isGetter) { + result.add(MemberSummary(sortName: name, formatted: 'getter $name')); + } else if (member.isSetter) { + result.add(MemberSummary(sortName: name, formatted: 'setter $name=')); + } else { + result.add(MemberSummary(sortName: name, formatted: 'method $name')); + } + } else if (member is FieldDeclaration) { + final isConst = member.fields.isConst; + for (final variable in member.fields.variables) { + final name = variable.name.lexeme; + if (isConst) { + result.add(MemberSummary(sortName: name, formatted: 'constant $name')); + } else { + result.add(MemberSummary(sortName: name, formatted: 'field $name')); + } + } + } + return result; +} + +String summarizeContent(String content) { + final parseResult = parseString( + content: content, + featureSet: FeatureSet.latestLanguageVersion(), + throwIfDiagnostics: false, + ); + final unit = parseResult.unit; + final declarations = []; + + for (final declaration in unit.declarations) { + if (declaration is ClassDeclaration) { + final className = declaration.name.lexeme; + final members = []; + for (final member in declaration.members) { + members.addAll(_extractMembers(member, className)); + } + declarations.add( + DeclarationSummary( + sortName: className, + formatted: 'class $className', + members: members, + ), + ); + } else if (declaration is EnumDeclaration) { + final enumName = declaration.name.lexeme; + final members = []; + for (final constant in declaration.constants) { + final constName = constant.name.lexeme; + members.add( + MemberSummary(sortName: constName, formatted: 'constant $constName'), + ); + } + for (final member in declaration.members) { + members.addAll(_extractMembers(member, enumName)); + } + declarations.add( + DeclarationSummary( + sortName: enumName, + formatted: 'enum $enumName', + members: members, + ), + ); + } else if (declaration is ExtensionDeclaration) { + final extName = declaration.name?.lexeme; + final displayName = extName ?? ''; + final formattedHeader = extName != null + ? 'extension $extName' + : 'extension'; + final members = []; + for (final member in declaration.members) { + members.addAll(_extractMembers(member, extName ?? '')); + } + declarations.add( + DeclarationSummary( + sortName: displayName, + formatted: formattedHeader, + members: members, + ), + ); + } else if (declaration is ExtensionTypeDeclaration) { + final extTypeName = declaration.name.lexeme; + final members = []; + final rep = declaration.representation; + final repConstructorName = rep.constructorName; + if (repConstructorName == null) { + members.add( + MemberSummary(sortName: extTypeName, formatted: extTypeName), + ); + } else { + final fullConstName = '$extTypeName.${repConstructorName.name.lexeme}'; + members.add( + MemberSummary(sortName: fullConstName, formatted: fullConstName), + ); + } + final fieldName = rep.fieldName.lexeme; + members.add( + MemberSummary(sortName: fieldName, formatted: 'field $fieldName'), + ); + + for (final member in declaration.members) { + members.addAll(_extractMembers(member, extTypeName)); + } + declarations.add( + DeclarationSummary( + sortName: extTypeName, + formatted: 'extension type $extTypeName', + members: members, + ), + ); + } else if (declaration is MixinDeclaration) { + final mixinName = declaration.name.lexeme; + final members = []; + for (final member in declaration.members) { + members.addAll(_extractMembers(member, mixinName)); + } + declarations.add( + DeclarationSummary( + sortName: mixinName, + formatted: 'mixin $mixinName', + members: members, + ), + ); + } else if (declaration is TypeAlias) { + final aliasName = declaration.name.lexeme; + declarations.add( + DeclarationSummary( + sortName: aliasName, + formatted: 'typedef $aliasName', + ), + ); + } else if (declaration is FunctionDeclaration) { + final funcName = declaration.name.lexeme; + if (declaration.isGetter) { + declarations.add( + DeclarationSummary(sortName: funcName, formatted: 'getter $funcName'), + ); + } else if (declaration.isSetter) { + declarations.add( + DeclarationSummary( + sortName: funcName, + formatted: 'setter $funcName=', + ), + ); + } else { + declarations.add( + DeclarationSummary( + sortName: funcName, + formatted: 'function $funcName', + ), + ); + } + } else if (declaration is TopLevelVariableDeclaration) { + for (final variable in declaration.variables.variables) { + final varName = variable.name.lexeme; + declarations.add( + DeclarationSummary(sortName: varName, formatted: 'field $varName'), + ); + } + } + } + + declarations.sort((a, b) { + final nameComp = a.sortName.compareTo(b.sortName); + if (nameComp != 0) return nameComp; + return a.formatted.compareTo(b.formatted); + }); + + final buffer = StringBuffer(); + for (final decl in declarations) { + buffer.writeln(decl.formatted); + decl.members.sort((a, b) { + final nameComp = a.sortName.compareTo(b.sortName); + if (nameComp != 0) return nameComp; + return a.formatted.compareTo(b.formatted); + }); + for (final member in decl.members) { + buffer.writeln(' ${member.formatted}'); + } + } + + return buffer.toString(); +} + +Future main(List args) async { + final parser = ArgParser() + ..addOption( + 'output', + abbr: 'o', + help: 'Path to write summary output to. Prints to stdout if omitted.', + ) + ..addFlag( + 'help', + abbr: 'h', + negatable: false, + help: 'Prints usage instructions.', + ); + + late final ArgResults results; + try { + results = parser.parse(args); + } catch (e) { + print('Error: $e\n'); + _printUsage(parser); + exit(1); + } + + if (results['help'] == true || results.rest.isEmpty) { + _printUsage(parser); + if (results['help'] != true && results.rest.isEmpty) { + exit(1); + } + return; + } + + final inputFilePath = results.rest.first; + final String content; + if (inputFilePath == '-') { + content = await stdin.transform(utf8.decoder).join(); + } else { + if (!File(inputFilePath).existsSync()) { + print('Error: Input file "$inputFilePath" does not exist.'); + exit(1); + } + content = File(inputFilePath).readAsStringSync(); + } + + final summary = summarizeContent(content); + + final outputPath = results['output'] as String?; + if (outputPath != null) { + File(outputPath).writeAsStringSync(summary); + } else { + stdout.write(summary); + } +} + +void _printUsage(ArgParser parser) { + print('Usage: dart run tool/summarize_bindings.dart [options] '); + print(parser.usage); +} diff --git a/pkgs/objective_c/lib/src/c_bindings_generated.dart b/pkgs/objective_c/lib/src/c_bindings_generated.dart index 2698f1e459..0367ba9fe8 100644 --- a/pkgs/objective_c/lib/src/c_bindings_generated.dart +++ b/pkgs/objective_c/lib/src/c_bindings_generated.dart @@ -243,26 +243,8 @@ final class ObjCBlockImpl extends ffi.Struct { ..ref.dispose_port = dispose_port; } -final class ObjCMethodDesc extends ffi.Struct { - external ffi.Pointer name; - - external ffi.Pointer types; - - static ffi.Pointer $allocate( - ffi.Allocator $allocator, { - required ffi.Pointer name, - required ffi.Pointer types, - }) => $allocator() - ..ref.name = name - ..ref.types = types; -} - final class ObjCObjectImpl extends ffi.Opaque {} -final class ObjCProtocolImpl extends ffi.Opaque {} - -final class ObjCSelector extends ffi.Opaque {} - final class _Dart_Isolate extends ffi.Opaque {} final class _Version extends ffi.Struct { diff --git a/pkgs/objective_c/lib/src/objc_built_in_types.dart b/pkgs/objective_c/lib/src/objc_built_in_types.dart new file mode 100644 index 0000000000..a60e8d35e1 --- /dev/null +++ b/pkgs/objective_c/lib/src/objc_built_in_types.dart @@ -0,0 +1,145 @@ +// Copyright (c) 2025, 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. + +// Generated by package:objective_c's tool/generate_code.dart. + +const objCBuiltInInterfaces = { + 'DOBJCObservation': 'DOBJCObservation', + 'DOBJCDartInputStreamAdapter': 'DartInputStreamAdapter', + 'DOBJCDartInputStreamAdapterWeakHolder': 'DartInputStreamAdapterWeakHolder', + 'DOBJCDartProtocol': 'DartProtocol', + 'DOBJCDartProtocolBuilder': 'DartProtocolBuilder', + 'NSArray': 'NSArray', + 'NSAttributedString': 'NSAttributedString', + 'NSAttributedStringMarkdownParsingOptions': 'NSAttributedStringMarkdownParsingOptions', + 'NSBundle': 'NSBundle', + 'NSCharacterSet': 'NSCharacterSet', + 'NSCoder': 'NSCoder', + 'NSConnection': 'NSConnection', + 'NSData': 'NSData', + 'NSDate': 'NSDate', + 'NSDictionary': 'NSDictionary', + 'NSEnumerator': 'NSEnumerator', + 'NSError': 'NSError', + 'NSIndexSet': 'NSIndexSet', + 'NSInputStream': 'NSInputStream', + 'NSInvocation': 'NSInvocation', + 'NSItemProvider': 'NSItemProvider', + 'NSLocale': 'NSLocale', + 'NSMethodSignature': 'NSMethodSignature', + 'NSMutableArray': 'NSMutableArray', + 'NSMutableData': 'NSMutableData', + 'NSMutableDictionary': 'NSMutableDictionary', + 'NSMutableIndexSet': 'NSMutableIndexSet', + 'NSMutableOrderedSet': 'NSMutableOrderedSet', + 'NSMutableSet': 'NSMutableSet', + 'NSMutableString': 'NSMutableString', + 'NSNotification': 'NSNotification', + 'NSNull': 'NSNull', + 'NSNumber': 'NSNumber', + 'NSObject': 'NSObject', + 'NSOrderedCollectionChange': 'NSOrderedCollectionChange', + 'NSOrderedCollectionDifference': 'NSOrderedCollectionDifference', + 'NSOrderedSet': 'NSOrderedSet', + 'NSOutputStream': 'NSOutputStream', + 'NSPort': 'NSPort', + 'NSPortMessage': 'NSPortMessage', + 'NSProgress': 'NSProgress', + 'NSRunLoop': 'NSRunLoop', + 'NSSet': 'NSSet', + 'NSStream': 'NSStream', + 'NSString': 'NSString', + 'NSTimer': 'NSTimer', + 'NSURL': 'NSURL', + 'NSURLHandle': 'NSURLHandle', + 'NSValue': 'NSValue', + 'Protocol': 'Protocol', +}; + +const objCBuiltInCompounds = { + 'AEDesc': 'AEDesc', + '__CFRunLoop': 'CFRunLoop', + '__CFString': 'CFString', + 'CGPoint': 'CGPoint', + 'CGRect': 'CGRect', + 'CGSize': 'CGSize', + 'NSEdgeInsets': 'NSEdgeInsets', + 'NSFastEnumerationState': 'NSFastEnumerationState', + '_NSRange': 'NSRange', + '_NSZone': 'NSZone', + 'OpaqueAEDataStorageType': 'OpaqueAEDataStorageType', +}; + +const objCBuiltInEnums = { + 'NSAppleEventSendOptions', + 'NSAttributedStringEnumerationOptions', + 'NSAttributedStringFormattingOptions', + 'NSAttributedStringMarkdownInterpretedSyntax', + 'NSAttributedStringMarkdownParsingFailurePolicy', + 'NSBinarySearchingOptions', + 'NSCollectionChangeType', + 'NSComparisonResult', + 'NSDataBase64DecodingOptions', + 'NSDataBase64EncodingOptions', + 'NSDataCompressionAlgorithm', + 'NSDataReadingOptions', + 'NSDataSearchOptions', + 'NSDataWritingOptions', + 'NSDecodingFailurePolicy', + 'NSEnumerationOptions', + 'NSItemProviderFileOptions', + 'NSItemProviderRepresentationVisibility', + 'NSKeyValueChange', + 'NSKeyValueObservingOptions', + 'NSKeyValueSetMutationKind', + 'NSLinguisticTaggerOptions', + 'NSLocaleLanguageDirection', + 'NSOrderedCollectionDifferenceCalculationOptions', + 'NSPropertyListFormat', + 'NSQualityOfService', + 'NSSortOptions', + 'NSStreamEvent', + 'NSStreamStatus', + 'NSStringCompareOptions', + 'NSStringEncodingConversionOptions', + 'NSStringEnumerationOptions', + 'NSURLBookmarkCreationOptions', + 'NSURLBookmarkResolutionOptions', + 'NSURLHandleStatus', +}; + +const objCBuiltInProtocols = { + 'NSCoding': 'NSCoding', + 'NSCopying': 'NSCopying', + 'NSFastEnumeration': 'NSFastEnumeration', + 'NSItemProviderReading': 'NSItemProviderReading', + 'NSItemProviderWriting': 'NSItemProviderWriting', + 'NSMutableCopying': 'NSMutableCopying', + 'NSObject': 'NSObjectProtocol', + 'NSPortDelegate': 'NSPortDelegate', + 'NSSecureCoding': 'NSSecureCoding', + 'NSStreamDelegate': 'NSStreamDelegate', + 'NSURLHandleClient': 'NSURLHandleClient', + 'Observer': 'Observer', +}; + +const objCBuiltInCategories = { + 'NSDataCreation', + 'NSExtendedArray', + 'NSExtendedData', + 'NSExtendedDate', + 'NSExtendedDictionary', + 'NSExtendedEnumerator', + 'NSExtendedMutableArray', + 'NSExtendedMutableData', + 'NSExtendedMutableDictionary', + 'NSExtendedMutableOrderedSet', + 'NSExtendedMutableSet', + 'NSExtendedOrderedSet', + 'NSExtendedSet', + 'NSNumberCreation', + 'NSNumberIsBool', + 'NSNumberIsFloat', + 'NSStringExtensionMethods', +}; diff --git a/pkgs/objective_c/lib/src/objective_c_bindings_exported.dart b/pkgs/objective_c/lib/src/objective_c_bindings_exported.dart index d2c5b0094f..e06c7533dd 100644 --- a/pkgs/objective_c/lib/src/objective_c_bindings_exported.dart +++ b/pkgs/objective_c/lib/src/objective_c_bindings_exported.dart @@ -23,11 +23,18 @@ export 'objective_c_bindings_generated.dart' DartProtocolBuilder, DartProtocolBuilder$Methods, NSAppleEventSendOptions, + NSArchiver, + NSArchiverCallback, NSArray, NSArray$Methods, + NSArrayCreation, + NSArrayDiffing, + NSArrayPathExtensions, NSAttributedString, NSAttributedString$Methods, + NSAttributedStringCreateFromMarkdown, NSAttributedStringEnumerationOptions, + NSAttributedStringFormatting, NSAttributedStringFormattingOptions, NSAttributedStringMarkdownInterpretedSyntax, NSAttributedStringMarkdownParsingFailurePolicy, @@ -36,24 +43,34 @@ export 'objective_c_bindings_generated.dart' NSBinarySearchingOptions, NSBundle, NSBundle$Methods, + NSBundleExtensionMethods, + NSBundleResourceRequestAdditions, + NSCalendarDate, + NSCalendarDateExtras, NSCharacterSet, NSCharacterSet$Methods, + NSClassDescription, + NSClassDescriptionPrimitives, NSCoder, NSCoder$Methods, + NSCoderMethods, NSCoding, NSCoding$Builder, NSCoding$Methods, NSCollectionChangeType, + NSComparisonMethods, NSComparisonResult, NSConnection, - NSConnection$Methods, + NSCopyLinkMoveHandler, NSCopying, NSCopying$Builder, NSCopying$Methods, NSData, NSData$Methods, NSDataBase64DecodingOptions, + NSDataBase64Encoding, NSDataBase64EncodingOptions, + NSDataCompression, NSDataCompressionAlgorithm, NSDataCreation, NSDataReadingOptions, @@ -61,22 +78,34 @@ export 'objective_c_bindings_generated.dart' NSDataWritingOptions, NSDate, NSDate$Methods, + NSDateCreation, + NSDecimalNumberExtensions, NSDecodingFailurePolicy, + NSDelayedPerforming, + NSDeprecated, + NSDeprecatedKeyValueCoding, + NSDeprecatedKeyValueObservingCustomization, + NSDeprecatedMethods, NSDictionary, NSDictionary$Methods, - NSDirectoryEnumerationOptions, + NSDictionaryCreation, + NSDiscardableContentProxy, + NSDistributedObjects, NSEdgeInsets, NSEnumerationOptions, NSEnumerator, NSEnumerator$Methods, NSError, NSError$Methods, - NSExpressionType, + NSErrorRecoveryAttempting, NSExtendedArray, + NSExtendedAttributedString, + NSExtendedCoder, NSExtendedData, NSExtendedDate, NSExtendedDictionary, NSExtendedEnumerator, + NSExtendedLocale, NSExtendedMutableArray, NSExtendedMutableData, NSExtendedMutableDictionary, @@ -84,24 +113,25 @@ export 'objective_c_bindings_generated.dart' NSExtendedMutableSet, NSExtendedOrderedSet, NSExtendedSet, + NSExtendedStringPropertyListParsing, NSFastEnumeration, NSFastEnumeration$Builder, NSFastEnumeration$Methods, NSFastEnumerationState, - NSFileManagerItemReplacementOptions, - NSFileManagerResumeSyncBehavior, - NSFileManagerUnmountOptions, - NSFileManagerUploadLocalVersionConflictPolicy, - NSFileVersionAddingOptions, - NSFileVersionReplacingOptions, + NSFileAttributes, + NSFileManager, + NSGenericFastEnumeration, + NSGeometryCoding, + NSGeometryKeyedCoding, + NSHost, NSIndexSet, NSIndexSet$Methods, NSInputStream, NSInputStream$Methods, + NSInputStreamExtensions, NSInvocation, NSInvocation$Methods, NSItemProvider, - NSItemProvider$Methods, NSItemProviderFileOptions, NSItemProviderReading, NSItemProviderReading$Builder, @@ -111,33 +141,58 @@ export 'objective_c_bindings_generated.dart' NSItemProviderWriting$Builder, NSItemProviderWriting$Methods, NSKeyValueChange, + NSKeyValueCoding, + NSKeyValueObserverNotification, + NSKeyValueObserverRegistration, + NSKeyValueObserving, + NSKeyValueObservingCustomization, NSKeyValueObservingOptions, NSKeyValueSetMutationKind, + NSKeyValueSharedObserverRegistration, + NSKeyValueSharedObserversSnapshot, + NSKeyValueSorting, + NSKeyedArchiver, + NSKeyedArchiverObjectSubstitution, + NSKeyedUnarchiverObjectSubstitution, + NSLinguisticAnalysis, NSLinguisticTaggerOptions, NSLocale, NSLocale$Methods, + NSLocaleCreation, + NSLocaleGeneralInfo, NSLocaleLanguageDirection, NSMethodSignature, NSMethodSignature$Methods, + NSMorphology, NSMutableArray, NSMutableArray$Methods, + NSMutableArrayCreation, + NSMutableArrayDiffing, NSMutableCopying, NSMutableCopying$Builder, NSMutableCopying$Methods, NSMutableData, NSMutableData$Methods, + NSMutableDataCompression, + NSMutableDataCreation, NSMutableDictionary, NSMutableDictionary$Methods, + NSMutableDictionaryCreation, NSMutableIndexSet, NSMutableIndexSet$Methods, NSMutableOrderedSet, NSMutableOrderedSet$Methods, + NSMutableOrderedSetCreation, + NSMutableOrderedSetDiffing, NSMutableSet, NSMutableSet$Methods, + NSMutableSetCreation, NSMutableString, NSMutableString$Methods, + NSMutableStringExtensionMethods, NSNotification, NSNotification$Methods, + NSNotificationCreation, NSNull, NSNull$Methods, NSNumber, @@ -155,35 +210,53 @@ export 'objective_c_bindings_generated.dart' NSOrderedCollectionDifference, NSOrderedCollectionDifference$Methods, NSOrderedCollectionDifferenceCalculationOptions, + NSOrderedPerform, NSOrderedSet, NSOrderedSet$Methods, + NSOrderedSetCreation, + NSOrderedSetDiffing, + NSOrthography, NSOutputStream, NSOutputStream$Methods, + NSOutputStreamExtensions, NSPort, NSPort$Methods, + NSPortCoder, NSPortDelegate, NSPortDelegate$Builder, NSPortDelegate$Methods, NSPortMessage, NSPortMessage$Methods, - NSPredicateOperatorType, + NSPredicate, + NSPredicateSupport, NSProgress, NSProgress$Methods, + NSPromisedItems, NSPropertyListFormat, NSQualityOfService, NSRange, NSRunLoop, NSRunLoop$Methods, - NSSearchPathDirectory, - NSSearchPathDomainMask, + NSRunLoopConveniences, + NSScriptClassDescription, + NSScriptKeyValueCoding, + NSScriptObjectSpecifier, + NSScriptObjectSpecifiers, + NSScripting, + NSScriptingComparisonMethods, NSSecureCoding, NSSecureCoding$Builder, NSSecureCoding$Methods, NSSet, NSSet$Methods, + NSSetCreation, + NSSharedKeySetDictionary, + NSSocketStreamCreationExtensions, + NSSortDescriptorSorting, NSSortOptions, NSStream, NSStream$Methods, + NSStreamBoundPairCreationExtensions, NSStreamDelegate, NSStreamDelegate$Builder, NSStreamDelegate$Methods, @@ -192,26 +265,38 @@ export 'objective_c_bindings_generated.dart' NSString, NSString$Methods, NSStringCompareOptions, + NSStringDeprecated, NSStringEncodingConversionOptions, + NSStringEncodingDetection, NSStringEnumerationOptions, NSStringExtensionMethods, - NSTimeZoneNameStyle, + NSStringPathExtensions, + NSThread, + NSThreadPerformAdditions, + NSTimeZone, NSTimer, NSTimer$Methods, + NSTypedstreamCompatibility, NSURL, NSURL$Methods, NSURLBookmarkCreationOptions, NSURLBookmarkResolutionOptions, + NSURLClient, NSURLHandle, NSURLHandle$Methods, NSURLHandleClient, NSURLHandleClient$Builder, NSURLHandleClient$Methods, NSURLHandleStatus, - NSURLRelationship, + NSURLLoading, + NSURLPathUtilities, + NSURLUtilities, NSValue, NSValue$Methods, - NSVolumeEnumerationOptions, + NSValueCreation, + NSValueExtensionMethods, + NSValueGeometryExtensions, + NSValueRangeExtensions, NSZone, Observer, Observer$Builder, 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 da19474f23..ec72e13045 100644 --- a/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart +++ b/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart @@ -1464,6 +1464,72 @@ sealed class NSAppleEventSendOptions { static const NSAppleEventSendDefaultOptions = 35; } +/// NSArchiver +/// +/// NSArchiver +@Deprecated('Use NSKeyedArchiver instead') +extension type NSArchiver._(objc.ObjCObject object$) + implements objc.ObjCObject, NSCoder { + /// Constructs a [NSArchiver] that points to the same underlying object as [other]. + NSArchiver.as(objc.ObjCObject other) : object$ = other { + objc.checkOsVersionInternal( + 'NSArchiver', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + } + + /// Constructs a [NSArchiver] that wraps the given raw object pointer. + NSArchiver.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + objc.checkOsVersionInternal( + 'NSArchiver', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + } +} + +/// NSArchiverCallback +extension NSArchiverCallback on NSObject { + /// classForArchiver + objc.ObjCObject? get classForArchiver { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSObject.classForArchiver', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_classForArchiver); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } + + /// replacementObjectForArchiver: + @Deprecated('Deprecated') + objc.ObjCObject? replacementObjectForArchiver(NSArchiver archiver) { + final _$$ref = object$.ref; + final _$$ref$1 = archiver.ref; + objc.checkOsVersionInternal( + 'NSObject.replacementObjectForArchiver:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_replacementObjectForArchiver_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } +} + /// NSArray extension type NSArray._(objc.ObjCObject object$) implements @@ -1717,6 +1783,177 @@ extension NSArray$Methods on NSArray { } } +/// NSArrayCreation +extension NSArrayCreation on NSArray { + /// initWithContentsOfURL:error: + NSArray? initWithContentsOfURL(NSURL url) { + final _$$ref = object$.ref; + final _$$ref$1 = url.ref; + objc.checkOsVersionInternal( + 'NSArray.initWithContentsOfURL:error:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1lhpu4m( + _$$ref.retainAndReturnPointer(), + _sel_initWithContentsOfURL_error_, + _$$ref$1.pointer, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSArray.fromPointer($ret, retain: false, release: true); + } finally { + pkg_ffi.calloc.free($err); + } + } + + /// arrayWithContentsOfURL:error: + static NSArray? arrayWithContentsOfURL(NSURL url) { + final _$$ref = url.ref; + objc.checkOsVersionInternal( + 'NSArray.arrayWithContentsOfURL:error:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1lhpu4m( + _class_NSArray, + _sel_arrayWithContentsOfURL_error_, + _$$ref.pointer, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSArray.fromPointer($ret, retain: true, release: true); + } finally { + pkg_ffi.calloc.free($err); + } + } +} + +/// NSArrayDiffing +extension NSArrayDiffing on NSArray { + /// arrayByApplyingDifference: + NSArray? arrayByApplyingDifference(NSOrderedCollectionDifference difference) { + final _$$ref = object$.ref; + final _$$ref$1 = difference.ref; + objc.checkOsVersionInternal( + 'NSArray.arrayByApplyingDifference:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_arrayByApplyingDifference_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : NSArray.fromPointer($ret, retain: true, release: true); + } + + /// differenceFromArray: + NSOrderedCollectionDifference differenceFromArray(NSArray other) { + final _$$ref = object$.ref; + final _$$ref$1 = other.ref; + objc.checkOsVersionInternal( + 'NSArray.differenceFromArray:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_differenceFromArray_, + _$$ref$1.pointer, + ); + return NSOrderedCollectionDifference.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// differenceFromArray:withOptions: + NSOrderedCollectionDifference differenceFromArray$1( + NSArray other, { + required int withOptions, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = other.ref; + objc.checkOsVersionInternal( + 'NSArray.differenceFromArray:withOptions:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_1wtpmu7( + _$$ref.pointer, + _sel_differenceFromArray_withOptions_, + _$$ref$1.pointer, + withOptions, + ); + return NSOrderedCollectionDifference.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// differenceFromArray:withOptions:usingEquivalenceTest: + NSOrderedCollectionDifference differenceFromArray$2( + NSArray other, { + required int withOptions, + required objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ) + > + usingEquivalenceTest, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = other.ref; + final _$$ref$2 = usingEquivalenceTest.ref; + objc.checkOsVersionInternal( + 'NSArray.differenceFromArray:withOptions:usingEquivalenceTest:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_1415lvo( + _$$ref.pointer, + _sel_differenceFromArray_withOptions_usingEquivalenceTest_, + _$$ref$1.pointer, + withOptions, + _$$ref$2.pointer, + ); + return NSOrderedCollectionDifference.fromPointer( + $ret, + retain: true, + release: true, + ); + } +} + +/// NSArrayPathExtensions +extension NSArrayPathExtensions on NSArray { + /// pathsMatchingExtensions: + NSArray pathsMatchingExtensions(NSArray filterTypes) { + final _$$ref = object$.ref; + final _$$ref$1 = filterTypes.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_pathsMatchingExtensions_, + _$$ref$1.pointer, + ); + return NSArray.fromPointer($ret, retain: true, release: true); + } +} + /// NSAttributedString extension type NSAttributedString._(objc.ObjCObject object$) implements @@ -2157,12 +2394,18 @@ extension NSAttributedString$Methods on NSAttributedString { } } +/// NSAttributedStringCreateFromMarkdown +extension NSAttributedStringCreateFromMarkdown on NSAttributedString {} + sealed class NSAttributedStringEnumerationOptions { static const NSAttributedStringEnumerationReverse = 2; static const NSAttributedStringEnumerationLongestEffectiveRangeNotRequired = 1048576; } +/// NSAttributedStringFormatting +extension NSAttributedStringFormatting on NSAttributedString {} + sealed class NSAttributedStringFormattingOptions { static const NSAttributedStringFormattingInsertArgumentAttributesWithoutMerging = 1; @@ -3412,6 +3655,234 @@ extension NSBundle$Methods on NSBundle { } } +/// NSBundleExtensionMethods +extension NSBundleExtensionMethods on NSString { + /// variantFittingPresentationWidth: + NSString variantFittingPresentationWidth(int width) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSString.variantFittingPresentationWidth:', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), + ); + final $ret = _objc_msgSend_qugqlf( + _$$ref.pointer, + _sel_variantFittingPresentationWidth_, + width, + ); + return NSString.fromPointer($ret, retain: true, release: true); + } +} + +/// NSBundleResourceRequestAdditions +extension NSBundleResourceRequestAdditions on NSBundle { + /// preservationPriorityForTag: + double preservationPriorityForTag(NSString tag) { + final _$$ref = object$.ref; + final _$$ref$1 = tag.ref; + objc.checkOsVersionInternal( + 'NSBundle.preservationPriorityForTag:', + iOS: (false, (9, 0, 0)), + macOS: (true, null), + ); + return objc.useMsgSendVariants + ? _objc_msgSend_mabicuFpret( + _$$ref.pointer, + _sel_preservationPriorityForTag_, + _$$ref$1.pointer, + ) + : _objc_msgSend_mabicu( + _$$ref.pointer, + _sel_preservationPriorityForTag_, + _$$ref$1.pointer, + ); + } + + /// setPreservationPriority:forTags: + void setPreservationPriority(double priority, {required NSSet forTags}) { + final _$$ref = object$.ref; + final _$$ref$1 = forTags.ref; + objc.checkOsVersionInternal( + 'NSBundle.setPreservationPriority:forTags:', + iOS: (false, (9, 0, 0)), + macOS: (true, null), + ); + _objc_msgSend_130mcug( + _$$ref.pointer, + _sel_setPreservationPriority_forTags_, + priority, + _$$ref$1.pointer, + ); + } +} + +/// NSCalendarDate +/// +/// NSCalendarDate +@Deprecated('Use NSCalendar and NSDateComponents and NSDateFormatter instead') +extension type NSCalendarDate._(objc.ObjCObject object$) + implements objc.ObjCObject, NSDate { + /// Constructs a [NSCalendarDate] that points to the same underlying object as [other]. + NSCalendarDate.as(objc.ObjCObject other) : object$ = other { + objc.checkOsVersionInternal( + 'NSCalendarDate', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 4, 0)), + ); + } + + /// Constructs a [NSCalendarDate] that wraps the given raw object pointer. + NSCalendarDate.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + objc.checkOsVersionInternal( + 'NSCalendarDate', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 4, 0)), + ); + } +} + +/// NSCalendarDateExtras +extension NSCalendarDateExtras on NSDate { + /// dateWithCalendarFormat:timeZone: + @Deprecated('Deprecated') + NSCalendarDate dateWithCalendarFormat( + NSString? format, { + NSTimeZone? timeZone, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = format?.ref; + final _$$ref$2 = timeZone?.ref; + objc.checkOsVersionInternal( + 'NSDate.dateWithCalendarFormat:timeZone:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 4, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + _$$ref.pointer, + _sel_dateWithCalendarFormat_timeZone_, + _$$ref$1?.pointer ?? ffi.nullptr, + _$$ref$2?.pointer ?? ffi.nullptr, + ); + return NSCalendarDate.fromPointer($ret, retain: true, release: true); + } + + /// descriptionWithCalendarFormat:timeZone:locale: + @Deprecated('Deprecated') + NSString? descriptionWithCalendarFormat( + NSString? format, { + NSTimeZone? timeZone, + objc.ObjCObject? locale, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = format?.ref; + final _$$ref$2 = timeZone?.ref; + final _$$ref$3 = locale?.ref; + objc.checkOsVersionInternal( + 'NSDate.descriptionWithCalendarFormat:timeZone:locale:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 4, 0)), + ); + final $ret = _objc_msgSend_11spmsz( + _$$ref.pointer, + _sel_descriptionWithCalendarFormat_timeZone_locale_, + _$$ref$1?.pointer ?? ffi.nullptr, + _$$ref$2?.pointer ?? ffi.nullptr, + _$$ref$3?.pointer ?? ffi.nullptr, + ); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); + } + + /// initWithString: + @Deprecated('Use NSDateFormatter instead') + objc.ObjCObject? initWithString(NSString description) { + final _$$ref = object$.ref; + final _$$ref$1 = description.ref; + objc.checkOsVersionInternal( + 'NSDate.initWithString:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 4, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.retainAndReturnPointer(), + _sel_initWithString_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: false, release: true); + } + + /// dateWithNaturalLanguageString: + @Deprecated( + 'Create an NSDateFormatter with `init` and set the dateFormat property instead.', + ) + static objc.ObjCObject? dateWithNaturalLanguageString(NSString string) { + final _$$ref = string.ref; + objc.checkOsVersionInternal( + 'NSDate.dateWithNaturalLanguageString:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 4, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _class_NSDate, + _sel_dateWithNaturalLanguageString_, + _$$ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } + + /// dateWithNaturalLanguageString:locale: + @Deprecated( + 'Create an NSDateFormatter with `init` and set the dateFormat property instead.', + ) + static objc.ObjCObject? dateWithNaturalLanguageString$1( + NSString string, { + objc.ObjCObject? locale, + }) { + final _$$ref = string.ref; + final _$$ref$1 = locale?.ref; + objc.checkOsVersionInternal( + 'NSDate.dateWithNaturalLanguageString:locale:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 4, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + _class_NSDate, + _sel_dateWithNaturalLanguageString_locale_, + _$$ref.pointer, + _$$ref$1?.pointer ?? ffi.nullptr, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } + + /// dateWithString: + @Deprecated('Use NSDateFormatter instead') + static objc.ObjCObject dateWithString(NSString aString) { + final _$$ref = aString.ref; + objc.checkOsVersionInternal( + 'NSDate.dateWithString:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 4, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _class_NSDate, + _sel_dateWithString_, + _$$ref.pointer, + ); + return objc.ObjCObject($ret, retain: true, release: true); + } +} + /// NSCharacterSet extension type NSCharacterSet._(objc.ObjCObject object$) implements @@ -3762,6 +4233,98 @@ extension NSCharacterSet$Methods on NSCharacterSet { } } +/// NSClassDescription +/// +/// NSClassDescription +extension type NSClassDescription._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject { + /// Constructs a [NSClassDescription] that points to the same underlying object as [other]. + NSClassDescription.as(objc.ObjCObject other) : object$ = other {} + + /// Constructs a [NSClassDescription] that wraps the given raw object pointer. + NSClassDescription.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) {} +} + +/// NSClassDescriptionPrimitives +extension NSClassDescriptionPrimitives on NSObject { + /// attributeKeys + NSArray get attributeKeys { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSObject.attributeKeys', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_attributeKeys); + return NSArray.fromPointer($ret, retain: true, release: true); + } + + /// classDescription + NSClassDescription get classDescription { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSObject.classDescription', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_classDescription); + return NSClassDescription.fromPointer($ret, retain: true, release: true); + } + + /// inverseForRelationshipKey: + NSString? inverseForRelationshipKey(NSString relationshipKey) { + final _$$ref = object$.ref; + final _$$ref$1 = relationshipKey.ref; + objc.checkOsVersionInternal( + 'NSObject.inverseForRelationshipKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_inverseForRelationshipKey_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); + } + + /// toManyRelationshipKeys + NSArray get toManyRelationshipKeys { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSObject.toManyRelationshipKeys', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_toManyRelationshipKeys, + ); + return NSArray.fromPointer($ret, retain: true, release: true); + } + + /// toOneRelationshipKeys + NSArray get toOneRelationshipKeys { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSObject.toOneRelationshipKeys', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_toOneRelationshipKeys, + ); + return NSArray.fromPointer($ret, retain: true, release: true); + } +} + /// NSCoder extension type NSCoder._(objc.ObjCObject object$) implements objc.ObjCObject, NSObject { @@ -3897,6 +4460,79 @@ extension NSCoder$Methods on NSCoder { } } +/// NSCoderMethods +extension NSCoderMethods on NSObject { + /// awakeAfterUsingCoder: + objc.ObjCObject? awakeAfterUsingCoder(NSCoder coder) { + final _$$ref = object$.ref; + final _$$ref$1 = coder.ref; + objc.checkOsVersionInternal( + 'NSObject.awakeAfterUsingCoder:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.retainAndReturnPointer(), + _sel_awakeAfterUsingCoder_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: false, release: true); + } + + /// classForCoder + objc.ObjCObject get classForCoder { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSObject.classForCoder', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_classForCoder); + return objc.ObjCObject($ret, retain: true, release: true); + } + + /// replacementObjectForCoder: + objc.ObjCObject? replacementObjectForCoder(NSCoder coder) { + final _$$ref = object$.ref; + final _$$ref$1 = coder.ref; + objc.checkOsVersionInternal( + 'NSObject.replacementObjectForCoder:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_replacementObjectForCoder_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } + + /// setVersion: + static void setVersion(int aVersion) { + objc.checkOsVersionInternal( + 'NSObject.setVersion:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_4sp4xj(_class_NSObject, _sel_setVersion_, aVersion); + } + + /// version + static int version() { + objc.checkOsVersionInternal( + 'NSObject.version', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_1hz7y9r(_class_NSObject, _sel_version); + } +} + /// NSCoding extension type NSCoding._(objc.ObjCProtocol object$) implements objc.ObjCProtocol { @@ -4143,6 +4779,153 @@ enum NSCollectionChangeType { }; } +/// NSComparisonMethods +extension NSComparisonMethods on NSObject { + /// doesContain: + bool doesContain(objc.ObjCObject object) { + final _$$ref = object$.ref; + final _$$ref$1 = object.ref; + objc.checkOsVersionInternal( + 'NSObject.doesContain:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_doesContain_, + _$$ref$1.pointer, + ); + } + + /// isCaseInsensitiveLike: + bool isCaseInsensitiveLike(NSString object) { + final _$$ref = object$.ref; + final _$$ref$1 = object.ref; + objc.checkOsVersionInternal( + 'NSObject.isCaseInsensitiveLike:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_isCaseInsensitiveLike_, + _$$ref$1.pointer, + ); + } + + /// isEqualTo: + bool isEqualTo(objc.ObjCObject? object) { + final _$$ref = object$.ref; + final _$$ref$1 = object?.ref; + objc.checkOsVersionInternal( + 'NSObject.isEqualTo:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_isEqualTo_, + _$$ref$1?.pointer ?? ffi.nullptr, + ); + } + + /// isGreaterThan: + bool isGreaterThan(objc.ObjCObject? object) { + final _$$ref = object$.ref; + final _$$ref$1 = object?.ref; + objc.checkOsVersionInternal( + 'NSObject.isGreaterThan:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_isGreaterThan_, + _$$ref$1?.pointer ?? ffi.nullptr, + ); + } + + /// isGreaterThanOrEqualTo: + bool isGreaterThanOrEqualTo(objc.ObjCObject? object) { + final _$$ref = object$.ref; + final _$$ref$1 = object?.ref; + objc.checkOsVersionInternal( + 'NSObject.isGreaterThanOrEqualTo:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_isGreaterThanOrEqualTo_, + _$$ref$1?.pointer ?? ffi.nullptr, + ); + } + + /// isLessThan: + bool isLessThan(objc.ObjCObject? object) { + final _$$ref = object$.ref; + final _$$ref$1 = object?.ref; + objc.checkOsVersionInternal( + 'NSObject.isLessThan:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_isLessThan_, + _$$ref$1?.pointer ?? ffi.nullptr, + ); + } + + /// isLessThanOrEqualTo: + bool isLessThanOrEqualTo(objc.ObjCObject? object) { + final _$$ref = object$.ref; + final _$$ref$1 = object?.ref; + objc.checkOsVersionInternal( + 'NSObject.isLessThanOrEqualTo:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_isLessThanOrEqualTo_, + _$$ref$1?.pointer ?? ffi.nullptr, + ); + } + + /// isLike: + bool isLike(NSString object) { + final _$$ref = object$.ref; + final _$$ref$1 = object.ref; + objc.checkOsVersionInternal( + 'NSObject.isLike:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_isLike_, + _$$ref$1.pointer, + ); + } + + /// isNotEqualTo: + bool isNotEqualTo(objc.ObjCObject? object) { + final _$$ref = object$.ref; + final _$$ref$1 = object?.ref; + objc.checkOsVersionInternal( + 'NSObject.isNotEqualTo:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_isNotEqualTo_, + _$$ref$1?.pointer ?? ffi.nullptr, + ); + } +} + enum NSComparisonResult { NSOrderedAscending(-1), NSOrderedSame(0), @@ -4188,6 +4971,50 @@ extension type NSConnection._(objc.ObjCObject object$) } } +/// NSCopyLinkMoveHandler +extension NSCopyLinkMoveHandler on NSObject { + /// fileManager:shouldProceedAfterError: + @Deprecated(' Handler API no longer supported') + bool fileManager( + NSFileManager fm, { + required NSDictionary shouldProceedAfterError, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = fm.ref; + final _$$ref$2 = shouldProceedAfterError.ref; + objc.checkOsVersionInternal( + 'NSObject.fileManager:shouldProceedAfterError:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_1lsax7n( + _$$ref.pointer, + _sel_fileManager_shouldProceedAfterError_, + _$$ref$1.pointer, + _$$ref$2.pointer, + ); + } + + /// fileManager:willProcessPath: + @Deprecated('Handler API no longer supported') + void fileManager$1(NSFileManager fm, {required NSString willProcessPath}) { + final _$$ref = object$.ref; + final _$$ref$1 = fm.ref; + final _$$ref$2 = willProcessPath.ref; + objc.checkOsVersionInternal( + 'NSObject.fileManager:willProcessPath:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_pfv6jd( + _$$ref.pointer, + _sel_fileManager_willProcessPath_, + _$$ref$1.pointer, + _$$ref$2.pointer, + ); + } +} + /// NSCopying extension type NSCopying._(objc.ObjCProtocol object$) implements objc.ObjCProtocol { @@ -4771,6 +5598,41 @@ sealed class NSDataBase64DecodingOptions { static const NSDataBase64DecodingIgnoreUnknownCharacters = 1; } +/// NSDataBase64Encoding +extension NSDataBase64Encoding on NSData { + /// base64EncodedDataWithOptions: + NSData base64EncodedDataWithOptions(int options) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSData.base64EncodedDataWithOptions:', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), + ); + final $ret = _objc_msgSend_ylninc( + _$$ref.pointer, + _sel_base64EncodedDataWithOptions_, + options, + ); + return NSData.fromPointer($ret, retain: true, release: true); + } + + /// base64EncodedStringWithOptions: + NSString base64EncodedStringWithOptions(int options) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSData.base64EncodedStringWithOptions:', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), + ); + final $ret = _objc_msgSend_ylninc( + _$$ref.pointer, + _sel_base64EncodedStringWithOptions_, + options, + ); + return NSString.fromPointer($ret, retain: true, release: true); + } +} + sealed class NSDataBase64EncodingOptions { static const NSDataBase64Encoding64CharacterLineLength = 1; static const NSDataBase64Encoding76CharacterLineLength = 2; @@ -4778,6 +5640,9 @@ sealed class NSDataBase64EncodingOptions { static const NSDataBase64EncodingEndLineWithLineFeed = 32; } +/// NSDataCompression +extension NSDataCompression on NSData {} + enum NSDataCompressionAlgorithm { NSDataCompressionAlgorithmLZFSE(0), NSDataCompressionAlgorithmLZ4(1), @@ -5057,6 +5922,35 @@ extension NSDate$Methods on NSDate { } } +/// NSDateCreation +extension NSDateCreation on NSDate { + /// distantFuture + static NSDate getDistantFuture() { + final $ret = _objc_msgSend_151sglz(_class_NSDate, _sel_distantFuture); + return NSDate.fromPointer($ret, retain: true, release: true); + } + + /// distantPast + static NSDate getDistantPast() { + final $ret = _objc_msgSend_151sglz(_class_NSDate, _sel_distantPast); + return NSDate.fromPointer($ret, retain: true, release: true); + } + + /// now + static NSDate getNow() { + objc.checkOsVersionInternal( + 'NSDate.now', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_151sglz(_class_NSDate, _sel_now); + return NSDate.fromPointer($ret, retain: true, release: true); + } +} + +/// NSDecimalNumberExtensions +extension NSDecimalNumberExtensions on NSNumber {} + enum NSDecodingFailurePolicy { NSDecodingFailurePolicyRaiseException(0), NSDecodingFailurePolicySetErrorAndReturn(1); @@ -5073,455 +5967,727 @@ enum NSDecodingFailurePolicy { }; } -/// NSDictionary -extension type NSDictionary._(objc.ObjCObject object$) - implements - objc.ObjCObject, - NSObject, - NSCopying, - NSMutableCopying, - NSSecureCoding, - NSFastEnumeration { - /// Creates a [NSDictionary] from [other]. - static NSDictionary of(Map other) => - NSMutableDictionary.of(other); - - /// Creates a [NSDictionary] from [entries]. - static NSDictionary fromEntries( - Iterable> entries, - ) => NSMutableDictionary.fromEntries(entries); - - /// Constructs a [NSDictionary] that points to the same underlying object as [other]. - NSDictionary.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); +/// NSDelayedPerforming +extension NSDelayedPerforming on NSObject { + /// performSelector:withObject:afterDelay: + void performSelector$3( + ffi.Pointer aSelector, { + objc.ObjCObject? withObject, + required double afterDelay, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = withObject?.ref; + objc.checkOsVersionInternal( + 'NSObject.performSelector:withObject:afterDelay:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_7ql5kn( + _$$ref.pointer, + _sel_performSelector_withObject_afterDelay_, + aSelector, + _$$ref$1?.pointer ?? ffi.nullptr, + afterDelay, + ); } - /// Constructs a [NSDictionary] that wraps the given raw object pointer. - NSDictionary.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); + /// performSelector:withObject:afterDelay:inModes: + void performSelector$4( + ffi.Pointer aSelector, { + objc.ObjCObject? withObject, + required double afterDelay, + required NSArray inModes, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = withObject?.ref; + final _$$ref$2 = inModes.ref; + objc.checkOsVersionInternal( + 'NSObject.performSelector:withObject:afterDelay:inModes:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_t8ajot( + _$$ref.pointer, + _sel_performSelector_withObject_afterDelay_inModes_, + aSelector, + _$$ref$1?.pointer ?? ffi.nullptr, + afterDelay, + _$$ref$2.pointer, + ); } - /// Returns whether [obj] is an instance of [NSDictionary]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSDictionary, - ); + /// cancelPreviousPerformRequestsWithTarget: + static void cancelPreviousPerformRequestsWithTarget(objc.ObjCObject aTarget) { + final _$$ref = aTarget.ref; + objc.checkOsVersionInternal( + 'NSObject.cancelPreviousPerformRequestsWithTarget:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_xtuoz7( + _class_NSObject, + _sel_cancelPreviousPerformRequestsWithTarget_, + _$$ref.pointer, + ); + } - /// alloc - static NSDictionary alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSDictionary, _sel_alloc); - return NSDictionary.fromPointer($ret, retain: false, release: true); + /// cancelPreviousPerformRequestsWithTarget:selector:object: + static void cancelPreviousPerformRequestsWithTarget$1( + objc.ObjCObject aTarget, { + required ffi.Pointer selector, + objc.ObjCObject? object, + }) { + final _$$ref = aTarget.ref; + final _$$ref$1 = object?.ref; + objc.checkOsVersionInternal( + 'NSObject.cancelPreviousPerformRequestsWithTarget:selector:object:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_1ygbbzi( + _class_NSObject, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + _$$ref.pointer, + selector, + _$$ref$1?.pointer ?? ffi.nullptr, + ); } +} - /// allocWithZone: - static NSDictionary allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSDictionary, - _sel_allocWithZone_, - zone, +/// NSDeprecated +extension NSDeprecated on NSDictionary { + /// getObjects:andKeys: + @Deprecated('Use -getObjects:andKeys:count: instead') + void getObjects( + ffi.Pointer> objects, { + required ffi.Pointer> andKeys, + }) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSDictionary.getObjects:andKeys:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_hefmm1( + _$$ref.pointer, + _sel_getObjects_andKeys_, + objects, + andKeys, ); - return NSDictionary.fromPointer($ret, retain: false, release: true); } - /// dictionary - static NSDictionary dictionary() { - final $ret = _objc_msgSend_151sglz(_class_NSDictionary, _sel_dictionary); - return NSDictionary.fromPointer($ret, retain: true, release: true); + /// initWithContentsOfFile: + @Deprecated('Deprecated') + NSDictionary? initWithContentsOfFile(NSString path) { + final _$$ref = object$.ref; + final _$$ref$1 = path.ref; + objc.checkOsVersionInternal( + 'NSDictionary.initWithContentsOfFile:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.retainAndReturnPointer(), + _sel_initWithContentsOfFile_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : NSDictionary.fromPointer($ret, retain: false, release: true); } - /// dictionaryWithDictionary: - static NSDictionary dictionaryWithDictionary(NSDictionary dict) { - final _$$ref = dict.ref; + /// initWithContentsOfURL: + @Deprecated('Deprecated') + NSDictionary? initWithContentsOfURL(NSURL url) { + final _$$ref = object$.ref; + final _$$ref$1 = url.ref; + objc.checkOsVersionInternal( + 'NSDictionary.initWithContentsOfURL:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); final $ret = _objc_msgSend_1sotr3r( - _class_NSDictionary, - _sel_dictionaryWithDictionary_, - _$$ref.pointer, + _$$ref.retainAndReturnPointer(), + _sel_initWithContentsOfURL_, + _$$ref$1.pointer, ); - return NSDictionary.fromPointer($ret, retain: true, release: true); + return $ret.address == 0 + ? null + : NSDictionary.fromPointer($ret, retain: false, release: true); } - /// dictionaryWithObject:forKey: - static NSDictionary dictionaryWithObject( - objc.ObjCObject object, { - required NSCopying forKey, - }) { - final _$$ref = object.ref; - final _$$ref$1 = forKey.ref; - final $ret = _objc_msgSend_15qeuct( - _class_NSDictionary, - _sel_dictionaryWithObject_forKey_, + /// writeToFile:atomically: + @Deprecated('Deprecated') + bool writeToFile(NSString path, {required bool atomically}) { + final _$$ref = object$.ref; + final _$$ref$1 = path.ref; + objc.checkOsVersionInternal( + 'NSDictionary.writeToFile:atomically:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_1iyq28l( _$$ref.pointer, + _sel_writeToFile_atomically_, _$$ref$1.pointer, + atomically, ); - return NSDictionary.fromPointer($ret, retain: true, release: true); } - /// dictionaryWithObjects:forKeys: - static NSDictionary dictionaryWithObjects( - NSArray objects, { - required NSArray forKeys, - }) { - final _$$ref = objects.ref; - final _$$ref$1 = forKeys.ref; - final $ret = _objc_msgSend_15qeuct( - _class_NSDictionary, - _sel_dictionaryWithObjects_forKeys_, + /// writeToURL:atomically: + @Deprecated('Deprecated') + bool writeToURL(NSURL url, {required bool atomically}) { + final _$$ref = object$.ref; + final _$$ref$1 = url.ref; + objc.checkOsVersionInternal( + 'NSDictionary.writeToURL:atomically:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_1iyq28l( _$$ref.pointer, + _sel_writeToURL_atomically_, _$$ref$1.pointer, + atomically, ); - return NSDictionary.fromPointer($ret, retain: true, release: true); } - /// dictionaryWithObjects:forKeys:count: - static NSDictionary dictionaryWithObjects$1( - ffi.Pointer> objects, { - required ffi.Pointer> forKeys, - required int count, - }) { - final $ret = _objc_msgSend_1dydpdi( + /// dictionaryWithContentsOfFile: + @Deprecated('Deprecated') + static NSDictionary? dictionaryWithContentsOfFile(NSString path) { + final _$$ref = path.ref; + objc.checkOsVersionInternal( + 'NSDictionary.dictionaryWithContentsOfFile:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( _class_NSDictionary, - _sel_dictionaryWithObjects_forKeys_count_, - objects, - forKeys, - count, + _sel_dictionaryWithContentsOfFile_, + _$$ref.pointer, ); - return NSDictionary.fromPointer($ret, retain: true, release: true); + return $ret.address == 0 + ? null + : NSDictionary.fromPointer($ret, retain: true, release: true); } - /// dictionaryWithObjectsAndKeys: - static NSDictionary dictionaryWithObjectsAndKeys( - objc.ObjCObject firstObject, - ) { - final _$$ref = firstObject.ref; + /// dictionaryWithContentsOfURL: + @Deprecated('Deprecated') + static NSDictionary? dictionaryWithContentsOfURL(NSURL url) { + final _$$ref = url.ref; + objc.checkOsVersionInternal( + 'NSDictionary.dictionaryWithContentsOfURL:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); final $ret = _objc_msgSend_1sotr3r( _class_NSDictionary, - _sel_dictionaryWithObjectsAndKeys_, + _sel_dictionaryWithContentsOfURL_, _$$ref.pointer, ); - return NSDictionary.fromPointer($ret, retain: true, release: true); + return $ret.address == 0 + ? null + : NSDictionary.fromPointer($ret, retain: true, release: true); } +} - /// new - static NSDictionary new$() { - final $ret = _objc_msgSend_151sglz(_class_NSDictionary, _sel_new); - return NSDictionary.fromPointer($ret, retain: false, release: true); +/// NSDeprecated +extension NSDeprecated$1 on NSValue { + /// getValue: + @Deprecated('Deprecated') + void getValue$1(ffi.Pointer value) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSValue.getValue:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_ovsamd(_$$ref.pointer, _sel_getValue_, value); } +} - /// supportsSecureCoding - static bool getSupportsSecureCoding() { - return _objc_msgSend_91o635(_class_NSDictionary, _sel_supportsSecureCoding); +/// NSDeprecated +extension NSDeprecated$2 on NSArray { + /// getObjects: + @Deprecated('Use -getObjects:range: instead') + void getObjects(ffi.Pointer> objects) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSArray.getObjects:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_1dau4w(_$$ref.pointer, _sel_getObjects_, objects); } - /// Returns a new instance of NSDictionary constructed with the default `new` method. - NSDictionary() : this.as(new$().object$); -} - -extension NSDictionary$Methods on NSDictionary { - /// count - int get count { + /// initWithContentsOfFile: + @Deprecated('Deprecated') + NSArray? initWithContentsOfFile(NSString path) { final _$$ref = object$.ref; - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_count); + final _$$ref$1 = path.ref; + objc.checkOsVersionInternal( + 'NSArray.initWithContentsOfFile:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.retainAndReturnPointer(), + _sel_initWithContentsOfFile_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : NSArray.fromPointer($ret, retain: false, release: true); } - /// countByEnumeratingWithState:objects:count: - int countByEnumeratingWithState( - ffi.Pointer state, { - required ffi.Pointer> objects, - required int count, - }) { - final _$$ref$1 = object$.ref; - return _objc_msgSend_1b5ysjl( + /// initWithContentsOfURL: + @Deprecated('Deprecated') + NSArray? initWithContentsOfURL(NSURL url) { + final _$$ref = object$.ref; + final _$$ref$1 = url.ref; + objc.checkOsVersionInternal( + 'NSArray.initWithContentsOfURL:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.retainAndReturnPointer(), + _sel_initWithContentsOfURL_, _$$ref$1.pointer, - _sel_countByEnumeratingWithState_objects_count_, - state, - objects, - count, ); + return $ret.address == 0 + ? null + : NSArray.fromPointer($ret, retain: false, release: true); } - /// encodeWithCoder: - void encodeWithCoder(NSCoder coder) { - final _$$ref$12 = object$.ref; - final _$$ref$13 = coder.ref; - _objc_msgSend_xtuoz7( - _$$ref$12.pointer, - _sel_encodeWithCoder_, - _$$ref$13.pointer, + /// writeToFile:atomically: + @Deprecated('Deprecated') + bool writeToFile(NSString path, {required bool atomically}) { + final _$$ref = object$.ref; + final _$$ref$1 = path.ref; + objc.checkOsVersionInternal( + 'NSArray.writeToFile:atomically:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_1iyq28l( + _$$ref.pointer, + _sel_writeToFile_atomically_, + _$$ref$1.pointer, + atomically, ); } - /// init - NSDictionary init() { - final _$$ref$13 = object$.ref; + /// writeToURL:atomically: + @Deprecated('Deprecated') + bool writeToURL(NSURL url, {required bool atomically}) { + final _$$ref = object$.ref; + final _$$ref$1 = url.ref; objc.checkOsVersionInternal( - 'NSDictionary.init', + 'NSArray.writeToURL:atomically:', iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); - final $ret = _objc_msgSend_151sglz( - _$$ref$13.retainAndReturnPointer(), - _sel_init, + return _objc_msgSend_1iyq28l( + _$$ref.pointer, + _sel_writeToURL_atomically_, + _$$ref$1.pointer, + atomically, ); - return NSDictionary.fromPointer($ret, retain: false, release: true); } - /// initWithCoder: - NSDictionary? initWithCoder(NSCoder coder) { - final _$$ref$12 = object$.ref; - final _$$ref$13 = coder.ref; + /// arrayWithContentsOfFile: + @Deprecated('Deprecated') + static NSArray? arrayWithContentsOfFile(NSString path) { + final _$$ref = path.ref; + objc.checkOsVersionInternal( + 'NSArray.arrayWithContentsOfFile:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); final $ret = _objc_msgSend_1sotr3r( - _$$ref$12.retainAndReturnPointer(), - _sel_initWithCoder_, - _$$ref$13.pointer, + _class_NSArray, + _sel_arrayWithContentsOfFile_, + _$$ref.pointer, ); return $ret.address == 0 ? null - : NSDictionary.fromPointer($ret, retain: false, release: true); + : NSArray.fromPointer($ret, retain: true, release: true); } - /// initWithDictionary: - NSDictionary initWithDictionary(NSDictionary otherDictionary) { - final _$$ref = object$.ref; - final _$$ref$1 = otherDictionary.ref; + /// arrayWithContentsOfURL: + @Deprecated('Deprecated') + static NSArray? arrayWithContentsOfURL(NSURL url) { + final _$$ref = url.ref; + objc.checkOsVersionInternal( + 'NSArray.arrayWithContentsOfURL:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); final $ret = _objc_msgSend_1sotr3r( - _$$ref.retainAndReturnPointer(), - _sel_initWithDictionary_, - _$$ref$1.pointer, + _class_NSArray, + _sel_arrayWithContentsOfURL_, + _$$ref.pointer, ); - return NSDictionary.fromPointer($ret, retain: false, release: true); + return $ret.address == 0 + ? null + : NSArray.fromPointer($ret, retain: true, release: true); } +} - /// initWithDictionary:copyItems: - NSDictionary initWithDictionary$1( - NSDictionary otherDictionary, { - required bool copyItems, - }) { +/// NSDeprecated +extension NSDeprecated$3 on NSData { + /// base64Encoding + @Deprecated('Use base64EncodedStringWithOptions: instead') + NSString base64Encoding() { final _$$ref = object$.ref; - final _$$ref$1 = otherDictionary.ref; - final $ret = _objc_msgSend_17amj0z( - _$$ref.retainAndReturnPointer(), - _sel_initWithDictionary_copyItems_, - _$$ref$1.pointer, - copyItems, + objc.checkOsVersionInternal( + 'NSData.base64Encoding', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - return NSDictionary.fromPointer($ret, retain: false, release: true); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_base64Encoding); + return NSString.fromPointer($ret, retain: true, release: true); } - /// initWithObjects:forKeys: - NSDictionary initWithObjects(NSArray objects, {required NSArray forKeys}) { + /// getBytes: + @Deprecated( + 'This method is unsafe because it could potentially cause buffer overruns. Use -getBytes:length: instead.', + ) + void getBytes(ffi.Pointer buffer) { final _$$ref = object$.ref; - final _$$ref$1 = objects.ref; - final _$$ref$2 = forKeys.ref; - final $ret = _objc_msgSend_15qeuct( - _$$ref.retainAndReturnPointer(), - _sel_initWithObjects_forKeys_, - _$$ref$1.pointer, - _$$ref$2.pointer, + objc.checkOsVersionInternal( + 'NSData.getBytes:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - return NSDictionary.fromPointer($ret, retain: false, release: true); + _objc_msgSend_ovsamd(_$$ref.pointer, _sel_getBytes_, buffer); } - /// initWithObjects:forKeys:count: - NSDictionary initWithObjects$1( - ffi.Pointer> objects, { - required ffi.Pointer> forKeys, - required int count, - }) { + /// initWithBase64Encoding: + @Deprecated('Use initWithBase64EncodedString:options: instead') + objc.ObjCObject? initWithBase64Encoding(NSString base64String) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_1dydpdi( + final _$$ref$1 = base64String.ref; + objc.checkOsVersionInternal( + 'NSData.initWithBase64Encoding:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( _$$ref.retainAndReturnPointer(), - _sel_initWithObjects_forKeys_count_, - objects, - forKeys, - count, + _sel_initWithBase64Encoding_, + _$$ref$1.pointer, ); - return NSDictionary.fromPointer($ret, retain: false, release: true); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: false, release: true); } - /// initWithObjectsAndKeys: - NSDictionary initWithObjectsAndKeys(objc.ObjCObject firstObject) { + /// initWithContentsOfMappedFile: + @Deprecated( + 'Use -initWithContentsOfURL:options:error: and NSDataReadingMappedIfSafe or NSDataReadingMappedAlways instead.', + ) + objc.ObjCObject? initWithContentsOfMappedFile(NSString path) { final _$$ref = object$.ref; - final _$$ref$1 = firstObject.ref; + final _$$ref$1 = path.ref; + objc.checkOsVersionInternal( + 'NSData.initWithContentsOfMappedFile:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); final $ret = _objc_msgSend_1sotr3r( _$$ref.retainAndReturnPointer(), - _sel_initWithObjectsAndKeys_, + _sel_initWithContentsOfMappedFile_, _$$ref$1.pointer, ); - return NSDictionary.fromPointer($ret, retain: false, release: true); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: false, release: true); } - /// keyEnumerator - NSEnumerator keyEnumerator() { + /// dataWithContentsOfMappedFile: + @Deprecated( + 'Use +dataWithContentsOfURL:options:error: and NSDataReadingMappedIfSafe or NSDataReadingMappedAlways instead.', + ) + static objc.ObjCObject? dataWithContentsOfMappedFile(NSString path) { + final _$$ref = path.ref; + objc.checkOsVersionInternal( + 'NSData.dataWithContentsOfMappedFile:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _class_NSData, + _sel_dataWithContentsOfMappedFile_, + _$$ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } +} + +/// NSDeprecated +extension NSDeprecated$4 on NSCoder { + /// decodeValueOfObjCType:at: + @Deprecated('Deprecated') + void decodeValueOfObjCType$1( + ffi.Pointer type, { + required ffi.Pointer at, + }) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_keyEnumerator); - return NSEnumerator.fromPointer($ret, retain: true, release: true); + objc.checkOsVersionInternal( + 'NSCoder.decodeValueOfObjCType:at:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_1flkydz( + _$$ref.pointer, + _sel_decodeValueOfObjCType_at_, + type, + at, + ); } +} - /// objectForKey: - objc.ObjCObject? objectForKey(objc.ObjCObject aKey) { +/// NSDeprecatedKeyValueCoding +extension NSDeprecatedKeyValueCoding on NSObject { + /// handleQueryWithUnboundKey: + @Deprecated('Legacy KVC API') + objc.ObjCObject? handleQueryWithUnboundKey(NSString key) { final _$$ref = object$.ref; - final _$$ref$1 = aKey.ref; + final _$$ref$1 = key.ref; + objc.checkOsVersionInternal( + 'NSObject.handleQueryWithUnboundKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_objectForKey_, + _sel_handleQueryWithUnboundKey_, _$$ref$1.pointer, ); return $ret.address == 0 ? null : objc.ObjCObject($ret, retain: true, release: true); } -} - -sealed class NSDirectoryEnumerationOptions { - static const NSDirectoryEnumerationSkipsSubdirectoryDescendants = 1; - static const NSDirectoryEnumerationSkipsPackageDescendants = 2; - static const NSDirectoryEnumerationSkipsHiddenFiles = 4; - static const NSDirectoryEnumerationIncludesDirectoriesPostOrder = 8; - static const NSDirectoryEnumerationProducesRelativePathURLs = 16; -} -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; - - static ffi.Pointer $allocate( - ffi.Allocator $allocator, { - required double top, - required double left, - required double bottom, - required double right, - }) => $allocator() - ..ref.top = top - ..ref.left = left - ..ref.bottom = bottom - ..ref.right = right; -} - -sealed class NSEnumerationOptions { - static const NSEnumerationConcurrent = 1; - static const NSEnumerationReverse = 2; -} - -/// NSEnumerator -extension type NSEnumerator._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject, NSFastEnumeration { - /// Constructs a [NSEnumerator] that points to the same underlying object as [other]. - NSEnumerator.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); + /// handleTakeValue:forUnboundKey: + @Deprecated('Legacy KVC API') + void handleTakeValue( + objc.ObjCObject? value, { + required NSString forUnboundKey, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = value?.ref; + final _$$ref$2 = forUnboundKey.ref; + objc.checkOsVersionInternal( + 'NSObject.handleTakeValue:forUnboundKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_pfv6jd( + _$$ref.pointer, + _sel_handleTakeValue_forUnboundKey_, + _$$ref$1?.pointer ?? ffi.nullptr, + _$$ref$2.pointer, + ); } - /// Constructs a [NSEnumerator] that wraps the given raw object pointer. - NSEnumerator.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); + /// storedValueForKey: + @Deprecated('Legacy KVC API') + objc.ObjCObject? storedValueForKey(NSString key) { + final _$$ref = object$.ref; + final _$$ref$1 = key.ref; + objc.checkOsVersionInternal( + 'NSObject.storedValueForKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_storedValueForKey_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSEnumerator]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSEnumerator, - ); - - /// alloc - static NSEnumerator alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSEnumerator, _sel_alloc); - return NSEnumerator.fromPointer($ret, retain: false, release: true); + /// takeStoredValue:forKey: + @Deprecated('Legacy KVC API') + void takeStoredValue(objc.ObjCObject? value, {required NSString forKey}) { + final _$$ref = object$.ref; + final _$$ref$1 = value?.ref; + final _$$ref$2 = forKey.ref; + objc.checkOsVersionInternal( + 'NSObject.takeStoredValue:forKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_pfv6jd( + _$$ref.pointer, + _sel_takeStoredValue_forKey_, + _$$ref$1?.pointer ?? ffi.nullptr, + _$$ref$2.pointer, + ); } - /// allocWithZone: - static NSEnumerator allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSEnumerator, - _sel_allocWithZone_, - zone, + /// takeValue:forKey: + @Deprecated('Legacy KVC API') + void takeValue(objc.ObjCObject? value, {required NSString forKey}) { + final _$$ref = object$.ref; + final _$$ref$1 = value?.ref; + final _$$ref$2 = forKey.ref; + objc.checkOsVersionInternal( + 'NSObject.takeValue:forKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_pfv6jd( + _$$ref.pointer, + _sel_takeValue_forKey_, + _$$ref$1?.pointer ?? ffi.nullptr, + _$$ref$2.pointer, ); - return NSEnumerator.fromPointer($ret, retain: false, release: true); } - /// new - static NSEnumerator new$() { - final $ret = _objc_msgSend_151sglz(_class_NSEnumerator, _sel_new); - return NSEnumerator.fromPointer($ret, retain: false, release: true); + /// takeValue:forKeyPath: + @Deprecated('Legacy KVC API') + void takeValue$1(objc.ObjCObject? value, {required NSString forKeyPath}) { + final _$$ref = object$.ref; + final _$$ref$1 = value?.ref; + final _$$ref$2 = forKeyPath.ref; + objc.checkOsVersionInternal( + 'NSObject.takeValue:forKeyPath:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_pfv6jd( + _$$ref.pointer, + _sel_takeValue_forKeyPath_, + _$$ref$1?.pointer ?? ffi.nullptr, + _$$ref$2.pointer, + ); } - /// Returns a new instance of NSEnumerator constructed with the default `new` method. - NSEnumerator() : this.as(new$().object$); -} - -extension NSEnumerator$Methods on NSEnumerator { - /// countByEnumeratingWithState:objects:count: - int countByEnumeratingWithState( - ffi.Pointer state, { - required ffi.Pointer> objects, - required int count, - }) { - final _$$ref$2 = object$.ref; - return _objc_msgSend_1b5ysjl( - _$$ref$2.pointer, - _sel_countByEnumeratingWithState_objects_count_, - state, - objects, - count, + /// takeValuesFromDictionary: + @Deprecated('Legacy KVC API') + void takeValuesFromDictionary(NSDictionary properties) { + final _$$ref = object$.ref; + final _$$ref$1 = properties.ref; + objc.checkOsVersionInternal( + 'NSObject.takeValuesFromDictionary:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_takeValuesFromDictionary_, + _$$ref$1.pointer, ); } - /// init - NSEnumerator init() { - final _$$ref$14 = object$.ref; + /// unableToSetNilForKey: + @Deprecated('Legacy KVC API') + void unableToSetNilForKey(NSString key) { + final _$$ref = object$.ref; + final _$$ref$1 = key.ref; objc.checkOsVersionInternal( - 'NSEnumerator.init', + 'NSObject.unableToSetNilForKey:', iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); - final $ret = _objc_msgSend_151sglz( - _$$ref$14.retainAndReturnPointer(), - _sel_init, + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_unableToSetNilForKey_, + _$$ref$1.pointer, ); - return NSEnumerator.fromPointer($ret, retain: false, release: true); } - /// nextObject - objc.ObjCObject? nextObject() { + /// valuesForKeys: + @Deprecated('Legacy KVC API') + NSDictionary valuesForKeys(NSArray keys) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_nextObject); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); + final _$$ref$1 = keys.ref; + objc.checkOsVersionInternal( + 'NSObject.valuesForKeys:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_valuesForKeys_, + _$$ref$1.pointer, + ); + return NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// useStoredAccessor + @Deprecated('Legacy KVC API') + static bool useStoredAccessor() { + objc.checkOsVersionInternal( + 'NSObject.useStoredAccessor', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_91o635(_class_NSObject, _sel_useStoredAccessor); } } -/// NSError -extension type NSError._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject, NSCopying, NSSecureCoding { - /// Constructs a [NSError] that points to the same underlying object as [other]. - NSError.as(objc.ObjCObject other) : object$ = other { +/// NSDeprecatedKeyValueObservingCustomization +extension NSDeprecatedKeyValueObservingCustomization on NSObject { + /// setKeys:triggerChangeNotificationsForDependentKey: + @Deprecated('Use +keyPathsForValuesAffectingValueForKey instead') + static void setKeys( + NSArray keys, { + required NSString triggerChangeNotificationsForDependentKey, + }) { + final _$$ref = keys.ref; + final _$$ref$1 = triggerChangeNotificationsForDependentKey.ref; + objc.checkOsVersionInternal( + 'NSObject.setKeys:triggerChangeNotificationsForDependentKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_pfv6jd( + _class_NSObject, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + _$$ref.pointer, + _$$ref$1.pointer, + ); + } +} + +/// NSDeprecatedMethods +extension NSDeprecatedMethods on NSObject {} + +/// NSDictionary +extension type NSDictionary._(objc.ObjCObject object$) + implements + objc.ObjCObject, + NSObject, + NSCopying, + NSMutableCopying, + NSSecureCoding, + NSFastEnumeration { + /// Creates a [NSDictionary] from [other]. + static NSDictionary of(Map other) => + NSMutableDictionary.of(other); + + /// Creates a [NSDictionary] from [entries]. + static NSDictionary fromEntries( + Iterable> entries, + ) => NSMutableDictionary.fromEntries(entries); + + /// Constructs a [NSDictionary] that points to the same underlying object as [other]. + NSDictionary.as(objc.ObjCObject other) : object$ = other { assert(isA(object$)); } - /// Constructs a [NSError] that wraps the given raw object pointer. - NSError.fromPointer( + /// Constructs a [NSDictionary] that wraps the given raw object pointer. + NSDictionary.fromPointer( ffi.Pointer other, { bool retain = false, bool release = false, @@ -5529,584 +6695,1119 @@ extension type NSError._(objc.ObjCObject object$) assert(isA(object$)); } - /// Returns whether [obj] is an instance of [NSError]. + /// Returns whether [obj] is an instance of [NSDictionary]. static bool isA(objc.ObjCObject? obj) => obj == null ? false : _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, - _class_NSError, + _class_NSDictionary, ); /// alloc - static NSError alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSError, _sel_alloc); - return NSError.fromPointer($ret, retain: false, release: true); + static NSDictionary alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSDictionary, _sel_alloc); + return NSDictionary.fromPointer($ret, retain: false, release: true); } /// allocWithZone: - static NSError allocWithZone(ffi.Pointer zone) { + static NSDictionary allocWithZone(ffi.Pointer zone) { final $ret = _objc_msgSend_1cwp428( - _class_NSError, + _class_NSDictionary, _sel_allocWithZone_, zone, ); - return NSError.fromPointer($ret, retain: false, release: true); + return NSDictionary.fromPointer($ret, retain: false, release: true); } - /// errorWithDomain:code:userInfo: - static NSError errorWithDomain( - NSString domain, { - required int code, - NSDictionary? userInfo, - }) { - final _$$ref = domain.ref; - final _$$ref$1 = userInfo?.ref; - final $ret = _objc_msgSend_rc4ypv( - _class_NSError, - _sel_errorWithDomain_code_userInfo_, - _$$ref.pointer, - code, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - return NSError.fromPointer($ret, retain: true, release: true); + /// dictionary + static NSDictionary dictionary() { + final $ret = _objc_msgSend_151sglz(_class_NSDictionary, _sel_dictionary); + return NSDictionary.fromPointer($ret, retain: true, release: true); } - /// new - static NSError new$() { - final $ret = _objc_msgSend_151sglz(_class_NSError, _sel_new); - return NSError.fromPointer($ret, retain: false, release: true); + /// dictionaryWithDictionary: + static NSDictionary dictionaryWithDictionary(NSDictionary dict) { + final _$$ref = dict.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSDictionary, + _sel_dictionaryWithDictionary_, + _$$ref.pointer, + ); + return NSDictionary.fromPointer($ret, retain: true, release: true); } - /// setUserInfoValueProviderForDomain:provider: - static void setUserInfoValueProviderForDomain( - NSString errorDomain, { - objc.ObjCBlock< - ffi.Pointer? Function(NSError, NSString) - >? - provider, + /// dictionaryWithObject:forKey: + static NSDictionary dictionaryWithObject( + objc.ObjCObject object, { + required NSCopying forKey, }) { - final _$$ref = errorDomain.ref; - final _$$ref$1 = provider?.ref; - objc.checkOsVersionInternal( - 'NSError.setUserInfoValueProviderForDomain:provider:', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), - ); - _objc_msgSend_o762yo( - _class_NSError, - _sel_setUserInfoValueProviderForDomain_provider_, + final _$$ref = object.ref; + final _$$ref$1 = forKey.ref; + final $ret = _objc_msgSend_15qeuct( + _class_NSDictionary, + _sel_dictionaryWithObject_forKey_, _$$ref.pointer, - _$$ref$1?.pointer ?? ffi.nullptr, + _$$ref$1.pointer, ); + return NSDictionary.fromPointer($ret, retain: true, release: true); } - /// supportsSecureCoding - static bool getSupportsSecureCoding() { - return _objc_msgSend_91o635(_class_NSError, _sel_supportsSecureCoding); + /// dictionaryWithObjects:forKeys: + static NSDictionary dictionaryWithObjects( + NSArray objects, { + required NSArray forKeys, + }) { + final _$$ref = objects.ref; + final _$$ref$1 = forKeys.ref; + final $ret = _objc_msgSend_15qeuct( + _class_NSDictionary, + _sel_dictionaryWithObjects_forKeys_, + _$$ref.pointer, + _$$ref$1.pointer, + ); + return NSDictionary.fromPointer($ret, retain: true, release: true); } - /// userInfoValueProviderForDomain: - static objc.ObjCBlock< - ffi.Pointer? Function(NSError, NSString) - >? - userInfoValueProviderForDomain_( - NSError err, { - required NSString userInfoKey, - required NSString errorDomain, + /// dictionaryWithObjects:forKeys:count: + static NSDictionary dictionaryWithObjects$1( + ffi.Pointer> objects, { + required ffi.Pointer> forKeys, + required int count, }) { - final _$$ref = err.ref; - final _$$ref$1 = userInfoKey.ref; - final _$$ref$2 = errorDomain.ref; - objc.checkOsVersionInternal( - 'NSError.userInfoValueProviderForDomain:', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), + final $ret = _objc_msgSend_1dydpdi( + _class_NSDictionary, + _sel_dictionaryWithObjects_forKeys_count_, + objects, + forKeys, + count, ); - final $ret = _objc_msgSend_cnxxyq( - _class_NSError, - _sel_userInfoValueProviderForDomain_, + return NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// dictionaryWithObjectsAndKeys: + static NSDictionary dictionaryWithObjectsAndKeys( + objc.ObjCObject firstObject, + ) { + final _$$ref = firstObject.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSDictionary, + _sel_dictionaryWithObjectsAndKeys_, _$$ref.pointer, - _$$ref$1.pointer, - _$$ref$2.pointer, ); - return $ret.address == 0 - ? null - : ObjCBlock_objcObjCObjectImpl_NSError_NSErrorUserInfoKey.fromPointer( - $ret, - retain: true, - release: true, - ); + return NSDictionary.fromPointer($ret, retain: true, release: true); } - /// Returns a new instance of NSError constructed with the default `new` method. - NSError() : this.as(new$().object$); + /// new + static NSDictionary new$() { + final $ret = _objc_msgSend_151sglz(_class_NSDictionary, _sel_new); + return NSDictionary.fromPointer($ret, retain: false, release: true); + } + + /// supportsSecureCoding + static bool getSupportsSecureCoding() { + return _objc_msgSend_91o635(_class_NSDictionary, _sel_supportsSecureCoding); + } + + /// Returns a new instance of NSDictionary constructed with the default `new` method. + NSDictionary() : this.as(new$().object$); } -extension NSError$Methods on NSError { - /// code - int get code { +extension NSDictionary$Methods on NSDictionary { + /// count + int get count { final _$$ref = object$.ref; - return _objc_msgSend_1hz7y9r(_$$ref.pointer, _sel_code); + return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_count); } - /// domain - NSString get domain { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_domain); - return NSString.fromPointer($ret, retain: true, release: true); + /// countByEnumeratingWithState:objects:count: + int countByEnumeratingWithState( + ffi.Pointer state, { + required ffi.Pointer> objects, + required int count, + }) { + final _$$ref$1 = object$.ref; + return _objc_msgSend_1b5ysjl( + _$$ref$1.pointer, + _sel_countByEnumeratingWithState_objects_count_, + state, + objects, + count, + ); } /// encodeWithCoder: void encodeWithCoder(NSCoder coder) { - final _$$ref$14 = object$.ref; - final _$$ref$15 = coder.ref; + final _$$ref$12 = object$.ref; + final _$$ref$13 = coder.ref; _objc_msgSend_xtuoz7( - _$$ref$14.pointer, + _$$ref$12.pointer, _sel_encodeWithCoder_, - _$$ref$15.pointer, + _$$ref$13.pointer, ); } - /// helpAnchor - NSString? get helpAnchor { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_helpAnchor); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); - } - /// init - NSError init() { - final _$$ref$15 = object$.ref; + NSDictionary init() { + final _$$ref$13 = object$.ref; objc.checkOsVersionInternal( - 'NSError.init', + 'NSDictionary.init', iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); final $ret = _objc_msgSend_151sglz( - _$$ref$15.retainAndReturnPointer(), + _$$ref$13.retainAndReturnPointer(), _sel_init, ); - return NSError.fromPointer($ret, retain: false, release: true); + return NSDictionary.fromPointer($ret, retain: false, release: true); } /// initWithCoder: - NSError? initWithCoder(NSCoder coder) { - final _$$ref$14 = object$.ref; - final _$$ref$15 = coder.ref; + NSDictionary? initWithCoder(NSCoder coder) { + final _$$ref$12 = object$.ref; + final _$$ref$13 = coder.ref; final $ret = _objc_msgSend_1sotr3r( - _$$ref$14.retainAndReturnPointer(), + _$$ref$12.retainAndReturnPointer(), _sel_initWithCoder_, - _$$ref$15.pointer, + _$$ref$13.pointer, ); return $ret.address == 0 ? null - : NSError.fromPointer($ret, retain: false, release: true); + : NSDictionary.fromPointer($ret, retain: false, release: true); } - /// initWithDomain:code:userInfo: - NSError initWithDomain( - NSString domain, { - required int code, - NSDictionary? userInfo, - }) { + /// initWithDictionary: + NSDictionary initWithDictionary(NSDictionary otherDictionary) { final _$$ref = object$.ref; - final _$$ref$1 = domain.ref; - final _$$ref$2 = userInfo?.ref; - final $ret = _objc_msgSend_rc4ypv( + final _$$ref$1 = otherDictionary.ref; + final $ret = _objc_msgSend_1sotr3r( _$$ref.retainAndReturnPointer(), - _sel_initWithDomain_code_userInfo_, + _sel_initWithDictionary_, _$$ref$1.pointer, - code, - _$$ref$2?.pointer ?? ffi.nullptr, ); - return NSError.fromPointer($ret, retain: false, release: true); + return NSDictionary.fromPointer($ret, retain: false, release: true); } - /// localizedDescription - NSString get localizedDescription { + /// initWithDictionary:copyItems: + NSDictionary initWithDictionary$1( + NSDictionary otherDictionary, { + required bool copyItems, + }) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_localizedDescription, + final _$$ref$1 = otherDictionary.ref; + final $ret = _objc_msgSend_17amj0z( + _$$ref.retainAndReturnPointer(), + _sel_initWithDictionary_copyItems_, + _$$ref$1.pointer, + copyItems, ); - return NSString.fromPointer($ret, retain: true, release: true); + return NSDictionary.fromPointer($ret, retain: false, release: true); } - /// localizedFailureReason - NSString? get localizedFailureReason { + /// initWithObjects:forKeys: + NSDictionary initWithObjects(NSArray objects, {required NSArray forKeys}) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_localizedFailureReason, + final _$$ref$1 = objects.ref; + final _$$ref$2 = forKeys.ref; + final $ret = _objc_msgSend_15qeuct( + _$$ref.retainAndReturnPointer(), + _sel_initWithObjects_forKeys_, + _$$ref$1.pointer, + _$$ref$2.pointer, ); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); + return NSDictionary.fromPointer($ret, retain: false, release: true); } - /// localizedRecoveryOptions - NSArray? get localizedRecoveryOptions { + /// initWithObjects:forKeys:count: + NSDictionary initWithObjects$1( + ffi.Pointer> objects, { + required ffi.Pointer> forKeys, + required int count, + }) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_localizedRecoveryOptions, + final $ret = _objc_msgSend_1dydpdi( + _$$ref.retainAndReturnPointer(), + _sel_initWithObjects_forKeys_count_, + objects, + forKeys, + count, ); - return $ret.address == 0 - ? null - : NSArray.fromPointer($ret, retain: true, release: true); + return NSDictionary.fromPointer($ret, retain: false, release: true); } - /// localizedRecoverySuggestion - NSString? get localizedRecoverySuggestion { + /// initWithObjectsAndKeys: + NSDictionary initWithObjectsAndKeys(objc.ObjCObject firstObject) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_localizedRecoverySuggestion, + final _$$ref$1 = firstObject.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.retainAndReturnPointer(), + _sel_initWithObjectsAndKeys_, + _$$ref$1.pointer, ); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); + return NSDictionary.fromPointer($ret, retain: false, release: true); } - /// recoveryAttempter - objc.ObjCObject? get recoveryAttempter { + /// keyEnumerator + NSEnumerator keyEnumerator() { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_recoveryAttempter); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_keyEnumerator); + return NSEnumerator.fromPointer($ret, retain: true, release: true); + } + + /// objectForKey: + objc.ObjCObject? objectForKey(objc.ObjCObject aKey) { + final _$$ref = object$.ref; + final _$$ref$1 = aKey.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_objectForKey_, + _$$ref$1.pointer, + ); return $ret.address == 0 ? null : objc.ObjCObject($ret, retain: true, release: true); } +} - /// underlyingErrors - NSArray get underlyingErrors { +/// NSDictionaryCreation +extension NSDictionaryCreation on NSDictionary { + /// initWithContentsOfURL:error: + NSDictionary? initWithContentsOfURL(NSURL url) { final _$$ref = object$.ref; + final _$$ref$1 = url.ref; objc.checkOsVersionInternal( - 'NSError.underlyingErrors', - iOS: (false, (14, 5, 0)), - macOS: (false, (11, 3, 0)), + 'NSDictionary.initWithContentsOfURL:error:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_underlyingErrors); - return NSArray.fromPointer($ret, retain: true, release: true); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1lhpu4m( + _$$ref.retainAndReturnPointer(), + _sel_initWithContentsOfURL_error_, + _$$ref$1.pointer, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSDictionary.fromPointer($ret, retain: false, release: true); + } finally { + pkg_ffi.calloc.free($err); + } } - /// userInfo - NSDictionary get userInfo { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_userInfo); - return NSDictionary.fromPointer($ret, retain: true, release: true); + /// dictionaryWithContentsOfURL:error: + static NSDictionary? dictionaryWithContentsOfURL(NSURL url) { + final _$$ref = url.ref; + objc.checkOsVersionInternal( + 'NSDictionary.dictionaryWithContentsOfURL:error:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1lhpu4m( + _class_NSDictionary, + _sel_dictionaryWithContentsOfURL_error_, + _$$ref.pointer, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSDictionary.fromPointer($ret, retain: true, release: true); + } finally { + pkg_ffi.calloc.free($err); + } } } -enum NSExpressionType { - NSConstantValueExpressionType(0), - NSEvaluatedObjectExpressionType(1), - NSVariableExpressionType(2), - NSKeyPathExpressionType(3), - NSFunctionExpressionType(4), - NSUnionSetExpressionType(5), - NSIntersectSetExpressionType(6), - NSMinusSetExpressionType(7), - NSSubqueryExpressionType(13), - NSAggregateExpressionType(14), - NSAnyKeyExpressionType(15), - NSBlockExpressionType(19), - NSConditionalExpressionType(20); - - final int value; - const NSExpressionType(this.value); - - static NSExpressionType fromValue(int value) => switch (value) { - 0 => NSConstantValueExpressionType, - 1 => NSEvaluatedObjectExpressionType, - 2 => NSVariableExpressionType, - 3 => NSKeyPathExpressionType, - 4 => NSFunctionExpressionType, - 5 => NSUnionSetExpressionType, - 6 => NSIntersectSetExpressionType, - 7 => NSMinusSetExpressionType, - 13 => NSSubqueryExpressionType, - 14 => NSAggregateExpressionType, - 15 => NSAnyKeyExpressionType, - 19 => NSBlockExpressionType, - 20 => NSConditionalExpressionType, - _ => throw ArgumentError('Unknown value for NSExpressionType: $value'), - }; -} - -/// NSExtendedArray -extension NSExtendedArray on NSArray { - /// arrayByAddingObject: - NSArray arrayByAddingObject(objc.ObjCObject anObject) { +/// NSDiscardableContentProxy +extension NSDiscardableContentProxy on NSObject { + /// autoContentAccessingProxy + objc.ObjCObject get autoContentAccessingProxy { final _$$ref = object$.ref; - final _$$ref$1 = anObject.ref; - final $ret = _objc_msgSend_1sotr3r( + objc.checkOsVersionInternal( + 'NSObject.autoContentAccessingProxy', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_151sglz( _$$ref.pointer, - _sel_arrayByAddingObject_, - _$$ref$1.pointer, + _sel_autoContentAccessingProxy, ); - return NSArray.fromPointer($ret, retain: true, release: true); + return objc.ObjCObject($ret, retain: true, release: true); } +} - /// arrayByAddingObjectsFromArray: - NSArray arrayByAddingObjectsFromArray(NSArray otherArray) { +/// NSDistributedObjects +extension NSDistributedObjects on NSObject { + /// classForPortCoder + @Deprecated('Use NSXPCConnection instead') + objc.ObjCObject get classForPortCoder { final _$$ref = object$.ref; - final _$$ref$1 = otherArray.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_arrayByAddingObjectsFromArray_, - _$$ref$1.pointer, + objc.checkOsVersionInternal( + 'NSObject.classForPortCoder', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - return NSArray.fromPointer($ret, retain: true, release: true); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_classForPortCoder); + return objc.ObjCObject($ret, retain: true, release: true); } - /// componentsJoinedByString: - NSString componentsJoinedByString(NSString separator) { + /// replacementObjectForPortCoder: + @Deprecated('Use NSXPCConnection instead') + objc.ObjCObject? replacementObjectForPortCoder(NSPortCoder coder) { final _$$ref = object$.ref; - final _$$ref$1 = separator.ref; + final _$$ref$1 = coder.ref; + objc.checkOsVersionInternal( + 'NSObject.replacementObjectForPortCoder:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_componentsJoinedByString_, + _sel_replacementObjectForPortCoder_, _$$ref$1.pointer, ); - return NSString.fromPointer($ret, retain: true, release: true); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); } +} - /// containsObject: - bool containsObject(objc.ObjCObject anObject) { - final _$$ref = object$.ref; - final _$$ref$1 = anObject.ref; - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_containsObject_, - _$$ref$1.pointer, - ); +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; + + static ffi.Pointer $allocate( + ffi.Allocator $allocator, { + required double top, + required double left, + required double bottom, + required double right, + }) => $allocator() + ..ref.top = top + ..ref.left = left + ..ref.bottom = bottom + ..ref.right = right; +} + +sealed class NSEnumerationOptions { + static const NSEnumerationConcurrent = 1; + static const NSEnumerationReverse = 2; +} + +/// NSEnumerator +extension type NSEnumerator._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject, NSFastEnumeration { + /// Constructs a [NSEnumerator] that points to the same underlying object as [other]. + NSEnumerator.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); } - /// description - NSString get description$1 { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_description); - return NSString.fromPointer($ret, retain: true, release: true); + /// Constructs a [NSEnumerator] that wraps the given raw object pointer. + NSEnumerator.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + assert(isA(object$)); } - /// descriptionWithLocale: - NSString descriptionWithLocale(objc.ObjCObject? locale) { - final _$$ref = object$.ref; - final _$$ref$1 = locale?.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_descriptionWithLocale_, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - return NSString.fromPointer($ret, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSEnumerator]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSEnumerator, + ); + + /// alloc + static NSEnumerator alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSEnumerator, _sel_alloc); + return NSEnumerator.fromPointer($ret, retain: false, release: true); } - /// descriptionWithLocale:indent: - NSString descriptionWithLocale$1( - objc.ObjCObject? locale, { - required int indent, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = locale?.ref; - final $ret = _objc_msgSend_1k4kd9s( - _$$ref.pointer, - _sel_descriptionWithLocale_indent_, - _$$ref$1?.pointer ?? ffi.nullptr, - indent, + /// allocWithZone: + static NSEnumerator allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSEnumerator, + _sel_allocWithZone_, + zone, ); - return NSString.fromPointer($ret, retain: true, release: true); + return NSEnumerator.fromPointer($ret, retain: false, release: true); } - /// enumerateObjectsAtIndexes:options:usingBlock: - void enumerateObjectsAtIndexes( - NSIndexSet s, { - required int options, - required objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - > - usingBlock, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = s.ref; - final _$$ref$2 = usingBlock.ref; - objc.checkOsVersionInternal( - 'NSArray.enumerateObjectsAtIndexes:options:usingBlock:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - _objc_msgSend_a3wp08( - _$$ref.pointer, - _sel_enumerateObjectsAtIndexes_options_usingBlock_, - _$$ref$1.pointer, - options, - _$$ref$2.pointer, - ); + /// new + static NSEnumerator new$() { + final $ret = _objc_msgSend_151sglz(_class_NSEnumerator, _sel_new); + return NSEnumerator.fromPointer($ret, retain: false, release: true); } - /// enumerateObjectsUsingBlock: - void enumerateObjectsUsingBlock( - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - > - block, - ) { - final _$$ref = object$.ref; - final _$$ref$1 = block.ref; - objc.checkOsVersionInternal( - 'NSArray.enumerateObjectsUsingBlock:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - _objc_msgSend_f167m6( - _$$ref.pointer, - _sel_enumerateObjectsUsingBlock_, - _$$ref$1.pointer, + /// Returns a new instance of NSEnumerator constructed with the default `new` method. + NSEnumerator() : this.as(new$().object$); +} + +extension NSEnumerator$Methods on NSEnumerator { + /// countByEnumeratingWithState:objects:count: + int countByEnumeratingWithState( + ffi.Pointer state, { + required ffi.Pointer> objects, + required int count, + }) { + final _$$ref$2 = object$.ref; + return _objc_msgSend_1b5ysjl( + _$$ref$2.pointer, + _sel_countByEnumeratingWithState_objects_count_, + state, + objects, + count, ); } - /// enumerateObjectsWithOptions:usingBlock: - void enumerateObjectsWithOptions( - int opts, { - required objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - > - usingBlock, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = usingBlock.ref; + /// init + NSEnumerator init() { + final _$$ref$14 = object$.ref; objc.checkOsVersionInternal( - 'NSArray.enumerateObjectsWithOptions:usingBlock:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSEnumerator.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - _objc_msgSend_yx8yc6( - _$$ref.pointer, - _sel_enumerateObjectsWithOptions_usingBlock_, - opts, - _$$ref$1.pointer, + final $ret = _objc_msgSend_151sglz( + _$$ref$14.retainAndReturnPointer(), + _sel_init, ); + return NSEnumerator.fromPointer($ret, retain: false, release: true); } - /// firstObject - objc.ObjCObject? get firstObject { + /// nextObject + objc.ObjCObject? nextObject() { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSArray.firstObject', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_firstObject); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_nextObject); return $ret.address == 0 ? null : objc.ObjCObject($ret, retain: true, release: true); } +} - /// firstObjectCommonWithArray: - objc.ObjCObject? firstObjectCommonWithArray(NSArray otherArray) { - final _$$ref = object$.ref; - final _$$ref$1 = otherArray.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_firstObjectCommonWithArray_, - _$$ref$1.pointer, - ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); +/// NSError +extension type NSError._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject, NSCopying, NSSecureCoding { + /// Constructs a [NSError] that points to the same underlying object as [other]. + NSError.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); } - /// getObjects:range: - void getObjects( - ffi.Pointer> objects, { - required NSRange range, - }) { - final _$$ref = object$.ref; - _objc_msgSend_o16d3k( - _$$ref.pointer, - _sel_getObjects_range_, - objects, - range, - ); + /// Constructs a [NSError] that wraps the given raw object pointer. + NSError.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + assert(isA(object$)); } - /// indexOfObject: - int indexOfObject(objc.ObjCObject anObject) { - final _$$ref = object$.ref; - final _$$ref$1 = anObject.ref; - return _objc_msgSend_1vd1c5m( - _$$ref.pointer, - _sel_indexOfObject_, - _$$ref$1.pointer, + /// Returns whether [obj] is an instance of [NSError]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSError, + ); + + /// alloc + static NSError alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSError, _sel_alloc); + return NSError.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NSError allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSError, + _sel_allocWithZone_, + zone, ); + return NSError.fromPointer($ret, retain: false, release: true); } - /// indexOfObject:inRange: - int indexOfObject$1(objc.ObjCObject anObject, {required NSRange inRange}) { - final _$$ref = object$.ref; - final _$$ref$1 = anObject.ref; - return _objc_msgSend_zug4wi( + /// errorWithDomain:code:userInfo: + static NSError errorWithDomain( + NSString domain, { + required int code, + NSDictionary? userInfo, + }) { + final _$$ref = domain.ref; + final _$$ref$1 = userInfo?.ref; + final $ret = _objc_msgSend_rc4ypv( + _class_NSError, + _sel_errorWithDomain_code_userInfo_, _$$ref.pointer, - _sel_indexOfObject_inRange_, - _$$ref$1.pointer, - inRange, + code, + _$$ref$1?.pointer ?? ffi.nullptr, ); + return NSError.fromPointer($ret, retain: true, release: true); } - /// indexOfObject:inSortedRange:options:usingComparator: - int indexOfObject$2( - objc.ObjCObject obj, { - required NSRange inSortedRange, - required int options, - required objc.ObjCBlock< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ) - > - usingComparator, + /// new + static NSError new$() { + final $ret = _objc_msgSend_151sglz(_class_NSError, _sel_new); + return NSError.fromPointer($ret, retain: false, release: true); + } + + /// setUserInfoValueProviderForDomain:provider: + static void setUserInfoValueProviderForDomain( + NSString errorDomain, { + objc.ObjCBlock< + ffi.Pointer? Function(NSError, NSString) + >? + provider, }) { - final _$$ref = object$.ref; - final _$$ref$1 = obj.ref; - final _$$ref$2 = usingComparator.ref; + final _$$ref = errorDomain.ref; + final _$$ref$1 = provider?.ref; objc.checkOsVersionInternal( - 'NSArray.indexOfObject:inSortedRange:options:usingComparator:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSError.setUserInfoValueProviderForDomain:provider:', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), ); - return _objc_msgSend_kshx9d( + _objc_msgSend_o762yo( + _class_NSError, + _sel_setUserInfoValueProviderForDomain_provider_, _$$ref.pointer, - _sel_indexOfObject_inSortedRange_options_usingComparator_, - _$$ref$1.pointer, - inSortedRange, - options, - _$$ref$2.pointer, + _$$ref$1?.pointer ?? ffi.nullptr, ); } - /// indexOfObjectAtIndexes:options:passingTest: - int indexOfObjectAtIndexes( - NSIndexSet s, { - required int options, - required objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, + /// supportsSecureCoding + static bool getSupportsSecureCoding() { + return _objc_msgSend_91o635(_class_NSError, _sel_supportsSecureCoding); + } + + /// userInfoValueProviderForDomain: + static objc.ObjCBlock< + ffi.Pointer? Function(NSError, NSString) + >? + userInfoValueProviderForDomain_( + NSError err, { + required NSString userInfoKey, + required NSString errorDomain, + }) { + final _$$ref = err.ref; + final _$$ref$1 = userInfoKey.ref; + final _$$ref$2 = errorDomain.ref; + objc.checkOsVersionInternal( + 'NSError.userInfoValueProviderForDomain:', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), + ); + final $ret = _objc_msgSend_cnxxyq( + _class_NSError, + _sel_userInfoValueProviderForDomain_, + _$$ref.pointer, + _$$ref$1.pointer, + _$$ref$2.pointer, + ); + return $ret.address == 0 + ? null + : ObjCBlock_objcObjCObjectImpl_NSError_NSErrorUserInfoKey.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// Returns a new instance of NSError constructed with the default `new` method. + NSError() : this.as(new$().object$); +} + +extension NSError$Methods on NSError { + /// code + int get code { + final _$$ref = object$.ref; + return _objc_msgSend_1hz7y9r(_$$ref.pointer, _sel_code); + } + + /// domain + NSString get domain { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_domain); + return NSString.fromPointer($ret, retain: true, release: true); + } + + /// encodeWithCoder: + void encodeWithCoder(NSCoder coder) { + final _$$ref$14 = object$.ref; + final _$$ref$15 = coder.ref; + _objc_msgSend_xtuoz7( + _$$ref$14.pointer, + _sel_encodeWithCoder_, + _$$ref$15.pointer, + ); + } + + /// helpAnchor + NSString? get helpAnchor { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_helpAnchor); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); + } + + /// init + NSError init() { + final _$$ref$15 = object$.ref; + objc.checkOsVersionInternal( + 'NSError.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref$15.retainAndReturnPointer(), + _sel_init, + ); + return NSError.fromPointer($ret, retain: false, release: true); + } + + /// initWithCoder: + NSError? initWithCoder(NSCoder coder) { + final _$$ref$14 = object$.ref; + final _$$ref$15 = coder.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref$14.retainAndReturnPointer(), + _sel_initWithCoder_, + _$$ref$15.pointer, + ); + return $ret.address == 0 + ? null + : NSError.fromPointer($ret, retain: false, release: true); + } + + /// initWithDomain:code:userInfo: + NSError initWithDomain( + NSString domain, { + required int code, + NSDictionary? userInfo, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = domain.ref; + final _$$ref$2 = userInfo?.ref; + final $ret = _objc_msgSend_rc4ypv( + _$$ref.retainAndReturnPointer(), + _sel_initWithDomain_code_userInfo_, + _$$ref$1.pointer, + code, + _$$ref$2?.pointer ?? ffi.nullptr, + ); + return NSError.fromPointer($ret, retain: false, release: true); + } + + /// localizedDescription + NSString get localizedDescription { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_localizedDescription, + ); + return NSString.fromPointer($ret, retain: true, release: true); + } + + /// localizedFailureReason + NSString? get localizedFailureReason { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_localizedFailureReason, + ); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); + } + + /// localizedRecoveryOptions + NSArray? get localizedRecoveryOptions { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_localizedRecoveryOptions, + ); + return $ret.address == 0 + ? null + : NSArray.fromPointer($ret, retain: true, release: true); + } + + /// localizedRecoverySuggestion + NSString? get localizedRecoverySuggestion { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_localizedRecoverySuggestion, + ); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); + } + + /// recoveryAttempter + objc.ObjCObject? get recoveryAttempter { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_recoveryAttempter); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } + + /// underlyingErrors + NSArray get underlyingErrors { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSError.underlyingErrors', + iOS: (false, (14, 5, 0)), + macOS: (false, (11, 3, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_underlyingErrors); + return NSArray.fromPointer($ret, retain: true, release: true); + } + + /// userInfo + NSDictionary get userInfo { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_userInfo); + return NSDictionary.fromPointer($ret, retain: true, release: true); + } +} + +/// NSErrorRecoveryAttempting +extension NSErrorRecoveryAttempting on NSObject { + /// attemptRecoveryFromError:optionIndex: + bool attemptRecoveryFromError(NSError error, {required int optionIndex}) { + final _$$ref = object$.ref; + final _$$ref$1 = error.ref; + objc.checkOsVersionInternal( + 'NSObject.attemptRecoveryFromError:optionIndex:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_z7gxsm( + _$$ref.pointer, + _sel_attemptRecoveryFromError_optionIndex_, + _$$ref$1.pointer, + optionIndex, + ); + } + + /// attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo: + void attemptRecoveryFromError$1( + NSError error, { + required int optionIndex, + objc.ObjCObject? delegate, + required ffi.Pointer didRecoverSelector, + required ffi.Pointer contextInfo, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = error.ref; + final _$$ref$2 = delegate?.ref; + objc.checkOsVersionInternal( + 'NSObject.attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_10txwc9( + _$$ref.pointer, + _sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_, + _$$ref$1.pointer, + optionIndex, + _$$ref$2?.pointer ?? ffi.nullptr, + didRecoverSelector, + contextInfo, + ); + } +} + +/// NSExtendedArray +extension NSExtendedArray on NSArray { + /// arrayByAddingObject: + NSArray arrayByAddingObject(objc.ObjCObject anObject) { + final _$$ref = object$.ref; + final _$$ref$1 = anObject.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_arrayByAddingObject_, + _$$ref$1.pointer, + ); + return NSArray.fromPointer($ret, retain: true, release: true); + } + + /// arrayByAddingObjectsFromArray: + NSArray arrayByAddingObjectsFromArray(NSArray otherArray) { + final _$$ref = object$.ref; + final _$$ref$1 = otherArray.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_arrayByAddingObjectsFromArray_, + _$$ref$1.pointer, + ); + return NSArray.fromPointer($ret, retain: true, release: true); + } + + /// componentsJoinedByString: + NSString componentsJoinedByString(NSString separator) { + final _$$ref = object$.ref; + final _$$ref$1 = separator.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_componentsJoinedByString_, + _$$ref$1.pointer, + ); + return NSString.fromPointer($ret, retain: true, release: true); + } + + /// containsObject: + bool containsObject(objc.ObjCObject anObject) { + final _$$ref = object$.ref; + final _$$ref$1 = anObject.ref; + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_containsObject_, + _$$ref$1.pointer, + ); + } + + /// description + NSString get description$1 { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_description); + return NSString.fromPointer($ret, retain: true, release: true); + } + + /// descriptionWithLocale: + NSString descriptionWithLocale(objc.ObjCObject? locale) { + final _$$ref = object$.ref; + final _$$ref$1 = locale?.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_descriptionWithLocale_, + _$$ref$1?.pointer ?? ffi.nullptr, + ); + return NSString.fromPointer($ret, retain: true, release: true); + } + + /// descriptionWithLocale:indent: + NSString descriptionWithLocale$1( + objc.ObjCObject? locale, { + required int indent, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = locale?.ref; + final $ret = _objc_msgSend_1k4kd9s( + _$$ref.pointer, + _sel_descriptionWithLocale_indent_, + _$$ref$1?.pointer ?? ffi.nullptr, + indent, + ); + return NSString.fromPointer($ret, retain: true, release: true); + } + + /// enumerateObjectsAtIndexes:options:usingBlock: + void enumerateObjectsAtIndexes( + NSIndexSet s, { + required int options, + required objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) + > + usingBlock, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = s.ref; + final _$$ref$2 = usingBlock.ref; + objc.checkOsVersionInternal( + 'NSArray.enumerateObjectsAtIndexes:options:usingBlock:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + _objc_msgSend_a3wp08( + _$$ref.pointer, + _sel_enumerateObjectsAtIndexes_options_usingBlock_, + _$$ref$1.pointer, + options, + _$$ref$2.pointer, + ); + } + + /// enumerateObjectsUsingBlock: + void enumerateObjectsUsingBlock( + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) + > + block, + ) { + final _$$ref = object$.ref; + final _$$ref$1 = block.ref; + objc.checkOsVersionInternal( + 'NSArray.enumerateObjectsUsingBlock:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + _objc_msgSend_f167m6( + _$$ref.pointer, + _sel_enumerateObjectsUsingBlock_, + _$$ref$1.pointer, + ); + } + + /// enumerateObjectsWithOptions:usingBlock: + void enumerateObjectsWithOptions( + int opts, { + required objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) + > + usingBlock, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = usingBlock.ref; + objc.checkOsVersionInternal( + 'NSArray.enumerateObjectsWithOptions:usingBlock:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + _objc_msgSend_yx8yc6( + _$$ref.pointer, + _sel_enumerateObjectsWithOptions_usingBlock_, + opts, + _$$ref$1.pointer, + ); + } + + /// firstObject + objc.ObjCObject? get firstObject { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSArray.firstObject', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_firstObject); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } + + /// firstObjectCommonWithArray: + objc.ObjCObject? firstObjectCommonWithArray(NSArray otherArray) { + final _$$ref = object$.ref; + final _$$ref$1 = otherArray.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_firstObjectCommonWithArray_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } + + /// getObjects:range: + void getObjects( + ffi.Pointer> objects, { + required NSRange range, + }) { + final _$$ref = object$.ref; + _objc_msgSend_o16d3k( + _$$ref.pointer, + _sel_getObjects_range_, + objects, + range, + ); + } + + /// indexOfObject: + int indexOfObject(objc.ObjCObject anObject) { + final _$$ref = object$.ref; + final _$$ref$1 = anObject.ref; + return _objc_msgSend_1vd1c5m( + _$$ref.pointer, + _sel_indexOfObject_, + _$$ref$1.pointer, + ); + } + + /// indexOfObject:inRange: + int indexOfObject$1(objc.ObjCObject anObject, {required NSRange inRange}) { + final _$$ref = object$.ref; + final _$$ref$1 = anObject.ref; + return _objc_msgSend_zug4wi( + _$$ref.pointer, + _sel_indexOfObject_inRange_, + _$$ref$1.pointer, + inRange, + ); + } + + /// indexOfObject:inSortedRange:options:usingComparator: + int indexOfObject$2( + objc.ObjCObject obj, { + required NSRange inSortedRange, + required int options, + required objc.ObjCBlock< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ) + > + usingComparator, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = obj.ref; + final _$$ref$2 = usingComparator.ref; + objc.checkOsVersionInternal( + 'NSArray.indexOfObject:inSortedRange:options:usingComparator:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + return _objc_msgSend_kshx9d( + _$$ref.pointer, + _sel_indexOfObject_inSortedRange_options_usingComparator_, + _$$ref$1.pointer, + inSortedRange, + options, + _$$ref$2.pointer, + ); + } + + /// indexOfObjectAtIndexes:options:passingTest: + int indexOfObjectAtIndexes( + NSIndexSet s, { + required int options, + required objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, ) > passingTest, @@ -6538,1397 +8239,1517 @@ extension NSExtendedArray on NSArray { } } -/// NSExtendedData -extension NSExtendedData on NSData { - /// description - NSString get description$1 { +/// NSExtendedAttributedString +extension NSExtendedAttributedString on NSAttributedString { + /// attribute:atIndex:effectiveRange: + objc.ObjCObject? attribute( + NSString attrName, { + required int atIndex, + required ffi.Pointer effectiveRange, + }) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_description); - return NSString.fromPointer($ret, retain: true, release: true); - } - - /// enumerateByteRangesUsingBlock: - void enumerateByteRangesUsingBlock( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) - > - block, - ) { - final _$$ref = object$.ref; - final _$$ref$1 = block.ref; + final _$$ref$1 = attrName.ref; objc.checkOsVersionInternal( - 'NSData.enumerateByteRangesUsingBlock:', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), + 'NSAttributedString.attribute:atIndex:effectiveRange:', + iOS: (false, (3, 2, 0)), + macOS: (false, (10, 0, 0)), ); - _objc_msgSend_f167m6( + final $ret = _objc_msgSend_7km9vu( _$$ref.pointer, - _sel_enumerateByteRangesUsingBlock_, + _sel_attribute_atIndex_effectiveRange_, _$$ref$1.pointer, + atIndex, + effectiveRange, ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); } - /// getBytes:length: - void getBytes(ffi.Pointer buffer, {required int length}) { + /// attribute:atIndex:longestEffectiveRange:inRange: + objc.ObjCObject? attribute$1( + NSString attrName, { + required int atIndex, + required ffi.Pointer longestEffectiveRange, + required NSRange inRange, + }) { final _$$ref = object$.ref; - _objc_msgSend_zuf90e(_$$ref.pointer, _sel_getBytes_length_, buffer, length); + final _$$ref$1 = attrName.ref; + objc.checkOsVersionInternal( + 'NSAttributedString.attribute:atIndex:longestEffectiveRange:inRange:', + iOS: (false, (3, 2, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1k1akuq( + _$$ref.pointer, + _sel_attribute_atIndex_longestEffectiveRange_inRange_, + _$$ref$1.pointer, + atIndex, + longestEffectiveRange, + inRange, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); } - /// getBytes:range: - void getBytes$1(ffi.Pointer buffer, {required NSRange range}) { + /// attributedSubstringFromRange: + NSAttributedString attributedSubstringFromRange(NSRange range) { final _$$ref = object$.ref; - _objc_msgSend_xpqfd7(_$$ref.pointer, _sel_getBytes_range_, buffer, range); + objc.checkOsVersionInternal( + 'NSAttributedString.attributedSubstringFromRange:', + iOS: (false, (3, 2, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1k1o1s7( + _$$ref.pointer, + _sel_attributedSubstringFromRange_, + range, + ); + return NSAttributedString.fromPointer($ret, retain: true, release: true); } - /// isEqualToData: - bool isEqualToData(NSData other) { + /// attributesAtIndex:longestEffectiveRange:inRange: + NSDictionary attributesAtIndex$1( + int location, { + required ffi.Pointer longestEffectiveRange, + required NSRange inRange, + }) { final _$$ref = object$.ref; - final _$$ref$1 = other.ref; - return _objc_msgSend_19nvye5( + objc.checkOsVersionInternal( + 'NSAttributedString.attributesAtIndex:longestEffectiveRange:inRange:', + iOS: (false, (3, 2, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1pp2gs8( _$$ref.pointer, - _sel_isEqualToData_, - _$$ref$1.pointer, + _sel_attributesAtIndex_longestEffectiveRange_inRange_, + location, + longestEffectiveRange, + inRange, ); + return NSDictionary.fromPointer($ret, retain: true, release: true); } - /// rangeOfData:options:range: - NSRange rangeOfData( - NSData dataToFind, { + /// enumerateAttribute:inRange:options:usingBlock: + void enumerateAttribute( + NSString attrName, { + required NSRange inRange, required int options, - required NSRange range, + required objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer?, + NSRange, + ffi.Pointer, + ) + > + usingBlock, }) { final _$$ref = object$.ref; - final _$$ref$1 = dataToFind.ref; + final _$$ref$1 = attrName.ref; + final _$$ref$2 = usingBlock.ref; objc.checkOsVersionInternal( - 'NSData.rangeOfData:options:range:', + 'NSAttributedString.enumerateAttribute:inRange:options:usingBlock:', iOS: (false, (4, 0, 0)), macOS: (false, (10, 6, 0)), ); - final $ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants - ? _objc_msgSend_1d8s65wStret( - $ptr, - _$$ref.pointer, - _sel_rangeOfData_options_range_, - _$$ref$1.pointer, - options, - range, - ) - : $ptr.ref = _objc_msgSend_1d8s65w( - _$$ref.pointer, - _sel_rangeOfData_options_range_, - _$$ref$1.pointer, - options, - range, - ); - final $finalizable = $ptr.cast().asTypedList( - ffi.sizeOf(), - finalizer: pkg_ffi.calloc.nativeFree, + _objc_msgSend_ipgwfh( + _$$ref.pointer, + _sel_enumerateAttribute_inRange_options_usingBlock_, + _$$ref$1.pointer, + inRange, + options, + _$$ref$2.pointer, ); - return ffi.Struct.create($finalizable); } - /// subdataWithRange: - NSData subdataWithRange(NSRange range) { + /// enumerateAttributesInRange:options:usingBlock: + void enumerateAttributesInRange( + NSRange enumerationRange, { + required int options, + required objc.ObjCBlock< + ffi.Void Function(NSDictionary, NSRange, ffi.Pointer) + > + usingBlock, + }) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_1k1o1s7( + final _$$ref$1 = usingBlock.ref; + objc.checkOsVersionInternal( + 'NSAttributedString.enumerateAttributesInRange:options:usingBlock:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + _objc_msgSend_1kok4b( _$$ref.pointer, - _sel_subdataWithRange_, - range, + _sel_enumerateAttributesInRange_options_usingBlock_, + enumerationRange, + options, + _$$ref$1.pointer, ); - return NSData.fromPointer($ret, retain: true, release: true); } - /// writeToFile:atomically: - bool writeToFile(NSString path, {required bool atomically}) { + /// isEqualToAttributedString: + bool isEqualToAttributedString(NSAttributedString other) { final _$$ref = object$.ref; - final _$$ref$1 = path.ref; - return _objc_msgSend_1iyq28l( + final _$$ref$1 = other.ref; + objc.checkOsVersionInternal( + 'NSAttributedString.isEqualToAttributedString:', + iOS: (false, (3, 2, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_19nvye5( _$$ref.pointer, - _sel_writeToFile_atomically_, + _sel_isEqualToAttributedString_, _$$ref$1.pointer, - atomically, ); } - /// writeToFile:options:error: - bool writeToFile$1( - NSString path, { - required int options, - required ffi.Pointer> error, - }) { + /// length + int get length { final _$$ref = object$.ref; - final _$$ref$1 = path.ref; - return _objc_msgSend_1xi08ar( + objc.checkOsVersionInternal( + 'NSAttributedString.length', + iOS: (false, (3, 2, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_length); + } +} + +/// NSExtendedCoder +extension NSExtendedCoder on NSCoder { + /// allowedClasses + NSSet? get allowedClasses { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSCoder.allowedClasses', + iOS: (false, (6, 0, 0)), + macOS: (false, (10, 8, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_allowedClasses); + return $ret.address == 0 + ? null + : NSSet.fromPointer($ret, retain: true, release: true); + } + + /// allowsKeyedCoding + bool get allowsKeyedCoding { + final _$$ref = object$.ref; + return _objc_msgSend_91o635(_$$ref.pointer, _sel_allowsKeyedCoding); + } + + /// containsValueForKey: + bool containsValueForKey(NSString key) { + final _$$ref = object$.ref; + final _$$ref$1 = key.ref; + return _objc_msgSend_19nvye5( _$$ref.pointer, - _sel_writeToFile_options_error_, + _sel_containsValueForKey_, _$$ref$1.pointer, - options, - error, ); } - /// writeToURL:atomically: - bool writeToURL(NSURL url, {required bool atomically}) { + /// decodeArrayOfObjCType:count:at: + void decodeArrayOfObjCType( + ffi.Pointer itemType, { + required int count, + required ffi.Pointer at, + }) { final _$$ref = object$.ref; - final _$$ref$1 = url.ref; - return _objc_msgSend_1iyq28l( + _objc_msgSend_1lwwnes( _$$ref.pointer, - _sel_writeToURL_atomically_, - _$$ref$1.pointer, - atomically, + _sel_decodeArrayOfObjCType_count_at_, + itemType, + count, + at, ); } - /// writeToURL:options:error: - bool writeToURL$1( - NSURL url, { - required int options, - required ffi.Pointer> error, + /// decodeArrayOfObjectsOfClass:forKey: + NSArray? decodeArrayOfObjectsOfClass( + objc.ObjCObject cls, { + required NSString forKey, }) { final _$$ref = object$.ref; - final _$$ref$1 = url.ref; - return _objc_msgSend_1xi08ar( + final _$$ref$1 = cls.ref; + final _$$ref$2 = forKey.ref; + objc.checkOsVersionInternal( + 'NSCoder.decodeArrayOfObjectsOfClass:forKey:', + iOS: (false, (14, 0, 0)), + macOS: (false, (11, 0, 0)), + ); + final $ret = _objc_msgSend_15qeuct( _$$ref.pointer, - _sel_writeToURL_options_error_, + _sel_decodeArrayOfObjectsOfClass_forKey_, _$$ref$1.pointer, - options, - error, + _$$ref$2.pointer, ); + return $ret.address == 0 + ? null + : NSArray.fromPointer($ret, retain: true, release: true); } -} -/// NSExtendedDate -extension NSExtendedDate on NSDate { - /// addTimeInterval: - @Deprecated('Use dateByAddingTimeInterval instead') - objc.ObjCObject addTimeInterval(double seconds) { + /// decodeArrayOfObjectsOfClasses:forKey: + NSArray? decodeArrayOfObjectsOfClasses( + NSSet classes, { + required NSString forKey, + }) { final _$$ref = object$.ref; + final _$$ref$1 = classes.ref; + final _$$ref$2 = forKey.ref; objc.checkOsVersionInternal( - 'NSDate.addTimeInterval:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSCoder.decodeArrayOfObjectsOfClasses:forKey:', + iOS: (false, (14, 0, 0)), + macOS: (false, (11, 0, 0)), ); - final $ret = _objc_msgSend_oa8mke( + final $ret = _objc_msgSend_15qeuct( _$$ref.pointer, - _sel_addTimeInterval_, - seconds, + _sel_decodeArrayOfObjectsOfClasses_forKey_, + _$$ref$1.pointer, + _$$ref$2.pointer, ); - return objc.ObjCObject($ret, retain: true, release: true); + return $ret.address == 0 + ? null + : NSArray.fromPointer($ret, retain: true, release: true); } - /// compare: - NSComparisonResult compare(NSDate other) { + /// decodeBoolForKey: + bool decodeBoolForKey(NSString key) { final _$$ref = object$.ref; - final _$$ref$1 = other.ref; - final $ret = _objc_msgSend_1ym6zyw( + final _$$ref$1 = key.ref; + return _objc_msgSend_19nvye5( _$$ref.pointer, - _sel_compare_, + _sel_decodeBoolForKey_, _$$ref$1.pointer, ); - return NSComparisonResult.fromValue($ret); } - /// description - NSString get description$1 { + /// decodeBytesForKey:minimumLength: + ffi.Pointer decodeBytesForKey( + NSString key, { + required int minimumLength, + }) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_description); - return NSString.fromPointer($ret, retain: true, release: true); + final _$$ref$1 = key.ref; + objc.checkOsVersionInternal( + 'NSCoder.decodeBytesForKey:minimumLength:', + iOS: (false, (18, 4, 0)), + macOS: (false, (15, 4, 0)), + ); + return _objc_msgSend_nk32k5( + _$$ref.pointer, + _sel_decodeBytesForKey_minimumLength_, + _$$ref$1.pointer, + minimumLength, + ); } - /// descriptionWithLocale: - NSString descriptionWithLocale(objc.ObjCObject? locale) { + /// decodeBytesForKey:returnedLength: + ffi.Pointer decodeBytesForKey$1( + NSString key, { + required ffi.Pointer returnedLength, + }) { final _$$ref = object$.ref; - final _$$ref$1 = locale?.ref; - final $ret = _objc_msgSend_1sotr3r( + final _$$ref$1 = key.ref; + return _objc_msgSend_1pvm3yv( _$$ref.pointer, - _sel_descriptionWithLocale_, - _$$ref$1?.pointer ?? ffi.nullptr, + _sel_decodeBytesForKey_returnedLength_, + _$$ref$1.pointer, + returnedLength, ); - return NSString.fromPointer($ret, retain: true, release: true); } - /// earlierDate: - NSDate earlierDate(NSDate anotherDate) { + /// decodeBytesWithMinimumLength: + ffi.Pointer decodeBytesWithMinimumLength(int length) { final _$$ref = object$.ref; - final _$$ref$1 = anotherDate.ref; - final $ret = _objc_msgSend_1sotr3r( + objc.checkOsVersionInternal( + 'NSCoder.decodeBytesWithMinimumLength:', + iOS: (false, (18, 4, 0)), + macOS: (false, (15, 4, 0)), + ); + return _objc_msgSend_16bn854( _$$ref.pointer, - _sel_earlierDate_, - _$$ref$1.pointer, + _sel_decodeBytesWithMinimumLength_, + length, ); - return NSDate.fromPointer($ret, retain: true, release: true); } - /// isEqualToDate: - bool isEqualToDate(NSDate otherDate) { + /// decodeBytesWithReturnedLength: + ffi.Pointer decodeBytesWithReturnedLength( + ffi.Pointer lengthp, + ) { final _$$ref = object$.ref; - final _$$ref$1 = otherDate.ref; - return _objc_msgSend_19nvye5( + return _objc_msgSend_2p9qiq( _$$ref.pointer, - _sel_isEqualToDate_, - _$$ref$1.pointer, + _sel_decodeBytesWithReturnedLength_, + lengthp, ); } - /// laterDate: - NSDate laterDate(NSDate anotherDate) { + /// decodeDictionaryWithKeysOfClass:objectsOfClass:forKey: + NSDictionary? decodeDictionaryWithKeysOfClass( + objc.ObjCObject keyCls, { + required objc.ObjCObject objectsOfClass, + required NSString forKey, + }) { final _$$ref = object$.ref; - final _$$ref$1 = anotherDate.ref; - final $ret = _objc_msgSend_1sotr3r( + final _$$ref$1 = keyCls.ref; + final _$$ref$2 = objectsOfClass.ref; + final _$$ref$3 = forKey.ref; + objc.checkOsVersionInternal( + 'NSCoder.decodeDictionaryWithKeysOfClass:objectsOfClass:forKey:', + iOS: (false, (14, 0, 0)), + macOS: (false, (11, 0, 0)), + ); + final $ret = _objc_msgSend_11spmsz( _$$ref.pointer, - _sel_laterDate_, + _sel_decodeDictionaryWithKeysOfClass_objectsOfClass_forKey_, _$$ref$1.pointer, + _$$ref$2.pointer, + _$$ref$3.pointer, ); - return NSDate.fromPointer($ret, retain: true, release: true); + return $ret.address == 0 + ? null + : NSDictionary.fromPointer($ret, retain: true, release: true); } - /// timeIntervalSince1970 - double get timeIntervalSince1970 { + /// decodeDictionaryWithKeysOfClasses:objectsOfClasses:forKey: + NSDictionary? decodeDictionaryWithKeysOfClasses( + NSSet keyClasses, { + required NSSet objectsOfClasses, + required NSString forKey, + }) { final _$$ref = object$.ref; - return objc.useMsgSendVariants - ? _objc_msgSend_1ukqyt8Fpret(_$$ref.pointer, _sel_timeIntervalSince1970) - : _objc_msgSend_1ukqyt8(_$$ref.pointer, _sel_timeIntervalSince1970); + final _$$ref$1 = keyClasses.ref; + final _$$ref$2 = objectsOfClasses.ref; + final _$$ref$3 = forKey.ref; + objc.checkOsVersionInternal( + 'NSCoder.decodeDictionaryWithKeysOfClasses:objectsOfClasses:forKey:', + iOS: (false, (14, 0, 0)), + macOS: (false, (11, 0, 0)), + ); + final $ret = _objc_msgSend_11spmsz( + _$$ref.pointer, + _sel_decodeDictionaryWithKeysOfClasses_objectsOfClasses_forKey_, + _$$ref$1.pointer, + _$$ref$2.pointer, + _$$ref$3.pointer, + ); + return $ret.address == 0 + ? null + : NSDictionary.fromPointer($ret, retain: true, release: true); } - /// timeIntervalSinceDate: - double timeIntervalSinceDate(NSDate anotherDate) { + /// decodeDoubleForKey: + double decodeDoubleForKey(NSString key) { final _$$ref = object$.ref; - final _$$ref$1 = anotherDate.ref; + final _$$ref$1 = key.ref; return objc.useMsgSendVariants ? _objc_msgSend_mabicuFpret( _$$ref.pointer, - _sel_timeIntervalSinceDate_, + _sel_decodeDoubleForKey_, _$$ref$1.pointer, ) : _objc_msgSend_mabicu( _$$ref.pointer, - _sel_timeIntervalSinceDate_, + _sel_decodeDoubleForKey_, _$$ref$1.pointer, ); } - /// timeIntervalSinceNow - double get timeIntervalSinceNow { + /// decodeFloatForKey: + double decodeFloatForKey(NSString key) { final _$$ref = object$.ref; + final _$$ref$1 = key.ref; return objc.useMsgSendVariants - ? _objc_msgSend_1ukqyt8Fpret(_$$ref.pointer, _sel_timeIntervalSinceNow) - : _objc_msgSend_1ukqyt8(_$$ref.pointer, _sel_timeIntervalSinceNow); - } - - /// timeIntervalSinceReferenceDate - static double getTimeIntervalSinceReferenceDate$1() { - return objc.useMsgSendVariants - ? _objc_msgSend_1ukqyt8Fpret( - _class_NSDate, - _sel_timeIntervalSinceReferenceDate, + ? _objc_msgSend_g4ia9xFpret( + _$$ref.pointer, + _sel_decodeFloatForKey_, + _$$ref$1.pointer, ) - : _objc_msgSend_1ukqyt8( - _class_NSDate, - _sel_timeIntervalSinceReferenceDate, + : _objc_msgSend_g4ia9x( + _$$ref.pointer, + _sel_decodeFloatForKey_, + _$$ref$1.pointer, ); } -} - -/// NSExtendedDictionary -extension NSExtendedDictionary on NSDictionary { - /// allKeys - NSArray get allKeys { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_allKeys); - return NSArray.fromPointer($ret, retain: true, release: true); - } - /// allKeysForObject: - NSArray allKeysForObject(objc.ObjCObject anObject) { + /// decodeInt32ForKey: + int decodeInt32ForKey(NSString key) { final _$$ref = object$.ref; - final _$$ref$1 = anObject.ref; - final $ret = _objc_msgSend_1sotr3r( + final _$$ref$1 = key.ref; + return _objc_msgSend_fd28sq( _$$ref.pointer, - _sel_allKeysForObject_, + _sel_decodeInt32ForKey_, _$$ref$1.pointer, ); - return NSArray.fromPointer($ret, retain: true, release: true); - } - - /// allValues - NSArray get allValues { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_allValues); - return NSArray.fromPointer($ret, retain: true, release: true); } - /// description - NSString get description$1 { + /// decodeInt64ForKey: + int decodeInt64ForKey(NSString key) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_description); - return NSString.fromPointer($ret, retain: true, release: true); + final _$$ref$1 = key.ref; + return _objc_msgSend_1oj5o8z( + _$$ref.pointer, + _sel_decodeInt64ForKey_, + _$$ref$1.pointer, + ); } - /// descriptionInStringsFileFormat - NSString get descriptionInStringsFileFormat { + /// decodeIntForKey: + int decodeIntForKey(NSString key) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz( + final _$$ref$1 = key.ref; + return _objc_msgSend_hws22w( _$$ref.pointer, - _sel_descriptionInStringsFileFormat, + _sel_decodeIntForKey_, + _$$ref$1.pointer, ); - return NSString.fromPointer($ret, retain: true, release: true); } - /// descriptionWithLocale: - NSString descriptionWithLocale(objc.ObjCObject? locale) { + /// decodeIntegerForKey: + int decodeIntegerForKey(NSString key) { final _$$ref = object$.ref; - final _$$ref$1 = locale?.ref; - final $ret = _objc_msgSend_1sotr3r( + final _$$ref$1 = key.ref; + objc.checkOsVersionInternal( + 'NSCoder.decodeIntegerForKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + return _objc_msgSend_1r6ymhb( _$$ref.pointer, - _sel_descriptionWithLocale_, - _$$ref$1?.pointer ?? ffi.nullptr, + _sel_decodeIntegerForKey_, + _$$ref$1.pointer, ); - return NSString.fromPointer($ret, retain: true, release: true); } - /// descriptionWithLocale:indent: - NSString descriptionWithLocale$1( - objc.ObjCObject? locale, { - required int indent, - }) { + /// decodeObject + objc.ObjCObject? decodeObject() { final _$$ref = object$.ref; - final _$$ref$1 = locale?.ref; - final $ret = _objc_msgSend_1k4kd9s( - _$$ref.pointer, - _sel_descriptionWithLocale_indent_, - _$$ref$1?.pointer ?? ffi.nullptr, - indent, - ); - return NSString.fromPointer($ret, retain: true, release: true); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_decodeObject); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); } - /// enumerateKeysAndObjectsUsingBlock: - void enumerateKeysAndObjectsUsingBlock( - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - block, - ) { + /// decodeObjectForKey: + objc.ObjCObject? decodeObjectForKey(NSString key) { final _$$ref = object$.ref; - final _$$ref$1 = block.ref; - objc.checkOsVersionInternal( - 'NSDictionary.enumerateKeysAndObjectsUsingBlock:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - _objc_msgSend_f167m6( + final _$$ref$1 = key.ref; + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_enumerateKeysAndObjectsUsingBlock_, + _sel_decodeObjectForKey_, _$$ref$1.pointer, ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); } - /// enumerateKeysAndObjectsWithOptions:usingBlock: - void enumerateKeysAndObjectsWithOptions( - int opts, { - required objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - usingBlock, + /// decodeObjectOfClass:forKey: + objc.ObjCObject? decodeObjectOfClass( + objc.ObjCObject aClass, { + required NSString forKey, }) { final _$$ref = object$.ref; - final _$$ref$1 = usingBlock.ref; + final _$$ref$1 = aClass.ref; + final _$$ref$2 = forKey.ref; objc.checkOsVersionInternal( - 'NSDictionary.enumerateKeysAndObjectsWithOptions:usingBlock:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSCoder.decodeObjectOfClass:forKey:', + iOS: (false, (6, 0, 0)), + macOS: (false, (10, 8, 0)), ); - _objc_msgSend_yx8yc6( + final $ret = _objc_msgSend_15qeuct( _$$ref.pointer, - _sel_enumerateKeysAndObjectsWithOptions_usingBlock_, - opts, + _sel_decodeObjectOfClass_forKey_, _$$ref$1.pointer, + _$$ref$2.pointer, ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); } - /// getObjects:andKeys:count: - void getObjects( - ffi.Pointer> objects, { - required ffi.Pointer> andKeys, - required int count, + /// decodeObjectOfClasses:forKey: + objc.ObjCObject? decodeObjectOfClasses( + NSSet? classes, { + required NSString forKey, }) { final _$$ref = object$.ref; + final _$$ref$1 = classes?.ref; + final _$$ref$2 = forKey.ref; objc.checkOsVersionInternal( - 'NSDictionary.getObjects:andKeys:count:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSCoder.decodeObjectOfClasses:forKey:', + iOS: (false, (6, 0, 0)), + macOS: (false, (10, 8, 0)), ); - _objc_msgSend_n2svg2( + final $ret = _objc_msgSend_15qeuct( _$$ref.pointer, - _sel_getObjects_andKeys_count_, - objects, - andKeys, - count, + _sel_decodeObjectOfClasses_forKey_, + _$$ref$1?.pointer ?? ffi.nullptr, + _$$ref$2.pointer, ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); } - /// isEqualToDictionary: - bool isEqualToDictionary(NSDictionary otherDictionary) { + /// decodePropertyList + objc.ObjCObject? decodePropertyList() { final _$$ref = object$.ref; - final _$$ref$1 = otherDictionary.ref; - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_isEqualToDictionary_, - _$$ref$1.pointer, - ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_decodePropertyList); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); } - /// keysOfEntriesPassingTest: - NSSet keysOfEntriesPassingTest( - objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - predicate, - ) { + /// decodePropertyListForKey: + objc.ObjCObject? decodePropertyListForKey(NSString key) { final _$$ref = object$.ref; - final _$$ref$1 = predicate.ref; + final _$$ref$1 = key.ref; objc.checkOsVersionInternal( - 'NSDictionary.keysOfEntriesPassingTest:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSCoder.decodePropertyListForKey:', + iOS: (false, (6, 0, 0)), + macOS: (false, (10, 8, 0)), ); - final $ret = _objc_msgSend_nnxkei( + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_keysOfEntriesPassingTest_, + _sel_decodePropertyListForKey_, _$$ref$1.pointer, ); - return NSSet.fromPointer($ret, retain: true, release: true); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); } - /// keysOfEntriesWithOptions:passingTest: - NSSet keysOfEntriesWithOptions( - int opts, { - required objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - passingTest, - }) { + /// decodeTopLevelObjectAndReturnError: + objc.ObjCObject? decodeTopLevelObjectAndReturnError() { final _$$ref = object$.ref; - final _$$ref$1 = passingTest.ref; objc.checkOsVersionInternal( - 'NSDictionary.keysOfEntriesWithOptions:passingTest:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_13x5boi( - _$$ref.pointer, - _sel_keysOfEntriesWithOptions_passingTest_, - opts, - _$$ref$1.pointer, + 'NSCoder.decodeTopLevelObjectAndReturnError:', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), ); - return NSSet.fromPointer($ret, retain: true, release: true); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1w05pgk( + _$$ref.pointer, + _sel_decodeTopLevelObjectAndReturnError_, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } finally { + pkg_ffi.calloc.free($err); + } } - /// keysSortedByValueUsingComparator: - NSArray keysSortedByValueUsingComparator( - objc.ObjCBlock< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ) - > - cmptr, - ) { + /// decodeTopLevelObjectForKey:error: + objc.ObjCObject? decodeTopLevelObjectForKey(NSString key) { final _$$ref = object$.ref; - final _$$ref$1 = cmptr.ref; + final _$$ref$1 = key.ref; objc.checkOsVersionInternal( - 'NSDictionary.keysSortedByValueUsingComparator:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_nnxkei( - _$$ref.pointer, - _sel_keysSortedByValueUsingComparator_, - _$$ref$1.pointer, + 'NSCoder.decodeTopLevelObjectForKey:error:', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), ); - return NSArray.fromPointer($ret, retain: true, release: true); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1lhpu4m( + _$$ref.pointer, + _sel_decodeTopLevelObjectForKey_error_, + _$$ref$1.pointer, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } finally { + pkg_ffi.calloc.free($err); + } } - /// keysSortedByValueUsingSelector: - NSArray keysSortedByValueUsingSelector( - ffi.Pointer comparator, - ) { + /// decodeTopLevelObjectOfClass:forKey:error: + objc.ObjCObject? decodeTopLevelObjectOfClass( + objc.ObjCObject aClass, { + required NSString forKey, + }) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_3ctkt6( - _$$ref.pointer, - _sel_keysSortedByValueUsingSelector_, - comparator, + final _$$ref$1 = aClass.ref; + final _$$ref$2 = forKey.ref; + objc.checkOsVersionInternal( + 'NSCoder.decodeTopLevelObjectOfClass:forKey:error:', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), ); - return NSArray.fromPointer($ret, retain: true, release: true); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1pnyuds( + _$$ref.pointer, + _sel_decodeTopLevelObjectOfClass_forKey_error_, + _$$ref$1.pointer, + _$$ref$2.pointer, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } finally { + pkg_ffi.calloc.free($err); + } } - /// keysSortedByValueWithOptions:usingComparator: - NSArray keysSortedByValueWithOptions( - int opts, { - required objc.ObjCBlock< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ) - > - usingComparator, + /// decodeTopLevelObjectOfClasses:forKey:error: + objc.ObjCObject? decodeTopLevelObjectOfClasses( + NSSet? classes, { + required NSString forKey, }) { final _$$ref = object$.ref; - final _$$ref$1 = usingComparator.ref; + final _$$ref$1 = classes?.ref; + final _$$ref$2 = forKey.ref; objc.checkOsVersionInternal( - 'NSDictionary.keysSortedByValueWithOptions:usingComparator:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_1x5ew3h( - _$$ref.pointer, - _sel_keysSortedByValueWithOptions_usingComparator_, - opts, - _$$ref$1.pointer, + 'NSCoder.decodeTopLevelObjectOfClasses:forKey:error:', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), ); - return NSArray.fromPointer($ret, retain: true, release: true); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1pnyuds( + _$$ref.pointer, + _sel_decodeTopLevelObjectOfClasses_forKey_error_, + _$$ref$1?.pointer ?? ffi.nullptr, + _$$ref$2.pointer, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } finally { + pkg_ffi.calloc.free($err); + } } - /// objectEnumerator - NSEnumerator objectEnumerator() { + /// decodeValuesOfObjCTypes: + void decodeValuesOfObjCTypes(ffi.Pointer types) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_objectEnumerator); - return NSEnumerator.fromPointer($ret, retain: true, release: true); + _objc_msgSend_1r7ue5f(_$$ref.pointer, _sel_decodeValuesOfObjCTypes_, types); } - /// objectForKeyedSubscript: - objc.ObjCObject? objectForKeyedSubscript(objc.ObjCObject key) { + /// decodingFailurePolicy + NSDecodingFailurePolicy get decodingFailurePolicy { final _$$ref = object$.ref; - final _$$ref$1 = key.ref; objc.checkOsVersionInternal( - 'NSDictionary.objectForKeyedSubscript:', - iOS: (false, (6, 0, 0)), - macOS: (false, (10, 8, 0)), + 'NSCoder.decodingFailurePolicy', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), ); - final $ret = _objc_msgSend_1sotr3r( + final $ret = _objc_msgSend_dgx62p( _$$ref.pointer, - _sel_objectForKeyedSubscript_, - _$$ref$1.pointer, + _sel_decodingFailurePolicy, ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); + return NSDecodingFailurePolicy.fromValue($ret); } - /// objectsForKeys:notFoundMarker: - NSArray objectsForKeys( - NSArray keys, { - required objc.ObjCObject notFoundMarker, + /// encodeArrayOfObjCType:count:at: + void encodeArrayOfObjCType( + ffi.Pointer type, { + required int count, + required ffi.Pointer at, }) { final _$$ref = object$.ref; - final _$$ref$1 = keys.ref; - final _$$ref$2 = notFoundMarker.ref; - final $ret = _objc_msgSend_15qeuct( + _objc_msgSend_1lwwnes( _$$ref.pointer, - _sel_objectsForKeys_notFoundMarker_, - _$$ref$1.pointer, - _$$ref$2.pointer, + _sel_encodeArrayOfObjCType_count_at_, + type, + count, + at, ); - return NSArray.fromPointer($ret, retain: true, release: true); } - /// writeToURL:error: - bool writeToURL(NSURL url) { + /// encodeBool:forKey: + void encodeBool(bool value, {required NSString forKey}) { final _$$ref = object$.ref; - final _$$ref$1 = url.ref; - objc.checkOsVersionInternal( - 'NSDictionary.writeToURL:error:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + final _$$ref$1 = forKey.ref; + _objc_msgSend_hk7n97( + _$$ref.pointer, + _sel_encodeBool_forKey_, + value, + _$$ref$1.pointer, ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_l9p60w( - _$$ref.pointer, - _sel_writeToURL_error_, - _$$ref$1.pointer, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret; - } finally { - pkg_ffi.calloc.free($err); - } } -} -/// NSExtendedEnumerator -extension NSExtendedEnumerator on NSEnumerator { - /// allObjects - NSArray get allObjects { + /// encodeBycopyObject: + void encodeBycopyObject(objc.ObjCObject? anObject) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_allObjects); - return NSArray.fromPointer($ret, retain: true, release: true); + final _$$ref$1 = anObject?.ref; + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_encodeBycopyObject_, + _$$ref$1?.pointer ?? ffi.nullptr, + ); } -} -/// NSExtendedMutableArray -extension NSExtendedMutableArray on NSMutableArray { - /// addObjectsFromArray: - void addObjectsFromArray(NSArray otherArray) { + /// encodeByrefObject: + void encodeByrefObject(objc.ObjCObject? anObject) { final _$$ref = object$.ref; - final _$$ref$1 = otherArray.ref; + final _$$ref$1 = anObject?.ref; _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_addObjectsFromArray_, - _$$ref$1.pointer, + _sel_encodeByrefObject_, + _$$ref$1?.pointer ?? ffi.nullptr, ); } - /// exchangeObjectAtIndex:withObjectAtIndex: - void exchangeObjectAtIndex(int idx1, {required int withObjectAtIndex}) { + /// encodeBytes:length: + void encodeBytes(ffi.Pointer byteaddr, {required int length}) { final _$$ref = object$.ref; - _objc_msgSend_bfp043( + _objc_msgSend_zuf90e( _$$ref.pointer, - _sel_exchangeObjectAtIndex_withObjectAtIndex_, - idx1, - withObjectAtIndex, + _sel_encodeBytes_length_, + byteaddr, + length, ); } - /// insertObjects:atIndexes: - void insertObjects(NSArray objects, {required NSIndexSet atIndexes}) { + /// encodeBytes:length:forKey: + void encodeBytes$1( + ffi.Pointer bytes, { + required int length, + required NSString forKey, + }) { final _$$ref = object$.ref; - final _$$ref$1 = objects.ref; - final _$$ref$2 = atIndexes.ref; - _objc_msgSend_pfv6jd( + final _$$ref$1 = forKey.ref; + _objc_msgSend_18flwjr( _$$ref.pointer, - _sel_insertObjects_atIndexes_, + _sel_encodeBytes_length_forKey_, + bytes, + length, _$$ref$1.pointer, - _$$ref$2.pointer, ); } - /// removeAllObjects - void removeAllObjects() { + /// encodeConditionalObject: + void encodeConditionalObject(objc.ObjCObject? object) { final _$$ref = object$.ref; - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_removeAllObjects); + final _$$ref$1 = object?.ref; + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_encodeConditionalObject_, + _$$ref$1?.pointer ?? ffi.nullptr, + ); } - /// removeObject: - void removeObject(objc.ObjCObject anObject) { + /// encodeConditionalObject:forKey: + void encodeConditionalObject$1( + objc.ObjCObject? object, { + required NSString forKey, + }) { final _$$ref = object$.ref; - final _$$ref$1 = anObject.ref; - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_removeObject_, _$$ref$1.pointer); + final _$$ref$1 = object?.ref; + final _$$ref$2 = forKey.ref; + _objc_msgSend_pfv6jd( + _$$ref.pointer, + _sel_encodeConditionalObject_forKey_, + _$$ref$1?.pointer ?? ffi.nullptr, + _$$ref$2.pointer, + ); } - /// removeObject:inRange: - void removeObject$1(objc.ObjCObject anObject, {required NSRange inRange}) { + /// encodeDouble:forKey: + void encodeDouble(double value, {required NSString forKey}) { final _$$ref = object$.ref; - final _$$ref$1 = anObject.ref; - _objc_msgSend_1oteutl( + final _$$ref$1 = forKey.ref; + _objc_msgSend_130mcug( _$$ref.pointer, - _sel_removeObject_inRange_, + _sel_encodeDouble_forKey_, + value, _$$ref$1.pointer, - inRange, ); } - /// removeObjectIdenticalTo: - void removeObjectIdenticalTo(objc.ObjCObject anObject) { + /// encodeFloat:forKey: + void encodeFloat(double value, {required NSString forKey}) { final _$$ref = object$.ref; - final _$$ref$1 = anObject.ref; - _objc_msgSend_xtuoz7( + final _$$ref$1 = forKey.ref; + _objc_msgSend_quo6mj( _$$ref.pointer, - _sel_removeObjectIdenticalTo_, + _sel_encodeFloat_forKey_, + value, _$$ref$1.pointer, ); } - /// removeObjectIdenticalTo:inRange: - void removeObjectIdenticalTo$1( - objc.ObjCObject anObject, { - required NSRange inRange, - }) { + /// encodeInt32:forKey: + void encodeInt32(int value, {required NSString forKey}) { final _$$ref = object$.ref; - final _$$ref$1 = anObject.ref; - _objc_msgSend_1oteutl( + final _$$ref$1 = forKey.ref; + _objc_msgSend_lof6g0( _$$ref.pointer, - _sel_removeObjectIdenticalTo_inRange_, + _sel_encodeInt32_forKey_, + value, _$$ref$1.pointer, - inRange, ); } - /// removeObjectsAtIndexes: - void removeObjectsAtIndexes(NSIndexSet indexes) { + /// encodeInt64:forKey: + void encodeInt64(int value, {required NSString forKey}) { final _$$ref = object$.ref; - final _$$ref$1 = indexes.ref; - _objc_msgSend_xtuoz7( + final _$$ref$1 = forKey.ref; + _objc_msgSend_mpxix1( _$$ref.pointer, - _sel_removeObjectsAtIndexes_, + _sel_encodeInt64_forKey_, + value, _$$ref$1.pointer, ); } - /// removeObjectsFromIndices:numIndices: - @Deprecated('Not supported') - void removeObjectsFromIndices( - ffi.Pointer indices, { - required int numIndices, - }) { + /// encodeInt:forKey: + void encodeInt(int value, {required NSString forKey}) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSMutableArray.removeObjectsFromIndices:numIndices:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_swohtd( + final _$$ref$1 = forKey.ref; + _objc_msgSend_d8c3m2( _$$ref.pointer, - _sel_removeObjectsFromIndices_numIndices_, - indices, - numIndices, + _sel_encodeInt_forKey_, + value, + _$$ref$1.pointer, ); } - /// removeObjectsInArray: - void removeObjectsInArray(NSArray otherArray) { + /// encodeInteger:forKey: + void encodeInteger(int value, {required NSString forKey}) { final _$$ref = object$.ref; - final _$$ref$1 = otherArray.ref; - _objc_msgSend_xtuoz7( + final _$$ref$1 = forKey.ref; + objc.checkOsVersionInternal( + 'NSCoder.encodeInteger:forKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + _objc_msgSend_1kva9v1( _$$ref.pointer, - _sel_removeObjectsInArray_, + _sel_encodeInteger_forKey_, + value, _$$ref$1.pointer, ); } - /// removeObjectsInRange: - void removeObjectsInRange(NSRange range) { + /// encodeObject: + void encodeObject(objc.ObjCObject? object) { final _$$ref = object$.ref; - _objc_msgSend_1e3pm0z(_$$ref.pointer, _sel_removeObjectsInRange_, range); + final _$$ref$1 = object?.ref; + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_encodeObject_, + _$$ref$1?.pointer ?? ffi.nullptr, + ); } - /// replaceObjectsAtIndexes:withObjects: - void replaceObjectsAtIndexes( - NSIndexSet indexes, { - required NSArray withObjects, - }) { + /// encodeObject:forKey: + void encodeObject$1(objc.ObjCObject? object, {required NSString forKey}) { final _$$ref = object$.ref; - final _$$ref$1 = indexes.ref; - final _$$ref$2 = withObjects.ref; + final _$$ref$1 = object?.ref; + final _$$ref$2 = forKey.ref; _objc_msgSend_pfv6jd( _$$ref.pointer, - _sel_replaceObjectsAtIndexes_withObjects_, - _$$ref$1.pointer, + _sel_encodeObject_forKey_, + _$$ref$1?.pointer ?? ffi.nullptr, _$$ref$2.pointer, ); } - /// replaceObjectsInRange:withObjectsFromArray: - void replaceObjectsInRange( - NSRange range, { - required NSArray withObjectsFromArray, - }) { + /// encodePropertyList: + void encodePropertyList(objc.ObjCObject aPropertyList) { final _$$ref = object$.ref; - final _$$ref$1 = withObjectsFromArray.ref; - _objc_msgSend_1tv4uax( + final _$$ref$1 = aPropertyList.ref; + _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_replaceObjectsInRange_withObjectsFromArray_, - range, + _sel_encodePropertyList_, _$$ref$1.pointer, ); } - /// replaceObjectsInRange:withObjectsFromArray:range: - void replaceObjectsInRange$1( - NSRange range, { - required NSArray withObjectsFromArray, - required NSRange range$1, - }) { + /// encodeRootObject: + void encodeRootObject(objc.ObjCObject rootObject) { final _$$ref = object$.ref; - final _$$ref$1 = withObjectsFromArray.ref; - _objc_msgSend_15bolr3( + final _$$ref$1 = rootObject.ref; + _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_replaceObjectsInRange_withObjectsFromArray_range_, - range, + _sel_encodeRootObject_, _$$ref$1.pointer, - range$1, ); } - /// setArray: - void setArray(NSArray otherArray) { + /// encodeValuesOfObjCTypes: + void encodeValuesOfObjCTypes(ffi.Pointer types) { final _$$ref = object$.ref; - final _$$ref$1 = otherArray.ref; - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_setArray_, _$$ref$1.pointer); + _objc_msgSend_1r7ue5f(_$$ref.pointer, _sel_encodeValuesOfObjCTypes_, types); } - /// setObject:atIndexedSubscript: - void setObject(objc.ObjCObject obj, {required int atIndexedSubscript}) { + /// error + NSError? get error { final _$$ref = object$.ref; - final _$$ref$1 = obj.ref; objc.checkOsVersionInternal( - 'NSMutableArray.setObject:atIndexedSubscript:', - iOS: (false, (6, 0, 0)), - macOS: (false, (10, 8, 0)), - ); - _objc_msgSend_djsa9o( - _$$ref.pointer, - _sel_setObject_atIndexedSubscript_, - _$$ref$1.pointer, - atIndexedSubscript, + 'NSCoder.error', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_error); + return $ret.address == 0 + ? null + : NSError.fromPointer($ret, retain: true, release: true); } - /// sortUsingComparator: - void sortUsingComparator( - objc.ObjCBlock< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ) - > - cmptr, - ) { + /// failWithError: + void failWithError(NSError error) { final _$$ref = object$.ref; - final _$$ref$1 = cmptr.ref; + final _$$ref$1 = error.ref; objc.checkOsVersionInternal( - 'NSMutableArray.sortUsingComparator:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - _objc_msgSend_f167m6( - _$$ref.pointer, - _sel_sortUsingComparator_, - _$$ref$1.pointer, + 'NSCoder.failWithError:', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), ); + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_failWithError_, _$$ref$1.pointer); } - /// sortUsingFunction:context: - void sortUsingFunction( - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - > - compare, { - required ffi.Pointer context, - }) { + /// objectZone + ffi.Pointer objectZone() { final _$$ref = object$.ref; - _objc_msgSend_1bvics1( - _$$ref.pointer, - _sel_sortUsingFunction_context_, - compare, - context, + return _objc_msgSend_sz90oi(_$$ref.pointer, _sel_objectZone); + } + + /// requiresSecureCoding + bool get requiresSecureCoding { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSCoder.requiresSecureCoding', + iOS: (false, (6, 0, 0)), + macOS: (false, (10, 8, 0)), ); + return _objc_msgSend_91o635(_$$ref.pointer, _sel_requiresSecureCoding); } - /// sortUsingSelector: - void sortUsingSelector(ffi.Pointer comparator) { + /// setObjectZone: + void setObjectZone(ffi.Pointer zone) { final _$$ref = object$.ref; - _objc_msgSend_1d9e4oe(_$$ref.pointer, _sel_sortUsingSelector_, comparator); + _objc_msgSend_1lonves(_$$ref.pointer, _sel_setObjectZone_, zone); } - /// sortWithOptions:usingComparator: - void sortWithOptions( - int opts, { - required objc.ObjCBlock< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ) + /// systemVersion + int get systemVersion { + final _$$ref = object$.ref; + return _objc_msgSend_3pyzne(_$$ref.pointer, _sel_systemVersion); + } +} + +/// NSExtendedData +extension NSExtendedData on NSData { + /// description + NSString get description$1 { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_description); + return NSString.fromPointer($ret, retain: true, release: true); + } + + /// enumerateByteRangesUsingBlock: + void enumerateByteRangesUsingBlock( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) > - usingComparator, - }) { + block, + ) { final _$$ref = object$.ref; - final _$$ref$1 = usingComparator.ref; + final _$$ref$1 = block.ref; objc.checkOsVersionInternal( - 'NSMutableArray.sortWithOptions:usingComparator:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSData.enumerateByteRangesUsingBlock:', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - _objc_msgSend_jjgvjt( + _objc_msgSend_f167m6( _$$ref.pointer, - _sel_sortWithOptions_usingComparator_, - opts, + _sel_enumerateByteRangesUsingBlock_, _$$ref$1.pointer, ); } -} -/// NSExtendedMutableData -extension NSExtendedMutableData on NSMutableData { - /// appendBytes:length: - void appendBytes(ffi.Pointer bytes, {required int length}) { + /// getBytes:length: + void getBytes(ffi.Pointer buffer, {required int length}) { final _$$ref = object$.ref; - _objc_msgSend_zuf90e( - _$$ref.pointer, - _sel_appendBytes_length_, - bytes, - length, - ); + _objc_msgSend_zuf90e(_$$ref.pointer, _sel_getBytes_length_, buffer, length); } - /// appendData: - void appendData(NSData other) { + /// getBytes:range: + void getBytes$1(ffi.Pointer buffer, {required NSRange range}) { final _$$ref = object$.ref; - final _$$ref$1 = other.ref; - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_appendData_, _$$ref$1.pointer); + _objc_msgSend_xpqfd7(_$$ref.pointer, _sel_getBytes_range_, buffer, range); } - /// increaseLengthBy: - void increaseLengthBy(int extraLength) { + /// isEqualToData: + bool isEqualToData(NSData other) { final _$$ref = object$.ref; - _objc_msgSend_1i9r4xy(_$$ref.pointer, _sel_increaseLengthBy_, extraLength); + final _$$ref$1 = other.ref; + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_isEqualToData_, + _$$ref$1.pointer, + ); } - /// replaceBytesInRange:withBytes: - void replaceBytesInRange( - NSRange range, { - required ffi.Pointer withBytes, + /// rangeOfData:options:range: + NSRange rangeOfData( + NSData dataToFind, { + required int options, + required NSRange range, }) { final _$$ref = object$.ref; - _objc_msgSend_eh32gn( - _$$ref.pointer, - _sel_replaceBytesInRange_withBytes_, - range, - withBytes, + final _$$ref$1 = dataToFind.ref; + objc.checkOsVersionInternal( + 'NSData.rangeOfData:options:range:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_1d8s65wStret( + $ptr, + _$$ref.pointer, + _sel_rangeOfData_options_range_, + _$$ref$1.pointer, + options, + range, + ) + : $ptr.ref = _objc_msgSend_1d8s65w( + _$$ref.pointer, + _sel_rangeOfData_options_range_, + _$$ref$1.pointer, + options, + range, + ); + final $finalizable = $ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree, ); + return ffi.Struct.create($finalizable); } - /// replaceBytesInRange:withBytes:length: - void replaceBytesInRange$1( - NSRange range, { - required ffi.Pointer withBytes, - required int length, - }) { + /// subdataWithRange: + NSData subdataWithRange(NSRange range) { final _$$ref = object$.ref; - _objc_msgSend_c0vg4w( + final $ret = _objc_msgSend_1k1o1s7( _$$ref.pointer, - _sel_replaceBytesInRange_withBytes_length_, + _sel_subdataWithRange_, range, - withBytes, - length, ); + return NSData.fromPointer($ret, retain: true, release: true); } - /// resetBytesInRange: - void resetBytesInRange(NSRange range) { - final _$$ref = object$.ref; - _objc_msgSend_1e3pm0z(_$$ref.pointer, _sel_resetBytesInRange_, range); - } - - /// setData: - void setData(NSData data) { - final _$$ref = object$.ref; - final _$$ref$1 = data.ref; - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_setData_, _$$ref$1.pointer); - } -} - -/// NSExtendedMutableDictionary -extension NSExtendedMutableDictionary on NSMutableDictionary { - /// addEntriesFromDictionary: - void addEntriesFromDictionary(NSDictionary otherDictionary) { + /// writeToFile:atomically: + bool writeToFile(NSString path, {required bool atomically}) { final _$$ref = object$.ref; - final _$$ref$1 = otherDictionary.ref; - _objc_msgSend_xtuoz7( + final _$$ref$1 = path.ref; + return _objc_msgSend_1iyq28l( _$$ref.pointer, - _sel_addEntriesFromDictionary_, + _sel_writeToFile_atomically_, _$$ref$1.pointer, + atomically, ); } - /// removeAllObjects - void removeAllObjects() { - final _$$ref = object$.ref; - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_removeAllObjects); - } - - /// removeObjectsForKeys: - void removeObjectsForKeys(NSArray keyArray) { + /// writeToFile:options:error: + bool writeToFile$1( + NSString path, { + required int options, + required ffi.Pointer> error, + }) { final _$$ref = object$.ref; - final _$$ref$1 = keyArray.ref; - _objc_msgSend_xtuoz7( + final _$$ref$1 = path.ref; + return _objc_msgSend_1xi08ar( _$$ref.pointer, - _sel_removeObjectsForKeys_, + _sel_writeToFile_options_error_, _$$ref$1.pointer, + options, + error, ); } - /// setDictionary: - void setDictionary(NSDictionary otherDictionary) { + /// writeToURL:atomically: + bool writeToURL(NSURL url, {required bool atomically}) { final _$$ref = object$.ref; - final _$$ref$1 = otherDictionary.ref; - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_setDictionary_, _$$ref$1.pointer); + final _$$ref$1 = url.ref; + return _objc_msgSend_1iyq28l( + _$$ref.pointer, + _sel_writeToURL_atomically_, + _$$ref$1.pointer, + atomically, + ); } - /// setObject:forKeyedSubscript: - void setObject$1( - objc.ObjCObject? obj, { - required NSCopying forKeyedSubscript, + /// writeToURL:options:error: + bool writeToURL$1( + NSURL url, { + required int options, + required ffi.Pointer> error, }) { final _$$ref = object$.ref; - final _$$ref$1 = obj?.ref; - final _$$ref$2 = forKeyedSubscript.ref; - objc.checkOsVersionInternal( - 'NSMutableDictionary.setObject:forKeyedSubscript:', - iOS: (false, (6, 0, 0)), - macOS: (false, (10, 8, 0)), - ); - _objc_msgSend_pfv6jd( + final _$$ref$1 = url.ref; + return _objc_msgSend_1xi08ar( _$$ref.pointer, - _sel_setObject_forKeyedSubscript_, - _$$ref$1?.pointer ?? ffi.nullptr, - _$$ref$2.pointer, + _sel_writeToURL_options_error_, + _$$ref$1.pointer, + options, + error, ); } } -/// NSExtendedMutableOrderedSet -extension NSExtendedMutableOrderedSet on NSMutableOrderedSet { - /// addObject: - void addObject(objc.ObjCObject object) { +/// NSExtendedDate +extension NSExtendedDate on NSDate { + /// addTimeInterval: + @Deprecated('Use dateByAddingTimeInterval instead') + objc.ObjCObject addTimeInterval(double seconds) { final _$$ref = object$.ref; - final _$$ref$1 = object.ref; objc.checkOsVersionInternal( - 'NSMutableOrderedSet.addObject:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSDate.addTimeInterval:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_addObject_, _$$ref$1.pointer); + final $ret = _objc_msgSend_oa8mke( + _$$ref.pointer, + _sel_addTimeInterval_, + seconds, + ); + return objc.ObjCObject($ret, retain: true, release: true); } - /// addObjects:count: - void addObjects( - ffi.Pointer> objects, { - required int count, - }) { + /// compare: + NSComparisonResult compare(NSDate other) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.addObjects:count:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_gcjqkl( + final _$$ref$1 = other.ref; + final $ret = _objc_msgSend_1ym6zyw( _$$ref.pointer, - _sel_addObjects_count_, - objects, - count, + _sel_compare_, + _$$ref$1.pointer, ); + return NSComparisonResult.fromValue($ret); } - /// addObjectsFromArray: - void addObjectsFromArray(NSArray array) { + /// description + NSString get description$1 { final _$$ref = object$.ref; - final _$$ref$1 = array.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.addObjectsFromArray:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_xtuoz7( + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_description); + return NSString.fromPointer($ret, retain: true, release: true); + } + + /// descriptionWithLocale: + NSString descriptionWithLocale(objc.ObjCObject? locale) { + final _$$ref = object$.ref; + final _$$ref$1 = locale?.ref; + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_addObjectsFromArray_, - _$$ref$1.pointer, + _sel_descriptionWithLocale_, + _$$ref$1?.pointer ?? ffi.nullptr, ); + return NSString.fromPointer($ret, retain: true, release: true); } - /// exchangeObjectAtIndex:withObjectAtIndex: - void exchangeObjectAtIndex(int idx1, {required int withObjectAtIndex}) { + /// earlierDate: + NSDate earlierDate(NSDate anotherDate) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.exchangeObjectAtIndex:withObjectAtIndex:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_bfp043( + final _$$ref$1 = anotherDate.ref; + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_exchangeObjectAtIndex_withObjectAtIndex_, - idx1, - withObjectAtIndex, + _sel_earlierDate_, + _$$ref$1.pointer, ); + return NSDate.fromPointer($ret, retain: true, release: true); } - /// insertObjects:atIndexes: - void insertObjects(NSArray objects, {required NSIndexSet atIndexes}) { + /// isEqualToDate: + bool isEqualToDate(NSDate otherDate) { final _$$ref = object$.ref; - final _$$ref$1 = objects.ref; - final _$$ref$2 = atIndexes.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.insertObjects:atIndexes:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_pfv6jd( + final _$$ref$1 = otherDate.ref; + return _objc_msgSend_19nvye5( _$$ref.pointer, - _sel_insertObjects_atIndexes_, + _sel_isEqualToDate_, _$$ref$1.pointer, - _$$ref$2.pointer, ); } - /// intersectOrderedSet: - void intersectOrderedSet(NSOrderedSet other) { + /// laterDate: + NSDate laterDate(NSDate anotherDate) { final _$$ref = object$.ref; - final _$$ref$1 = other.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.intersectOrderedSet:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_xtuoz7( + final _$$ref$1 = anotherDate.ref; + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_intersectOrderedSet_, + _sel_laterDate_, _$$ref$1.pointer, ); + return NSDate.fromPointer($ret, retain: true, release: true); } - /// intersectSet: - void intersectSet(NSSet other) { + /// timeIntervalSince1970 + double get timeIntervalSince1970 { final _$$ref = object$.ref; - final _$$ref$1 = other.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.intersectSet:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_intersectSet_, _$$ref$1.pointer); + return objc.useMsgSendVariants + ? _objc_msgSend_1ukqyt8Fpret(_$$ref.pointer, _sel_timeIntervalSince1970) + : _objc_msgSend_1ukqyt8(_$$ref.pointer, _sel_timeIntervalSince1970); } - /// minusOrderedSet: - void minusOrderedSet(NSOrderedSet other) { + /// timeIntervalSinceDate: + double timeIntervalSinceDate(NSDate anotherDate) { final _$$ref = object$.ref; - final _$$ref$1 = other.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.minusOrderedSet:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_minusOrderedSet_, - _$$ref$1.pointer, - ); + final _$$ref$1 = anotherDate.ref; + return objc.useMsgSendVariants + ? _objc_msgSend_mabicuFpret( + _$$ref.pointer, + _sel_timeIntervalSinceDate_, + _$$ref$1.pointer, + ) + : _objc_msgSend_mabicu( + _$$ref.pointer, + _sel_timeIntervalSinceDate_, + _$$ref$1.pointer, + ); } - /// minusSet: - void minusSet(NSSet other) { + /// timeIntervalSinceNow + double get timeIntervalSinceNow { final _$$ref = object$.ref; - final _$$ref$1 = other.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.minusSet:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_minusSet_, _$$ref$1.pointer); + return objc.useMsgSendVariants + ? _objc_msgSend_1ukqyt8Fpret(_$$ref.pointer, _sel_timeIntervalSinceNow) + : _objc_msgSend_1ukqyt8(_$$ref.pointer, _sel_timeIntervalSinceNow); } - /// moveObjectsAtIndexes:toIndex: - void moveObjectsAtIndexes(NSIndexSet indexes, {required int toIndex}) { + /// timeIntervalSinceReferenceDate + static double getTimeIntervalSinceReferenceDate$1() { + return objc.useMsgSendVariants + ? _objc_msgSend_1ukqyt8Fpret( + _class_NSDate, + _sel_timeIntervalSinceReferenceDate, + ) + : _objc_msgSend_1ukqyt8( + _class_NSDate, + _sel_timeIntervalSinceReferenceDate, + ); + } +} + +/// NSExtendedDictionary +extension NSExtendedDictionary on NSDictionary { + /// allKeys + NSArray get allKeys { final _$$ref = object$.ref; - final _$$ref$1 = indexes.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.moveObjectsAtIndexes:toIndex:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_djsa9o( + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_allKeys); + return NSArray.fromPointer($ret, retain: true, release: true); + } + + /// allKeysForObject: + NSArray allKeysForObject(objc.ObjCObject anObject) { + final _$$ref = object$.ref; + final _$$ref$1 = anObject.ref; + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_moveObjectsAtIndexes_toIndex_, + _sel_allKeysForObject_, _$$ref$1.pointer, - toIndex, ); + return NSArray.fromPointer($ret, retain: true, release: true); } - /// removeAllObjects - void removeAllObjects() { + /// allValues + NSArray get allValues { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.removeAllObjects', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_removeAllObjects); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_allValues); + return NSArray.fromPointer($ret, retain: true, release: true); } - /// removeObject: - void removeObject(objc.ObjCObject object) { + /// description + NSString get description$1 { final _$$ref = object$.ref; - final _$$ref$1 = object.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.removeObject:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_removeObject_, _$$ref$1.pointer); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_description); + return NSString.fromPointer($ret, retain: true, release: true); } - /// removeObjectsAtIndexes: - void removeObjectsAtIndexes(NSIndexSet indexes) { + /// descriptionInStringsFileFormat + NSString get descriptionInStringsFileFormat { final _$$ref = object$.ref; - final _$$ref$1 = indexes.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.removeObjectsAtIndexes:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_xtuoz7( + final $ret = _objc_msgSend_151sglz( _$$ref.pointer, - _sel_removeObjectsAtIndexes_, - _$$ref$1.pointer, + _sel_descriptionInStringsFileFormat, ); + return NSString.fromPointer($ret, retain: true, release: true); } - /// removeObjectsInArray: - void removeObjectsInArray(NSArray array) { + /// descriptionWithLocale: + NSString descriptionWithLocale(objc.ObjCObject? locale) { final _$$ref = object$.ref; - final _$$ref$1 = array.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.removeObjectsInArray:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + final _$$ref$1 = locale?.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_descriptionWithLocale_, + _$$ref$1?.pointer ?? ffi.nullptr, ); - _objc_msgSend_xtuoz7( + return NSString.fromPointer($ret, retain: true, release: true); + } + + /// descriptionWithLocale:indent: + NSString descriptionWithLocale$1( + objc.ObjCObject? locale, { + required int indent, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = locale?.ref; + final $ret = _objc_msgSend_1k4kd9s( _$$ref.pointer, - _sel_removeObjectsInArray_, - _$$ref$1.pointer, + _sel_descriptionWithLocale_indent_, + _$$ref$1?.pointer ?? ffi.nullptr, + indent, ); + return NSString.fromPointer($ret, retain: true, release: true); } - /// removeObjectsInRange: - void removeObjectsInRange(NSRange range) { + /// enumerateKeysAndObjectsUsingBlock: + void enumerateKeysAndObjectsUsingBlock( + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + block, + ) { final _$$ref = object$.ref; + final _$$ref$1 = block.ref; objc.checkOsVersionInternal( - 'NSMutableOrderedSet.removeObjectsInRange:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSDictionary.enumerateKeysAndObjectsUsingBlock:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + _objc_msgSend_f167m6( + _$$ref.pointer, + _sel_enumerateKeysAndObjectsUsingBlock_, + _$$ref$1.pointer, ); - _objc_msgSend_1e3pm0z(_$$ref.pointer, _sel_removeObjectsInRange_, range); } - /// replaceObjectsAtIndexes:withObjects: - void replaceObjectsAtIndexes( - NSIndexSet indexes, { - required NSArray withObjects, + /// enumerateKeysAndObjectsWithOptions:usingBlock: + void enumerateKeysAndObjectsWithOptions( + int opts, { + required objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + usingBlock, }) { final _$$ref = object$.ref; - final _$$ref$1 = indexes.ref; - final _$$ref$2 = withObjects.ref; + final _$$ref$1 = usingBlock.ref; objc.checkOsVersionInternal( - 'NSMutableOrderedSet.replaceObjectsAtIndexes:withObjects:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSDictionary.enumerateKeysAndObjectsWithOptions:usingBlock:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - _objc_msgSend_pfv6jd( + _objc_msgSend_yx8yc6( _$$ref.pointer, - _sel_replaceObjectsAtIndexes_withObjects_, + _sel_enumerateKeysAndObjectsWithOptions_usingBlock_, + opts, _$$ref$1.pointer, - _$$ref$2.pointer, ); } - /// replaceObjectsInRange:withObjects:count: - void replaceObjectsInRange( - NSRange range, { - required ffi.Pointer> withObjects, + /// getObjects:andKeys:count: + void getObjects( + ffi.Pointer> objects, { + required ffi.Pointer> andKeys, required int count, }) { final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSMutableOrderedSet.replaceObjectsInRange:withObjects:count:', + 'NSDictionary.getObjects:andKeys:count:', iOS: (false, (5, 0, 0)), macOS: (false, (10, 7, 0)), ); - _objc_msgSend_122v0cv( + _objc_msgSend_n2svg2( _$$ref.pointer, - _sel_replaceObjectsInRange_withObjects_count_, - range, - withObjects, + _sel_getObjects_andKeys_count_, + objects, + andKeys, count, ); } - /// setObject:atIndex: - void setObject(objc.ObjCObject obj, {required int atIndex}) { + /// isEqualToDictionary: + bool isEqualToDictionary(NSDictionary otherDictionary) { final _$$ref = object$.ref; - final _$$ref$1 = obj.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.setObject:atIndex:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_djsa9o( + final _$$ref$1 = otherDictionary.ref; + return _objc_msgSend_19nvye5( _$$ref.pointer, - _sel_setObject_atIndex_, + _sel_isEqualToDictionary_, _$$ref$1.pointer, - atIndex, ); } - /// setObject:atIndexedSubscript: - void setObject$1(objc.ObjCObject obj, {required int atIndexedSubscript}) { + /// keysOfEntriesPassingTest: + NSSet keysOfEntriesPassingTest( + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + predicate, + ) { final _$$ref = object$.ref; - final _$$ref$1 = obj.ref; + final _$$ref$1 = predicate.ref; objc.checkOsVersionInternal( - 'NSMutableOrderedSet.setObject:atIndexedSubscript:', - iOS: (false, (6, 0, 0)), - macOS: (false, (10, 8, 0)), + 'NSDictionary.keysOfEntriesPassingTest:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - _objc_msgSend_djsa9o( + final $ret = _objc_msgSend_nnxkei( _$$ref.pointer, - _sel_setObject_atIndexedSubscript_, + _sel_keysOfEntriesPassingTest_, _$$ref$1.pointer, - atIndexedSubscript, ); + return NSSet.fromPointer($ret, retain: true, release: true); } - /// sortRange:options:usingComparator: - void sortRange( - NSRange range, { - required int options, + /// keysOfEntriesWithOptions:passingTest: + NSSet keysOfEntriesWithOptions( + int opts, { required objc.ObjCBlock< - ffi.Long Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) > - usingComparator, + passingTest, }) { final _$$ref = object$.ref; - final _$$ref$1 = usingComparator.ref; + final _$$ref$1 = passingTest.ref; objc.checkOsVersionInternal( - 'NSMutableOrderedSet.sortRange:options:usingComparator:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSDictionary.keysOfEntriesWithOptions:passingTest:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - _objc_msgSend_arew0j( + final $ret = _objc_msgSend_13x5boi( _$$ref.pointer, - _sel_sortRange_options_usingComparator_, - range, - options, + _sel_keysOfEntriesWithOptions_passingTest_, + opts, _$$ref$1.pointer, ); + return NSSet.fromPointer($ret, retain: true, release: true); } - /// sortUsingComparator: - void sortUsingComparator( + /// keysSortedByValueUsingComparator: + NSArray keysSortedByValueUsingComparator( objc.ObjCBlock< ffi.Long Function( ffi.Pointer, @@ -7940,19 +9761,33 @@ extension NSExtendedMutableOrderedSet on NSMutableOrderedSet { final _$$ref = object$.ref; final _$$ref$1 = cmptr.ref; objc.checkOsVersionInternal( - 'NSMutableOrderedSet.sortUsingComparator:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSDictionary.keysSortedByValueUsingComparator:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - _objc_msgSend_f167m6( + final $ret = _objc_msgSend_nnxkei( _$$ref.pointer, - _sel_sortUsingComparator_, + _sel_keysSortedByValueUsingComparator_, _$$ref$1.pointer, ); + return NSArray.fromPointer($ret, retain: true, release: true); + } + + /// keysSortedByValueUsingSelector: + NSArray keysSortedByValueUsingSelector( + ffi.Pointer comparator, + ) { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_3ctkt6( + _$$ref.pointer, + _sel_keysSortedByValueUsingSelector_, + comparator, + ); + return NSArray.fromPointer($ret, retain: true, release: true); } - /// sortWithOptions:usingComparator: - void sortWithOptions( + /// keysSortedByValueWithOptions:usingComparator: + NSArray keysSortedByValueWithOptions( int opts, { required objc.ObjCBlock< ffi.Long Function( @@ -7965,663 +9800,746 @@ extension NSExtendedMutableOrderedSet on NSMutableOrderedSet { final _$$ref = object$.ref; final _$$ref$1 = usingComparator.ref; objc.checkOsVersionInternal( - 'NSMutableOrderedSet.sortWithOptions:usingComparator:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSDictionary.keysSortedByValueWithOptions:usingComparator:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - _objc_msgSend_jjgvjt( + final $ret = _objc_msgSend_1x5ew3h( _$$ref.pointer, - _sel_sortWithOptions_usingComparator_, + _sel_keysSortedByValueWithOptions_usingComparator_, opts, _$$ref$1.pointer, ); + return NSArray.fromPointer($ret, retain: true, release: true); } - /// unionOrderedSet: - void unionOrderedSet(NSOrderedSet other) { + /// objectEnumerator + NSEnumerator objectEnumerator() { final _$$ref = object$.ref; - final _$$ref$1 = other.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_objectEnumerator); + return NSEnumerator.fromPointer($ret, retain: true, release: true); + } + + /// objectForKeyedSubscript: + objc.ObjCObject? objectForKeyedSubscript(objc.ObjCObject key) { + final _$$ref = object$.ref; + final _$$ref$1 = key.ref; objc.checkOsVersionInternal( - 'NSMutableOrderedSet.unionOrderedSet:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSDictionary.objectForKeyedSubscript:', + iOS: (false, (6, 0, 0)), + macOS: (false, (10, 8, 0)), ); - _objc_msgSend_xtuoz7( + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_unionOrderedSet_, + _sel_objectForKeyedSubscript_, _$$ref$1.pointer, ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); } - /// unionSet: - void unionSet(NSSet other) { + /// objectsForKeys:notFoundMarker: + NSArray objectsForKeys( + NSArray keys, { + required objc.ObjCObject notFoundMarker, + }) { final _$$ref = object$.ref; - final _$$ref$1 = other.ref; + final _$$ref$1 = keys.ref; + final _$$ref$2 = notFoundMarker.ref; + final $ret = _objc_msgSend_15qeuct( + _$$ref.pointer, + _sel_objectsForKeys_notFoundMarker_, + _$$ref$1.pointer, + _$$ref$2.pointer, + ); + return NSArray.fromPointer($ret, retain: true, release: true); + } + + /// writeToURL:error: + bool writeToURL(NSURL url) { + final _$$ref = object$.ref; + final _$$ref$1 = url.ref; objc.checkOsVersionInternal( - 'NSMutableOrderedSet.unionSet:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSDictionary.writeToURL:error:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), ); - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_unionSet_, _$$ref$1.pointer); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_l9p60w( + _$$ref.pointer, + _sel_writeToURL_error_, + _$$ref$1.pointer, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret; + } finally { + pkg_ffi.calloc.free($err); + } } } -/// NSExtendedMutableSet -extension NSExtendedMutableSet on NSMutableSet { - /// addObjectsFromArray: - void addObjectsFromArray(NSArray array) { +/// NSExtendedEnumerator +extension NSExtendedEnumerator on NSEnumerator { + /// allObjects + NSArray get allObjects { final _$$ref = object$.ref; - final _$$ref$1 = array.ref; - _objc_msgSend_xtuoz7( + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_allObjects); + return NSArray.fromPointer($ret, retain: true, release: true); + } +} + +/// NSExtendedLocale +extension NSExtendedLocale on NSLocale { + /// alternateQuotationBeginDelimiter + NSString get alternateQuotationBeginDelimiter { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSLocale.alternateQuotationBeginDelimiter', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), + ); + final $ret = _objc_msgSend_151sglz( _$$ref.pointer, - _sel_addObjectsFromArray_, - _$$ref$1.pointer, + _sel_alternateQuotationBeginDelimiter, ); + return NSString.fromPointer($ret, retain: true, release: true); } - /// intersectSet: - void intersectSet(NSSet otherSet) { + /// alternateQuotationEndDelimiter + NSString get alternateQuotationEndDelimiter { final _$$ref = object$.ref; - final _$$ref$1 = otherSet.ref; - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_intersectSet_, _$$ref$1.pointer); + objc.checkOsVersionInternal( + 'NSLocale.alternateQuotationEndDelimiter', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_alternateQuotationEndDelimiter, + ); + return NSString.fromPointer($ret, retain: true, release: true); } - /// minusSet: - void minusSet(NSSet otherSet) { + /// calendarIdentifier + NSString get calendarIdentifier { final _$$ref = object$.ref; - final _$$ref$1 = otherSet.ref; - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_minusSet_, _$$ref$1.pointer); + objc.checkOsVersionInternal( + 'NSLocale.calendarIdentifier', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_calendarIdentifier); + return NSString.fromPointer($ret, retain: true, release: true); } - /// removeAllObjects - void removeAllObjects() { + /// collationIdentifier + NSString? get collationIdentifier { final _$$ref = object$.ref; - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_removeAllObjects); + objc.checkOsVersionInternal( + 'NSLocale.collationIdentifier', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_collationIdentifier, + ); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); } - /// setSet: - void setSet(NSSet otherSet) { + /// collatorIdentifier + NSString get collatorIdentifier { final _$$ref = object$.ref; - final _$$ref$1 = otherSet.ref; - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_setSet_, _$$ref$1.pointer); + objc.checkOsVersionInternal( + 'NSLocale.collatorIdentifier', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_collatorIdentifier); + return NSString.fromPointer($ret, retain: true, release: true); } - /// unionSet: - void unionSet(NSSet otherSet) { + /// countryCode + @Deprecated('Deprecated') + NSString? get countryCode { final _$$ref = object$.ref; - final _$$ref$1 = otherSet.ref; - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_unionSet_, _$$ref$1.pointer); + objc.checkOsVersionInternal( + 'NSLocale.countryCode', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_countryCode); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); } -} -/// NSExtendedOrderedSet -extension NSExtendedOrderedSet on NSOrderedSet { - /// array - NSArray get array { + /// currencyCode + NSString? get currencyCode { final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.array', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSLocale.currencyCode', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_array); - return NSArray.fromPointer($ret, retain: true, release: true); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_currencyCode); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); } - /// containsObject: - bool containsObject(objc.ObjCObject object) { + /// currencySymbol + NSString get currencySymbol { final _$$ref = object$.ref; - final _$$ref$1 = object.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.containsObject:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_containsObject_, - _$$ref$1.pointer, + 'NSLocale.currencySymbol', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_currencySymbol); + return NSString.fromPointer($ret, retain: true, release: true); } - /// description - NSString get description$1 { + /// decimalSeparator + NSString get decimalSeparator { final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.description', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSLocale.decimalSeparator', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_description); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_decimalSeparator); return NSString.fromPointer($ret, retain: true, release: true); } - /// descriptionWithLocale: - NSString descriptionWithLocale(objc.ObjCObject? locale) { + /// exemplarCharacterSet + NSCharacterSet get exemplarCharacterSet { final _$$ref = object$.ref; - final _$$ref$1 = locale?.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.descriptionWithLocale:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSLocale.exemplarCharacterSet', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), ); - final $ret = _objc_msgSend_1sotr3r( + final $ret = _objc_msgSend_151sglz( _$$ref.pointer, - _sel_descriptionWithLocale_, - _$$ref$1?.pointer ?? ffi.nullptr, + _sel_exemplarCharacterSet, + ); + return NSCharacterSet.fromPointer($ret, retain: true, release: true); + } + + /// groupingSeparator + NSString get groupingSeparator { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSLocale.groupingSeparator', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_groupingSeparator); return NSString.fromPointer($ret, retain: true, release: true); } - /// descriptionWithLocale:indent: - NSString descriptionWithLocale$1( - objc.ObjCObject? locale, { - required int indent, - }) { + /// languageCode + NSString get languageCode { final _$$ref = object$.ref; - final _$$ref$1 = locale?.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.descriptionWithLocale:indent:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSLocale.languageCode', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), ); - final $ret = _objc_msgSend_1k4kd9s( - _$$ref.pointer, - _sel_descriptionWithLocale_indent_, - _$$ref$1?.pointer ?? ffi.nullptr, - indent, + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_languageCode); + return NSString.fromPointer($ret, retain: true, release: true); + } + + /// languageIdentifier + NSString get languageIdentifier { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSLocale.languageIdentifier', + iOS: (false, (17, 0, 0)), + macOS: (false, (14, 0, 0)), ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_languageIdentifier); return NSString.fromPointer($ret, retain: true, release: true); } - /// enumerateObjectsAtIndexes:options:usingBlock: - void enumerateObjectsAtIndexes( - NSIndexSet s, { - required int options, - required objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - > - usingBlock, - }) { + /// localeIdentifier + NSString get localeIdentifier { final _$$ref = object$.ref; - final _$$ref$1 = s.ref; - final _$$ref$2 = usingBlock.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_localeIdentifier); + return NSString.fromPointer($ret, retain: true, release: true); + } + + /// localizedStringForCalendarIdentifier: + NSString? localizedStringForCalendarIdentifier(NSString calendarIdentifier) { + final _$$ref = object$.ref; + final _$$ref$1 = calendarIdentifier.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.enumerateObjectsAtIndexes:options:usingBlock:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSLocale.localizedStringForCalendarIdentifier:', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), ); - _objc_msgSend_a3wp08( + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_enumerateObjectsAtIndexes_options_usingBlock_, + _sel_localizedStringForCalendarIdentifier_, _$$ref$1.pointer, - options, - _$$ref$2.pointer, ); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); } - /// enumerateObjectsUsingBlock: - void enumerateObjectsUsingBlock( - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - > - block, + /// localizedStringForCollationIdentifier: + NSString? localizedStringForCollationIdentifier( + NSString collationIdentifier, ) { final _$$ref = object$.ref; - final _$$ref$1 = block.ref; + final _$$ref$1 = collationIdentifier.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.enumerateObjectsUsingBlock:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSLocale.localizedStringForCollationIdentifier:', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), ); - _objc_msgSend_f167m6( + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_enumerateObjectsUsingBlock_, + _sel_localizedStringForCollationIdentifier_, _$$ref$1.pointer, ); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); } - /// enumerateObjectsWithOptions:usingBlock: - void enumerateObjectsWithOptions( - int opts, { - required objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - > - usingBlock, - }) { + /// localizedStringForCollatorIdentifier: + NSString? localizedStringForCollatorIdentifier(NSString collatorIdentifier) { final _$$ref = object$.ref; - final _$$ref$1 = usingBlock.ref; + final _$$ref$1 = collatorIdentifier.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.enumerateObjectsWithOptions:usingBlock:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSLocale.localizedStringForCollatorIdentifier:', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), ); - _objc_msgSend_yx8yc6( + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_enumerateObjectsWithOptions_usingBlock_, - opts, + _sel_localizedStringForCollatorIdentifier_, _$$ref$1.pointer, ); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); } - /// firstObject - objc.ObjCObject? get firstObject { + /// localizedStringForCountryCode: + NSString? localizedStringForCountryCode(NSString countryCode) { final _$$ref = object$.ref; + final _$$ref$1 = countryCode.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.firstObject', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSLocale.localizedStringForCountryCode:', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_localizedStringForCountryCode_, + _$$ref$1.pointer, ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_firstObject); return $ret.address == 0 ? null - : objc.ObjCObject($ret, retain: true, release: true); + : NSString.fromPointer($ret, retain: true, release: true); } - /// getObjects:range: - void getObjects( - ffi.Pointer> objects, { - required NSRange range, - }) { + /// localizedStringForCurrencyCode: + NSString? localizedStringForCurrencyCode(NSString currencyCode) { final _$$ref = object$.ref; - _objc_msgSend_o16d3k( + final _$$ref$1 = currencyCode.ref; + objc.checkOsVersionInternal( + 'NSLocale.localizedStringForCurrencyCode:', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_getObjects_range_, - objects, - range, + _sel_localizedStringForCurrencyCode_, + _$$ref$1.pointer, ); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); } - /// indexOfObject:inSortedRange:options:usingComparator: - int indexOfObject$1( - objc.ObjCObject object, { - required NSRange inSortedRange, - required int options, - required objc.ObjCBlock< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ) - > - usingComparator, - }) { + /// localizedStringForLanguageCode: + NSString? localizedStringForLanguageCode(NSString languageCode) { final _$$ref = object$.ref; - final _$$ref$1 = object.ref; - final _$$ref$2 = usingComparator.ref; + final _$$ref$1 = languageCode.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.indexOfObject:inSortedRange:options:usingComparator:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSLocale.localizedStringForLanguageCode:', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), ); - return _objc_msgSend_kshx9d( + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_indexOfObject_inSortedRange_options_usingComparator_, + _sel_localizedStringForLanguageCode_, _$$ref$1.pointer, - inSortedRange, - options, - _$$ref$2.pointer, ); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); } - /// indexOfObjectAtIndexes:options:passingTest: - int indexOfObjectAtIndexes( - NSIndexSet s, { - required int options, - required objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - > - passingTest, - }) { + /// localizedStringForLocaleIdentifier: + NSString localizedStringForLocaleIdentifier(NSString localeIdentifier) { final _$$ref = object$.ref; - final _$$ref$1 = s.ref; - final _$$ref$2 = passingTest.ref; + final _$$ref$1 = localeIdentifier.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.indexOfObjectAtIndexes:options:passingTest:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSLocale.localizedStringForLocaleIdentifier:', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), ); - return _objc_msgSend_k1x6mt( + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_indexOfObjectAtIndexes_options_passingTest_, + _sel_localizedStringForLocaleIdentifier_, _$$ref$1.pointer, - options, - _$$ref$2.pointer, ); + return NSString.fromPointer($ret, retain: true, release: true); } - /// indexOfObjectPassingTest: - int indexOfObjectPassingTest( - objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - > - predicate, - ) { + /// localizedStringForScriptCode: + NSString? localizedStringForScriptCode(NSString scriptCode) { final _$$ref = object$.ref; - final _$$ref$1 = predicate.ref; + final _$$ref$1 = scriptCode.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.indexOfObjectPassingTest:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSLocale.localizedStringForScriptCode:', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), ); - return _objc_msgSend_10mlopr( + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_indexOfObjectPassingTest_, + _sel_localizedStringForScriptCode_, _$$ref$1.pointer, ); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); } - /// indexOfObjectWithOptions:passingTest: - int indexOfObjectWithOptions( - int opts, { - required objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - > - passingTest, - }) { + /// localizedStringForVariantCode: + NSString? localizedStringForVariantCode(NSString variantCode) { final _$$ref = object$.ref; - final _$$ref$1 = passingTest.ref; + final _$$ref$1 = variantCode.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.indexOfObjectWithOptions:passingTest:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSLocale.localizedStringForVariantCode:', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), ); - return _objc_msgSend_1698hqz( + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_indexOfObjectWithOptions_passingTest_, - opts, + _sel_localizedStringForVariantCode_, _$$ref$1.pointer, ); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); } - /// indexesOfObjectsAtIndexes:options:passingTest: - NSIndexSet indexesOfObjectsAtIndexes( - NSIndexSet s, { - required int options, - required objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - > - passingTest, - }) { + /// quotationBeginDelimiter + NSString get quotationBeginDelimiter { final _$$ref = object$.ref; - final _$$ref$1 = s.ref; - final _$$ref$2 = passingTest.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.indexesOfObjectsAtIndexes:options:passingTest:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSLocale.quotationBeginDelimiter', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), ); - final $ret = _objc_msgSend_1i9v144( + final $ret = _objc_msgSend_151sglz( _$$ref.pointer, - _sel_indexesOfObjectsAtIndexes_options_passingTest_, - _$$ref$1.pointer, - options, - _$$ref$2.pointer, + _sel_quotationBeginDelimiter, ); - return NSIndexSet.fromPointer($ret, retain: true, release: true); + return NSString.fromPointer($ret, retain: true, release: true); } - /// indexesOfObjectsPassingTest: - NSIndexSet indexesOfObjectsPassingTest( - objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - > - predicate, - ) { + /// quotationEndDelimiter + NSString get quotationEndDelimiter { final _$$ref = object$.ref; - final _$$ref$1 = predicate.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.indexesOfObjectsPassingTest:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSLocale.quotationEndDelimiter', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), ); - final $ret = _objc_msgSend_nnxkei( + final $ret = _objc_msgSend_151sglz( _$$ref.pointer, - _sel_indexesOfObjectsPassingTest_, - _$$ref$1.pointer, + _sel_quotationEndDelimiter, ); - return NSIndexSet.fromPointer($ret, retain: true, release: true); + return NSString.fromPointer($ret, retain: true, release: true); } - /// indexesOfObjectsWithOptions:passingTest: - NSIndexSet indexesOfObjectsWithOptions( - int opts, { - required objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - > - passingTest, - }) { + /// regionCode + NSString? get regionCode { final _$$ref = object$.ref; - final _$$ref$1 = passingTest.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.indexesOfObjectsWithOptions:passingTest:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_13x5boi( - _$$ref.pointer, - _sel_indexesOfObjectsWithOptions_passingTest_, - opts, - _$$ref$1.pointer, + 'NSLocale.regionCode', + iOS: (false, (17, 0, 0)), + macOS: (false, (14, 0, 0)), ); - return NSIndexSet.fromPointer($ret, retain: true, release: true); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_regionCode); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); } - /// intersectsOrderedSet: - bool intersectsOrderedSet(NSOrderedSet other) { + /// scriptCode + NSString? get scriptCode { final _$$ref = object$.ref; - final _$$ref$1 = other.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.intersectsOrderedSet:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSLocale.scriptCode', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), ); - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_intersectsOrderedSet_, - _$$ref$1.pointer, + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_scriptCode); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); + } + + /// usesMetricSystem + bool get usesMetricSystem { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSLocale.usesMetricSystem', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), ); + return _objc_msgSend_91o635(_$$ref.pointer, _sel_usesMetricSystem); } - /// intersectsSet: - bool intersectsSet(NSSet set) { + /// variantCode + NSString? get variantCode { final _$$ref = object$.ref; - final _$$ref$1 = set.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.intersectsSet:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSLocale.variantCode', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), ); - return _objc_msgSend_19nvye5( + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_variantCode); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); + } +} + +/// NSExtendedMutableArray +extension NSExtendedMutableArray on NSMutableArray { + /// addObjectsFromArray: + void addObjectsFromArray(NSArray otherArray) { + final _$$ref = object$.ref; + final _$$ref$1 = otherArray.ref; + _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_intersectsSet_, + _sel_addObjectsFromArray_, _$$ref$1.pointer, ); } - /// isEqualToOrderedSet: - bool isEqualToOrderedSet(NSOrderedSet other) { + /// exchangeObjectAtIndex:withObjectAtIndex: + void exchangeObjectAtIndex(int idx1, {required int withObjectAtIndex}) { final _$$ref = object$.ref; - final _$$ref$1 = other.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.isEqualToOrderedSet:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + _objc_msgSend_bfp043( + _$$ref.pointer, + _sel_exchangeObjectAtIndex_withObjectAtIndex_, + idx1, + withObjectAtIndex, ); - return _objc_msgSend_19nvye5( + } + + /// insertObjects:atIndexes: + void insertObjects(NSArray objects, {required NSIndexSet atIndexes}) { + final _$$ref = object$.ref; + final _$$ref$1 = objects.ref; + final _$$ref$2 = atIndexes.ref; + _objc_msgSend_pfv6jd( _$$ref.pointer, - _sel_isEqualToOrderedSet_, + _sel_insertObjects_atIndexes_, _$$ref$1.pointer, + _$$ref$2.pointer, ); } - /// isSubsetOfOrderedSet: - bool isSubsetOfOrderedSet(NSOrderedSet other) { + /// removeAllObjects + void removeAllObjects() { final _$$ref = object$.ref; - final _$$ref$1 = other.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.isSubsetOfOrderedSet:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - return _objc_msgSend_19nvye5( + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_removeAllObjects); + } + + /// removeObject: + void removeObject(objc.ObjCObject anObject) { + final _$$ref = object$.ref; + final _$$ref$1 = anObject.ref; + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_removeObject_, _$$ref$1.pointer); + } + + /// removeObject:inRange: + void removeObject$1(objc.ObjCObject anObject, {required NSRange inRange}) { + final _$$ref = object$.ref; + final _$$ref$1 = anObject.ref; + _objc_msgSend_1oteutl( _$$ref.pointer, - _sel_isSubsetOfOrderedSet_, + _sel_removeObject_inRange_, _$$ref$1.pointer, + inRange, ); } - /// isSubsetOfSet: - bool isSubsetOfSet(NSSet set) { + /// removeObjectIdenticalTo: + void removeObjectIdenticalTo(objc.ObjCObject anObject) { final _$$ref = object$.ref; - final _$$ref$1 = set.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.isSubsetOfSet:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + final _$$ref$1 = anObject.ref; + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_removeObjectIdenticalTo_, + _$$ref$1.pointer, ); - return _objc_msgSend_19nvye5( + } + + /// removeObjectIdenticalTo:inRange: + void removeObjectIdenticalTo$1( + objc.ObjCObject anObject, { + required NSRange inRange, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = anObject.ref; + _objc_msgSend_1oteutl( _$$ref.pointer, - _sel_isSubsetOfSet_, + _sel_removeObjectIdenticalTo_inRange_, _$$ref$1.pointer, + inRange, ); } - /// lastObject - objc.ObjCObject? get lastObject { + /// removeObjectsAtIndexes: + void removeObjectsAtIndexes(NSIndexSet indexes) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.lastObject', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + final _$$ref$1 = indexes.ref; + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_removeObjectsAtIndexes_, + _$$ref$1.pointer, ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_lastObject); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); } - /// objectAtIndexedSubscript: - objc.ObjCObject objectAtIndexedSubscript(int idx) { + /// removeObjectsFromIndices:numIndices: + @Deprecated('Not supported') + void removeObjectsFromIndices( + ffi.Pointer indices, { + required int numIndices, + }) { final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.objectAtIndexedSubscript:', - iOS: (false, (6, 0, 0)), - macOS: (false, (10, 8, 0)), + 'NSMutableArray.removeObjectsFromIndices:numIndices:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - final $ret = _objc_msgSend_14hpxwa( + _objc_msgSend_swohtd( _$$ref.pointer, - _sel_objectAtIndexedSubscript_, - idx, + _sel_removeObjectsFromIndices_numIndices_, + indices, + numIndices, ); - return objc.ObjCObject($ret, retain: true, release: true); } - /// objectEnumerator - NSEnumerator objectEnumerator() { + /// removeObjectsInArray: + void removeObjectsInArray(NSArray otherArray) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.objectEnumerator', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + final _$$ref$1 = otherArray.ref; + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_removeObjectsInArray_, + _$$ref$1.pointer, ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_objectEnumerator); - return NSEnumerator.fromPointer($ret, retain: true, release: true); } - /// objectsAtIndexes: - NSArray objectsAtIndexes(NSIndexSet indexes) { + /// removeObjectsInRange: + void removeObjectsInRange(NSRange range) { + final _$$ref = object$.ref; + _objc_msgSend_1e3pm0z(_$$ref.pointer, _sel_removeObjectsInRange_, range); + } + + /// replaceObjectsAtIndexes:withObjects: + void replaceObjectsAtIndexes( + NSIndexSet indexes, { + required NSArray withObjects, + }) { final _$$ref = object$.ref; final _$$ref$1 = indexes.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.objectsAtIndexes:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( + final _$$ref$2 = withObjects.ref; + _objc_msgSend_pfv6jd( _$$ref.pointer, - _sel_objectsAtIndexes_, + _sel_replaceObjectsAtIndexes_withObjects_, _$$ref$1.pointer, + _$$ref$2.pointer, ); - return NSArray.fromPointer($ret, retain: true, release: true); } - /// reverseObjectEnumerator - NSEnumerator reverseObjectEnumerator() { + /// replaceObjectsInRange:withObjectsFromArray: + void replaceObjectsInRange( + NSRange range, { + required NSArray withObjectsFromArray, + }) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.reverseObjectEnumerator', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_151sglz( + final _$$ref$1 = withObjectsFromArray.ref; + _objc_msgSend_1tv4uax( _$$ref.pointer, - _sel_reverseObjectEnumerator, + _sel_replaceObjectsInRange_withObjectsFromArray_, + range, + _$$ref$1.pointer, ); - return NSEnumerator.fromPointer($ret, retain: true, release: true); } - /// reversedOrderedSet - NSOrderedSet get reversedOrderedSet { + /// replaceObjectsInRange:withObjectsFromArray:range: + void replaceObjectsInRange$1( + NSRange range, { + required NSArray withObjectsFromArray, + required NSRange range$1, + }) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.reversedOrderedSet', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + final _$$ref$1 = withObjectsFromArray.ref; + _objc_msgSend_15bolr3( + _$$ref.pointer, + _sel_replaceObjectsInRange_withObjectsFromArray_range_, + range, + _$$ref$1.pointer, + range$1, ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_reversedOrderedSet); - return NSOrderedSet.fromPointer($ret, retain: true, release: true); } - /// set - NSSet get set { + /// setArray: + void setArray(NSArray otherArray) { + final _$$ref = object$.ref; + final _$$ref$1 = otherArray.ref; + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_setArray_, _$$ref$1.pointer); + } + + /// setObject:atIndexedSubscript: + void setObject(objc.ObjCObject obj, {required int atIndexedSubscript}) { final _$$ref = object$.ref; + final _$$ref$1 = obj.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.set', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSMutableArray.setObject:atIndexedSubscript:', + iOS: (false, (6, 0, 0)), + macOS: (false, (10, 8, 0)), + ); + _objc_msgSend_djsa9o( + _$$ref.pointer, + _sel_setObject_atIndexedSubscript_, + _$$ref$1.pointer, + atIndexedSubscript, ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_set); - return NSSet.fromPointer($ret, retain: true, release: true); } - /// sortedArrayUsingComparator: - NSArray sortedArrayUsingComparator( + /// sortUsingComparator: + void sortUsingComparator( objc.ObjCBlock< ffi.Long Function( ffi.Pointer, @@ -8633,20 +10551,48 @@ extension NSExtendedOrderedSet on NSOrderedSet { final _$$ref = object$.ref; final _$$ref$1 = cmptr.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.sortedArrayUsingComparator:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSMutableArray.sortUsingComparator:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - final $ret = _objc_msgSend_nnxkei( + _objc_msgSend_f167m6( _$$ref.pointer, - _sel_sortedArrayUsingComparator_, + _sel_sortUsingComparator_, _$$ref$1.pointer, ); - return NSArray.fromPointer($ret, retain: true, release: true); } - /// sortedArrayWithOptions:usingComparator: - NSArray sortedArrayWithOptions( + /// sortUsingFunction:context: + void sortUsingFunction( + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + > + compare, { + required ffi.Pointer context, + }) { + final _$$ref = object$.ref; + _objc_msgSend_1bvics1( + _$$ref.pointer, + _sel_sortUsingFunction_context_, + compare, + context, + ); + } + + /// sortUsingSelector: + void sortUsingSelector(ffi.Pointer comparator) { + final _$$ref = object$.ref; + _objc_msgSend_1d9e4oe(_$$ref.pointer, _sel_sortUsingSelector_, comparator); + } + + /// sortWithOptions:usingComparator: + void sortWithOptions( int opts, { required objc.ObjCBlock< ffi.Long Function( @@ -8659,2334 +10605,5373 @@ extension NSExtendedOrderedSet on NSOrderedSet { final _$$ref = object$.ref; final _$$ref$1 = usingComparator.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.sortedArrayWithOptions:usingComparator:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSMutableArray.sortWithOptions:usingComparator:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - final $ret = _objc_msgSend_1x5ew3h( + _objc_msgSend_jjgvjt( _$$ref.pointer, - _sel_sortedArrayWithOptions_usingComparator_, + _sel_sortWithOptions_usingComparator_, opts, _$$ref$1.pointer, ); - return NSArray.fromPointer($ret, retain: true, release: true); } } -/// NSExtendedSet -extension NSExtendedSet on NSSet { - /// allObjects - NSArray get allObjects { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_allObjects); - return NSArray.fromPointer($ret, retain: true, release: true); - } - - /// anyObject - objc.ObjCObject? anyObject() { +/// NSExtendedMutableData +extension NSExtendedMutableData on NSMutableData { + /// appendBytes:length: + void appendBytes(ffi.Pointer bytes, {required int length}) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_anyObject); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); + _objc_msgSend_zuf90e( + _$$ref.pointer, + _sel_appendBytes_length_, + bytes, + length, + ); } - /// containsObject: - bool containsObject(objc.ObjCObject anObject) { + /// appendData: + void appendData(NSData other) { final _$$ref = object$.ref; - final _$$ref$1 = anObject.ref; - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_containsObject_, - _$$ref$1.pointer, - ); + final _$$ref$1 = other.ref; + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_appendData_, _$$ref$1.pointer); } - /// description - NSString get description$1 { + /// increaseLengthBy: + void increaseLengthBy(int extraLength) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_description); - return NSString.fromPointer($ret, retain: true, release: true); + _objc_msgSend_1i9r4xy(_$$ref.pointer, _sel_increaseLengthBy_, extraLength); } - /// descriptionWithLocale: - NSString descriptionWithLocale(objc.ObjCObject? locale) { + /// replaceBytesInRange:withBytes: + void replaceBytesInRange( + NSRange range, { + required ffi.Pointer withBytes, + }) { final _$$ref = object$.ref; - final _$$ref$1 = locale?.ref; - final $ret = _objc_msgSend_1sotr3r( + _objc_msgSend_eh32gn( _$$ref.pointer, - _sel_descriptionWithLocale_, - _$$ref$1?.pointer ?? ffi.nullptr, + _sel_replaceBytesInRange_withBytes_, + range, + withBytes, ); - return NSString.fromPointer($ret, retain: true, release: true); } - /// enumerateObjectsUsingBlock: - void enumerateObjectsUsingBlock( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.Pointer) - > - block, - ) { + /// replaceBytesInRange:withBytes:length: + void replaceBytesInRange$1( + NSRange range, { + required ffi.Pointer withBytes, + required int length, + }) { final _$$ref = object$.ref; - final _$$ref$1 = block.ref; - objc.checkOsVersionInternal( - 'NSSet.enumerateObjectsUsingBlock:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + _objc_msgSend_c0vg4w( + _$$ref.pointer, + _sel_replaceBytesInRange_withBytes_length_, + range, + withBytes, + length, ); - _objc_msgSend_f167m6( + } + + /// resetBytesInRange: + void resetBytesInRange(NSRange range) { + final _$$ref = object$.ref; + _objc_msgSend_1e3pm0z(_$$ref.pointer, _sel_resetBytesInRange_, range); + } + + /// setData: + void setData(NSData data) { + final _$$ref = object$.ref; + final _$$ref$1 = data.ref; + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_setData_, _$$ref$1.pointer); + } +} + +/// NSExtendedMutableDictionary +extension NSExtendedMutableDictionary on NSMutableDictionary { + /// addEntriesFromDictionary: + void addEntriesFromDictionary(NSDictionary otherDictionary) { + final _$$ref = object$.ref; + final _$$ref$1 = otherDictionary.ref; + _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_enumerateObjectsUsingBlock_, + _sel_addEntriesFromDictionary_, _$$ref$1.pointer, ); } - /// enumerateObjectsWithOptions:usingBlock: - void enumerateObjectsWithOptions( - int opts, { - required objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.Pointer) - > - usingBlock, + /// removeAllObjects + void removeAllObjects() { + final _$$ref = object$.ref; + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_removeAllObjects); + } + + /// removeObjectsForKeys: + void removeObjectsForKeys(NSArray keyArray) { + final _$$ref = object$.ref; + final _$$ref$1 = keyArray.ref; + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_removeObjectsForKeys_, + _$$ref$1.pointer, + ); + } + + /// setDictionary: + void setDictionary(NSDictionary otherDictionary) { + final _$$ref = object$.ref; + final _$$ref$1 = otherDictionary.ref; + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_setDictionary_, _$$ref$1.pointer); + } + + /// setObject:forKeyedSubscript: + void setObject$1( + objc.ObjCObject? obj, { + required NSCopying forKeyedSubscript, }) { final _$$ref = object$.ref; - final _$$ref$1 = usingBlock.ref; + final _$$ref$1 = obj?.ref; + final _$$ref$2 = forKeyedSubscript.ref; objc.checkOsVersionInternal( - 'NSSet.enumerateObjectsWithOptions:usingBlock:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSMutableDictionary.setObject:forKeyedSubscript:', + iOS: (false, (6, 0, 0)), + macOS: (false, (10, 8, 0)), ); - _objc_msgSend_yx8yc6( + _objc_msgSend_pfv6jd( _$$ref.pointer, - _sel_enumerateObjectsWithOptions_usingBlock_, - opts, - _$$ref$1.pointer, + _sel_setObject_forKeyedSubscript_, + _$$ref$1?.pointer ?? ffi.nullptr, + _$$ref$2.pointer, ); } +} - /// intersectsSet: - bool intersectsSet(NSSet otherSet) { +/// NSExtendedMutableOrderedSet +extension NSExtendedMutableOrderedSet on NSMutableOrderedSet { + /// addObject: + void addObject(objc.ObjCObject object) { final _$$ref = object$.ref; - final _$$ref$1 = otherSet.ref; - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_intersectsSet_, - _$$ref$1.pointer, + final _$$ref$1 = object.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.addObject:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_addObject_, _$$ref$1.pointer); } - /// isEqualToSet: - bool isEqualToSet(NSSet otherSet) { + /// addObjects:count: + void addObjects( + ffi.Pointer> objects, { + required int count, + }) { final _$$ref = object$.ref; - final _$$ref$1 = otherSet.ref; - return _objc_msgSend_19nvye5( + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.addObjects:count:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_gcjqkl( _$$ref.pointer, - _sel_isEqualToSet_, - _$$ref$1.pointer, + _sel_addObjects_count_, + objects, + count, ); } - /// isSubsetOfSet: - bool isSubsetOfSet(NSSet otherSet) { + /// addObjectsFromArray: + void addObjectsFromArray(NSArray array) { final _$$ref = object$.ref; - final _$$ref$1 = otherSet.ref; - return _objc_msgSend_19nvye5( + final _$$ref$1 = array.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.addObjectsFromArray:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_isSubsetOfSet_, + _sel_addObjectsFromArray_, _$$ref$1.pointer, ); } - /// makeObjectsPerformSelector: - void makeObjectsPerformSelector(ffi.Pointer aSelector) { + /// exchangeObjectAtIndex:withObjectAtIndex: + void exchangeObjectAtIndex(int idx1, {required int withObjectAtIndex}) { final _$$ref = object$.ref; - _objc_msgSend_1d9e4oe( + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.exchangeObjectAtIndex:withObjectAtIndex:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_bfp043( _$$ref.pointer, - _sel_makeObjectsPerformSelector_, - aSelector, + _sel_exchangeObjectAtIndex_withObjectAtIndex_, + idx1, + withObjectAtIndex, ); } - /// makeObjectsPerformSelector:withObject: - void makeObjectsPerformSelector$1( - ffi.Pointer aSelector, { - objc.ObjCObject? withObject, - }) { + /// insertObjects:atIndexes: + void insertObjects(NSArray objects, {required NSIndexSet atIndexes}) { final _$$ref = object$.ref; - final _$$ref$1 = withObject?.ref; - _objc_msgSend_1qv0eq4( + final _$$ref$1 = objects.ref; + final _$$ref$2 = atIndexes.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.insertObjects:atIndexes:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_pfv6jd( _$$ref.pointer, - _sel_makeObjectsPerformSelector_withObject_, - aSelector, - _$$ref$1?.pointer ?? ffi.nullptr, + _sel_insertObjects_atIndexes_, + _$$ref$1.pointer, + _$$ref$2.pointer, ); } - /// objectsPassingTest: - NSSet objectsPassingTest( - objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, ffi.Pointer) - > - predicate, - ) { + /// intersectOrderedSet: + void intersectOrderedSet(NSOrderedSet other) { final _$$ref = object$.ref; - final _$$ref$1 = predicate.ref; + final _$$ref$1 = other.ref; objc.checkOsVersionInternal( - 'NSSet.objectsPassingTest:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSMutableOrderedSet.intersectOrderedSet:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_nnxkei( + _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_objectsPassingTest_, + _sel_intersectOrderedSet_, _$$ref$1.pointer, ); - return NSSet.fromPointer($ret, retain: true, release: true); } - /// objectsWithOptions:passingTest: - NSSet objectsWithOptions( - int opts, { - required objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, ffi.Pointer) - > - passingTest, - }) { + /// intersectSet: + void intersectSet(NSSet other) { final _$$ref = object$.ref; - final _$$ref$1 = passingTest.ref; + final _$$ref$1 = other.ref; objc.checkOsVersionInternal( - 'NSSet.objectsWithOptions:passingTest:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSMutableOrderedSet.intersectSet:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_13x5boi( + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_intersectSet_, _$$ref$1.pointer); + } + + /// minusOrderedSet: + void minusOrderedSet(NSOrderedSet other) { + final _$$ref = object$.ref; + final _$$ref$1 = other.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.minusOrderedSet:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_objectsWithOptions_passingTest_, - opts, + _sel_minusOrderedSet_, _$$ref$1.pointer, ); - return NSSet.fromPointer($ret, retain: true, release: true); } - /// setByAddingObject: - NSSet setByAddingObject(objc.ObjCObject anObject) { + /// minusSet: + void minusSet(NSSet other) { final _$$ref = object$.ref; - final _$$ref$1 = anObject.ref; + final _$$ref$1 = other.ref; objc.checkOsVersionInternal( - 'NSSet.setByAddingObject:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), + 'NSMutableOrderedSet.minusSet:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_1sotr3r( + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_minusSet_, _$$ref$1.pointer); + } + + /// moveObjectsAtIndexes:toIndex: + void moveObjectsAtIndexes(NSIndexSet indexes, {required int toIndex}) { + final _$$ref = object$.ref; + final _$$ref$1 = indexes.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.moveObjectsAtIndexes:toIndex:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_djsa9o( _$$ref.pointer, - _sel_setByAddingObject_, + _sel_moveObjectsAtIndexes_toIndex_, _$$ref$1.pointer, + toIndex, ); - return NSSet.fromPointer($ret, retain: true, release: true); } - /// setByAddingObjectsFromArray: - NSSet setByAddingObjectsFromArray(NSArray other) { + /// removeAllObjects + void removeAllObjects() { final _$$ref = object$.ref; - final _$$ref$1 = other.ref; objc.checkOsVersionInternal( - 'NSSet.setByAddingObjectsFromArray:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), + 'NSMutableOrderedSet.removeAllObjects', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_1sotr3r( + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_removeAllObjects); + } + + /// removeObject: + void removeObject(objc.ObjCObject object) { + final _$$ref = object$.ref; + final _$$ref$1 = object.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.removeObject:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_removeObject_, _$$ref$1.pointer); + } + + /// removeObjectsAtIndexes: + void removeObjectsAtIndexes(NSIndexSet indexes) { + final _$$ref = object$.ref; + final _$$ref$1 = indexes.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.removeObjectsAtIndexes:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_setByAddingObjectsFromArray_, + _sel_removeObjectsAtIndexes_, _$$ref$1.pointer, ); - return NSSet.fromPointer($ret, retain: true, release: true); } - /// setByAddingObjectsFromSet: - NSSet setByAddingObjectsFromSet(NSSet other) { + /// removeObjectsInArray: + void removeObjectsInArray(NSArray array) { final _$$ref = object$.ref; - final _$$ref$1 = other.ref; + final _$$ref$1 = array.ref; objc.checkOsVersionInternal( - 'NSSet.setByAddingObjectsFromSet:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), + 'NSMutableOrderedSet.removeObjectsInArray:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_1sotr3r( + _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_setByAddingObjectsFromSet_, + _sel_removeObjectsInArray_, _$$ref$1.pointer, ); - return NSSet.fromPointer($ret, retain: true, release: true); } -} - -/// NSFastEnumeration -extension type NSFastEnumeration._(objc.ObjCProtocol object$) - implements objc.ObjCProtocol { - /// Constructs a [NSFastEnumeration] that points to the same underlying object as [other]. - NSFastEnumeration.as(objc.ObjCObject other) : object$ = other; - /// Constructs a [NSFastEnumeration] that wraps the given raw object pointer. - NSFastEnumeration.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); + /// removeObjectsInRange: + void removeObjectsInRange(NSRange range) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.removeObjectsInRange:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_1e3pm0z(_$$ref.pointer, _sel_removeObjectsInRange_, range); + } - /// Returns whether [obj] is an instance of [NSFastEnumeration]. - static bool conformsTo(objc.ObjCObject obj) { - return _objc_msgSend_e3qsqz( - obj.ref.pointer, - _sel_conformsToProtocol_, - _protocol_NSFastEnumeration, + /// replaceObjectsAtIndexes:withObjects: + void replaceObjectsAtIndexes( + NSIndexSet indexes, { + required NSArray withObjects, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = indexes.ref; + final _$$ref$2 = withObjects.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.replaceObjectsAtIndexes:withObjects:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_pfv6jd( + _$$ref.pointer, + _sel_replaceObjectsAtIndexes_withObjects_, + _$$ref$1.pointer, + _$$ref$2.pointer, ); } -} -extension NSFastEnumeration$Methods on NSFastEnumeration { - /// countByEnumeratingWithState:objects:count: - int countByEnumeratingWithState( - ffi.Pointer state, { - required ffi.Pointer> objects, + /// replaceObjectsInRange:withObjects:count: + void replaceObjectsInRange( + NSRange range, { + required ffi.Pointer> withObjects, required int count, }) { - final _$$ref$3 = object$.ref; - return _objc_msgSend_1b5ysjl( - _$$ref$3.pointer, - _sel_countByEnumeratingWithState_objects_count_, - state, - objects, + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.replaceObjectsInRange:withObjects:count:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_122v0cv( + _$$ref.pointer, + _sel_replaceObjectsInRange_withObjects_count_, + range, + withObjects, count, ); } -} -interface class NSFastEnumeration$Builder { - /// Returns the [objc.Protocol] object for this protocol. - static objc.Protocol get $protocol => - objc.Protocol.fromPointer(_protocol_NSFastEnumeration.cast()); + /// setObject:atIndex: + void setObject(objc.ObjCObject obj, {required int atIndex}) { + final _$$ref = object$.ref; + final _$$ref$1 = obj.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.setObject:atIndex:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_djsa9o( + _$$ref.pointer, + _sel_setObject_atIndex_, + _$$ref$1.pointer, + atIndex, + ); + } - /// Builds an object that implements the NSFastEnumeration protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - /// - /// If `$keepIsolateAlive` is true, this protocol will keep this isolate - /// alive until it is garbage collected by both Dart and ObjC. - static NSFastEnumeration implement({ - required int Function( - ffi.Pointer, - ffi.Pointer>, - int, - ) - countByEnumeratingWithState_objects_count_, - bool $keepIsolateAlive = true, - }) { - final builder = objc.ObjCProtocolBuilder(debugName: 'NSFastEnumeration'); - NSFastEnumeration$Builder.countByEnumeratingWithState_objects_count_ - .implement(builder, countByEnumeratingWithState_objects_count_); - builder.addProtocol($protocol); - return NSFastEnumeration.as( - builder.build(keepIsolateAlive: $keepIsolateAlive), + /// setObject:atIndexedSubscript: + void setObject$1(objc.ObjCObject obj, {required int atIndexedSubscript}) { + final _$$ref = object$.ref; + final _$$ref$1 = obj.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.setObject:atIndexedSubscript:', + iOS: (false, (6, 0, 0)), + macOS: (false, (10, 8, 0)), + ); + _objc_msgSend_djsa9o( + _$$ref.pointer, + _sel_setObject_atIndexedSubscript_, + _$$ref$1.pointer, + atIndexedSubscript, ); } - /// Adds the implementation of the NSFastEnumeration protocol to an existing - /// [objc.ObjCProtocolBuilder]. - /// - /// Note: You cannot call this method after you have called `builder.build`. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, { - required int Function( - ffi.Pointer, - ffi.Pointer>, - int, - ) - countByEnumeratingWithState_objects_count_, - bool $keepIsolateAlive = true, + /// sortRange:options:usingComparator: + void sortRange( + NSRange range, { + required int options, + required objc.ObjCBlock< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ) + > + usingComparator, }) { - NSFastEnumeration$Builder.countByEnumeratingWithState_objects_count_ - .implement(builder, countByEnumeratingWithState_objects_count_); - builder.addProtocol($protocol); + final _$$ref = object$.ref; + final _$$ref$1 = usingComparator.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.sortRange:options:usingComparator:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_arew0j( + _$$ref.pointer, + _sel_sortRange_options_usingComparator_, + range, + options, + _$$ref$1.pointer, + ); } - /// countByEnumeratingWithState:objects:count: - static final countByEnumeratingWithState_objects_count_ = - objc.ObjCProtocolMethod< - int Function( - ffi.Pointer, - ffi.Pointer>, - int, - ) - >( - _protocol_NSFastEnumeration, - _sel_countByEnumeratingWithState_objects_count_, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.UnsignedLong, - ) - > - >(_1wx624s_protocolTrampoline_17ap02x) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSFastEnumeration, - _sel_countByEnumeratingWithState_objects_count_, - isRequired: true, - isInstanceMethod: true, - ), - ( - int Function( - ffi.Pointer, - ffi.Pointer>, - int, - ) - func, - ) => - ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObjectImpl_NSUInteger.fromFunction( - ( - ffi.Pointer _, - ffi.Pointer arg1, - ffi.Pointer> arg2, - int arg3, - ) => func(arg1, arg2, arg3), - ), - ); -} - -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; -} - -sealed class NSFileManagerItemReplacementOptions { - static const NSFileManagerItemReplacementUsingNewMetadataOnly = 1; - static const NSFileManagerItemReplacementWithoutDeletingBackupItem = 2; -} - -enum NSFileManagerResumeSyncBehavior { - NSFileManagerResumeSyncBehaviorPreserveLocalChanges(0), - NSFileManagerResumeSyncBehaviorAfterUploadWithFailOnConflict(1), - NSFileManagerResumeSyncBehaviorDropLocalChanges(2); - - final int value; - const NSFileManagerResumeSyncBehavior(this.value); - - static NSFileManagerResumeSyncBehavior fromValue(int value) => - switch (value) { - 0 => NSFileManagerResumeSyncBehaviorPreserveLocalChanges, - 1 => NSFileManagerResumeSyncBehaviorAfterUploadWithFailOnConflict, - 2 => NSFileManagerResumeSyncBehaviorDropLocalChanges, - _ => throw ArgumentError( - 'Unknown value for NSFileManagerResumeSyncBehavior: $value', - ), - }; -} - -sealed class NSFileManagerUnmountOptions { - static const NSFileManagerUnmountAllPartitionsAndEjectDisk = 1; - static const NSFileManagerUnmountWithoutUI = 2; -} - -enum NSFileManagerUploadLocalVersionConflictPolicy { - NSFileManagerUploadConflictPolicyDefault(0), - NSFileManagerUploadConflictPolicyFailOnConflict(1); - - final int value; - const NSFileManagerUploadLocalVersionConflictPolicy(this.value); - - static NSFileManagerUploadLocalVersionConflictPolicy fromValue( - int value, - ) => switch (value) { - 0 => NSFileManagerUploadConflictPolicyDefault, - 1 => NSFileManagerUploadConflictPolicyFailOnConflict, - _ => throw ArgumentError( - 'Unknown value for NSFileManagerUploadLocalVersionConflictPolicy: $value', - ), - }; -} - -sealed class NSFileVersionAddingOptions { - static const NSFileVersionAddingByMoving = 1; -} - -sealed class NSFileVersionReplacingOptions { - static const NSFileVersionReplacingByMoving = 1; -} - -/// NSIndexSet -extension type NSIndexSet._(objc.ObjCObject object$) - implements - objc.ObjCObject, - NSObject, - NSCopying, - NSMutableCopying, - NSSecureCoding { - /// Constructs a [NSIndexSet] that points to the same underlying object as [other]. - NSIndexSet.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); + /// sortUsingComparator: + void sortUsingComparator( + objc.ObjCBlock< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ) + > + cmptr, + ) { + final _$$ref = object$.ref; + final _$$ref$1 = cmptr.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.sortUsingComparator:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_f167m6( + _$$ref.pointer, + _sel_sortUsingComparator_, + _$$ref$1.pointer, + ); } - /// Constructs a [NSIndexSet] that wraps the given raw object pointer. - NSIndexSet.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); + /// sortWithOptions:usingComparator: + void sortWithOptions( + int opts, { + required objc.ObjCBlock< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ) + > + usingComparator, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = usingComparator.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.sortWithOptions:usingComparator:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_jjgvjt( + _$$ref.pointer, + _sel_sortWithOptions_usingComparator_, + opts, + _$$ref$1.pointer, + ); } - /// Returns whether [obj] is an instance of [NSIndexSet]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSIndexSet, - ); - - /// alloc - static NSIndexSet alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSIndexSet, _sel_alloc); - return NSIndexSet.fromPointer($ret, retain: false, release: true); + /// unionOrderedSet: + void unionOrderedSet(NSOrderedSet other) { + final _$$ref = object$.ref; + final _$$ref$1 = other.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.unionOrderedSet:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_unionOrderedSet_, + _$$ref$1.pointer, + ); } - /// allocWithZone: - static NSIndexSet allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSIndexSet, - _sel_allocWithZone_, - zone, + /// unionSet: + void unionSet(NSSet other) { + final _$$ref = object$.ref; + final _$$ref$1 = other.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.unionSet:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - return NSIndexSet.fromPointer($ret, retain: false, release: true); + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_unionSet_, _$$ref$1.pointer); } +} - /// indexSet - static NSIndexSet indexSet() { - final $ret = _objc_msgSend_151sglz(_class_NSIndexSet, _sel_indexSet); - return NSIndexSet.fromPointer($ret, retain: true, release: true); +/// NSExtendedMutableSet +extension NSExtendedMutableSet on NSMutableSet { + /// addObjectsFromArray: + void addObjectsFromArray(NSArray array) { + final _$$ref = object$.ref; + final _$$ref$1 = array.ref; + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_addObjectsFromArray_, + _$$ref$1.pointer, + ); } - /// indexSetWithIndex: - static NSIndexSet indexSetWithIndex(int value) { - final $ret = _objc_msgSend_14hpxwa( - _class_NSIndexSet, - _sel_indexSetWithIndex_, - value, - ); - return NSIndexSet.fromPointer($ret, retain: true, release: true); + /// intersectSet: + void intersectSet(NSSet otherSet) { + final _$$ref = object$.ref; + final _$$ref$1 = otherSet.ref; + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_intersectSet_, _$$ref$1.pointer); } - /// indexSetWithIndexesInRange: - static NSIndexSet indexSetWithIndexesInRange(NSRange range) { - final $ret = _objc_msgSend_1k1o1s7( - _class_NSIndexSet, - _sel_indexSetWithIndexesInRange_, - range, - ); - return NSIndexSet.fromPointer($ret, retain: true, release: true); + /// minusSet: + void minusSet(NSSet otherSet) { + final _$$ref = object$.ref; + final _$$ref$1 = otherSet.ref; + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_minusSet_, _$$ref$1.pointer); } - /// new - static NSIndexSet new$() { - final $ret = _objc_msgSend_151sglz(_class_NSIndexSet, _sel_new); - return NSIndexSet.fromPointer($ret, retain: false, release: true); + /// removeAllObjects + void removeAllObjects() { + final _$$ref = object$.ref; + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_removeAllObjects); } - /// supportsSecureCoding - static bool getSupportsSecureCoding() { - return _objc_msgSend_91o635(_class_NSIndexSet, _sel_supportsSecureCoding); + /// setSet: + void setSet(NSSet otherSet) { + final _$$ref = object$.ref; + final _$$ref$1 = otherSet.ref; + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_setSet_, _$$ref$1.pointer); } - /// Returns a new instance of NSIndexSet constructed with the default `new` method. - NSIndexSet() : this.as(new$().object$); + /// unionSet: + void unionSet(NSSet otherSet) { + final _$$ref = object$.ref; + final _$$ref$1 = otherSet.ref; + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_unionSet_, _$$ref$1.pointer); + } } -extension NSIndexSet$Methods on NSIndexSet { - /// containsIndex: - bool containsIndex(int value) { +/// NSExtendedOrderedSet +extension NSExtendedOrderedSet on NSOrderedSet { + /// array + NSArray get array { final _$$ref = object$.ref; - return _objc_msgSend_6peh6o(_$$ref.pointer, _sel_containsIndex_, value); + objc.checkOsVersionInternal( + 'NSOrderedSet.array', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_array); + return NSArray.fromPointer($ret, retain: true, release: true); } - /// containsIndexes: - bool containsIndexes(NSIndexSet indexSet) { + /// containsObject: + bool containsObject(objc.ObjCObject object) { final _$$ref = object$.ref; - final _$$ref$1 = indexSet.ref; + final _$$ref$1 = object.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.containsObject:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); return _objc_msgSend_19nvye5( _$$ref.pointer, - _sel_containsIndexes_, + _sel_containsObject_, _$$ref$1.pointer, ); } - /// containsIndexesInRange: - bool containsIndexesInRange(NSRange range) { + /// description + NSString get description$1 { final _$$ref = object$.ref; - return _objc_msgSend_p4nurx( - _$$ref.pointer, - _sel_containsIndexesInRange_, - range, + objc.checkOsVersionInternal( + 'NSOrderedSet.description', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_description); + return NSString.fromPointer($ret, retain: true, release: true); } - /// count - int get count { - final _$$ref = object$.ref; - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_count); - } - - /// countOfIndexesInRange: - int countOfIndexesInRange(NSRange range) { + /// descriptionWithLocale: + NSString descriptionWithLocale(objc.ObjCObject? locale) { final _$$ref = object$.ref; + final _$$ref$1 = locale?.ref; objc.checkOsVersionInternal( - 'NSIndexSet.countOfIndexesInRange:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), + 'NSOrderedSet.descriptionWithLocale:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - return _objc_msgSend_qm9f5w( + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_countOfIndexesInRange_, - range, + _sel_descriptionWithLocale_, + _$$ref$1?.pointer ?? ffi.nullptr, ); + return NSString.fromPointer($ret, retain: true, release: true); } - /// encodeWithCoder: - void encodeWithCoder(NSCoder coder) { - final _$$ref$16 = object$.ref; - final _$$ref$17 = coder.ref; - _objc_msgSend_xtuoz7( - _$$ref$16.pointer, - _sel_encodeWithCoder_, - _$$ref$17.pointer, + /// descriptionWithLocale:indent: + NSString descriptionWithLocale$1( + objc.ObjCObject? locale, { + required int indent, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = locale?.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.descriptionWithLocale:indent:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + final $ret = _objc_msgSend_1k4kd9s( + _$$ref.pointer, + _sel_descriptionWithLocale_indent_, + _$$ref$1?.pointer ?? ffi.nullptr, + indent, ); + return NSString.fromPointer($ret, retain: true, release: true); } - /// enumerateIndexesInRange:options:usingBlock: - void enumerateIndexesInRange( - NSRange range, { + /// enumerateObjectsAtIndexes:options:usingBlock: + void enumerateObjectsAtIndexes( + NSIndexSet s, { required int options, required objc.ObjCBlock< - ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Void Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) > usingBlock, }) { final _$$ref = object$.ref; - final _$$ref$1 = usingBlock.ref; + final _$$ref$1 = s.ref; + final _$$ref$2 = usingBlock.ref; objc.checkOsVersionInternal( - 'NSIndexSet.enumerateIndexesInRange:options:usingBlock:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSOrderedSet.enumerateObjectsAtIndexes:options:usingBlock:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - _objc_msgSend_177cajs( + _objc_msgSend_a3wp08( _$$ref.pointer, - _sel_enumerateIndexesInRange_options_usingBlock_, - range, - options, + _sel_enumerateObjectsAtIndexes_options_usingBlock_, _$$ref$1.pointer, + options, + _$$ref$2.pointer, ); } - /// enumerateIndexesUsingBlock: - void enumerateIndexesUsingBlock( - objc.ObjCBlock)> + /// enumerateObjectsUsingBlock: + void enumerateObjectsUsingBlock( + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) + > block, ) { final _$$ref = object$.ref; final _$$ref$1 = block.ref; objc.checkOsVersionInternal( - 'NSIndexSet.enumerateIndexesUsingBlock:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSOrderedSet.enumerateObjectsUsingBlock:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); _objc_msgSend_f167m6( _$$ref.pointer, - _sel_enumerateIndexesUsingBlock_, + _sel_enumerateObjectsUsingBlock_, _$$ref$1.pointer, ); } - /// enumerateIndexesWithOptions:usingBlock: - void enumerateIndexesWithOptions( + /// enumerateObjectsWithOptions:usingBlock: + void enumerateObjectsWithOptions( int opts, { required objc.ObjCBlock< - ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Void Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) > usingBlock, }) { final _$$ref = object$.ref; final _$$ref$1 = usingBlock.ref; objc.checkOsVersionInternal( - 'NSIndexSet.enumerateIndexesWithOptions:usingBlock:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSOrderedSet.enumerateObjectsWithOptions:usingBlock:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); _objc_msgSend_yx8yc6( _$$ref.pointer, - _sel_enumerateIndexesWithOptions_usingBlock_, + _sel_enumerateObjectsWithOptions_usingBlock_, opts, _$$ref$1.pointer, ); } - /// enumerateRangesInRange:options:usingBlock: - void enumerateRangesInRange( - NSRange range, { - required int options, - required objc.ObjCBlock)> - usingBlock, - }) { + /// firstObject + objc.ObjCObject? get firstObject { final _$$ref = object$.ref; - final _$$ref$1 = usingBlock.ref; objc.checkOsVersionInternal( - 'NSIndexSet.enumerateRangesInRange:options:usingBlock:', + 'NSOrderedSet.firstObject', iOS: (false, (5, 0, 0)), macOS: (false, (10, 7, 0)), ); - _objc_msgSend_177cajs( + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_firstObject); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } + + /// getObjects:range: + void getObjects( + ffi.Pointer> objects, { + required NSRange range, + }) { + final _$$ref = object$.ref; + _objc_msgSend_o16d3k( _$$ref.pointer, - _sel_enumerateRangesInRange_options_usingBlock_, + _sel_getObjects_range_, + objects, range, - options, - _$$ref$1.pointer, ); } - /// enumerateRangesUsingBlock: - void enumerateRangesUsingBlock( - objc.ObjCBlock)> block, - ) { + /// indexOfObject:inSortedRange:options:usingComparator: + int indexOfObject$1( + objc.ObjCObject object, { + required NSRange inSortedRange, + required int options, + required objc.ObjCBlock< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ) + > + usingComparator, + }) { final _$$ref = object$.ref; - final _$$ref$1 = block.ref; + final _$$ref$1 = object.ref; + final _$$ref$2 = usingComparator.ref; objc.checkOsVersionInternal( - 'NSIndexSet.enumerateRangesUsingBlock:', + 'NSOrderedSet.indexOfObject:inSortedRange:options:usingComparator:', iOS: (false, (5, 0, 0)), macOS: (false, (10, 7, 0)), ); - _objc_msgSend_f167m6( + return _objc_msgSend_kshx9d( _$$ref.pointer, - _sel_enumerateRangesUsingBlock_, + _sel_indexOfObject_inSortedRange_options_usingComparator_, _$$ref$1.pointer, + inSortedRange, + options, + _$$ref$2.pointer, ); } - /// enumerateRangesWithOptions:usingBlock: - void enumerateRangesWithOptions( - int opts, { - required objc.ObjCBlock)> - usingBlock, + /// indexOfObjectAtIndexes:options:passingTest: + int indexOfObjectAtIndexes( + NSIndexSet s, { + required int options, + required objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) + > + passingTest, }) { final _$$ref = object$.ref; - final _$$ref$1 = usingBlock.ref; + final _$$ref$1 = s.ref; + final _$$ref$2 = passingTest.ref; objc.checkOsVersionInternal( - 'NSIndexSet.enumerateRangesWithOptions:usingBlock:', + 'NSOrderedSet.indexOfObjectAtIndexes:options:passingTest:', iOS: (false, (5, 0, 0)), macOS: (false, (10, 7, 0)), ); - _objc_msgSend_yx8yc6( + return _objc_msgSend_k1x6mt( _$$ref.pointer, - _sel_enumerateRangesWithOptions_usingBlock_, - opts, + _sel_indexOfObjectAtIndexes_options_passingTest_, _$$ref$1.pointer, + options, + _$$ref$2.pointer, ); } - /// firstIndex - int get firstIndex { - final _$$ref = object$.ref; - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_firstIndex); - } - - /// getIndexes:maxCount:inIndexRange: - int getIndexes( - ffi.Pointer indexBuffer, { - required int maxCount, - required ffi.Pointer inIndexRange, - }) { - final _$$ref = object$.ref; - return _objc_msgSend_89xgla( - _$$ref.pointer, - _sel_getIndexes_maxCount_inIndexRange_, - indexBuffer, - maxCount, - inIndexRange, - ); - } - - /// indexGreaterThanIndex: - int indexGreaterThanIndex(int value) { + /// indexOfObjectPassingTest: + int indexOfObjectPassingTest( + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) + > + predicate, + ) { final _$$ref = object$.ref; - return _objc_msgSend_12py2ux( - _$$ref.pointer, - _sel_indexGreaterThanIndex_, - value, + final _$$ref$1 = predicate.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.indexOfObjectPassingTest:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - } - - /// indexGreaterThanOrEqualToIndex: - int indexGreaterThanOrEqualToIndex(int value) { - final _$$ref = object$.ref; - return _objc_msgSend_12py2ux( + return _objc_msgSend_10mlopr( _$$ref.pointer, - _sel_indexGreaterThanOrEqualToIndex_, - value, + _sel_indexOfObjectPassingTest_, + _$$ref$1.pointer, ); } - /// indexInRange:options:passingTest: - int indexInRange( - NSRange range, { - required int options, + /// indexOfObjectWithOptions:passingTest: + int indexOfObjectWithOptions( + int opts, { required objc.ObjCBlock< - ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Bool Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) > passingTest, }) { final _$$ref = object$.ref; final _$$ref$1 = passingTest.ref; objc.checkOsVersionInternal( - 'NSIndexSet.indexInRange:options:passingTest:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSOrderedSet.indexOfObjectWithOptions:passingTest:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - return _objc_msgSend_6jmuyz( + return _objc_msgSend_1698hqz( _$$ref.pointer, - _sel_indexInRange_options_passingTest_, - range, - options, + _sel_indexOfObjectWithOptions_passingTest_, + opts, _$$ref$1.pointer, ); } - /// indexLessThanIndex: - int indexLessThanIndex(int value) { + /// indexesOfObjectsAtIndexes:options:passingTest: + NSIndexSet indexesOfObjectsAtIndexes( + NSIndexSet s, { + required int options, + required objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) + > + passingTest, + }) { final _$$ref = object$.ref; - return _objc_msgSend_12py2ux( - _$$ref.pointer, - _sel_indexLessThanIndex_, - value, + final _$$ref$1 = s.ref; + final _$$ref$2 = passingTest.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.indexesOfObjectsAtIndexes:options:passingTest:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - } - - /// indexLessThanOrEqualToIndex: - int indexLessThanOrEqualToIndex(int value) { - final _$$ref = object$.ref; - return _objc_msgSend_12py2ux( + final $ret = _objc_msgSend_1i9v144( _$$ref.pointer, - _sel_indexLessThanOrEqualToIndex_, - value, + _sel_indexesOfObjectsAtIndexes_options_passingTest_, + _$$ref$1.pointer, + options, + _$$ref$2.pointer, ); + return NSIndexSet.fromPointer($ret, retain: true, release: true); } - /// indexPassingTest: - int indexPassingTest( - objc.ObjCBlock)> + /// indexesOfObjectsPassingTest: + NSIndexSet indexesOfObjectsPassingTest( + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) + > predicate, ) { final _$$ref = object$.ref; final _$$ref$1 = predicate.ref; objc.checkOsVersionInternal( - 'NSIndexSet.indexPassingTest:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSOrderedSet.indexesOfObjectsPassingTest:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - return _objc_msgSend_10mlopr( + final $ret = _objc_msgSend_nnxkei( _$$ref.pointer, - _sel_indexPassingTest_, + _sel_indexesOfObjectsPassingTest_, _$$ref$1.pointer, ); + return NSIndexSet.fromPointer($ret, retain: true, release: true); } - /// indexWithOptions:passingTest: - int indexWithOptions( + /// indexesOfObjectsWithOptions:passingTest: + NSIndexSet indexesOfObjectsWithOptions( int opts, { required objc.ObjCBlock< - ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Bool Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) > passingTest, }) { final _$$ref = object$.ref; final _$$ref$1 = passingTest.ref; objc.checkOsVersionInternal( - 'NSIndexSet.indexWithOptions:passingTest:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSOrderedSet.indexesOfObjectsWithOptions:passingTest:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - return _objc_msgSend_1698hqz( + final $ret = _objc_msgSend_13x5boi( _$$ref.pointer, - _sel_indexWithOptions_passingTest_, + _sel_indexesOfObjectsWithOptions_passingTest_, opts, _$$ref$1.pointer, ); + return NSIndexSet.fromPointer($ret, retain: true, release: true); } - /// indexesInRange:options:passingTest: - NSIndexSet indexesInRange( - NSRange range, { - required int options, - required objc.ObjCBlock< - ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) - > - passingTest, - }) { + /// intersectsOrderedSet: + bool intersectsOrderedSet(NSOrderedSet other) { final _$$ref = object$.ref; - final _$$ref$1 = passingTest.ref; + final _$$ref$1 = other.ref; objc.checkOsVersionInternal( - 'NSIndexSet.indexesInRange:options:passingTest:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSOrderedSet.intersectsOrderedSet:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_1q30cs4( + return _objc_msgSend_19nvye5( _$$ref.pointer, - _sel_indexesInRange_options_passingTest_, - range, - options, + _sel_intersectsOrderedSet_, _$$ref$1.pointer, ); - return NSIndexSet.fromPointer($ret, retain: true, release: true); } - /// indexesPassingTest: - NSIndexSet indexesPassingTest( - objc.ObjCBlock)> - predicate, - ) { + /// intersectsSet: + bool intersectsSet(NSSet set) { final _$$ref = object$.ref; - final _$$ref$1 = predicate.ref; + final _$$ref$1 = set.ref; objc.checkOsVersionInternal( - 'NSIndexSet.indexesPassingTest:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSOrderedSet.intersectsSet:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_nnxkei( + return _objc_msgSend_19nvye5( _$$ref.pointer, - _sel_indexesPassingTest_, + _sel_intersectsSet_, _$$ref$1.pointer, ); - return NSIndexSet.fromPointer($ret, retain: true, release: true); } - /// indexesWithOptions:passingTest: - NSIndexSet indexesWithOptions( - int opts, { - required objc.ObjCBlock< - ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) - > - passingTest, - }) { + /// isEqualToOrderedSet: + bool isEqualToOrderedSet(NSOrderedSet other) { final _$$ref = object$.ref; - final _$$ref$1 = passingTest.ref; + final _$$ref$1 = other.ref; objc.checkOsVersionInternal( - 'NSIndexSet.indexesWithOptions:passingTest:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSOrderedSet.isEqualToOrderedSet:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_13x5boi( + return _objc_msgSend_19nvye5( _$$ref.pointer, - _sel_indexesWithOptions_passingTest_, - opts, + _sel_isEqualToOrderedSet_, _$$ref$1.pointer, ); - return NSIndexSet.fromPointer($ret, retain: true, release: true); } - /// init - NSIndexSet init() { - final _$$ref$16 = object$.ref; + /// isSubsetOfOrderedSet: + bool isSubsetOfOrderedSet(NSOrderedSet other) { + final _$$ref = object$.ref; + final _$$ref$1 = other.ref; objc.checkOsVersionInternal( - 'NSIndexSet.init', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSOrderedSet.isSubsetOfOrderedSet:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_151sglz( - _$$ref$16.retainAndReturnPointer(), - _sel_init, + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_isSubsetOfOrderedSet_, + _$$ref$1.pointer, ); - return NSIndexSet.fromPointer($ret, retain: false, release: true); } - /// initWithCoder: - NSIndexSet? initWithCoder(NSCoder coder) { - final _$$ref$16 = object$.ref; - final _$$ref$17 = coder.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref$16.retainAndReturnPointer(), - _sel_initWithCoder_, - _$$ref$17.pointer, + /// isSubsetOfSet: + bool isSubsetOfSet(NSSet set) { + final _$$ref = object$.ref; + final _$$ref$1 = set.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.isSubsetOfSet:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_isSubsetOfSet_, + _$$ref$1.pointer, + ); + } + + /// lastObject + objc.ObjCObject? get lastObject { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.lastObject', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_lastObject); return $ret.address == 0 ? null - : NSIndexSet.fromPointer($ret, retain: false, release: true); + : objc.ObjCObject($ret, retain: true, release: true); } - /// initWithIndex: - NSIndexSet initWithIndex(int value) { + /// objectAtIndexedSubscript: + objc.ObjCObject objectAtIndexedSubscript(int idx) { final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.objectAtIndexedSubscript:', + iOS: (false, (6, 0, 0)), + macOS: (false, (10, 8, 0)), + ); final $ret = _objc_msgSend_14hpxwa( - _$$ref.retainAndReturnPointer(), - _sel_initWithIndex_, - value, + _$$ref.pointer, + _sel_objectAtIndexedSubscript_, + idx, ); - return NSIndexSet.fromPointer($ret, retain: false, release: true); + return objc.ObjCObject($ret, retain: true, release: true); } - /// initWithIndexSet: - NSIndexSet initWithIndexSet(NSIndexSet indexSet) { + /// objectEnumerator + NSEnumerator objectEnumerator() { final _$$ref = object$.ref; - final _$$ref$1 = indexSet.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.objectEnumerator', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_objectEnumerator); + return NSEnumerator.fromPointer($ret, retain: true, release: true); + } + + /// objectsAtIndexes: + NSArray objectsAtIndexes(NSIndexSet indexes) { + final _$$ref = object$.ref; + final _$$ref$1 = indexes.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.objectsAtIndexes:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); final $ret = _objc_msgSend_1sotr3r( - _$$ref.retainAndReturnPointer(), - _sel_initWithIndexSet_, + _$$ref.pointer, + _sel_objectsAtIndexes_, _$$ref$1.pointer, ); - return NSIndexSet.fromPointer($ret, retain: false, release: true); + return NSArray.fromPointer($ret, retain: true, release: true); } - /// initWithIndexesInRange: - NSIndexSet initWithIndexesInRange(NSRange range) { + /// reverseObjectEnumerator + NSEnumerator reverseObjectEnumerator() { final _$$ref = object$.ref; - final $ret = _objc_msgSend_1k1o1s7( - _$$ref.retainAndReturnPointer(), - _sel_initWithIndexesInRange_, - range, + objc.checkOsVersionInternal( + 'NSOrderedSet.reverseObjectEnumerator', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - return NSIndexSet.fromPointer($ret, retain: false, release: true); + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_reverseObjectEnumerator, + ); + return NSEnumerator.fromPointer($ret, retain: true, release: true); } - /// intersectsIndexesInRange: - bool intersectsIndexesInRange(NSRange range) { + /// reversedOrderedSet + NSOrderedSet get reversedOrderedSet { final _$$ref = object$.ref; - return _objc_msgSend_p4nurx( - _$$ref.pointer, - _sel_intersectsIndexesInRange_, - range, + objc.checkOsVersionInternal( + 'NSOrderedSet.reversedOrderedSet', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_reversedOrderedSet); + return NSOrderedSet.fromPointer($ret, retain: true, release: true); } - /// isEqualToIndexSet: - bool isEqualToIndexSet(NSIndexSet indexSet) { + /// set + NSSet get set { final _$$ref = object$.ref; - final _$$ref$1 = indexSet.ref; - return _objc_msgSend_19nvye5( + objc.checkOsVersionInternal( + 'NSOrderedSet.set', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_set); + return NSSet.fromPointer($ret, retain: true, release: true); + } + + /// sortedArrayUsingComparator: + NSArray sortedArrayUsingComparator( + objc.ObjCBlock< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ) + > + cmptr, + ) { + final _$$ref = object$.ref; + final _$$ref$1 = cmptr.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.sortedArrayUsingComparator:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + final $ret = _objc_msgSend_nnxkei( _$$ref.pointer, - _sel_isEqualToIndexSet_, + _sel_sortedArrayUsingComparator_, _$$ref$1.pointer, ); + return NSArray.fromPointer($ret, retain: true, release: true); } - /// lastIndex - int get lastIndex { + /// sortedArrayWithOptions:usingComparator: + NSArray sortedArrayWithOptions( + int opts, { + required objc.ObjCBlock< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ) + > + usingComparator, + }) { final _$$ref = object$.ref; - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_lastIndex); + final _$$ref$1 = usingComparator.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.sortedArrayWithOptions:usingComparator:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + final $ret = _objc_msgSend_1x5ew3h( + _$$ref.pointer, + _sel_sortedArrayWithOptions_usingComparator_, + opts, + _$$ref$1.pointer, + ); + return NSArray.fromPointer($ret, retain: true, release: true); } } -/// NSInputStream -extension type NSInputStream._(objc.ObjCObject object$) - implements objc.ObjCObject, NSStream { - /// Constructs a [NSInputStream] that points to the same underlying object as [other]. - NSInputStream.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); +/// NSExtendedSet +extension NSExtendedSet on NSSet { + /// allObjects + NSArray get allObjects { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_allObjects); + return NSArray.fromPointer($ret, retain: true, release: true); } - /// Constructs a [NSInputStream] that wraps the given raw object pointer. - NSInputStream.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); + /// anyObject + objc.ObjCObject? anyObject() { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_anyObject); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSInputStream]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSInputStream, - ); + /// containsObject: + bool containsObject(objc.ObjCObject anObject) { + final _$$ref = object$.ref; + final _$$ref$1 = anObject.ref; + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_containsObject_, + _$$ref$1.pointer, + ); + } - /// alloc - static NSInputStream alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSInputStream, _sel_alloc); - return NSInputStream.fromPointer($ret, retain: false, release: true); + /// description + NSString get description$1 { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_description); + return NSString.fromPointer($ret, retain: true, release: true); + } + + /// descriptionWithLocale: + NSString descriptionWithLocale(objc.ObjCObject? locale) { + final _$$ref = object$.ref; + final _$$ref$1 = locale?.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_descriptionWithLocale_, + _$$ref$1?.pointer ?? ffi.nullptr, + ); + return NSString.fromPointer($ret, retain: true, release: true); + } + + /// enumerateObjectsUsingBlock: + void enumerateObjectsUsingBlock( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, ffi.Pointer) + > + block, + ) { + final _$$ref = object$.ref; + final _$$ref$1 = block.ref; + objc.checkOsVersionInternal( + 'NSSet.enumerateObjectsUsingBlock:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + _objc_msgSend_f167m6( + _$$ref.pointer, + _sel_enumerateObjectsUsingBlock_, + _$$ref$1.pointer, + ); } - /// allocWithZone: - static NSInputStream allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSInputStream, - _sel_allocWithZone_, - zone, + /// enumerateObjectsWithOptions:usingBlock: + void enumerateObjectsWithOptions( + int opts, { + required objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, ffi.Pointer) + > + usingBlock, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = usingBlock.ref; + objc.checkOsVersionInternal( + 'NSSet.enumerateObjectsWithOptions:usingBlock:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + _objc_msgSend_yx8yc6( + _$$ref.pointer, + _sel_enumerateObjectsWithOptions_usingBlock_, + opts, + _$$ref$1.pointer, + ); + } + + /// intersectsSet: + bool intersectsSet(NSSet otherSet) { + final _$$ref = object$.ref; + final _$$ref$1 = otherSet.ref; + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_intersectsSet_, + _$$ref$1.pointer, + ); + } + + /// isEqualToSet: + bool isEqualToSet(NSSet otherSet) { + final _$$ref = object$.ref; + final _$$ref$1 = otherSet.ref; + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_isEqualToSet_, + _$$ref$1.pointer, + ); + } + + /// isSubsetOfSet: + bool isSubsetOfSet(NSSet otherSet) { + final _$$ref = object$.ref; + final _$$ref$1 = otherSet.ref; + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_isSubsetOfSet_, + _$$ref$1.pointer, + ); + } + + /// makeObjectsPerformSelector: + void makeObjectsPerformSelector(ffi.Pointer aSelector) { + final _$$ref = object$.ref; + _objc_msgSend_1d9e4oe( + _$$ref.pointer, + _sel_makeObjectsPerformSelector_, + aSelector, + ); + } + + /// makeObjectsPerformSelector:withObject: + void makeObjectsPerformSelector$1( + ffi.Pointer aSelector, { + objc.ObjCObject? withObject, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = withObject?.ref; + _objc_msgSend_1qv0eq4( + _$$ref.pointer, + _sel_makeObjectsPerformSelector_withObject_, + aSelector, + _$$ref$1?.pointer ?? ffi.nullptr, + ); + } + + /// objectsPassingTest: + NSSet objectsPassingTest( + objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, ffi.Pointer) + > + predicate, + ) { + final _$$ref = object$.ref; + final _$$ref$1 = predicate.ref; + objc.checkOsVersionInternal( + 'NSSet.objectsPassingTest:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_nnxkei( + _$$ref.pointer, + _sel_objectsPassingTest_, + _$$ref$1.pointer, + ); + return NSSet.fromPointer($ret, retain: true, release: true); + } + + /// objectsWithOptions:passingTest: + NSSet objectsWithOptions( + int opts, { + required objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, ffi.Pointer) + > + passingTest, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = passingTest.ref; + objc.checkOsVersionInternal( + 'NSSet.objectsWithOptions:passingTest:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_13x5boi( + _$$ref.pointer, + _sel_objectsWithOptions_passingTest_, + opts, + _$$ref$1.pointer, + ); + return NSSet.fromPointer($ret, retain: true, release: true); + } + + /// setByAddingObject: + NSSet setByAddingObject(objc.ObjCObject anObject) { + final _$$ref = object$.ref; + final _$$ref$1 = anObject.ref; + objc.checkOsVersionInternal( + 'NSSet.setByAddingObject:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_setByAddingObject_, + _$$ref$1.pointer, + ); + return NSSet.fromPointer($ret, retain: true, release: true); + } + + /// setByAddingObjectsFromArray: + NSSet setByAddingObjectsFromArray(NSArray other) { + final _$$ref = object$.ref; + final _$$ref$1 = other.ref; + objc.checkOsVersionInternal( + 'NSSet.setByAddingObjectsFromArray:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_setByAddingObjectsFromArray_, + _$$ref$1.pointer, + ); + return NSSet.fromPointer($ret, retain: true, release: true); + } + + /// setByAddingObjectsFromSet: + NSSet setByAddingObjectsFromSet(NSSet other) { + final _$$ref = object$.ref; + final _$$ref$1 = other.ref; + objc.checkOsVersionInternal( + 'NSSet.setByAddingObjectsFromSet:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_setByAddingObjectsFromSet_, + _$$ref$1.pointer, + ); + return NSSet.fromPointer($ret, retain: true, release: true); + } +} + +/// NSExtendedStringPropertyListParsing +extension NSExtendedStringPropertyListParsing on NSString { + /// propertyList + objc.ObjCObject propertyList() { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_propertyList); + return objc.ObjCObject($ret, retain: true, release: true); + } + + /// propertyListFromStringsFileFormat + NSDictionary? propertyListFromStringsFileFormat() { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_propertyListFromStringsFileFormat, + ); + return $ret.address == 0 + ? null + : NSDictionary.fromPointer($ret, retain: true, release: true); + } +} + +/// NSFastEnumeration +extension type NSFastEnumeration._(objc.ObjCProtocol object$) + implements objc.ObjCProtocol { + /// Constructs a [NSFastEnumeration] that points to the same underlying object as [other]. + NSFastEnumeration.as(objc.ObjCObject other) : object$ = other; + + /// Constructs a [NSFastEnumeration] that wraps the given raw object pointer. + NSFastEnumeration.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSFastEnumeration]. + static bool conformsTo(objc.ObjCObject obj) { + return _objc_msgSend_e3qsqz( + obj.ref.pointer, + _sel_conformsToProtocol_, + _protocol_NSFastEnumeration, + ); + } +} + +extension NSFastEnumeration$Methods on NSFastEnumeration { + /// countByEnumeratingWithState:objects:count: + int countByEnumeratingWithState( + ffi.Pointer state, { + required ffi.Pointer> objects, + required int count, + }) { + final _$$ref$3 = object$.ref; + return _objc_msgSend_1b5ysjl( + _$$ref$3.pointer, + _sel_countByEnumeratingWithState_objects_count_, + state, + objects, + count, + ); + } +} + +interface class NSFastEnumeration$Builder { + /// Returns the [objc.Protocol] object for this protocol. + static objc.Protocol get $protocol => + objc.Protocol.fromPointer(_protocol_NSFastEnumeration.cast()); + + /// Builds an object that implements the NSFastEnumeration protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + /// + /// If `$keepIsolateAlive` is true, this protocol will keep this isolate + /// alive until it is garbage collected by both Dart and ObjC. + static NSFastEnumeration implement({ + required int Function( + ffi.Pointer, + ffi.Pointer>, + int, + ) + countByEnumeratingWithState_objects_count_, + bool $keepIsolateAlive = true, + }) { + final builder = objc.ObjCProtocolBuilder(debugName: 'NSFastEnumeration'); + NSFastEnumeration$Builder.countByEnumeratingWithState_objects_count_ + .implement(builder, countByEnumeratingWithState_objects_count_); + builder.addProtocol($protocol); + return NSFastEnumeration.as( + builder.build(keepIsolateAlive: $keepIsolateAlive), + ); + } + + /// Adds the implementation of the NSFastEnumeration protocol to an existing + /// [objc.ObjCProtocolBuilder]. + /// + /// Note: You cannot call this method after you have called `builder.build`. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, { + required int Function( + ffi.Pointer, + ffi.Pointer>, + int, + ) + countByEnumeratingWithState_objects_count_, + bool $keepIsolateAlive = true, + }) { + NSFastEnumeration$Builder.countByEnumeratingWithState_objects_count_ + .implement(builder, countByEnumeratingWithState_objects_count_); + builder.addProtocol($protocol); + } + + /// countByEnumeratingWithState:objects:count: + static final countByEnumeratingWithState_objects_count_ = + objc.ObjCProtocolMethod< + int Function( + ffi.Pointer, + ffi.Pointer>, + int, + ) + >( + _protocol_NSFastEnumeration, + _sel_countByEnumeratingWithState_objects_count_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong, + ) + > + >(_1wx624s_protocolTrampoline_17ap02x) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSFastEnumeration, + _sel_countByEnumeratingWithState_objects_count_, + isRequired: true, + isInstanceMethod: true, + ), + ( + int Function( + ffi.Pointer, + ffi.Pointer>, + int, + ) + func, + ) => + ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObjectImpl_NSUInteger.fromFunction( + ( + ffi.Pointer _, + ffi.Pointer arg1, + ffi.Pointer> arg2, + int arg3, + ) => func(arg1, arg2, arg3), + ), + ); +} + +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; +} + +/// NSFileAttributes +extension NSFileAttributes on NSDictionary { + /// fileCreationDate + NSDate? fileCreationDate() { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_fileCreationDate); + return $ret.address == 0 + ? null + : NSDate.fromPointer($ret, retain: true, release: true); + } + + /// fileExtensionHidden + bool fileExtensionHidden() { + final _$$ref = object$.ref; + return _objc_msgSend_91o635(_$$ref.pointer, _sel_fileExtensionHidden); + } + + /// fileGroupOwnerAccountID + NSNumber? fileGroupOwnerAccountID() { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_fileGroupOwnerAccountID, + ); + return $ret.address == 0 + ? null + : NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// fileGroupOwnerAccountName + NSString? fileGroupOwnerAccountName() { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_fileGroupOwnerAccountName, + ); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); + } + + /// fileHFSCreatorCode + int fileHFSCreatorCode() { + final _$$ref = object$.ref; + return _objc_msgSend_3pyzne(_$$ref.pointer, _sel_fileHFSCreatorCode); + } + + /// fileHFSTypeCode + int fileHFSTypeCode() { + final _$$ref = object$.ref; + return _objc_msgSend_3pyzne(_$$ref.pointer, _sel_fileHFSTypeCode); + } + + /// fileIsAppendOnly + bool fileIsAppendOnly() { + final _$$ref = object$.ref; + return _objc_msgSend_91o635(_$$ref.pointer, _sel_fileIsAppendOnly); + } + + /// fileIsImmutable + bool fileIsImmutable() { + final _$$ref = object$.ref; + return _objc_msgSend_91o635(_$$ref.pointer, _sel_fileIsImmutable); + } + + /// fileModificationDate + NSDate? fileModificationDate() { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_fileModificationDate, + ); + return $ret.address == 0 + ? null + : NSDate.fromPointer($ret, retain: true, release: true); + } + + /// fileOwnerAccountID + NSNumber? fileOwnerAccountID() { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_fileOwnerAccountID); + return $ret.address == 0 + ? null + : NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// fileOwnerAccountName + NSString? fileOwnerAccountName() { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_fileOwnerAccountName, + ); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); + } + + /// filePosixPermissions + int filePosixPermissions() { + final _$$ref = object$.ref; + return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_filePosixPermissions); + } + + /// fileSize + int fileSize() { + final _$$ref = object$.ref; + return _objc_msgSend_1p4gbjy(_$$ref.pointer, _sel_fileSize); + } + + /// fileSystemFileNumber + int fileSystemFileNumber() { + final _$$ref = object$.ref; + return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_fileSystemFileNumber); + } + + /// fileSystemNumber + int fileSystemNumber() { + final _$$ref = object$.ref; + return _objc_msgSend_1hz7y9r(_$$ref.pointer, _sel_fileSystemNumber); + } + + /// fileType + NSString? fileType() { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_fileType); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); + } +} + +/// NSFileManager +/// +/// NSFileManager +extension type NSFileManager._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject { + /// Constructs a [NSFileManager] that points to the same underlying object as [other]. + NSFileManager.as(objc.ObjCObject other) : object$ = other {} + + /// Constructs a [NSFileManager] that wraps the given raw object pointer. + NSFileManager.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) {} +} + +/// NSGenericFastEnumeration +extension NSGenericFastEnumeration on NSDictionary { + /// countByEnumeratingWithState:objects:count: + int countByEnumeratingWithState( + ffi.Pointer state, { + required ffi.Pointer> objects, + required int count, + }) { + final _$$ref$4 = object$.ref; + return _objc_msgSend_1b5ysjl( + _$$ref$4.pointer, + _sel_countByEnumeratingWithState_objects_count_, + state, + objects, + count, + ); + } +} + +/// NSGeometryCoding +extension NSGeometryCoding on NSCoder { + /// decodePoint + CGPoint decodePoint() { + final _$$ref = object$.ref; + final $ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_1uwdhlkStret($ptr, _$$ref.pointer, _sel_decodePoint) + : $ptr.ref = _objc_msgSend_1uwdhlk(_$$ref.pointer, _sel_decodePoint); + final $finalizable = $ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree, + ); + return ffi.Struct.create($finalizable); + } + + /// decodeRect + CGRect decodeRect() { + final _$$ref = object$.ref; + final $ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_bu1hbwStret($ptr, _$$ref.pointer, _sel_decodeRect) + : $ptr.ref = _objc_msgSend_bu1hbw(_$$ref.pointer, _sel_decodeRect); + final $finalizable = $ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree, + ); + return ffi.Struct.create($finalizable); + } + + /// decodeSize + CGSize decodeSize() { + final _$$ref = object$.ref; + final $ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_1vdfkenStret($ptr, _$$ref.pointer, _sel_decodeSize) + : $ptr.ref = _objc_msgSend_1vdfken(_$$ref.pointer, _sel_decodeSize); + final $finalizable = $ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree, + ); + return ffi.Struct.create($finalizable); + } + + /// encodePoint: + void encodePoint(CGPoint point) { + final _$$ref = object$.ref; + _objc_msgSend_iy8iz6(_$$ref.pointer, _sel_encodePoint_, point); + } + + /// encodeRect: + void encodeRect(CGRect rect) { + final _$$ref = object$.ref; + _objc_msgSend_1okkq16(_$$ref.pointer, _sel_encodeRect_, rect); + } + + /// encodeSize: + void encodeSize(CGSize size) { + final _$$ref = object$.ref; + _objc_msgSend_13lgpwz(_$$ref.pointer, _sel_encodeSize_, size); + } +} + +/// NSGeometryKeyedCoding +extension NSGeometryKeyedCoding on NSCoder { + /// decodePointForKey: + CGPoint decodePointForKey(NSString key) { + final _$$ref = object$.ref; + final _$$ref$1 = key.ref; + final $ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_1mpyy6yStret( + $ptr, + _$$ref.pointer, + _sel_decodePointForKey_, + _$$ref$1.pointer, + ) + : $ptr.ref = _objc_msgSend_1mpyy6y( + _$$ref.pointer, + _sel_decodePointForKey_, + _$$ref$1.pointer, + ); + final $finalizable = $ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree, + ); + return ffi.Struct.create($finalizable); + } + + /// decodeRectForKey: + CGRect decodeRectForKey(NSString key) { + final _$$ref = object$.ref; + final _$$ref$1 = key.ref; + final $ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_qrtfceStret( + $ptr, + _$$ref.pointer, + _sel_decodeRectForKey_, + _$$ref$1.pointer, + ) + : $ptr.ref = _objc_msgSend_qrtfce( + _$$ref.pointer, + _sel_decodeRectForKey_, + _$$ref$1.pointer, + ); + final $finalizable = $ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree, + ); + return ffi.Struct.create($finalizable); + } + + /// decodeSizeForKey: + CGSize decodeSizeForKey(NSString key) { + final _$$ref = object$.ref; + final _$$ref$1 = key.ref; + final $ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_18r320vStret( + $ptr, + _$$ref.pointer, + _sel_decodeSizeForKey_, + _$$ref$1.pointer, + ) + : $ptr.ref = _objc_msgSend_18r320v( + _$$ref.pointer, + _sel_decodeSizeForKey_, + _$$ref$1.pointer, + ); + final $finalizable = $ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree, + ); + return ffi.Struct.create($finalizable); + } + + /// encodePoint:forKey: + void encodePoint(CGPoint point, {required NSString forKey}) { + final _$$ref = object$.ref; + final _$$ref$1 = forKey.ref; + _objc_msgSend_bkebbk( + _$$ref.pointer, + _sel_encodePoint_forKey_, + point, + _$$ref$1.pointer, + ); + } + + /// encodeRect:forKey: + void encodeRect(CGRect rect, {required NSString forKey}) { + final _$$ref = object$.ref; + final _$$ref$1 = forKey.ref; + _objc_msgSend_f227js( + _$$ref.pointer, + _sel_encodeRect_forKey_, + rect, + _$$ref$1.pointer, + ); + } + + /// encodeSize:forKey: + void encodeSize(CGSize size, {required NSString forKey}) { + final _$$ref = object$.ref; + final _$$ref$1 = forKey.ref; + _objc_msgSend_11tcc61( + _$$ref.pointer, + _sel_encodeSize_forKey_, + size, + _$$ref$1.pointer, + ); + } +} + +/// NSHost +/// +/// NSHost +extension type NSHost._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject { + /// Constructs a [NSHost] that points to the same underlying object as [other]. + NSHost.as(objc.ObjCObject other) : object$ = other {} + + /// Constructs a [NSHost] that wraps the given raw object pointer. + NSHost.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) {} +} + +/// NSIndexSet +extension type NSIndexSet._(objc.ObjCObject object$) + implements + objc.ObjCObject, + NSObject, + NSCopying, + NSMutableCopying, + NSSecureCoding { + /// Constructs a [NSIndexSet] that points to the same underlying object as [other]. + NSIndexSet.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NSIndexSet] that wraps the given raw object pointer. + NSIndexSet.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + assert(isA(object$)); + } + + /// Returns whether [obj] is an instance of [NSIndexSet]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSIndexSet, + ); + + /// alloc + static NSIndexSet alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSIndexSet, _sel_alloc); + return NSIndexSet.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NSIndexSet allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSIndexSet, + _sel_allocWithZone_, + zone, + ); + return NSIndexSet.fromPointer($ret, retain: false, release: true); + } + + /// indexSet + static NSIndexSet indexSet() { + final $ret = _objc_msgSend_151sglz(_class_NSIndexSet, _sel_indexSet); + return NSIndexSet.fromPointer($ret, retain: true, release: true); + } + + /// indexSetWithIndex: + static NSIndexSet indexSetWithIndex(int value) { + final $ret = _objc_msgSend_14hpxwa( + _class_NSIndexSet, + _sel_indexSetWithIndex_, + value, + ); + return NSIndexSet.fromPointer($ret, retain: true, release: true); + } + + /// indexSetWithIndexesInRange: + static NSIndexSet indexSetWithIndexesInRange(NSRange range) { + final $ret = _objc_msgSend_1k1o1s7( + _class_NSIndexSet, + _sel_indexSetWithIndexesInRange_, + range, + ); + return NSIndexSet.fromPointer($ret, retain: true, release: true); + } + + /// new + static NSIndexSet new$() { + final $ret = _objc_msgSend_151sglz(_class_NSIndexSet, _sel_new); + return NSIndexSet.fromPointer($ret, retain: false, release: true); + } + + /// supportsSecureCoding + static bool getSupportsSecureCoding() { + return _objc_msgSend_91o635(_class_NSIndexSet, _sel_supportsSecureCoding); + } + + /// Returns a new instance of NSIndexSet constructed with the default `new` method. + NSIndexSet() : this.as(new$().object$); +} + +extension NSIndexSet$Methods on NSIndexSet { + /// containsIndex: + bool containsIndex(int value) { + final _$$ref = object$.ref; + return _objc_msgSend_6peh6o(_$$ref.pointer, _sel_containsIndex_, value); + } + + /// containsIndexes: + bool containsIndexes(NSIndexSet indexSet) { + final _$$ref = object$.ref; + final _$$ref$1 = indexSet.ref; + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_containsIndexes_, + _$$ref$1.pointer, + ); + } + + /// containsIndexesInRange: + bool containsIndexesInRange(NSRange range) { + final _$$ref = object$.ref; + return _objc_msgSend_p4nurx( + _$$ref.pointer, + _sel_containsIndexesInRange_, + range, + ); + } + + /// count + int get count { + final _$$ref = object$.ref; + return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_count); + } + + /// countOfIndexesInRange: + int countOfIndexesInRange(NSRange range) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSIndexSet.countOfIndexesInRange:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + return _objc_msgSend_qm9f5w( + _$$ref.pointer, + _sel_countOfIndexesInRange_, + range, + ); + } + + /// encodeWithCoder: + void encodeWithCoder(NSCoder coder) { + final _$$ref$16 = object$.ref; + final _$$ref$17 = coder.ref; + _objc_msgSend_xtuoz7( + _$$ref$16.pointer, + _sel_encodeWithCoder_, + _$$ref$17.pointer, + ); + } + + /// enumerateIndexesInRange:options:usingBlock: + void enumerateIndexesInRange( + NSRange range, { + required int options, + required objc.ObjCBlock< + ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) + > + usingBlock, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = usingBlock.ref; + objc.checkOsVersionInternal( + 'NSIndexSet.enumerateIndexesInRange:options:usingBlock:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + _objc_msgSend_177cajs( + _$$ref.pointer, + _sel_enumerateIndexesInRange_options_usingBlock_, + range, + options, + _$$ref$1.pointer, + ); + } + + /// enumerateIndexesUsingBlock: + void enumerateIndexesUsingBlock( + objc.ObjCBlock)> + block, + ) { + final _$$ref = object$.ref; + final _$$ref$1 = block.ref; + objc.checkOsVersionInternal( + 'NSIndexSet.enumerateIndexesUsingBlock:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + _objc_msgSend_f167m6( + _$$ref.pointer, + _sel_enumerateIndexesUsingBlock_, + _$$ref$1.pointer, + ); + } + + /// enumerateIndexesWithOptions:usingBlock: + void enumerateIndexesWithOptions( + int opts, { + required objc.ObjCBlock< + ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) + > + usingBlock, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = usingBlock.ref; + objc.checkOsVersionInternal( + 'NSIndexSet.enumerateIndexesWithOptions:usingBlock:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + _objc_msgSend_yx8yc6( + _$$ref.pointer, + _sel_enumerateIndexesWithOptions_usingBlock_, + opts, + _$$ref$1.pointer, + ); + } + + /// enumerateRangesInRange:options:usingBlock: + void enumerateRangesInRange( + NSRange range, { + required int options, + required objc.ObjCBlock)> + usingBlock, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = usingBlock.ref; + objc.checkOsVersionInternal( + 'NSIndexSet.enumerateRangesInRange:options:usingBlock:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_177cajs( + _$$ref.pointer, + _sel_enumerateRangesInRange_options_usingBlock_, + range, + options, + _$$ref$1.pointer, + ); + } + + /// enumerateRangesUsingBlock: + void enumerateRangesUsingBlock( + objc.ObjCBlock)> block, + ) { + final _$$ref = object$.ref; + final _$$ref$1 = block.ref; + objc.checkOsVersionInternal( + 'NSIndexSet.enumerateRangesUsingBlock:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_f167m6( + _$$ref.pointer, + _sel_enumerateRangesUsingBlock_, + _$$ref$1.pointer, + ); + } + + /// enumerateRangesWithOptions:usingBlock: + void enumerateRangesWithOptions( + int opts, { + required objc.ObjCBlock)> + usingBlock, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = usingBlock.ref; + objc.checkOsVersionInternal( + 'NSIndexSet.enumerateRangesWithOptions:usingBlock:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_yx8yc6( + _$$ref.pointer, + _sel_enumerateRangesWithOptions_usingBlock_, + opts, + _$$ref$1.pointer, + ); + } + + /// firstIndex + int get firstIndex { + final _$$ref = object$.ref; + return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_firstIndex); + } + + /// getIndexes:maxCount:inIndexRange: + int getIndexes( + ffi.Pointer indexBuffer, { + required int maxCount, + required ffi.Pointer inIndexRange, + }) { + final _$$ref = object$.ref; + return _objc_msgSend_89xgla( + _$$ref.pointer, + _sel_getIndexes_maxCount_inIndexRange_, + indexBuffer, + maxCount, + inIndexRange, + ); + } + + /// indexGreaterThanIndex: + int indexGreaterThanIndex(int value) { + final _$$ref = object$.ref; + return _objc_msgSend_12py2ux( + _$$ref.pointer, + _sel_indexGreaterThanIndex_, + value, + ); + } + + /// indexGreaterThanOrEqualToIndex: + int indexGreaterThanOrEqualToIndex(int value) { + final _$$ref = object$.ref; + return _objc_msgSend_12py2ux( + _$$ref.pointer, + _sel_indexGreaterThanOrEqualToIndex_, + value, + ); + } + + /// indexInRange:options:passingTest: + int indexInRange( + NSRange range, { + required int options, + required objc.ObjCBlock< + ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) + > + passingTest, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = passingTest.ref; + objc.checkOsVersionInternal( + 'NSIndexSet.indexInRange:options:passingTest:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + return _objc_msgSend_6jmuyz( + _$$ref.pointer, + _sel_indexInRange_options_passingTest_, + range, + options, + _$$ref$1.pointer, + ); + } + + /// indexLessThanIndex: + int indexLessThanIndex(int value) { + final _$$ref = object$.ref; + return _objc_msgSend_12py2ux( + _$$ref.pointer, + _sel_indexLessThanIndex_, + value, + ); + } + + /// indexLessThanOrEqualToIndex: + int indexLessThanOrEqualToIndex(int value) { + final _$$ref = object$.ref; + return _objc_msgSend_12py2ux( + _$$ref.pointer, + _sel_indexLessThanOrEqualToIndex_, + value, + ); + } + + /// indexPassingTest: + int indexPassingTest( + objc.ObjCBlock)> + predicate, + ) { + final _$$ref = object$.ref; + final _$$ref$1 = predicate.ref; + objc.checkOsVersionInternal( + 'NSIndexSet.indexPassingTest:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + return _objc_msgSend_10mlopr( + _$$ref.pointer, + _sel_indexPassingTest_, + _$$ref$1.pointer, + ); + } + + /// indexWithOptions:passingTest: + int indexWithOptions( + int opts, { + required objc.ObjCBlock< + ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) + > + passingTest, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = passingTest.ref; + objc.checkOsVersionInternal( + 'NSIndexSet.indexWithOptions:passingTest:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + return _objc_msgSend_1698hqz( + _$$ref.pointer, + _sel_indexWithOptions_passingTest_, + opts, + _$$ref$1.pointer, + ); + } + + /// indexesInRange:options:passingTest: + NSIndexSet indexesInRange( + NSRange range, { + required int options, + required objc.ObjCBlock< + ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) + > + passingTest, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = passingTest.ref; + objc.checkOsVersionInternal( + 'NSIndexSet.indexesInRange:options:passingTest:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_1q30cs4( + _$$ref.pointer, + _sel_indexesInRange_options_passingTest_, + range, + options, + _$$ref$1.pointer, + ); + return NSIndexSet.fromPointer($ret, retain: true, release: true); + } + + /// indexesPassingTest: + NSIndexSet indexesPassingTest( + objc.ObjCBlock)> + predicate, + ) { + final _$$ref = object$.ref; + final _$$ref$1 = predicate.ref; + objc.checkOsVersionInternal( + 'NSIndexSet.indexesPassingTest:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_nnxkei( + _$$ref.pointer, + _sel_indexesPassingTest_, + _$$ref$1.pointer, + ); + return NSIndexSet.fromPointer($ret, retain: true, release: true); + } + + /// indexesWithOptions:passingTest: + NSIndexSet indexesWithOptions( + int opts, { + required objc.ObjCBlock< + ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) + > + passingTest, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = passingTest.ref; + objc.checkOsVersionInternal( + 'NSIndexSet.indexesWithOptions:passingTest:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_13x5boi( + _$$ref.pointer, + _sel_indexesWithOptions_passingTest_, + opts, + _$$ref$1.pointer, + ); + return NSIndexSet.fromPointer($ret, retain: true, release: true); + } + + /// init + NSIndexSet init() { + final _$$ref$16 = object$.ref; + objc.checkOsVersionInternal( + 'NSIndexSet.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref$16.retainAndReturnPointer(), + _sel_init, + ); + return NSIndexSet.fromPointer($ret, retain: false, release: true); + } + + /// initWithCoder: + NSIndexSet? initWithCoder(NSCoder coder) { + final _$$ref$16 = object$.ref; + final _$$ref$17 = coder.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref$16.retainAndReturnPointer(), + _sel_initWithCoder_, + _$$ref$17.pointer, + ); + return $ret.address == 0 + ? null + : NSIndexSet.fromPointer($ret, retain: false, release: true); + } + + /// initWithIndex: + NSIndexSet initWithIndex(int value) { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_14hpxwa( + _$$ref.retainAndReturnPointer(), + _sel_initWithIndex_, + value, + ); + return NSIndexSet.fromPointer($ret, retain: false, release: true); + } + + /// initWithIndexSet: + NSIndexSet initWithIndexSet(NSIndexSet indexSet) { + final _$$ref = object$.ref; + final _$$ref$1 = indexSet.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.retainAndReturnPointer(), + _sel_initWithIndexSet_, + _$$ref$1.pointer, + ); + return NSIndexSet.fromPointer($ret, retain: false, release: true); + } + + /// initWithIndexesInRange: + NSIndexSet initWithIndexesInRange(NSRange range) { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_1k1o1s7( + _$$ref.retainAndReturnPointer(), + _sel_initWithIndexesInRange_, + range, + ); + return NSIndexSet.fromPointer($ret, retain: false, release: true); + } + + /// intersectsIndexesInRange: + bool intersectsIndexesInRange(NSRange range) { + final _$$ref = object$.ref; + return _objc_msgSend_p4nurx( + _$$ref.pointer, + _sel_intersectsIndexesInRange_, + range, + ); + } + + /// isEqualToIndexSet: + bool isEqualToIndexSet(NSIndexSet indexSet) { + final _$$ref = object$.ref; + final _$$ref$1 = indexSet.ref; + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_isEqualToIndexSet_, + _$$ref$1.pointer, + ); + } + + /// lastIndex + int get lastIndex { + final _$$ref = object$.ref; + return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_lastIndex); + } +} + +/// NSInputStream +extension type NSInputStream._(objc.ObjCObject object$) + implements objc.ObjCObject, NSStream { + /// Constructs a [NSInputStream] that points to the same underlying object as [other]. + NSInputStream.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NSInputStream] that wraps the given raw object pointer. + NSInputStream.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + assert(isA(object$)); + } + + /// Returns whether [obj] is an instance of [NSInputStream]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSInputStream, + ); + + /// alloc + static NSInputStream alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSInputStream, _sel_alloc); + return NSInputStream.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NSInputStream allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSInputStream, + _sel_allocWithZone_, + zone, + ); + return NSInputStream.fromPointer($ret, retain: false, release: true); + } + + /// inputStreamWithData: + static NSInputStream? inputStreamWithData(NSData data) { + final _$$ref$1 = data.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSInputStream, + _sel_inputStreamWithData_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : NSInputStream.fromPointer($ret, retain: true, release: true); + } + + /// inputStreamWithFileAtPath: + static NSInputStream? inputStreamWithFileAtPath(NSString path) { + final _$$ref$1 = path.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSInputStream, + _sel_inputStreamWithFileAtPath_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : NSInputStream.fromPointer($ret, retain: true, release: true); + } + + /// inputStreamWithURL: + static NSInputStream? inputStreamWithURL(NSURL url) { + final _$$ref$1 = url.ref; + objc.checkOsVersionInternal( + 'NSInputStream.inputStreamWithURL:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _class_NSInputStream, + _sel_inputStreamWithURL_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : NSInputStream.fromPointer($ret, retain: true, release: true); + } + + /// new + static NSInputStream new$() { + final $ret = _objc_msgSend_151sglz(_class_NSInputStream, _sel_new); + return NSInputStream.fromPointer($ret, retain: false, release: true); + } + + /// Returns a new instance of NSInputStream constructed with the default `new` method. + NSInputStream() : this.as(new$().object$); +} + +extension NSInputStream$Methods on NSInputStream { + /// getBuffer:length: + bool getBuffer( + ffi.Pointer> buffer, { + required ffi.Pointer length, + }) { + final _$$ref = object$.ref; + return _objc_msgSend_19lrthf( + _$$ref.pointer, + _sel_getBuffer_length_, + buffer, + length, + ); + } + + /// hasBytesAvailable + bool get hasBytesAvailable { + final _$$ref = object$.ref; + return _objc_msgSend_91o635(_$$ref.pointer, _sel_hasBytesAvailable); + } + + /// init + NSInputStream init() { + final _$$ref$17 = object$.ref; + objc.checkOsVersionInternal( + 'NSInputStream.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref$17.retainAndReturnPointer(), + _sel_init, + ); + return NSInputStream.fromPointer($ret, retain: false, release: true); + } + + /// initWithData: + NSInputStream initWithData(NSData data) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = data.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithData_, + _$$ref$3.pointer, + ); + return NSInputStream.fromPointer($ret, retain: false, release: true); + } + + /// initWithFileAtPath: + NSInputStream? initWithFileAtPath(NSString path) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = path.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithFileAtPath_, + _$$ref$3.pointer, + ); + return $ret.address == 0 + ? null + : NSInputStream.fromPointer($ret, retain: false, release: true); + } + + /// initWithURL: + NSInputStream? initWithURL(NSURL url) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = url.ref; + objc.checkOsVersionInternal( + 'NSInputStream.initWithURL:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithURL_, + _$$ref$3.pointer, + ); + return $ret.address == 0 + ? null + : NSInputStream.fromPointer($ret, retain: false, release: true); + } + + /// read:maxLength: + int read(ffi.Pointer buffer, {required int maxLength}) { + final _$$ref = object$.ref; + return _objc_msgSend_11e9f5x( + _$$ref.pointer, + _sel_read_maxLength_, + buffer, + maxLength, + ); + } +} + +/// NSInputStreamExtensions +extension NSInputStreamExtensions on NSInputStream {} + +/// NSInvocation +extension type NSInvocation._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject { + /// Constructs a [NSInvocation] that points to the same underlying object as [other]. + NSInvocation.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NSInvocation] that wraps the given raw object pointer. + NSInvocation.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + assert(isA(object$)); + } + + /// Returns whether [obj] is an instance of [NSInvocation]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSInvocation, + ); + + /// alloc + static NSInvocation alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSInvocation, _sel_alloc); + return NSInvocation.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NSInvocation allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSInvocation, + _sel_allocWithZone_, + zone, + ); + return NSInvocation.fromPointer($ret, retain: false, release: true); + } + + /// invocationWithMethodSignature: + static NSInvocation invocationWithMethodSignature(NSMethodSignature sig) { + final _$$ref = sig.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSInvocation, + _sel_invocationWithMethodSignature_, + _$$ref.pointer, + ); + return NSInvocation.fromPointer($ret, retain: true, release: true); + } + + /// new + static NSInvocation new$() { + final $ret = _objc_msgSend_151sglz(_class_NSInvocation, _sel_new); + return NSInvocation.fromPointer($ret, retain: false, release: true); + } + + /// Returns a new instance of NSInvocation constructed with the default `new` method. + NSInvocation() : this.as(new$().object$); +} + +extension NSInvocation$Methods on NSInvocation { + /// argumentsRetained + bool get argumentsRetained { + final _$$ref = object$.ref; + return _objc_msgSend_91o635(_$$ref.pointer, _sel_argumentsRetained); + } + + /// getArgument:atIndex: + void getArgument( + ffi.Pointer argumentLocation, { + required int atIndex, + }) { + final _$$ref = object$.ref; + _objc_msgSend_unr2j3( + _$$ref.pointer, + _sel_getArgument_atIndex_, + argumentLocation, + atIndex, + ); + } + + /// getReturnValue: + void getReturnValue(ffi.Pointer retLoc) { + final _$$ref = object$.ref; + _objc_msgSend_ovsamd(_$$ref.pointer, _sel_getReturnValue_, retLoc); + } + + /// init + NSInvocation init() { + final _$$ref$18 = object$.ref; + objc.checkOsVersionInternal( + 'NSInvocation.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref$18.retainAndReturnPointer(), + _sel_init, + ); + return NSInvocation.fromPointer($ret, retain: false, release: true); + } + + /// invoke + void invoke() { + final _$$ref = object$.ref; + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_invoke); + } + + /// invokeUsingIMP: + void invokeUsingIMP( + ffi.Pointer> imp, + ) { + final _$$ref = object$.ref; + _objc_msgSend_agmudd(_$$ref.pointer, _sel_invokeUsingIMP_, imp); + } + + /// invokeWithTarget: + void invokeWithTarget(objc.ObjCObject target) { + final _$$ref = object$.ref; + final _$$ref$1 = target.ref; + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_invokeWithTarget_, + _$$ref$1.pointer, + ); + } + + /// methodSignature + NSMethodSignature get methodSignature { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_methodSignature); + return NSMethodSignature.fromPointer($ret, retain: true, release: true); + } + + /// retainArguments + void retainArguments() { + final _$$ref = object$.ref; + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_retainArguments); + } + + /// selector + ffi.Pointer get selector { + final _$$ref = object$.ref; + return _objc_msgSend_1ovaulg(_$$ref.pointer, _sel_selector); + } + + /// setArgument:atIndex: + void setArgument( + ffi.Pointer argumentLocation, { + required int atIndex, + }) { + final _$$ref = object$.ref; + _objc_msgSend_unr2j3( + _$$ref.pointer, + _sel_setArgument_atIndex_, + argumentLocation, + atIndex, + ); + } + + /// setReturnValue: + void setReturnValue(ffi.Pointer retLoc) { + final _$$ref = object$.ref; + _objc_msgSend_ovsamd(_$$ref.pointer, _sel_setReturnValue_, retLoc); + } + + /// setSelector: + set selector(ffi.Pointer value) { + final _$$ref = object$.ref; + _objc_msgSend_1d9e4oe(_$$ref.pointer, _sel_setSelector_, value); + } + + /// setTarget: + set target(objc.ObjCObject? value) { + final _$$ref = object$.ref; + final _$$ref$1 = value?.ref; + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_setTarget_, + _$$ref$1?.pointer ?? ffi.nullptr, + ); + } + + /// target + objc.ObjCObject? get target { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_target); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } +} + +/// NSItemProvider +extension NSItemProvider on NSURL { + /// itemProviderVisibilityForRepresentationWithTypeIdentifier: + NSItemProviderRepresentationVisibility + itemProviderVisibilityForRepresentationWithTypeIdentifier( + NSString typeIdentifier, + ) { + final _$$ref = object$.ref; + final _$$ref$1 = typeIdentifier.ref; + objc.checkOsVersionInternal( + 'NSURL.itemProviderVisibilityForRepresentationWithTypeIdentifier:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + if (!objc.respondsToSelector( + _$$ref.pointer, + _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, + )) { + throw objc.UnimplementedOptionalMethodException( + 'NSURL', + 'itemProviderVisibilityForRepresentationWithTypeIdentifier:', + ); + } + final $ret = _objc_msgSend_16fy0up( + _$$ref.pointer, + _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, + _$$ref$1.pointer, + ); + return NSItemProviderRepresentationVisibility.fromValue($ret); + } + + /// loadDataWithTypeIdentifier:forItemProviderCompletionHandler: + NSProgress? loadDataWithTypeIdentifier( + NSString typeIdentifier, { + required objc.ObjCBlock + forItemProviderCompletionHandler, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = typeIdentifier.ref; + final _$$ref$2 = forItemProviderCompletionHandler.ref; + objc.checkOsVersionInternal( + 'NSURL.loadDataWithTypeIdentifier:forItemProviderCompletionHandler:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + final $ret = _objc_msgSend_r0bo0s( + _$$ref.pointer, + _sel_loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, + _$$ref$1.pointer, + _$$ref$2.pointer, + ); + return $ret.address == 0 + ? null + : NSProgress.fromPointer($ret, retain: true, release: true); + } + + /// writableTypeIdentifiersForItemProvider + NSArray get writableTypeIdentifiersForItemProvider { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.writableTypeIdentifiersForItemProvider', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + if (!objc.respondsToSelector( + _$$ref.pointer, + _sel_writableTypeIdentifiersForItemProvider, + )) { + throw objc.UnimplementedOptionalMethodException( + 'NSURL', + 'writableTypeIdentifiersForItemProvider', + ); + } + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_writableTypeIdentifiersForItemProvider, + ); + return NSArray.fromPointer($ret, retain: true, release: true); + } + + /// itemProviderVisibilityForRepresentationWithTypeIdentifier: + static NSItemProviderRepresentationVisibility + itemProviderVisibilityForRepresentationWithTypeIdentifier$1( + NSString typeIdentifier, + ) { + final _$$ref = typeIdentifier.ref; + objc.checkOsVersionInternal( + 'NSURL.itemProviderVisibilityForRepresentationWithTypeIdentifier:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + if (!objc.respondsToSelector( + _class_NSURL, + _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, + )) { + throw objc.UnimplementedOptionalMethodException( + 'NSURL', + 'itemProviderVisibilityForRepresentationWithTypeIdentifier:', + ); + } + final $ret = _objc_msgSend_16fy0up( + _class_NSURL, + _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, + _$$ref.pointer, + ); + return NSItemProviderRepresentationVisibility.fromValue($ret); + } + + /// readableTypeIdentifiersForItemProvider + static NSArray getReadableTypeIdentifiersForItemProvider() { + objc.checkOsVersionInternal( + 'NSURL.readableTypeIdentifiersForItemProvider', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _class_NSURL, + _sel_readableTypeIdentifiersForItemProvider, + ); + return NSArray.fromPointer($ret, retain: true, release: true); + } + + /// writableTypeIdentifiersForItemProvider + static NSArray getWritableTypeIdentifiersForItemProvider$1() { + objc.checkOsVersionInternal( + 'NSURL.writableTypeIdentifiersForItemProvider', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _class_NSURL, + _sel_writableTypeIdentifiersForItemProvider, + ); + return NSArray.fromPointer($ret, retain: true, release: true); + } +} + +/// NSItemProvider +extension NSItemProvider$1 on NSString { + /// itemProviderVisibilityForRepresentationWithTypeIdentifier: + NSItemProviderRepresentationVisibility + itemProviderVisibilityForRepresentationWithTypeIdentifier( + NSString typeIdentifier, + ) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = typeIdentifier.ref; + objc.checkOsVersionInternal( + 'NSString.itemProviderVisibilityForRepresentationWithTypeIdentifier:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + if (!objc.respondsToSelector( + _$$ref$2.pointer, + _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, + )) { + throw objc.UnimplementedOptionalMethodException( + 'NSString', + 'itemProviderVisibilityForRepresentationWithTypeIdentifier:', + ); + } + final $ret = _objc_msgSend_16fy0up( + _$$ref$2.pointer, + _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, + _$$ref$3.pointer, + ); + return NSItemProviderRepresentationVisibility.fromValue($ret); + } + + /// loadDataWithTypeIdentifier:forItemProviderCompletionHandler: + NSProgress? loadDataWithTypeIdentifier( + NSString typeIdentifier, { + required objc.ObjCBlock + forItemProviderCompletionHandler, + }) { + final _$$ref$3 = object$.ref; + final _$$ref$4 = typeIdentifier.ref; + final _$$ref$5 = forItemProviderCompletionHandler.ref; + objc.checkOsVersionInternal( + 'NSString.loadDataWithTypeIdentifier:forItemProviderCompletionHandler:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + final $ret = _objc_msgSend_r0bo0s( + _$$ref$3.pointer, + _sel_loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, + _$$ref$4.pointer, + _$$ref$5.pointer, + ); + return $ret.address == 0 + ? null + : NSProgress.fromPointer($ret, retain: true, release: true); + } + + /// writableTypeIdentifiersForItemProvider + NSArray get writableTypeIdentifiersForItemProvider { + final _$$ref$1 = object$.ref; + objc.checkOsVersionInternal( + 'NSString.writableTypeIdentifiersForItemProvider', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + if (!objc.respondsToSelector( + _$$ref$1.pointer, + _sel_writableTypeIdentifiersForItemProvider, + )) { + throw objc.UnimplementedOptionalMethodException( + 'NSString', + 'writableTypeIdentifiersForItemProvider', + ); + } + final $ret = _objc_msgSend_151sglz( + _$$ref$1.pointer, + _sel_writableTypeIdentifiersForItemProvider, + ); + return NSArray.fromPointer($ret, retain: true, release: true); + } + + /// itemProviderVisibilityForRepresentationWithTypeIdentifier: + static NSItemProviderRepresentationVisibility + itemProviderVisibilityForRepresentationWithTypeIdentifier$1( + NSString typeIdentifier, + ) { + final _$$ref$1 = typeIdentifier.ref; + objc.checkOsVersionInternal( + 'NSString.itemProviderVisibilityForRepresentationWithTypeIdentifier:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + if (!objc.respondsToSelector( + _class_NSString, + _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, + )) { + throw objc.UnimplementedOptionalMethodException( + 'NSString', + 'itemProviderVisibilityForRepresentationWithTypeIdentifier:', + ); + } + final $ret = _objc_msgSend_16fy0up( + _class_NSString, + _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, + _$$ref$1.pointer, + ); + return NSItemProviderRepresentationVisibility.fromValue($ret); + } + + /// readableTypeIdentifiersForItemProvider + static NSArray getReadableTypeIdentifiersForItemProvider() { + objc.checkOsVersionInternal( + 'NSString.readableTypeIdentifiersForItemProvider', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _class_NSString, + _sel_readableTypeIdentifiersForItemProvider, + ); + return NSArray.fromPointer($ret, retain: true, release: true); + } + + /// writableTypeIdentifiersForItemProvider + static NSArray getWritableTypeIdentifiersForItemProvider$1() { + objc.checkOsVersionInternal( + 'NSString.writableTypeIdentifiersForItemProvider', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _class_NSString, + _sel_writableTypeIdentifiersForItemProvider, + ); + return NSArray.fromPointer($ret, retain: true, release: true); + } +} + +/// NSItemProvider +extension type NSItemProvider$2._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject, NSCopying { + /// Constructs a [NSItemProvider$2] that points to the same underlying object as [other]. + NSItemProvider$2.as(objc.ObjCObject other) : object$ = other { + objc.checkOsVersionInternal( + 'NSItemProvider', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + assert(isA(object$)); + } + + /// Constructs a [NSItemProvider$2] that wraps the given raw object pointer. + NSItemProvider$2.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + objc.checkOsVersionInternal( + 'NSItemProvider', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + assert(isA(object$)); + } + + /// Returns whether [obj] is an instance of [NSItemProvider$2]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSItemProvider, + ); + + /// alloc + static NSItemProvider$2 alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSItemProvider, _sel_alloc); + return NSItemProvider$2.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NSItemProvider$2 allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSItemProvider, + _sel_allocWithZone_, + zone, + ); + return NSItemProvider$2.fromPointer($ret, retain: false, release: true); + } + + /// new + static NSItemProvider$2 new$() { + final $ret = _objc_msgSend_151sglz(_class_NSItemProvider, _sel_new); + return NSItemProvider$2.fromPointer($ret, retain: false, release: true); + } + + /// Returns a new instance of NSItemProvider$2 constructed with the default `new` method. + NSItemProvider$2() : this.as(new$().object$); +} + +extension NSItemProvider$2$Methods on NSItemProvider$2 { + /// canLoadObjectOfClass: + bool canLoadObjectOfClass(NSItemProviderReading aClass) { + final _$$ref = object$.ref; + final _$$ref$1 = aClass.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.canLoadObjectOfClass:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_canLoadObjectOfClass_, + _$$ref$1.pointer, + ); + } + + /// hasItemConformingToTypeIdentifier: + bool hasItemConformingToTypeIdentifier(NSString typeIdentifier) { + final _$$ref = object$.ref; + final _$$ref$1 = typeIdentifier.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.hasItemConformingToTypeIdentifier:', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_hasItemConformingToTypeIdentifier_, + _$$ref$1.pointer, + ); + } + + /// hasRepresentationConformingToTypeIdentifier:fileOptions: + bool hasRepresentationConformingToTypeIdentifier( + NSString typeIdentifier, { + required int fileOptions, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = typeIdentifier.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.hasRepresentationConformingToTypeIdentifier:fileOptions:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + return _objc_msgSend_1wdb8ji( + _$$ref.pointer, + _sel_hasRepresentationConformingToTypeIdentifier_fileOptions_, + _$$ref$1.pointer, + fileOptions, + ); + } + + /// init + NSItemProvider$2 init() { + final _$$ref$19 = object$.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref$19.retainAndReturnPointer(), + _sel_init, + ); + return NSItemProvider$2.fromPointer($ret, retain: false, release: true); + } + + /// initWithContentsOfURL: + NSItemProvider$2? initWithContentsOfURL(NSURL fileURL) { + final _$$ref = object$.ref; + final _$$ref$1 = fileURL.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.initWithContentsOfURL:', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.retainAndReturnPointer(), + _sel_initWithContentsOfURL_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : NSItemProvider$2.fromPointer($ret, retain: false, release: true); + } + + /// initWithItem:typeIdentifier: + NSItemProvider$2 initWithItem( + NSSecureCoding? item, { + NSString? typeIdentifier, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = item?.ref; + final _$$ref$2 = typeIdentifier?.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.initWithItem:typeIdentifier:', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + _$$ref.retainAndReturnPointer(), + _sel_initWithItem_typeIdentifier_, + _$$ref$1?.pointer ?? ffi.nullptr, + _$$ref$2?.pointer ?? ffi.nullptr, + ); + return NSItemProvider$2.fromPointer($ret, retain: false, release: true); + } + + /// initWithObject: + NSItemProvider$2 initWithObject(NSItemProviderWriting object) { + final _$$ref = object$.ref; + final _$$ref$1 = object.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.initWithObject:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.retainAndReturnPointer(), + _sel_initWithObject_, + _$$ref$1.pointer, + ); + return NSItemProvider$2.fromPointer($ret, retain: false, release: true); + } + + /// loadDataRepresentationForTypeIdentifier:completionHandler: + NSProgress loadDataRepresentationForTypeIdentifier( + NSString typeIdentifier, { + required objc.ObjCBlock + completionHandler, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = typeIdentifier.ref; + final _$$ref$2 = completionHandler.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.loadDataRepresentationForTypeIdentifier:completionHandler:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + final $ret = _objc_msgSend_r0bo0s( + _$$ref.pointer, + _sel_loadDataRepresentationForTypeIdentifier_completionHandler_, + _$$ref$1.pointer, + _$$ref$2.pointer, + ); + return NSProgress.fromPointer($ret, retain: true, release: true); + } + + /// loadFileRepresentationForTypeIdentifier:completionHandler: + NSProgress loadFileRepresentationForTypeIdentifier( + NSString typeIdentifier, { + required objc.ObjCBlock + completionHandler, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = typeIdentifier.ref; + final _$$ref$2 = completionHandler.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.loadFileRepresentationForTypeIdentifier:completionHandler:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + final $ret = _objc_msgSend_r0bo0s( + _$$ref.pointer, + _sel_loadFileRepresentationForTypeIdentifier_completionHandler_, + _$$ref$1.pointer, + _$$ref$2.pointer, + ); + return NSProgress.fromPointer($ret, retain: true, release: true); + } + + /// loadInPlaceFileRepresentationForTypeIdentifier:completionHandler: + NSProgress loadInPlaceFileRepresentationForTypeIdentifier( + NSString typeIdentifier, { + required objc.ObjCBlock + completionHandler, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = typeIdentifier.ref; + final _$$ref$2 = completionHandler.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + final $ret = _objc_msgSend_r0bo0s( + _$$ref.pointer, + _sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_, + _$$ref$1.pointer, + _$$ref$2.pointer, + ); + return NSProgress.fromPointer($ret, retain: true, release: true); + } + + /// loadItemForTypeIdentifier:options:completionHandler: + void loadItemForTypeIdentifier( + NSString typeIdentifier, { + NSDictionary? options, + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >? + completionHandler, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = typeIdentifier.ref; + final _$$ref$2 = options?.ref; + final _$$ref$3 = completionHandler?.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.loadItemForTypeIdentifier:options:completionHandler:', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + _objc_msgSend_18qun1e( + _$$ref.pointer, + _sel_loadItemForTypeIdentifier_options_completionHandler_, + _$$ref$1.pointer, + _$$ref$2?.pointer ?? ffi.nullptr, + _$$ref$3?.pointer ?? ffi.nullptr, + ); + } + + /// loadObjectOfClass:completionHandler: + NSProgress loadObjectOfClass( + NSItemProviderReading aClass, { + required objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError?) + > + completionHandler, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = aClass.ref; + final _$$ref$2 = completionHandler.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.loadObjectOfClass:completionHandler:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + final $ret = _objc_msgSend_r0bo0s( + _$$ref.pointer, + _sel_loadObjectOfClass_completionHandler_, + _$$ref$1.pointer, + _$$ref$2.pointer, + ); + return NSProgress.fromPointer($ret, retain: true, release: true); + } + + /// registerDataRepresentationForTypeIdentifier:visibility:loadHandler: + void registerDataRepresentationForTypeIdentifier( + NSString typeIdentifier, { + required NSItemProviderRepresentationVisibility visibility, + required objc.ObjCBlock< + NSProgress? Function(objc.ObjCBlock) + > + loadHandler, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = typeIdentifier.ref; + final _$$ref$2 = loadHandler.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.registerDataRepresentationForTypeIdentifier:visibility:loadHandler:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + _objc_msgSend_1pl40xc( + _$$ref.pointer, + _sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_, + _$$ref$1.pointer, + visibility.value, + _$$ref$2.pointer, + ); + } + + /// registerFileRepresentationForTypeIdentifier:fileOptions:visibility:loadHandler: + void registerFileRepresentationForTypeIdentifier( + NSString typeIdentifier, { + required int fileOptions, + required NSItemProviderRepresentationVisibility visibility, + required objc.ObjCBlock< + NSProgress? Function( + objc.ObjCBlock, + ) + > + loadHandler, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = typeIdentifier.ref; + final _$$ref$2 = loadHandler.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.registerFileRepresentationForTypeIdentifier:fileOptions:visibility:loadHandler:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + _objc_msgSend_t7arir( + _$$ref.pointer, + _sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_, + _$$ref$1.pointer, + fileOptions, + visibility.value, + _$$ref$2.pointer, + ); + } + + /// registerItemForTypeIdentifier:loadHandler: + void registerItemForTypeIdentifier( + NSString typeIdentifier, { + required objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + ffi.Pointer, + NSDictionary, + ) + > + loadHandler, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = typeIdentifier.ref; + final _$$ref$2 = loadHandler.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.registerItemForTypeIdentifier:loadHandler:', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + _objc_msgSend_o762yo( + _$$ref.pointer, + _sel_registerItemForTypeIdentifier_loadHandler_, + _$$ref$1.pointer, + _$$ref$2.pointer, + ); + } + + /// registerObject:visibility: + void registerObject( + NSItemProviderWriting object, { + required NSItemProviderRepresentationVisibility visibility, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = object.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.registerObject:visibility:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + _objc_msgSend_1k745tv( + _$$ref.pointer, + _sel_registerObject_visibility_, + _$$ref$1.pointer, + visibility.value, + ); + } + + /// registerObjectOfClass:visibility:loadHandler: + void registerObjectOfClass( + NSItemProviderWriting aClass, { + required NSItemProviderRepresentationVisibility visibility, + required objc.ObjCBlock< + NSProgress? Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError?) + >, + ) + > + loadHandler, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = aClass.ref; + final _$$ref$2 = loadHandler.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.registerObjectOfClass:visibility:loadHandler:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + _objc_msgSend_1pl40xc( + _$$ref.pointer, + _sel_registerObjectOfClass_visibility_loadHandler_, + _$$ref$1.pointer, + visibility.value, + _$$ref$2.pointer, + ); + } + + /// registeredTypeIdentifiers + NSArray get registeredTypeIdentifiers { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.registeredTypeIdentifiers', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_registeredTypeIdentifiers, + ); + return NSArray.fromPointer($ret, retain: true, release: true); + } + + /// registeredTypeIdentifiersWithFileOptions: + NSArray registeredTypeIdentifiersWithFileOptions(int fileOptions) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.registeredTypeIdentifiersWithFileOptions:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + final $ret = _objc_msgSend_7g3u2y( + _$$ref.pointer, + _sel_registeredTypeIdentifiersWithFileOptions_, + fileOptions, + ); + return NSArray.fromPointer($ret, retain: true, release: true); + } + + /// setSuggestedName: + set suggestedName(NSString? value) { + final _$$ref = object$.ref; + final _$$ref$1 = value?.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.setSuggestedName:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 14, 0)), + ); + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_setSuggestedName_, + _$$ref$1?.pointer ?? ffi.nullptr, + ); + } + + /// suggestedName + NSString? get suggestedName { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.suggestedName', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 14, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_suggestedName); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); + } +} + +sealed class NSItemProviderFileOptions { + static const NSItemProviderFileOptionOpenInPlace = 1; +} + +/// NSItemProviderReading +extension type NSItemProviderReading._(objc.ObjCProtocol object$) + implements objc.ObjCProtocol, NSObjectProtocol { + /// Constructs a [NSItemProviderReading] that points to the same underlying object as [other]. + NSItemProviderReading.as(objc.ObjCObject other) : object$ = other; + + /// Constructs a [NSItemProviderReading] that wraps the given raw object pointer. + NSItemProviderReading.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSItemProviderReading]. + static bool conformsTo(objc.ObjCObject obj) { + return _objc_msgSend_e3qsqz( + obj.ref.pointer, + _sel_conformsToProtocol_, + _protocol_NSItemProviderReading, + ); + } +} + +extension NSItemProviderReading$Methods on NSItemProviderReading {} + +interface class NSItemProviderReading$Builder { + /// Returns the [objc.Protocol] object for this protocol. + static objc.Protocol get $protocol => + objc.Protocol.fromPointer(_protocol_NSItemProviderReading.cast()); + + /// Builds an object that implements the NSItemProviderReading protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + /// + /// If `$keepIsolateAlive` is true, this protocol will keep this isolate + /// alive until it is garbage collected by both Dart and ObjC. + static NSItemProviderReading implement({bool $keepIsolateAlive = true}) { + final builder = objc.ObjCProtocolBuilder( + debugName: 'NSItemProviderReading', + ); + + builder.addProtocol($protocol); + return NSItemProviderReading.as( + builder.build(keepIsolateAlive: $keepIsolateAlive), + ); + } + + /// Adds the implementation of the NSItemProviderReading protocol to an existing + /// [objc.ObjCProtocolBuilder]. + /// + /// Note: You cannot call this method after you have called `builder.build`. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, { + bool $keepIsolateAlive = true, + }) { + builder.addProtocol($protocol); + } +} + +enum NSItemProviderRepresentationVisibility { + NSItemProviderRepresentationVisibilityAll(0), + NSItemProviderRepresentationVisibilityTeam(1), + NSItemProviderRepresentationVisibilityGroup(2), + NSItemProviderRepresentationVisibilityOwnProcess(3); + + final int value; + const NSItemProviderRepresentationVisibility(this.value); + + static NSItemProviderRepresentationVisibility fromValue(int value) => + switch (value) { + 0 => NSItemProviderRepresentationVisibilityAll, + 1 => NSItemProviderRepresentationVisibilityTeam, + 2 => NSItemProviderRepresentationVisibilityGroup, + 3 => NSItemProviderRepresentationVisibilityOwnProcess, + _ => throw ArgumentError( + 'Unknown value for NSItemProviderRepresentationVisibility: $value', + ), + }; +} + +/// NSItemProviderWriting +extension type NSItemProviderWriting._(objc.ObjCProtocol object$) + implements objc.ObjCProtocol, NSObjectProtocol { + /// Constructs a [NSItemProviderWriting] that points to the same underlying object as [other]. + NSItemProviderWriting.as(objc.ObjCObject other) : object$ = other; + + /// Constructs a [NSItemProviderWriting] that wraps the given raw object pointer. + NSItemProviderWriting.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSItemProviderWriting]. + static bool conformsTo(objc.ObjCObject obj) { + return _objc_msgSend_e3qsqz( + obj.ref.pointer, + _sel_conformsToProtocol_, + _protocol_NSItemProviderWriting, + ); + } +} + +extension NSItemProviderWriting$Methods on NSItemProviderWriting { + /// itemProviderVisibilityForRepresentationWithTypeIdentifier: + NSItemProviderRepresentationVisibility + itemProviderVisibilityForRepresentationWithTypeIdentifier( + NSString typeIdentifier, + ) { + final _$$ref$4 = object$.ref; + final _$$ref$5 = typeIdentifier.ref; + objc.checkOsVersionInternal( + 'NSItemProviderWriting.itemProviderVisibilityForRepresentationWithTypeIdentifier:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + if (!objc.respondsToSelector( + _$$ref$4.pointer, + _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, + )) { + throw objc.UnimplementedOptionalMethodException( + 'NSItemProviderWriting', + 'itemProviderVisibilityForRepresentationWithTypeIdentifier:', + ); + } + final $ret = _objc_msgSend_16fy0up( + _$$ref$4.pointer, + _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, + _$$ref$5.pointer, + ); + return NSItemProviderRepresentationVisibility.fromValue($ret); + } + + /// loadDataWithTypeIdentifier:forItemProviderCompletionHandler: + NSProgress? loadDataWithTypeIdentifier( + NSString typeIdentifier, { + required objc.ObjCBlock + forItemProviderCompletionHandler, + }) { + final _$$ref$6 = object$.ref; + final _$$ref$7 = typeIdentifier.ref; + final _$$ref$8 = forItemProviderCompletionHandler.ref; + objc.checkOsVersionInternal( + 'NSItemProviderWriting.loadDataWithTypeIdentifier:forItemProviderCompletionHandler:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + final $ret = _objc_msgSend_r0bo0s( + _$$ref$6.pointer, + _sel_loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, + _$$ref$7.pointer, + _$$ref$8.pointer, + ); + return $ret.address == 0 + ? null + : NSProgress.fromPointer($ret, retain: true, release: true); + } + + /// writableTypeIdentifiersForItemProvider + NSArray get writableTypeIdentifiersForItemProvider { + final _$$ref$2 = object$.ref; + objc.checkOsVersionInternal( + 'NSItemProviderWriting.writableTypeIdentifiersForItemProvider', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + if (!objc.respondsToSelector( + _$$ref$2.pointer, + _sel_writableTypeIdentifiersForItemProvider, + )) { + throw objc.UnimplementedOptionalMethodException( + 'NSItemProviderWriting', + 'writableTypeIdentifiersForItemProvider', + ); + } + final $ret = _objc_msgSend_151sglz( + _$$ref$2.pointer, + _sel_writableTypeIdentifiersForItemProvider, + ); + return NSArray.fromPointer($ret, retain: true, release: true); + } +} + +interface class NSItemProviderWriting$Builder { + /// Returns the [objc.Protocol] object for this protocol. + static objc.Protocol get $protocol => + objc.Protocol.fromPointer(_protocol_NSItemProviderWriting.cast()); + + /// Builds an object that implements the NSItemProviderWriting protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + /// + /// If `$keepIsolateAlive` is true, this protocol will keep this isolate + /// alive until it is garbage collected by both Dart and ObjC. + static NSItemProviderWriting implement({ + NSItemProviderRepresentationVisibility Function(NSString)? + itemProviderVisibilityForRepresentationWithTypeIdentifier_, + required NSProgress? Function( + NSString, + objc.ObjCBlock, + ) + loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, + NSArray Function()? writableTypeIdentifiersForItemProvider, + bool $keepIsolateAlive = true, + }) { + final builder = objc.ObjCProtocolBuilder( + debugName: 'NSItemProviderWriting', + ); + NSItemProviderWriting$Builder + .itemProviderVisibilityForRepresentationWithTypeIdentifier_ + .implement( + builder, + itemProviderVisibilityForRepresentationWithTypeIdentifier_, + ); + NSItemProviderWriting$Builder + .loadDataWithTypeIdentifier_forItemProviderCompletionHandler_ + .implement( + builder, + loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, + ); + NSItemProviderWriting$Builder.writableTypeIdentifiersForItemProvider + .implement(builder, writableTypeIdentifiersForItemProvider); + builder.addProtocol($protocol); + return NSItemProviderWriting.as( + builder.build(keepIsolateAlive: $keepIsolateAlive), + ); + } + + /// Adds the implementation of the NSItemProviderWriting protocol to an existing + /// [objc.ObjCProtocolBuilder]. + /// + /// Note: You cannot call this method after you have called `builder.build`. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, { + NSItemProviderRepresentationVisibility Function(NSString)? + itemProviderVisibilityForRepresentationWithTypeIdentifier_, + required NSProgress? Function( + NSString, + objc.ObjCBlock, + ) + loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, + NSArray Function()? writableTypeIdentifiersForItemProvider, + bool $keepIsolateAlive = true, + }) { + NSItemProviderWriting$Builder + .itemProviderVisibilityForRepresentationWithTypeIdentifier_ + .implement( + builder, + itemProviderVisibilityForRepresentationWithTypeIdentifier_, + ); + NSItemProviderWriting$Builder + .loadDataWithTypeIdentifier_forItemProviderCompletionHandler_ + .implement( + builder, + loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, + ); + NSItemProviderWriting$Builder.writableTypeIdentifiersForItemProvider + .implement(builder, writableTypeIdentifiersForItemProvider); + builder.addProtocol($protocol); + } + + /// itemProviderVisibilityForRepresentationWithTypeIdentifier: + static final itemProviderVisibilityForRepresentationWithTypeIdentifier_ = + objc.ObjCProtocolMethod< + NSItemProviderRepresentationVisibility Function(NSString) + >( + _protocol_NSItemProviderWriting, + _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_1ldqghh) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSItemProviderWriting, + _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, + isRequired: false, + isInstanceMethod: true, + ), + (NSItemProviderRepresentationVisibility Function(NSString) func) => + ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString.fromFunction( + (ffi.Pointer _, NSString arg1) => func(arg1), + ), + ); + + /// loadDataWithTypeIdentifier:forItemProviderCompletionHandler: + static final loadDataWithTypeIdentifier_forItemProviderCompletionHandler_ = + objc.ObjCProtocolMethod< + NSProgress? Function( + NSString, + objc.ObjCBlock, + ) + >( + _protocol_NSItemProviderWriting, + _sel_loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_1q0i84) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSItemProviderWriting, + _sel_loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + NSProgress? Function( + NSString, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError.fromFunction( + ( + ffi.Pointer _, + NSString arg1, + objc.ObjCBlock arg2, + ) => func(arg1, arg2), + ), + ); + + /// writableTypeIdentifiersForItemProvider + static final writableTypeIdentifiersForItemProvider = + objc.ObjCProtocolMethod( + _protocol_NSItemProviderWriting, + _sel_writableTypeIdentifiersForItemProvider, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_1mbt9g9) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSItemProviderWriting, + _sel_writableTypeIdentifiersForItemProvider, + isRequired: false, + isInstanceMethod: true, + ), + (NSArray Function() func) => ObjCBlock_NSArray_ffiVoid.fromFunction( + (ffi.Pointer _) => func(), + ), + ); +} + +enum NSKeyValueChange { + NSKeyValueChangeSetting(1), + NSKeyValueChangeInsertion(2), + NSKeyValueChangeRemoval(3), + NSKeyValueChangeReplacement(4); + + final int value; + const NSKeyValueChange(this.value); + + static NSKeyValueChange fromValue(int value) => switch (value) { + 1 => NSKeyValueChangeSetting, + 2 => NSKeyValueChangeInsertion, + 3 => NSKeyValueChangeRemoval, + 4 => NSKeyValueChangeReplacement, + _ => throw ArgumentError('Unknown value for NSKeyValueChange: $value'), + }; +} + +/// NSKeyValueCoding +extension NSKeyValueCoding on NSSet { + /// setValue:forKey: + void setValue(objc.ObjCObject? value, {required NSString forKey}) { + final _$$ref = object$.ref; + final _$$ref$1 = value?.ref; + final _$$ref$2 = forKey.ref; + _objc_msgSend_pfv6jd( + _$$ref.pointer, + _sel_setValue_forKey_, + _$$ref$1?.pointer ?? ffi.nullptr, + _$$ref$2.pointer, ); - return NSInputStream.fromPointer($ret, retain: false, release: true); } - /// inputStreamWithData: - static NSInputStream? inputStreamWithData(NSData data) { - final _$$ref$1 = data.ref; + /// valueForKey: + objc.ObjCObject valueForKey(NSString key) { + final _$$ref = object$.ref; + final _$$ref$1 = key.ref; final $ret = _objc_msgSend_1sotr3r( - _class_NSInputStream, - _sel_inputStreamWithData_, + _$$ref.pointer, + _sel_valueForKey_, _$$ref$1.pointer, ); - return $ret.address == 0 - ? null - : NSInputStream.fromPointer($ret, retain: true, release: true); + return objc.ObjCObject($ret, retain: true, release: true); } +} - /// inputStreamWithFileAtPath: - static NSInputStream? inputStreamWithFileAtPath(NSString path) { - final _$$ref$1 = path.ref; +/// NSKeyValueCoding +extension NSKeyValueCoding$1 on NSDictionary { + /// valueForKey: + objc.ObjCObject? valueForKey(NSString key) { + final _$$ref = object$.ref; + final _$$ref$1 = key.ref; final $ret = _objc_msgSend_1sotr3r( - _class_NSInputStream, - _sel_inputStreamWithFileAtPath_, + _$$ref.pointer, + _sel_valueForKey_, _$$ref$1.pointer, ); return $ret.address == 0 ? null - : NSInputStream.fromPointer($ret, retain: true, release: true); + : objc.ObjCObject($ret, retain: true, release: true); } +} - /// inputStreamWithURL: - static NSInputStream? inputStreamWithURL(NSURL url) { - final _$$ref$1 = url.ref; +/// NSKeyValueCoding +extension NSKeyValueCoding$2 on NSObject { + /// dictionaryWithValuesForKeys: + NSDictionary dictionaryWithValuesForKeys(NSArray keys) { + final _$$ref = object$.ref; + final _$$ref$1 = keys.ref; objc.checkOsVersionInternal( - 'NSInputStream.inputStreamWithURL:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSObject.dictionaryWithValuesForKeys:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); final $ret = _objc_msgSend_1sotr3r( - _class_NSInputStream, - _sel_inputStreamWithURL_, + _$$ref.pointer, + _sel_dictionaryWithValuesForKeys_, _$$ref$1.pointer, ); - return $ret.address == 0 - ? null - : NSInputStream.fromPointer($ret, retain: true, release: true); - } - - /// new - static NSInputStream new$() { - final $ret = _objc_msgSend_151sglz(_class_NSInputStream, _sel_new); - return NSInputStream.fromPointer($ret, retain: false, release: true); + return NSDictionary.fromPointer($ret, retain: true, release: true); } - /// Returns a new instance of NSInputStream constructed with the default `new` method. - NSInputStream() : this.as(new$().object$); -} - -extension NSInputStream$Methods on NSInputStream { - /// getBuffer:length: - bool getBuffer( - ffi.Pointer> buffer, { - required ffi.Pointer length, - }) { + /// mutableArrayValueForKey: + NSMutableArray mutableArrayValueForKey(NSString key) { final _$$ref = object$.ref; - return _objc_msgSend_19lrthf( + final _$$ref$1 = key.ref; + objc.checkOsVersionInternal( + 'NSObject.mutableArrayValueForKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_getBuffer_length_, - buffer, - length, + _sel_mutableArrayValueForKey_, + _$$ref$1.pointer, ); + return NSMutableArray.fromPointer($ret, retain: true, release: true); } - /// hasBytesAvailable - bool get hasBytesAvailable { + /// mutableArrayValueForKeyPath: + NSMutableArray mutableArrayValueForKeyPath(NSString keyPath) { final _$$ref = object$.ref; - return _objc_msgSend_91o635(_$$ref.pointer, _sel_hasBytesAvailable); - } - - /// init - NSInputStream init() { - final _$$ref$17 = object$.ref; + final _$$ref$1 = keyPath.ref; objc.checkOsVersionInternal( - 'NSInputStream.init', + 'NSObject.mutableArrayValueForKeyPath:', iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); - final $ret = _objc_msgSend_151sglz( - _$$ref$17.retainAndReturnPointer(), - _sel_init, - ); - return NSInputStream.fromPointer($ret, retain: false, release: true); - } - - /// initWithData: - NSInputStream initWithData(NSData data) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = data.ref; final $ret = _objc_msgSend_1sotr3r( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithData_, - _$$ref$3.pointer, + _$$ref.pointer, + _sel_mutableArrayValueForKeyPath_, + _$$ref$1.pointer, ); - return NSInputStream.fromPointer($ret, retain: false, release: true); + return NSMutableArray.fromPointer($ret, retain: true, release: true); } - /// initWithFileAtPath: - NSInputStream? initWithFileAtPath(NSString path) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = path.ref; + /// mutableOrderedSetValueForKey: + NSMutableOrderedSet mutableOrderedSetValueForKey(NSString key) { + final _$$ref = object$.ref; + final _$$ref$1 = key.ref; + objc.checkOsVersionInternal( + 'NSObject.mutableOrderedSetValueForKey:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); final $ret = _objc_msgSend_1sotr3r( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithFileAtPath_, - _$$ref$3.pointer, + _$$ref.pointer, + _sel_mutableOrderedSetValueForKey_, + _$$ref$1.pointer, ); - return $ret.address == 0 - ? null - : NSInputStream.fromPointer($ret, retain: false, release: true); + return NSMutableOrderedSet.fromPointer($ret, retain: true, release: true); } - /// initWithURL: - NSInputStream? initWithURL(NSURL url) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = url.ref; + /// mutableOrderedSetValueForKeyPath: + NSMutableOrderedSet mutableOrderedSetValueForKeyPath(NSString keyPath) { + final _$$ref = object$.ref; + final _$$ref$1 = keyPath.ref; objc.checkOsVersionInternal( - 'NSInputStream.initWithURL:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSObject.mutableOrderedSetValueForKeyPath:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); final $ret = _objc_msgSend_1sotr3r( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithURL_, - _$$ref$3.pointer, + _$$ref.pointer, + _sel_mutableOrderedSetValueForKeyPath_, + _$$ref$1.pointer, ); - return $ret.address == 0 - ? null - : NSInputStream.fromPointer($ret, retain: false, release: true); + return NSMutableOrderedSet.fromPointer($ret, retain: true, release: true); } - /// read:maxLength: - int read(ffi.Pointer buffer, {required int maxLength}) { + /// mutableSetValueForKey: + NSMutableSet mutableSetValueForKey(NSString key) { final _$$ref = object$.ref; - return _objc_msgSend_11e9f5x( + final _$$ref$1 = key.ref; + objc.checkOsVersionInternal( + 'NSObject.mutableSetValueForKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_read_maxLength_, - buffer, - maxLength, + _sel_mutableSetValueForKey_, + _$$ref$1.pointer, ); - } -} - -/// NSInvocation -extension type NSInvocation._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject { - /// Constructs a [NSInvocation] that points to the same underlying object as [other]. - NSInvocation.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); - } - - /// Constructs a [NSInvocation] that wraps the given raw object pointer. - NSInvocation.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); - } - - /// Returns whether [obj] is an instance of [NSInvocation]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSInvocation, - ); - - /// alloc - static NSInvocation alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSInvocation, _sel_alloc); - return NSInvocation.fromPointer($ret, retain: false, release: true); + return NSMutableSet.fromPointer($ret, retain: true, release: true); } - /// allocWithZone: - static NSInvocation allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSInvocation, - _sel_allocWithZone_, - zone, + /// mutableSetValueForKeyPath: + NSMutableSet mutableSetValueForKeyPath(NSString keyPath) { + final _$$ref = object$.ref; + final _$$ref$1 = keyPath.ref; + objc.checkOsVersionInternal( + 'NSObject.mutableSetValueForKeyPath:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - return NSInvocation.fromPointer($ret, retain: false, release: true); - } - - /// invocationWithMethodSignature: - static NSInvocation invocationWithMethodSignature(NSMethodSignature sig) { - final _$$ref = sig.ref; final $ret = _objc_msgSend_1sotr3r( - _class_NSInvocation, - _sel_invocationWithMethodSignature_, _$$ref.pointer, + _sel_mutableSetValueForKeyPath_, + _$$ref$1.pointer, ); - return NSInvocation.fromPointer($ret, retain: true, release: true); - } - - /// new - static NSInvocation new$() { - final $ret = _objc_msgSend_151sglz(_class_NSInvocation, _sel_new); - return NSInvocation.fromPointer($ret, retain: false, release: true); - } - - /// Returns a new instance of NSInvocation constructed with the default `new` method. - NSInvocation() : this.as(new$().object$); -} - -extension NSInvocation$Methods on NSInvocation { - /// argumentsRetained - bool get argumentsRetained { - final _$$ref = object$.ref; - return _objc_msgSend_91o635(_$$ref.pointer, _sel_argumentsRetained); + return NSMutableSet.fromPointer($ret, retain: true, release: true); } - /// getArgument:atIndex: - void getArgument( - ffi.Pointer argumentLocation, { - required int atIndex, - }) { + /// setNilValueForKey: + void setNilValueForKey(NSString key) { final _$$ref = object$.ref; - _objc_msgSend_unr2j3( + final _$$ref$1 = key.ref; + objc.checkOsVersionInternal( + 'NSObject.setNilValueForKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_getArgument_atIndex_, - argumentLocation, - atIndex, + _sel_setNilValueForKey_, + _$$ref$1.pointer, ); } - /// getReturnValue: - void getReturnValue(ffi.Pointer retLoc) { + /// setValue:forKey: + void setValue(objc.ObjCObject? value, {required NSString forKey}) { final _$$ref = object$.ref; - _objc_msgSend_ovsamd(_$$ref.pointer, _sel_getReturnValue_, retLoc); - } - - /// init - NSInvocation init() { - final _$$ref$18 = object$.ref; + final _$$ref$1 = value?.ref; + final _$$ref$2 = forKey.ref; objc.checkOsVersionInternal( - 'NSInvocation.init', + 'NSObject.setValue:forKey:', iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); - final $ret = _objc_msgSend_151sglz( - _$$ref$18.retainAndReturnPointer(), - _sel_init, + _objc_msgSend_pfv6jd( + _$$ref.pointer, + _sel_setValue_forKey_, + _$$ref$1?.pointer ?? ffi.nullptr, + _$$ref$2.pointer, ); - return NSInvocation.fromPointer($ret, retain: false, release: true); } - /// invoke - void invoke() { + /// setValue:forKeyPath: + void setValue$1(objc.ObjCObject? value, {required NSString forKeyPath}) { final _$$ref = object$.ref; - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_invoke); + final _$$ref$1 = value?.ref; + final _$$ref$2 = forKeyPath.ref; + objc.checkOsVersionInternal( + 'NSObject.setValue:forKeyPath:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_pfv6jd( + _$$ref.pointer, + _sel_setValue_forKeyPath_, + _$$ref$1?.pointer ?? ffi.nullptr, + _$$ref$2.pointer, + ); } - /// invokeUsingIMP: - void invokeUsingIMP( - ffi.Pointer> imp, - ) { + /// setValue:forUndefinedKey: + void setValue$2(objc.ObjCObject? value, {required NSString forUndefinedKey}) { final _$$ref = object$.ref; - _objc_msgSend_agmudd(_$$ref.pointer, _sel_invokeUsingIMP_, imp); + final _$$ref$1 = value?.ref; + final _$$ref$2 = forUndefinedKey.ref; + objc.checkOsVersionInternal( + 'NSObject.setValue:forUndefinedKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_pfv6jd( + _$$ref.pointer, + _sel_setValue_forUndefinedKey_, + _$$ref$1?.pointer ?? ffi.nullptr, + _$$ref$2.pointer, + ); } - /// invokeWithTarget: - void invokeWithTarget(objc.ObjCObject target) { + /// setValuesForKeysWithDictionary: + void setValuesForKeysWithDictionary(NSDictionary keyedValues) { final _$$ref = object$.ref; - final _$$ref$1 = target.ref; + final _$$ref$1 = keyedValues.ref; + objc.checkOsVersionInternal( + 'NSObject.setValuesForKeysWithDictionary:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_invokeWithTarget_, + _sel_setValuesForKeysWithDictionary_, _$$ref$1.pointer, ); } - /// methodSignature - NSMethodSignature get methodSignature { + /// validateValue:forKey:error: + bool validateValue( + ffi.Pointer> ioValue, { + required NSString forKey, + }) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_methodSignature); - return NSMethodSignature.fromPointer($ret, retain: true, release: true); + final _$$ref$1 = forKey.ref; + objc.checkOsVersionInternal( + 'NSObject.validateValue:forKey:error:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1j9bhml( + _$$ref.pointer, + _sel_validateValue_forKey_error_, + ioValue, + _$$ref$1.pointer, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret; + } finally { + pkg_ffi.calloc.free($err); + } } - /// retainArguments - void retainArguments() { + /// validateValue:forKeyPath:error: + bool validateValue$1( + ffi.Pointer> ioValue, { + required NSString forKeyPath, + }) { final _$$ref = object$.ref; - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_retainArguments); + final _$$ref$1 = forKeyPath.ref; + objc.checkOsVersionInternal( + 'NSObject.validateValue:forKeyPath:error:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1j9bhml( + _$$ref.pointer, + _sel_validateValue_forKeyPath_error_, + ioValue, + _$$ref$1.pointer, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret; + } finally { + pkg_ffi.calloc.free($err); + } } - /// selector - ffi.Pointer get selector { + /// valueForKey: + objc.ObjCObject? valueForKey(NSString key) { final _$$ref = object$.ref; - return _objc_msgSend_1ovaulg(_$$ref.pointer, _sel_selector); + final _$$ref$1 = key.ref; + objc.checkOsVersionInternal( + 'NSObject.valueForKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_valueForKey_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); } - /// setArgument:atIndex: - void setArgument( - ffi.Pointer argumentLocation, { - required int atIndex, - }) { + /// valueForKeyPath: + objc.ObjCObject? valueForKeyPath(NSString keyPath) { final _$$ref = object$.ref; - _objc_msgSend_unr2j3( + final _$$ref$1 = keyPath.ref; + objc.checkOsVersionInternal( + 'NSObject.valueForKeyPath:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_setArgument_atIndex_, - argumentLocation, - atIndex, + _sel_valueForKeyPath_, + _$$ref$1.pointer, ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); } - /// setReturnValue: - void setReturnValue(ffi.Pointer retLoc) { + /// valueForUndefinedKey: + objc.ObjCObject? valueForUndefinedKey(NSString key) { final _$$ref = object$.ref; - _objc_msgSend_ovsamd(_$$ref.pointer, _sel_setReturnValue_, retLoc); + final _$$ref$1 = key.ref; + objc.checkOsVersionInternal( + 'NSObject.valueForUndefinedKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_valueForUndefinedKey_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); } - /// setSelector: - set selector(ffi.Pointer value) { - final _$$ref = object$.ref; - _objc_msgSend_1d9e4oe(_$$ref.pointer, _sel_setSelector_, value); + /// accessInstanceVariablesDirectly + static bool getAccessInstanceVariablesDirectly() { + objc.checkOsVersionInternal( + 'NSObject.accessInstanceVariablesDirectly', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_91o635( + _class_NSObject, + _sel_accessInstanceVariablesDirectly, + ); } +} - /// setTarget: - set target(objc.ObjCObject? value) { +/// NSKeyValueCoding +extension NSKeyValueCoding$3 on NSOrderedSet { + /// setValue:forKey: + void setValue(objc.ObjCObject? value, {required NSString forKey}) { final _$$ref = object$.ref; final _$$ref$1 = value?.ref; - _objc_msgSend_xtuoz7( + final _$$ref$2 = forKey.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.setValue:forKey:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_pfv6jd( _$$ref.pointer, - _sel_setTarget_, + _sel_setValue_forKey_, _$$ref$1?.pointer ?? ffi.nullptr, + _$$ref$2.pointer, ); } - /// target - objc.ObjCObject? get target { + /// valueForKey: + objc.ObjCObject valueForKey(NSString key) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_target); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); - } -} - -/// NSItemProvider -extension type NSItemProvider._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject, NSCopying { - /// Constructs a [NSItemProvider] that points to the same underlying object as [other]. - NSItemProvider.as(objc.ObjCObject other) : object$ = other { + final _$$ref$1 = key.ref; objc.checkOsVersionInternal( - 'NSItemProvider', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), + 'NSOrderedSet.valueForKey:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - assert(isA(object$)); - } - - /// Constructs a [NSItemProvider] that wraps the given raw object pointer. - NSItemProvider.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - objc.checkOsVersionInternal( - 'NSItemProvider', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_valueForKey_, + _$$ref$1.pointer, ); - assert(isA(object$)); + return objc.ObjCObject($ret, retain: true, release: true); } +} - /// Returns whether [obj] is an instance of [NSItemProvider]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSItemProvider, - ); - - /// alloc - static NSItemProvider alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSItemProvider, _sel_alloc); - return NSItemProvider.fromPointer($ret, retain: false, release: true); +/// NSKeyValueCoding +extension NSKeyValueCoding$4 on NSArray { + /// setValue:forKey: + void setValue(objc.ObjCObject? value, {required NSString forKey}) { + final _$$ref = object$.ref; + final _$$ref$1 = value?.ref; + final _$$ref$2 = forKey.ref; + _objc_msgSend_pfv6jd( + _$$ref.pointer, + _sel_setValue_forKey_, + _$$ref$1?.pointer ?? ffi.nullptr, + _$$ref$2.pointer, + ); } - /// allocWithZone: - static NSItemProvider allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSItemProvider, - _sel_allocWithZone_, - zone, + /// valueForKey: + objc.ObjCObject valueForKey(NSString key) { + final _$$ref = object$.ref; + final _$$ref$1 = key.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_valueForKey_, + _$$ref$1.pointer, ); - return NSItemProvider.fromPointer($ret, retain: false, release: true); + return objc.ObjCObject($ret, retain: true, release: true); } +} - /// new - static NSItemProvider new$() { - final $ret = _objc_msgSend_151sglz(_class_NSItemProvider, _sel_new); - return NSItemProvider.fromPointer($ret, retain: false, release: true); +/// NSKeyValueCoding +extension NSKeyValueCoding$5 on NSMutableDictionary { + /// setValue:forKey: + void setValue(objc.ObjCObject? value, {required NSString forKey}) { + final _$$ref = object$.ref; + final _$$ref$1 = value?.ref; + final _$$ref$2 = forKey.ref; + _objc_msgSend_pfv6jd( + _$$ref.pointer, + _sel_setValue_forKey_, + _$$ref$1?.pointer ?? ffi.nullptr, + _$$ref$2.pointer, + ); } - - /// Returns a new instance of NSItemProvider constructed with the default `new` method. - NSItemProvider() : this.as(new$().object$); } -extension NSItemProvider$Methods on NSItemProvider { - /// canLoadObjectOfClass: - bool canLoadObjectOfClass(NSItemProviderReading aClass) { +/// NSKeyValueObserverNotification +extension NSKeyValueObserverNotification on NSObject { + /// didChange:valuesAtIndexes:forKey: + void didChange( + NSKeyValueChange changeKind, { + required NSIndexSet valuesAtIndexes, + required NSString forKey, + }) { final _$$ref = object$.ref; - final _$$ref$1 = aClass.ref; + final _$$ref$1 = valuesAtIndexes.ref; + final _$$ref$2 = forKey.ref; objc.checkOsVersionInternal( - 'NSItemProvider.canLoadObjectOfClass:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + 'NSObject.didChange:valuesAtIndexes:forKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - return _objc_msgSend_19nvye5( + _objc_msgSend_1diehjo( _$$ref.pointer, - _sel_canLoadObjectOfClass_, + _sel_didChange_valuesAtIndexes_forKey_, + changeKind.value, _$$ref$1.pointer, + _$$ref$2.pointer, ); } - /// hasItemConformingToTypeIdentifier: - bool hasItemConformingToTypeIdentifier(NSString typeIdentifier) { + /// didChangeValueForKey: + void didChangeValueForKey(NSString key) { final _$$ref = object$.ref; - final _$$ref$1 = typeIdentifier.ref; + final _$$ref$1 = key.ref; objc.checkOsVersionInternal( - 'NSItemProvider.hasItemConformingToTypeIdentifier:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), + 'NSObject.didChangeValueForKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - return _objc_msgSend_19nvye5( + _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_hasItemConformingToTypeIdentifier_, + _sel_didChangeValueForKey_, _$$ref$1.pointer, ); } - /// hasRepresentationConformingToTypeIdentifier:fileOptions: - bool hasRepresentationConformingToTypeIdentifier( - NSString typeIdentifier, { - required int fileOptions, + /// didChangeValueForKey:withSetMutation:usingObjects: + void didChangeValueForKey$1( + NSString key, { + required NSKeyValueSetMutationKind withSetMutation, + required NSSet usingObjects, }) { final _$$ref = object$.ref; - final _$$ref$1 = typeIdentifier.ref; + final _$$ref$1 = key.ref; + final _$$ref$2 = usingObjects.ref; objc.checkOsVersionInternal( - 'NSItemProvider.hasRepresentationConformingToTypeIdentifier:fileOptions:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + 'NSObject.didChangeValueForKey:withSetMutation:usingObjects:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - return _objc_msgSend_1wdb8ji( + _objc_msgSend_7w1jp7( _$$ref.pointer, - _sel_hasRepresentationConformingToTypeIdentifier_fileOptions_, + _sel_didChangeValueForKey_withSetMutation_usingObjects_, _$$ref$1.pointer, - fileOptions, + withSetMutation.value, + _$$ref$2.pointer, ); } - /// init - NSItemProvider init() { - final _$$ref$19 = object$.ref; + /// willChange:valuesAtIndexes:forKey: + void willChange( + NSKeyValueChange changeKind, { + required NSIndexSet valuesAtIndexes, + required NSString forKey, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = valuesAtIndexes.ref; + final _$$ref$2 = forKey.ref; objc.checkOsVersionInternal( - 'NSItemProvider.init', + 'NSObject.willChange:valuesAtIndexes:forKey:', iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); - final $ret = _objc_msgSend_151sglz( - _$$ref$19.retainAndReturnPointer(), - _sel_init, + _objc_msgSend_1diehjo( + _$$ref.pointer, + _sel_willChange_valuesAtIndexes_forKey_, + changeKind.value, + _$$ref$1.pointer, + _$$ref$2.pointer, ); - return NSItemProvider.fromPointer($ret, retain: false, release: true); } - /// initWithContentsOfURL: - NSItemProvider? initWithContentsOfURL(NSURL fileURL) { + /// willChangeValueForKey: + void willChangeValueForKey(NSString key) { final _$$ref = object$.ref; - final _$$ref$1 = fileURL.ref; + final _$$ref$1 = key.ref; objc.checkOsVersionInternal( - 'NSItemProvider.initWithContentsOfURL:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), + 'NSObject.willChangeValueForKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.retainAndReturnPointer(), - _sel_initWithContentsOfURL_, + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_willChangeValueForKey_, _$$ref$1.pointer, ); - return $ret.address == 0 - ? null - : NSItemProvider.fromPointer($ret, retain: false, release: true); } - /// initWithItem:typeIdentifier: - NSItemProvider initWithItem( - NSSecureCoding? item, { - NSString? typeIdentifier, + /// willChangeValueForKey:withSetMutation:usingObjects: + void willChangeValueForKey$1( + NSString key, { + required NSKeyValueSetMutationKind withSetMutation, + required NSSet usingObjects, }) { final _$$ref = object$.ref; - final _$$ref$1 = item?.ref; - final _$$ref$2 = typeIdentifier?.ref; + final _$$ref$1 = key.ref; + final _$$ref$2 = usingObjects.ref; objc.checkOsVersionInternal( - 'NSItemProvider.initWithItem:typeIdentifier:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), + 'NSObject.willChangeValueForKey:withSetMutation:usingObjects:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - final $ret = _objc_msgSend_15qeuct( - _$$ref.retainAndReturnPointer(), - _sel_initWithItem_typeIdentifier_, - _$$ref$1?.pointer ?? ffi.nullptr, - _$$ref$2?.pointer ?? ffi.nullptr, + _objc_msgSend_7w1jp7( + _$$ref.pointer, + _sel_willChangeValueForKey_withSetMutation_usingObjects_, + _$$ref$1.pointer, + withSetMutation.value, + _$$ref$2.pointer, ); - return NSItemProvider.fromPointer($ret, retain: false, release: true); } +} - /// initWithObject: - NSItemProvider initWithObject(NSItemProviderWriting object) { +/// NSKeyValueObserverRegistration +extension NSKeyValueObserverRegistration on NSSet { + /// addObserver:forKeyPath:options:context: + void addObserver( + NSObject observer, { + required NSString forKeyPath, + required int options, + required ffi.Pointer context, + }) { final _$$ref = object$.ref; - final _$$ref$1 = object.ref; - objc.checkOsVersionInternal( - 'NSItemProvider.initWithObject:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + final _$$ref$1 = observer.ref; + final _$$ref$2 = forKeyPath.ref; + _objc_msgSend_akk2cd( + _$$ref.pointer, + _sel_addObserver_forKeyPath_options_context_, + _$$ref$1.pointer, + _$$ref$2.pointer, + options, + context, ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.retainAndReturnPointer(), - _sel_initWithObject_, + } + + /// removeObserver:forKeyPath: + void removeObserver(NSObject observer, {required NSString forKeyPath}) { + final _$$ref = object$.ref; + final _$$ref$1 = observer.ref; + final _$$ref$2 = forKeyPath.ref; + _objc_msgSend_pfv6jd( + _$$ref.pointer, + _sel_removeObserver_forKeyPath_, _$$ref$1.pointer, + _$$ref$2.pointer, ); - return NSItemProvider.fromPointer($ret, retain: false, release: true); } - /// loadDataRepresentationForTypeIdentifier:completionHandler: - NSProgress loadDataRepresentationForTypeIdentifier( - NSString typeIdentifier, { - required objc.ObjCBlock - completionHandler, + /// removeObserver:forKeyPath:context: + void removeObserver$1( + NSObject observer, { + required NSString forKeyPath, + required ffi.Pointer context, }) { final _$$ref = object$.ref; - final _$$ref$1 = typeIdentifier.ref; - final _$$ref$2 = completionHandler.ref; + final _$$ref$1 = observer.ref; + final _$$ref$2 = forKeyPath.ref; objc.checkOsVersionInternal( - 'NSItemProvider.loadDataRepresentationForTypeIdentifier:completionHandler:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + 'NSSet.removeObserver:forKeyPath:context:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_r0bo0s( + _objc_msgSend_1jed5jl( _$$ref.pointer, - _sel_loadDataRepresentationForTypeIdentifier_completionHandler_, + _sel_removeObserver_forKeyPath_context_, _$$ref$1.pointer, _$$ref$2.pointer, + context, ); - return NSProgress.fromPointer($ret, retain: true, release: true); } +} - /// loadFileRepresentationForTypeIdentifier:completionHandler: - NSProgress loadFileRepresentationForTypeIdentifier( - NSString typeIdentifier, { - required objc.ObjCBlock - completionHandler, +/// NSKeyValueObserverRegistration +extension NSKeyValueObserverRegistration$1 on NSObject { + /// addObserver:forKeyPath:options:context: + void addObserver( + NSObject observer, { + required NSString forKeyPath, + required int options, + required ffi.Pointer context, }) { final _$$ref = object$.ref; - final _$$ref$1 = typeIdentifier.ref; - final _$$ref$2 = completionHandler.ref; + final _$$ref$1 = observer.ref; + final _$$ref$2 = forKeyPath.ref; objc.checkOsVersionInternal( - 'NSItemProvider.loadFileRepresentationForTypeIdentifier:completionHandler:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + 'NSObject.addObserver:forKeyPath:options:context:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - final $ret = _objc_msgSend_r0bo0s( + _objc_msgSend_akk2cd( _$$ref.pointer, - _sel_loadFileRepresentationForTypeIdentifier_completionHandler_, + _sel_addObserver_forKeyPath_options_context_, _$$ref$1.pointer, _$$ref$2.pointer, + options, + context, ); - return NSProgress.fromPointer($ret, retain: true, release: true); } - /// loadInPlaceFileRepresentationForTypeIdentifier:completionHandler: - NSProgress loadInPlaceFileRepresentationForTypeIdentifier( - NSString typeIdentifier, { - required objc.ObjCBlock - completionHandler, - }) { + /// removeObserver:forKeyPath: + void removeObserver(NSObject observer, {required NSString forKeyPath}) { final _$$ref = object$.ref; - final _$$ref$1 = typeIdentifier.ref; - final _$$ref$2 = completionHandler.ref; + final _$$ref$1 = observer.ref; + final _$$ref$2 = forKeyPath.ref; objc.checkOsVersionInternal( - 'NSItemProvider.loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + 'NSObject.removeObserver:forKeyPath:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - final $ret = _objc_msgSend_r0bo0s( + _objc_msgSend_pfv6jd( _$$ref.pointer, - _sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_, + _sel_removeObserver_forKeyPath_, _$$ref$1.pointer, _$$ref$2.pointer, ); - return NSProgress.fromPointer($ret, retain: true, release: true); } - /// loadItemForTypeIdentifier:options:completionHandler: - void loadItemForTypeIdentifier( - NSString typeIdentifier, { - NSDictionary? options, - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >? - completionHandler, + /// removeObserver:forKeyPath:context: + void removeObserver$1( + NSObject observer, { + required NSString forKeyPath, + required ffi.Pointer context, }) { final _$$ref = object$.ref; - final _$$ref$1 = typeIdentifier.ref; - final _$$ref$2 = options?.ref; - final _$$ref$3 = completionHandler?.ref; + final _$$ref$1 = observer.ref; + final _$$ref$2 = forKeyPath.ref; objc.checkOsVersionInternal( - 'NSItemProvider.loadItemForTypeIdentifier:options:completionHandler:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), + 'NSObject.removeObserver:forKeyPath:context:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - _objc_msgSend_18qun1e( + _objc_msgSend_1jed5jl( _$$ref.pointer, - _sel_loadItemForTypeIdentifier_options_completionHandler_, + _sel_removeObserver_forKeyPath_context_, _$$ref$1.pointer, - _$$ref$2?.pointer ?? ffi.nullptr, - _$$ref$3?.pointer ?? ffi.nullptr, + _$$ref$2.pointer, + context, ); } +} - /// loadObjectOfClass:completionHandler: - NSProgress loadObjectOfClass( - NSItemProviderReading aClass, { - required objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) - > - completionHandler, +/// NSKeyValueObserverRegistration +extension NSKeyValueObserverRegistration$2 on NSOrderedSet { + /// addObserver:forKeyPath:options:context: + void addObserver( + NSObject observer, { + required NSString forKeyPath, + required int options, + required ffi.Pointer context, }) { final _$$ref = object$.ref; - final _$$ref$1 = aClass.ref; - final _$$ref$2 = completionHandler.ref; + final _$$ref$1 = observer.ref; + final _$$ref$2 = forKeyPath.ref; objc.checkOsVersionInternal( - 'NSItemProvider.loadObjectOfClass:completionHandler:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + 'NSOrderedSet.addObserver:forKeyPath:options:context:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_r0bo0s( + _objc_msgSend_akk2cd( _$$ref.pointer, - _sel_loadObjectOfClass_completionHandler_, + _sel_addObserver_forKeyPath_options_context_, _$$ref$1.pointer, _$$ref$2.pointer, + options, + context, ); - return NSProgress.fromPointer($ret, retain: true, release: true); } - /// registerDataRepresentationForTypeIdentifier:visibility:loadHandler: - void registerDataRepresentationForTypeIdentifier( - NSString typeIdentifier, { - required NSItemProviderRepresentationVisibility visibility, - required objc.ObjCBlock< - NSProgress? Function(objc.ObjCBlock) - > - loadHandler, - }) { + /// removeObserver:forKeyPath: + void removeObserver(NSObject observer, {required NSString forKeyPath}) { final _$$ref = object$.ref; - final _$$ref$1 = typeIdentifier.ref; - final _$$ref$2 = loadHandler.ref; + final _$$ref$1 = observer.ref; + final _$$ref$2 = forKeyPath.ref; objc.checkOsVersionInternal( - 'NSItemProvider.registerDataRepresentationForTypeIdentifier:visibility:loadHandler:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + 'NSOrderedSet.removeObserver:forKeyPath:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - _objc_msgSend_1pl40xc( + _objc_msgSend_pfv6jd( _$$ref.pointer, - _sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_, + _sel_removeObserver_forKeyPath_, _$$ref$1.pointer, - visibility.value, _$$ref$2.pointer, ); } - /// registerFileRepresentationForTypeIdentifier:fileOptions:visibility:loadHandler: - void registerFileRepresentationForTypeIdentifier( - NSString typeIdentifier, { - required int fileOptions, - required NSItemProviderRepresentationVisibility visibility, - required objc.ObjCBlock< - NSProgress? Function( - objc.ObjCBlock, - ) - > - loadHandler, + /// removeObserver:forKeyPath:context: + void removeObserver$1( + NSObject observer, { + required NSString forKeyPath, + required ffi.Pointer context, }) { final _$$ref = object$.ref; - final _$$ref$1 = typeIdentifier.ref; - final _$$ref$2 = loadHandler.ref; + final _$$ref$1 = observer.ref; + final _$$ref$2 = forKeyPath.ref; objc.checkOsVersionInternal( - 'NSItemProvider.registerFileRepresentationForTypeIdentifier:fileOptions:visibility:loadHandler:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + 'NSOrderedSet.removeObserver:forKeyPath:context:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - _objc_msgSend_t7arir( + _objc_msgSend_1jed5jl( _$$ref.pointer, - _sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_, + _sel_removeObserver_forKeyPath_context_, _$$ref$1.pointer, - fileOptions, - visibility.value, _$$ref$2.pointer, + context, ); } +} - /// registerItemForTypeIdentifier:loadHandler: - void registerItemForTypeIdentifier( - NSString typeIdentifier, { - required objc.ObjCBlock< - ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, - ffi.Pointer, - NSDictionary, - ) - > - loadHandler, +/// NSKeyValueObserverRegistration +extension NSKeyValueObserverRegistration$3 on NSArray { + /// addObserver:forKeyPath:options:context: + void addObserver( + NSObject observer, { + required NSString forKeyPath, + required int options, + required ffi.Pointer context, }) { final _$$ref = object$.ref; - final _$$ref$1 = typeIdentifier.ref; - final _$$ref$2 = loadHandler.ref; - objc.checkOsVersionInternal( - 'NSItemProvider.registerItemForTypeIdentifier:loadHandler:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), - ); - _objc_msgSend_o762yo( + final _$$ref$1 = observer.ref; + final _$$ref$2 = forKeyPath.ref; + _objc_msgSend_akk2cd( _$$ref.pointer, - _sel_registerItemForTypeIdentifier_loadHandler_, + _sel_addObserver_forKeyPath_options_context_, _$$ref$1.pointer, _$$ref$2.pointer, + options, + context, ); } - /// registerObject:visibility: - void registerObject( - NSItemProviderWriting object, { - required NSItemProviderRepresentationVisibility visibility, + /// addObserver:toObjectsAtIndexes:forKeyPath:options:context: + void addObserver$1( + NSObject observer, { + required NSIndexSet toObjectsAtIndexes, + required NSString forKeyPath, + required int options, + required ffi.Pointer context, }) { final _$$ref = object$.ref; - final _$$ref$1 = object.ref; - objc.checkOsVersionInternal( - 'NSItemProvider.registerObject:visibility:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + final _$$ref$1 = observer.ref; + final _$$ref$2 = toObjectsAtIndexes.ref; + final _$$ref$3 = forKeyPath.ref; + _objc_msgSend_1vfgg7v( + _$$ref.pointer, + _sel_addObserver_toObjectsAtIndexes_forKeyPath_options_context_, + _$$ref$1.pointer, + _$$ref$2.pointer, + _$$ref$3.pointer, + options, + context, ); - _objc_msgSend_1k745tv( + } + + /// removeObserver:forKeyPath: + void removeObserver(NSObject observer, {required NSString forKeyPath}) { + final _$$ref = object$.ref; + final _$$ref$1 = observer.ref; + final _$$ref$2 = forKeyPath.ref; + _objc_msgSend_pfv6jd( _$$ref.pointer, - _sel_registerObject_visibility_, + _sel_removeObserver_forKeyPath_, _$$ref$1.pointer, - visibility.value, + _$$ref$2.pointer, ); } - /// registerObjectOfClass:visibility:loadHandler: - void registerObjectOfClass( - NSItemProviderWriting aClass, { - required NSItemProviderRepresentationVisibility visibility, - required objc.ObjCBlock< - NSProgress? Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) - >, - ) - > - loadHandler, + /// removeObserver:forKeyPath:context: + void removeObserver$1( + NSObject observer, { + required NSString forKeyPath, + required ffi.Pointer context, }) { final _$$ref = object$.ref; - final _$$ref$1 = aClass.ref; - final _$$ref$2 = loadHandler.ref; + final _$$ref$1 = observer.ref; + final _$$ref$2 = forKeyPath.ref; objc.checkOsVersionInternal( - 'NSItemProvider.registerObjectOfClass:visibility:loadHandler:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + 'NSArray.removeObserver:forKeyPath:context:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - _objc_msgSend_1pl40xc( + _objc_msgSend_1jed5jl( _$$ref.pointer, - _sel_registerObjectOfClass_visibility_loadHandler_, + _sel_removeObserver_forKeyPath_context_, _$$ref$1.pointer, - visibility.value, _$$ref$2.pointer, + context, ); } - /// registeredTypeIdentifiers - NSArray get registeredTypeIdentifiers { + /// removeObserver:fromObjectsAtIndexes:forKeyPath: + void removeObserver$2( + NSObject observer, { + required NSIndexSet fromObjectsAtIndexes, + required NSString forKeyPath, + }) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSItemProvider.registeredTypeIdentifiers', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), - ); - final $ret = _objc_msgSend_151sglz( + final _$$ref$1 = observer.ref; + final _$$ref$2 = fromObjectsAtIndexes.ref; + final _$$ref$3 = forKeyPath.ref; + _objc_msgSend_r8gdi7( _$$ref.pointer, - _sel_registeredTypeIdentifiers, + _sel_removeObserver_fromObjectsAtIndexes_forKeyPath_, + _$$ref$1.pointer, + _$$ref$2.pointer, + _$$ref$3.pointer, ); - return NSArray.fromPointer($ret, retain: true, release: true); } - /// registeredTypeIdentifiersWithFileOptions: - NSArray registeredTypeIdentifiersWithFileOptions(int fileOptions) { + /// removeObserver:fromObjectsAtIndexes:forKeyPath:context: + void removeObserver$3( + NSObject observer, { + required NSIndexSet fromObjectsAtIndexes, + required NSString forKeyPath, + required ffi.Pointer context, + }) { final _$$ref = object$.ref; + final _$$ref$1 = observer.ref; + final _$$ref$2 = fromObjectsAtIndexes.ref; + final _$$ref$3 = forKeyPath.ref; objc.checkOsVersionInternal( - 'NSItemProvider.registeredTypeIdentifiersWithFileOptions:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + 'NSArray.removeObserver:fromObjectsAtIndexes:forKeyPath:context:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_7g3u2y( + _objc_msgSend_1pl4k3n( _$$ref.pointer, - _sel_registeredTypeIdentifiersWithFileOptions_, - fileOptions, + _sel_removeObserver_fromObjectsAtIndexes_forKeyPath_context_, + _$$ref$1.pointer, + _$$ref$2.pointer, + _$$ref$3.pointer, + context, ); - return NSArray.fromPointer($ret, retain: true, release: true); } +} - /// setSuggestedName: - set suggestedName(NSString? value) { +/// NSKeyValueObserving +extension NSKeyValueObserving on NSObject { + /// observeValueForKeyPath:ofObject:change:context: + void observeValueForKeyPath( + NSString? keyPath, { + objc.ObjCObject? ofObject, + NSDictionary? change, + required ffi.Pointer context, + }) { final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; + final _$$ref$1 = keyPath?.ref; + final _$$ref$2 = ofObject?.ref; + final _$$ref$3 = change?.ref; objc.checkOsVersionInternal( - 'NSItemProvider.setSuggestedName:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 14, 0)), + 'NSObject.observeValueForKeyPath:ofObject:change:context:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - _objc_msgSend_xtuoz7( + _objc_msgSend_1pl4k3n( _$$ref.pointer, - _sel_setSuggestedName_, + _sel_observeValueForKeyPath_ofObject_change_context_, _$$ref$1?.pointer ?? ffi.nullptr, + _$$ref$2?.pointer ?? ffi.nullptr, + _$$ref$3?.pointer ?? ffi.nullptr, + context, ); } +} - /// suggestedName - NSString? get suggestedName { +/// NSKeyValueObservingCustomization +extension NSKeyValueObservingCustomization on NSObject { + /// observationInfo + ffi.Pointer get observationInfo { final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSItemProvider.suggestedName', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 14, 0)), + 'NSObject.observationInfo', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_suggestedName); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); + return _objc_msgSend_6ex6p5(_$$ref.pointer, _sel_observationInfo); } -} - -sealed class NSItemProviderFileOptions { - static const NSItemProviderFileOptionOpenInPlace = 1; -} -/// NSItemProviderReading -extension type NSItemProviderReading._(objc.ObjCProtocol object$) - implements objc.ObjCProtocol, NSObjectProtocol { - /// Constructs a [NSItemProviderReading] that points to the same underlying object as [other]. - NSItemProviderReading.as(objc.ObjCObject other) : object$ = other; - - /// Constructs a [NSItemProviderReading] that wraps the given raw object pointer. - NSItemProviderReading.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); - - /// Returns whether [obj] is an instance of [NSItemProviderReading]. - static bool conformsTo(objc.ObjCObject obj) { - return _objc_msgSend_e3qsqz( - obj.ref.pointer, - _sel_conformsToProtocol_, - _protocol_NSItemProviderReading, + /// setObservationInfo: + set observationInfo(ffi.Pointer value) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSObject.setObservationInfo:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); + _objc_msgSend_ovsamd(_$$ref.pointer, _sel_setObservationInfo_, value); } -} -extension NSItemProviderReading$Methods on NSItemProviderReading {} - -interface class NSItemProviderReading$Builder { - /// Returns the [objc.Protocol] object for this protocol. - static objc.Protocol get $protocol => - objc.Protocol.fromPointer(_protocol_NSItemProviderReading.cast()); - - /// Builds an object that implements the NSItemProviderReading protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - /// - /// If `$keepIsolateAlive` is true, this protocol will keep this isolate - /// alive until it is garbage collected by both Dart and ObjC. - static NSItemProviderReading implement({bool $keepIsolateAlive = true}) { - final builder = objc.ObjCProtocolBuilder( - debugName: 'NSItemProviderReading', + /// automaticallyNotifiesObserversForKey: + static bool automaticallyNotifiesObserversForKey(NSString key) { + final _$$ref = key.ref; + objc.checkOsVersionInternal( + 'NSObject.automaticallyNotifiesObserversForKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - - builder.addProtocol($protocol); - return NSItemProviderReading.as( - builder.build(keepIsolateAlive: $keepIsolateAlive), + return _objc_msgSend_19nvye5( + _class_NSObject, + _sel_automaticallyNotifiesObserversForKey_, + _$$ref.pointer, ); } - /// Adds the implementation of the NSItemProviderReading protocol to an existing - /// [objc.ObjCProtocolBuilder]. - /// - /// Note: You cannot call this method after you have called `builder.build`. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, { - bool $keepIsolateAlive = true, - }) { - builder.addProtocol($protocol); + /// keyPathsForValuesAffectingValueForKey: + static NSSet keyPathsForValuesAffectingValueForKey(NSString key) { + final _$$ref = key.ref; + objc.checkOsVersionInternal( + 'NSObject.keyPathsForValuesAffectingValueForKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _class_NSObject, + _sel_keyPathsForValuesAffectingValueForKey_, + _$$ref.pointer, + ); + return NSSet.fromPointer($ret, retain: true, release: true); } } -enum NSItemProviderRepresentationVisibility { - NSItemProviderRepresentationVisibilityAll(0), - NSItemProviderRepresentationVisibilityTeam(1), - NSItemProviderRepresentationVisibilityGroup(2), - NSItemProviderRepresentationVisibilityOwnProcess(3); +sealed class NSKeyValueObservingOptions { + static const NSKeyValueObservingOptionNew = 1; + static const NSKeyValueObservingOptionOld = 2; + static const NSKeyValueObservingOptionInitial = 4; + static const NSKeyValueObservingOptionPrior = 8; +} + +enum NSKeyValueSetMutationKind { + NSKeyValueUnionSetMutation(1), + NSKeyValueMinusSetMutation(2), + NSKeyValueIntersectSetMutation(3), + NSKeyValueSetSetMutation(4); final int value; - const NSItemProviderRepresentationVisibility(this.value); + const NSKeyValueSetMutationKind(this.value); - static NSItemProviderRepresentationVisibility fromValue(int value) => - switch (value) { - 0 => NSItemProviderRepresentationVisibilityAll, - 1 => NSItemProviderRepresentationVisibilityTeam, - 2 => NSItemProviderRepresentationVisibilityGroup, - 3 => NSItemProviderRepresentationVisibilityOwnProcess, - _ => throw ArgumentError( - 'Unknown value for NSItemProviderRepresentationVisibility: $value', - ), - }; + static NSKeyValueSetMutationKind fromValue(int value) => switch (value) { + 1 => NSKeyValueUnionSetMutation, + 2 => NSKeyValueMinusSetMutation, + 3 => NSKeyValueIntersectSetMutation, + 4 => NSKeyValueSetSetMutation, + _ => throw ArgumentError( + 'Unknown value for NSKeyValueSetMutationKind: $value', + ), + }; +} + +/// NSKeyValueSharedObserverRegistration +extension NSKeyValueSharedObserverRegistration on NSObject { + /// setSharedObservers: + void setSharedObservers(NSKeyValueSharedObserversSnapshot? sharedObservers) { + final _$$ref = object$.ref; + final _$$ref$1 = sharedObservers?.ref; + objc.checkOsVersionInternal( + 'NSObject.setSharedObservers:', + iOS: (false, (18, 0, 0)), + macOS: (false, (15, 0, 0)), + ); + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_setSharedObservers_, + _$$ref$1?.pointer ?? ffi.nullptr, + ); + } } -/// NSItemProviderWriting -extension type NSItemProviderWriting._(objc.ObjCProtocol object$) - implements objc.ObjCProtocol, NSObjectProtocol { - /// Constructs a [NSItemProviderWriting] that points to the same underlying object as [other]. - NSItemProviderWriting.as(objc.ObjCObject other) : object$ = other; +/// NSKeyValueSharedObserversSnapshot +/// +/// NSKeyValueSharedObserversSnapshot +extension type NSKeyValueSharedObserversSnapshot._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject { + /// Constructs a [NSKeyValueSharedObserversSnapshot] that points to the same underlying object as [other]. + NSKeyValueSharedObserversSnapshot.as(objc.ObjCObject other) + : object$ = other { + objc.checkOsVersionInternal( + 'NSKeyValueSharedObserversSnapshot', + iOS: (false, (18, 0, 0)), + macOS: (false, (15, 0, 0)), + ); + } - /// Constructs a [NSItemProviderWriting] that wraps the given raw object pointer. - NSItemProviderWriting.fromPointer( + /// Constructs a [NSKeyValueSharedObserversSnapshot] that wraps the given raw object pointer. + NSKeyValueSharedObserversSnapshot.fromPointer( ffi.Pointer other, { bool retain = false, bool release = false, - }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); - - /// Returns whether [obj] is an instance of [NSItemProviderWriting]. - static bool conformsTo(objc.ObjCObject obj) { - return _objc_msgSend_e3qsqz( - obj.ref.pointer, - _sel_conformsToProtocol_, - _protocol_NSItemProviderWriting, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + objc.checkOsVersionInternal( + 'NSKeyValueSharedObserversSnapshot', + iOS: (false, (18, 0, 0)), + macOS: (false, (15, 0, 0)), ); } } -extension NSItemProviderWriting$Methods on NSItemProviderWriting { - /// itemProviderVisibilityForRepresentationWithTypeIdentifier: - NSItemProviderRepresentationVisibility - itemProviderVisibilityForRepresentationWithTypeIdentifier( - NSString typeIdentifier, - ) { +/// NSKeyValueSorting +extension NSKeyValueSorting on NSOrderedSet { + /// sortedArrayUsingDescriptors: + NSArray sortedArrayUsingDescriptors(NSArray sortDescriptors) { final _$$ref = object$.ref; - final _$$ref$1 = typeIdentifier.ref; + final _$$ref$1 = sortDescriptors.ref; objc.checkOsVersionInternal( - 'NSItemProviderWriting.itemProviderVisibilityForRepresentationWithTypeIdentifier:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + 'NSOrderedSet.sortedArrayUsingDescriptors:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - if (!objc.respondsToSelector( - _$$ref.pointer, - _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, - )) { - throw objc.UnimplementedOptionalMethodException( - 'NSItemProviderWriting', - 'itemProviderVisibilityForRepresentationWithTypeIdentifier:', - ); - } - final $ret = _objc_msgSend_16fy0up( + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, + _sel_sortedArrayUsingDescriptors_, _$$ref$1.pointer, ); - return NSItemProviderRepresentationVisibility.fromValue($ret); + return NSArray.fromPointer($ret, retain: true, release: true); } +} - /// loadDataWithTypeIdentifier:forItemProviderCompletionHandler: - NSProgress? loadDataWithTypeIdentifier( - NSString typeIdentifier, { - required objc.ObjCBlock - forItemProviderCompletionHandler, - }) { +/// NSKeyValueSorting +extension NSKeyValueSorting$1 on NSMutableOrderedSet { + /// sortUsingDescriptors: + void sortUsingDescriptors(NSArray sortDescriptors) { final _$$ref = object$.ref; - final _$$ref$1 = typeIdentifier.ref; - final _$$ref$2 = forItemProviderCompletionHandler.ref; + final _$$ref$1 = sortDescriptors.ref; objc.checkOsVersionInternal( - 'NSItemProviderWriting.loadDataWithTypeIdentifier:forItemProviderCompletionHandler:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + 'NSMutableOrderedSet.sortUsingDescriptors:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_r0bo0s( + _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, + _sel_sortUsingDescriptors_, _$$ref$1.pointer, - _$$ref$2.pointer, + ); + } +} + +/// NSKeyedArchiver +/// +/// NSKeyedArchiver +extension type NSKeyedArchiver._(objc.ObjCObject object$) + implements objc.ObjCObject, NSCoder { + /// Constructs a [NSKeyedArchiver] that points to the same underlying object as [other]. + NSKeyedArchiver.as(objc.ObjCObject other) : object$ = other {} + + /// Constructs a [NSKeyedArchiver] that wraps the given raw object pointer. + NSKeyedArchiver.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) {} +} + +/// NSKeyedArchiverObjectSubstitution +extension NSKeyedArchiverObjectSubstitution on NSObject { + /// classForKeyedArchiver + objc.ObjCObject? get classForKeyedArchiver { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSObject.classForKeyedArchiver', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_classForKeyedArchiver, ); return $ret.address == 0 ? null - : NSProgress.fromPointer($ret, retain: true, release: true); + : objc.ObjCObject($ret, retain: true, release: true); } - /// writableTypeIdentifiersForItemProvider - NSArray get writableTypeIdentifiersForItemProvider { + /// replacementObjectForKeyedArchiver: + objc.ObjCObject? replacementObjectForKeyedArchiver(NSKeyedArchiver archiver) { final _$$ref = object$.ref; + final _$$ref$1 = archiver.ref; objc.checkOsVersionInternal( - 'NSItemProviderWriting.writableTypeIdentifiersForItemProvider', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + 'NSObject.replacementObjectForKeyedArchiver:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - if (!objc.respondsToSelector( + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_writableTypeIdentifiersForItemProvider, - )) { - throw objc.UnimplementedOptionalMethodException( - 'NSItemProviderWriting', - 'writableTypeIdentifiersForItemProvider', - ); - } + _sel_replacementObjectForKeyedArchiver_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } + + /// classFallbacksForKeyedArchiver + static NSArray classFallbacksForKeyedArchiver() { + objc.checkOsVersionInternal( + 'NSObject.classFallbacksForKeyedArchiver', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_writableTypeIdentifiersForItemProvider, + _class_NSObject, + _sel_classFallbacksForKeyedArchiver, ); return NSArray.fromPointer($ret, retain: true, release: true); } } -interface class NSItemProviderWriting$Builder { - /// Returns the [objc.Protocol] object for this protocol. - static objc.Protocol get $protocol => - objc.Protocol.fromPointer(_protocol_NSItemProviderWriting.cast()); +/// NSKeyedUnarchiverObjectSubstitution +extension NSKeyedUnarchiverObjectSubstitution on NSObject { + /// classForKeyedUnarchiver + static objc.ObjCObject classForKeyedUnarchiver() { + objc.checkOsVersionInternal( + 'NSObject.classForKeyedUnarchiver', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _class_NSObject, + _sel_classForKeyedUnarchiver, + ); + return objc.ObjCObject($ret, retain: true, release: true); + } +} - /// Builds an object that implements the NSItemProviderWriting protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - /// - /// If `$keepIsolateAlive` is true, this protocol will keep this isolate - /// alive until it is garbage collected by both Dart and ObjC. - static NSItemProviderWriting implement({ - NSItemProviderRepresentationVisibility Function(NSString)? - itemProviderVisibilityForRepresentationWithTypeIdentifier_, - required NSProgress? Function( - NSString, - objc.ObjCBlock, - ) - loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, - NSArray Function()? writableTypeIdentifiersForItemProvider, - bool $keepIsolateAlive = true, +/// NSLinguisticAnalysis +extension NSLinguisticAnalysis on NSString { + /// enumerateLinguisticTagsInRange:scheme:options:orthography:usingBlock: + @Deprecated( + 'All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API', + ) + void enumerateLinguisticTagsInRange( + NSRange range, { + required NSString scheme, + required int options, + NSOrthography? orthography, + required objc.ObjCBlock< + ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) + > + usingBlock, }) { - final builder = objc.ObjCProtocolBuilder( - debugName: 'NSItemProviderWriting', + final _$$ref = object$.ref; + final _$$ref$1 = scheme.ref; + final _$$ref$2 = orthography?.ref; + final _$$ref$3 = usingBlock.ref; + objc.checkOsVersionInternal( + 'NSString.enumerateLinguisticTagsInRange:scheme:options:orthography:usingBlock:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - NSItemProviderWriting$Builder - .itemProviderVisibilityForRepresentationWithTypeIdentifier_ - .implement( - builder, - itemProviderVisibilityForRepresentationWithTypeIdentifier_, - ); - NSItemProviderWriting$Builder - .loadDataWithTypeIdentifier_forItemProviderCompletionHandler_ - .implement( - builder, - loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, - ); - NSItemProviderWriting$Builder.writableTypeIdentifiersForItemProvider - .implement(builder, writableTypeIdentifiersForItemProvider); - builder.addProtocol($protocol); - return NSItemProviderWriting.as( - builder.build(keepIsolateAlive: $keepIsolateAlive), + _objc_msgSend_vij4rw( + _$$ref.pointer, + _sel_enumerateLinguisticTagsInRange_scheme_options_orthography_usingBlock_, + range, + _$$ref$1.pointer, + options, + _$$ref$2?.pointer ?? ffi.nullptr, + _$$ref$3.pointer, ); } - /// Adds the implementation of the NSItemProviderWriting protocol to an existing - /// [objc.ObjCProtocolBuilder]. - /// - /// Note: You cannot call this method after you have called `builder.build`. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, { - NSItemProviderRepresentationVisibility Function(NSString)? - itemProviderVisibilityForRepresentationWithTypeIdentifier_, - required NSProgress? Function( - NSString, - objc.ObjCBlock, - ) - loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, - NSArray Function()? writableTypeIdentifiersForItemProvider, - bool $keepIsolateAlive = true, + /// linguisticTagsInRange:scheme:options:orthography:tokenRanges: + @Deprecated( + 'All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API', + ) + NSArray linguisticTagsInRange( + NSRange range, { + required NSString scheme, + required int options, + NSOrthography? orthography, + required ffi.Pointer> tokenRanges, }) { - NSItemProviderWriting$Builder - .itemProviderVisibilityForRepresentationWithTypeIdentifier_ - .implement( - builder, - itemProviderVisibilityForRepresentationWithTypeIdentifier_, - ); - NSItemProviderWriting$Builder - .loadDataWithTypeIdentifier_forItemProviderCompletionHandler_ - .implement( - builder, - loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, - ); - NSItemProviderWriting$Builder.writableTypeIdentifiersForItemProvider - .implement(builder, writableTypeIdentifiersForItemProvider); - builder.addProtocol($protocol); + final _$$ref = object$.ref; + final _$$ref$1 = scheme.ref; + final _$$ref$2 = orthography?.ref; + objc.checkOsVersionInternal( + 'NSString.linguisticTagsInRange:scheme:options:orthography:tokenRanges:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + final $ret = _objc_msgSend_1l09uru( + _$$ref.pointer, + _sel_linguisticTagsInRange_scheme_options_orthography_tokenRanges_, + range, + _$$ref$1.pointer, + options, + _$$ref$2?.pointer ?? ffi.nullptr, + tokenRanges, + ); + return NSArray.fromPointer($ret, retain: true, release: true); } - - /// itemProviderVisibilityForRepresentationWithTypeIdentifier: - static final itemProviderVisibilityForRepresentationWithTypeIdentifier_ = - objc.ObjCProtocolMethod< - NSItemProviderRepresentationVisibility Function(NSString) - >( - _protocol_NSItemProviderWriting, - _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_1ldqghh) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSItemProviderWriting, - _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, - isRequired: false, - isInstanceMethod: true, - ), - (NSItemProviderRepresentationVisibility Function(NSString) func) => - ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString.fromFunction( - (ffi.Pointer _, NSString arg1) => func(arg1), - ), - ); - - /// loadDataWithTypeIdentifier:forItemProviderCompletionHandler: - static final loadDataWithTypeIdentifier_forItemProviderCompletionHandler_ = - objc.ObjCProtocolMethod< - NSProgress? Function( - NSString, - objc.ObjCBlock, - ) - >( - _protocol_NSItemProviderWriting, - _sel_loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_1q0i84) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSItemProviderWriting, - _sel_loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, - isRequired: true, - isInstanceMethod: true, - ), - ( - NSProgress? Function( - NSString, - objc.ObjCBlock, - ) - func, - ) => - ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError.fromFunction( - ( - ffi.Pointer _, - NSString arg1, - objc.ObjCBlock arg2, - ) => func(arg1, arg2), - ), - ); - - /// writableTypeIdentifiersForItemProvider - static final writableTypeIdentifiersForItemProvider = - objc.ObjCProtocolMethod( - _protocol_NSItemProviderWriting, - _sel_writableTypeIdentifiersForItemProvider, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_1mbt9g9) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSItemProviderWriting, - _sel_writableTypeIdentifiersForItemProvider, - isRequired: false, - isInstanceMethod: true, - ), - (NSArray Function() func) => ObjCBlock_NSArray_ffiVoid.fromFunction( - (ffi.Pointer _) => func(), - ), - ); -} - -enum NSKeyValueChange { - NSKeyValueChangeSetting(1), - NSKeyValueChangeInsertion(2), - NSKeyValueChangeRemoval(3), - NSKeyValueChangeReplacement(4); - - final int value; - const NSKeyValueChange(this.value); - - static NSKeyValueChange fromValue(int value) => switch (value) { - 1 => NSKeyValueChangeSetting, - 2 => NSKeyValueChangeInsertion, - 3 => NSKeyValueChangeRemoval, - 4 => NSKeyValueChangeReplacement, - _ => throw ArgumentError('Unknown value for NSKeyValueChange: $value'), - }; -} - -sealed class NSKeyValueObservingOptions { - static const NSKeyValueObservingOptionNew = 1; - static const NSKeyValueObservingOptionOld = 2; - static const NSKeyValueObservingOptionInitial = 4; - static const NSKeyValueObservingOptionPrior = 8; -} - -enum NSKeyValueSetMutationKind { - NSKeyValueUnionSetMutation(1), - NSKeyValueMinusSetMutation(2), - NSKeyValueIntersectSetMutation(3), - NSKeyValueSetSetMutation(4); - - final int value; - const NSKeyValueSetMutationKind(this.value); - - static NSKeyValueSetMutationKind fromValue(int value) => switch (value) { - 1 => NSKeyValueUnionSetMutation, - 2 => NSKeyValueMinusSetMutation, - 3 => NSKeyValueIntersectSetMutation, - 4 => NSKeyValueSetSetMutation, - _ => throw ArgumentError( - 'Unknown value for NSKeyValueSetMutationKind: $value', - ), - }; } sealed class NSLinguisticTaggerOptions { @@ -11154,6 +16139,205 @@ extension NSLocale$Methods on NSLocale { } } +/// NSLocaleCreation +extension NSLocaleCreation on NSLocale { + /// autoupdatingCurrentLocale + static NSLocale getAutoupdatingCurrentLocale() { + objc.checkOsVersionInternal( + 'NSLocale.autoupdatingCurrentLocale', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _class_NSLocale, + _sel_autoupdatingCurrentLocale, + ); + return NSLocale.fromPointer($ret, retain: true, release: true); + } + + /// currentLocale + static NSLocale getCurrentLocale() { + final $ret = _objc_msgSend_151sglz(_class_NSLocale, _sel_currentLocale); + return NSLocale.fromPointer($ret, retain: true, release: true); + } + + /// systemLocale + static NSLocale getSystemLocale() { + final $ret = _objc_msgSend_151sglz(_class_NSLocale, _sel_systemLocale); + return NSLocale.fromPointer($ret, retain: true, release: true); + } +} + +/// NSLocaleGeneralInfo +extension NSLocaleGeneralInfo on NSLocale { + /// ISOCountryCodes + static NSArray getISOCountryCodes() { + final $ret = _objc_msgSend_151sglz(_class_NSLocale, _sel_ISOCountryCodes); + return NSArray.fromPointer($ret, retain: true, release: true); + } + + /// ISOCurrencyCodes + static NSArray getISOCurrencyCodes() { + final $ret = _objc_msgSend_151sglz(_class_NSLocale, _sel_ISOCurrencyCodes); + return NSArray.fromPointer($ret, retain: true, release: true); + } + + /// ISOLanguageCodes + static NSArray getISOLanguageCodes() { + final $ret = _objc_msgSend_151sglz(_class_NSLocale, _sel_ISOLanguageCodes); + return NSArray.fromPointer($ret, retain: true, release: true); + } + + /// availableLocaleIdentifiers + static NSArray getAvailableLocaleIdentifiers() { + final $ret = _objc_msgSend_151sglz( + _class_NSLocale, + _sel_availableLocaleIdentifiers, + ); + return NSArray.fromPointer($ret, retain: true, release: true); + } + + /// canonicalLanguageIdentifierFromString: + static NSString canonicalLanguageIdentifierFromString(NSString string) { + final _$$ref = string.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSLocale, + _sel_canonicalLanguageIdentifierFromString_, + _$$ref.pointer, + ); + return NSString.fromPointer($ret, retain: true, release: true); + } + + /// canonicalLocaleIdentifierFromString: + static NSString canonicalLocaleIdentifierFromString(NSString string) { + final _$$ref = string.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSLocale, + _sel_canonicalLocaleIdentifierFromString_, + _$$ref.pointer, + ); + return NSString.fromPointer($ret, retain: true, release: true); + } + + /// characterDirectionForLanguage: + static NSLocaleLanguageDirection characterDirectionForLanguage( + NSString isoLangCode, + ) { + final _$$ref = isoLangCode.ref; + objc.checkOsVersionInternal( + 'NSLocale.characterDirectionForLanguage:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_1kn7frf( + _class_NSLocale, + _sel_characterDirectionForLanguage_, + _$$ref.pointer, + ); + return NSLocaleLanguageDirection.fromValue($ret); + } + + /// commonISOCurrencyCodes + static NSArray getCommonISOCurrencyCodes() { + objc.checkOsVersionInternal( + 'NSLocale.commonISOCurrencyCodes', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _class_NSLocale, + _sel_commonISOCurrencyCodes, + ); + return NSArray.fromPointer($ret, retain: true, release: true); + } + + /// componentsFromLocaleIdentifier: + static NSDictionary componentsFromLocaleIdentifier(NSString string) { + final _$$ref = string.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSLocale, + _sel_componentsFromLocaleIdentifier_, + _$$ref.pointer, + ); + return NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// lineDirectionForLanguage: + static NSLocaleLanguageDirection lineDirectionForLanguage( + NSString isoLangCode, + ) { + final _$$ref = isoLangCode.ref; + objc.checkOsVersionInternal( + 'NSLocale.lineDirectionForLanguage:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_1kn7frf( + _class_NSLocale, + _sel_lineDirectionForLanguage_, + _$$ref.pointer, + ); + return NSLocaleLanguageDirection.fromValue($ret); + } + + /// localeIdentifierFromComponents: + static NSString localeIdentifierFromComponents(NSDictionary dict) { + final _$$ref = dict.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSLocale, + _sel_localeIdentifierFromComponents_, + _$$ref.pointer, + ); + return NSString.fromPointer($ret, retain: true, release: true); + } + + /// localeIdentifierFromWindowsLocaleCode: + static NSString? localeIdentifierFromWindowsLocaleCode(int lcid) { + objc.checkOsVersionInternal( + 'NSLocale.localeIdentifierFromWindowsLocaleCode:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_lx7wnn( + _class_NSLocale, + _sel_localeIdentifierFromWindowsLocaleCode_, + lcid, + ); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); + } + + /// preferredLanguages + static NSArray getPreferredLanguages() { + objc.checkOsVersionInternal( + 'NSLocale.preferredLanguages', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _class_NSLocale, + _sel_preferredLanguages, + ); + return NSArray.fromPointer($ret, retain: true, release: true); + } + + /// windowsLocaleCodeFromLocaleIdentifier: + static int windowsLocaleCodeFromLocaleIdentifier(NSString localeIdentifier) { + final _$$ref = localeIdentifier.ref; + objc.checkOsVersionInternal( + 'NSLocale.windowsLocaleCodeFromLocaleIdentifier:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + return _objc_msgSend_1nwix4r( + _class_NSLocale, + _sel_windowsLocaleCodeFromLocaleIdentifier_, + _$$ref.pointer, + ); + } +} + enum NSLocaleLanguageDirection { NSLocaleLanguageDirectionUnknown(0), NSLocaleLanguageDirectionLeftToRight(1), @@ -11299,6 +16483,24 @@ extension NSMethodSignature$Methods on NSMethodSignature { } } +/// NSMorphology +extension NSMorphology on NSAttributedString { + /// attributedStringByInflectingString + NSAttributedString attributedStringByInflectingString() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSAttributedString.attributedStringByInflectingString', + iOS: (false, (15, 0, 0)), + macOS: (false, (12, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_attributedStringByInflectingString, + ); + return NSAttributedString.fromPointer($ret, retain: true, release: true); + } +} + /// NSMutableArray extension type NSMutableArray._(objc.ObjCObject object$) implements objc.ObjCObject, NSArray { @@ -11576,6 +16778,82 @@ extension NSMutableArray$Methods on NSMutableArray { } } +/// NSMutableArrayCreation +extension NSMutableArrayCreation on NSMutableArray { + /// initWithContentsOfFile: + NSMutableArray? initWithContentsOfFile(NSString path) { + final _$$ref = object$.ref; + final _$$ref$1 = path.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.retainAndReturnPointer(), + _sel_initWithContentsOfFile_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : NSMutableArray.fromPointer($ret, retain: false, release: true); + } + + /// initWithContentsOfURL: + NSMutableArray? initWithContentsOfURL(NSURL url) { + final _$$ref = object$.ref; + final _$$ref$1 = url.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.retainAndReturnPointer(), + _sel_initWithContentsOfURL_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : NSMutableArray.fromPointer($ret, retain: false, release: true); + } + + /// arrayWithContentsOfFile: + static NSMutableArray? arrayWithContentsOfFile(NSString path) { + final _$$ref = path.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSMutableArray, + _sel_arrayWithContentsOfFile_, + _$$ref.pointer, + ); + return $ret.address == 0 + ? null + : NSMutableArray.fromPointer($ret, retain: true, release: true); + } + + /// arrayWithContentsOfURL: + static NSMutableArray? arrayWithContentsOfURL(NSURL url) { + final _$$ref = url.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSMutableArray, + _sel_arrayWithContentsOfURL_, + _$$ref.pointer, + ); + return $ret.address == 0 + ? null + : NSMutableArray.fromPointer($ret, retain: true, release: true); + } +} + +/// NSMutableArrayDiffing +extension NSMutableArrayDiffing on NSMutableArray { + /// applyDifference: + void applyDifference(NSOrderedCollectionDifference difference) { + final _$$ref = object$.ref; + final _$$ref$1 = difference.ref; + objc.checkOsVersionInternal( + 'NSMutableArray.applyDifference:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_applyDifference_, + _$$ref$1.pointer, + ); + } +} + /// NSMutableCopying extension type NSMutableCopying._(objc.ObjCProtocol object$) implements objc.ObjCProtocol { @@ -12216,6 +17494,58 @@ extension NSMutableData$Methods on NSMutableData { } } +/// NSMutableDataCompression +extension NSMutableDataCompression on NSMutableData { + /// compressUsingAlgorithm:error: + bool compressUsingAlgorithm(NSDataCompressionAlgorithm algorithm) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSMutableData.compressUsingAlgorithm:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_15v716q( + _$$ref.pointer, + _sel_compressUsingAlgorithm_error_, + algorithm.value, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret; + } finally { + pkg_ffi.calloc.free($err); + } + } + + /// decompressUsingAlgorithm:error: + bool decompressUsingAlgorithm(NSDataCompressionAlgorithm algorithm) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSMutableData.decompressUsingAlgorithm:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_15v716q( + _$$ref.pointer, + _sel_decompressUsingAlgorithm_error_, + algorithm.value, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret; + } finally { + pkg_ffi.calloc.free($err); + } + } +} + +/// NSMutableDataCreation +extension NSMutableDataCreation on NSMutableData {} + /// NSMutableDictionary extension type NSMutableDictionary._(objc.ObjCObject object$) implements objc.ObjCObject, NSDictionary { @@ -12522,6 +17852,63 @@ extension NSMutableDictionary$Methods on NSMutableDictionary { } } +/// NSMutableDictionaryCreation +extension NSMutableDictionaryCreation on NSMutableDictionary { + /// initWithContentsOfFile: + NSMutableDictionary? initWithContentsOfFile(NSString path) { + final _$$ref = object$.ref; + final _$$ref$1 = path.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.retainAndReturnPointer(), + _sel_initWithContentsOfFile_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : NSMutableDictionary.fromPointer($ret, retain: false, release: true); + } + + /// initWithContentsOfURL: + NSMutableDictionary? initWithContentsOfURL(NSURL url) { + final _$$ref = object$.ref; + final _$$ref$1 = url.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.retainAndReturnPointer(), + _sel_initWithContentsOfURL_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : NSMutableDictionary.fromPointer($ret, retain: false, release: true); + } + + /// dictionaryWithContentsOfFile: + static NSMutableDictionary? dictionaryWithContentsOfFile(NSString path) { + final _$$ref = path.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSMutableDictionary, + _sel_dictionaryWithContentsOfFile_, + _$$ref.pointer, + ); + return $ret.address == 0 + ? null + : NSMutableDictionary.fromPointer($ret, retain: true, release: true); + } + + /// dictionaryWithContentsOfURL: + static NSMutableDictionary? dictionaryWithContentsOfURL(NSURL url) { + final _$$ref = url.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSMutableDictionary, + _sel_dictionaryWithContentsOfURL_, + _$$ref.pointer, + ); + return $ret.address == 0 + ? null + : NSMutableDictionary.fromPointer($ret, retain: true, release: true); + } +} + /// NSMutableIndexSet extension type NSMutableIndexSet._(objc.ObjCObject object$) implements objc.ObjCObject, NSIndexSet { @@ -13290,6 +18677,28 @@ extension NSMutableOrderedSet$Methods on NSMutableOrderedSet { } } +/// NSMutableOrderedSetCreation +extension NSMutableOrderedSetCreation on NSMutableOrderedSet {} + +/// NSMutableOrderedSetDiffing +extension NSMutableOrderedSetDiffing on NSMutableOrderedSet { + /// applyDifference: + void applyDifference(NSOrderedCollectionDifference difference) { + final _$$ref = object$.ref; + final _$$ref$1 = difference.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.applyDifference:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_applyDifference_, + _$$ref$1.pointer, + ); + } +} + /// NSMutableSet extension type NSMutableSet._(objc.ObjCObject object$) implements objc.ObjCObject, NSSet { @@ -13548,6 +18957,9 @@ extension NSMutableSet$Methods on NSMutableSet { } } +/// NSMutableSetCreation +extension NSMutableSetCreation on NSMutableSet {} + /// NSMutableString extension type NSMutableString._(objc.ObjCObject object$) implements objc.ObjCObject, NSString { @@ -14253,6 +19665,113 @@ extension NSMutableString$Methods on NSMutableString { } } +/// NSMutableStringExtensionMethods +extension NSMutableStringExtensionMethods on NSMutableString { + /// appendFormat: + void appendFormat(NSString format) { + final _$$ref = object$.ref; + final _$$ref$1 = format.ref; + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_appendFormat_, _$$ref$1.pointer); + } + + /// appendString: + void appendString(NSString aString) { + final _$$ref = object$.ref; + final _$$ref$1 = aString.ref; + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_appendString_, _$$ref$1.pointer); + } + + /// applyTransform:reverse:range:updatedRange: + bool applyTransform( + NSString transform, { + required bool reverse, + required NSRange range, + required ffi.Pointer updatedRange, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = transform.ref; + objc.checkOsVersionInternal( + 'NSMutableString.applyTransform:reverse:range:updatedRange:', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), + ); + return _objc_msgSend_zy00wz( + _$$ref.pointer, + _sel_applyTransform_reverse_range_updatedRange_, + _$$ref$1.pointer, + reverse, + range, + updatedRange, + ); + } + + /// deleteCharactersInRange: + void deleteCharactersInRange(NSRange range) { + final _$$ref = object$.ref; + _objc_msgSend_1e3pm0z(_$$ref.pointer, _sel_deleteCharactersInRange_, range); + } + + /// initWithCapacity: + NSMutableString initWithCapacity(int capacity) { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_14hpxwa( + _$$ref.retainAndReturnPointer(), + _sel_initWithCapacity_, + capacity, + ); + return NSMutableString.fromPointer($ret, retain: false, release: true); + } + + /// insertString:atIndex: + void insertString(NSString aString, {required int atIndex}) { + final _$$ref = object$.ref; + final _$$ref$1 = aString.ref; + _objc_msgSend_djsa9o( + _$$ref.pointer, + _sel_insertString_atIndex_, + _$$ref$1.pointer, + atIndex, + ); + } + + /// replaceOccurrencesOfString:withString:options:range: + int replaceOccurrencesOfString( + NSString target, { + required NSString withString, + required int options, + required NSRange range, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = target.ref; + final _$$ref$2 = withString.ref; + return _objc_msgSend_1upeo1d( + _$$ref.pointer, + _sel_replaceOccurrencesOfString_withString_options_range_, + _$$ref$1.pointer, + _$$ref$2.pointer, + options, + range, + ); + } + + /// setString: + void setString(NSString aString) { + final _$$ref = object$.ref; + final _$$ref$1 = aString.ref; + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_setString_, _$$ref$1.pointer); + } + + /// stringWithCapacity: + static NSMutableString stringWithCapacity(int capacity) { + final $ret = _objc_msgSend_14hpxwa( + _class_NSMutableString, + _sel_stringWithCapacity_, + capacity, + ); + return NSMutableString.fromPointer($ret, retain: true, release: true); + } +} + /// NSNotification extension type NSNotification._(objc.ObjCObject object$) implements objc.ObjCObject, NSObject, NSCopying, NSCoding { @@ -14427,6 +19946,9 @@ extension NSNotification$Methods on NSNotification { } } +/// NSNotificationCreation +extension NSNotificationCreation on NSNotification {} + /// NSNull extension type NSNull._(objc.ObjCObject object$) implements objc.ObjCObject, NSObject, NSCopying, NSSecureCoding { @@ -17230,9 +22752,9 @@ extension NSOrderedCollectionDifference$Methods required ffi.Pointer> objects, required int count, }) { - final _$$ref$4 = object$.ref; + final _$$ref$5 = object$.ref; return _objc_msgSend_1b5ysjl( - _$$ref$4.pointer, + _$$ref$5.pointer, _sel_countByEnumeratingWithState_objects_count_, state, objects, @@ -17431,6 +22953,61 @@ sealed class NSOrderedCollectionDifferenceCalculationOptions { static const NSOrderedCollectionDifferenceCalculationInferMoves = 4; } +/// NSOrderedPerform +extension NSOrderedPerform on NSRunLoop { + /// cancelPerformSelector:target:argument: + void cancelPerformSelector( + ffi.Pointer aSelector, { + required objc.ObjCObject target, + objc.ObjCObject? argument, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = target.ref; + final _$$ref$2 = argument?.ref; + _objc_msgSend_lzbvjm( + _$$ref.pointer, + _sel_cancelPerformSelector_target_argument_, + aSelector, + _$$ref$1.pointer, + _$$ref$2?.pointer ?? ffi.nullptr, + ); + } + + /// cancelPerformSelectorsWithTarget: + void cancelPerformSelectorsWithTarget(objc.ObjCObject target) { + final _$$ref = object$.ref; + final _$$ref$1 = target.ref; + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_cancelPerformSelectorsWithTarget_, + _$$ref$1.pointer, + ); + } + + /// performSelector:target:argument:order:modes: + void performSelector$3( + ffi.Pointer aSelector, { + required objc.ObjCObject target, + objc.ObjCObject? argument, + required int order, + required NSArray modes, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = target.ref; + final _$$ref$2 = argument?.ref; + final _$$ref$3 = modes.ref; + _objc_msgSend_11hj8md( + _$$ref.pointer, + _sel_performSelector_target_argument_order_modes_, + aSelector, + _$$ref$1.pointer, + _$$ref$2?.pointer ?? ffi.nullptr, + order, + _$$ref$3.pointer, + ); + } +} + /// NSOrderedSet extension type NSOrderedSet._(objc.ObjCObject object$) implements @@ -17696,9 +23273,9 @@ extension NSOrderedSet$Methods on NSOrderedSet { required ffi.Pointer> objects, required int count, }) { - final _$$ref$5 = object$.ref; + final _$$ref$6 = object$.ref; return _objc_msgSend_1b5ysjl( - _$$ref$5.pointer, + _$$ref$6.pointer, _sel_countByEnumeratingWithState_objects_count_, state, objects, @@ -17987,6 +23564,141 @@ extension NSOrderedSet$Methods on NSOrderedSet { } } +/// NSOrderedSetCreation +extension NSOrderedSetCreation on NSOrderedSet {} + +/// NSOrderedSetDiffing +extension NSOrderedSetDiffing on NSOrderedSet { + /// differenceFromOrderedSet: + NSOrderedCollectionDifference differenceFromOrderedSet(NSOrderedSet other) { + final _$$ref = object$.ref; + final _$$ref$1 = other.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.differenceFromOrderedSet:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_differenceFromOrderedSet_, + _$$ref$1.pointer, + ); + return NSOrderedCollectionDifference.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// differenceFromOrderedSet:withOptions: + NSOrderedCollectionDifference differenceFromOrderedSet$1( + NSOrderedSet other, { + required int withOptions, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = other.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.differenceFromOrderedSet:withOptions:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_1wtpmu7( + _$$ref.pointer, + _sel_differenceFromOrderedSet_withOptions_, + _$$ref$1.pointer, + withOptions, + ); + return NSOrderedCollectionDifference.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// differenceFromOrderedSet:withOptions:usingEquivalenceTest: + NSOrderedCollectionDifference differenceFromOrderedSet$2( + NSOrderedSet other, { + required int withOptions, + required objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ) + > + usingEquivalenceTest, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = other.ref; + final _$$ref$2 = usingEquivalenceTest.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.differenceFromOrderedSet:withOptions:usingEquivalenceTest:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_1415lvo( + _$$ref.pointer, + _sel_differenceFromOrderedSet_withOptions_usingEquivalenceTest_, + _$$ref$1.pointer, + withOptions, + _$$ref$2.pointer, + ); + return NSOrderedCollectionDifference.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// orderedSetByApplyingDifference: + NSOrderedSet? orderedSetByApplyingDifference( + NSOrderedCollectionDifference difference, + ) { + final _$$ref = object$.ref; + final _$$ref$1 = difference.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.orderedSetByApplyingDifference:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_orderedSetByApplyingDifference_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : NSOrderedSet.fromPointer($ret, retain: true, release: true); + } +} + +/// NSOrthography +/// +/// NSOrthography +extension type NSOrthography._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject, NSCopying, NSSecureCoding { + /// Constructs a [NSOrthography] that points to the same underlying object as [other]. + NSOrthography.as(objc.ObjCObject other) : object$ = other { + objc.checkOsVersionInternal( + 'NSOrthography', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + } + + /// Constructs a [NSOrthography] that wraps the given raw object pointer. + NSOrthography.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + objc.checkOsVersionInternal( + 'NSOrthography', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + } +} + /// NSOutputStream extension type NSOutputStream._(objc.ObjCObject object$) implements objc.ObjCObject, NSStream { @@ -18193,6 +23905,9 @@ extension NSOutputStream$Methods on NSOutputStream { } } +/// NSOutputStreamExtensions +extension NSOutputStreamExtensions on NSOutputStream {} + /// NSPort extension type NSPort._(objc.ObjCObject object$) implements objc.ObjCObject, NSObject, NSCopying, NSCoding { @@ -18451,6 +24166,35 @@ extension NSPort$Methods on NSPort { } } +/// NSPortCoder +/// +/// NSPortCoder +@Deprecated('Use NSXPCConnection instead') +extension type NSPortCoder._(objc.ObjCObject object$) + implements objc.ObjCObject, NSCoder { + /// Constructs a [NSPortCoder] that points to the same underlying object as [other]. + NSPortCoder.as(objc.ObjCObject other) : object$ = other { + objc.checkOsVersionInternal( + 'NSPortCoder', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + } + + /// Constructs a [NSPortCoder] that wraps the given raw object pointer. + NSPortCoder.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + objc.checkOsVersionInternal( + 'NSPortCoder', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + } +} + /// NSPortDelegate extension type NSPortDelegate._(objc.ObjCProtocol object$) implements objc.ObjCProtocol, NSObjectProtocol { @@ -18785,44 +24529,220 @@ extension NSPortMessage$Methods on NSPortMessage { } } -enum NSPredicateOperatorType { - NSLessThanPredicateOperatorType(0), - NSLessThanOrEqualToPredicateOperatorType(1), - NSGreaterThanPredicateOperatorType(2), - NSGreaterThanOrEqualToPredicateOperatorType(3), - NSEqualToPredicateOperatorType(4), - NSNotEqualToPredicateOperatorType(5), - NSMatchesPredicateOperatorType(6), - NSLikePredicateOperatorType(7), - NSBeginsWithPredicateOperatorType(8), - NSEndsWithPredicateOperatorType(9), - NSInPredicateOperatorType(10), - NSCustomSelectorPredicateOperatorType(11), - NSContainsPredicateOperatorType(99), - NSBetweenPredicateOperatorType(100); +/// NSPredicate +/// +/// NSPredicate +extension type NSPredicate._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject, NSSecureCoding, NSCopying { + /// Constructs a [NSPredicate] that points to the same underlying object as [other]. + NSPredicate.as(objc.ObjCObject other) : object$ = other { + objc.checkOsVersionInternal( + 'NSPredicate', + iOS: (false, (3, 0, 0)), + macOS: (false, (10, 4, 0)), + ); + } - final int value; - const NSPredicateOperatorType(this.value); - - static NSPredicateOperatorType fromValue(int value) => switch (value) { - 0 => NSLessThanPredicateOperatorType, - 1 => NSLessThanOrEqualToPredicateOperatorType, - 2 => NSGreaterThanPredicateOperatorType, - 3 => NSGreaterThanOrEqualToPredicateOperatorType, - 4 => NSEqualToPredicateOperatorType, - 5 => NSNotEqualToPredicateOperatorType, - 6 => NSMatchesPredicateOperatorType, - 7 => NSLikePredicateOperatorType, - 8 => NSBeginsWithPredicateOperatorType, - 9 => NSEndsWithPredicateOperatorType, - 10 => NSInPredicateOperatorType, - 11 => NSCustomSelectorPredicateOperatorType, - 99 => NSContainsPredicateOperatorType, - 100 => NSBetweenPredicateOperatorType, - _ => throw ArgumentError( - 'Unknown value for NSPredicateOperatorType: $value', - ), - }; + /// Constructs a [NSPredicate] that wraps the given raw object pointer. + NSPredicate.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + objc.checkOsVersionInternal( + 'NSPredicate', + iOS: (false, (3, 0, 0)), + macOS: (false, (10, 4, 0)), + ); + } +} + +/// NSPredicateSupport +extension NSPredicateSupport on NSSet { + /// filteredSetUsingPredicate: + NSSet filteredSetUsingPredicate(NSPredicate predicate) { + final _$$ref = object$.ref; + final _$$ref$1 = predicate.ref; + objc.checkOsVersionInternal( + 'NSSet.filteredSetUsingPredicate:', + iOS: (false, (3, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_filteredSetUsingPredicate_, + _$$ref$1.pointer, + ); + return NSSet.fromPointer($ret, retain: true, release: true); + } +} + +/// NSPredicateSupport +extension NSPredicateSupport$1 on NSMutableArray { + /// filterUsingPredicate: + void filterUsingPredicate(NSPredicate predicate) { + final _$$ref = object$.ref; + final _$$ref$1 = predicate.ref; + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_filterUsingPredicate_, + _$$ref$1.pointer, + ); + } +} + +/// NSPredicateSupport +extension NSPredicateSupport$2 on NSOrderedSet { + /// filteredOrderedSetUsingPredicate: + NSOrderedSet filteredOrderedSetUsingPredicate(NSPredicate p) { + final _$$ref = object$.ref; + final _$$ref$1 = p.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.filteredOrderedSetUsingPredicate:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_filteredOrderedSetUsingPredicate_, + _$$ref$1.pointer, + ); + return NSOrderedSet.fromPointer($ret, retain: true, release: true); + } +} + +/// NSPredicateSupport +extension NSPredicateSupport$3 on NSMutableOrderedSet { + /// filterUsingPredicate: + void filterUsingPredicate(NSPredicate p) { + final _$$ref = object$.ref; + final _$$ref$1 = p.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.filterUsingPredicate:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_filterUsingPredicate_, + _$$ref$1.pointer, + ); + } +} + +/// NSPredicateSupport +extension NSPredicateSupport$4 on NSMutableSet { + /// filterUsingPredicate: + void filterUsingPredicate(NSPredicate predicate) { + final _$$ref = object$.ref; + final _$$ref$1 = predicate.ref; + objc.checkOsVersionInternal( + 'NSMutableSet.filterUsingPredicate:', + iOS: (false, (3, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_filterUsingPredicate_, + _$$ref$1.pointer, + ); + } +} + +/// NSPredicateSupport +extension NSPredicateSupport$5 on NSArray { + /// filteredArrayUsingPredicate: + NSArray filteredArrayUsingPredicate(NSPredicate predicate) { + final _$$ref = object$.ref; + final _$$ref$1 = predicate.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_filteredArrayUsingPredicate_, + _$$ref$1.pointer, + ); + return NSArray.fromPointer($ret, retain: true, release: true); + } +} + +/// NSPreviewSupport +extension NSPreviewSupport on NSItemProvider$2 { + /// loadPreviewImageWithOptions:completionHandler: + void loadPreviewImageWithOptions( + NSDictionary options, { + required objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + > + completionHandler, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = options.ref; + final _$$ref$2 = completionHandler.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.loadPreviewImageWithOptions:completionHandler:', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + _objc_msgSend_o762yo( + _$$ref.pointer, + _sel_loadPreviewImageWithOptions_completionHandler_, + _$$ref$1.pointer, + _$$ref$2.pointer, + ); + } + + /// previewImageHandler + objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + ffi.Pointer, + NSDictionary, + ) + >? + get previewImageHandler { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.previewImageHandler', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + final $ret = _objc_msgSend_uwvaik(_$$ref.pointer, _sel_previewImageHandler); + return $ret.address == 0 + ? null + : ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObjectImpl_NSDictionary.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// setPreviewImageHandler: + set previewImageHandler( + objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + ffi.Pointer, + NSDictionary, + ) + >? + value, + ) { + final _$$ref = object$.ref; + final _$$ref$1 = value?.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.setPreviewImageHandler:', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + _objc_msgSend_f167m6( + _$$ref.pointer, + _sel_setPreviewImageHandler_, + _$$ref$1?.pointer ?? ffi.nullptr, + ); + } } /// NSProgress @@ -19692,6 +25612,85 @@ extension NSProgress$Methods on NSProgress { } } +/// NSPromisedItems +extension NSPromisedItems on NSURL { + /// checkPromisedItemIsReachableAndReturnError: + bool checkPromisedItemIsReachableAndReturnError() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.checkPromisedItemIsReachableAndReturnError:', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1dom33q( + _$$ref.pointer, + _sel_checkPromisedItemIsReachableAndReturnError_, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret; + } finally { + pkg_ffi.calloc.free($err); + } + } + + /// getPromisedItemResourceValue:forKey:error: + bool getPromisedItemResourceValue( + ffi.Pointer> value, { + required NSString forKey, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = forKey.ref; + objc.checkOsVersionInternal( + 'NSURL.getPromisedItemResourceValue:forKey:error:', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1j9bhml( + _$$ref.pointer, + _sel_getPromisedItemResourceValue_forKey_error_, + value, + _$$ref$1.pointer, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret; + } finally { + pkg_ffi.calloc.free($err); + } + } + + /// promisedItemResourceValuesForKeys:error: + NSDictionary? promisedItemResourceValuesForKeys(NSArray keys) { + final _$$ref = object$.ref; + final _$$ref$1 = keys.ref; + objc.checkOsVersionInternal( + 'NSURL.promisedItemResourceValuesForKeys:error:', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1lhpu4m( + _$$ref.pointer, + _sel_promisedItemResourceValuesForKeys_error_, + _$$ref$1.pointer, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSDictionary.fromPointer($ret, retain: true, release: true); + } finally { + pkg_ffi.calloc.free($err); + } + } +} + enum NSPropertyListFormat { NSPropertyListOpenStepFormat(1), NSPropertyListXMLFormat_v1_0(100), @@ -19911,76 +25910,589 @@ extension NSRunLoop$Methods on NSRunLoop { } } -enum NSSearchPathDirectory { - NSApplicationDirectory(1), - NSDemoApplicationDirectory(2), - NSDeveloperApplicationDirectory(3), - NSAdminApplicationDirectory(4), - NSLibraryDirectory(5), - NSDeveloperDirectory(6), - NSUserDirectory(7), - NSDocumentationDirectory(8), - NSDocumentDirectory(9), - NSCoreServiceDirectory(10), - NSAutosavedInformationDirectory(11), - NSDesktopDirectory(12), - NSCachesDirectory(13), - NSApplicationSupportDirectory(14), - NSDownloadsDirectory(15), - NSInputMethodsDirectory(16), - NSMoviesDirectory(17), - NSMusicDirectory(18), - NSPicturesDirectory(19), - NSPrinterDescriptionDirectory(20), - NSSharedPublicDirectory(21), - NSPreferencePanesDirectory(22), - NSApplicationScriptsDirectory(23), - NSItemReplacementDirectory(99), - NSAllApplicationsDirectory(100), - NSAllLibrariesDirectory(101), - NSTrashDirectory(102); +/// NSRunLoopConveniences +extension NSRunLoopConveniences on NSRunLoop { + /// configureAsServer + @Deprecated('Not supported') + void configureAsServer() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSRunLoop.configureAsServer', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_configureAsServer); + } - final int value; - const NSSearchPathDirectory(this.value); - - static NSSearchPathDirectory fromValue(int value) => switch (value) { - 1 => NSApplicationDirectory, - 2 => NSDemoApplicationDirectory, - 3 => NSDeveloperApplicationDirectory, - 4 => NSAdminApplicationDirectory, - 5 => NSLibraryDirectory, - 6 => NSDeveloperDirectory, - 7 => NSUserDirectory, - 8 => NSDocumentationDirectory, - 9 => NSDocumentDirectory, - 10 => NSCoreServiceDirectory, - 11 => NSAutosavedInformationDirectory, - 12 => NSDesktopDirectory, - 13 => NSCachesDirectory, - 14 => NSApplicationSupportDirectory, - 15 => NSDownloadsDirectory, - 16 => NSInputMethodsDirectory, - 17 => NSMoviesDirectory, - 18 => NSMusicDirectory, - 19 => NSPicturesDirectory, - 20 => NSPrinterDescriptionDirectory, - 21 => NSSharedPublicDirectory, - 22 => NSPreferencePanesDirectory, - 23 => NSApplicationScriptsDirectory, - 99 => NSItemReplacementDirectory, - 100 => NSAllApplicationsDirectory, - 101 => NSAllLibrariesDirectory, - 102 => NSTrashDirectory, - _ => throw ArgumentError('Unknown value for NSSearchPathDirectory: $value'), - }; + /// performBlock: + void performBlock(objc.ObjCBlock block) { + final _$$ref = object$.ref; + final _$$ref$1 = block.ref; + objc.checkOsVersionInternal( + 'NSRunLoop.performBlock:', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), + ); + _objc_msgSend_f167m6(_$$ref.pointer, _sel_performBlock_, _$$ref$1.pointer); + } + + /// performInModes:block: + void performInModes( + NSArray modes, { + required objc.ObjCBlock block, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = modes.ref; + final _$$ref$2 = block.ref; + objc.checkOsVersionInternal( + 'NSRunLoop.performInModes:block:', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), + ); + _objc_msgSend_o762yo( + _$$ref.pointer, + _sel_performInModes_block_, + _$$ref$1.pointer, + _$$ref$2.pointer, + ); + } + + /// run + void run() { + final _$$ref = object$.ref; + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_run); + } + + /// runMode:beforeDate: + bool runMode(NSString mode, {required NSDate beforeDate}) { + final _$$ref = object$.ref; + final _$$ref$1 = mode.ref; + final _$$ref$2 = beforeDate.ref; + return _objc_msgSend_1lsax7n( + _$$ref.pointer, + _sel_runMode_beforeDate_, + _$$ref$1.pointer, + _$$ref$2.pointer, + ); + } + + /// runUntilDate: + void runUntilDate(NSDate limitDate) { + final _$$ref = object$.ref; + final _$$ref$1 = limitDate.ref; + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_runUntilDate_, _$$ref$1.pointer); + } } -sealed class NSSearchPathDomainMask { - static const NSUserDomainMask = 1; - static const NSLocalDomainMask = 2; - static const NSNetworkDomainMask = 4; - static const NSSystemDomainMask = 8; - static const NSAllDomainsMask = 65535; +/// NSScriptClassDescription +extension NSScriptClassDescription on NSObject { + /// classCode + int get classCode { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSObject.classCode', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_3pyzne(_$$ref.pointer, _sel_classCode); + } + + /// className + NSString get className { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSObject.className', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_className); + return NSString.fromPointer($ret, retain: true, release: true); + } +} + +/// NSScriptKeyValueCoding +extension NSScriptKeyValueCoding on NSObject { + /// coerceValue:forKey: + objc.ObjCObject? coerceValue( + objc.ObjCObject? value, { + required NSString forKey, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = value?.ref; + final _$$ref$2 = forKey.ref; + objc.checkOsVersionInternal( + 'NSObject.coerceValue:forKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + _$$ref.pointer, + _sel_coerceValue_forKey_, + _$$ref$1?.pointer ?? ffi.nullptr, + _$$ref$2.pointer, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } + + /// insertValue:atIndex:inPropertyWithKey: + void insertValue( + objc.ObjCObject value, { + required int atIndex, + required NSString inPropertyWithKey, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = value.ref; + final _$$ref$2 = inPropertyWithKey.ref; + objc.checkOsVersionInternal( + 'NSObject.insertValue:atIndex:inPropertyWithKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_10nfbmq( + _$$ref.pointer, + _sel_insertValue_atIndex_inPropertyWithKey_, + _$$ref$1.pointer, + atIndex, + _$$ref$2.pointer, + ); + } + + /// insertValue:inPropertyWithKey: + void insertValue$1( + objc.ObjCObject value, { + required NSString inPropertyWithKey, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = value.ref; + final _$$ref$2 = inPropertyWithKey.ref; + objc.checkOsVersionInternal( + 'NSObject.insertValue:inPropertyWithKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_pfv6jd( + _$$ref.pointer, + _sel_insertValue_inPropertyWithKey_, + _$$ref$1.pointer, + _$$ref$2.pointer, + ); + } + + /// removeValueAtIndex:fromPropertyWithKey: + void removeValueAtIndex(int index, {required NSString fromPropertyWithKey}) { + final _$$ref = object$.ref; + final _$$ref$1 = fromPropertyWithKey.ref; + objc.checkOsVersionInternal( + 'NSObject.removeValueAtIndex:fromPropertyWithKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_1gypgok( + _$$ref.pointer, + _sel_removeValueAtIndex_fromPropertyWithKey_, + index, + _$$ref$1.pointer, + ); + } + + /// replaceValueAtIndex:inPropertyWithKey:withValue: + void replaceValueAtIndex( + int index, { + required NSString inPropertyWithKey, + required objc.ObjCObject withValue, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = inPropertyWithKey.ref; + final _$$ref$2 = withValue.ref; + objc.checkOsVersionInternal( + 'NSObject.replaceValueAtIndex:inPropertyWithKey:withValue:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_rutu22( + _$$ref.pointer, + _sel_replaceValueAtIndex_inPropertyWithKey_withValue_, + index, + _$$ref$1.pointer, + _$$ref$2.pointer, + ); + } + + /// valueAtIndex:inPropertyWithKey: + objc.ObjCObject? valueAtIndex( + int index, { + required NSString inPropertyWithKey, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = inPropertyWithKey.ref; + objc.checkOsVersionInternal( + 'NSObject.valueAtIndex:inPropertyWithKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_vbc8p4( + _$$ref.pointer, + _sel_valueAtIndex_inPropertyWithKey_, + index, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } + + /// valueWithName:inPropertyWithKey: + objc.ObjCObject? valueWithName( + NSString name, { + required NSString inPropertyWithKey, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = name.ref; + final _$$ref$2 = inPropertyWithKey.ref; + objc.checkOsVersionInternal( + 'NSObject.valueWithName:inPropertyWithKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + _$$ref.pointer, + _sel_valueWithName_inPropertyWithKey_, + _$$ref$1.pointer, + _$$ref$2.pointer, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } + + /// valueWithUniqueID:inPropertyWithKey: + objc.ObjCObject? valueWithUniqueID( + objc.ObjCObject uniqueID, { + required NSString inPropertyWithKey, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = uniqueID.ref; + final _$$ref$2 = inPropertyWithKey.ref; + objc.checkOsVersionInternal( + 'NSObject.valueWithUniqueID:inPropertyWithKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + _$$ref.pointer, + _sel_valueWithUniqueID_inPropertyWithKey_, + _$$ref$1.pointer, + _$$ref$2.pointer, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } +} + +/// NSScriptObjectSpecifier +/// +/// NSScriptObjectSpecifier +extension type NSScriptObjectSpecifier._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject, NSCoding { + /// Constructs a [NSScriptObjectSpecifier] that points to the same underlying object as [other]. + NSScriptObjectSpecifier.as(objc.ObjCObject other) : object$ = other {} + + /// Constructs a [NSScriptObjectSpecifier] that wraps the given raw object pointer. + NSScriptObjectSpecifier.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) {} +} + +/// NSScriptObjectSpecifiers +extension NSScriptObjectSpecifiers on NSObject { + /// indicesOfObjectsByEvaluatingObjectSpecifier: + NSArray? indicesOfObjectsByEvaluatingObjectSpecifier( + NSScriptObjectSpecifier specifier, + ) { + final _$$ref = object$.ref; + final _$$ref$1 = specifier.ref; + objc.checkOsVersionInternal( + 'NSObject.indicesOfObjectsByEvaluatingObjectSpecifier:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_indicesOfObjectsByEvaluatingObjectSpecifier_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : NSArray.fromPointer($ret, retain: true, release: true); + } + + /// objectSpecifier + NSScriptObjectSpecifier? get objectSpecifier { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSObject.objectSpecifier', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_objectSpecifier); + return $ret.address == 0 + ? null + : NSScriptObjectSpecifier.fromPointer( + $ret, + retain: true, + release: true, + ); + } +} + +/// NSScripting +extension NSScripting on NSObject { + /// copyScriptingValue:forKey:withProperties: + objc.ObjCObject? copyScriptingValue( + objc.ObjCObject value, { + required NSString forKey, + required NSDictionary withProperties, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = value.ref; + final _$$ref$2 = forKey.ref; + final _$$ref$3 = withProperties.ref; + objc.checkOsVersionInternal( + 'NSObject.copyScriptingValue:forKey:withProperties:', + iOS: (true, null), + macOS: (false, (10, 5, 0)), + ); + final $ret = _objc_msgSend_11spmsz( + _$$ref.pointer, + _sel_copyScriptingValue_forKey_withProperties_, + _$$ref$1.pointer, + _$$ref$2.pointer, + _$$ref$3.pointer, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: false, release: true); + } + + /// newScriptingObjectOfClass:forValueForKey:withContentsValue:properties: + objc.ObjCObject? newScriptingObjectOfClass( + objc.ObjCObject objectClass, { + required NSString forValueForKey, + objc.ObjCObject? withContentsValue, + required NSDictionary properties, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = objectClass.ref; + final _$$ref$2 = forValueForKey.ref; + final _$$ref$3 = withContentsValue?.ref; + final _$$ref$4 = properties.ref; + objc.checkOsVersionInternal( + 'NSObject.newScriptingObjectOfClass:forValueForKey:withContentsValue:properties:', + iOS: (true, null), + macOS: (false, (10, 5, 0)), + ); + final $ret = _objc_msgSend_s92gih( + _$$ref.pointer, + _sel_newScriptingObjectOfClass_forValueForKey_withContentsValue_properties_, + _$$ref$1.pointer, + _$$ref$2.pointer, + _$$ref$3?.pointer ?? ffi.nullptr, + _$$ref$4.pointer, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: false, release: true); + } + + /// scriptingProperties + NSDictionary? get scriptingProperties { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSObject.scriptingProperties', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_scriptingProperties, + ); + return $ret.address == 0 + ? null + : NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// scriptingValueForSpecifier: + objc.ObjCObject? scriptingValueForSpecifier( + NSScriptObjectSpecifier objectSpecifier, + ) { + final _$$ref = object$.ref; + final _$$ref$1 = objectSpecifier.ref; + objc.checkOsVersionInternal( + 'NSObject.scriptingValueForSpecifier:', + iOS: (true, null), + macOS: (false, (10, 5, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_scriptingValueForSpecifier_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } + + /// setScriptingProperties: + set scriptingProperties(NSDictionary? value) { + final _$$ref = object$.ref; + final _$$ref$1 = value?.ref; + objc.checkOsVersionInternal( + 'NSObject.setScriptingProperties:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_setScriptingProperties_, + _$$ref$1?.pointer ?? ffi.nullptr, + ); + } +} + +/// NSScriptingComparisonMethods +extension NSScriptingComparisonMethods on NSObject { + /// scriptingBeginsWith: + bool scriptingBeginsWith(objc.ObjCObject object) { + final _$$ref = object$.ref; + final _$$ref$1 = object.ref; + objc.checkOsVersionInternal( + 'NSObject.scriptingBeginsWith:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_scriptingBeginsWith_, + _$$ref$1.pointer, + ); + } + + /// scriptingContains: + bool scriptingContains(objc.ObjCObject object) { + final _$$ref = object$.ref; + final _$$ref$1 = object.ref; + objc.checkOsVersionInternal( + 'NSObject.scriptingContains:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_scriptingContains_, + _$$ref$1.pointer, + ); + } + + /// scriptingEndsWith: + bool scriptingEndsWith(objc.ObjCObject object) { + final _$$ref = object$.ref; + final _$$ref$1 = object.ref; + objc.checkOsVersionInternal( + 'NSObject.scriptingEndsWith:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_scriptingEndsWith_, + _$$ref$1.pointer, + ); + } + + /// scriptingIsEqualTo: + bool scriptingIsEqualTo(objc.ObjCObject object) { + final _$$ref = object$.ref; + final _$$ref$1 = object.ref; + objc.checkOsVersionInternal( + 'NSObject.scriptingIsEqualTo:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_scriptingIsEqualTo_, + _$$ref$1.pointer, + ); + } + + /// scriptingIsGreaterThan: + bool scriptingIsGreaterThan(objc.ObjCObject object) { + final _$$ref = object$.ref; + final _$$ref$1 = object.ref; + objc.checkOsVersionInternal( + 'NSObject.scriptingIsGreaterThan:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_scriptingIsGreaterThan_, + _$$ref$1.pointer, + ); + } + + /// scriptingIsGreaterThanOrEqualTo: + bool scriptingIsGreaterThanOrEqualTo(objc.ObjCObject object) { + final _$$ref = object$.ref; + final _$$ref$1 = object.ref; + objc.checkOsVersionInternal( + 'NSObject.scriptingIsGreaterThanOrEqualTo:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_scriptingIsGreaterThanOrEqualTo_, + _$$ref$1.pointer, + ); + } + + /// scriptingIsLessThan: + bool scriptingIsLessThan(objc.ObjCObject object) { + final _$$ref = object$.ref; + final _$$ref$1 = object.ref; + objc.checkOsVersionInternal( + 'NSObject.scriptingIsLessThan:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_scriptingIsLessThan_, + _$$ref$1.pointer, + ); + } + + /// scriptingIsLessThanOrEqualTo: + bool scriptingIsLessThanOrEqualTo(objc.ObjCObject object) { + final _$$ref = object$.ref; + final _$$ref$1 = object.ref; + objc.checkOsVersionInternal( + 'NSObject.scriptingIsLessThanOrEqualTo:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_scriptingIsLessThanOrEqualTo_, + _$$ref$1.pointer, + ); + } } /// NSSecureCoding @@ -20365,9 +26877,9 @@ extension NSSet$Methods on NSSet { required ffi.Pointer> objects, required int count, }) { - final _$$ref$6 = object$.ref; + final _$$ref$7 = object$.ref; return _objc_msgSend_1b5ysjl( - _$$ref$6.pointer, + _$$ref$7.pointer, _sel_countByEnumeratingWithState_objects_count_, state, objects, @@ -20501,6 +27013,149 @@ extension NSSet$Methods on NSSet { } } +/// NSSetCreation +extension NSSetCreation on NSSet {} + +/// NSSharedKeySetDictionary +extension NSSharedKeySetDictionary on NSDictionary { + /// sharedKeySetForKeys: + static objc.ObjCObject sharedKeySetForKeys(NSArray keys) { + final _$$ref = keys.ref; + objc.checkOsVersionInternal( + 'NSDictionary.sharedKeySetForKeys:', + iOS: (false, (6, 0, 0)), + macOS: (false, (10, 8, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _class_NSDictionary, + _sel_sharedKeySetForKeys_, + _$$ref.pointer, + ); + return objc.ObjCObject($ret, retain: true, release: true); + } +} + +/// NSSharedKeySetDictionary +extension NSSharedKeySetDictionary$1 on NSMutableDictionary { + /// dictionaryWithSharedKeySet: + static NSMutableDictionary dictionaryWithSharedKeySet( + objc.ObjCObject keyset, + ) { + final _$$ref = keyset.ref; + objc.checkOsVersionInternal( + 'NSMutableDictionary.dictionaryWithSharedKeySet:', + iOS: (false, (6, 0, 0)), + macOS: (false, (10, 8, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _class_NSMutableDictionary, + _sel_dictionaryWithSharedKeySet_, + _$$ref.pointer, + ); + return NSMutableDictionary.fromPointer($ret, retain: true, release: true); + } +} + +/// NSSocketStreamCreationExtensions +extension NSSocketStreamCreationExtensions on NSStream { + /// getStreamsToHost:port:inputStream:outputStream: + @Deprecated('Use nw_connection_t in Network framework instead') + static void getStreamsToHost( + NSHost host, { + required int port, + required ffi.Pointer> inputStream, + required ffi.Pointer> outputStream, + }) { + final _$$ref = host.ref; + objc.checkOsVersionInternal( + 'NSStream.getStreamsToHost:port:inputStream:outputStream:', + iOS: (true, null), + macOS: (false, (10, 3, 0)), + ); + _objc_msgSend_1jknn71( + _class_NSStream, + _sel_getStreamsToHost_port_inputStream_outputStream_, + _$$ref.pointer, + port, + inputStream, + outputStream, + ); + } + + /// getStreamsToHostWithName:port:inputStream:outputStream: + @Deprecated('Use nw_connection_t in Network framework instead') + static void getStreamsToHostWithName( + NSString hostname, { + required int port, + required ffi.Pointer> inputStream, + required ffi.Pointer> outputStream, + }) { + final _$$ref = hostname.ref; + objc.checkOsVersionInternal( + 'NSStream.getStreamsToHostWithName:port:inputStream:outputStream:', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + _objc_msgSend_1jknn71( + _class_NSStream, + _sel_getStreamsToHostWithName_port_inputStream_outputStream_, + _$$ref.pointer, + port, + inputStream, + outputStream, + ); + } +} + +/// NSSortDescriptorSorting +extension NSSortDescriptorSorting on NSSet { + /// sortedArrayUsingDescriptors: + NSArray sortedArrayUsingDescriptors(NSArray sortDescriptors) { + final _$$ref = object$.ref; + final _$$ref$1 = sortDescriptors.ref; + objc.checkOsVersionInternal( + 'NSSet.sortedArrayUsingDescriptors:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_sortedArrayUsingDescriptors_, + _$$ref$1.pointer, + ); + return NSArray.fromPointer($ret, retain: true, release: true); + } +} + +/// NSSortDescriptorSorting +extension NSSortDescriptorSorting$1 on NSMutableArray { + /// sortUsingDescriptors: + void sortUsingDescriptors(NSArray sortDescriptors) { + final _$$ref = object$.ref; + final _$$ref$1 = sortDescriptors.ref; + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_sortUsingDescriptors_, + _$$ref$1.pointer, + ); + } +} + +/// NSSortDescriptorSorting +extension NSSortDescriptorSorting$2 on NSArray { + /// sortedArrayUsingDescriptors: + NSArray sortedArrayUsingDescriptors(NSArray sortDescriptors) { + final _$$ref = object$.ref; + final _$$ref$1 = sortDescriptors.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_sortedArrayUsingDescriptors_, + _$$ref$1.pointer, + ); + return NSArray.fromPointer($ret, retain: true, release: true); + } +} + sealed class NSSortOptions { static const NSSortConcurrent = 1; static const NSSortStable = 16; @@ -20676,6 +27331,29 @@ extension NSStream$Methods on NSStream { } } +/// NSStreamBoundPairCreationExtensions +extension NSStreamBoundPairCreationExtensions on NSStream { + /// getBoundStreamsWithBufferSize:inputStream:outputStream: + static void getBoundStreamsWithBufferSize( + int bufferSize, { + required ffi.Pointer> inputStream, + required ffi.Pointer> outputStream, + }) { + objc.checkOsVersionInternal( + 'NSStream.getBoundStreamsWithBufferSize:inputStream:outputStream:', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + _objc_msgSend_1i17va2( + _class_NSStream, + _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_, + bufferSize, + inputStream, + outputStream, + ); + } +} + /// NSStreamDelegate extension type NSStreamDelegate._(objc.ObjCProtocol object$) implements objc.ObjCProtocol, NSObjectProtocol { @@ -21639,11 +28317,357 @@ sealed class NSStringCompareOptions { static const NSRegularExpressionSearch = 1024; } +/// NSStringDeprecated +extension NSStringDeprecated on NSString { + /// cString + @Deprecated('Use -cStringUsingEncoding: instead') + ffi.Pointer cString() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSString.cString', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_1fuqfwb(_$$ref.pointer, _sel_cString); + } + + /// cStringLength + @Deprecated('Use -lengthOfBytesUsingEncoding: instead') + int cStringLength() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSString.cStringLength', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_cStringLength); + } + + /// getCString: + @Deprecated('Use -getCString:maxLength:encoding: instead') + void getCString(ffi.Pointer bytes) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSString.getCString:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_1r7ue5f(_$$ref.pointer, _sel_getCString_, bytes); + } + + /// getCString:maxLength: + @Deprecated('Use -getCString:maxLength:encoding: instead') + void getCString$1(ffi.Pointer bytes, {required int maxLength}) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSString.getCString:maxLength:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_1h3mito( + _$$ref.pointer, + _sel_getCString_maxLength_, + bytes, + maxLength, + ); + } + + /// getCString:maxLength:range:remainingRange: + @Deprecated('Use -getCString:maxLength:encoding: instead') + void getCString$2( + ffi.Pointer bytes, { + required int maxLength, + required NSRange range, + required ffi.Pointer remainingRange, + }) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSString.getCString:maxLength:range:remainingRange:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_3gpdva( + _$$ref.pointer, + _sel_getCString_maxLength_range_remainingRange_, + bytes, + maxLength, + range, + remainingRange, + ); + } + + /// getCharacters: + void getCharacters(ffi.Pointer buffer) { + final _$$ref = object$.ref; + _objc_msgSend_g3kdhc(_$$ref.pointer, _sel_getCharacters_, buffer); + } + + /// initWithCString: + @Deprecated('Use -initWithCString:encoding: instead') + objc.ObjCObject? initWithCString$1(ffi.Pointer bytes) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSString.initWithCString:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_56zxyn( + _$$ref.retainAndReturnPointer(), + _sel_initWithCString_, + bytes, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: false, release: true); + } + + /// initWithCString:length: + @Deprecated('Use -initWithCString:encoding: instead') + objc.ObjCObject? initWithCString$2( + ffi.Pointer bytes, { + required int length, + }) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSString.initWithCString:length:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_erqryg( + _$$ref.retainAndReturnPointer(), + _sel_initWithCString_length_, + bytes, + length, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: false, release: true); + } + + /// initWithCStringNoCopy:length:freeWhenDone: + @Deprecated('Use -initWithCString:encoding: instead') + objc.ObjCObject? initWithCStringNoCopy( + ffi.Pointer bytes, { + required int length, + required bool freeWhenDone, + }) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSString.initWithCStringNoCopy:length:freeWhenDone:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1ojrli4( + _$$ref.retainAndReturnPointer(), + _sel_initWithCStringNoCopy_length_freeWhenDone_, + bytes, + length, + freeWhenDone, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: false, release: true); + } + + /// initWithContentsOfFile: + @Deprecated('Use -initWithContentsOfFile:encoding:error: instead') + objc.ObjCObject? initWithContentsOfFile$2(NSString path) { + final _$$ref = object$.ref; + final _$$ref$1 = path.ref; + objc.checkOsVersionInternal( + 'NSString.initWithContentsOfFile:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.retainAndReturnPointer(), + _sel_initWithContentsOfFile_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: false, release: true); + } + + /// initWithContentsOfURL: + @Deprecated('Use -initWithContentsOfURL:encoding:error: instead') + objc.ObjCObject? initWithContentsOfURL$2(NSURL url) { + final _$$ref = object$.ref; + final _$$ref$1 = url.ref; + objc.checkOsVersionInternal( + 'NSString.initWithContentsOfURL:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.retainAndReturnPointer(), + _sel_initWithContentsOfURL_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: false, release: true); + } + + /// lossyCString + @Deprecated('Use -cStringUsingEncoding: instead') + ffi.Pointer lossyCString() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSString.lossyCString', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_1fuqfwb(_$$ref.pointer, _sel_lossyCString); + } + + /// writeToFile:atomically: + @Deprecated('Use -writeToFile:atomically:encoding:error: instead') + bool writeToFile(NSString path, {required bool atomically}) { + final _$$ref = object$.ref; + final _$$ref$1 = path.ref; + objc.checkOsVersionInternal( + 'NSString.writeToFile:atomically:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_1iyq28l( + _$$ref.pointer, + _sel_writeToFile_atomically_, + _$$ref$1.pointer, + atomically, + ); + } + + /// writeToURL:atomically: + @Deprecated('Use -writeToURL:atomically:encoding:error: instead') + bool writeToURL(NSURL url, {required bool atomically}) { + final _$$ref = object$.ref; + final _$$ref$1 = url.ref; + objc.checkOsVersionInternal( + 'NSString.writeToURL:atomically:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_1iyq28l( + _$$ref.pointer, + _sel_writeToURL_atomically_, + _$$ref$1.pointer, + atomically, + ); + } + + /// stringWithCString: + @Deprecated('Use +stringWithCString:encoding: instead') + static objc.ObjCObject? stringWithCString$1(ffi.Pointer bytes) { + objc.checkOsVersionInternal( + 'NSString.stringWithCString:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_56zxyn( + _class_NSString, + _sel_stringWithCString_, + bytes, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } + + /// stringWithCString:length: + @Deprecated('Use +stringWithCString:encoding:') + static objc.ObjCObject? stringWithCString$2( + ffi.Pointer bytes, { + required int length, + }) { + objc.checkOsVersionInternal( + 'NSString.stringWithCString:length:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_erqryg( + _class_NSString, + _sel_stringWithCString_length_, + bytes, + length, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } + + /// stringWithContentsOfFile: + @Deprecated('Use +stringWithContentsOfFile:encoding:error: instead') + static objc.ObjCObject? stringWithContentsOfFile$2(NSString path) { + final _$$ref = path.ref; + objc.checkOsVersionInternal( + 'NSString.stringWithContentsOfFile:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _class_NSString, + _sel_stringWithContentsOfFile_, + _$$ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } + + /// stringWithContentsOfURL: + @Deprecated('Use +stringWithContentsOfURL:encoding:error: instead') + static objc.ObjCObject? stringWithContentsOfURL$2(NSURL url) { + final _$$ref = url.ref; + objc.checkOsVersionInternal( + 'NSString.stringWithContentsOfURL:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _class_NSString, + _sel_stringWithContentsOfURL_, + _$$ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } +} + sealed class NSStringEncodingConversionOptions { static const NSStringEncodingConversionAllowLossy = 1; static const NSStringEncodingConversionExternalRepresentation = 2; } +/// NSStringEncodingDetection +extension NSStringEncodingDetection on NSString { + /// stringEncodingForData:encodingOptions:convertedString:usedLossyConversion: + static int stringEncodingForData( + NSData data, { + NSDictionary? encodingOptions, + required ffi.Pointer> convertedString, + required ffi.Pointer usedLossyConversion, + }) { + final _$$ref = data.ref; + final _$$ref$1 = encodingOptions?.ref; + objc.checkOsVersionInternal( + 'NSString.stringEncodingForData:encodingOptions:convertedString:usedLossyConversion:', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + return _objc_msgSend_1q2ox4r( + _class_NSString, + _sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_, + _$$ref.pointer, + _$$ref$1?.pointer ?? ffi.nullptr, + convertedString, + usedLossyConversion, + ); + } +} + sealed class NSStringEnumerationOptions { static const NSStringEnumerationByLines = 0; static const NSStringEnumerationByParagraphs = 1; @@ -22950,26 +29974,337 @@ extension NSStringExtensionMethods on NSString { } } -enum NSTimeZoneNameStyle { - NSTimeZoneNameStyleStandard(0), - NSTimeZoneNameStyleShortStandard(1), - NSTimeZoneNameStyleDaylightSaving(2), - NSTimeZoneNameStyleShortDaylightSaving(3), - NSTimeZoneNameStyleGeneric(4), - NSTimeZoneNameStyleShortGeneric(5); +/// NSStringPathExtensions +extension NSStringPathExtensions on NSString { + /// completePathIntoString:caseSensitive:matchesIntoArray:filterTypes: + int completePathIntoString( + ffi.Pointer> outputName, { + required bool caseSensitive, + required ffi.Pointer> matchesIntoArray, + NSArray? filterTypes, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = filterTypes?.ref; + return _objc_msgSend_8mvqcu( + _$$ref.pointer, + _sel_completePathIntoString_caseSensitive_matchesIntoArray_filterTypes_, + outputName, + caseSensitive, + matchesIntoArray, + _$$ref$1?.pointer ?? ffi.nullptr, + ); + } - final int value; - const NSTimeZoneNameStyle(this.value); - - static NSTimeZoneNameStyle fromValue(int value) => switch (value) { - 0 => NSTimeZoneNameStyleStandard, - 1 => NSTimeZoneNameStyleShortStandard, - 2 => NSTimeZoneNameStyleDaylightSaving, - 3 => NSTimeZoneNameStyleShortDaylightSaving, - 4 => NSTimeZoneNameStyleGeneric, - 5 => NSTimeZoneNameStyleShortGeneric, - _ => throw ArgumentError('Unknown value for NSTimeZoneNameStyle: $value'), - }; + /// fileSystemRepresentation + ffi.Pointer get fileSystemRepresentation { + final _$$ref = object$.ref; + return _objc_msgSend_1fuqfwb(_$$ref.pointer, _sel_fileSystemRepresentation); + } + + /// getFileSystemRepresentation:maxLength: + bool getFileSystemRepresentation( + ffi.Pointer cname, { + required int maxLength, + }) { + final _$$ref = object$.ref; + return _objc_msgSend_8cymbm( + _$$ref.pointer, + _sel_getFileSystemRepresentation_maxLength_, + cname, + maxLength, + ); + } + + /// isAbsolutePath + bool get isAbsolutePath { + final _$$ref = object$.ref; + return _objc_msgSend_91o635(_$$ref.pointer, _sel_isAbsolutePath); + } + + /// lastPathComponent + NSString get lastPathComponent { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_lastPathComponent); + return NSString.fromPointer($ret, retain: true, release: true); + } + + /// pathComponents + NSArray get pathComponents { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_pathComponents); + return NSArray.fromPointer($ret, retain: true, release: true); + } + + /// pathExtension + NSString get pathExtension { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_pathExtension); + return NSString.fromPointer($ret, retain: true, release: true); + } + + /// stringByAbbreviatingWithTildeInPath + NSString get stringByAbbreviatingWithTildeInPath { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_stringByAbbreviatingWithTildeInPath, + ); + return NSString.fromPointer($ret, retain: true, release: true); + } + + /// stringByAppendingPathComponent: + NSString stringByAppendingPathComponent(NSString str) { + final _$$ref = object$.ref; + final _$$ref$1 = str.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_stringByAppendingPathComponent_, + _$$ref$1.pointer, + ); + return NSString.fromPointer($ret, retain: true, release: true); + } + + /// stringByAppendingPathExtension: + NSString? stringByAppendingPathExtension(NSString str) { + final _$$ref = object$.ref; + final _$$ref$1 = str.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_stringByAppendingPathExtension_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); + } + + /// stringByDeletingLastPathComponent + NSString get stringByDeletingLastPathComponent { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_stringByDeletingLastPathComponent, + ); + return NSString.fromPointer($ret, retain: true, release: true); + } + + /// stringByDeletingPathExtension + NSString get stringByDeletingPathExtension { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_stringByDeletingPathExtension, + ); + return NSString.fromPointer($ret, retain: true, release: true); + } + + /// stringByExpandingTildeInPath + NSString get stringByExpandingTildeInPath { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_stringByExpandingTildeInPath, + ); + return NSString.fromPointer($ret, retain: true, release: true); + } + + /// stringByResolvingSymlinksInPath + NSString get stringByResolvingSymlinksInPath { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_stringByResolvingSymlinksInPath, + ); + return NSString.fromPointer($ret, retain: true, release: true); + } + + /// stringByStandardizingPath + NSString get stringByStandardizingPath { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_stringByStandardizingPath, + ); + return NSString.fromPointer($ret, retain: true, release: true); + } + + /// stringsByAppendingPaths: + NSArray stringsByAppendingPaths(NSArray paths) { + final _$$ref = object$.ref; + final _$$ref$1 = paths.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_stringsByAppendingPaths_, + _$$ref$1.pointer, + ); + return NSArray.fromPointer($ret, retain: true, release: true); + } + + /// pathWithComponents: + static NSString pathWithComponents(NSArray components) { + final _$$ref = components.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSString, + _sel_pathWithComponents_, + _$$ref.pointer, + ); + return NSString.fromPointer($ret, retain: true, release: true); + } +} + +/// NSThread +/// +/// NSThread +extension type NSThread._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject { + /// Constructs a [NSThread] that points to the same underlying object as [other]. + NSThread.as(objc.ObjCObject other) : object$ = other {} + + /// Constructs a [NSThread] that wraps the given raw object pointer. + NSThread.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) {} +} + +/// NSThreadPerformAdditions +extension NSThreadPerformAdditions on NSObject { + /// performSelector:onThread:withObject:waitUntilDone: + void performSelector$3( + ffi.Pointer aSelector, { + required NSThread onThread, + objc.ObjCObject? withObject, + required bool waitUntilDone, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = onThread.ref; + final _$$ref$2 = withObject?.ref; + objc.checkOsVersionInternal( + 'NSObject.performSelector:onThread:withObject:waitUntilDone:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + _objc_msgSend_1whyima( + _$$ref.pointer, + _sel_performSelector_onThread_withObject_waitUntilDone_, + aSelector, + _$$ref$1.pointer, + _$$ref$2?.pointer ?? ffi.nullptr, + waitUntilDone, + ); + } + + /// performSelector:onThread:withObject:waitUntilDone:modes: + void performSelector$4( + ffi.Pointer aSelector, { + required NSThread onThread, + objc.ObjCObject? withObject, + required bool waitUntilDone, + NSArray? modes, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = onThread.ref; + final _$$ref$2 = withObject?.ref; + final _$$ref$3 = modes?.ref; + objc.checkOsVersionInternal( + 'NSObject.performSelector:onThread:withObject:waitUntilDone:modes:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + _objc_msgSend_1cc1buo( + _$$ref.pointer, + _sel_performSelector_onThread_withObject_waitUntilDone_modes_, + aSelector, + _$$ref$1.pointer, + _$$ref$2?.pointer ?? ffi.nullptr, + waitUntilDone, + _$$ref$3?.pointer ?? ffi.nullptr, + ); + } + + /// performSelectorInBackground:withObject: + void performSelectorInBackground( + ffi.Pointer aSelector, { + objc.ObjCObject? withObject, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = withObject?.ref; + objc.checkOsVersionInternal( + 'NSObject.performSelectorInBackground:withObject:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + _objc_msgSend_1qv0eq4( + _$$ref.pointer, + _sel_performSelectorInBackground_withObject_, + aSelector, + _$$ref$1?.pointer ?? ffi.nullptr, + ); + } + + /// performSelectorOnMainThread:withObject:waitUntilDone: + void performSelectorOnMainThread( + ffi.Pointer aSelector, { + objc.ObjCObject? withObject, + required bool waitUntilDone, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = withObject?.ref; + objc.checkOsVersionInternal( + 'NSObject.performSelectorOnMainThread:withObject:waitUntilDone:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_tsocn4( + _$$ref.pointer, + _sel_performSelectorOnMainThread_withObject_waitUntilDone_, + aSelector, + _$$ref$1?.pointer ?? ffi.nullptr, + waitUntilDone, + ); + } + + /// performSelectorOnMainThread:withObject:waitUntilDone:modes: + void performSelectorOnMainThread$1( + ffi.Pointer aSelector, { + objc.ObjCObject? withObject, + required bool waitUntilDone, + NSArray? modes, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = withObject?.ref; + final _$$ref$2 = modes?.ref; + objc.checkOsVersionInternal( + 'NSObject.performSelectorOnMainThread:withObject:waitUntilDone:modes:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_1fdou4m( + _$$ref.pointer, + _sel_performSelectorOnMainThread_withObject_waitUntilDone_modes_, + aSelector, + _$$ref$1?.pointer ?? ffi.nullptr, + waitUntilDone, + _$$ref$2?.pointer ?? ffi.nullptr, + ); + } +} + +/// NSTimeZone +/// +/// NSTimeZone +extension type NSTimeZone._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject, NSCopying, NSSecureCoding { + /// Constructs a [NSTimeZone] that points to the same underlying object as [other]. + NSTimeZone.as(objc.ObjCObject other) : object$ = other {} + + /// Constructs a [NSTimeZone] that wraps the given raw object pointer. + NSTimeZone.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) {} } /// NSTimer @@ -23288,6 +30623,41 @@ extension NSTimer$Methods on NSTimer { } } +/// NSTypedstreamCompatibility +extension NSTypedstreamCompatibility on NSCoder { + /// decodeNXObject + @Deprecated('Not supported') + objc.ObjCObject? decodeNXObject() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSCoder.decodeNXObject', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_decodeNXObject); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } + + /// encodeNXObject: + @Deprecated('Not supported') + void encodeNXObject(objc.ObjCObject object) { + final _$$ref = object$.ref; + final _$$ref$1 = object.ref; + objc.checkOsVersionInternal( + 'NSCoder.encodeNXObject:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_encodeNXObject_, + _$$ref$1.pointer, + ); + } +} + /// NSURL extension type NSURL._(objc.ObjCObject object$) implements objc.ObjCObject, NSObject, NSSecureCoding, NSCopying { @@ -24436,6 +31806,84 @@ sealed class NSURLBookmarkResolutionOptions { static const NSURLBookmarkResolutionWithoutImplicitStartAccessing = 32768; } +/// NSURLClient +extension NSURLClient on NSObject { + /// URL:resourceDataDidBecomeAvailable: + @Deprecated('Use NSURLConnection instead') + void URL(NSURL sender, {required NSData resourceDataDidBecomeAvailable}) { + final _$$ref = object$.ref; + final _$$ref$1 = sender.ref; + final _$$ref$2 = resourceDataDidBecomeAvailable.ref; + objc.checkOsVersionInternal( + 'NSObject.URL:resourceDataDidBecomeAvailable:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_pfv6jd( + _$$ref.pointer, + _sel_URL_resourceDataDidBecomeAvailable_, + _$$ref$1.pointer, + _$$ref$2.pointer, + ); + } + + /// URL:resourceDidFailLoadingWithReason: + @Deprecated('Use NSURLConnection instead') + void URL$1( + NSURL sender, { + required NSString resourceDidFailLoadingWithReason, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = sender.ref; + final _$$ref$2 = resourceDidFailLoadingWithReason.ref; + objc.checkOsVersionInternal( + 'NSObject.URL:resourceDidFailLoadingWithReason:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_pfv6jd( + _$$ref.pointer, + _sel_URL_resourceDidFailLoadingWithReason_, + _$$ref$1.pointer, + _$$ref$2.pointer, + ); + } + + /// URLResourceDidCancelLoading: + @Deprecated('Use NSURLConnection instead') + void URLResourceDidCancelLoading(NSURL sender) { + final _$$ref = object$.ref; + final _$$ref$1 = sender.ref; + objc.checkOsVersionInternal( + 'NSObject.URLResourceDidCancelLoading:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_URLResourceDidCancelLoading_, + _$$ref$1.pointer, + ); + } + + /// URLResourceDidFinishLoading: + @Deprecated('Use NSURLConnection instead') + void URLResourceDidFinishLoading(NSURL sender) { + final _$$ref = object$.ref; + final _$$ref$1 = sender.ref; + objc.checkOsVersionInternal( + 'NSObject.URLResourceDidFinishLoading:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_URLResourceDidFinishLoading_, + _$$ref$1.pointer, + ); + } +} + /// NSURLHandle extension type NSURLHandle._(objc.ObjCObject object$) implements objc.ObjCObject, NSObject { @@ -25462,20 +32910,506 @@ enum NSURLHandleStatus { }; } -enum NSURLRelationship { - NSURLRelationshipContains(0), - NSURLRelationshipSame(1), - NSURLRelationshipOther(2); +/// NSURLLoading +extension NSURLLoading on NSURL { + /// URLHandleUsingCache: + @Deprecated('Use NSURLConnection instead') + NSURLHandle? URLHandleUsingCache(bool shouldUseCache) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.URLHandleUsingCache:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1t6aok9( + _$$ref.pointer, + _sel_URLHandleUsingCache_, + shouldUseCache, + ); + return $ret.address == 0 + ? null + : NSURLHandle.fromPointer($ret, retain: true, release: true); + } - final int value; - const NSURLRelationship(this.value); + /// loadResourceDataNotifyingClient:usingCache: + @Deprecated('Use NSURLConnection instead') + void loadResourceDataNotifyingClient( + objc.ObjCObject client, { + required bool usingCache, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = client.ref; + objc.checkOsVersionInternal( + 'NSURL.loadResourceDataNotifyingClient:usingCache:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_6p7ndb( + _$$ref.pointer, + _sel_loadResourceDataNotifyingClient_usingCache_, + _$$ref$1.pointer, + usingCache, + ); + } - static NSURLRelationship fromValue(int value) => switch (value) { - 0 => NSURLRelationshipContains, - 1 => NSURLRelationshipSame, - 2 => NSURLRelationshipOther, - _ => throw ArgumentError('Unknown value for NSURLRelationship: $value'), - }; + /// propertyForKey: + @Deprecated('Use NSURLConnection instead') + objc.ObjCObject? propertyForKey(NSString propertyKey) { + final _$$ref = object$.ref; + final _$$ref$1 = propertyKey.ref; + objc.checkOsVersionInternal( + 'NSURL.propertyForKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_propertyForKey_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } + + /// resourceDataUsingCache: + @Deprecated('Use NSURLConnection instead') + NSData? resourceDataUsingCache(bool shouldUseCache) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.resourceDataUsingCache:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1t6aok9( + _$$ref.pointer, + _sel_resourceDataUsingCache_, + shouldUseCache, + ); + return $ret.address == 0 + ? null + : NSData.fromPointer($ret, retain: true, release: true); + } + + /// setProperty:forKey: + @Deprecated('Use NSURLConnection instead') + bool setProperty(objc.ObjCObject property, {required NSString forKey}) { + final _$$ref = object$.ref; + final _$$ref$1 = property.ref; + final _$$ref$2 = forKey.ref; + objc.checkOsVersionInternal( + 'NSURL.setProperty:forKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_1lsax7n( + _$$ref.pointer, + _sel_setProperty_forKey_, + _$$ref$1.pointer, + _$$ref$2.pointer, + ); + } + + /// setResourceData: + @Deprecated('Use NSURLConnection instead') + bool setResourceData(NSData data) { + final _$$ref = object$.ref; + final _$$ref$1 = data.ref; + objc.checkOsVersionInternal( + 'NSURL.setResourceData:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_setResourceData_, + _$$ref$1.pointer, + ); + } +} + +/// NSURLPathUtilities +extension NSURLPathUtilities on NSURL { + /// URLByAppendingPathComponent: + NSURL? URLByAppendingPathComponent(NSString pathComponent) { + final _$$ref = object$.ref; + final _$$ref$1 = pathComponent.ref; + objc.checkOsVersionInternal( + 'NSURL.URLByAppendingPathComponent:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_URLByAppendingPathComponent_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : NSURL.fromPointer($ret, retain: true, release: true); + } + + /// URLByAppendingPathComponent:isDirectory: + NSURL? URLByAppendingPathComponent$1( + NSString pathComponent, { + required bool isDirectory, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = pathComponent.ref; + objc.checkOsVersionInternal( + 'NSURL.URLByAppendingPathComponent:isDirectory:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + final $ret = _objc_msgSend_17amj0z( + _$$ref.pointer, + _sel_URLByAppendingPathComponent_isDirectory_, + _$$ref$1.pointer, + isDirectory, + ); + return $ret.address == 0 + ? null + : NSURL.fromPointer($ret, retain: true, release: true); + } + + /// URLByAppendingPathExtension: + NSURL? URLByAppendingPathExtension(NSString pathExtension) { + final _$$ref = object$.ref; + final _$$ref$1 = pathExtension.ref; + objc.checkOsVersionInternal( + 'NSURL.URLByAppendingPathExtension:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_URLByAppendingPathExtension_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : NSURL.fromPointer($ret, retain: true, release: true); + } + + /// URLByDeletingLastPathComponent + NSURL? get URLByDeletingLastPathComponent { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.URLByDeletingLastPathComponent', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_URLByDeletingLastPathComponent, + ); + return $ret.address == 0 + ? null + : NSURL.fromPointer($ret, retain: true, release: true); + } + + /// URLByDeletingPathExtension + NSURL? get URLByDeletingPathExtension { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.URLByDeletingPathExtension', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_URLByDeletingPathExtension, + ); + return $ret.address == 0 + ? null + : NSURL.fromPointer($ret, retain: true, release: true); + } + + /// URLByResolvingSymlinksInPath + NSURL? get URLByResolvingSymlinksInPath { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.URLByResolvingSymlinksInPath', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_URLByResolvingSymlinksInPath, + ); + return $ret.address == 0 + ? null + : NSURL.fromPointer($ret, retain: true, release: true); + } + + /// URLByStandardizingPath + NSURL? get URLByStandardizingPath { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.URLByStandardizingPath', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_URLByStandardizingPath, + ); + return $ret.address == 0 + ? null + : NSURL.fromPointer($ret, retain: true, release: true); + } + + /// checkResourceIsReachableAndReturnError: + bool checkResourceIsReachableAndReturnError() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.checkResourceIsReachableAndReturnError:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1dom33q( + _$$ref.pointer, + _sel_checkResourceIsReachableAndReturnError_, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret; + } finally { + pkg_ffi.calloc.free($err); + } + } + + /// lastPathComponent + NSString? get lastPathComponent { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.lastPathComponent', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_lastPathComponent); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); + } + + /// pathComponents + NSArray? get pathComponents { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.pathComponents', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_pathComponents); + return $ret.address == 0 + ? null + : NSArray.fromPointer($ret, retain: true, release: true); + } + + /// pathExtension + NSString? get pathExtension { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.pathExtension', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_pathExtension); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); + } + + /// fileURLWithPathComponents: + static NSURL? fileURLWithPathComponents(NSArray components) { + final _$$ref = components.ref; + objc.checkOsVersionInternal( + 'NSURL.fileURLWithPathComponents:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _class_NSURL, + _sel_fileURLWithPathComponents_, + _$$ref.pointer, + ); + return $ret.address == 0 + ? null + : NSURL.fromPointer($ret, retain: true, release: true); + } +} + +/// NSURLUtilities +extension NSURLUtilities on NSCharacterSet { + /// URLFragmentAllowedCharacterSet + static NSCharacterSet getURLFragmentAllowedCharacterSet() { + objc.checkOsVersionInternal( + 'NSCharacterSet.URLFragmentAllowedCharacterSet', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _class_NSCharacterSet, + _sel_URLFragmentAllowedCharacterSet, + ); + return NSCharacterSet.fromPointer($ret, retain: true, release: true); + } + + /// URLHostAllowedCharacterSet + static NSCharacterSet getURLHostAllowedCharacterSet() { + objc.checkOsVersionInternal( + 'NSCharacterSet.URLHostAllowedCharacterSet', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _class_NSCharacterSet, + _sel_URLHostAllowedCharacterSet, + ); + return NSCharacterSet.fromPointer($ret, retain: true, release: true); + } + + /// URLPasswordAllowedCharacterSet + static NSCharacterSet getURLPasswordAllowedCharacterSet() { + objc.checkOsVersionInternal( + 'NSCharacterSet.URLPasswordAllowedCharacterSet', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _class_NSCharacterSet, + _sel_URLPasswordAllowedCharacterSet, + ); + return NSCharacterSet.fromPointer($ret, retain: true, release: true); + } + + /// URLPathAllowedCharacterSet + static NSCharacterSet getURLPathAllowedCharacterSet() { + objc.checkOsVersionInternal( + 'NSCharacterSet.URLPathAllowedCharacterSet', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _class_NSCharacterSet, + _sel_URLPathAllowedCharacterSet, + ); + return NSCharacterSet.fromPointer($ret, retain: true, release: true); + } + + /// URLQueryAllowedCharacterSet + static NSCharacterSet getURLQueryAllowedCharacterSet() { + objc.checkOsVersionInternal( + 'NSCharacterSet.URLQueryAllowedCharacterSet', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _class_NSCharacterSet, + _sel_URLQueryAllowedCharacterSet, + ); + return NSCharacterSet.fromPointer($ret, retain: true, release: true); + } + + /// URLUserAllowedCharacterSet + static NSCharacterSet getURLUserAllowedCharacterSet() { + objc.checkOsVersionInternal( + 'NSCharacterSet.URLUserAllowedCharacterSet', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _class_NSCharacterSet, + _sel_URLUserAllowedCharacterSet, + ); + return NSCharacterSet.fromPointer($ret, retain: true, release: true); + } +} + +/// NSURLUtilities +extension NSURLUtilities$1 on NSString { + /// stringByAddingPercentEncodingWithAllowedCharacters: + NSString? stringByAddingPercentEncodingWithAllowedCharacters( + NSCharacterSet allowedCharacters, + ) { + final _$$ref = object$.ref; + final _$$ref$1 = allowedCharacters.ref; + objc.checkOsVersionInternal( + 'NSString.stringByAddingPercentEncodingWithAllowedCharacters:', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_stringByAddingPercentEncodingWithAllowedCharacters_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); + } + + /// stringByAddingPercentEscapesUsingEncoding: + @Deprecated( + 'Use -stringByAddingPercentEncodingWithAllowedCharacters: instead, which always uses the recommended UTF-8 encoding, and which encodes for a specific URL component or subcomponent since each URL component or subcomponent has different rules for what characters are valid.', + ) + NSString? stringByAddingPercentEscapesUsingEncoding(int enc) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSString.stringByAddingPercentEscapesUsingEncoding:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_14hpxwa( + _$$ref.pointer, + _sel_stringByAddingPercentEscapesUsingEncoding_, + enc, + ); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); + } + + /// stringByRemovingPercentEncoding + NSString? get stringByRemovingPercentEncoding { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSString.stringByRemovingPercentEncoding', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_stringByRemovingPercentEncoding, + ); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); + } + + /// stringByReplacingPercentEscapesUsingEncoding: + @Deprecated( + 'Use -stringByRemovingPercentEncoding instead, which always uses the recommended UTF-8 encoding.', + ) + NSString? stringByReplacingPercentEscapesUsingEncoding(int enc) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSString.stringByReplacingPercentEscapesUsingEncoding:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_14hpxwa( + _$$ref.pointer, + _sel_stringByReplacingPercentEscapesUsingEncoding_, + enc, + ); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); + } } /// NSValue @@ -25609,9 +33543,224 @@ extension NSValue$Methods on NSValue { } } -sealed class NSVolumeEnumerationOptions { - static const NSVolumeEnumerationSkipHiddenVolumes = 2; - static const NSVolumeEnumerationProduceFileReferenceURLs = 4; +/// NSValueCreation +extension NSValueCreation on NSValue { + /// value:withObjCType: + static NSValue value( + ffi.Pointer value, { + required ffi.Pointer withObjCType, + }) { + final $ret = _objc_msgSend_e9mncn( + _class_NSValue, + _sel_value_withObjCType_, + value, + withObjCType, + ); + return NSValue.fromPointer($ret, retain: true, release: true); + } + + /// valueWithBytes:objCType: + static NSValue valueWithBytes( + ffi.Pointer value, { + required ffi.Pointer objCType, + }) { + final $ret = _objc_msgSend_e9mncn( + _class_NSValue, + _sel_valueWithBytes_objCType_, + value, + objCType, + ); + return NSValue.fromPointer($ret, retain: true, release: true); + } +} + +/// NSValueExtensionMethods +extension NSValueExtensionMethods on NSValue { + /// isEqualToValue: + bool isEqualToValue(NSValue value) { + final _$$ref = object$.ref; + final _$$ref$1 = value.ref; + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_isEqualToValue_, + _$$ref$1.pointer, + ); + } + + /// nonretainedObjectValue + objc.ObjCObject? get nonretainedObjectValue { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_nonretainedObjectValue, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } + + /// pointerValue + ffi.Pointer get pointerValue { + final _$$ref = object$.ref; + return _objc_msgSend_6ex6p5(_$$ref.pointer, _sel_pointerValue); + } + + /// valueWithNonretainedObject: + static NSValue valueWithNonretainedObject(objc.ObjCObject? anObject) { + final _$$ref = anObject?.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSValue, + _sel_valueWithNonretainedObject_, + _$$ref?.pointer ?? ffi.nullptr, + ); + return NSValue.fromPointer($ret, retain: true, release: true); + } + + /// valueWithPointer: + static NSValue valueWithPointer(ffi.Pointer pointer) { + final $ret = _objc_msgSend_1mbt9g9( + _class_NSValue, + _sel_valueWithPointer_, + pointer, + ); + return NSValue.fromPointer($ret, retain: true, release: true); + } +} + +/// NSValueGeometryExtensions +extension NSValueGeometryExtensions on NSValue { + /// edgeInsetsValue + NSEdgeInsets get edgeInsetsValue { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSValue.edgeInsetsValue', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + final $ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_sl0cgwStret($ptr, _$$ref.pointer, _sel_edgeInsetsValue) + : $ptr.ref = _objc_msgSend_sl0cgw(_$$ref.pointer, _sel_edgeInsetsValue); + final $finalizable = $ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree, + ); + return ffi.Struct.create($finalizable); + } + + /// pointValue + CGPoint get pointValue { + final _$$ref = object$.ref; + final $ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_1uwdhlkStret($ptr, _$$ref.pointer, _sel_pointValue) + : $ptr.ref = _objc_msgSend_1uwdhlk(_$$ref.pointer, _sel_pointValue); + final $finalizable = $ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree, + ); + return ffi.Struct.create($finalizable); + } + + /// rectValue + CGRect get rectValue { + final _$$ref = object$.ref; + final $ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_bu1hbwStret($ptr, _$$ref.pointer, _sel_rectValue) + : $ptr.ref = _objc_msgSend_bu1hbw(_$$ref.pointer, _sel_rectValue); + final $finalizable = $ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree, + ); + return ffi.Struct.create($finalizable); + } + + /// sizeValue + CGSize get sizeValue { + final _$$ref = object$.ref; + final $ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_1vdfkenStret($ptr, _$$ref.pointer, _sel_sizeValue) + : $ptr.ref = _objc_msgSend_1vdfken(_$$ref.pointer, _sel_sizeValue); + final $finalizable = $ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree, + ); + return ffi.Struct.create($finalizable); + } + + /// valueWithEdgeInsets: + static NSValue valueWithEdgeInsets(NSEdgeInsets insets) { + objc.checkOsVersionInternal( + 'NSValue.valueWithEdgeInsets:', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + final $ret = _objc_msgSend_sax6zm( + _class_NSValue, + _sel_valueWithEdgeInsets_, + insets, + ); + return NSValue.fromPointer($ret, retain: true, release: true); + } + + /// valueWithPoint: + static NSValue valueWithPoint(CGPoint point) { + final $ret = _objc_msgSend_wgkxx2( + _class_NSValue, + _sel_valueWithPoint_, + point, + ); + return NSValue.fromPointer($ret, retain: true, release: true); + } + + /// valueWithRect: + static NSValue valueWithRect(CGRect rect) { + final $ret = _objc_msgSend_15yz4e6( + _class_NSValue, + _sel_valueWithRect_, + rect, + ); + return NSValue.fromPointer($ret, retain: true, release: true); + } + + /// valueWithSize: + static NSValue valueWithSize(CGSize size) { + final $ret = _objc_msgSend_1c2zpn3( + _class_NSValue, + _sel_valueWithSize_, + size, + ); + return NSValue.fromPointer($ret, retain: true, release: true); + } +} + +/// NSValueRangeExtensions +extension NSValueRangeExtensions on NSValue { + /// rangeValue + NSRange get rangeValue { + final _$$ref = object$.ref; + final $ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_1u11dbbStret($ptr, _$$ref.pointer, _sel_rangeValue) + : $ptr.ref = _objc_msgSend_1u11dbb(_$$ref.pointer, _sel_rangeValue); + final $finalizable = $ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree, + ); + return ffi.Struct.create($finalizable); + } + + /// valueWithRange: + static NSValue valueWithRange(NSRange range) { + final $ret = _objc_msgSend_1k1o1s7( + _class_NSValue, + _sel_valueWithRange_, + range, + ); + return NSValue.fromPointer($ret, retain: true, release: true); + } } final class NSZone extends ffi.Opaque {} @@ -28206,6 +36355,178 @@ extension ObjCBlock_bool_ObjectType_NSUInteger_bool$CallExtension } } +/// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. +abstract final class ObjCBlock_bool_ObjectType_ObjectType { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ) + >(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) + > + > + ptr, + ) => + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ) + > + fromFunction( + bool Function(objc.ObjCObject, objc.ObjCObject) fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ) + >( + objc.newClosureBlock(_closureCallable, ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return fn( + objc.ObjCObject(arg0, retain: true, release: true), + objc.ObjCObject(arg1, retain: true, release: true), + ); + }, keepIsolateAlive), + retain: false, + release: true, + ); + + static 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); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline, false) + .cast(); + static bool _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ) => + (objc.getBlockClosure(block) + as bool Function( + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline, false) + .cast(); +} + +/// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. +extension ObjCBlock_bool_ObjectType_ObjectType$CallExtension + on + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ) + > { + bool call(objc.ObjCObject arg0, objc.ObjCObject arg1) { + final _$$ref = arg0.ref; + final _$$ref$1 = arg1.ref; + return ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ) + > + >() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(ref.pointer, _$$ref.pointer, _$$ref$1.pointer); + } +} + /// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. abstract final class ObjCBlock_bool_ObjectType_bool { /// Returns a block that wraps the given raw block pointer. @@ -29800,6 +38121,351 @@ extension ObjCBlock_ffiVoid_NSData_NSError$CallExtension } } +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_NSDictionary_NSRange_bool { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(NSDictionary, NSRange, ffi.Pointer) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + ffi.Void Function(NSDictionary, NSRange, ffi.Pointer) + >(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(NSDictionary, NSRange, ffi.Pointer) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2, + ) + > + > + ptr, + ) => + objc.ObjCBlock< + ffi.Void Function(NSDictionary, NSRange, ffi.Pointer) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + ffi.Void Function(NSDictionary, NSRange, ffi.Pointer) + > + fromFunction( + void Function(NSDictionary, NSRange, ffi.Pointer) fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + ffi.Void Function(NSDictionary, NSRange, ffi.Pointer) + >( + objc.newClosureBlock(_closureCallable, ( + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2, + ) { + return fn( + NSDictionary.fromPointer(arg0, retain: true, release: true), + arg1, + arg2, + ); + }, keepIsolateAlive), + retain: false, + release: true, + ); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + ffi.Void Function(NSDictionary, NSRange, ffi.Pointer) + > + listener( + void Function(NSDictionary, NSRange, ffi.Pointer) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock(_listenerCallable.nativeFunction.cast(), ( + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2, + ) { + return fn( + NSDictionary.fromPointer(arg0, retain: false, release: true), + arg1, + arg2, + ); + }, keepIsolateAlive); + final wrapper = _1wx624s_wrapListenerBlock_1a22wz(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(NSDictionary, NSRange, ffi.Pointer) + >(wrapper, retain: false, release: true); + } + + /// Creates a blocking block from a Dart function. + /// + /// This callback can be invoked from any native thread, and will block the + /// caller until the callback is handled by the Dart isolate that created + /// the block. Async functions are not supported. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. If the owner isolate + /// has shut down, and the block is invoked by native code, it may block + /// indefinitely, or have other undefined behavior. + static objc.ObjCBlock< + ffi.Void Function(NSDictionary, NSRange, ffi.Pointer) + > + blocking( + void Function(NSDictionary, NSRange, ffi.Pointer) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock(_blockingCallable.nativeFunction.cast(), ( + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2, + ) { + return fn( + NSDictionary.fromPointer(arg0, retain: false, release: true), + arg1, + arg2, + ); + }, keepIsolateAlive); + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2, + ) { + return fn( + NSDictionary.fromPointer(arg0, retain: false, release: true), + arg1, + arg2, + ); + }, + keepIsolateAlive, + ); + final wrapper = _1wx624s_wrapBlockingBlock_1a22wz( + raw, + rawListener, + objc.objCContext, + ); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock< + ffi.Void Function(NSDictionary, NSRange, ffi.Pointer) + >(wrapper, retain: false, release: true); + } + + static void _listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2, + ) { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + NSRange, + ffi.Pointer, + ))(arg0, arg1, arg2); + objc.objectRelease(block.cast()); + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSRange, + ffi.Pointer, + ) + > + _listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSRange, + ffi.Pointer, + ) + >.listener(_listenerTrampoline) + ..keepIsolateAlive = false; + static void _blockingTrampoline( + ffi.Pointer block, + ffi.Pointer waiter, + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2, + ) { + try { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + NSRange, + ffi.Pointer, + ))(arg0, arg1, arg2); + } catch (e) { + } finally { + objc.signalWaiter(waiter); + objc.objectRelease(block.cast()); + } + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSRange, + ffi.Pointer, + ) + > + _blockingCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSRange, + ffi.Pointer, + ) + >.isolateLocal(_blockingTrampoline) + ..keepIsolateAlive = false; + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSRange, + ffi.Pointer, + ) + > + _blockingListenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSRange, + ffi.Pointer, + ) + >.listener(_blockingTrampoline) + ..keepIsolateAlive = false; + static void _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); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSRange, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static void _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2, + ) => + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + NSRange, + ffi.Pointer, + ))(arg0, arg1, arg2); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSRange, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_NSDictionary_NSRange_bool$CallExtension + on + objc.ObjCBlock< + ffi.Void Function(NSDictionary, NSRange, ffi.Pointer) + > { + void call(NSDictionary arg0, NSRange arg1, ffi.Pointer arg2) { + final _$$ref = arg0.ref; + return ref.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, + ) + >()(ref.pointer, _$$ref.pointer, arg1, arg2); + } +} + /// Construction methods for `objc.ObjCBlock?, NSError)>, ffi.Pointer, NSDictionary)>`. abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObjectImpl_NSDictionary { /// Returns a block that wraps the given raw block pointer. @@ -35605,11 +44271,354 @@ extension ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData$CallExtension } } -/// Construction methods for `objc.ObjCBlock, NSURLHandle, NSString)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { +/// Construction methods for `objc.ObjCBlock, NSURLHandle, NSString)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + >(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + > + ptr, + ) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + > + fromFunction( + void Function(ffi.Pointer, NSURLHandle, NSString) fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + >( + objc.newClosureBlock(_closureCallable, ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + return fn( + arg0, + NSURLHandle.fromPointer(arg1, retain: true, release: true), + NSString.fromPointer(arg2, retain: true, release: true), + ); + }, keepIsolateAlive), + retain: false, + release: true, + ); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + > + listener( + void Function(ffi.Pointer, NSURLHandle, NSString) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock(_listenerCallable.nativeFunction.cast(), ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + return fn( + arg0, + NSURLHandle.fromPointer(arg1, retain: false, release: true), + NSString.fromPointer(arg2, retain: false, release: true), + ); + }, keepIsolateAlive); + final wrapper = _1wx624s_wrapListenerBlock_fjrv01(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + >(wrapper, retain: false, release: true); + } + + /// Creates a blocking block from a Dart function. + /// + /// This callback can be invoked from any native thread, and will block the + /// caller until the callback is handled by the Dart isolate that created + /// the block. Async functions are not supported. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. If the owner isolate + /// has shut down, and the block is invoked by native code, it may block + /// indefinitely, or have other undefined behavior. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + > + blocking( + void Function(ffi.Pointer, NSURLHandle, NSString) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock(_blockingCallable.nativeFunction.cast(), ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + return fn( + arg0, + NSURLHandle.fromPointer(arg1, retain: false, release: true), + NSString.fromPointer(arg2, retain: false, release: true), + ); + }, keepIsolateAlive); + final rawListener = objc + .newClosureBlock(_blockingListenerCallable.nativeFunction.cast(), ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + return fn( + arg0, + NSURLHandle.fromPointer(arg1, retain: false, release: true), + NSString.fromPointer(arg2, retain: false, release: true), + ); + }, keepIsolateAlive); + final wrapper = _1wx624s_wrapBlockingBlock_fjrv01( + raw, + rawListener, + objc.objCContext, + ); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + >(wrapper, retain: false, release: true); + } + + static void _listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2); + objc.objectRelease(block.cast()); + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_listenerTrampoline) + ..keepIsolateAlive = false; + static void _blockingTrampoline( + ffi.Pointer block, + ffi.Pointer waiter, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + try { + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2); + } catch (e) { + } finally { + objc.signalWaiter(waiter); + objc.objectRelease(block.cast()); + } + } + + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.isolateLocal(_blockingTrampoline) + ..keepIsolateAlive = false; + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + _blockingListenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >.listener(_blockingTrampoline) + ..keepIsolateAlive = false; + static void _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); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline) + .cast(); + static void _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => + (objc.getBlockClosure(block) + as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline) + .cast(); +} + +/// Call operator for `objc.ObjCBlock, NSURLHandle, NSString)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString$CallExtension + on + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + > { + void call(ffi.Pointer arg0, NSURLHandle arg1, NSString arg2) { + final _$$ref = arg1.ref; + final _$$ref$1 = arg2.ref; + return ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(ref.pointer, arg0, _$$ref.pointer, _$$ref$1.pointer); + } +} + +/// Construction methods for `objc.ObjCBlock?, NSError?)>`. +abstract final class ObjCBlock_ffiVoid_idNSItemProviderReading_NSError { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + ffi.Void Function(ffi.Pointer?, NSError?) > fromPointer( ffi.Pointer pointer, { @@ -35617,7 +44626,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { bool release = false, }) => objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + ffi.Void Function(ffi.Pointer?, NSError?) >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. @@ -35626,22 +44635,21 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + ffi.Void Function(ffi.Pointer?, NSError?) > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, ) > > ptr, ) => objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + ffi.Void Function(ffi.Pointer?, NSError?) >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, @@ -35657,24 +44665,30 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + ffi.Void Function(ffi.Pointer?, NSError?) > fromFunction( - void Function(ffi.Pointer, NSURLHandle, NSString) fn, { + void Function(NSItemProviderReading?, NSError?) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + ffi.Void Function(ffi.Pointer?, NSError?) >( objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, ) { return fn( - arg0, - NSURLHandle.fromPointer(arg1, retain: true, release: true), - NSString.fromPointer(arg2, retain: true, release: true), + arg0.address == 0 + ? null + : NSItemProviderReading.fromPointer( + arg0, + retain: true, + release: true, + ), + arg1.address == 0 + ? null + : NSError.fromPointer(arg1, retain: true, release: true), ); }, keepIsolateAlive), retain: false, @@ -35691,27 +44705,33 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + ffi.Void Function(ffi.Pointer?, NSError?) > listener( - void Function(ffi.Pointer, NSURLHandle, NSString) fn, { + void Function(NSItemProviderReading?, NSError?) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_listenerCallable.nativeFunction.cast(), ( - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, ) { return fn( - arg0, - NSURLHandle.fromPointer(arg1, retain: false, release: true), - NSString.fromPointer(arg2, retain: false, release: true), + arg0.address == 0 + ? null + : NSItemProviderReading.fromPointer( + arg0, + retain: false, + release: true, + ), + arg1.address == 0 + ? null + : NSError.fromPointer(arg1, retain: false, release: true), ); }, keepIsolateAlive); - final wrapper = _1wx624s_wrapListenerBlock_fjrv01(raw); + final wrapper = _1wx624s_wrapListenerBlock_pfv6jd(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + ffi.Void Function(ffi.Pointer?, NSError?) >(wrapper, retain: false, release: true); } @@ -35726,36 +44746,51 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + ffi.Void Function(ffi.Pointer?, NSError?) > blocking( - void Function(ffi.Pointer, NSURLHandle, NSString) fn, { + void Function(NSItemProviderReading?, NSError?) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_blockingCallable.nativeFunction.cast(), ( - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, ) { return fn( - arg0, - NSURLHandle.fromPointer(arg1, retain: false, release: true), - NSString.fromPointer(arg2, retain: false, release: true), + arg0.address == 0 + ? null + : NSItemProviderReading.fromPointer( + arg0, + retain: false, + release: true, + ), + arg1.address == 0 + ? null + : NSError.fromPointer(arg1, retain: false, release: true), ); }, keepIsolateAlive); - final rawListener = objc - .newClosureBlock(_blockingListenerCallable.nativeFunction.cast(), ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ) { - return fn( - arg0, - NSURLHandle.fromPointer(arg1, retain: false, release: true), - NSString.fromPointer(arg2, retain: false, release: true), - ); - }, keepIsolateAlive); - final wrapper = _1wx624s_wrapBlockingBlock_fjrv01( + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return fn( + arg0.address == 0 + ? null + : NSItemProviderReading.fromPointer( + arg0, + retain: false, + release: true, + ), + arg1.address == 0 + ? null + : NSError.fromPointer(arg1, retain: false, release: true), + ); + }, + keepIsolateAlive, + ); + final wrapper = _1wx624s_wrapBlockingBlock_pfv6jd( raw, rawListener, objc.objCContext, @@ -35763,29 +44798,26 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { objc.objectRelease(raw.cast()); objc.objectRelease(rawListener.cast()); return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + ffi.Void Function(ffi.Pointer?, NSError?) >(wrapper, retain: false, release: true); } static void _listenerTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, ) { (objc.getBlockClosure(block) as void Function( - ffi.Pointer, ffi.Pointer, ffi.Pointer, - ))(arg0, arg1, arg2); + ))(arg0, arg1); objc.objectRelease(block.cast()); } static ffi.NativeCallable< ffi.Void Function( ffi.Pointer, - ffi.Pointer, ffi.Pointer, ffi.Pointer, ) @@ -35794,7 +44826,6 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { ffi.NativeCallable< ffi.Void Function( ffi.Pointer, - ffi.Pointer, ffi.Pointer, ffi.Pointer, ) @@ -35803,17 +44834,15 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { static void _blockingTrampoline( ffi.Pointer block, ffi.Pointer waiter, - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, ) { try { (objc.getBlockClosure(block) as void Function( - ffi.Pointer, ffi.Pointer, ffi.Pointer, - ))(arg0, arg1, arg2); + ))(arg0, arg1); } catch (e) { } finally { objc.signalWaiter(waiter); @@ -35825,7 +44854,6 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, ffi.Pointer, ) @@ -35835,7 +44863,6 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, ffi.Pointer, ) @@ -35845,7 +44872,6 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, ffi.Pointer, ) @@ -35855,7 +44881,6 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, ffi.Pointer, ) @@ -35863,31 +44888,27 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { ..keepIsolateAlive = false; static void _fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, ) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, ) > >() .asFunction< void Function( - ffi.Pointer, ffi.Pointer, ffi.Pointer, ) - >()(arg0, arg1, arg2); + >()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, - ffi.Pointer, ffi.Pointer, ffi.Pointer, ) @@ -35895,21 +44916,18 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { .cast(); static void _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, ) => (objc.getBlockClosure(block) as void Function( - ffi.Pointer, ffi.Pointer, ffi.Pointer, - ))(arg0, arg1, arg2); + ))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, - ffi.Pointer, ffi.Pointer, ffi.Pointer, ) @@ -35917,39 +44935,41 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { .cast(); } -/// Call operator for `objc.ObjCBlock, NSURLHandle, NSString)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString$CallExtension +/// Call operator for `objc.ObjCBlock?, NSError?)>`. +extension ObjCBlock_ffiVoid_idNSItemProviderReading_NSError$CallExtension on objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + ffi.Void Function(ffi.Pointer?, NSError?) > { - void call(ffi.Pointer arg0, NSURLHandle arg1, NSString arg2) { - final _$$ref = arg1.ref; - final _$$ref$1 = arg2.ref; + void call(NSItemProviderReading? arg0, NSError? arg1) { + final _$$ref = arg0?.ref; + final _$$ref$1 = arg1?.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, ) > >() .asFunction< void Function( ffi.Pointer, - ffi.Pointer, ffi.Pointer, ffi.Pointer, ) - >()(ref.pointer, arg0, _$$ref.pointer, _$$ref$1.pointer); + >()( + ref.pointer, + _$$ref?.pointer ?? ffi.nullptr, + _$$ref$1?.pointer ?? ffi.nullptr, + ); } } /// Construction methods for `objc.ObjCBlock?, NSError?)>`. -abstract final class ObjCBlock_ffiVoid_idNSItemProviderReading_NSError { +abstract final class ObjCBlock_ffiVoid_idNSItemProviderWriting_NSError { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< ffi.Void Function(ffi.Pointer?, NSError?) @@ -36002,7 +45022,7 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderReading_NSError { ffi.Void Function(ffi.Pointer?, NSError?) > fromFunction( - void Function(NSItemProviderReading?, NSError?) fn, { + void Function(NSItemProviderWriting?, NSError?) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< @@ -36015,7 +45035,7 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderReading_NSError { return fn( arg0.address == 0 ? null - : NSItemProviderReading.fromPointer( + : NSItemProviderWriting.fromPointer( arg0, retain: true, release: true, @@ -36042,7 +45062,7 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderReading_NSError { ffi.Void Function(ffi.Pointer?, NSError?) > listener( - void Function(NSItemProviderReading?, NSError?) fn, { + void Function(NSItemProviderWriting?, NSError?) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_listenerCallable.nativeFunction.cast(), ( @@ -36052,7 +45072,7 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderReading_NSError { return fn( arg0.address == 0 ? null - : NSItemProviderReading.fromPointer( + : NSItemProviderWriting.fromPointer( arg0, retain: false, release: true, @@ -36083,7 +45103,7 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderReading_NSError { ffi.Void Function(ffi.Pointer?, NSError?) > blocking( - void Function(NSItemProviderReading?, NSError?) fn, { + void Function(NSItemProviderWriting?, NSError?) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_blockingCallable.nativeFunction.cast(), ( @@ -36093,7 +45113,7 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderReading_NSError { return fn( arg0.address == 0 ? null - : NSItemProviderReading.fromPointer( + : NSItemProviderWriting.fromPointer( arg0, retain: false, release: true, @@ -36112,7 +45132,7 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderReading_NSError { return fn( arg0.address == 0 ? null - : NSItemProviderReading.fromPointer( + : NSItemProviderWriting.fromPointer( arg0, retain: false, release: true, @@ -36270,12 +45290,12 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderReading_NSError { } /// Call operator for `objc.ObjCBlock?, NSError?)>`. -extension ObjCBlock_ffiVoid_idNSItemProviderReading_NSError$CallExtension +extension ObjCBlock_ffiVoid_idNSItemProviderWriting_NSError$CallExtension on objc.ObjCBlock< ffi.Void Function(ffi.Pointer?, NSError?) > { - void call(NSItemProviderReading? arg0, NSError? arg1) { + void call(NSItemProviderWriting? arg0, NSError? arg1) { final _$$ref = arg0?.ref; final _$$ref$1 = arg1?.ref; return ref.pointer.ref.invoke @@ -36302,11 +45322,11 @@ extension ObjCBlock_ffiVoid_idNSItemProviderReading_NSError$CallExtension } } -/// Construction methods for `objc.ObjCBlock?, NSError?)>`. -abstract final class ObjCBlock_ffiVoid_idNSItemProviderWriting_NSError { +/// Construction methods for `objc.ObjCBlock?, NSError)>`. +abstract final class ObjCBlock_ffiVoid_idNSSecureCoding_NSError { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) + ffi.Void Function(ffi.Pointer?, NSError) > fromPointer( ffi.Pointer pointer, { @@ -36314,7 +45334,7 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderWriting_NSError { bool release = false, }) => objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) + ffi.Void Function(ffi.Pointer?, NSError) >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. @@ -36323,7 +45343,7 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderWriting_NSError { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) + ffi.Void Function(ffi.Pointer?, NSError) > fromFunctionPointer( ffi.Pointer< @@ -36337,7 +45357,7 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderWriting_NSError { ptr, ) => objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) + ffi.Void Function(ffi.Pointer?, NSError) >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, @@ -36353,14 +45373,14 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderWriting_NSError { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) + ffi.Void Function(ffi.Pointer?, NSError) > fromFunction( - void Function(NSItemProviderWriting?, NSError?) fn, { + void Function(NSSecureCoding?, NSError) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) + ffi.Void Function(ffi.Pointer?, NSError) >( objc.newClosureBlock(_closureCallable, ( ffi.Pointer arg0, @@ -36369,14 +45389,8 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderWriting_NSError { return fn( arg0.address == 0 ? null - : NSItemProviderWriting.fromPointer( - arg0, - retain: true, - release: true, - ), - arg1.address == 0 - ? null - : NSError.fromPointer(arg1, retain: true, release: true), + : NSSecureCoding.fromPointer(arg0, retain: true, release: true), + NSError.fromPointer(arg1, retain: true, release: true), ); }, keepIsolateAlive), retain: false, @@ -36393,10 +45407,10 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderWriting_NSError { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) + ffi.Void Function(ffi.Pointer?, NSError) > listener( - void Function(NSItemProviderWriting?, NSError?) fn, { + void Function(NSSecureCoding?, NSError) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_listenerCallable.nativeFunction.cast(), ( @@ -36406,20 +45420,14 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderWriting_NSError { return fn( arg0.address == 0 ? null - : NSItemProviderWriting.fromPointer( - arg0, - retain: false, - release: true, - ), - arg1.address == 0 - ? null - : NSError.fromPointer(arg1, retain: false, release: true), + : NSSecureCoding.fromPointer(arg0, retain: false, release: true), + NSError.fromPointer(arg1, retain: false, release: true), ); }, keepIsolateAlive); final wrapper = _1wx624s_wrapListenerBlock_pfv6jd(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) + ffi.Void Function(ffi.Pointer?, NSError) >(wrapper, retain: false, release: true); } @@ -36434,10 +45442,10 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderWriting_NSError { /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) + ffi.Void Function(ffi.Pointer?, NSError) > blocking( - void Function(NSItemProviderWriting?, NSError?) fn, { + void Function(NSSecureCoding?, NSError) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_blockingCallable.nativeFunction.cast(), ( @@ -36447,14 +45455,8 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderWriting_NSError { return fn( arg0.address == 0 ? null - : NSItemProviderWriting.fromPointer( - arg0, - retain: false, - release: true, - ), - arg1.address == 0 - ? null - : NSError.fromPointer(arg1, retain: false, release: true), + : NSSecureCoding.fromPointer(arg0, retain: false, release: true), + NSError.fromPointer(arg1, retain: false, release: true), ); }, keepIsolateAlive); final rawListener = objc.newClosureBlock( @@ -36466,14 +45468,8 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderWriting_NSError { return fn( arg0.address == 0 ? null - : NSItemProviderWriting.fromPointer( - arg0, - retain: false, - release: true, - ), - arg1.address == 0 - ? null - : NSError.fromPointer(arg1, retain: false, release: true), + : NSSecureCoding.fromPointer(arg0, retain: false, release: true), + NSError.fromPointer(arg1, retain: false, release: true), ); }, keepIsolateAlive, @@ -36486,7 +45482,7 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderWriting_NSError { objc.objectRelease(raw.cast()); objc.objectRelease(rawListener.cast()); return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) + ffi.Void Function(ffi.Pointer?, NSError) >(wrapper, retain: false, release: true); } @@ -36623,15 +45619,15 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderWriting_NSError { .cast(); } -/// Call operator for `objc.ObjCBlock?, NSError?)>`. -extension ObjCBlock_ffiVoid_idNSItemProviderWriting_NSError$CallExtension +/// Call operator for `objc.ObjCBlock?, NSError)>`. +extension ObjCBlock_ffiVoid_idNSSecureCoding_NSError$CallExtension on objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) + ffi.Void Function(ffi.Pointer?, NSError) > { - void call(NSItemProviderWriting? arg0, NSError? arg1) { + void call(NSSecureCoding? arg0, NSError arg1) { final _$$ref = arg0?.ref; - final _$$ref$1 = arg1?.ref; + final _$$ref$1 = arg1.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< @@ -36648,19 +45644,19 @@ extension ObjCBlock_ffiVoid_idNSItemProviderWriting_NSError$CallExtension ffi.Pointer, ffi.Pointer, ) - >()( - ref.pointer, - _$$ref?.pointer ?? ffi.nullptr, - _$$ref$1?.pointer ?? ffi.nullptr, - ); + >()(ref.pointer, _$$ref?.pointer ?? ffi.nullptr, _$$ref$1.pointer); } } -/// Construction methods for `objc.ObjCBlock?, NSError)>`. -abstract final class ObjCBlock_ffiVoid_idNSSecureCoding_NSError { +/// Construction methods for `objc.ObjCBlock?, NSRange, ffi.Pointer)>`. +abstract final class ObjCBlock_ffiVoid_objcObjCObjectImpl_NSRange_bool { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) + ffi.Void Function( + ffi.Pointer?, + NSRange, + ffi.Pointer, + ) > fromPointer( ffi.Pointer pointer, { @@ -36668,7 +45664,11 @@ abstract final class ObjCBlock_ffiVoid_idNSSecureCoding_NSError { bool release = false, }) => objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) + ffi.Void Function( + ffi.Pointer?, + NSRange, + ffi.Pointer, + ) >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. @@ -36677,21 +45677,30 @@ abstract final class ObjCBlock_ffiVoid_idNSSecureCoding_NSError { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) + ffi.Void Function( + ffi.Pointer?, + NSRange, + ffi.Pointer, + ) > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function( ffi.Pointer arg0, - ffi.Pointer arg1, + NSRange arg1, + ffi.Pointer arg2, ) > > ptr, ) => objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) + ffi.Void Function( + ffi.Pointer?, + NSRange, + ffi.Pointer, + ) >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, @@ -36707,24 +45716,34 @@ abstract final class ObjCBlock_ffiVoid_idNSSecureCoding_NSError { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) + ffi.Void Function( + ffi.Pointer?, + NSRange, + ffi.Pointer, + ) > fromFunction( - void Function(NSSecureCoding?, NSError) fn, { + void Function(objc.ObjCObject?, NSRange, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) + ffi.Void Function( + ffi.Pointer?, + NSRange, + ffi.Pointer, + ) >( objc.newClosureBlock(_closureCallable, ( ffi.Pointer arg0, - ffi.Pointer arg1, + NSRange arg1, + ffi.Pointer arg2, ) { return fn( arg0.address == 0 ? null - : NSSecureCoding.fromPointer(arg0, retain: true, release: true), - NSError.fromPointer(arg1, retain: true, release: true), + : objc.ObjCObject(arg0, retain: true, release: true), + arg1, + arg2, ); }, keepIsolateAlive), retain: false, @@ -36741,27 +45760,37 @@ abstract final class ObjCBlock_ffiVoid_idNSSecureCoding_NSError { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) + ffi.Void Function( + ffi.Pointer?, + NSRange, + ffi.Pointer, + ) > listener( - void Function(NSSecureCoding?, NSError) fn, { + void Function(objc.ObjCObject?, NSRange, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_listenerCallable.nativeFunction.cast(), ( ffi.Pointer arg0, - ffi.Pointer arg1, + NSRange arg1, + ffi.Pointer arg2, ) { return fn( arg0.address == 0 ? null - : NSSecureCoding.fromPointer(arg0, retain: false, release: true), - NSError.fromPointer(arg1, retain: false, release: true), + : objc.ObjCObject(arg0, retain: false, release: true), + arg1, + arg2, ); }, keepIsolateAlive); - final wrapper = _1wx624s_wrapListenerBlock_pfv6jd(raw); + final wrapper = _1wx624s_wrapListenerBlock_1a22wz(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) + ffi.Void Function( + ffi.Pointer?, + NSRange, + ffi.Pointer, + ) >(wrapper, retain: false, release: true); } @@ -36776,39 +45805,47 @@ abstract final class ObjCBlock_ffiVoid_idNSSecureCoding_NSError { /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) + ffi.Void Function( + ffi.Pointer?, + NSRange, + ffi.Pointer, + ) > blocking( - void Function(NSSecureCoding?, NSError) fn, { + void Function(objc.ObjCObject?, NSRange, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { final raw = objc.newClosureBlock(_blockingCallable.nativeFunction.cast(), ( ffi.Pointer arg0, - ffi.Pointer arg1, + NSRange arg1, + ffi.Pointer arg2, ) { return fn( arg0.address == 0 ? null - : NSSecureCoding.fromPointer(arg0, retain: false, release: true), - NSError.fromPointer(arg1, retain: false, release: true), + : objc.ObjCObject(arg0, retain: false, release: true), + arg1, + arg2, ); }, keepIsolateAlive); final rawListener = objc.newClosureBlock( _blockingListenerCallable.nativeFunction.cast(), ( ffi.Pointer arg0, - ffi.Pointer arg1, + NSRange arg1, + ffi.Pointer arg2, ) { return fn( arg0.address == 0 ? null - : NSSecureCoding.fromPointer(arg0, retain: false, release: true), - NSError.fromPointer(arg1, retain: false, release: true), + : objc.ObjCObject(arg0, retain: false, release: true), + arg1, + arg2, ); }, keepIsolateAlive, ); - final wrapper = _1wx624s_wrapBlockingBlock_pfv6jd( + final wrapper = _1wx624s_wrapBlockingBlock_1a22wz( raw, rawListener, objc.objCContext, @@ -36816,20 +45853,26 @@ abstract final class ObjCBlock_ffiVoid_idNSSecureCoding_NSError { objc.objectRelease(raw.cast()); objc.objectRelease(rawListener.cast()); return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) + ffi.Void Function( + ffi.Pointer?, + NSRange, + ffi.Pointer, + ) >(wrapper, retain: false, release: true); } static void _listenerTrampoline( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, + NSRange arg1, + ffi.Pointer arg2, ) { (objc.getBlockClosure(block) as void Function( ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1); + NSRange, + ffi.Pointer, + ))(arg0, arg1, arg2); objc.objectRelease(block.cast()); } @@ -36837,7 +45880,8 @@ abstract final class ObjCBlock_ffiVoid_idNSSecureCoding_NSError { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + NSRange, + ffi.Pointer, ) > _listenerCallable = @@ -36845,7 +45889,8 @@ abstract final class ObjCBlock_ffiVoid_idNSSecureCoding_NSError { ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + NSRange, + ffi.Pointer, ) >.listener(_listenerTrampoline) ..keepIsolateAlive = false; @@ -36853,14 +45898,16 @@ abstract final class ObjCBlock_ffiVoid_idNSSecureCoding_NSError { ffi.Pointer block, ffi.Pointer waiter, ffi.Pointer arg0, - ffi.Pointer arg1, + NSRange arg1, + ffi.Pointer arg2, ) { try { (objc.getBlockClosure(block) as void Function( ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1); + NSRange, + ffi.Pointer, + ))(arg0, arg1, arg2); } catch (e) { } finally { objc.signalWaiter(waiter); @@ -36873,7 +45920,8 @@ abstract final class ObjCBlock_ffiVoid_idNSSecureCoding_NSError { ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, + NSRange, + ffi.Pointer, ) > _blockingCallable = @@ -36882,7 +45930,8 @@ abstract final class ObjCBlock_ffiVoid_idNSSecureCoding_NSError { ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, + NSRange, + ffi.Pointer, ) >.isolateLocal(_blockingTrampoline) ..keepIsolateAlive = false; @@ -36891,7 +45940,8 @@ abstract final class ObjCBlock_ffiVoid_idNSSecureCoding_NSError { ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, + NSRange, + ffi.Pointer, ) > _blockingListenerCallable = @@ -36900,75 +45950,87 @@ abstract final class ObjCBlock_ffiVoid_idNSSecureCoding_NSError { ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, + NSRange, + ffi.Pointer, ) >.listener(_blockingTrampoline) ..keepIsolateAlive = false; static void _fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, + NSRange arg1, + ffi.Pointer arg2, ) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer arg0, - ffi.Pointer arg1, + NSRange arg1, + ffi.Pointer arg2, ) > >() .asFunction< void Function( ffi.Pointer, - ffi.Pointer, + NSRange, + ffi.Pointer, ) - >()(arg0, arg1); + >()(arg0, arg1, arg2); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + NSRange, + ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static void _closureTrampoline( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, + NSRange arg1, + ffi.Pointer arg2, ) => (objc.getBlockClosure(block) as void Function( ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1); + NSRange, + ffi.Pointer, + ))(arg0, arg1, arg2); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + NSRange, + ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock?, NSError)>`. -extension ObjCBlock_ffiVoid_idNSSecureCoding_NSError$CallExtension +/// Call operator for `objc.ObjCBlock?, NSRange, ffi.Pointer)>`. +extension ObjCBlock_ffiVoid_objcObjCObjectImpl_NSRange_bool$CallExtension on objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) + ffi.Void Function( + ffi.Pointer?, + NSRange, + ffi.Pointer, + ) > { - void call(NSSecureCoding? arg0, NSError arg1) { + void call(objc.ObjCObject? arg0, NSRange arg1, ffi.Pointer arg2) { final _$$ref = arg0?.ref; - final _$$ref$1 = arg1.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, + NSRange arg1, + ffi.Pointer arg2, ) > >() @@ -36976,9 +46038,10 @@ extension ObjCBlock_ffiVoid_idNSSecureCoding_NSError$CallExtension void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + NSRange, + ffi.Pointer, ) - >()(ref.pointer, _$$ref?.pointer ?? ffi.nullptr, _$$ref$1.pointer); + >()(ref.pointer, _$$ref?.pointer ?? ffi.nullptr, arg1, arg2); } } @@ -39314,26 +48377,6 @@ final _class_DOBJCObservation = objc.getClass( _class_DOBJCObservation_raw, ).cast(), ); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSAppleEventDescriptor', -) -external ffi.Pointer _class_NSAppleEventDescriptor_raw; -final _class_NSAppleEventDescriptor = objc.getClass( - "NSAppleEventDescriptor", - () => ffi.Native.addressOf>( - _class_NSAppleEventDescriptor_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSArchiver', -) -external ffi.Pointer _class_NSArchiver_raw; -final _class_NSArchiver = objc.getClass( - "NSArchiver", - () => ffi.Native.addressOf>( - _class_NSArchiver_raw, - ).cast(), -); @ffi.Native>(symbol: 'OBJC_CLASS_\$_NSArray') external ffi.Pointer _class_NSArray_raw; final _class_NSArray = objc.getClass( @@ -39371,16 +48414,6 @@ final _class_NSBundle = objc.getClass( _class_NSBundle_raw, ).cast(), ); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSCalendarDate', -) -external ffi.Pointer _class_NSCalendarDate_raw; -final _class_NSCalendarDate = objc.getClass( - "NSCalendarDate", - () => ffi.Native.addressOf>( - _class_NSCalendarDate_raw, - ).cast(), -); @ffi.Native>( symbol: 'OBJC_CLASS_\$_NSCharacterSet', ) @@ -39391,16 +48424,6 @@ final _class_NSCharacterSet = objc.getClass( _class_NSCharacterSet_raw, ).cast(), ); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSClassDescription', -) -external ffi.Pointer _class_NSClassDescription_raw; -final _class_NSClassDescription = objc.getClass( - "NSClassDescription", - () => ffi.Native.addressOf>( - _class_NSClassDescription_raw, - ).cast(), -); @ffi.Native>(symbol: 'OBJC_CLASS_\$_NSCoder') external ffi.Pointer _class_NSCoder_raw; final _class_NSCoder = objc.getClass( @@ -39409,16 +48432,6 @@ final _class_NSCoder = objc.getClass( _class_NSCoder_raw, ).cast(), ); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSConnection', -) -external ffi.Pointer _class_NSConnection_raw; -final _class_NSConnection = objc.getClass( - "NSConnection", - () => ffi.Native.addressOf>( - _class_NSConnection_raw, - ).cast(), -); @ffi.Native>(symbol: 'OBJC_CLASS_\$_NSData') external ffi.Pointer _class_NSData_raw; final _class_NSData = objc.getClass( @@ -39445,36 +48458,6 @@ final _class_NSDictionary = objc.getClass( _class_NSDictionary_raw, ).cast(), ); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSDirectoryEnumerator', -) -external ffi.Pointer _class_NSDirectoryEnumerator_raw; -final _class_NSDirectoryEnumerator = objc.getClass( - "NSDirectoryEnumerator", - () => ffi.Native.addressOf>( - _class_NSDirectoryEnumerator_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSDistantObject', -) -external ffi.Pointer _class_NSDistantObject_raw; -final _class_NSDistantObject = objc.getClass( - "NSDistantObject", - () => ffi.Native.addressOf>( - _class_NSDistantObject_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSDistantObjectRequest', -) -external ffi.Pointer _class_NSDistantObjectRequest_raw; -final _class_NSDistantObjectRequest = objc.getClass( - "NSDistantObjectRequest", - () => ffi.Native.addressOf>( - _class_NSDistantObjectRequest_raw, - ).cast(), -); @ffi.Native>( symbol: 'OBJC_CLASS_\$_NSEnumerator', ) @@ -39493,54 +48476,6 @@ final _class_NSError = objc.getClass( _class_NSError_raw, ).cast(), ); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSException', -) -external ffi.Pointer _class_NSException_raw; -final _class_NSException = objc.getClass( - "NSException", - () => ffi.Native.addressOf>( - _class_NSException_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSExpression', -) -external ffi.Pointer _class_NSExpression_raw; -final _class_NSExpression = objc.getClass( - "NSExpression", - () => ffi.Native.addressOf>( - _class_NSExpression_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSFileManager', -) -external ffi.Pointer _class_NSFileManager_raw; -final _class_NSFileManager = objc.getClass( - "NSFileManager", - () => ffi.Native.addressOf>( - _class_NSFileManager_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSFileVersion', -) -external ffi.Pointer _class_NSFileVersion_raw; -final _class_NSFileVersion = objc.getClass( - "NSFileVersion", - () => ffi.Native.addressOf>( - _class_NSFileVersion_raw, - ).cast(), -); -@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSHost') -external ffi.Pointer _class_NSHost_raw; -final _class_NSHost = objc.getClass( - "NSHost", - () => ffi.Native.addressOf>( - _class_NSHost_raw, - ).cast(), -); @ffi.Native>( symbol: 'OBJC_CLASS_\$_NSIndexSet', ) @@ -39581,27 +48516,6 @@ final _class_NSItemProvider = objc.getClass( _class_NSItemProvider_raw, ).cast(), ); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSKeyValueSharedObserversSnapshot', -) -external ffi.Pointer -_class_NSKeyValueSharedObserversSnapshot_raw; -final _class_NSKeyValueSharedObserversSnapshot = objc.getClass( - "NSKeyValueSharedObserversSnapshot", - () => ffi.Native.addressOf>( - _class_NSKeyValueSharedObserversSnapshot_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSKeyedArchiver', -) -external ffi.Pointer _class_NSKeyedArchiver_raw; -final _class_NSKeyedArchiver = objc.getClass( - "NSKeyedArchiver", - () => ffi.Native.addressOf>( - _class_NSKeyedArchiver_raw, - ).cast(), -); @ffi.Native>(symbol: 'OBJC_CLASS_\$_NSLocale') external ffi.Pointer _class_NSLocale_raw; final _class_NSLocale = objc.getClass( @@ -39755,16 +48669,6 @@ final _class_NSOrderedSet = objc.getClass( _class_NSOrderedSet_raw, ).cast(), ); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSOrthography', -) -external ffi.Pointer _class_NSOrthography_raw; -final _class_NSOrthography = objc.getClass( - "NSOrthography", - () => ffi.Native.addressOf>( - _class_NSOrthography_raw, - ).cast(), -); @ffi.Native>( symbol: 'OBJC_CLASS_\$_NSOutputStream', ) @@ -39775,16 +48679,6 @@ final _class_NSOutputStream = objc.getClass( _class_NSOutputStream_raw, ).cast(), ); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSPersonNameComponents', -) -external ffi.Pointer _class_NSPersonNameComponents_raw; -final _class_NSPersonNameComponents = objc.getClass( - "NSPersonNameComponents", - () => ffi.Native.addressOf>( - _class_NSPersonNameComponents_raw, - ).cast(), -); @ffi.Native>(symbol: 'OBJC_CLASS_\$_NSPort') external ffi.Pointer _class_NSPort_raw; final _class_NSPort = objc.getClass( @@ -39793,16 +48687,6 @@ final _class_NSPort = objc.getClass( _class_NSPort_raw, ).cast(), ); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSPortCoder', -) -external ffi.Pointer _class_NSPortCoder_raw; -final _class_NSPortCoder = objc.getClass( - "NSPortCoder", - () => ffi.Native.addressOf>( - _class_NSPortCoder_raw, - ).cast(), -); @ffi.Native>( symbol: 'OBJC_CLASS_\$_NSPortMessage', ) @@ -39813,26 +48697,6 @@ final _class_NSPortMessage = objc.getClass( _class_NSPortMessage_raw, ).cast(), ); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSPortNameServer', -) -external ffi.Pointer _class_NSPortNameServer_raw; -final _class_NSPortNameServer = objc.getClass( - "NSPortNameServer", - () => ffi.Native.addressOf>( - _class_NSPortNameServer_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSPredicate', -) -external ffi.Pointer _class_NSPredicate_raw; -final _class_NSPredicate = objc.getClass( - "NSPredicate", - () => ffi.Native.addressOf>( - _class_NSPredicate_raw, - ).cast(), -); @ffi.Native>( symbol: 'OBJC_CLASS_\$_NSProgress', ) @@ -39843,14 +48707,6 @@ final _class_NSProgress = objc.getClass( _class_NSProgress_raw, ).cast(), ); -@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSProxy') -external ffi.Pointer _class_NSProxy_raw; -final _class_NSProxy = objc.getClass( - "NSProxy", - () => ffi.Native.addressOf>( - _class_NSProxy_raw, - ).cast(), -); @ffi.Native>(symbol: 'OBJC_CLASS_\$_NSRunLoop') external ffi.Pointer _class_NSRunLoop_raw; final _class_NSRunLoop = objc.getClass( @@ -39859,46 +48715,6 @@ final _class_NSRunLoop = objc.getClass( _class_NSRunLoop_raw, ).cast(), ); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSScriptClassDescription', -) -external ffi.Pointer _class_NSScriptClassDescription_raw; -final _class_NSScriptClassDescription = objc.getClass( - "NSScriptClassDescription", - () => ffi.Native.addressOf>( - _class_NSScriptClassDescription_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSScriptCommand', -) -external ffi.Pointer _class_NSScriptCommand_raw; -final _class_NSScriptCommand = objc.getClass( - "NSScriptCommand", - () => ffi.Native.addressOf>( - _class_NSScriptCommand_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSScriptCommandDescription', -) -external ffi.Pointer _class_NSScriptCommandDescription_raw; -final _class_NSScriptCommandDescription = objc.getClass( - "NSScriptCommandDescription", - () => ffi.Native.addressOf>( - _class_NSScriptCommandDescription_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSScriptObjectSpecifier', -) -external ffi.Pointer _class_NSScriptObjectSpecifier_raw; -final _class_NSScriptObjectSpecifier = objc.getClass( - "NSScriptObjectSpecifier", - () => ffi.Native.addressOf>( - _class_NSScriptObjectSpecifier_raw, - ).cast(), -); @ffi.Native>(symbol: 'OBJC_CLASS_\$_NSSet') external ffi.Pointer _class_NSSet_raw; final _class_NSSet = objc.getClass( @@ -39923,24 +48739,6 @@ final _class_NSString = objc.getClass( _class_NSString_raw, ).cast(), ); -@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSThread') -external ffi.Pointer _class_NSThread_raw; -final _class_NSThread = objc.getClass( - "NSThread", - () => ffi.Native.addressOf>( - _class_NSThread_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_NSTimeZone', -) -external ffi.Pointer _class_NSTimeZone_raw; -final _class_NSTimeZone = objc.getClass( - "NSTimeZone", - () => ffi.Native.addressOf>( - _class_NSTimeZone_raw, - ).cast(), -); @ffi.Native>(symbol: 'OBJC_CLASS_\$_NSTimer') external ffi.Pointer _class_NSTimer_raw; final _class_NSTimer = objc.getClass( @@ -40040,6 +48838,52 @@ final _objc_msgSend_10mlopr = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_10nfbmq = 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, + ) + >(); +final _objc_msgSend_10txwc9 = 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, + ) + >(); final _objc_msgSend_11cbyu0 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -40078,6 +48922,31 @@ final _objc_msgSend_11e9f5x = objc.msgSendPointer int, ) >(); +final _objc_msgSend_11hj8md = 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, + ) + >(); final _objc_msgSend_11spmsz = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -40099,6 +48968,25 @@ final _objc_msgSend_11spmsz = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_11tcc61 = 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, + ) + >(); final _objc_msgSend_122v0cv = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -40137,6 +49025,25 @@ final _objc_msgSend_12py2ux = objc.msgSendPointer int, ) >(); +final _objc_msgSend_130mcug = 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, + ) + >(); final _objc_msgSend_134vhyh = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -40158,6 +49065,23 @@ final _objc_msgSend_134vhyh = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_13lgpwz = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + CGSize, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + CGSize, + ) + >(); final _objc_msgSend_13lsk7w = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -40226,6 +49150,27 @@ final _objc_msgSend_13yqbb6 = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_1415lvo = 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, + ) + >(); final _objc_msgSend_14ew8zr = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -40382,6 +49327,42 @@ final _objc_msgSend_15qeuct = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_15v716q = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Pointer>, + ) + > + >() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ) + >(); +final _objc_msgSend_15yz4e6 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + CGRect, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + CGRect, + ) + >(); final _objc_msgSend_161ne8y = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -40422,6 +49403,23 @@ final _objc_msgSend_1698hqz = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_16bn854 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ) + >(); final _objc_msgSend_16f0drb = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -40612,6 +49610,27 @@ final _objc_msgSend_1895u4n = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_18flwjr = 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, + ) + >(); final _objc_msgSend_18qun1e = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -40633,6 +49652,42 @@ final _objc_msgSend_18qun1e = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_18r320v = 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_18r320vStret = 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, + ) + >(); final _objc_msgSend_194u5n2 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -40793,6 +49848,48 @@ final _objc_msgSend_1bvics1 = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_1c2zpn3 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + CGSize, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + CGSize, + ) + >(); +final _objc_msgSend_1cc1buo = 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, + ) + >(); final _objc_msgSend_1ceswyu = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -40913,6 +50010,23 @@ final _objc_msgSend_1d9e4oe = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_1dau4w = 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_1deg8x = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -40930,6 +50044,27 @@ final _objc_msgSend_1deg8x = objc.msgSendPointer int, ) >(); +final _objc_msgSend_1diehjo = 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, + ) + >(); final _objc_msgSend_1dom33q = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -41023,6 +50158,29 @@ final _objc_msgSend_1egc1c = objc.msgSendPointer int, ) >(); +final _objc_msgSend_1fdou4m = 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, + ) + >(); final _objc_msgSend_1ffoev1 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -41170,6 +50328,25 @@ final _objc_msgSend_1h2q612 = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_1h3mito = 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 _objc_msgSend_1hz7y9r = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -41204,6 +50381,27 @@ final _objc_msgSend_1i0cxyc = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_1i17va2 = 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>, + ) + >(); final _objc_msgSend_1i2r70j = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -41319,6 +50517,27 @@ final _objc_msgSend_1j9bhml = objc.msgSendPointer ffi.Pointer>, ) >(); +final _objc_msgSend_1jed5jl = 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, + ) + >(); final _objc_msgSend_1jiinfj = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -41344,6 +50563,29 @@ final _objc_msgSend_1jiinfj = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_1jknn71 = 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>, + ) + >(); final _objc_msgSend_1jtxufi = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -41414,6 +50656,29 @@ final _objc_msgSend_1k101e3 = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_1k1akuq = 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, + ) + >(); final _objc_msgSend_1k1o1s7 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -41469,6 +50734,23 @@ final _objc_msgSend_1k745tv = objc.msgSendPointer int, ) >(); +final _objc_msgSend_1kn7frf = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); final _objc_msgSend_1ko4qka = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -41484,6 +50766,71 @@ final _objc_msgSend_1ko4qka = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_1kok4b = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSRange, + ffi.UnsignedLong, + ffi.Pointer, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + NSRange, + int, + ffi.Pointer, + ) + >(); +final _objc_msgSend_1kva9v1 = 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, + ) + >(); +final _objc_msgSend_1l09uru = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSRange, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ffi.Pointer>, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSRange, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer>, + ) + >(); final _objc_msgSend_1lbgrac = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -41526,6 +50873,23 @@ final _objc_msgSend_1lhpu4m = objc.msgSendPointer ffi.Pointer>, ) >(); +final _objc_msgSend_1lonves = 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_1lsax7n = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -41566,6 +50930,27 @@ final _objc_msgSend_1lv8yz3 = objc.msgSendPointer int, ) >(); +final _objc_msgSend_1lwwnes = 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, + ) + >(); final _objc_msgSend_1m7prh1 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -41585,6 +50970,59 @@ final _objc_msgSend_1m7prh1 = objc.msgSendPointer int, ) >(); +final _objc_msgSend_1mbt9g9 = 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_1mpyy6y = 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_1mpyy6yStret = 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, + ) + >(); final _objc_msgSend_1n40f6p = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -41688,6 +51126,78 @@ final _objc_msgSend_1nomli1 = objc.msgSendPointer ffi.Pointer>, ) >(); +final _objc_msgSend_1nwix4r = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Uint32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_1oj5o8z = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int64 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_1ojrli4 = 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, + ) + >(); +final _objc_msgSend_1okkq16 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + CGRect, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + CGRect, + ) + >(); final _objc_msgSend_1oteutl = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -41836,6 +51346,69 @@ final _objc_msgSend_1pnyuds = objc.msgSendPointer ffi.Pointer>, ) >(); +final _objc_msgSend_1pp2gs8 = 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, + ) + >(); +final _objc_msgSend_1pvm3yv = 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_1q2ox4r = 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, + ) + >(); final _objc_msgSend_1q30cs4 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -41893,6 +51466,23 @@ final _objc_msgSend_1r6ymhb = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_1r7ue5f = 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_1s0rfm3 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -42068,6 +51658,38 @@ final _objc_msgSend_1tv4uax = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_1u11dbb = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSRange Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + NSRange Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_1u11dbbStret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); final _objc_msgSend_1ukqyt8 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -42098,6 +51720,61 @@ final _objc_msgSend_1ukqyt8Fpret = objc.msgSendFpretPointer ffi.Pointer, ) >(); +final _objc_msgSend_1upeo1d = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + NSRange, + ) + > + >() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + NSRange, + ) + >(); +final _objc_msgSend_1uwdhlk = objc.msgSendPointer + .cast< + ffi.NativeFunction< + CGPoint Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + CGPoint Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_1uwdhlkStret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); final _objc_msgSend_1vd1c5m = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -42115,6 +51792,63 @@ final _objc_msgSend_1vd1c5m = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_1vdfken = objc.msgSendPointer + .cast< + ffi.NativeFunction< + CGSize Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + CGSize Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_1vdfkenStret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_1vfgg7v = 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, + ) + >(); final _objc_msgSend_1vnlaqg = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -42157,6 +51891,23 @@ final _objc_msgSend_1vxoo9h = objc.msgSendPointer ffi.Pointer>, ) >(); +final _objc_msgSend_1w05pgk = 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_1wdb8ji = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -42176,6 +51927,29 @@ final _objc_msgSend_1wdb8ji = objc.msgSendPointer int, ) >(); +final _objc_msgSend_1whyima = 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, + ) + >(); final _objc_msgSend_1wt9a7r = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -42199,6 +51973,25 @@ final _objc_msgSend_1wt9a7r = objc.msgSendPointer ffi.Pointer>, ) >(); +final _objc_msgSend_1wtpmu7 = 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, + ) + >(); final _objc_msgSend_1x2hskc = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -42290,6 +52083,27 @@ final _objc_msgSend_1ya1kjn = objc.msgSendPointer int, ) >(); +final _objc_msgSend_1ygbbzi = 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, + ) + >(); final _objc_msgSend_1ym6zyw = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -42337,6 +52151,23 @@ final _objc_msgSend_2cgrxlFpret = objc.msgSendFpretPointer ffi.Pointer, ) >(); +final _objc_msgSend_2p9qiq = 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_2u4jm6 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -42425,6 +52256,29 @@ final _objc_msgSend_3fn4ca = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_3gpdva = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + NSRange, + ffi.Pointer, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + NSRange, + ffi.Pointer, + ) + >(); final _objc_msgSend_3l8zum = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -42478,6 +52332,23 @@ final _objc_msgSend_3pyzne = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_4sp4xj = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ) + >(); final _objc_msgSend_553v = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -42643,6 +52514,27 @@ final _objc_msgSend_7g3u2y = objc.msgSendPointer int, ) >(); +final _objc_msgSend_7km9vu = 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, + ) + >(); final _objc_msgSend_7kpg7m = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -42662,6 +52554,27 @@ final _objc_msgSend_7kpg7m = objc.msgSendPointer int, ) >(); +final _objc_msgSend_7ql5kn = 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, + ) + >(); final _objc_msgSend_7uautw = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -42679,6 +52592,27 @@ final _objc_msgSend_7uautw = objc.msgSendPointer int, ) >(); +final _objc_msgSend_7w1jp7 = 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, + ) + >(); final _objc_msgSend_8321cp = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -42759,6 +52693,29 @@ final _objc_msgSend_8cymbm = objc.msgSendPointer int, ) >(); +final _objc_msgSend_8mvqcu = 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, + ) + >(); final _objc_msgSend_91o635 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -42873,6 +52830,29 @@ final _objc_msgSend_agmudd = objc.msgSendPointer ffi.Pointer>, ) >(); +final _objc_msgSend_akk2cd = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ) + >(); final _objc_msgSend_arew0j = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -42913,6 +52893,25 @@ final _objc_msgSend_bfp043 = objc.msgSendPointer int, ) >(); +final _objc_msgSend_bkebbk = 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, + ) + >(); final _objc_msgSend_bstjp9 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -42932,6 +52931,38 @@ final _objc_msgSend_bstjp9 = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_bu1hbw = objc.msgSendPointer + .cast< + ffi.NativeFunction< + CGRect Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + CGRect Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_bu1hbwStret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); final _objc_msgSend_c0vg4w = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -43031,6 +53062,25 @@ final _objc_msgSend_d3i1uyStret = objc.msgSendStretPointer int, ) >(); +final _objc_msgSend_d8c3m2 = 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, + ) + >(); final _objc_msgSend_dbvvll = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -43067,6 +53117,21 @@ final _objc_msgSend_degb40 = objc.msgSendPointer int, ) >(); +final _objc_msgSend_dgx62p = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); final _objc_msgSend_diypgk = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -43236,6 +53301,93 @@ final _objc_msgSend_f167m6 = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_f227js = 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, + ) + >(); +final _objc_msgSend_fd28sq = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_g3kdhc = 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_g4ia9x = 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_g4ia9xFpret = objc.msgSendFpretPointer + .cast< + ffi.NativeFunction< + ffi.Float Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + double Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); final _objc_msgSend_gcjqkl = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -43394,6 +53546,25 @@ final _objc_msgSend_hc8exi = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_hefmm1 = 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>, + ) + >(); final _objc_msgSend_hiwitm = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -43413,6 +53584,25 @@ final _objc_msgSend_hiwitm = objc.msgSendPointer bool, ) >(); +final _objc_msgSend_hk7n97 = 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, + ) + >(); final _objc_msgSend_hwm8nu = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -43430,6 +53620,23 @@ final _objc_msgSend_hwm8nu = objc.msgSendPointer double, ) >(); +final _objc_msgSend_hws22w = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); final _objc_msgSend_i30zh3 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -43459,6 +53666,46 @@ final _objc_msgSend_i30zh3 = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_ipgwfh = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSRange, + ffi.UnsignedLong, + ffi.Pointer, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSRange, + int, + ffi.Pointer, + ) + >(); +final _objc_msgSend_iy8iz6 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + CGPoint, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + CGPoint, + ) + >(); final _objc_msgSend_jjgvjt = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -43617,6 +53864,63 @@ final _objc_msgSend_lh0jh5 = objc.msgSendPointer bool, ) >(); +final _objc_msgSend_lof6g0 = 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, + ) + >(); +final _objc_msgSend_lx7wnn = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Uint32, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ) + >(); +final _objc_msgSend_lzbvjm = 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, + ) + >(); final _objc_msgSend_mabicu = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -43651,6 +53955,25 @@ final _objc_msgSend_mabicuFpret = objc.msgSendFpretPointer ffi.Pointer, ) >(); +final _objc_msgSend_mpxix1 = 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, + ) + >(); final _objc_msgSend_mt0t38 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -43710,6 +54033,25 @@ final _objc_msgSend_nc6uds = objc.msgSendPointer int, ) >(); +final _objc_msgSend_nk32k5 = 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, + ) + >(); final _objc_msgSend_nnxkei = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -43953,6 +54295,42 @@ final _objc_msgSend_qm9f5w = objc.msgSendPointer NSRange, ) >(); +final _objc_msgSend_qrtfce = 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_qrtfceStret = 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, + ) + >(); final _objc_msgSend_qugqlf = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -43970,6 +54348,25 @@ final _objc_msgSend_qugqlf = objc.msgSendPointer int, ) >(); +final _objc_msgSend_quo6mj = 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, + ) + >(); final _objc_msgSend_r0bo0s = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -44052,6 +54449,27 @@ final _objc_msgSend_rc4ypv = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_rutu22 = 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, + ) + >(); final _objc_msgSend_s058d2 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -44094,6 +54512,55 @@ final _objc_msgSend_s92gih = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_sax6zm = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSEdgeInsets, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSEdgeInsets, + ) + >(); +final _objc_msgSend_sl0cgw = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSEdgeInsets Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + NSEdgeInsets Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_sl0cgwStret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); final _objc_msgSend_swohtd = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -44151,6 +54618,29 @@ final _objc_msgSend_t7arir = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_t8ajot = 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, + ) + >(); final _objc_msgSend_talwei = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -44172,6 +54662,27 @@ final _objc_msgSend_talwei = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_tsocn4 = 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, + ) + >(); final _objc_msgSend_ud8gg = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -44272,6 +54783,25 @@ final _objc_msgSend_uwvaik = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_vbc8p4 = 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, + ) + >(); final _objc_msgSend_vbymrb = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -44293,6 +54823,31 @@ final _objc_msgSend_vbymrb = objc.msgSendPointer int, ) >(); +final _objc_msgSend_vij4rw = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSRange, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + NSRange, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); final _objc_msgSend_w9bq5x = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -44314,6 +54869,23 @@ final _objc_msgSend_w9bq5x = objc.msgSendPointer bool, ) >(); +final _objc_msgSend_wgkxx2 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + CGPoint, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + CGPoint, + ) + >(); final _objc_msgSend_xmlz1t = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -44401,6 +54973,23 @@ final _objc_msgSend_xw2lbc = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_ylninc = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ) + >(); final _objc_msgSend_yx8yc6 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -44420,6 +55009,25 @@ final _objc_msgSend_yx8yc6 = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_z7gxsm = 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, + ) + >(); final _objc_msgSend_zmbtbd = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -44477,20 +55085,34 @@ final _objc_msgSend_zug4wi = objc.msgSendPointer NSRange, ) >(); +final _objc_msgSend_zy00wz = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + NSRange, + ffi.Pointer, + ) + > + >() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + NSRange, + ffi.Pointer, + ) + >(); @ffi.Native Function()>( symbol: '_1wx624s_NSCoding', ) external ffi.Pointer _protocol_NSCoding_raw(); final _protocol_NSCoding = objc.getProtocol("NSCoding", _protocol_NSCoding_raw); -@ffi.Native Function()>( - symbol: '_1wx624s_NSConnectionDelegate', -) -external ffi.Pointer -_protocol_NSConnectionDelegate_raw(); -final _protocol_NSConnectionDelegate = objc.getProtocol( - "NSConnectionDelegate", - _protocol_NSConnectionDelegate_raw, -); @ffi.Native Function()>( symbol: '_1wx624s_NSCopying', ) @@ -44507,15 +55129,6 @@ final _protocol_NSFastEnumeration = objc.getProtocol( "NSFastEnumeration", _protocol_NSFastEnumeration_raw, ); -@ffi.Native Function()>( - symbol: '_1wx624s_NSFileManagerDelegate', -) -external ffi.Pointer -_protocol_NSFileManagerDelegate_raw(); -final _protocol_NSFileManagerDelegate = objc.getProtocol( - "NSFileManagerDelegate", - _protocol_NSFileManagerDelegate_raw, -); @ffi.Native Function()>( symbol: '_1wx624s_NSItemProviderReading', ) @@ -44534,15 +55147,6 @@ final _protocol_NSItemProviderWriting = objc.getProtocol( "NSItemProviderWriting", _protocol_NSItemProviderWriting_raw, ); -@ffi.Native Function()>( - symbol: '_1wx624s_NSKeyedArchiverDelegate', -) -external ffi.Pointer -_protocol_NSKeyedArchiverDelegate_raw(); -final _protocol_NSKeyedArchiverDelegate = objc.getProtocol( - "NSKeyedArchiverDelegate", - _protocol_NSKeyedArchiverDelegate_raw, -); @ffi.Native Function()>( symbol: '_1wx624s_NSMutableCopying', ) @@ -44564,15 +55168,6 @@ final _protocol_NSPortDelegate = objc.getProtocol( "NSPortDelegate", _protocol_NSPortDelegate_raw, ); -@ffi.Native Function()>( - symbol: '_1wx624s_NSPredicateValidating', -) -external ffi.Pointer -_protocol_NSPredicateValidating_raw(); -final _protocol_NSPredicateValidating = objc.getProtocol( - "NSPredicateValidating", - _protocol_NSPredicateValidating_raw, -); @ffi.Native Function()>( symbol: '_1wx624s_NSSecureCoding', ) @@ -44605,7 +55200,6 @@ final _protocol_Observer = objc.getProtocol("Observer", _protocol_Observer_raw); late final _sel_ISOCountryCodes = objc.registerName("ISOCountryCodes"); late final _sel_ISOCurrencyCodes = objc.registerName("ISOCurrencyCodes"); late final _sel_ISOLanguageCodes = objc.registerName("ISOLanguageCodes"); -late final _sel_URL = objc.registerName("URL"); late final _sel_URLByAppendingPathComponent_ = objc.registerName( "URLByAppendingPathComponent:", ); @@ -44637,10 +55231,6 @@ late final _sel_URLByStandardizingPath = objc.registerName( late final _sel_URLForAuxiliaryExecutable_ = objc.registerName( "URLForAuxiliaryExecutable:", ); -late final _sel_URLForDirectory_inDomain_appropriateForURL_create_error_ = objc - .registerName("URLForDirectory:inDomain:appropriateForURL:create:error:"); -late final _sel_URLForPublishingUbiquitousItemAtURL_expirationDate_error_ = objc - .registerName("URLForPublishingUbiquitousItemAtURL:expirationDate:error:"); late final _sel_URLForResource_withExtension_ = objc.registerName( "URLForResource:withExtension:", ); @@ -44653,9 +55243,6 @@ late final _sel_URLForResource_withExtension_subdirectory_inBundleWithURL_ = ); late final _sel_URLForResource_withExtension_subdirectory_localization_ = objc .registerName("URLForResource:withExtension:subdirectory:localization:"); -late final _sel_URLForUbiquityContainerIdentifier_ = objc.registerName( - "URLForUbiquityContainerIdentifier:", -); late final _sel_URLFragmentAllowedCharacterSet = objc.registerName( "URLFragmentAllowedCharacterSet", ); @@ -44717,9 +55304,6 @@ late final _sel_URL_resourceDataDidBecomeAvailable_ = objc.registerName( late final _sel_URL_resourceDidFailLoadingWithReason_ = objc.registerName( "URL:resourceDidFailLoadingWithReason:", ); -late final _sel_URLsForDirectory_inDomains_ = objc.registerName( - "URLsForDirectory:inDomains:", -); late final _sel_URLsForResourcesWithExtension_subdirectory_ = objc.registerName( "URLsForResourcesWithExtension:subdirectory:", ); @@ -44730,13 +55314,6 @@ late final _sel_URLsForResourcesWithExtension_subdirectory_inBundleWithURL_ = late final _sel_URLsForResourcesWithExtension_subdirectory_localization_ = objc .registerName("URLsForResourcesWithExtension:subdirectory:localization:"); late final _sel_UTF8String = objc.registerName("UTF8String"); -late final _sel_abbreviation = objc.registerName("abbreviation"); -late final _sel_abbreviationDictionary = objc.registerName( - "abbreviationDictionary", -); -late final _sel_abbreviationForDate_ = objc.registerName( - "abbreviationForDate:", -); late final _sel_absoluteString = objc.registerName("absoluteString"); late final _sel_absoluteURL = objc.registerName("absoluteURL"); late final _sel_absoluteURLWithDataRepresentation_relativeToURL_ = objc @@ -44776,38 +55353,23 @@ late final _sel_addObserver_toObjectsAtIndexes_forKeyPath_options_context_ = ); late final _sel_addPort_forMode_ = objc.registerName("addPort:forMode:"); late final _sel_addProtocol_ = objc.registerName("addProtocol:"); -late final _sel_addRequestMode_ = objc.registerName("addRequestMode:"); -late final _sel_addRunLoop_ = objc.registerName("addRunLoop:"); late final _sel_addSubscriberForFileURL_withPublishingHandler_ = objc .registerName("addSubscriberForFileURL:withPublishingHandler:"); late final _sel_addTimeInterval_ = objc.registerName("addTimeInterval:"); late final _sel_addTimer_forMode_ = objc.registerName("addTimer:forMode:"); -late final _sel_addVersionOfItemAtURL_withContentsOfURL_options_error_ = objc - .registerName("addVersionOfItemAtURL:withContentsOfURL:options:error:"); -late final _sel_address = objc.registerName("address"); -late final _sel_addresses = objc.registerName("addresses"); -late final _sel_aeDesc = objc.registerName("aeDesc"); late final _sel_allBundles = objc.registerName("allBundles"); -late final _sel_allConnections = objc.registerName("allConnections"); late final _sel_allFrameworks = objc.registerName("allFrameworks"); late final _sel_allKeys = objc.registerName("allKeys"); late final _sel_allKeysForObject_ = objc.registerName("allKeysForObject:"); -late final _sel_allLanguages = objc.registerName("allLanguages"); late final _sel_allObjects = objc.registerName("allObjects"); -late final _sel_allScripts = objc.registerName("allScripts"); late final _sel_allValues = objc.registerName("allValues"); late final _sel_alloc = objc.registerName("alloc"); late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); -late final _sel_allowEvaluation = objc.registerName("allowEvaluation"); -late final _sel_allowEvaluationWithValidator_error_ = objc.registerName( - "allowEvaluationWithValidator:error:", -); late final _sel_allowedClasses = objc.registerName("allowedClasses"); late final _sel_allowsExtendedAttributes = objc.registerName( "allowsExtendedAttributes", ); late final _sel_allowsKeyedCoding = objc.registerName("allowsKeyedCoding"); -late final _sel_allowsWeakReference = objc.registerName("allowsWeakReference"); late final _sel_alphanumericCharacterSet = objc.registerName( "alphanumericCharacterSet", ); @@ -44823,22 +55385,6 @@ late final _sel_appendBytes_length_ = objc.registerName("appendBytes:length:"); late final _sel_appendData_ = objc.registerName("appendData:"); late final _sel_appendFormat_ = objc.registerName("appendFormat:"); late final _sel_appendString_ = objc.registerName("appendString:"); -late final _sel_appleEvent = objc.registerName("appleEvent"); -late final _sel_appleEventClassCode = objc.registerName("appleEventClassCode"); -late final _sel_appleEventCode = objc.registerName("appleEventCode"); -late final _sel_appleEventCodeForArgumentWithName_ = objc.registerName( - "appleEventCodeForArgumentWithName:", -); -late final _sel_appleEventCodeForKey_ = objc.registerName( - "appleEventCodeForKey:", -); -late final _sel_appleEventCodeForReturnType = objc.registerName( - "appleEventCodeForReturnType", -); -late final _sel_appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_ = - objc.registerName( - "appleEventWithEventClass:eventID:targetDescriptor:returnID:transactionID:", - ); late final _sel_appliesSourcePositionAttributes = objc.registerName( "appliesSourcePositionAttributes", ); @@ -44846,28 +55392,6 @@ late final _sel_applyDifference_ = objc.registerName("applyDifference:"); late final _sel_applyTransform_reverse_range_updatedRange_ = objc.registerName( "applyTransform:reverse:range:updatedRange:", ); -late final _sel_archiveRootObject_toFile_ = objc.registerName( - "archiveRootObject:toFile:", -); -late final _sel_archivedDataWithRootObject_ = objc.registerName( - "archivedDataWithRootObject:", -); -late final _sel_archivedDataWithRootObject_requiringSecureCoding_error_ = objc - .registerName("archivedDataWithRootObject:requiringSecureCoding:error:"); -late final _sel_archiverData = objc.registerName("archiverData"); -late final _sel_archiverDidFinish_ = objc.registerName("archiverDidFinish:"); -late final _sel_archiverWillFinish_ = objc.registerName("archiverWillFinish:"); -late final _sel_archiver_didEncodeObject_ = objc.registerName( - "archiver:didEncodeObject:", -); -late final _sel_archiver_willEncodeObject_ = objc.registerName( - "archiver:willEncodeObject:", -); -late final _sel_archiver_willReplaceObject_withObject_ = objc.registerName( - "archiver:willReplaceObject:withObject:", -); -late final _sel_argumentNames = objc.registerName("argumentNames"); -late final _sel_arguments = objc.registerName("arguments"); late final _sel_argumentsRetained = objc.registerName("argumentsRetained"); late final _sel_array = objc.registerName("array"); late final _sel_arrayByAddingObject_ = objc.registerName( @@ -44903,9 +55427,6 @@ late final _sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector objc.registerName( "attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:", ); -late final _sel_attributeDescriptorForKeyword_ = objc.registerName( - "attributeDescriptorForKeyword:", -); late final _sel_attributeKeys = objc.registerName("attributeKeys"); late final _sel_attribute_atIndex_effectiveRange_ = objc.registerName( "attribute:atIndex:effectiveRange:", @@ -44923,18 +55444,6 @@ late final _sel_attributesAtIndex_effectiveRange_ = objc.registerName( ); late final _sel_attributesAtIndex_longestEffectiveRange_inRange_ = objc .registerName("attributesAtIndex:longestEffectiveRange:inRange:"); -late final _sel_attributesOfFileSystemForPath_error_ = objc.registerName( - "attributesOfFileSystemForPath:error:", -); -late final _sel_attributesOfItemAtPath_error_ = objc.registerName( - "attributesOfItemAtPath:error:", -); -late final _sel_authenticateComponents_withData_ = objc.registerName( - "authenticateComponents:withData:", -); -late final _sel_authenticationDataForComponents_ = objc.registerName( - "authenticationDataForComponents:", -); late final _sel_autoContentAccessingProxy = objc.registerName( "autoContentAccessingProxy", ); @@ -44985,7 +55494,6 @@ late final _sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeT "bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:", ); late final _sel_boolValue = objc.registerName("boolValue"); -late final _sel_booleanValue = objc.registerName("booleanValue"); late final _sel_buildInstance_ = objc.registerName("buildInstance:"); late final _sel_builtInPlugInsPath = objc.registerName("builtInPlugInsPath"); late final _sel_builtInPlugInsURL = objc.registerName("builtInPlugInsURL"); @@ -45005,13 +55513,7 @@ late final _sel_cStringUsingEncoding_ = objc.registerName( "cStringUsingEncoding:", ); late final _sel_cachedHandleForURL_ = objc.registerName("cachedHandleForURL:"); -late final _sel_calendarDate = objc.registerName("calendarDate"); -late final _sel_calendarFormat = objc.registerName("calendarFormat"); late final _sel_calendarIdentifier = objc.registerName("calendarIdentifier"); -late final _sel_callStackReturnAddresses = objc.registerName( - "callStackReturnAddresses", -); -late final _sel_callStackSymbols = objc.registerName("callStackSymbols"); late final _sel_canBeConvertedToEncoding_ = objc.registerName( "canBeConvertedToEncoding:", ); @@ -45051,12 +55553,6 @@ late final _sel_capitalizedStringWithLocale_ = objc.registerName( late final _sel_caseInsensitiveCompare_ = objc.registerName( "caseInsensitiveCompare:", ); -late final _sel_changeCurrentDirectoryPath_ = objc.registerName( - "changeCurrentDirectoryPath:", -); -late final _sel_changeFileAttributes_atPath_ = objc.registerName( - "changeFileAttributes:atPath:", -); late final _sel_changeType = objc.registerName("changeType"); late final _sel_changeWithObject_type_index_ = objc.registerName( "changeWithObject:type:index:", @@ -45087,16 +55583,9 @@ late final _sel_checkPromisedItemIsReachableAndReturnError_ = objc.registerName( late final _sel_checkResourceIsReachableAndReturnError_ = objc.registerName( "checkResourceIsReachableAndReturnError:", ); -late final _sel_childSpecifier = objc.registerName("childSpecifier"); late final _sel_class = objc.registerName("class"); late final _sel_classCode = objc.registerName("classCode"); late final _sel_classDescription = objc.registerName("classDescription"); -late final _sel_classDescriptionForClass_ = objc.registerName( - "classDescriptionForClass:", -); -late final _sel_classDescriptionForKey_ = objc.registerName( - "classDescriptionForKey:", -); late final _sel_classFallbacksForKeyedArchiver = objc.registerName( "classFallbacksForKeyedArchiver", ); @@ -45110,23 +55599,12 @@ late final _sel_classForKeyedUnarchiver = objc.registerName( ); late final _sel_classForPortCoder = objc.registerName("classForPortCoder"); late final _sel_className = objc.registerName("className"); -late final _sel_classNameEncodedForTrueClassName_ = objc.registerName( - "classNameEncodedForTrueClassName:", -); -late final _sel_classNameForClass_ = objc.registerName("classNameForClass:"); late final _sel_classNamed_ = objc.registerName("classNamed:"); late final _sel_close = objc.registerName("close"); late final _sel_code = objc.registerName("code"); -late final _sel_coerceToDescriptorType_ = objc.registerName( - "coerceToDescriptorType:", -); late final _sel_coerceValue_forKey_ = objc.registerName("coerceValue:forKey:"); late final _sel_collationIdentifier = objc.registerName("collationIdentifier"); late final _sel_collatorIdentifier = objc.registerName("collatorIdentifier"); -late final _sel_collection = objc.registerName("collection"); -late final _sel_commandClassName = objc.registerName("commandClassName"); -late final _sel_commandDescription = objc.registerName("commandDescription"); -late final _sel_commandName = objc.registerName("commandName"); late final _sel_commonISOCurrencyCodes = objc.registerName( "commonISOCurrencyCodes", ); @@ -45159,9 +55637,6 @@ late final _sel_componentsSeparatedByCharactersInSet_ = objc.registerName( late final _sel_componentsSeparatedByString_ = objc.registerName( "componentsSeparatedByString:", ); -late final _sel_componentsToDisplayForPath_ = objc.registerName( - "componentsToDisplayForPath:", -); late final _sel_compressUsingAlgorithm_error_ = objc.registerName( "compressUsingAlgorithm:error:", ); @@ -45170,35 +55645,6 @@ late final _sel_compressedDataUsingAlgorithm_error_ = objc.registerName( ); late final _sel_configureAsServer = objc.registerName("configureAsServer"); late final _sel_conformsToProtocol_ = objc.registerName("conformsToProtocol:"); -late final _sel_connection = objc.registerName("connection"); -late final _sel_connectionForProxy = objc.registerName("connectionForProxy"); -late final _sel_connectionWithReceivePort_sendPort_ = objc.registerName( - "connectionWithReceivePort:sendPort:", -); -late final _sel_connectionWithRegisteredName_host_ = objc.registerName( - "connectionWithRegisteredName:host:", -); -late final _sel_connectionWithRegisteredName_host_usingNameServer_ = objc - .registerName("connectionWithRegisteredName:host:usingNameServer:"); -late final _sel_connection_handleRequest_ = objc.registerName( - "connection:handleRequest:", -); -late final _sel_connection_shouldMakeNewConnection_ = objc.registerName( - "connection:shouldMakeNewConnection:", -); -late final _sel_constantValue = objc.registerName("constantValue"); -late final _sel_containerClassDescription = objc.registerName( - "containerClassDescription", -); -late final _sel_containerIsObjectBeingTested = objc.registerName( - "containerIsObjectBeingTested", -); -late final _sel_containerIsRangeContainerObject = objc.registerName( - "containerIsRangeContainerObject", -); -late final _sel_containerSpecifier = objc.registerName("containerSpecifier"); -late final _sel_containerURLForSecurityApplicationGroupIdentifier_ = objc - .registerName("containerURLForSecurityApplicationGroupIdentifier:"); late final _sel_containsIndex_ = objc.registerName("containsIndex:"); late final _sel_containsIndexesInRange_ = objc.registerName( "containsIndexesInRange:", @@ -45209,29 +55655,8 @@ late final _sel_containsString_ = objc.registerName("containsString:"); late final _sel_containsValueForKey_ = objc.registerName( "containsValueForKey:", ); -late final _sel_contentsAtPath_ = objc.registerName("contentsAtPath:"); -late final _sel_contentsEqualAtPath_andPath_ = objc.registerName( - "contentsEqualAtPath:andPath:", -); -late final _sel_contentsOfDirectoryAtPath_error_ = objc.registerName( - "contentsOfDirectoryAtPath:error:", -); -late final _sel_contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_ = - objc.registerName( - "contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error:", - ); late final _sel_controlCharacterSet = objc.registerName("controlCharacterSet"); -late final _sel_conversation = objc.registerName("conversation"); late final _sel_copy = objc.registerName("copy"); -late final _sel_copyItemAtPath_toPath_error_ = objc.registerName( - "copyItemAtPath:toPath:error:", -); -late final _sel_copyItemAtURL_toURL_error_ = objc.registerName( - "copyItemAtURL:toURL:error:", -); -late final _sel_copyPath_toPath_handler_ = objc.registerName( - "copyPath:toPath:handler:", -); late final _sel_copyScriptingValue_forKey_withProperties_ = objc.registerName( "copyScriptingValue:forKey:withProperties:", ); @@ -45244,55 +55669,12 @@ late final _sel_countOfIndexesInRange_ = objc.registerName( "countOfIndexesInRange:", ); late final _sel_countryCode = objc.registerName("countryCode"); -late final _sel_createCommandInstance = objc.registerName( - "createCommandInstance", -); -late final _sel_createCommandInstanceWithZone_ = objc.registerName( - "createCommandInstanceWithZone:", -); -late final _sel_createConversationForConnection_ = objc.registerName( - "createConversationForConnection:", -); -late final _sel_createDirectoryAtPath_attributes_ = objc.registerName( - "createDirectoryAtPath:attributes:", -); -late final _sel_createDirectoryAtPath_withIntermediateDirectories_attributes_error_ = - objc.registerName( - "createDirectoryAtPath:withIntermediateDirectories:attributes:error:", - ); -late final _sel_createDirectoryAtURL_withIntermediateDirectories_attributes_error_ = - objc.registerName( - "createDirectoryAtURL:withIntermediateDirectories:attributes:error:", - ); -late final _sel_createFileAtPath_contents_attributes_ = objc.registerName( - "createFileAtPath:contents:attributes:", -); -late final _sel_createSymbolicLinkAtPath_pathContent_ = objc.registerName( - "createSymbolicLinkAtPath:pathContent:", -); -late final _sel_createSymbolicLinkAtPath_withDestinationPath_error_ = objc - .registerName("createSymbolicLinkAtPath:withDestinationPath:error:"); -late final _sel_createSymbolicLinkAtURL_withDestinationURL_error_ = objc - .registerName("createSymbolicLinkAtURL:withDestinationURL:error:"); late final _sel_currencyCode = objc.registerName("currencyCode"); late final _sel_currencySymbol = objc.registerName("currencySymbol"); -late final _sel_currentCommand = objc.registerName("currentCommand"); -late final _sel_currentConversation = objc.registerName("currentConversation"); -late final _sel_currentDirectoryPath = objc.registerName( - "currentDirectoryPath", -); -late final _sel_currentHost = objc.registerName("currentHost"); late final _sel_currentLocale = objc.registerName("currentLocale"); late final _sel_currentMode = objc.registerName("currentMode"); -late final _sel_currentProcessDescriptor = objc.registerName( - "currentProcessDescriptor", -); late final _sel_currentProgress = objc.registerName("currentProgress"); late final _sel_currentRunLoop = objc.registerName("currentRunLoop"); -late final _sel_currentThread = objc.registerName("currentThread"); -late final _sel_currentVersionOfItemAtURL_ = objc.registerName( - "currentVersionOfItemAtURL:", -); late final _sel_data = objc.registerName("data"); late final _sel_dataRepresentation = objc.registerName("dataRepresentation"); late final _sel_dataUsingEncoding_ = objc.registerName("dataUsingEncoding:"); @@ -45330,9 +55712,6 @@ late final _sel_date = objc.registerName("date"); late final _sel_dateByAddingTimeInterval_ = objc.registerName( "dateByAddingTimeInterval:", ); -late final _sel_dateByAddingYears_months_days_hours_minutes_seconds_ = objc - .registerName("dateByAddingYears:months:days:hours:minutes:seconds:"); -late final _sel_dateValue = objc.registerName("dateValue"); late final _sel_dateWithCalendarFormat_timeZone_ = objc.registerName( "dateWithCalendarFormat:timeZone:", ); @@ -45343,12 +55722,6 @@ late final _sel_dateWithNaturalLanguageString_locale_ = objc.registerName( "dateWithNaturalLanguageString:locale:", ); late final _sel_dateWithString_ = objc.registerName("dateWithString:"); -late final _sel_dateWithString_calendarFormat_ = objc.registerName( - "dateWithString:calendarFormat:", -); -late final _sel_dateWithString_calendarFormat_locale_ = objc.registerName( - "dateWithString:calendarFormat:locale:", -); late final _sel_dateWithTimeIntervalSince1970_ = objc.registerName( "dateWithTimeIntervalSince1970:", ); @@ -45361,18 +55734,6 @@ late final _sel_dateWithTimeIntervalSinceReferenceDate_ = objc.registerName( late final _sel_dateWithTimeInterval_sinceDate_ = objc.registerName( "dateWithTimeInterval:sinceDate:", ); -late final _sel_dateWithYear_month_day_hour_minute_second_timeZone_ = objc - .registerName("dateWithYear:month:day:hour:minute:second:timeZone:"); -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_daylightSavingTimeOffset = objc.registerName( - "daylightSavingTimeOffset", -); -late final _sel_daylightSavingTimeOffsetForDate_ = objc.registerName( - "daylightSavingTimeOffsetForDate:", -); late final _sel_dealloc = objc.registerName("dealloc"); late final _sel_debugDescription = objc.registerName("debugDescription"); late final _sel_debugObserver = objc.registerName("debugObserver"); @@ -45428,7 +55789,6 @@ late final _sel_decodeObjectOfClasses_forKey_ = objc.registerName( ); late final _sel_decodePoint = objc.registerName("decodePoint"); late final _sel_decodePointForKey_ = objc.registerName("decodePointForKey:"); -late final _sel_decodePortObject = objc.registerName("decodePortObject"); late final _sel_decodePropertyList = objc.registerName("decodePropertyList"); late final _sel_decodePropertyListForKey_ = objc.registerName( "decodePropertyListForKey:", @@ -45479,15 +55839,6 @@ late final _sel_decompressedDataUsingAlgorithm_error_ = objc.registerName( late final _sel_defaultCStringEncoding = objc.registerName( "defaultCStringEncoding", ); -late final _sel_defaultConnection = objc.registerName("defaultConnection"); -late final _sel_defaultManager = objc.registerName("defaultManager"); -late final _sel_defaultOrthographyForLanguage_ = objc.registerName( - "defaultOrthographyForLanguage:", -); -late final _sel_defaultSubcontainerAttributeKey = objc.registerName( - "defaultSubcontainerAttributeKey", -); -late final _sel_defaultTimeZone = objc.registerName("defaultTimeZone"); late final _sel_delegate = objc.registerName("delegate"); late final _sel_deleteCharactersInRange_ = objc.registerName( "deleteCharactersInRange:", @@ -45496,12 +55847,6 @@ late final _sel_description = objc.registerName("description"); late final _sel_descriptionInStringsFileFormat = objc.registerName( "descriptionInStringsFileFormat", ); -late final _sel_descriptionWithCalendarFormat_ = objc.registerName( - "descriptionWithCalendarFormat:", -); -late final _sel_descriptionWithCalendarFormat_locale_ = objc.registerName( - "descriptionWithCalendarFormat:locale:", -); late final _sel_descriptionWithCalendarFormat_timeZone_locale_ = objc .registerName("descriptionWithCalendarFormat:timeZone:locale:"); late final _sel_descriptionWithLocale_ = objc.registerName( @@ -45510,57 +55855,6 @@ late final _sel_descriptionWithLocale_ = objc.registerName( late final _sel_descriptionWithLocale_indent_ = objc.registerName( "descriptionWithLocale:indent:", ); -late final _sel_descriptor = objc.registerName("descriptor"); -late final _sel_descriptorAtIndex_ = objc.registerName("descriptorAtIndex:"); -late final _sel_descriptorForKeyword_ = objc.registerName( - "descriptorForKeyword:", -); -late final _sel_descriptorType = objc.registerName("descriptorType"); -late final _sel_descriptorWithApplicationURL_ = objc.registerName( - "descriptorWithApplicationURL:", -); -late final _sel_descriptorWithBoolean_ = objc.registerName( - "descriptorWithBoolean:", -); -late final _sel_descriptorWithBundleIdentifier_ = objc.registerName( - "descriptorWithBundleIdentifier:", -); -late final _sel_descriptorWithDate_ = objc.registerName("descriptorWithDate:"); -late final _sel_descriptorWithDescriptorType_bytes_length_ = objc.registerName( - "descriptorWithDescriptorType:bytes:length:", -); -late final _sel_descriptorWithDescriptorType_data_ = objc.registerName( - "descriptorWithDescriptorType:data:", -); -late final _sel_descriptorWithDouble_ = objc.registerName( - "descriptorWithDouble:", -); -late final _sel_descriptorWithEnumCode_ = objc.registerName( - "descriptorWithEnumCode:", -); -late final _sel_descriptorWithFileURL_ = objc.registerName( - "descriptorWithFileURL:", -); -late final _sel_descriptorWithInt32_ = objc.registerName( - "descriptorWithInt32:", -); -late final _sel_descriptorWithProcessIdentifier_ = objc.registerName( - "descriptorWithProcessIdentifier:", -); -late final _sel_descriptorWithString_ = objc.registerName( - "descriptorWithString:", -); -late final _sel_descriptorWithTypeCode_ = objc.registerName( - "descriptorWithTypeCode:", -); -late final _sel_destinationOfSymbolicLinkAtPath_error_ = objc.registerName( - "destinationOfSymbolicLinkAtPath:error:", -); -late final _sel_detachNewThreadSelector_toTarget_withObject_ = objc - .registerName("detachNewThreadSelector:toTarget:withObject:"); -late final _sel_detachNewThreadWithBlock_ = objc.registerName( - "detachNewThreadWithBlock:", -); late final _sel_developmentLocalization = objc.registerName( "developmentLocalization", ); @@ -45630,19 +55924,9 @@ late final _sel_differenceFromOrderedSet_withOptions_usingEquivalenceTest_ = objc.registerName( "differenceFromOrderedSet:withOptions:usingEquivalenceTest:", ); -late final _sel_directParameter = objc.registerName("directParameter"); -late final _sel_directoryAttributes = objc.registerName("directoryAttributes"); -late final _sel_directoryContentsAtPath_ = objc.registerName( - "directoryContentsAtPath:", -); late final _sel_discreteProgressWithTotalUnitCount_ = objc.registerName( "discreteProgressWithTotalUnitCount:", ); -late final _sel_dispatch = objc.registerName("dispatch"); -late final _sel_dispatchWithComponents_ = objc.registerName( - "dispatchWithComponents:", -); -late final _sel_displayNameAtPath_ = objc.registerName("displayNameAtPath:"); late final _sel_displayNameForKey_value_ = objc.registerName( "displayNameForKey:value:", ); @@ -45653,17 +55937,9 @@ late final _sel_doesNotRecognizeSelector_ = objc.registerName( "doesNotRecognizeSelector:", ); late final _sel_domain = objc.registerName("domain"); -late final _sel_dominantLanguage = objc.registerName("dominantLanguage"); -late final _sel_dominantLanguageForScript_ = objc.registerName( - "dominantLanguageForScript:", -); -late final _sel_dominantScript = objc.registerName("dominantScript"); late final _sel_doubleValue = objc.registerName("doubleValue"); late final _sel_earlierDate_ = objc.registerName("earlierDate:"); late final _sel_edgeInsetsValue = objc.registerName("edgeInsetsValue"); -late final _sel_enableMultipleThreads = objc.registerName( - "enableMultipleThreads", -); late final _sel_encodeArrayOfObjCType_count_at_ = objc.registerName( "encodeArrayOfObjCType:count:at:", ); @@ -45674,9 +55950,6 @@ late final _sel_encodeBytes_length_ = objc.registerName("encodeBytes:length:"); late final _sel_encodeBytes_length_forKey_ = objc.registerName( "encodeBytes:length:forKey:", ); -late final _sel_encodeClassName_intoClassName_ = objc.registerName( - "encodeClassName:intoClassName:", -); late final _sel_encodeConditionalObject_ = objc.registerName( "encodeConditionalObject:", ); @@ -45701,7 +55974,6 @@ late final _sel_encodeObject_forKey_ = objc.registerName( ); late final _sel_encodePoint_ = objc.registerName("encodePoint:"); late final _sel_encodePoint_forKey_ = objc.registerName("encodePoint:forKey:"); -late final _sel_encodePortObject_ = objc.registerName("encodePortObject:"); late final _sel_encodePropertyList_ = objc.registerName("encodePropertyList:"); late final _sel_encodeRect_ = objc.registerName("encodeRect:"); late final _sel_encodeRect_forKey_ = objc.registerName("encodeRect:forKey:"); @@ -45715,9 +55987,7 @@ late final _sel_encodeValuesOfObjCTypes_ = objc.registerName( "encodeValuesOfObjCTypes:", ); late final _sel_encodeWithCoder_ = objc.registerName("encodeWithCoder:"); -late final _sel_encodedData = objc.registerName("encodedData"); late final _sel_endLoadInBackground = objc.registerName("endLoadInBackground"); -late final _sel_enumCodeValue = objc.registerName("enumCodeValue"); late final _sel_enumerateAttribute_inRange_options_usingBlock_ = objc .registerName("enumerateAttribute:inRange:options:usingBlock:"); late final _sel_enumerateAttributesInRange_options_usingBlock_ = objc @@ -45765,11 +56035,6 @@ late final _sel_enumerateRangesWithOptions_usingBlock_ = objc.registerName( ); late final _sel_enumerateSubstringsInRange_options_usingBlock_ = objc .registerName("enumerateSubstringsInRange:options:usingBlock:"); -late final _sel_enumeratorAtPath_ = objc.registerName("enumeratorAtPath:"); -late final _sel_enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_ = - objc.registerName( - "enumeratorAtURL:includingPropertiesForKeys:options:errorHandler:", - ); late final _sel_error = objc.registerName("error"); late final _sel_errorWithDomain_code_userInfo_ = objc.registerName( "errorWithDomain:code:userInfo:", @@ -45777,26 +56042,6 @@ late final _sel_errorWithDomain_code_userInfo_ = objc.registerName( late final _sel_estimatedTimeRemaining = objc.registerName( "estimatedTimeRemaining", ); -late final _sel_evaluateWithObject_ = objc.registerName("evaluateWithObject:"); -late final _sel_evaluateWithObject_substitutionVariables_ = objc.registerName( - "evaluateWithObject:substitutionVariables:", -); -late final _sel_evaluatedArguments = objc.registerName("evaluatedArguments"); -late final _sel_evaluatedReceivers = objc.registerName("evaluatedReceivers"); -late final _sel_evaluationErrorNumber = objc.registerName( - "evaluationErrorNumber", -); -late final _sel_evaluationErrorSpecifier = objc.registerName( - "evaluationErrorSpecifier", -); -late final _sel_eventClass = objc.registerName("eventClass"); -late final _sel_eventID = objc.registerName("eventID"); -late final _sel_evictUbiquitousItemAtURL_error_ = objc.registerName( - "evictUbiquitousItemAtURL:error:", -); -late final _sel_exceptionWithName_reason_userInfo_ = objc.registerName( - "exceptionWithName:reason:userInfo:", -); late final _sel_exchangeObjectAtIndex_withObjectAtIndex_ = objc.registerName( "exchangeObjectAtIndex:withObjectAtIndex:", ); @@ -45805,80 +56050,18 @@ late final _sel_executableArchitectures = objc.registerName( ); late final _sel_executablePath = objc.registerName("executablePath"); late final _sel_executableURL = objc.registerName("executableURL"); -late final _sel_executeCommand = objc.registerName("executeCommand"); late final _sel_exemplarCharacterSet = objc.registerName( "exemplarCharacterSet", ); -late final _sel_exit = objc.registerName("exit"); late final _sel_expectedResourceDataSize = objc.registerName( "expectedResourceDataSize", ); -late final _sel_expressionBlock = objc.registerName("expressionBlock"); -late final _sel_expressionForAggregate_ = objc.registerName( - "expressionForAggregate:", -); -late final _sel_expressionForAnyKey = objc.registerName("expressionForAnyKey"); -late final _sel_expressionForBlock_arguments_ = objc.registerName( - "expressionForBlock:arguments:", -); -late final _sel_expressionForConditional_trueExpression_falseExpression_ = objc - .registerName("expressionForConditional:trueExpression:falseExpression:"); -late final _sel_expressionForConstantValue_ = objc.registerName( - "expressionForConstantValue:", -); -late final _sel_expressionForEvaluatedObject = objc.registerName( - "expressionForEvaluatedObject", -); -late final _sel_expressionForFunction_arguments_ = objc.registerName( - "expressionForFunction:arguments:", -); -late final _sel_expressionForFunction_selectorName_arguments_ = objc - .registerName("expressionForFunction:selectorName:arguments:"); -late final _sel_expressionForIntersectSet_with_ = objc.registerName( - "expressionForIntersectSet:with:", -); -late final _sel_expressionForKeyPath_ = objc.registerName( - "expressionForKeyPath:", -); -late final _sel_expressionForMinusSet_with_ = objc.registerName( - "expressionForMinusSet:with:", -); -late final _sel_expressionForSubquery_usingIteratorVariable_predicate_ = objc - .registerName("expressionForSubquery:usingIteratorVariable:predicate:"); -late final _sel_expressionForUnionSet_with_ = objc.registerName( - "expressionForUnionSet:with:", -); -late final _sel_expressionForVariable_ = objc.registerName( - "expressionForVariable:", -); -late final _sel_expressionType = objc.registerName("expressionType"); -late final _sel_expressionValueWithObject_context_ = objc.registerName( - "expressionValueWithObject:context:", -); -late final _sel_expressionWithFormat_ = objc.registerName( - "expressionWithFormat:", -); -late final _sel_expressionWithFormat_argumentArray_ = objc.registerName( - "expressionWithFormat:argumentArray:", -); late final _sel_failWithError_ = objc.registerName("failWithError:"); late final _sel_failurePolicy = objc.registerName("failurePolicy"); late final _sel_failureReason = objc.registerName("failureReason"); -late final _sel_falseExpression = objc.registerName("falseExpression"); -late final _sel_familyName = objc.registerName("familyName"); late final _sel_fastestEncoding = objc.registerName("fastestEncoding"); -late final _sel_fetchLatestRemoteVersionOfItemAtURL_completionHandler_ = objc - .registerName("fetchLatestRemoteVersionOfItemAtURL:completionHandler:"); -late final _sel_fileAttributes = objc.registerName("fileAttributes"); -late final _sel_fileAttributesAtPath_traverseLink_ = objc.registerName( - "fileAttributesAtPath:traverseLink:", -); late final _sel_fileCompletedCount = objc.registerName("fileCompletedCount"); late final _sel_fileCreationDate = objc.registerName("fileCreationDate"); -late final _sel_fileExistsAtPath_ = objc.registerName("fileExistsAtPath:"); -late final _sel_fileExistsAtPath_isDirectory_ = objc.registerName( - "fileExistsAtPath:isDirectory:", -); late final _sel_fileExtensionHidden = objc.registerName("fileExtensionHidden"); late final _sel_fileGroupOwnerAccountID = objc.registerName( "fileGroupOwnerAccountID", @@ -45890,61 +56073,9 @@ late final _sel_fileHFSCreatorCode = objc.registerName("fileHFSCreatorCode"); late final _sel_fileHFSTypeCode = objc.registerName("fileHFSTypeCode"); late final _sel_fileIsAppendOnly = objc.registerName("fileIsAppendOnly"); late final _sel_fileIsImmutable = objc.registerName("fileIsImmutable"); -late final _sel_fileManager_shouldCopyItemAtPath_toPath_ = objc.registerName( - "fileManager:shouldCopyItemAtPath:toPath:", -); -late final _sel_fileManager_shouldCopyItemAtURL_toURL_ = objc.registerName( - "fileManager:shouldCopyItemAtURL:toURL:", -); -late final _sel_fileManager_shouldLinkItemAtPath_toPath_ = objc.registerName( - "fileManager:shouldLinkItemAtPath:toPath:", -); -late final _sel_fileManager_shouldLinkItemAtURL_toURL_ = objc.registerName( - "fileManager:shouldLinkItemAtURL:toURL:", -); -late final _sel_fileManager_shouldMoveItemAtPath_toPath_ = objc.registerName( - "fileManager:shouldMoveItemAtPath:toPath:", -); -late final _sel_fileManager_shouldMoveItemAtURL_toURL_ = objc.registerName( - "fileManager:shouldMoveItemAtURL:toURL:", -); late final _sel_fileManager_shouldProceedAfterError_ = objc.registerName( "fileManager:shouldProceedAfterError:", ); -late final _sel_fileManager_shouldProceedAfterError_copyingItemAtPath_toPath_ = - objc.registerName( - "fileManager:shouldProceedAfterError:copyingItemAtPath:toPath:", - ); -late final _sel_fileManager_shouldProceedAfterError_copyingItemAtURL_toURL_ = - objc.registerName( - "fileManager:shouldProceedAfterError:copyingItemAtURL:toURL:", - ); -late final _sel_fileManager_shouldProceedAfterError_linkingItemAtPath_toPath_ = - objc.registerName( - "fileManager:shouldProceedAfterError:linkingItemAtPath:toPath:", - ); -late final _sel_fileManager_shouldProceedAfterError_linkingItemAtURL_toURL_ = - objc.registerName( - "fileManager:shouldProceedAfterError:linkingItemAtURL:toURL:", - ); -late final _sel_fileManager_shouldProceedAfterError_movingItemAtPath_toPath_ = - objc.registerName( - "fileManager:shouldProceedAfterError:movingItemAtPath:toPath:", - ); -late final _sel_fileManager_shouldProceedAfterError_movingItemAtURL_toURL_ = - objc.registerName( - "fileManager:shouldProceedAfterError:movingItemAtURL:toURL:", - ); -late final _sel_fileManager_shouldProceedAfterError_removingItemAtPath_ = objc - .registerName("fileManager:shouldProceedAfterError:removingItemAtPath:"); -late final _sel_fileManager_shouldProceedAfterError_removingItemAtURL_ = objc - .registerName("fileManager:shouldProceedAfterError:removingItemAtURL:"); -late final _sel_fileManager_shouldRemoveItemAtPath_ = objc.registerName( - "fileManager:shouldRemoveItemAtPath:", -); -late final _sel_fileManager_shouldRemoveItemAtURL_ = objc.registerName( - "fileManager:shouldRemoveItemAtURL:", -); late final _sel_fileManager_willProcessPath_ = objc.registerName( "fileManager:willProcessPath:", ); @@ -45962,9 +56093,6 @@ late final _sel_filePosixPermissions = objc.registerName( ); late final _sel_fileReferenceURL = objc.registerName("fileReferenceURL"); late final _sel_fileSize = objc.registerName("fileSize"); -late final _sel_fileSystemAttributesAtPath_ = objc.registerName( - "fileSystemAttributesAtPath:", -); late final _sel_fileSystemFileNumber = objc.registerName( "fileSystemFileNumber", ); @@ -45972,13 +56100,9 @@ late final _sel_fileSystemNumber = objc.registerName("fileSystemNumber"); late final _sel_fileSystemRepresentation = objc.registerName( "fileSystemRepresentation", ); -late final _sel_fileSystemRepresentationWithPath_ = objc.registerName( - "fileSystemRepresentationWithPath:", -); late final _sel_fileTotalCount = objc.registerName("fileTotalCount"); late final _sel_fileType = objc.registerName("fileType"); late final _sel_fileURL = objc.registerName("fileURL"); -late final _sel_fileURLValue = objc.registerName("fileURLValue"); late final _sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_ = objc.registerName( "fileURLWithFileSystemRepresentation:isDirectory:relativeToURL:", @@ -46009,7 +56133,6 @@ late final _sel_filteredSetUsingPredicate_ = objc.registerName( "filteredSetUsingPredicate:", ); late final _sel_finalize = objc.registerName("finalize"); -late final _sel_finishEncoding = objc.registerName("finishEncoding"); late final _sel_fire = objc.registerName("fire"); late final _sel_fireDate = objc.registerName("fireDate"); late final _sel_firstIndex = objc.registerName("firstIndex"); @@ -46019,7 +56142,6 @@ late final _sel_firstObjectCommonWithArray_ = objc.registerName( ); late final _sel_floatValue = objc.registerName("floatValue"); late final _sel_flushCachedData = objc.registerName("flushCachedData"); -late final _sel_flushHostCache = objc.registerName("flushHostCache"); late final _sel_forwardInvocation_ = objc.registerName("forwardInvocation:"); late final _sel_forwardingTargetForSelector_ = objc.registerName( "forwardingTargetForSelector:", @@ -46027,7 +56149,6 @@ late final _sel_forwardingTargetForSelector_ = objc.registerName( late final _sel_fractionCompleted = objc.registerName("fractionCompleted"); late final _sel_fragment = objc.registerName("fragment"); late final _sel_frameLength = objc.registerName("frameLength"); -late final _sel_function = objc.registerName("function"); late final _sel_getArgumentTypeAtIndex_ = objc.registerName( "getArgumentTypeAtIndex:", ); @@ -46062,8 +56183,6 @@ late final _sel_getCharacters_range_ = objc.registerName( late final _sel_getDOBJCDartProtocolMethodForSelector_ = objc.registerName( "getDOBJCDartProtocolMethodForSelector:", ); -late final _sel_getFileProviderServicesForItemAtURL_completionHandler_ = objc - .registerName("getFileProviderServicesForItemAtURL:completionHandler:"); late final _sel_getFileSystemRepresentation_maxLength_ = objc.registerName( "getFileSystemRepresentation:maxLength:", ); @@ -46073,8 +56192,6 @@ late final _sel_getIndexes_maxCount_inIndexRange_ = objc.registerName( late final _sel_getLineStart_end_contentsEnd_forRange_ = objc.registerName( "getLineStart:end:contentsEnd:forRange:", ); -late final _sel_getNonlocalVersionsOfItemAtURL_completionHandler_ = objc - .registerName("getNonlocalVersionsOfItemAtURL:completionHandler:"); late final _sel_getObjects_ = objc.registerName("getObjects:"); late final _sel_getObjects_andKeys_ = objc.registerName("getObjects:andKeys:"); late final _sel_getObjects_andKeys_count_ = objc.registerName( @@ -46087,10 +56204,6 @@ late final _sel_getParagraphStart_end_contentsEnd_forRange_ = objc.registerName( late final _sel_getPromisedItemResourceValue_forKey_error_ = objc.registerName( "getPromisedItemResourceValue:forKey:error:", ); -late final _sel_getRelationship_ofDirectoryAtURL_toItemAtURL_error_ = objc - .registerName("getRelationship:ofDirectoryAtURL:toItemAtURL:error:"); -late final _sel_getRelationship_ofDirectory_inDomain_toItemAtURL_error_ = objc - .registerName("getRelationship:ofDirectory:inDomain:toItemAtURL:error:"); late final _sel_getResourceValue_forKey_error_ = objc.registerName( "getResourceValue:forKey:error:", ); @@ -46101,7 +56214,6 @@ late final _sel_getStreamsToHost_port_inputStream_outputStream_ = objc .registerName("getStreamsToHost:port:inputStream:outputStream:"); late final _sel_getValue_ = objc.registerName("getValue:"); late final _sel_getValue_size_ = objc.registerName("getValue:size:"); -late final _sel_givenName = objc.registerName("givenName"); late final _sel_groupingSeparator = objc.registerName("groupingSeparator"); late final _sel_handlePortMessage_ = objc.registerName("handlePortMessage:"); late final _sel_handleQueryWithUnboundKey_ = objc.registerName( @@ -46116,49 +56228,22 @@ late final _sel_hasDirectoryPath = objc.registerName("hasDirectoryPath"); late final _sel_hasItemConformingToTypeIdentifier_ = objc.registerName( "hasItemConformingToTypeIdentifier:", ); -late final _sel_hasLocalContents = objc.registerName("hasLocalContents"); late final _sel_hasMemberInPlane_ = objc.registerName("hasMemberInPlane:"); -late final _sel_hasOrderedToManyRelationshipForKey_ = objc.registerName( - "hasOrderedToManyRelationshipForKey:", -); late final _sel_hasPrefix_ = objc.registerName("hasPrefix:"); -late final _sel_hasPropertyForKey_ = objc.registerName("hasPropertyForKey:"); -late final _sel_hasReadablePropertyForKey_ = objc.registerName( - "hasReadablePropertyForKey:", -); late final _sel_hasRepresentationConformingToTypeIdentifier_fileOptions_ = objc .registerName("hasRepresentationConformingToTypeIdentifier:fileOptions:"); late final _sel_hasSpaceAvailable = objc.registerName("hasSpaceAvailable"); late final _sel_hasSuffix_ = objc.registerName("hasSuffix:"); -late final _sel_hasThumbnail = objc.registerName("hasThumbnail"); -late final _sel_hasWritablePropertyForKey_ = objc.registerName( - "hasWritablePropertyForKey:", -); late final _sel_hash = objc.registerName("hash"); late final _sel_helpAnchor = objc.registerName("helpAnchor"); late final _sel_holderWithInputStreamAdapter_ = objc.registerName( "holderWithInputStreamAdapter:", ); -late final _sel_homeDirectoryForCurrentUser = objc.registerName( - "homeDirectoryForCurrentUser", -); -late final _sel_homeDirectoryForUser_ = objc.registerName( - "homeDirectoryForUser:", -); late final _sel_host = objc.registerName("host"); -late final _sel_hostWithAddress_ = objc.registerName("hostWithAddress:"); -late final _sel_hostWithName_ = objc.registerName("hostWithName:"); -late final _sel_hourOfDay = objc.registerName("hourOfDay"); late final _sel_illegalCharacterSet = objc.registerName("illegalCharacterSet"); late final _sel_implementMethod_withBlock_withTrampoline_withSignature_ = objc .registerName("implementMethod:withBlock:withTrampoline:withSignature:"); -late final _sel_implementationClassName = objc.registerName( - "implementationClassName", -); late final _sel_increaseLengthBy_ = objc.registerName("increaseLengthBy:"); -late final _sel_independentConversationQueueing = objc.registerName( - "independentConversationQueueing", -); late final _sel_index = objc.registerName("index"); late final _sel_indexGreaterThanIndex_ = objc.registerName( "indexGreaterThanIndex:", @@ -46220,8 +56305,6 @@ late final _sel_indexesWithOptions_passingTest_ = objc.registerName( ); late final _sel_indicesOfObjectsByEvaluatingObjectSpecifier_ = objc .registerName("indicesOfObjectsByEvaluatingObjectSpecifier:"); -late final _sel_indicesOfObjectsByEvaluatingWithContainer_count_ = objc - .registerName("indicesOfObjectsByEvaluatingWithContainer:count:"); late final _sel_infoDictionary = objc.registerName("infoDictionary"); late final _sel_init = objc.registerName("init"); late final _sel_initAbsoluteURLWithDataRepresentation_relativeToURL_ = objc @@ -46251,16 +56334,6 @@ late final _sel_initFileURLWithPath_relativeToURL_ = objc.registerName( ); late final _sel_initForKeyPath_ofObject_withObserver_options_context_ = objc .registerName("initForKeyPath:ofObject:withObserver:options:context:"); -late final _sel_initForWritingWithMutableData_ = objc.registerName( - "initForWritingWithMutableData:", -); -late final _sel_initListDescriptor = objc.registerName("initListDescriptor"); -late final _sel_initRecordDescriptor = objc.registerName( - "initRecordDescriptor", -); -late final _sel_initRequiringSecureCoding_ = objc.registerName( - "initRequiringSecureCoding:", -); late final _sel_initToBuffer_capacity_ = objc.registerName( "initToBuffer:capacity:", ); @@ -46268,9 +56341,6 @@ late final _sel_initToFileAtPath_append_ = objc.registerName( "initToFileAtPath:append:", ); late final _sel_initToMemory = objc.registerName("initToMemory"); -late final _sel_initWithAEDescNoCopy_ = objc.registerName( - "initWithAEDescNoCopy:", -); late final _sel_initWithArray_ = objc.registerName("initWithArray:"); late final _sel_initWithArray_copyItems_ = objc.registerName( "initWithArray:copyItems:", @@ -46290,7 +56360,6 @@ late final _sel_initWithBase64EncodedString_options_ = objc.registerName( late final _sel_initWithBase64Encoding_ = objc.registerName( "initWithBase64Encoding:", ); -late final _sel_initWithBlock_ = objc.registerName("initWithBlock:"); late final _sel_initWithBool_ = objc.registerName("initWithBool:"); late final _sel_initWithBytesNoCopy_length_ = objc.registerName( "initWithBytesNoCopy:length:", @@ -46336,14 +56405,6 @@ late final _sel_initWithCharacters_length_ = objc.registerName( ); late final _sel_initWithClassName_ = objc.registerName("initWithClassName:"); late final _sel_initWithCoder_ = objc.registerName("initWithCoder:"); -late final _sel_initWithCommandDescription_ = objc.registerName( - "initWithCommandDescription:", -); -late final _sel_initWithContainerClassDescription_containerSpecifier_key_ = objc - .registerName("initWithContainerClassDescription:containerSpecifier:key:"); -late final _sel_initWithContainerSpecifier_key_ = objc.registerName( - "initWithContainerSpecifier:key:", -); late final _sel_initWithContentsOfFile_ = objc.registerName( "initWithContentsOfFile:", ); @@ -46385,12 +56446,6 @@ late final _sel_initWithData_ = objc.registerName("initWithData:"); late final _sel_initWithData_encoding_ = objc.registerName( "initWithData:encoding:", ); -late final _sel_initWithDescriptorType_bytes_length_ = objc.registerName( - "initWithDescriptorType:bytes:length:", -); -late final _sel_initWithDescriptorType_data_ = objc.registerName( - "initWithDescriptorType:data:", -); late final _sel_initWithDictionary_ = objc.registerName("initWithDictionary:"); late final _sel_initWithDictionary_copyItems_ = objc.registerName( "initWithDictionary:copyItems:", @@ -46398,17 +56453,7 @@ late final _sel_initWithDictionary_copyItems_ = objc.registerName( late final _sel_initWithDomain_code_userInfo_ = objc.registerName( "initWithDomain:code:userInfo:", ); -late final _sel_initWithDominantScript_languageMap_ = objc.registerName( - "initWithDominantScript:languageMap:", -); late final _sel_initWithDouble_ = objc.registerName("initWithDouble:"); -late final _sel_initWithEventClass_eventID_targetDescriptor_returnID_transactionID_ = - objc.registerName( - "initWithEventClass:eventID:targetDescriptor:returnID:transactionID:", - ); -late final _sel_initWithExpressionType_ = objc.registerName( - "initWithExpressionType:", -); late final _sel_initWithFileAtPath_ = objc.registerName("initWithFileAtPath:"); late final _sel_initWithFireDate_interval_repeats_block_ = objc.registerName( "initWithFireDate:interval:repeats:block:", @@ -46447,9 +56492,6 @@ late final _sel_initWithItem_typeIdentifier_ = objc.registerName( "initWithItem:typeIdentifier:", ); late final _sel_initWithLength_ = objc.registerName("initWithLength:"); -late final _sel_initWithLocal_connection_ = objc.registerName( - "initWithLocal:connection:", -); late final _sel_initWithLocaleIdentifier_ = objc.registerName( "initWithLocaleIdentifier:", ); @@ -46460,14 +56502,9 @@ late final _sel_initWithMarkdownString_options_baseURL_error_ = objc late final _sel_initWithMarkdown_options_baseURL_error_ = objc.registerName( "initWithMarkdown:options:baseURL:error:", ); -late final _sel_initWithName_ = objc.registerName("initWithName:"); -late final _sel_initWithName_data_ = objc.registerName("initWithName:data:"); late final _sel_initWithName_object_userInfo_ = objc.registerName( "initWithName:object:userInfo:", ); -late final _sel_initWithName_reason_userInfo_ = objc.registerName( - "initWithName:reason:userInfo:", -); late final _sel_initWithObject_ = objc.registerName("initWithObject:"); late final _sel_initWithObject_type_index_ = objc.registerName( "initWithObject:type:index:", @@ -46499,12 +56536,6 @@ late final _sel_initWithParent_userInfo_ = objc.registerName( "initWithParent:userInfo:", ); late final _sel_initWithPath_ = objc.registerName("initWithPath:"); -late final _sel_initWithReceivePort_sendPort_ = objc.registerName( - "initWithReceivePort:sendPort:", -); -late final _sel_initWithReceivePort_sendPort_components_ = objc.registerName( - "initWithReceivePort:sendPort:components:", -); late final _sel_initWithScheme_host_path_ = objc.registerName( "initWithScheme:host:path:", ); @@ -46520,30 +56551,12 @@ late final _sel_initWithString_ = objc.registerName("initWithString:"); late final _sel_initWithString_attributes_ = objc.registerName( "initWithString:attributes:", ); -late final _sel_initWithString_calendarFormat_ = objc.registerName( - "initWithString:calendarFormat:", -); -late final _sel_initWithString_calendarFormat_locale_ = objc.registerName( - "initWithString:calendarFormat:locale:", -); late final _sel_initWithString_encodingInvalidCharacters_ = objc.registerName( "initWithString:encodingInvalidCharacters:", ); late final _sel_initWithString_relativeToURL_ = objc.registerName( "initWithString:relativeToURL:", ); -late final _sel_initWithSuiteName_className_dictionary_ = objc.registerName( - "initWithSuiteName:className:dictionary:", -); -late final _sel_initWithSuiteName_commandName_dictionary_ = objc.registerName( - "initWithSuiteName:commandName:dictionary:", -); -late final _sel_initWithTarget_connection_ = objc.registerName( - "initWithTarget:connection:", -); -late final _sel_initWithTarget_selector_object_ = objc.registerName( - "initWithTarget:selector:object:", -); late final _sel_initWithTimeIntervalSince1970_ = objc.registerName( "initWithTimeIntervalSince1970:", ); @@ -46584,8 +56597,6 @@ late final _sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_ = objc.registerName( "initWithValidatedFormat:validFormatSpecifiers:locale:error:", ); -late final _sel_initWithYear_month_day_hour_minute_second_timeZone_ = objc - .registerName("initWithYear:month:day:hour:minute:second:timeZone:"); late final _sel_initialize = objc.registerName("initialize"); late final _sel_inputStreamWithData_ = objc.registerName( "inputStreamWithData:", @@ -46597,9 +56608,6 @@ late final _sel_inputStreamWithPort_ = objc.registerName( "inputStreamWithPort:", ); late final _sel_inputStreamWithURL_ = objc.registerName("inputStreamWithURL:"); -late final _sel_insertDescriptor_atIndex_ = objc.registerName( - "insertDescriptor:atIndex:", -); late final _sel_insertObject_atIndex_ = objc.registerName( "insertObject:atIndex:", ); @@ -46625,7 +56633,6 @@ late final _sel_instanceMethodSignatureForSelector_ = objc.registerName( late final _sel_instancesRespondToSelector_ = objc.registerName( "instancesRespondToSelector:", ); -late final _sel_int32Value = objc.registerName("int32Value"); late final _sel_intValue = objc.registerName("intValue"); late final _sel_integerValue = objc.registerName("integerValue"); late final _sel_interpretedSyntax = objc.registerName("interpretedSyntax"); @@ -46641,15 +56648,11 @@ late final _sel_intersectsOrderedSet_ = objc.registerName( ); late final _sel_intersectsSet_ = objc.registerName("intersectsSet:"); late final _sel_invalidate = objc.registerName("invalidate"); -late final _sel_invalidateClassDescriptionCache = objc.registerName( - "invalidateClassDescriptionCache", -); late final _sel_inverseDifference = objc.registerName("inverseDifference"); late final _sel_inverseForRelationshipKey_ = objc.registerName( "inverseForRelationshipKey:", ); late final _sel_invertedSet = objc.registerName("invertedSet"); -late final _sel_invocation = objc.registerName("invocation"); late final _sel_invocationWithMethodSignature_ = objc.registerName( "invocationWithMethodSignature:", ); @@ -46658,27 +56661,11 @@ late final _sel_invokeUsingIMP_ = objc.registerName("invokeUsingIMP:"); late final _sel_invokeWithTarget_ = objc.registerName("invokeWithTarget:"); late final _sel_isAbsolutePath = objc.registerName("isAbsolutePath"); late final _sel_isBool = objc.registerName("isBool"); -late final _sel_isBycopy = objc.registerName("isBycopy"); -late final _sel_isByref = objc.registerName("isByref"); late final _sel_isCancellable = objc.registerName("isCancellable"); late final _sel_isCancelled = objc.registerName("isCancelled"); late final _sel_isCaseInsensitiveLike_ = objc.registerName( "isCaseInsensitiveLike:", ); -late final _sel_isConflict = objc.registerName("isConflict"); -late final _sel_isDaylightSavingTime = objc.registerName( - "isDaylightSavingTime", -); -late final _sel_isDaylightSavingTimeForDate_ = objc.registerName( - "isDaylightSavingTimeForDate:", -); -late final _sel_isDeletableFileAtPath_ = objc.registerName( - "isDeletableFileAtPath:", -); -late final _sel_isDiscardable = objc.registerName("isDiscardable"); -late final _sel_isEnumeratingDirectoryPostOrder = objc.registerName( - "isEnumeratingDirectoryPostOrder", -); late final _sel_isEqualToArray_ = objc.registerName("isEqualToArray:"); late final _sel_isEqualToAttributedString_ = objc.registerName( "isEqualToAttributedString:", @@ -46688,7 +56675,6 @@ late final _sel_isEqualToDate_ = objc.registerName("isEqualToDate:"); late final _sel_isEqualToDictionary_ = objc.registerName( "isEqualToDictionary:", ); -late final _sel_isEqualToHost_ = objc.registerName("isEqualToHost:"); late final _sel_isEqualToIndexSet_ = objc.registerName("isEqualToIndexSet:"); late final _sel_isEqualToNumber_ = objc.registerName("isEqualToNumber:"); late final _sel_isEqualToOrderedSet_ = objc.registerName( @@ -46696,14 +56682,9 @@ late final _sel_isEqualToOrderedSet_ = objc.registerName( ); late final _sel_isEqualToSet_ = objc.registerName("isEqualToSet:"); late final _sel_isEqualToString_ = objc.registerName("isEqualToString:"); -late final _sel_isEqualToTimeZone_ = objc.registerName("isEqualToTimeZone:"); late final _sel_isEqualToValue_ = objc.registerName("isEqualToValue:"); late final _sel_isEqualTo_ = objc.registerName("isEqualTo:"); late final _sel_isEqual_ = objc.registerName("isEqual:"); -late final _sel_isExecutableFileAtPath_ = objc.registerName( - "isExecutableFileAtPath:", -); -late final _sel_isExecuting = objc.registerName("isExecuting"); late final _sel_isFileReferenceURL = objc.registerName("isFileReferenceURL"); late final _sel_isFileURL = objc.registerName("isFileURL"); late final _sel_isFinished = objc.registerName("isFinished"); @@ -46712,7 +56693,6 @@ late final _sel_isGreaterThanOrEqualTo_ = objc.registerName( "isGreaterThanOrEqualTo:", ); late final _sel_isGreaterThan_ = objc.registerName("isGreaterThan:"); -late final _sel_isHostCacheEnabled = objc.registerName("isHostCacheEnabled"); late final _sel_isIndeterminate = objc.registerName("isIndeterminate"); late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); late final _sel_isLessThanOrEqualTo_ = objc.registerName( @@ -46721,55 +56701,28 @@ late final _sel_isLessThanOrEqualTo_ = objc.registerName( late final _sel_isLessThan_ = objc.registerName("isLessThan:"); late final _sel_isLike_ = objc.registerName("isLike:"); late final _sel_isLoaded = objc.registerName("isLoaded"); -late final _sel_isLocationRequiredToCreateForKey_ = objc.registerName( - "isLocationRequiredToCreateForKey:", -); -late final _sel_isMainThread = objc.registerName("isMainThread"); late final _sel_isMemberOfClass_ = objc.registerName("isMemberOfClass:"); -late final _sel_isMultiThreaded = objc.registerName("isMultiThreaded"); late final _sel_isNotEqualTo_ = objc.registerName("isNotEqualTo:"); late final _sel_isOld = objc.registerName("isOld"); late final _sel_isOneway = objc.registerName("isOneway"); -late final _sel_isOptionalArgumentWithName_ = objc.registerName( - "isOptionalArgumentWithName:", -); late final _sel_isPausable = objc.registerName("isPausable"); late final _sel_isPaused = objc.registerName("isPaused"); late final _sel_isProxy = objc.registerName("isProxy"); -late final _sel_isReadOnlyKey_ = objc.registerName("isReadOnlyKey:"); -late final _sel_isReadableFileAtPath_ = objc.registerName( - "isReadableFileAtPath:", -); -late final _sel_isRecordDescriptor = objc.registerName("isRecordDescriptor"); -late final _sel_isResolved = objc.registerName("isResolved"); late final _sel_isSubclassOfClass_ = objc.registerName("isSubclassOfClass:"); late final _sel_isSubsetOfOrderedSet_ = objc.registerName( "isSubsetOfOrderedSet:", ); late final _sel_isSubsetOfSet_ = objc.registerName("isSubsetOfSet:"); late final _sel_isSupersetOfSet_ = objc.registerName("isSupersetOfSet:"); -late final _sel_isUbiquitousItemAtURL_ = objc.registerName( - "isUbiquitousItemAtURL:", -); late final _sel_isValid = objc.registerName("isValid"); -late final _sel_isWellFormed = objc.registerName("isWellFormed"); -late final _sel_isWritableFileAtPath_ = objc.registerName( - "isWritableFileAtPath:", -); late final _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_ = objc.registerName( "itemProviderVisibilityForRepresentationWithTypeIdentifier:", ); -late final _sel_key = objc.registerName("key"); -late final _sel_keyClassDescription = objc.registerName("keyClassDescription"); late final _sel_keyEnumerator = objc.registerName("keyEnumerator"); -late final _sel_keyPath = objc.registerName("keyPath"); late final _sel_keyPathsForValuesAffectingValueForKey_ = objc.registerName( "keyPathsForValuesAffectingValueForKey:", ); -late final _sel_keyWithAppleEventCode_ = objc.registerName( - "keyWithAppleEventCode:", -); late final _sel_keysOfEntriesPassingTest_ = objc.registerName( "keysOfEntriesPassingTest:", ); @@ -46784,26 +56737,18 @@ late final _sel_keysSortedByValueUsingSelector_ = objc.registerName( ); late final _sel_keysSortedByValueWithOptions_usingComparator_ = objc .registerName("keysSortedByValueWithOptions:usingComparator:"); -late final _sel_keywordForDescriptorAtIndex_ = objc.registerName( - "keywordForDescriptorAtIndex:", -); late final _sel_kind = objc.registerName("kind"); -late final _sel_knownTimeZoneNames = objc.registerName("knownTimeZoneNames"); late final _sel_languageCode = objc.registerName("languageCode"); late final _sel_languageIdentifier = objc.registerName("languageIdentifier"); -late final _sel_languageMap = objc.registerName("languageMap"); -late final _sel_languagesForScript_ = objc.registerName("languagesForScript:"); late final _sel_lastIndex = objc.registerName("lastIndex"); late final _sel_lastObject = objc.registerName("lastObject"); late final _sel_lastPathComponent = objc.registerName("lastPathComponent"); late final _sel_laterDate_ = objc.registerName("laterDate:"); -late final _sel_leftExpression = objc.registerName("leftExpression"); late final _sel_length = objc.registerName("length"); late final _sel_lengthOfBytesUsingEncoding_ = objc.registerName( "lengthOfBytesUsingEncoding:", ); late final _sel_letterCharacterSet = objc.registerName("letterCharacterSet"); -late final _sel_level = objc.registerName("level"); late final _sel_limitDateForMode_ = objc.registerName("limitDateForMode:"); late final _sel_lineDirectionForLanguage_ = objc.registerName( "lineDirectionForLanguage:", @@ -46813,16 +56758,6 @@ late final _sel_linguisticTagsInRange_scheme_options_orthography_tokenRanges_ = objc.registerName( "linguisticTagsInRange:scheme:options:orthography:tokenRanges:", ); -late final _sel_linkItemAtPath_toPath_error_ = objc.registerName( - "linkItemAtPath:toPath:error:", -); -late final _sel_linkItemAtURL_toURL_error_ = objc.registerName( - "linkItemAtURL:toURL:error:", -); -late final _sel_linkPath_toPath_handler_ = objc.registerName( - "linkPath:toPath:handler:", -); -late final _sel_listDescriptor = objc.registerName("listDescriptor"); late final _sel_load = objc.registerName("load"); late final _sel_loadAndReturnError_ = objc.registerName("loadAndReturnError:"); late final _sel_loadDataRepresentationForTypeIdentifier_completionHandler_ = @@ -46853,8 +56788,6 @@ late final _sel_loadPreviewImageWithOptions_completionHandler_ = objc late final _sel_loadResourceDataNotifyingClient_usingCache_ = objc.registerName( "loadResourceDataNotifyingClient:usingCache:", ); -late final _sel_localObjects = objc.registerName("localObjects"); -late final _sel_localTimeZone = objc.registerName("localTimeZone"); late final _sel_localeIdentifier = objc.registerName("localeIdentifier"); late final _sel_localeIdentifierFromComponents_ = objc.registerName( "localeIdentifierFromComponents:", @@ -46902,16 +56835,9 @@ late final _sel_localizedInfoDictionary = objc.registerName( late final _sel_localizedLowercaseString = objc.registerName( "localizedLowercaseString", ); -late final _sel_localizedName = objc.registerName("localizedName"); -late final _sel_localizedNameOfSavingComputer = objc.registerName( - "localizedNameOfSavingComputer", -); late final _sel_localizedNameOfStringEncoding_ = objc.registerName( "localizedNameOfStringEncoding:", ); -late final _sel_localizedName_locale_ = objc.registerName( - "localizedName:locale:", -); late final _sel_localizedRecoveryOptions = objc.registerName( "localizedRecoveryOptions", ); @@ -46980,22 +56906,14 @@ late final _sel_lowercaseString = objc.registerName("lowercaseString"); late final _sel_lowercaseStringWithLocale_ = objc.registerName( "lowercaseStringWithLocale:", ); -late final _sel_main = objc.registerName("main"); late final _sel_mainBundle = objc.registerName("mainBundle"); late final _sel_mainRunLoop = objc.registerName("mainRunLoop"); -late final _sel_mainThread = objc.registerName("mainThread"); -late final _sel_makeNewConnection_sender_ = objc.registerName( - "makeNewConnection:sender:", -); late final _sel_makeObjectsPerformSelector_ = objc.registerName( "makeObjectsPerformSelector:", ); late final _sel_makeObjectsPerformSelector_withObject_ = objc.registerName( "makeObjectsPerformSelector:withObject:", ); -late final _sel_matchesAppleEventCode_ = objc.registerName( - "matchesAppleEventCode:", -); late final _sel_maximumLengthOfBytesUsingEncoding_ = objc.registerName( "maximumLengthOfBytesUsingEncoding:", ); @@ -47007,30 +56925,12 @@ late final _sel_methodSignature = objc.registerName("methodSignature"); late final _sel_methodSignatureForSelector_ = objc.registerName( "methodSignatureForSelector:", ); -late final _sel_middleName = objc.registerName("middleName"); late final _sel_minusOrderedSet_ = objc.registerName("minusOrderedSet:"); late final _sel_minusSet_ = objc.registerName("minusSet:"); -late final _sel_minuteOfHour = objc.registerName("minuteOfHour"); -late final _sel_modificationDate = objc.registerName("modificationDate"); -late final _sel_monthOfYear = objc.registerName("monthOfYear"); -late final _sel_mountedVolumeURLsIncludingResourceValuesForKeys_options_ = objc - .registerName("mountedVolumeURLsIncludingResourceValuesForKeys:options:"); -late final _sel_moveItemAtPath_toPath_error_ = objc.registerName( - "moveItemAtPath:toPath:error:", -); -late final _sel_moveItemAtURL_toURL_error_ = objc.registerName( - "moveItemAtURL:toURL:error:", -); late final _sel_moveObjectsAtIndexes_toIndex_ = objc.registerName( "moveObjectsAtIndexes:toIndex:", ); -late final _sel_movePath_toPath_handler_ = objc.registerName( - "movePath:toPath:handler:", -); late final _sel_msgid = objc.registerName("msgid"); -late final _sel_multipleThreadsEnabled = objc.registerName( - "multipleThreadsEnabled", -); late final _sel_mutableArrayValueForKeyPath_ = objc.registerName( "mutableArrayValueForKeyPath:", ); @@ -47055,23 +56955,13 @@ late final _sel_mutableSetValueForKey_ = objc.registerName( "mutableSetValueForKey:", ); late final _sel_name = objc.registerName("name"); -late final _sel_namePrefix = objc.registerName("namePrefix"); -late final _sel_nameSuffix = objc.registerName("nameSuffix"); -late final _sel_names = objc.registerName("names"); late final _sel_new = objc.registerName("new"); late final _sel_newScriptingObjectOfClass_forValueForKey_withContentsValue_properties_ = objc.registerName( "newScriptingObjectOfClass:forValueForKey:withContentsValue:properties:", ); late final _sel_newlineCharacterSet = objc.registerName("newlineCharacterSet"); -late final _sel_nextDaylightSavingTimeTransition = objc.registerName( - "nextDaylightSavingTimeTransition", -); -late final _sel_nextDaylightSavingTimeTransitionAfterDate_ = objc.registerName( - "nextDaylightSavingTimeTransitionAfterDate:", -); late final _sel_nextObject = objc.registerName("nextObject"); -late final _sel_nickname = objc.registerName("nickname"); late final _sel_nonBaseCharacterSet = objc.registerName("nonBaseCharacterSet"); late final _sel_nonretainedObjectValue = objc.registerName( "nonretainedObjectValue", @@ -47084,9 +56974,7 @@ late final _sel_notificationWithName_object_userInfo_ = objc.registerName( ); late final _sel_now = objc.registerName("now"); late final _sel_null = objc.registerName("null"); -late final _sel_nullDescriptor = objc.registerName("nullDescriptor"); late final _sel_numberOfArguments = objc.registerName("numberOfArguments"); -late final _sel_numberOfItems = objc.registerName("numberOfItems"); late final _sel_numberWithBool_ = objc.registerName("numberWithBool:"); late final _sel_numberWithChar_ = objc.registerName("numberWithChar:"); late final _sel_numberWithDouble_ = objc.registerName("numberWithDouble:"); @@ -47129,17 +57017,8 @@ late final _sel_objectForKeyedSubscript_ = objc.registerName( "objectForKeyedSubscript:", ); late final _sel_objectSpecifier = objc.registerName("objectSpecifier"); -late final _sel_objectSpecifierWithDescriptor_ = objc.registerName( - "objectSpecifierWithDescriptor:", -); late final _sel_objectZone = objc.registerName("objectZone"); late final _sel_objectsAtIndexes_ = objc.registerName("objectsAtIndexes:"); -late final _sel_objectsByEvaluatingSpecifier = objc.registerName( - "objectsByEvaluatingSpecifier", -); -late final _sel_objectsByEvaluatingWithContainers_ = objc.registerName( - "objectsByEvaluatingWithContainers:", -); late final _sel_objectsForKeys_notFoundMarker_ = objc.registerName( "objectsForKeys:notFoundMarker:", ); @@ -47151,7 +57030,6 @@ late final _sel_observationInfo = objc.registerName("observationInfo"); late final _sel_observeValueForKeyPath_ofObject_change_context_ = objc .registerName("observeValueForKeyPath:ofObject:change:context:"); late final _sel_open = objc.registerName("open"); -late final _sel_operand = objc.registerName("operand"); late final _sel_orderedSet = objc.registerName("orderedSet"); late final _sel_orderedSetByApplyingDifference_ = objc.registerName( "orderedSetByApplyingDifference:", @@ -47184,16 +57062,6 @@ late final _sel_orderedSetWithSet_ = objc.registerName("orderedSetWithSet:"); late final _sel_orderedSetWithSet_copyItems_ = objc.registerName( "orderedSetWithSet:copyItems:", ); -late final _sel_originatorNameComponents = objc.registerName( - "originatorNameComponents", -); -late final _sel_orthographyWithDominantScript_languageMap_ = objc.registerName( - "orthographyWithDominantScript:languageMap:", -); -late final _sel_otherVersionsOfItemAtURL_ = objc.registerName( - "otherVersionsOfItemAtURL:", -); -late final _sel_outputFormat = objc.registerName("outputFormat"); late final _sel_outputStreamToBuffer_capacity_ = objc.registerName( "outputStreamToBuffer:capacity:", ); @@ -47209,16 +57077,10 @@ late final _sel_outputStreamWithURL_append_ = objc.registerName( late final _sel_paragraphRangeForRange_ = objc.registerName( "paragraphRangeForRange:", ); -late final _sel_paramDescriptorForKeyword_ = objc.registerName( - "paramDescriptorForKeyword:", -); late final _sel_parameterString = objc.registerName("parameterString"); late final _sel_password = objc.registerName("password"); late final _sel_path = objc.registerName("path"); late final _sel_pathComponents = objc.registerName("pathComponents"); -late final _sel_pathContentOfSymbolicLinkAtPath_ = objc.registerName( - "pathContentOfSymbolicLinkAtPath:", -); late final _sel_pathExtension = objc.registerName("pathExtension"); late final _sel_pathForAuxiliaryExecutable_ = objc.registerName( "pathForAuxiliaryExecutable:", @@ -47241,15 +57103,10 @@ late final _sel_pathsMatchingExtensions_ = objc.registerName( "pathsMatchingExtensions:", ); late final _sel_pause = objc.registerName("pause"); -late final _sel_pauseSyncForUbiquitousItemAtURL_completionHandler_ = objc - .registerName("pauseSyncForUbiquitousItemAtURL:completionHandler:"); late final _sel_pausingHandler = objc.registerName("pausingHandler"); late final _sel_performAsCurrentWithPendingUnitCount_usingBlock_ = objc .registerName("performAsCurrentWithPendingUnitCount:usingBlock:"); late final _sel_performBlock_ = objc.registerName("performBlock:"); -late final _sel_performDefaultImplementation = objc.registerName( - "performDefaultImplementation", -); late final _sel_performInModes_block_ = objc.registerName( "performInModes:block:", ); @@ -47280,41 +57137,15 @@ late final _sel_performSelector_withObject_afterDelay_inModes_ = objc late final _sel_performSelector_withObject_withObject_ = objc.registerName( "performSelector:withObject:withObject:", ); -late final _sel_persistentIdentifier = objc.registerName( - "persistentIdentifier", -); -late final _sel_phoneticRepresentation = objc.registerName( - "phoneticRepresentation", -); late final _sel_pointValue = objc.registerName("pointValue"); late final _sel_pointerValue = objc.registerName("pointerValue"); late final _sel_port = objc.registerName("port"); -late final _sel_portCoderWithReceivePort_sendPort_components_ = objc - .registerName("portCoderWithReceivePort:sendPort:components:"); -late final _sel_portForName_ = objc.registerName("portForName:"); -late final _sel_portForName_host_ = objc.registerName("portForName:host:"); late final _sel_precomposedStringWithCanonicalMapping = objc.registerName( "precomposedStringWithCanonicalMapping", ); late final _sel_precomposedStringWithCompatibilityMapping = objc.registerName( "precomposedStringWithCompatibilityMapping", ); -late final _sel_predicate = objc.registerName("predicate"); -late final _sel_predicateFormat = objc.registerName("predicateFormat"); -late final _sel_predicateFromMetadataQueryString_ = objc.registerName( - "predicateFromMetadataQueryString:", -); -late final _sel_predicateWithBlock_ = objc.registerName("predicateWithBlock:"); -late final _sel_predicateWithFormat_ = objc.registerName( - "predicateWithFormat:", -); -late final _sel_predicateWithFormat_argumentArray_ = objc.registerName( - "predicateWithFormat:argumentArray:", -); -late final _sel_predicateWithSubstitutionVariables_ = objc.registerName( - "predicateWithSubstitutionVariables:", -); -late final _sel_predicateWithValue_ = objc.registerName("predicateWithValue:"); late final _sel_preferredLanguages = objc.registerName("preferredLanguages"); late final _sel_preferredLocalizations = objc.registerName( "preferredLocalizations", @@ -47354,17 +57185,10 @@ late final _sel_propertyList = objc.registerName("propertyList"); late final _sel_propertyListFromStringsFileFormat = objc.registerName( "propertyListFromStringsFileFormat", ); -late final _sel_proxyWithLocal_connection_ = objc.registerName( - "proxyWithLocal:connection:", -); -late final _sel_proxyWithTarget_connection_ = objc.registerName( - "proxyWithTarget:connection:", -); late final _sel_publish = objc.registerName("publish"); late final _sel_punctuationCharacterSet = objc.registerName( "punctuationCharacterSet", ); -late final _sel_qualityOfService = objc.registerName("qualityOfService"); late final _sel_query = objc.registerName("query"); late final _sel_quotationBeginDelimiter = objc.registerName( "quotationBeginDelimiter", @@ -47372,8 +57196,6 @@ late final _sel_quotationBeginDelimiter = objc.registerName( late final _sel_quotationEndDelimiter = objc.registerName( "quotationEndDelimiter", ); -late final _sel_raise = objc.registerName("raise"); -late final _sel_raise_format_ = objc.registerName("raise:format:"); late final _sel_rangeOfCharacterFromSet_ = objc.registerName( "rangeOfCharacterFromSet:", ); @@ -47407,17 +57229,11 @@ late final _sel_read_maxLength_ = objc.registerName("read:maxLength:"); late final _sel_readableTypeIdentifiersForItemProvider = objc.registerName( "readableTypeIdentifiersForItemProvider", ); -late final _sel_reason = objc.registerName("reason"); late final _sel_receivePort = objc.registerName("receivePort"); -late final _sel_receiversSpecifier = objc.registerName("receiversSpecifier"); -late final _sel_recordDescriptor = objc.registerName("recordDescriptor"); late final _sel_recoveryAttempter = objc.registerName("recoveryAttempter"); late final _sel_rectValue = objc.registerName("rectValue"); late final _sel_regionCode = objc.registerName("regionCode"); late final _sel_registerClass = objc.registerName("registerClass"); -late final _sel_registerClassDescription_forClass_ = objc.registerName( - "registerClassDescription:forClass:", -); late final _sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_ = objc.registerName( "registerDataRepresentationForTypeIdentifier:visibility:loadHandler:", @@ -47429,16 +57245,11 @@ late final _sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibili late final _sel_registerItemForTypeIdentifier_loadHandler_ = objc.registerName( "registerItemForTypeIdentifier:loadHandler:", ); -late final _sel_registerName_ = objc.registerName("registerName:"); -late final _sel_registerName_withNameServer_ = objc.registerName( - "registerName:withNameServer:", -); late final _sel_registerObjectOfClass_visibility_loadHandler_ = objc .registerName("registerObjectOfClass:visibility:loadHandler:"); late final _sel_registerObject_visibility_ = objc.registerName( "registerObject:visibility:", ); -late final _sel_registerPort_name_ = objc.registerName("registerPort:name:"); late final _sel_registerURLHandleClass_ = objc.registerName( "registerURLHandleClass:", ); @@ -47451,7 +57262,6 @@ late final _sel_registeredTypeIdentifiersWithFileOptions_ = objc.registerName( late final _sel_relativePath = objc.registerName("relativePath"); late final _sel_relativeString = objc.registerName("relativeString"); late final _sel_release = objc.registerName("release"); -late final _sel_remoteObjects = objc.registerName("remoteObjects"); late final _sel_removals = objc.registerName("removals"); late final _sel_remove = objc.registerName("remove"); late final _sel_removeAllCachedResourceValues = objc.registerName( @@ -47459,9 +57269,6 @@ late final _sel_removeAllCachedResourceValues = objc.registerName( ); late final _sel_removeAllIndexes = objc.registerName("removeAllIndexes"); late final _sel_removeAllObjects = objc.registerName("removeAllObjects"); -late final _sel_removeAndReturnError_ = objc.registerName( - "removeAndReturnError:", -); late final _sel_removeCachedResourceValueForKey_ = objc.registerName( "removeCachedResourceValueForKey:", ); @@ -47469,15 +57276,6 @@ late final _sel_removeClient_ = objc.registerName("removeClient:"); late final _sel_removeConnection_fromRunLoop_forMode_ = objc.registerName( "removeConnection:fromRunLoop:forMode:", ); -late final _sel_removeDescriptorAtIndex_ = objc.registerName( - "removeDescriptorAtIndex:", -); -late final _sel_removeDescriptorWithKeyword_ = objc.registerName( - "removeDescriptorWithKeyword:", -); -late final _sel_removeFileAtPath_handler_ = objc.registerName( - "removeFileAtPath:handler:", -); late final _sel_removeFromRunLoop_forMode_ = objc.registerName( "removeFromRunLoop:forMode:", ); @@ -47486,12 +57284,6 @@ late final _sel_removeIndexesInRange_ = objc.registerName( "removeIndexesInRange:", ); late final _sel_removeIndexes_ = objc.registerName("removeIndexes:"); -late final _sel_removeItemAtPath_error_ = objc.registerName( - "removeItemAtPath:error:", -); -late final _sel_removeItemAtURL_error_ = objc.registerName( - "removeItemAtURL:error:", -); late final _sel_removeLastObject = objc.registerName("removeLastObject"); late final _sel_removeObjectAtIndex_ = objc.registerName( "removeObjectAtIndex:", @@ -47532,16 +57324,7 @@ late final _sel_removeObserver_fromObjectsAtIndexes_forKeyPath_ = objc .registerName("removeObserver:fromObjectsAtIndexes:forKeyPath:"); late final _sel_removeObserver_fromObjectsAtIndexes_forKeyPath_context_ = objc .registerName("removeObserver:fromObjectsAtIndexes:forKeyPath:context:"); -late final _sel_removeOtherVersionsOfItemAtURL_error_ = objc.registerName( - "removeOtherVersionsOfItemAtURL:error:", -); -late final _sel_removeParamDescriptorWithKeyword_ = objc.registerName( - "removeParamDescriptorWithKeyword:", -); -late final _sel_removePortForName_ = objc.registerName("removePortForName:"); late final _sel_removePort_forMode_ = objc.registerName("removePort:forMode:"); -late final _sel_removeRequestMode_ = objc.registerName("removeRequestMode:"); -late final _sel_removeRunLoop_ = objc.registerName("removeRunLoop:"); late final _sel_removeSubscriber_ = objc.registerName("removeSubscriber:"); late final _sel_removeValueAtIndex_fromPropertyWithKey_ = objc.registerName( "removeValueAtIndex:fromPropertyWithKey:", @@ -47555,19 +57338,9 @@ late final _sel_replaceBytesInRange_withBytes_length_ = objc.registerName( late final _sel_replaceCharactersInRange_withString_ = objc.registerName( "replaceCharactersInRange:withString:", ); -late final _sel_replaceItemAtURL_options_error_ = objc.registerName( - "replaceItemAtURL:options:error:", -); -late final _sel_replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_ = - objc.registerName( - "replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error:", - ); late final _sel_replaceObjectAtIndex_withObject_ = objc.registerName( "replaceObjectAtIndex:withObject:", ); -late final _sel_replaceObject_withObject_ = objc.registerName( - "replaceObject:withObject:", -); late final _sel_replaceObjectsAtIndexes_withObjects_ = objc.registerName( "replaceObjectsAtIndexes:withObjects:", ); @@ -47595,16 +57368,11 @@ late final _sel_replacementObjectForKeyedArchiver_ = objc.registerName( late final _sel_replacementObjectForPortCoder_ = objc.registerName( "replacementObjectForPortCoder:", ); -late final _sel_replyTimeout = objc.registerName("replyTimeout"); -late final _sel_replyWithException_ = objc.registerName("replyWithException:"); -late final _sel_requestModes = objc.registerName("requestModes"); -late final _sel_requestTimeout = objc.registerName("requestTimeout"); late final _sel_requiresSecureCoding = objc.registerName( "requiresSecureCoding", ); late final _sel_reservedSpaceLength = objc.registerName("reservedSpaceLength"); late final _sel_resetBytesInRange_ = objc.registerName("resetBytesInRange:"); -late final _sel_resetSystemTimeZone = objc.registerName("resetSystemTimeZone"); late final _sel_resignCurrent = objc.registerName("resignCurrent"); late final _sel_resolveClassMethod_ = objc.registerName("resolveClassMethod:"); late final _sel_resolveInstanceMethod_ = objc.registerName( @@ -47625,35 +57393,15 @@ late final _sel_resourceValuesForKeys_fromBookmarkData_ = objc.registerName( ); late final _sel_respondsToSelector_ = objc.registerName("respondsToSelector:"); late final _sel_resume = objc.registerName("resume"); -late final _sel_resumeExecutionWithResult_ = objc.registerName( - "resumeExecutionWithResult:", -); -late final _sel_resumeSyncForUbiquitousItemAtURL_withBehavior_completionHandler_ = - objc.registerName( - "resumeSyncForUbiquitousItemAtURL:withBehavior:completionHandler:", - ); late final _sel_resumingHandler = objc.registerName("resumingHandler"); late final _sel_retain = objc.registerName("retain"); late final _sel_retainArguments = objc.registerName("retainArguments"); late final _sel_retainCount = objc.registerName("retainCount"); -late final _sel_retainWeakReference = objc.registerName("retainWeakReference"); -late final _sel_returnID = objc.registerName("returnID"); -late final _sel_returnType = objc.registerName("returnType"); late final _sel_reverseObjectEnumerator = objc.registerName( "reverseObjectEnumerator", ); late final _sel_reversedOrderedSet = objc.registerName("reversedOrderedSet"); -late final _sel_rightExpression = objc.registerName("rightExpression"); -late final _sel_rootObject = objc.registerName("rootObject"); -late final _sel_rootProxy = objc.registerName("rootProxy"); -late final _sel_rootProxyForConnectionWithRegisteredName_host_ = objc - .registerName("rootProxyForConnectionWithRegisteredName:host:"); -late final _sel_rootProxyForConnectionWithRegisteredName_host_usingNameServer_ = - objc.registerName( - "rootProxyForConnectionWithRegisteredName:host:usingNameServer:", - ); late final _sel_run = objc.registerName("run"); -late final _sel_runInNewThread = objc.registerName("runInNewThread"); late final _sel_runMode_beforeDate_ = objc.registerName("runMode:beforeDate:"); late final _sel_runUntilDate_ = objc.registerName("runUntilDate:"); late final _sel_scheduleInRunLoop_forMode_ = objc.registerName( @@ -47669,14 +57417,6 @@ late final _sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_ ); late final _sel_scheme = objc.registerName("scheme"); late final _sel_scriptCode = objc.registerName("scriptCode"); -late final _sel_scriptErrorExpectedTypeDescriptor = objc.registerName( - "scriptErrorExpectedTypeDescriptor", -); -late final _sel_scriptErrorNumber = objc.registerName("scriptErrorNumber"); -late final _sel_scriptErrorOffendingObjectDescriptor = objc.registerName( - "scriptErrorOffendingObjectDescriptor", -); -late final _sel_scriptErrorString = objc.registerName("scriptErrorString"); late final _sel_scriptingBeginsWith_ = objc.registerName( "scriptingBeginsWith:", ); @@ -47699,13 +57439,7 @@ late final _sel_scriptingProperties = objc.registerName("scriptingProperties"); late final _sel_scriptingValueForSpecifier_ = objc.registerName( "scriptingValueForSpecifier:", ); -late final _sel_secondOfMinute = objc.registerName("secondOfMinute"); -late final _sel_secondsFromGMT = objc.registerName("secondsFromGMT"); -late final _sel_secondsFromGMTForDate_ = objc.registerName( - "secondsFromGMTForDate:", -); late final _sel_selector = objc.registerName("selector"); -late final _sel_selectorForCommand_ = objc.registerName("selectorForCommand:"); late final _sel_self = objc.registerName("self"); late final _sel_sendBeforeDate_ = objc.registerName("sendBeforeDate:"); late final _sel_sendBeforeDate_components_from_reserved_ = objc.registerName( @@ -47713,19 +57447,8 @@ late final _sel_sendBeforeDate_components_from_reserved_ = objc.registerName( ); late final _sel_sendBeforeDate_msgid_components_from_reserved_ = objc .registerName("sendBeforeDate:msgid:components:from:reserved:"); -late final _sel_sendEventWithOptions_timeout_error_ = objc.registerName( - "sendEventWithOptions:timeout:error:", -); late final _sel_sendPort = objc.registerName("sendPort"); -late final _sel_serviceConnectionWithName_rootObject_ = objc.registerName( - "serviceConnectionWithName:rootObject:", -); -late final _sel_serviceConnectionWithName_rootObject_usingNameServer_ = objc - .registerName("serviceConnectionWithName:rootObject:usingNameServer:"); late final _sel_set = objc.registerName("set"); -late final _sel_setAbbreviationDictionary_ = objc.registerName( - "setAbbreviationDictionary:", -); late final _sel_setAllowsExtendedAttributes_ = objc.registerName( "setAllowsExtendedAttributes:", ); @@ -47735,14 +57458,7 @@ late final _sel_setAppliesSourcePositionAttributes_ = objc.registerName( late final _sel_setArgument_atIndex_ = objc.registerName( "setArgument:atIndex:", ); -late final _sel_setArguments_ = objc.registerName("setArguments:"); late final _sel_setArray_ = objc.registerName("setArray:"); -late final _sel_setAttributeDescriptor_forKeyword_ = objc.registerName( - "setAttributeDescriptor:forKeyword:", -); -late final _sel_setAttributes_ofItemAtPath_error_ = objc.registerName( - "setAttributes:ofItemAtPath:error:", -); late final _sel_setByAddingObject_ = objc.registerName("setByAddingObject:"); late final _sel_setByAddingObjectsFromArray_ = objc.registerName( "setByAddingObjectsFromArray:", @@ -47750,49 +57466,22 @@ late final _sel_setByAddingObjectsFromArray_ = objc.registerName( late final _sel_setByAddingObjectsFromSet_ = objc.registerName( "setByAddingObjectsFromSet:", ); -late final _sel_setCalendarFormat_ = objc.registerName("setCalendarFormat:"); late final _sel_setCancellable_ = objc.registerName("setCancellable:"); late final _sel_setCancellationHandler_ = objc.registerName( "setCancellationHandler:", ); -late final _sel_setChildSpecifier_ = objc.registerName("setChildSpecifier:"); -late final _sel_setClassName_forClass_ = objc.registerName( - "setClassName:forClass:", -); late final _sel_setCompletedUnitCount_ = objc.registerName( "setCompletedUnitCount:", ); -late final _sel_setContainerClassDescription_ = objc.registerName( - "setContainerClassDescription:", -); -late final _sel_setContainerIsObjectBeingTested_ = objc.registerName( - "setContainerIsObjectBeingTested:", -); -late final _sel_setContainerIsRangeContainerObject_ = objc.registerName( - "setContainerIsRangeContainerObject:", -); -late final _sel_setContainerSpecifier_ = objc.registerName( - "setContainerSpecifier:", -); late final _sel_setData_ = objc.registerName("setData:"); -late final _sel_setDefaultTimeZone_ = objc.registerName("setDefaultTimeZone:"); late final _sel_setDelegate_ = objc.registerName("setDelegate:"); -late final _sel_setDescriptor_forKeyword_ = objc.registerName( - "setDescriptor:forKeyword:", -); late final _sel_setDictionary_ = objc.registerName("setDictionary:"); -late final _sel_setDirectParameter_ = objc.registerName("setDirectParameter:"); -late final _sel_setDiscardable_ = objc.registerName("setDiscardable:"); late final _sel_setDone = objc.registerName("setDone"); late final _sel_setError_ = objc.registerName("setError:"); late final _sel_setEstimatedTimeRemaining_ = objc.registerName( "setEstimatedTimeRemaining:", ); -late final _sel_setEvaluationErrorNumber_ = objc.registerName( - "setEvaluationErrorNumber:", -); late final _sel_setFailurePolicy_ = objc.registerName("setFailurePolicy:"); -late final _sel_setFamilyName_ = objc.registerName("setFamilyName:"); late final _sel_setFileCompletedCount_ = objc.registerName( "setFileCompletedCount:", ); @@ -47802,17 +57491,9 @@ late final _sel_setFileOperationKind_ = objc.registerName( late final _sel_setFileTotalCount_ = objc.registerName("setFileTotalCount:"); late final _sel_setFileURL_ = objc.registerName("setFileURL:"); late final _sel_setFireDate_ = objc.registerName("setFireDate:"); -late final _sel_setGivenName_ = objc.registerName("setGivenName:"); -late final _sel_setHostCacheEnabled_ = objc.registerName( - "setHostCacheEnabled:", -); -late final _sel_setIndependentConversationQueueing_ = objc.registerName( - "setIndependentConversationQueueing:", -); late final _sel_setInterpretedSyntax_ = objc.registerName( "setInterpretedSyntax:", ); -late final _sel_setKey_ = objc.registerName("setKey:"); late final _sel_setKeys_triggerChangeNotificationsForDependentKey_ = objc .registerName("setKeys:triggerChangeNotificationsForDependentKey:"); late final _sel_setKind_ = objc.registerName("setKind:"); @@ -47824,12 +57505,7 @@ late final _sel_setLocalizedAdditionalDescription_ = objc.registerName( late final _sel_setLocalizedDescription_ = objc.registerName( "setLocalizedDescription:", ); -late final _sel_setMiddleName_ = objc.registerName("setMiddleName:"); late final _sel_setMsgid_ = objc.registerName("setMsgid:"); -late final _sel_setNamePrefix_ = objc.registerName("setNamePrefix:"); -late final _sel_setNameSuffix_ = objc.registerName("setNameSuffix:"); -late final _sel_setName_ = objc.registerName("setName:"); -late final _sel_setNickname_ = objc.registerName("setNickname:"); late final _sel_setNilValueForKey_ = objc.registerName("setNilValueForKey:"); late final _sel_setObjectZone_ = objc.registerName("setObjectZone:"); late final _sel_setObject_atIndex_ = objc.registerName("setObject:atIndex:"); @@ -47841,15 +57517,8 @@ late final _sel_setObject_forKeyedSubscript_ = objc.registerName( "setObject:forKeyedSubscript:", ); late final _sel_setObservationInfo_ = objc.registerName("setObservationInfo:"); -late final _sel_setOutputFormat_ = objc.registerName("setOutputFormat:"); -late final _sel_setParamDescriptor_forKeyword_ = objc.registerName( - "setParamDescriptor:forKeyword:", -); late final _sel_setPausable_ = objc.registerName("setPausable:"); late final _sel_setPausingHandler_ = objc.registerName("setPausingHandler:"); -late final _sel_setPhoneticRepresentation_ = objc.registerName( - "setPhoneticRepresentation:", -); late final _sel_setPreservationPriority_forTags_ = objc.registerName( "setPreservationPriority:forTags:", ); @@ -47857,21 +57526,6 @@ late final _sel_setPreviewImageHandler_ = objc.registerName( "setPreviewImageHandler:", ); late final _sel_setProperty_forKey_ = objc.registerName("setProperty:forKey:"); -late final _sel_setProtocolForProxy_ = objc.registerName( - "setProtocolForProxy:", -); -late final _sel_setQualityOfService_ = objc.registerName( - "setQualityOfService:", -); -late final _sel_setReceiversSpecifier_ = objc.registerName( - "setReceiversSpecifier:", -); -late final _sel_setReplyTimeout_ = objc.registerName("setReplyTimeout:"); -late final _sel_setRequestTimeout_ = objc.registerName("setRequestTimeout:"); -late final _sel_setRequiresSecureCoding_ = objc.registerName( - "setRequiresSecureCoding:", -); -late final _sel_setResolved_ = objc.registerName("setResolved:"); late final _sel_setResourceData_ = objc.registerName("setResourceData:"); late final _sel_setResourceValue_forKey_error_ = objc.registerName( "setResourceValue:forKey:error:", @@ -47881,39 +57535,21 @@ late final _sel_setResourceValues_error_ = objc.registerName( ); late final _sel_setResumingHandler_ = objc.registerName("setResumingHandler:"); late final _sel_setReturnValue_ = objc.registerName("setReturnValue:"); -late final _sel_setRootObject_ = objc.registerName("setRootObject:"); -late final _sel_setScriptErrorExpectedTypeDescriptor_ = objc.registerName( - "setScriptErrorExpectedTypeDescriptor:", -); -late final _sel_setScriptErrorNumber_ = objc.registerName( - "setScriptErrorNumber:", -); -late final _sel_setScriptErrorOffendingObjectDescriptor_ = objc.registerName( - "setScriptErrorOffendingObjectDescriptor:", -); -late final _sel_setScriptErrorString_ = objc.registerName( - "setScriptErrorString:", -); late final _sel_setScriptingProperties_ = objc.registerName( "setScriptingProperties:", ); late final _sel_setSelector_ = objc.registerName("setSelector:"); late final _sel_setSet_ = objc.registerName("setSet:"); late final _sel_setSharedObservers_ = objc.registerName("setSharedObservers:"); -late final _sel_setStackSize_ = objc.registerName("setStackSize:"); late final _sel_setString_ = objc.registerName("setString:"); late final _sel_setSuggestedName_ = objc.registerName("setSuggestedName:"); late final _sel_setTarget_ = objc.registerName("setTarget:"); late final _sel_setTemporaryResourceValue_forKey_ = objc.registerName( "setTemporaryResourceValue:forKey:", ); -late final _sel_setThreadPriority_ = objc.registerName("setThreadPriority:"); late final _sel_setThroughput_ = objc.registerName("setThroughput:"); -late final _sel_setTimeZone_ = objc.registerName("setTimeZone:"); late final _sel_setTolerance_ = objc.registerName("setTolerance:"); late final _sel_setTotalUnitCount_ = objc.registerName("setTotalUnitCount:"); -late final _sel_setUbiquitous_itemAtURL_destinationURL_error_ = objc - .registerName("setUbiquitous:itemAtURL:destinationURL:error:"); late final _sel_setUserInfoObject_forKey_ = objc.registerName( "setUserInfoObject:forKey:", ); @@ -47956,12 +57592,6 @@ late final _sel_signatureWithObjCTypes_ = objc.registerName( "signatureWithObjCTypes:", ); late final _sel_sizeValue = objc.registerName("sizeValue"); -late final _sel_skipDescendants = objc.registerName("skipDescendants"); -late final _sel_skipDescendents = objc.registerName("skipDescendents"); -late final _sel_sleepForTimeInterval_ = objc.registerName( - "sleepForTimeInterval:", -); -late final _sel_sleepUntilDate_ = objc.registerName("sleepUntilDate:"); late final _sel_smallestEncoding = objc.registerName("smallestEncoding"); late final _sel_sortRange_options_usingComparator_ = objc.registerName( "sortRange:options:usingComparator:", @@ -47998,16 +57628,10 @@ late final _sel_sortedArrayUsingSelector_ = objc.registerName( late final _sel_sortedArrayWithOptions_usingComparator_ = objc.registerName( "sortedArrayWithOptions:usingComparator:", ); -late final _sel_stackSize = objc.registerName("stackSize"); late final _sel_standardizedURL = objc.registerName("standardizedURL"); -late final _sel_start = objc.registerName("start"); late final _sel_startAccessingSecurityScopedResource = objc.registerName( "startAccessingSecurityScopedResource", ); -late final _sel_startDownloadingUbiquitousItemAtURL_error_ = objc.registerName( - "startDownloadingUbiquitousItemAtURL:error:", -); -late final _sel_statistics = objc.registerName("statistics"); late final _sel_status = objc.registerName("status"); late final _sel_stopAccessingSecurityScopedResource = objc.registerName( "stopAccessingSecurityScopedResource", @@ -48109,9 +57733,6 @@ late final _sel_stringWithContentsOfURL_encoding_error_ = objc.registerName( late final _sel_stringWithContentsOfURL_usedEncoding_error_ = objc.registerName( "stringWithContentsOfURL:usedEncoding:error:", ); -late final _sel_stringWithFileSystemRepresentation_length_ = objc.registerName( - "stringWithFileSystemRepresentation:length:", -); late final _sel_stringWithFormat_ = objc.registerName("stringWithFormat:"); late final _sel_stringWithString_ = objc.registerName("stringWithString:"); late final _sel_stringWithUTF8String_ = objc.registerName( @@ -48124,30 +57745,16 @@ late final _sel_stringsByAppendingPaths_ = objc.registerName( ); late final _sel_subarrayWithRange_ = objc.registerName("subarrayWithRange:"); late final _sel_subdataWithRange_ = objc.registerName("subdataWithRange:"); -late final _sel_subpathsAtPath_ = objc.registerName("subpathsAtPath:"); -late final _sel_subpathsOfDirectoryAtPath_error_ = objc.registerName( - "subpathsOfDirectoryAtPath:error:", -); late final _sel_substringFromIndex_ = objc.registerName("substringFromIndex:"); late final _sel_substringToIndex_ = objc.registerName("substringToIndex:"); late final _sel_substringWithRange_ = objc.registerName("substringWithRange:"); late final _sel_suggestedName = objc.registerName("suggestedName"); -late final _sel_suiteName = objc.registerName("suiteName"); late final _sel_superclass = objc.registerName("superclass"); -late final _sel_superclassDescription = objc.registerName( - "superclassDescription", -); -late final _sel_supportsCommand_ = objc.registerName("supportsCommand:"); late final _sel_supportsSecureCoding = objc.registerName( "supportsSecureCoding", ); -late final _sel_suspendExecution = objc.registerName("suspendExecution"); late final _sel_symbolCharacterSet = objc.registerName("symbolCharacterSet"); -late final _sel_systemDefaultPortNameServer = objc.registerName( - "systemDefaultPortNameServer", -); late final _sel_systemLocale = objc.registerName("systemLocale"); -late final _sel_systemTimeZone = objc.registerName("systemTimeZone"); late final _sel_systemVersion = objc.registerName("systemVersion"); late final _sel_takeStoredValue_forKey_ = objc.registerName( "takeStoredValue:forKey:", @@ -48160,11 +57767,6 @@ late final _sel_takeValuesFromDictionary_ = objc.registerName( "takeValuesFromDictionary:", ); late final _sel_target = objc.registerName("target"); -late final _sel_temporaryDirectory = objc.registerName("temporaryDirectory"); -late final _sel_temporaryDirectoryURLForNewVersionOfItemAtURL_ = objc - .registerName("temporaryDirectoryURLForNewVersionOfItemAtURL:"); -late final _sel_threadDictionary = objc.registerName("threadDictionary"); -late final _sel_threadPriority = objc.registerName("threadPriority"); late final _sel_throughput = objc.registerName("throughput"); late final _sel_timeInterval = objc.registerName("timeInterval"); late final _sel_timeIntervalSince1970 = objc.registerName( @@ -48179,18 +57781,6 @@ late final _sel_timeIntervalSinceNow = objc.registerName( late final _sel_timeIntervalSinceReferenceDate = objc.registerName( "timeIntervalSinceReferenceDate", ); -late final _sel_timeZone = objc.registerName("timeZone"); -late final _sel_timeZoneDataVersion = objc.registerName("timeZoneDataVersion"); -late final _sel_timeZoneForSecondsFromGMT_ = objc.registerName( - "timeZoneForSecondsFromGMT:", -); -late final _sel_timeZoneWithAbbreviation_ = objc.registerName( - "timeZoneWithAbbreviation:", -); -late final _sel_timeZoneWithName_ = objc.registerName("timeZoneWithName:"); -late final _sel_timeZoneWithName_data_ = objc.registerName( - "timeZoneWithName:data:", -); late final _sel_timerWithTimeInterval_invocation_repeats_ = objc.registerName( "timerWithTimeInterval:invocation:repeats:", ); @@ -48207,19 +57797,6 @@ late final _sel_toOneRelationshipKeys = objc.registerName( ); late final _sel_tolerance = objc.registerName("tolerance"); late final _sel_totalUnitCount = objc.registerName("totalUnitCount"); -late final _sel_transactionID = objc.registerName("transactionID"); -late final _sel_trashItemAtURL_resultingItemURL_error_ = objc.registerName( - "trashItemAtURL:resultingItemURL:error:", -); -late final _sel_trueExpression = objc.registerName("trueExpression"); -late final _sel_typeCodeValue = objc.registerName("typeCodeValue"); -late final _sel_typeForArgumentWithName_ = objc.registerName( - "typeForArgumentWithName:", -); -late final _sel_typeForKey_ = objc.registerName("typeForKey:"); -late final _sel_ubiquityIdentityToken = objc.registerName( - "ubiquityIdentityToken", -); late final _sel_unableToSetNilForKey_ = objc.registerName( "unableToSetNilForKey:", ); @@ -48227,12 +57804,7 @@ late final _sel_underlyingErrors = objc.registerName("underlyingErrors"); late final _sel_unionOrderedSet_ = objc.registerName("unionOrderedSet:"); late final _sel_unionSet_ = objc.registerName("unionSet:"); late final _sel_unload = objc.registerName("unload"); -late final _sel_unmountVolumeAtURL_options_completionHandler_ = objc - .registerName("unmountVolumeAtURL:options:completionHandler:"); late final _sel_unpublish = objc.registerName("unpublish"); -late final _sel_unresolvedConflictVersionsOfItemAtURL_ = objc.registerName( - "unresolvedConflictVersionsOfItemAtURL:", -); late final _sel_unsignedCharValue = objc.registerName("unsignedCharValue"); late final _sel_unsignedIntValue = objc.registerName("unsignedIntValue"); late final _sel_unsignedIntegerValue = objc.registerName( @@ -48243,10 +57815,6 @@ late final _sel_unsignedLongLongValue = objc.registerName( ); late final _sel_unsignedLongValue = objc.registerName("unsignedLongValue"); late final _sel_unsignedShortValue = objc.registerName("unsignedShortValue"); -late final _sel_uploadLocalVersionOfUbiquitousItemAtURL_withConflictResolutionPolicy_completionHandler_ = - objc.registerName( - "uploadLocalVersionOfUbiquitousItemAtURL:withConflictResolutionPolicy:completionHandler:", - ); late final _sel_uppercaseLetterCharacterSet = objc.registerName( "uppercaseLetterCharacterSet", ); @@ -48297,7 +57865,6 @@ late final _sel_valueWithUniqueID_inPropertyWithKey_ = objc.registerName( ); late final _sel_value_withObjCType_ = objc.registerName("value:withObjCType:"); late final _sel_valuesForKeys_ = objc.registerName("valuesForKeys:"); -late final _sel_variable = objc.registerName("variable"); late final _sel_variantCode = objc.registerName("variantCode"); late final _sel_variantFittingPresentationWidth_ = objc.registerName( "variantFittingPresentationWidth:", @@ -48306,21 +57873,6 @@ late final _sel_version = objc.registerName("version"); late final _sel_versionForClassName_ = objc.registerName( "versionForClassName:", ); -late final _sel_versionOfItemAtURL_forPersistentIdentifier_ = objc.registerName( - "versionOfItemAtURL:forPersistentIdentifier:", -); -late final _sel_visitExpressionKeyPath_scope_key_error_ = objc.registerName( - "visitExpressionKeyPath:scope:key:error:", -); -late final _sel_visitExpression_error_ = objc.registerName( - "visitExpression:error:", -); -late final _sel_visitOperatorType_error_ = objc.registerName( - "visitOperatorType:error:", -); -late final _sel_visitPredicate_error_ = objc.registerName( - "visitPredicate:error:", -); late final _sel_whitespaceAndNewlineCharacterSet = objc.registerName( "whitespaceAndNewlineCharacterSet", ); @@ -48368,9 +57920,6 @@ late final _sel_writeToURL_options_error_ = objc.registerName( "writeToURL:options:error:", ); late final _sel_write_maxLength_ = objc.registerName("write:maxLength:"); -late final _sel_yearOfCommonEra = objc.registerName("yearOfCommonEra"); -late final _sel_years_months_days_hours_minutes_seconds_sinceDate_ = objc - .registerName("years:months:days:hours:minutes:seconds:sinceDate:"); late final _sel_zone = objc.registerName("zone"); typedef instancetype = ffi.Pointer; typedef Dartinstancetype = objc.ObjCObject; diff --git a/pkgs/objective_c/src/objective_c_bindings_generated.m b/pkgs/objective_c/src/objective_c_bindings_generated.m index d271c8bdb9..8483727df0 100644 --- a/pkgs/objective_c/src/objective_c_bindings_generated.m +++ b/pkgs/objective_c/src/objective_c_bindings_generated.m @@ -209,19 +209,42 @@ _ListenerTrampoline_2 _1wx624s_wrapBlockingBlock_pfv6jd( }); } -typedef void (^_ListenerTrampoline_3)(id arg0, id arg1, id arg2); +typedef void (^_ListenerTrampoline_3)(id arg0, struct _NSRange arg1, BOOL * arg2); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_3 _1wx624s_wrapListenerBlock_1b3bb6a(_ListenerTrampoline_3 block) NS_RETURNS_RETAINED { +_ListenerTrampoline_3 _1wx624s_wrapListenerBlock_1a22wz(_ListenerTrampoline_3 block) NS_RETURNS_RETAINED { + return ^void(id arg0, struct _NSRange arg1, BOOL * arg2) { + objc_retainBlock(block); + block((__bridge id)(__bridge_retained void*)(arg0), arg1, arg2); + }; +} + +typedef void (^_BlockingTrampoline_3)(void * waiter, id arg0, struct _NSRange arg1, BOOL * arg2); +__attribute__((visibility("default"))) __attribute__((used)) +_ListenerTrampoline_3 _1wx624s_wrapBlockingBlock_1a22wz( + _BlockingTrampoline_3 block, _BlockingTrampoline_3 listenerBlock, + DOBJC_Context* ctx) NS_RETURNS_RETAINED { + BLOCKING_BLOCK_IMPL(ctx, ^void(id arg0, struct _NSRange arg1, BOOL * arg2), { + objc_retainBlock(block); + block(nil, (__bridge id)(__bridge_retained void*)(arg0), arg1, arg2); + }, { + objc_retainBlock(listenerBlock); + listenerBlock(waiter, (__bridge id)(__bridge_retained void*)(arg0), arg1, arg2); + }); +} + +typedef void (^_ListenerTrampoline_4)(id arg0, id arg1, id arg2); +__attribute__((visibility("default"))) __attribute__((used)) +_ListenerTrampoline_4 _1wx624s_wrapListenerBlock_1b3bb6a(_ListenerTrampoline_4 block) NS_RETURNS_RETAINED { return ^void(id arg0, id arg1, id arg2) { objc_retainBlock(block); block(objc_retainBlock(arg0), (__bridge id)(__bridge_retained void*)(arg1), (__bridge id)(__bridge_retained void*)(arg2)); }; } -typedef void (^_BlockingTrampoline_3)(void * waiter, id arg0, id arg1, id arg2); +typedef void (^_BlockingTrampoline_4)(void * waiter, id arg0, id arg1, id arg2); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_3 _1wx624s_wrapBlockingBlock_1b3bb6a( - _BlockingTrampoline_3 block, _BlockingTrampoline_3 listenerBlock, +_ListenerTrampoline_4 _1wx624s_wrapBlockingBlock_1b3bb6a( + _BlockingTrampoline_4 block, _BlockingTrampoline_4 listenerBlock, DOBJC_Context* ctx) NS_RETURNS_RETAINED { BLOCKING_BLOCK_IMPL(ctx, ^void(id arg0, id arg1, id arg2), { objc_retainBlock(block); @@ -232,19 +255,19 @@ _ListenerTrampoline_3 _1wx624s_wrapBlockingBlock_1b3bb6a( }); } -typedef void (^_ListenerTrampoline_4)(struct _NSRange arg0, BOOL * arg1); +typedef void (^_ListenerTrampoline_5)(struct _NSRange arg0, BOOL * arg1); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_4 _1wx624s_wrapListenerBlock_zkjmn1(_ListenerTrampoline_4 block) NS_RETURNS_RETAINED { +_ListenerTrampoline_5 _1wx624s_wrapListenerBlock_zkjmn1(_ListenerTrampoline_5 block) NS_RETURNS_RETAINED { return ^void(struct _NSRange arg0, BOOL * arg1) { objc_retainBlock(block); block(arg0, arg1); }; } -typedef void (^_BlockingTrampoline_4)(void * waiter, struct _NSRange arg0, BOOL * arg1); +typedef void (^_BlockingTrampoline_5)(void * waiter, struct _NSRange arg0, BOOL * arg1); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_4 _1wx624s_wrapBlockingBlock_zkjmn1( - _BlockingTrampoline_4 block, _BlockingTrampoline_4 listenerBlock, +_ListenerTrampoline_5 _1wx624s_wrapBlockingBlock_zkjmn1( + _BlockingTrampoline_5 block, _BlockingTrampoline_5 listenerBlock, DOBJC_Context* ctx) NS_RETURNS_RETAINED { BLOCKING_BLOCK_IMPL(ctx, ^void(struct _NSRange arg0, BOOL * arg1), { objc_retainBlock(block); @@ -255,19 +278,19 @@ _ListenerTrampoline_4 _1wx624s_wrapBlockingBlock_zkjmn1( }); } -typedef void (^_ListenerTrampoline_5)(id arg0, struct _NSRange arg1, struct _NSRange arg2, BOOL * arg3); +typedef void (^_ListenerTrampoline_6)(id arg0, struct _NSRange arg1, struct _NSRange arg2, BOOL * arg3); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_5 _1wx624s_wrapListenerBlock_lmc3p5(_ListenerTrampoline_5 block) NS_RETURNS_RETAINED { +_ListenerTrampoline_6 _1wx624s_wrapListenerBlock_lmc3p5(_ListenerTrampoline_6 block) NS_RETURNS_RETAINED { return ^void(id arg0, struct _NSRange arg1, struct _NSRange arg2, BOOL * arg3) { objc_retainBlock(block); block((__bridge id)(__bridge_retained void*)(arg0), arg1, arg2, arg3); }; } -typedef void (^_BlockingTrampoline_5)(void * waiter, id arg0, struct _NSRange arg1, struct _NSRange arg2, BOOL * arg3); +typedef void (^_BlockingTrampoline_6)(void * waiter, id arg0, struct _NSRange arg1, struct _NSRange arg2, BOOL * arg3); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_5 _1wx624s_wrapBlockingBlock_lmc3p5( - _BlockingTrampoline_5 block, _BlockingTrampoline_5 listenerBlock, +_ListenerTrampoline_6 _1wx624s_wrapBlockingBlock_lmc3p5( + _BlockingTrampoline_6 block, _BlockingTrampoline_6 listenerBlock, DOBJC_Context* ctx) NS_RETURNS_RETAINED { BLOCKING_BLOCK_IMPL(ctx, ^void(id arg0, struct _NSRange arg1, struct _NSRange arg2, BOOL * arg3), { objc_retainBlock(block); @@ -278,19 +301,19 @@ _ListenerTrampoline_5 _1wx624s_wrapBlockingBlock_lmc3p5( }); } -typedef void (^_ListenerTrampoline_6)(id arg0, BOOL * arg1); +typedef void (^_ListenerTrampoline_7)(id arg0, BOOL * arg1); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_6 _1wx624s_wrapListenerBlock_t8l8el(_ListenerTrampoline_6 block) NS_RETURNS_RETAINED { +_ListenerTrampoline_7 _1wx624s_wrapListenerBlock_t8l8el(_ListenerTrampoline_7 block) NS_RETURNS_RETAINED { return ^void(id arg0, BOOL * arg1) { objc_retainBlock(block); block((__bridge id)(__bridge_retained void*)(arg0), arg1); }; } -typedef void (^_BlockingTrampoline_6)(void * waiter, id arg0, BOOL * arg1); +typedef void (^_BlockingTrampoline_7)(void * waiter, id arg0, BOOL * arg1); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_6 _1wx624s_wrapBlockingBlock_t8l8el( - _BlockingTrampoline_6 block, _BlockingTrampoline_6 listenerBlock, +_ListenerTrampoline_7 _1wx624s_wrapBlockingBlock_t8l8el( + _BlockingTrampoline_7 block, _BlockingTrampoline_7 listenerBlock, DOBJC_Context* ctx) NS_RETURNS_RETAINED { BLOCKING_BLOCK_IMPL(ctx, ^void(id arg0, BOOL * arg1), { objc_retainBlock(block); @@ -301,19 +324,19 @@ _ListenerTrampoline_6 _1wx624s_wrapBlockingBlock_t8l8el( }); } -typedef void (^_ListenerTrampoline_7)(id arg0); +typedef void (^_ListenerTrampoline_8)(id arg0); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_7 _1wx624s_wrapListenerBlock_xtuoz7(_ListenerTrampoline_7 block) NS_RETURNS_RETAINED { +_ListenerTrampoline_8 _1wx624s_wrapListenerBlock_xtuoz7(_ListenerTrampoline_8 block) NS_RETURNS_RETAINED { return ^void(id arg0) { objc_retainBlock(block); block((__bridge id)(__bridge_retained void*)(arg0)); }; } -typedef void (^_BlockingTrampoline_7)(void * waiter, id arg0); +typedef void (^_BlockingTrampoline_8)(void * waiter, id arg0); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_7 _1wx624s_wrapBlockingBlock_xtuoz7( - _BlockingTrampoline_7 block, _BlockingTrampoline_7 listenerBlock, +_ListenerTrampoline_8 _1wx624s_wrapBlockingBlock_xtuoz7( + _BlockingTrampoline_8 block, _BlockingTrampoline_8 listenerBlock, DOBJC_Context* ctx) NS_RETURNS_RETAINED { BLOCKING_BLOCK_IMPL(ctx, ^void(id arg0), { objc_retainBlock(block); @@ -324,19 +347,19 @@ _ListenerTrampoline_7 _1wx624s_wrapBlockingBlock_xtuoz7( }); } -typedef void (^_ListenerTrampoline_8)(unsigned long arg0, BOOL * arg1); +typedef void (^_ListenerTrampoline_9)(unsigned long arg0, BOOL * arg1); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_8 _1wx624s_wrapListenerBlock_q5jeyk(_ListenerTrampoline_8 block) NS_RETURNS_RETAINED { +_ListenerTrampoline_9 _1wx624s_wrapListenerBlock_q5jeyk(_ListenerTrampoline_9 block) NS_RETURNS_RETAINED { return ^void(unsigned long arg0, BOOL * arg1) { objc_retainBlock(block); block(arg0, arg1); }; } -typedef void (^_BlockingTrampoline_8)(void * waiter, unsigned long arg0, BOOL * arg1); +typedef void (^_BlockingTrampoline_9)(void * waiter, unsigned long arg0, BOOL * arg1); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_8 _1wx624s_wrapBlockingBlock_q5jeyk( - _BlockingTrampoline_8 block, _BlockingTrampoline_8 listenerBlock, +_ListenerTrampoline_9 _1wx624s_wrapBlockingBlock_q5jeyk( + _BlockingTrampoline_9 block, _BlockingTrampoline_9 listenerBlock, DOBJC_Context* ctx) NS_RETURNS_RETAINED { BLOCKING_BLOCK_IMPL(ctx, ^void(unsigned long arg0, BOOL * arg1), { objc_retainBlock(block); @@ -347,19 +370,19 @@ _ListenerTrampoline_8 _1wx624s_wrapBlockingBlock_q5jeyk( }); } -typedef void (^_ListenerTrampoline_9)(id arg0, BOOL arg1, id arg2); +typedef void (^_ListenerTrampoline_10)(id arg0, BOOL arg1, id arg2); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_9 _1wx624s_wrapListenerBlock_rnu2c5(_ListenerTrampoline_9 block) NS_RETURNS_RETAINED { +_ListenerTrampoline_10 _1wx624s_wrapListenerBlock_rnu2c5(_ListenerTrampoline_10 block) NS_RETURNS_RETAINED { return ^void(id arg0, BOOL arg1, id arg2) { objc_retainBlock(block); block((__bridge id)(__bridge_retained void*)(arg0), arg1, (__bridge id)(__bridge_retained void*)(arg2)); }; } -typedef void (^_BlockingTrampoline_9)(void * waiter, id arg0, BOOL arg1, id arg2); +typedef void (^_BlockingTrampoline_10)(void * waiter, id arg0, BOOL arg1, id arg2); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_9 _1wx624s_wrapBlockingBlock_rnu2c5( - _BlockingTrampoline_9 block, _BlockingTrampoline_9 listenerBlock, +_ListenerTrampoline_10 _1wx624s_wrapBlockingBlock_rnu2c5( + _BlockingTrampoline_10 block, _BlockingTrampoline_10 listenerBlock, DOBJC_Context* ctx) NS_RETURNS_RETAINED { BLOCKING_BLOCK_IMPL(ctx, ^void(id arg0, BOOL arg1, id arg2), { objc_retainBlock(block); @@ -370,19 +393,19 @@ _ListenerTrampoline_9 _1wx624s_wrapBlockingBlock_rnu2c5( }); } -typedef void (^_ListenerTrampoline_10)(void * arg0); +typedef void (^_ListenerTrampoline_11)(void * arg0); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_10 _1wx624s_wrapListenerBlock_ovsamd(_ListenerTrampoline_10 block) NS_RETURNS_RETAINED { +_ListenerTrampoline_11 _1wx624s_wrapListenerBlock_ovsamd(_ListenerTrampoline_11 block) NS_RETURNS_RETAINED { return ^void(void * arg0) { objc_retainBlock(block); block(arg0); }; } -typedef void (^_BlockingTrampoline_10)(void * waiter, void * arg0); +typedef void (^_BlockingTrampoline_11)(void * waiter, void * arg0); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_10 _1wx624s_wrapBlockingBlock_ovsamd( - _BlockingTrampoline_10 block, _BlockingTrampoline_10 listenerBlock, +_ListenerTrampoline_11 _1wx624s_wrapBlockingBlock_ovsamd( + _BlockingTrampoline_11 block, _BlockingTrampoline_11 listenerBlock, DOBJC_Context* ctx) NS_RETURNS_RETAINED { BLOCKING_BLOCK_IMPL(ctx, ^void(void * arg0), { objc_retainBlock(block); @@ -399,19 +422,19 @@ void _1wx624s_protocolTrampoline_ovsamd(id target, void * sel) { return ((_ProtocolTrampoline_9)((id (*)(id, SEL, SEL))objc_msgSend)(target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel); } -typedef void (^_ListenerTrampoline_11)(void * arg0, id arg1); +typedef void (^_ListenerTrampoline_12)(void * arg0, id arg1); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_11 _1wx624s_wrapListenerBlock_18v1jvf(_ListenerTrampoline_11 block) NS_RETURNS_RETAINED { +_ListenerTrampoline_12 _1wx624s_wrapListenerBlock_18v1jvf(_ListenerTrampoline_12 block) NS_RETURNS_RETAINED { return ^void(void * arg0, id arg1) { objc_retainBlock(block); block(arg0, (__bridge id)(__bridge_retained void*)(arg1)); }; } -typedef void (^_BlockingTrampoline_11)(void * waiter, void * arg0, id arg1); +typedef void (^_BlockingTrampoline_12)(void * waiter, void * arg0, id arg1); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_11 _1wx624s_wrapBlockingBlock_18v1jvf( - _BlockingTrampoline_11 block, _BlockingTrampoline_11 listenerBlock, +_ListenerTrampoline_12 _1wx624s_wrapBlockingBlock_18v1jvf( + _BlockingTrampoline_12 block, _BlockingTrampoline_12 listenerBlock, DOBJC_Context* ctx) NS_RETURNS_RETAINED { BLOCKING_BLOCK_IMPL(ctx, ^void(void * arg0, id arg1), { objc_retainBlock(block); @@ -428,19 +451,19 @@ void _1wx624s_protocolTrampoline_18v1jvf(id target, void * sel, id arg1) { return ((_ProtocolTrampoline_10)((id (*)(id, SEL, SEL))objc_msgSend)(target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1); } -typedef void (^_ListenerTrampoline_12)(void * arg0, struct _NSRange arg1, BOOL * arg2); +typedef void (^_ListenerTrampoline_13)(void * arg0, struct _NSRange arg1, BOOL * arg2); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_12 _1wx624s_wrapListenerBlock_1q8ia8l(_ListenerTrampoline_12 block) NS_RETURNS_RETAINED { +_ListenerTrampoline_13 _1wx624s_wrapListenerBlock_1q8ia8l(_ListenerTrampoline_13 block) NS_RETURNS_RETAINED { return ^void(void * arg0, struct _NSRange arg1, BOOL * arg2) { objc_retainBlock(block); block(arg0, arg1, arg2); }; } -typedef void (^_BlockingTrampoline_12)(void * waiter, void * arg0, struct _NSRange arg1, BOOL * arg2); +typedef void (^_BlockingTrampoline_13)(void * waiter, void * arg0, struct _NSRange arg1, BOOL * arg2); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_12 _1wx624s_wrapBlockingBlock_1q8ia8l( - _BlockingTrampoline_12 block, _BlockingTrampoline_12 listenerBlock, +_ListenerTrampoline_13 _1wx624s_wrapBlockingBlock_1q8ia8l( + _BlockingTrampoline_13 block, _BlockingTrampoline_13 listenerBlock, DOBJC_Context* ctx) NS_RETURNS_RETAINED { BLOCKING_BLOCK_IMPL(ctx, ^void(void * arg0, struct _NSRange arg1, BOOL * arg2), { objc_retainBlock(block); @@ -451,19 +474,19 @@ _ListenerTrampoline_12 _1wx624s_wrapBlockingBlock_1q8ia8l( }); } -typedef void (^_ListenerTrampoline_13)(void * arg0, id arg1, NSStreamEvent arg2); +typedef void (^_ListenerTrampoline_14)(void * arg0, id arg1, NSStreamEvent arg2); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_13 _1wx624s_wrapListenerBlock_hoampi(_ListenerTrampoline_13 block) NS_RETURNS_RETAINED { +_ListenerTrampoline_14 _1wx624s_wrapListenerBlock_hoampi(_ListenerTrampoline_14 block) NS_RETURNS_RETAINED { return ^void(void * arg0, id arg1, NSStreamEvent arg2) { objc_retainBlock(block); block(arg0, (__bridge id)(__bridge_retained void*)(arg1), arg2); }; } -typedef void (^_BlockingTrampoline_13)(void * waiter, void * arg0, id arg1, NSStreamEvent arg2); +typedef void (^_BlockingTrampoline_14)(void * waiter, void * arg0, id arg1, NSStreamEvent arg2); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_13 _1wx624s_wrapBlockingBlock_hoampi( - _BlockingTrampoline_13 block, _BlockingTrampoline_13 listenerBlock, +_ListenerTrampoline_14 _1wx624s_wrapBlockingBlock_hoampi( + _BlockingTrampoline_14 block, _BlockingTrampoline_14 listenerBlock, DOBJC_Context* ctx) NS_RETURNS_RETAINED { BLOCKING_BLOCK_IMPL(ctx, ^void(void * arg0, id arg1, NSStreamEvent arg2), { objc_retainBlock(block); @@ -480,19 +503,19 @@ void _1wx624s_protocolTrampoline_hoampi(id target, void * sel, id arg1, NSStrea return ((_ProtocolTrampoline_11)((id (*)(id, SEL, SEL))objc_msgSend)(target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1, arg2); } -typedef void (^_ListenerTrampoline_14)(void * arg0, id arg1, id arg2, id arg3, void * arg4); +typedef void (^_ListenerTrampoline_15)(void * arg0, id arg1, id arg2, id arg3, void * arg4); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_14 _1wx624s_wrapListenerBlock_1sr3ozv(_ListenerTrampoline_14 block) NS_RETURNS_RETAINED { +_ListenerTrampoline_15 _1wx624s_wrapListenerBlock_1sr3ozv(_ListenerTrampoline_15 block) NS_RETURNS_RETAINED { return ^void(void * arg0, id arg1, id arg2, id arg3, void * arg4) { objc_retainBlock(block); block(arg0, (__bridge id)(__bridge_retained void*)(arg1), (__bridge id)(__bridge_retained void*)(arg2), (__bridge id)(__bridge_retained void*)(arg3), arg4); }; } -typedef void (^_BlockingTrampoline_14)(void * waiter, void * arg0, id arg1, id arg2, id arg3, void * arg4); +typedef void (^_BlockingTrampoline_15)(void * waiter, void * arg0, id arg1, id arg2, id arg3, void * arg4); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_14 _1wx624s_wrapBlockingBlock_1sr3ozv( - _BlockingTrampoline_14 block, _BlockingTrampoline_14 listenerBlock, +_ListenerTrampoline_15 _1wx624s_wrapBlockingBlock_1sr3ozv( + _BlockingTrampoline_15 block, _BlockingTrampoline_15 listenerBlock, DOBJC_Context* ctx) NS_RETURNS_RETAINED { BLOCKING_BLOCK_IMPL(ctx, ^void(void * arg0, id arg1, id arg2, id arg3, void * arg4), { objc_retainBlock(block); @@ -509,19 +532,19 @@ void _1wx624s_protocolTrampoline_1sr3ozv(id target, void * sel, id arg1, id arg return ((_ProtocolTrampoline_12)((id (*)(id, SEL, SEL))objc_msgSend)(target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1, arg2, arg3, arg4); } -typedef void (^_ListenerTrampoline_15)(void * arg0, unsigned long arg1); +typedef void (^_ListenerTrampoline_16)(void * arg0, unsigned long arg1); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_15 _1wx624s_wrapListenerBlock_zuf90e(_ListenerTrampoline_15 block) NS_RETURNS_RETAINED { +_ListenerTrampoline_16 _1wx624s_wrapListenerBlock_zuf90e(_ListenerTrampoline_16 block) NS_RETURNS_RETAINED { return ^void(void * arg0, unsigned long arg1) { objc_retainBlock(block); block(arg0, arg1); }; } -typedef void (^_BlockingTrampoline_15)(void * waiter, void * arg0, unsigned long arg1); +typedef void (^_BlockingTrampoline_16)(void * waiter, void * arg0, unsigned long arg1); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_15 _1wx624s_wrapBlockingBlock_zuf90e( - _BlockingTrampoline_15 block, _BlockingTrampoline_15 listenerBlock, +_ListenerTrampoline_16 _1wx624s_wrapBlockingBlock_zuf90e( + _BlockingTrampoline_16 block, _BlockingTrampoline_16 listenerBlock, DOBJC_Context* ctx) NS_RETURNS_RETAINED { BLOCKING_BLOCK_IMPL(ctx, ^void(void * arg0, unsigned long arg1), { objc_retainBlock(block); @@ -532,19 +555,19 @@ _ListenerTrampoline_15 _1wx624s_wrapBlockingBlock_zuf90e( }); } -typedef void (^_ListenerTrampoline_16)(void * arg0, id arg1, id arg2); +typedef void (^_ListenerTrampoline_17)(void * arg0, id arg1, id arg2); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_16 _1wx624s_wrapListenerBlock_fjrv01(_ListenerTrampoline_16 block) NS_RETURNS_RETAINED { +_ListenerTrampoline_17 _1wx624s_wrapListenerBlock_fjrv01(_ListenerTrampoline_17 block) NS_RETURNS_RETAINED { return ^void(void * arg0, id arg1, id arg2) { objc_retainBlock(block); block(arg0, (__bridge id)(__bridge_retained void*)(arg1), (__bridge id)(__bridge_retained void*)(arg2)); }; } -typedef void (^_BlockingTrampoline_16)(void * waiter, void * arg0, id arg1, id arg2); +typedef void (^_BlockingTrampoline_17)(void * waiter, void * arg0, id arg1, id arg2); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_16 _1wx624s_wrapBlockingBlock_fjrv01( - _BlockingTrampoline_16 block, _BlockingTrampoline_16 listenerBlock, +_ListenerTrampoline_17 _1wx624s_wrapBlockingBlock_fjrv01( + _BlockingTrampoline_17 block, _BlockingTrampoline_17 listenerBlock, DOBJC_Context* ctx) NS_RETURNS_RETAINED { BLOCKING_BLOCK_IMPL(ctx, ^void(void * arg0, id arg1, id arg2), { objc_retainBlock(block); @@ -561,19 +584,19 @@ void _1wx624s_protocolTrampoline_fjrv01(id target, void * sel, id arg1, id arg2 return ((_ProtocolTrampoline_13)((id (*)(id, SEL, SEL))objc_msgSend)(target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1, arg2); } -typedef void (^_ListenerTrampoline_17)(id arg0, unsigned long arg1, BOOL * arg2); +typedef void (^_ListenerTrampoline_18)(id arg0, unsigned long arg1, BOOL * arg2); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_17 _1wx624s_wrapListenerBlock_1p9ui4q(_ListenerTrampoline_17 block) NS_RETURNS_RETAINED { +_ListenerTrampoline_18 _1wx624s_wrapListenerBlock_1p9ui4q(_ListenerTrampoline_18 block) NS_RETURNS_RETAINED { return ^void(id arg0, unsigned long arg1, BOOL * arg2) { objc_retainBlock(block); block((__bridge id)(__bridge_retained void*)(arg0), arg1, arg2); }; } -typedef void (^_BlockingTrampoline_17)(void * waiter, id arg0, unsigned long arg1, BOOL * arg2); +typedef void (^_BlockingTrampoline_18)(void * waiter, id arg0, unsigned long arg1, BOOL * arg2); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_17 _1wx624s_wrapBlockingBlock_1p9ui4q( - _BlockingTrampoline_17 block, _BlockingTrampoline_17 listenerBlock, +_ListenerTrampoline_18 _1wx624s_wrapBlockingBlock_1p9ui4q( + _BlockingTrampoline_18 block, _BlockingTrampoline_18 listenerBlock, DOBJC_Context* ctx) NS_RETURNS_RETAINED { BLOCKING_BLOCK_IMPL(ctx, ^void(id arg0, unsigned long arg1, BOOL * arg2), { objc_retainBlock(block); @@ -584,19 +607,19 @@ _ListenerTrampoline_17 _1wx624s_wrapBlockingBlock_1p9ui4q( }); } -typedef void (^_ListenerTrampoline_18)(unsigned short * arg0, unsigned long arg1); +typedef void (^_ListenerTrampoline_19)(unsigned short * arg0, unsigned long arg1); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_18 _1wx624s_wrapListenerBlock_vhbh5h(_ListenerTrampoline_18 block) NS_RETURNS_RETAINED { +_ListenerTrampoline_19 _1wx624s_wrapListenerBlock_vhbh5h(_ListenerTrampoline_19 block) NS_RETURNS_RETAINED { return ^void(unsigned short * arg0, unsigned long arg1) { objc_retainBlock(block); block(arg0, arg1); }; } -typedef void (^_BlockingTrampoline_18)(void * waiter, unsigned short * arg0, unsigned long arg1); +typedef void (^_BlockingTrampoline_19)(void * waiter, unsigned short * arg0, unsigned long arg1); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_18 _1wx624s_wrapBlockingBlock_vhbh5h( - _BlockingTrampoline_18 block, _BlockingTrampoline_18 listenerBlock, +_ListenerTrampoline_19 _1wx624s_wrapBlockingBlock_vhbh5h( + _BlockingTrampoline_19 block, _BlockingTrampoline_19 listenerBlock, DOBJC_Context* ctx) NS_RETURNS_RETAINED { BLOCKING_BLOCK_IMPL(ctx, ^void(unsigned short * arg0, unsigned long arg1), { objc_retainBlock(block); diff --git a/pkgs/objective_c/tool/generate_code.dart b/pkgs/objective_c/tool/generate_code.dart index 197e13fc60..7df32ca9da 100644 --- a/pkgs/objective_c/tool/generate_code.dart +++ b/pkgs/objective_c/tool/generate_code.dart @@ -195,6 +195,12 @@ class RuntimeBindingsVisitor extends Visitor { } class CBindingsVisitor extends Visitor { + static const structs = { + '_ObjCBlockDesc', + '_ObjCBlockImpl', + '_ObjCObjectImpl', + }; + static const nonLeaf = { 'DOBJC_deleteFinalizableHandle', 'DOBJC_disposeObjCBlockWithClosure', @@ -237,9 +243,11 @@ class CBindingsVisitor extends Visitor { } else if (node.originalName == '_Dart_FinalizableHandle') { node.isIncluded = true; node.name = 'Dart_FinalizableHandle_'; - } else if (node.originalName.startsWith('_ObjC')) { + } else if (structs.contains(node.originalName)) { node.isIncluded = true; node.name = 'ObjC${node.originalName.substring(5)}'; + } else { + node.isIncluded = false; } } @@ -435,6 +443,8 @@ class ObjCBindingsVisitor extends Visitor { if (renamed != null) { node.isIncluded = true; node.name = renamed; + } else { + node.isIncluded = false; } if (node.originalName == 'NSBundle') { for (final method in node.methods) { @@ -452,6 +462,8 @@ class ObjCBindingsVisitor extends Visitor { if (renamed != null) { node.isIncluded = true; node.name = renamed; + } else { + node.isIncluded = false; } } @@ -466,6 +478,7 @@ class ObjCBindingsVisitor extends Visitor { @override void visitStruct(Struct node) { + node.dependencies = CompoundDependencies.opaque; if (node.originalName.isEmpty) { node.isIncluded = false; return; @@ -474,6 +487,8 @@ class ObjCBindingsVisitor extends Visitor { if (renamed != null) { node.isIncluded = true; node.name = renamed; + } else { + node.isIncluded = false; } } @@ -534,6 +549,9 @@ List writeBuiltInTypes(String out, String bindingsFile) { final genCategories = findBindings( RegExp(r'^extension (\w+) on \w+ {'), ).toList()..sort(); + final genAllExtensions = findBindings( + RegExp(r'^extension (?!type\b)([\w\$]+)'), + ).toSet(); final interfacesMap = { for (final name in genInterfaces) @@ -579,8 +597,13 @@ List writeBuiltInTypes(String out, String bindingsFile) { final anyRenames = map.entries.any((kv) => kv.key != kv.value); final elements = anyRenames - ? map.entries.map((kv) => " '${kv.key}': '${kv.value}',") - : map.keys.map((key) => " '$key',"); + ? map.entries.map( + (kv) => + " '${kv.key.replaceAll(r'$', r'\$')}': '${kv.value.replaceAll(r'$', r'\$')}',", + ) + : map.keys.map( + (key) => " '${key.replaceAll(r'$', r'\$')}',", + ); s.write(''' @@ -592,13 +615,15 @@ ${elements.join('\n')} writeDecls('objCBuiltInInterfaces', interfacesMap); exports.addAll([ - for (final name in interfacesMap.values) '$name\$Methods', + for (final name in interfacesMap.values) + if (genAllExtensions.contains('$name\$Methods')) '$name\$Methods', ]); writeDecls('objCBuiltInCompounds', structsMap); writeDecls('objCBuiltInEnums', {}, genEnums); writeDecls('objCBuiltInProtocols', protocolsMap); exports.addAll([ - for (final name in protocolsMap.values) '$name\$Methods', + for (final name in protocolsMap.values) + if (genAllExtensions.contains('$name\$Methods')) '$name\$Methods', ]); exports.addAll([ for (final name in protocolsMap.values) '$name\$Builder', @@ -693,10 +718,8 @@ Future run({required bool format}) async { root.resolve('src/protocol.h'), ], ), - structs: const Structs(dependencies: CompoundDependencies.opaque), objectiveC: const ObjectiveC( generateForPackageObjectiveC: true, - categories: Categories(includeTransitive: false), ), visitors: [const ObjCBindingsVisitor()], output: Output( From e1fb622dbc37948e0150c72fb6aeafef9f71cf3e Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Thu, 30 Jul 2026 16:47:00 +1000 Subject: [PATCH 15/37] bug fixes --- .../lib/generated/a_shared_b_gen.dart | 13 - .../objc_built_in_functions.dart | 6 + .../lib/src/code_generator/objc_category.dart | 1 + .../lib/src/config_provider/config.dart | 4 + .../lib/src/config_provider/yaml_config.dart | 28 +- .../type_extractor/extractor.dart | 4 + ...expected_opaque_dependencies_bindings.dart | 48 +- .../_expected_typedef_bindings.dart | 9 +- .../_expected_cjson_bindings.dart | 1295 ++ .../_expected_sqlite_bindings.dart | 14427 ++++++++++++++++ .../large_integration_tests/large_test.dart | 3 +- .../bad_method_test_bindings.dart | 3 + .../bad_override_test_bindings.dart | 3 + .../block_annotation_test_bindings.dart | 675 +- .../block_inherit_test_bindings.dart | 3 + .../native_objc_test/block_test_bindings.dart | 661 +- .../native_objc_test/cast_test_bindings.dart | 3 + .../category_test_bindings.dart | 599 +- .../native_objc_test/enum_test_bindings.dart | 3 + .../error_method_test_bindings.dart | 3 + .../failed_to_load_test_bindings.dart | 3 + .../forward_decl_test_bindings.dart | 3 + .../inherited_instancetype_test_bindings.dart | 3 + .../is_instance_test_bindings.dart | 3 + .../native_objc_test/log_test_bindings.dart | 3 + .../method_test_bindings.dart | 3 + .../native_objc_test_bindings.dart | 3 + .../nullable_inheritance_test_bindings.dart | 3 + .../nullable_test_bindings.dart | 3 + .../property_test_bindings.dart | 3 + .../rename_test_bindings.dart | 3 + .../runtime_version_test_bindings.dart | 3 + .../sdk_variable_test_bindings.dart | 3 + .../string_test_bindings.dart | 3 + .../typedef_test_bindings.dart | 3 + pkgs/ffigen/tool/check_sorted_bindings.dart | 286 + 36 files changed, 16127 insertions(+), 1995 deletions(-) create mode 100644 pkgs/ffigen/tool/check_sorted_bindings.dart diff --git a/pkgs/ffigen/example/shared_bindings/lib/generated/a_shared_b_gen.dart b/pkgs/ffigen/example/shared_bindings/lib/generated/a_shared_b_gen.dart index a718f8a86d..52838f927b 100644 --- a/pkgs/ffigen/example/shared_bindings/lib/generated/a_shared_b_gen.dart +++ b/pkgs/ffigen/example/shared_bindings/lib/generated/a_shared_b_gen.dart @@ -80,19 +80,6 @@ class NativeLibraryASharedB { ); late final _a_func5 = _a_func5Ptr .asFunction(); - - void base_func1(imp$1.BaseTypedef1 t1, imp$1.BaseTypedef2 t2) { - return _base_func1(t1, t2); - } - - late final _base_func1Ptr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(imp$1.BaseTypedef1, imp$1.BaseTypedef2) - > - >('base_func1'); - late final _base_func1 = _base_func1Ptr - .asFunction(); } enum A_Enum { 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 a910f964c7..8b85a243c2 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 @@ -346,6 +346,9 @@ final $name = $getClass("$lookupName", () => $address.cast()); return BindingString(type: BindingStringType.global, string: s); } + @override + bool get hasNativeHelperFunctions => true; + @override void visitChildren(Visitor visitor) { super.visitChildren(visitor); @@ -375,6 +378,9 @@ class ObjCProtocolGlobal extends NoLookUpBinding { isInternal: true, ); + @override + bool get hasNativeHelperFunctions => true; + @override BindingString toBindingString(Writer w) { final context = w.context; diff --git a/pkgs/ffigen/lib/src/code_generator/objc_category.dart b/pkgs/ffigen/lib/src/code_generator/objc_category.dart index 296c5089af..f5fc47251a 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_category.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_category.dart @@ -49,6 +49,7 @@ class ObjCCategory extends NoLookUpBinding with ObjCMethods, HasLocalScope { @override BindingString toBindingString(Writer w) { + if (isObjCImport) return BindingString(type: BindingStringType.objcCategory, string: ''); final s = StringBuffer(); s.write('\n'); s.write(makeDartDoc(dartDoc)); diff --git a/pkgs/ffigen/lib/src/config_provider/config.dart b/pkgs/ffigen/lib/src/config_provider/config.dart index 6f757e1a39..7b794bb292 100644 --- a/pkgs/ffigen/lib/src/config_provider/config.dart +++ b/pkgs/ffigen/lib/src/config_provider/config.dart @@ -61,6 +61,9 @@ final class FfiGenerator { ) final List libraryImports; + /// Custom type mappings for typedefs. + final Map typedefTypeMappings; + /// Path to the clang library. /// /// Only visible for YamlConfig plumbing. @@ -84,6 +87,7 @@ final class FfiGenerator { 'https://github.com/dart-lang/native/issues/2597.', ) this.libraryImports = const [], + this.typedefTypeMappings = const {}, @Deprecated('Only visible for YamlConfig plumbing.') this.libclangDylib, }); diff --git a/pkgs/ffigen/lib/src/config_provider/yaml_config.dart b/pkgs/ffigen/lib/src/config_provider/yaml_config.dart index 6bb912b728..4a949a4fbf 100644 --- a/pkgs/ffigen/lib/src/config_provider/yaml_config.dart +++ b/pkgs/ffigen/lib/src/config_provider/yaml_config.dart @@ -1187,6 +1187,8 @@ final class YamlConfig { FfiGenerator configAdapter() { final yamlVisitor = YamlConfigAstVisitor( + usrTypeMappings: _usrTypeMappings, + typedefTypeMappings: _typedefTypeMappings, functionDecl: _functionDecl, structDecl: _structDecl, unionDecl: _unionDecl, @@ -1234,6 +1236,7 @@ final class YamlConfig { ), ), functions: Functions(varArgs: varArgFunctions), + typedefTypeMappings: _typedefTypeMappings, objectiveC: language == Language.objc ? ObjectiveC( externalVersions: externalVersions, @@ -1252,6 +1255,8 @@ final class YamlConfig { } final class YamlConfigAstVisitor extends public_ast.Visitor { + final Map _usrTypeMappings; + final Map _typedefTypeMappings; final YamlDeclarationFilters _functionDecl; final YamlDeclarationFilters _structDecl; final YamlDeclarationFilters _unionDecl; @@ -1275,6 +1280,8 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { final bool _useSupportedTypedefs; YamlConfigAstVisitor({ + required Map usrTypeMappings, + required Map typedefTypeMappings, required YamlDeclarationFilters functionDecl, required YamlDeclarationFilters structDecl, required YamlDeclarationFilters unionDecl, @@ -1297,7 +1304,9 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { required CompoundDependencies unionDependencies, required bool includeUnusedTypedefs, required bool useSupportedTypedefs, - }) : _functionDecl = functionDecl, + }) : _usrTypeMappings = usrTypeMappings, + _typedefTypeMappings = typedefTypeMappings, + _functionDecl = functionDecl, _structDecl = structDecl, _unionDecl = unionDecl, _enumClassDecl = enumClassDecl, @@ -1323,16 +1332,12 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { final bool _silenceEnumWarning; void _applyInclusion(public_ast.Decl node, YamlDeclarationFilters decl) { - if (decl.isExplicitlyIncluded(node.originalName)) { - node.isIncluded = true; - } else if (decl.isExplicitlyExcluded(node.originalName)) { - node.isIncluded = false; - } else if (decl.excludeAllByDefault) { + if (node is public_ast.ObjCInterface && node.isObjCImport) { node.isIncluded = false; - } else if (node is public_ast.ObjCInterface && node.isObjCImport) { + } else if (_usrTypeMappings.containsKey(node.usr)) { node.isIncluded = false; } else { - node.isIncluded = true; + node.isIncluded = decl.shouldInclude(node.originalName); } } @@ -1488,7 +1493,11 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { void visitTypealias(public_ast.Typealias node) { node.includeUnused = _includeUnusedTypedefs; node.useSupportedTypedefs = _useSupportedTypedefs; - _applyInclusion(node, _typedefs); + if (_typedefTypeMappings.containsKey(node.originalName)) { + node.isIncluded = false; + } else { + _applyInclusion(node, _typedefs); + } final renamed = _typedefs.rename(node.originalName); if (renamed != node.originalName) { node.name = renamed; @@ -1577,6 +1586,7 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { node.isIncluded = false; } else if (isParentInterfaceIncluded) { // Category extends an explicitly included interface with includeCategories=true. + node.isIncluded = true; } else if (_objcCategories.excludeAllByDefault) { node.isIncluded = false; } else { diff --git a/pkgs/ffigen/lib/src/header_parser/type_extractor/extractor.dart b/pkgs/ffigen/lib/src/header_parser/type_extractor/extractor.dart index 11edb411d1..c77f57056f 100644 --- a/pkgs/ffigen/lib/src/header_parser/type_extractor/extractor.dart +++ b/pkgs/ffigen/lib/src/header_parser/type_extractor/extractor.dart @@ -181,6 +181,10 @@ Type? _createTypeFromCursor( // those two types are ABI compatible, so just return bool regardless. return BooleanType(); } + if (config.typedefTypeMappings.containsKey(spelling)) { + logger.fine(' Type Mapped from custom typedefTypeMappings'); + return config.typedefTypeMappings[spelling]!; + } // Get name from supported typedef name if config allows. if (suportedTypedefToSuportedNativeType.containsKey(spelling)) { logger.fine(' Type Mapped from supported typedef'); diff --git a/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_opaque_dependencies_bindings.dart b/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_opaque_dependencies_bindings.dart index 5e92b96c3a..cba416d5f9 100644 --- a/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_opaque_dependencies_bindings.dart +++ b/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_opaque_dependencies_bindings.dart @@ -42,38 +42,13 @@ class NativeLibrary { .asFunction Function(ffi.Pointer)>(); } -final class A extends ffi.Struct { - @ffi.Int() - external int a; - - static ffi.Pointer
$allocate(ffi.Allocator $allocator, {required int a}) => - $allocator()..ref.a = a; -} - -final class B extends ffi.Struct { - @ffi.Int() - external int a; +final class A extends ffi.Opaque {} - static ffi.Pointer $allocate(ffi.Allocator $allocator, {required int a}) => - $allocator()..ref.a = a; -} +final class B extends ffi.Opaque {} typedef BAlias = B; -final class C extends ffi.Struct { - @ffi.Int() - external int a; - - external ffi.Pointer nds; - - static ffi.Pointer $allocate( - ffi.Allocator $allocator, { - required int a, - required ffi.Pointer nds, - }) => $allocator() - ..ref.a = a - ..ref.nds = nds; -} +final class C extends ffi.Opaque {} final class D extends ffi.Struct { @ffi.Int() @@ -114,24 +89,13 @@ final class E extends ffi.Struct { external ffi.Array dArray; } -final class NoDefinitionStructInC extends ffi.Opaque {} - final class NoDefinitionStructInD extends ffi.Opaque {} -final class UA extends ffi.Union { - @ffi.Int() - external int a; -} +final class UA extends ffi.Opaque {} -final class UB extends ffi.Union { - @ffi.Int() - external int a; -} +final class UB extends ffi.Opaque {} -final class UC extends ffi.Union { - @ffi.Int() - external int a; -} +final class UC extends ffi.Opaque {} final class UD extends ffi.Union { @ffi.Int() diff --git a/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_typedef_bindings.dart b/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_typedef_bindings.dart index edb6c0de4e..7d2414c949 100644 --- a/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_typedef_bindings.dart +++ b/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_typedef_bindings.dart @@ -61,9 +61,7 @@ class Bindings { late final _func3Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(SpecifiedTypeAsIntPtr, NestingASpecifiedType) - > + ffi.NativeFunction >('func3'); late final _func3 = _func3Ptr.asFunction(); @@ -103,9 +101,8 @@ typedef NamedFunctionProto = typedef NamedFunctionProtoFunction = ffi.Void Function(); typedef DartNamedFunctionProtoFunction = void Function(); typedef NamedStructInTypedef = _NamedStructInTypedef; -typedef NestingASpecifiedType = SpecifiedTypeAsIntPtr; -typedef SpecifiedTypeAsIntPtr = ffi.Char; -typedef DartSpecifiedTypeAsIntPtr = int; +typedef NestingASpecifiedType = ffi.IntPtr; +typedef DartNestingASpecifiedType = int; final class Struct1 extends ffi.Struct { external NamedFunctionProto named; diff --git a/pkgs/ffigen/test/large_integration_tests/_expected_cjson_bindings.dart b/pkgs/ffigen/test/large_integration_tests/_expected_cjson_bindings.dart index dc0a0df2be..b2e87d134f 100644 --- a/pkgs/ffigen/test/large_integration_tests/_expected_cjson_bindings.dart +++ b/pkgs/ffigen/test/large_integration_tests/_expected_cjson_bindings.dart @@ -2,3 +2,1298 @@ // // Generated by `package:ffigen`. // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package +import 'dart:ffi' as ffi; + +/// Bindings to Cjson. +class CJson { + /// Holds the symbol lookup function. + final ffi.Pointer Function(String symbolName) + _lookup; + + /// The symbols are looked up in [dynamicLibrary]. + CJson(ffi.DynamicLibrary dynamicLibrary) : _lookup = dynamicLibrary.lookup; + + /// The symbols are looked up with [lookup]. + CJson.fromLookup( + ffi.Pointer Function(String symbolName) lookup, + ) : _lookup = lookup; + + ffi.Pointer cJSON_AddArrayToObject( + ffi.Pointer object, + ffi.Pointer name, + ) { + return _cJSON_AddArrayToObject(object, name); + } + + late final _cJSON_AddArrayToObjectPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer) + > + >('cJSON_AddArrayToObject'); + late final _cJSON_AddArrayToObject = _cJSON_AddArrayToObjectPtr + .asFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer) + >(); + + ffi.Pointer cJSON_AddBoolToObject( + ffi.Pointer object, + ffi.Pointer name, + int boolean, + ) { + return _cJSON_AddBoolToObject(object, name, boolean); + } + + late final _cJSON_AddBoolToObjectPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + cJSON_bool, + ) + > + >('cJSON_AddBoolToObject'); + late final _cJSON_AddBoolToObject = _cJSON_AddBoolToObjectPtr + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ) + >(); + + ffi.Pointer cJSON_AddFalseToObject( + ffi.Pointer object, + ffi.Pointer name, + ) { + return _cJSON_AddFalseToObject(object, name); + } + + late final _cJSON_AddFalseToObjectPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer) + > + >('cJSON_AddFalseToObject'); + late final _cJSON_AddFalseToObject = _cJSON_AddFalseToObjectPtr + .asFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer) + >(); + + void cJSON_AddItemReferenceToArray( + ffi.Pointer array, + ffi.Pointer item, + ) { + return _cJSON_AddItemReferenceToArray(array, item); + } + + late final _cJSON_AddItemReferenceToArrayPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer) + > + >('cJSON_AddItemReferenceToArray'); + late final _cJSON_AddItemReferenceToArray = _cJSON_AddItemReferenceToArrayPtr + .asFunction, ffi.Pointer)>(); + + void cJSON_AddItemReferenceToObject( + ffi.Pointer object, + ffi.Pointer string, + ffi.Pointer item, + ) { + return _cJSON_AddItemReferenceToObject(object, string, item); + } + + late final _cJSON_AddItemReferenceToObjectPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >('cJSON_AddItemReferenceToObject'); + late final _cJSON_AddItemReferenceToObject = + _cJSON_AddItemReferenceToObjectPtr + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); + + void cJSON_AddItemToArray(ffi.Pointer array, ffi.Pointer item) { + return _cJSON_AddItemToArray(array, item); + } + + late final _cJSON_AddItemToArrayPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer) + > + >('cJSON_AddItemToArray'); + late final _cJSON_AddItemToArray = _cJSON_AddItemToArrayPtr + .asFunction, ffi.Pointer)>(); + + void cJSON_AddItemToObject( + ffi.Pointer object, + ffi.Pointer string, + ffi.Pointer item, + ) { + return _cJSON_AddItemToObject(object, string, item); + } + + late final _cJSON_AddItemToObjectPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >('cJSON_AddItemToObject'); + late final _cJSON_AddItemToObject = _cJSON_AddItemToObjectPtr + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); + + void cJSON_AddItemToObjectCS( + ffi.Pointer object, + ffi.Pointer string, + ffi.Pointer item, + ) { + return _cJSON_AddItemToObjectCS(object, string, item); + } + + late final _cJSON_AddItemToObjectCSPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >('cJSON_AddItemToObjectCS'); + late final _cJSON_AddItemToObjectCS = _cJSON_AddItemToObjectCSPtr + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); + + ffi.Pointer cJSON_AddNullToObject( + ffi.Pointer object, + ffi.Pointer name, + ) { + return _cJSON_AddNullToObject(object, name); + } + + late final _cJSON_AddNullToObjectPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer) + > + >('cJSON_AddNullToObject'); + late final _cJSON_AddNullToObject = _cJSON_AddNullToObjectPtr + .asFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer) + >(); + + ffi.Pointer cJSON_AddNumberToObject( + ffi.Pointer object, + ffi.Pointer name, + double number, + ) { + return _cJSON_AddNumberToObject(object, name, number); + } + + late final _cJSON_AddNumberToObjectPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ) + > + >('cJSON_AddNumberToObject'); + late final _cJSON_AddNumberToObject = _cJSON_AddNumberToObjectPtr + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + double, + ) + >(); + + ffi.Pointer cJSON_AddObjectToObject( + ffi.Pointer object, + ffi.Pointer name, + ) { + return _cJSON_AddObjectToObject(object, name); + } + + late final _cJSON_AddObjectToObjectPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer) + > + >('cJSON_AddObjectToObject'); + late final _cJSON_AddObjectToObject = _cJSON_AddObjectToObjectPtr + .asFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer) + >(); + + ffi.Pointer cJSON_AddRawToObject( + ffi.Pointer object, + ffi.Pointer name, + ffi.Pointer raw, + ) { + return _cJSON_AddRawToObject(object, name, raw); + } + + late final _cJSON_AddRawToObjectPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >('cJSON_AddRawToObject'); + late final _cJSON_AddRawToObject = _cJSON_AddRawToObjectPtr + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); + + ffi.Pointer cJSON_AddStringToObject( + ffi.Pointer object, + ffi.Pointer name, + ffi.Pointer string, + ) { + return _cJSON_AddStringToObject(object, name, string); + } + + late final _cJSON_AddStringToObjectPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >('cJSON_AddStringToObject'); + late final _cJSON_AddStringToObject = _cJSON_AddStringToObjectPtr + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); + + ffi.Pointer cJSON_AddTrueToObject( + ffi.Pointer object, + ffi.Pointer name, + ) { + return _cJSON_AddTrueToObject(object, name); + } + + late final _cJSON_AddTrueToObjectPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer) + > + >('cJSON_AddTrueToObject'); + late final _cJSON_AddTrueToObject = _cJSON_AddTrueToObjectPtr + .asFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer) + >(); + + int cJSON_Compare( + ffi.Pointer a, + ffi.Pointer b, + int case_sensitive, + ) { + return _cJSON_Compare(a, b, case_sensitive); + } + + late final _cJSON_ComparePtr = + _lookup< + ffi.NativeFunction< + cJSON_bool Function( + ffi.Pointer, + ffi.Pointer, + cJSON_bool, + ) + > + >('cJSON_Compare'); + late final _cJSON_Compare = _cJSON_ComparePtr + .asFunction, ffi.Pointer, int)>(); + + ffi.Pointer cJSON_CreateArray() { + return _cJSON_CreateArray(); + } + + late final _cJSON_CreateArrayPtr = + _lookup Function()>>( + 'cJSON_CreateArray', + ); + late final _cJSON_CreateArray = _cJSON_CreateArrayPtr + .asFunction Function()>(); + + ffi.Pointer cJSON_CreateArrayReference(ffi.Pointer child) { + return _cJSON_CreateArrayReference(child); + } + + late final _cJSON_CreateArrayReferencePtr = + _lookup< + ffi.NativeFunction Function(ffi.Pointer)> + >('cJSON_CreateArrayReference'); + late final _cJSON_CreateArrayReference = _cJSON_CreateArrayReferencePtr + .asFunction Function(ffi.Pointer)>(); + + ffi.Pointer cJSON_CreateBool(int boolean) { + return _cJSON_CreateBool(boolean); + } + + late final _cJSON_CreateBoolPtr = + _lookup Function(cJSON_bool)>>( + 'cJSON_CreateBool', + ); + late final _cJSON_CreateBool = _cJSON_CreateBoolPtr + .asFunction Function(int)>(); + + ffi.Pointer cJSON_CreateDoubleArray( + ffi.Pointer numbers, + int count, + ) { + return _cJSON_CreateDoubleArray(numbers, count); + } + + late final _cJSON_CreateDoubleArrayPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Int) + > + >('cJSON_CreateDoubleArray'); + late final _cJSON_CreateDoubleArray = _cJSON_CreateDoubleArrayPtr + .asFunction Function(ffi.Pointer, int)>(); + + ffi.Pointer cJSON_CreateFalse() { + return _cJSON_CreateFalse(); + } + + late final _cJSON_CreateFalsePtr = + _lookup Function()>>( + 'cJSON_CreateFalse', + ); + late final _cJSON_CreateFalse = _cJSON_CreateFalsePtr + .asFunction Function()>(); + + ffi.Pointer cJSON_CreateFloatArray( + ffi.Pointer numbers, + int count, + ) { + return _cJSON_CreateFloatArray(numbers, count); + } + + late final _cJSON_CreateFloatArrayPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Int) + > + >('cJSON_CreateFloatArray'); + late final _cJSON_CreateFloatArray = _cJSON_CreateFloatArrayPtr + .asFunction Function(ffi.Pointer, int)>(); + + ffi.Pointer cJSON_CreateIntArray( + ffi.Pointer numbers, + int count, + ) { + return _cJSON_CreateIntArray(numbers, count); + } + + late final _cJSON_CreateIntArrayPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Int) + > + >('cJSON_CreateIntArray'); + late final _cJSON_CreateIntArray = _cJSON_CreateIntArrayPtr + .asFunction Function(ffi.Pointer, int)>(); + + ffi.Pointer cJSON_CreateNull() { + return _cJSON_CreateNull(); + } + + late final _cJSON_CreateNullPtr = + _lookup Function()>>( + 'cJSON_CreateNull', + ); + late final _cJSON_CreateNull = _cJSON_CreateNullPtr + .asFunction Function()>(); + + ffi.Pointer cJSON_CreateNumber(double num) { + return _cJSON_CreateNumber(num); + } + + late final _cJSON_CreateNumberPtr = + _lookup Function(ffi.Double)>>( + 'cJSON_CreateNumber', + ); + late final _cJSON_CreateNumber = _cJSON_CreateNumberPtr + .asFunction Function(double)>(); + + ffi.Pointer cJSON_CreateObject() { + return _cJSON_CreateObject(); + } + + late final _cJSON_CreateObjectPtr = + _lookup Function()>>( + 'cJSON_CreateObject', + ); + late final _cJSON_CreateObject = _cJSON_CreateObjectPtr + .asFunction Function()>(); + + ffi.Pointer cJSON_CreateObjectReference(ffi.Pointer child) { + return _cJSON_CreateObjectReference(child); + } + + late final _cJSON_CreateObjectReferencePtr = + _lookup< + ffi.NativeFunction Function(ffi.Pointer)> + >('cJSON_CreateObjectReference'); + late final _cJSON_CreateObjectReference = _cJSON_CreateObjectReferencePtr + .asFunction Function(ffi.Pointer)>(); + + ffi.Pointer cJSON_CreateRaw(ffi.Pointer raw) { + return _cJSON_CreateRaw(raw); + } + + late final _cJSON_CreateRawPtr = + _lookup< + ffi.NativeFunction Function(ffi.Pointer)> + >('cJSON_CreateRaw'); + late final _cJSON_CreateRaw = _cJSON_CreateRawPtr + .asFunction Function(ffi.Pointer)>(); + + ffi.Pointer cJSON_CreateString(ffi.Pointer string) { + return _cJSON_CreateString(string); + } + + late final _cJSON_CreateStringPtr = + _lookup< + ffi.NativeFunction Function(ffi.Pointer)> + >('cJSON_CreateString'); + late final _cJSON_CreateString = _cJSON_CreateStringPtr + .asFunction Function(ffi.Pointer)>(); + + ffi.Pointer cJSON_CreateStringArray( + ffi.Pointer> strings, + int count, + ) { + return _cJSON_CreateStringArray(strings, count); + } + + late final _cJSON_CreateStringArrayPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer>, + ffi.Int, + ) + > + >('cJSON_CreateStringArray'); + late final _cJSON_CreateStringArray = _cJSON_CreateStringArrayPtr + .asFunction< + ffi.Pointer Function(ffi.Pointer>, int) + >(); + + ffi.Pointer cJSON_CreateStringReference(ffi.Pointer string) { + return _cJSON_CreateStringReference(string); + } + + late final _cJSON_CreateStringReferencePtr = + _lookup< + ffi.NativeFunction Function(ffi.Pointer)> + >('cJSON_CreateStringReference'); + late final _cJSON_CreateStringReference = _cJSON_CreateStringReferencePtr + .asFunction Function(ffi.Pointer)>(); + + ffi.Pointer cJSON_CreateTrue() { + return _cJSON_CreateTrue(); + } + + late final _cJSON_CreateTruePtr = + _lookup Function()>>( + 'cJSON_CreateTrue', + ); + late final _cJSON_CreateTrue = _cJSON_CreateTruePtr + .asFunction Function()>(); + + void cJSON_Delete(ffi.Pointer item) { + return _cJSON_Delete(item); + } + + late final _cJSON_DeletePtr = + _lookup)>>( + 'cJSON_Delete', + ); + late final _cJSON_Delete = _cJSON_DeletePtr + .asFunction)>(); + + void cJSON_DeleteItemFromArray(ffi.Pointer array, int which) { + return _cJSON_DeleteItemFromArray(array, which); + } + + late final _cJSON_DeleteItemFromArrayPtr = + _lookup< + ffi.NativeFunction, ffi.Int)> + >('cJSON_DeleteItemFromArray'); + late final _cJSON_DeleteItemFromArray = _cJSON_DeleteItemFromArrayPtr + .asFunction, int)>(); + + void cJSON_DeleteItemFromObject( + ffi.Pointer object, + ffi.Pointer string, + ) { + return _cJSON_DeleteItemFromObject(object, string); + } + + late final _cJSON_DeleteItemFromObjectPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer) + > + >('cJSON_DeleteItemFromObject'); + late final _cJSON_DeleteItemFromObject = _cJSON_DeleteItemFromObjectPtr + .asFunction, ffi.Pointer)>(); + + void cJSON_DeleteItemFromObjectCaseSensitive( + ffi.Pointer object, + ffi.Pointer string, + ) { + return _cJSON_DeleteItemFromObjectCaseSensitive(object, string); + } + + late final _cJSON_DeleteItemFromObjectCaseSensitivePtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer) + > + >('cJSON_DeleteItemFromObjectCaseSensitive'); + late final _cJSON_DeleteItemFromObjectCaseSensitive = + _cJSON_DeleteItemFromObjectCaseSensitivePtr + .asFunction< + void Function(ffi.Pointer, ffi.Pointer) + >(); + + ffi.Pointer cJSON_DetachItemFromArray( + ffi.Pointer array, + int which, + ) { + return _cJSON_DetachItemFromArray(array, which); + } + + late final _cJSON_DetachItemFromArrayPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Int) + > + >('cJSON_DetachItemFromArray'); + late final _cJSON_DetachItemFromArray = _cJSON_DetachItemFromArrayPtr + .asFunction Function(ffi.Pointer, int)>(); + + ffi.Pointer cJSON_DetachItemFromObject( + ffi.Pointer object, + ffi.Pointer string, + ) { + return _cJSON_DetachItemFromObject(object, string); + } + + late final _cJSON_DetachItemFromObjectPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer) + > + >('cJSON_DetachItemFromObject'); + late final _cJSON_DetachItemFromObject = _cJSON_DetachItemFromObjectPtr + .asFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer) + >(); + + ffi.Pointer cJSON_DetachItemFromObjectCaseSensitive( + ffi.Pointer object, + ffi.Pointer string, + ) { + return _cJSON_DetachItemFromObjectCaseSensitive(object, string); + } + + late final _cJSON_DetachItemFromObjectCaseSensitivePtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer) + > + >('cJSON_DetachItemFromObjectCaseSensitive'); + late final _cJSON_DetachItemFromObjectCaseSensitive = + _cJSON_DetachItemFromObjectCaseSensitivePtr + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); + + ffi.Pointer cJSON_DetachItemViaPointer( + ffi.Pointer parent, + ffi.Pointer item, + ) { + return _cJSON_DetachItemViaPointer(parent, item); + } + + late final _cJSON_DetachItemViaPointerPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer) + > + >('cJSON_DetachItemViaPointer'); + late final _cJSON_DetachItemViaPointer = _cJSON_DetachItemViaPointerPtr + .asFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer) + >(); + + ffi.Pointer cJSON_Duplicate(ffi.Pointer item, int recurse) { + return _cJSON_Duplicate(item, recurse); + } + + late final _cJSON_DuplicatePtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, cJSON_bool) + > + >('cJSON_Duplicate'); + late final _cJSON_Duplicate = _cJSON_DuplicatePtr + .asFunction Function(ffi.Pointer, int)>(); + + ffi.Pointer cJSON_GetArrayItem(ffi.Pointer array, int index) { + return _cJSON_GetArrayItem(array, index); + } + + late final _cJSON_GetArrayItemPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Int) + > + >('cJSON_GetArrayItem'); + late final _cJSON_GetArrayItem = _cJSON_GetArrayItemPtr + .asFunction Function(ffi.Pointer, int)>(); + + int cJSON_GetArraySize(ffi.Pointer array) { + return _cJSON_GetArraySize(array); + } + + late final _cJSON_GetArraySizePtr = + _lookup)>>( + 'cJSON_GetArraySize', + ); + late final _cJSON_GetArraySize = _cJSON_GetArraySizePtr + .asFunction)>(); + + ffi.Pointer cJSON_GetErrorPtr() { + return _cJSON_GetErrorPtr(); + } + + late final _cJSON_GetErrorPtrPtr = + _lookup Function()>>( + 'cJSON_GetErrorPtr', + ); + late final _cJSON_GetErrorPtr = _cJSON_GetErrorPtrPtr + .asFunction Function()>(); + + ffi.Pointer cJSON_GetObjectItem( + ffi.Pointer object, + ffi.Pointer string, + ) { + return _cJSON_GetObjectItem(object, string); + } + + late final _cJSON_GetObjectItemPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer) + > + >('cJSON_GetObjectItem'); + late final _cJSON_GetObjectItem = _cJSON_GetObjectItemPtr + .asFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer) + >(); + + ffi.Pointer cJSON_GetObjectItemCaseSensitive( + ffi.Pointer object, + ffi.Pointer string, + ) { + return _cJSON_GetObjectItemCaseSensitive(object, string); + } + + late final _cJSON_GetObjectItemCaseSensitivePtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer) + > + >('cJSON_GetObjectItemCaseSensitive'); + late final _cJSON_GetObjectItemCaseSensitive = + _cJSON_GetObjectItemCaseSensitivePtr + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); + + ffi.Pointer cJSON_GetStringValue(ffi.Pointer item) { + return _cJSON_GetStringValue(item); + } + + late final _cJSON_GetStringValuePtr = + _lookup< + ffi.NativeFunction Function(ffi.Pointer)> + >('cJSON_GetStringValue'); + late final _cJSON_GetStringValue = _cJSON_GetStringValuePtr + .asFunction Function(ffi.Pointer)>(); + + int cJSON_HasObjectItem( + ffi.Pointer object, + ffi.Pointer string, + ) { + return _cJSON_HasObjectItem(object, string); + } + + late final _cJSON_HasObjectItemPtr = + _lookup< + ffi.NativeFunction< + cJSON_bool Function(ffi.Pointer, ffi.Pointer) + > + >('cJSON_HasObjectItem'); + late final _cJSON_HasObjectItem = _cJSON_HasObjectItemPtr + .asFunction, ffi.Pointer)>(); + + void cJSON_InitHooks(ffi.Pointer hooks) { + return _cJSON_InitHooks(hooks); + } + + late final _cJSON_InitHooksPtr = + _lookup)>>( + 'cJSON_InitHooks', + ); + late final _cJSON_InitHooks = _cJSON_InitHooksPtr + .asFunction)>(); + + void cJSON_InsertItemInArray( + ffi.Pointer array, + int which, + ffi.Pointer newitem, + ) { + return _cJSON_InsertItemInArray(array, which, newitem); + } + + late final _cJSON_InsertItemInArrayPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Int, ffi.Pointer) + > + >('cJSON_InsertItemInArray'); + late final _cJSON_InsertItemInArray = _cJSON_InsertItemInArrayPtr + .asFunction, int, ffi.Pointer)>(); + + int cJSON_IsArray(ffi.Pointer item) { + return _cJSON_IsArray(item); + } + + late final _cJSON_IsArrayPtr = + _lookup)>>( + 'cJSON_IsArray', + ); + late final _cJSON_IsArray = _cJSON_IsArrayPtr + .asFunction)>(); + + int cJSON_IsBool(ffi.Pointer item) { + return _cJSON_IsBool(item); + } + + late final _cJSON_IsBoolPtr = + _lookup)>>( + 'cJSON_IsBool', + ); + late final _cJSON_IsBool = _cJSON_IsBoolPtr + .asFunction)>(); + + int cJSON_IsFalse(ffi.Pointer item) { + return _cJSON_IsFalse(item); + } + + late final _cJSON_IsFalsePtr = + _lookup)>>( + 'cJSON_IsFalse', + ); + late final _cJSON_IsFalse = _cJSON_IsFalsePtr + .asFunction)>(); + + int cJSON_IsInvalid(ffi.Pointer item) { + return _cJSON_IsInvalid(item); + } + + late final _cJSON_IsInvalidPtr = + _lookup)>>( + 'cJSON_IsInvalid', + ); + late final _cJSON_IsInvalid = _cJSON_IsInvalidPtr + .asFunction)>(); + + int cJSON_IsNull(ffi.Pointer item) { + return _cJSON_IsNull(item); + } + + late final _cJSON_IsNullPtr = + _lookup)>>( + 'cJSON_IsNull', + ); + late final _cJSON_IsNull = _cJSON_IsNullPtr + .asFunction)>(); + + int cJSON_IsNumber(ffi.Pointer item) { + return _cJSON_IsNumber(item); + } + + late final _cJSON_IsNumberPtr = + _lookup)>>( + 'cJSON_IsNumber', + ); + late final _cJSON_IsNumber = _cJSON_IsNumberPtr + .asFunction)>(); + + int cJSON_IsObject(ffi.Pointer item) { + return _cJSON_IsObject(item); + } + + late final _cJSON_IsObjectPtr = + _lookup)>>( + 'cJSON_IsObject', + ); + late final _cJSON_IsObject = _cJSON_IsObjectPtr + .asFunction)>(); + + int cJSON_IsRaw(ffi.Pointer item) { + return _cJSON_IsRaw(item); + } + + late final _cJSON_IsRawPtr = + _lookup)>>( + 'cJSON_IsRaw', + ); + late final _cJSON_IsRaw = _cJSON_IsRawPtr + .asFunction)>(); + + int cJSON_IsString(ffi.Pointer item) { + return _cJSON_IsString(item); + } + + late final _cJSON_IsStringPtr = + _lookup)>>( + 'cJSON_IsString', + ); + late final _cJSON_IsString = _cJSON_IsStringPtr + .asFunction)>(); + + int cJSON_IsTrue(ffi.Pointer item) { + return _cJSON_IsTrue(item); + } + + late final _cJSON_IsTruePtr = + _lookup)>>( + 'cJSON_IsTrue', + ); + late final _cJSON_IsTrue = _cJSON_IsTruePtr + .asFunction)>(); + + void cJSON_Minify(ffi.Pointer json) { + return _cJSON_Minify(json); + } + + late final _cJSON_MinifyPtr = + _lookup)>>( + 'cJSON_Minify', + ); + late final _cJSON_Minify = _cJSON_MinifyPtr + .asFunction)>(); + + ffi.Pointer cJSON_Parse(ffi.Pointer value) { + return _cJSON_Parse(value); + } + + late final _cJSON_ParsePtr = + _lookup< + ffi.NativeFunction Function(ffi.Pointer)> + >('cJSON_Parse'); + late final _cJSON_Parse = _cJSON_ParsePtr + .asFunction Function(ffi.Pointer)>(); + + ffi.Pointer cJSON_ParseWithOpts( + ffi.Pointer value, + ffi.Pointer> return_parse_end, + int require_null_terminated, + ) { + return _cJSON_ParseWithOpts( + value, + return_parse_end, + require_null_terminated, + ); + } + + late final _cJSON_ParseWithOptsPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer>, + cJSON_bool, + ) + > + >('cJSON_ParseWithOpts'); + late final _cJSON_ParseWithOpts = _cJSON_ParseWithOptsPtr + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer>, + int, + ) + >(); + + ffi.Pointer cJSON_Print(ffi.Pointer item) { + return _cJSON_Print(item); + } + + late final _cJSON_PrintPtr = + _lookup< + ffi.NativeFunction Function(ffi.Pointer)> + >('cJSON_Print'); + late final _cJSON_Print = _cJSON_PrintPtr + .asFunction Function(ffi.Pointer)>(); + + ffi.Pointer cJSON_PrintBuffered( + ffi.Pointer item, + int prebuffer, + int fmt, + ) { + return _cJSON_PrintBuffered(item, prebuffer, fmt); + } + + late final _cJSON_PrintBufferedPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Int, + cJSON_bool, + ) + > + >('cJSON_PrintBuffered'); + late final _cJSON_PrintBuffered = _cJSON_PrintBufferedPtr + .asFunction< + ffi.Pointer Function(ffi.Pointer, int, int) + >(); + + int cJSON_PrintPreallocated( + ffi.Pointer item, + ffi.Pointer buffer, + int length, + int format, + ) { + return _cJSON_PrintPreallocated(item, buffer, length, format); + } + + late final _cJSON_PrintPreallocatedPtr = + _lookup< + ffi.NativeFunction< + cJSON_bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + cJSON_bool, + ) + > + >('cJSON_PrintPreallocated'); + late final _cJSON_PrintPreallocated = _cJSON_PrintPreallocatedPtr + .asFunction< + int Function(ffi.Pointer, ffi.Pointer, int, int) + >(); + + ffi.Pointer cJSON_PrintUnformatted(ffi.Pointer item) { + return _cJSON_PrintUnformatted(item); + } + + late final _cJSON_PrintUnformattedPtr = + _lookup< + ffi.NativeFunction Function(ffi.Pointer)> + >('cJSON_PrintUnformatted'); + late final _cJSON_PrintUnformatted = _cJSON_PrintUnformattedPtr + .asFunction Function(ffi.Pointer)>(); + + void cJSON_ReplaceItemInArray( + ffi.Pointer array, + int which, + ffi.Pointer newitem, + ) { + return _cJSON_ReplaceItemInArray(array, which, newitem); + } + + late final _cJSON_ReplaceItemInArrayPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Int, ffi.Pointer) + > + >('cJSON_ReplaceItemInArray'); + late final _cJSON_ReplaceItemInArray = _cJSON_ReplaceItemInArrayPtr + .asFunction, int, ffi.Pointer)>(); + + void cJSON_ReplaceItemInObject( + ffi.Pointer object, + ffi.Pointer string, + ffi.Pointer newitem, + ) { + return _cJSON_ReplaceItemInObject(object, string, newitem); + } + + late final _cJSON_ReplaceItemInObjectPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >('cJSON_ReplaceItemInObject'); + late final _cJSON_ReplaceItemInObject = _cJSON_ReplaceItemInObjectPtr + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); + + void cJSON_ReplaceItemInObjectCaseSensitive( + ffi.Pointer object, + ffi.Pointer string, + ffi.Pointer newitem, + ) { + return _cJSON_ReplaceItemInObjectCaseSensitive(object, string, newitem); + } + + late final _cJSON_ReplaceItemInObjectCaseSensitivePtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >('cJSON_ReplaceItemInObjectCaseSensitive'); + late final _cJSON_ReplaceItemInObjectCaseSensitive = + _cJSON_ReplaceItemInObjectCaseSensitivePtr + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); + + int cJSON_ReplaceItemViaPointer( + ffi.Pointer parent, + ffi.Pointer item, + ffi.Pointer replacement, + ) { + return _cJSON_ReplaceItemViaPointer(parent, item, replacement); + } + + late final _cJSON_ReplaceItemViaPointerPtr = + _lookup< + ffi.NativeFunction< + cJSON_bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >('cJSON_ReplaceItemViaPointer'); + late final _cJSON_ReplaceItemViaPointer = _cJSON_ReplaceItemViaPointerPtr + .asFunction< + int Function(ffi.Pointer, ffi.Pointer, ffi.Pointer) + >(); + + double cJSON_SetNumberHelper(ffi.Pointer object, double number) { + return _cJSON_SetNumberHelper(object, number); + } + + late final _cJSON_SetNumberHelperPtr = + _lookup< + ffi.NativeFunction, ffi.Double)> + >('cJSON_SetNumberHelper'); + late final _cJSON_SetNumberHelper = _cJSON_SetNumberHelperPtr + .asFunction, double)>(); + + ffi.Pointer cJSON_Version() { + return _cJSON_Version(); + } + + late final _cJSON_VersionPtr = + _lookup Function()>>( + 'cJSON_Version', + ); + late final _cJSON_Version = _cJSON_VersionPtr + .asFunction Function()>(); + + void cJSON_free(ffi.Pointer object) { + return _cJSON_free(object); + } + + late final _cJSON_freePtr = + _lookup)>>( + 'cJSON_free', + ); + late final _cJSON_free = _cJSON_freePtr + .asFunction)>(); + + ffi.Pointer cJSON_malloc(int size) { + return _cJSON_malloc(size); + } + + late final _cJSON_mallocPtr = + _lookup Function(ffi.Size)>>( + 'cJSON_malloc', + ); + late final _cJSON_malloc = _cJSON_mallocPtr + .asFunction Function(int)>(); +} + +const double CJSON_DOUBLE_PRECISION = 1e-16; + +const int CJSON_NESTING_LIMIT = 1000; + +const int CJSON_VERSION_MAJOR = 1; + +const int CJSON_VERSION_MINOR = 7; + +const int CJSON_VERSION_PATCH = 12; + +final class cJSON extends ffi.Struct { + external ffi.Pointer next; + + external ffi.Pointer prev; + + external ffi.Pointer child; + + @ffi.Int() + external int type; + + external ffi.Pointer valuestring; + + @ffi.Int() + external int valueint; + + @ffi.Double() + external double valuedouble; + + external ffi.Pointer string; + + static ffi.Pointer $allocate( + ffi.Allocator $allocator, { + required ffi.Pointer next, + required ffi.Pointer prev, + required ffi.Pointer child, + required int type, + required ffi.Pointer valuestring, + required int valueint, + required double valuedouble, + required ffi.Pointer string, + }) => $allocator() + ..ref.next = next + ..ref.prev = prev + ..ref.child = child + ..ref.type = type + ..ref.valuestring = valuestring + ..ref.valueint = valueint + ..ref.valuedouble = valuedouble + ..ref.string = string; +} + +const int cJSON_Array = 32; + +const int cJSON_False = 1; + +final class cJSON_Hooks extends ffi.Struct { + external ffi.Pointer< + ffi.NativeFunction Function(ffi.Size sz)> + > + malloc_fn; + + external ffi.Pointer< + ffi.NativeFunction ptr)> + > + free_fn; + + static ffi.Pointer $allocate( + ffi.Allocator $allocator, { + required ffi.Pointer< + ffi.NativeFunction Function(ffi.Size sz)> + > + malloc_fn, + required ffi.Pointer< + ffi.NativeFunction ptr)> + > + free_fn, + }) => $allocator() + ..ref.malloc_fn = malloc_fn + ..ref.free_fn = free_fn; +} + +const int cJSON_Invalid = 0; + +const int cJSON_IsReference = 256; + +const int cJSON_NULL = 4; + +const int cJSON_Number = 8; + +const int cJSON_Object = 64; + +const int cJSON_Raw = 128; + +const int cJSON_String = 16; + +const int cJSON_StringIsConst = 512; + +const int cJSON_True = 2; + +typedef cJSON_bool = ffi.Int; +typedef DartcJSON_bool = int; diff --git a/pkgs/ffigen/test/large_integration_tests/_expected_sqlite_bindings.dart b/pkgs/ffigen/test/large_integration_tests/_expected_sqlite_bindings.dart index dc0a0df2be..d00b72bbf3 100644 --- a/pkgs/ffigen/test/large_integration_tests/_expected_sqlite_bindings.dart +++ b/pkgs/ffigen/test/large_integration_tests/_expected_sqlite_bindings.dart @@ -2,3 +2,14430 @@ // // Generated by `package:ffigen`. // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package +import 'dart:ffi' as ffi; + +/// Bindings to SQLite. +class SQLite { + /// Holds the symbol lookup function. + final ffi.Pointer Function(String symbolName) + _lookup; + + /// The symbols are looked up in [dynamicLibrary]. + SQLite(ffi.DynamicLibrary dynamicLibrary) : _lookup = dynamicLibrary.lookup; + + /// The symbols are looked up with [lookup]. + SQLite.fromLookup( + ffi.Pointer Function(String symbolName) lookup, + ) : _lookup = lookup; + + /// CAPI3REF: Obtain Aggregate Function Context + /// METHOD: sqlite3_context + /// + /// Implementations of aggregate SQL functions use this + /// routine to allocate memory for storing their state. + /// + /// ^The first time the sqlite3_aggregate_context(C,N) routine is called + /// for a particular aggregate function, SQLite allocates + /// N bytes of memory, zeroes out that memory, and returns a pointer + /// to the new memory. ^On second and subsequent calls to + /// sqlite3_aggregate_context() for the same aggregate function instance, + /// the same buffer is returned. Sqlite3_aggregate_context() is normally + /// called once for each invocation of the xStep callback and then one + /// last time when the xFinal callback is invoked. ^(When no rows match + /// an aggregate query, the xStep() callback of the aggregate function + /// implementation is never called and xFinal() is called exactly once. + /// In those cases, sqlite3_aggregate_context() might be called for the + /// first time from within xFinal().)^ + /// + /// ^The sqlite3_aggregate_context(C,N) routine returns a NULL pointer + /// when first called if N is less than or equal to zero or if a memory + /// allocate error occurs. + /// + /// ^(The amount of space allocated by sqlite3_aggregate_context(C,N) is + /// determined by the N parameter on first successful call. Changing the + /// value of N in any subsequent call to sqlite3_aggregate_context() within + /// the same aggregate function instance will not resize the memory + /// allocation.)^ Within the xFinal callback, it is customary to set + /// N=0 in calls to sqlite3_aggregate_context(C,N) so that no + /// pointless memory allocations occur. + /// + /// ^SQLite automatically frees the memory allocated by + /// sqlite3_aggregate_context() when the aggregate query concludes. + /// + /// The first parameter must be a copy of the + /// [sqlite3_context | SQL function context] that is the first parameter + /// to the xStep or xFinal callback routine that implements the aggregate + /// function. + /// + /// This routine must be called from the same thread in which + /// the aggregate SQL function is running. + ffi.Pointer sqlite3_aggregate_context( + ffi.Pointer arg0, + int nBytes, + ) { + return _sqlite3_aggregate_context(arg0, nBytes); + } + + late final _sqlite3_aggregate_contextPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Int) + > + >('sqlite3_aggregate_context'); + late final _sqlite3_aggregate_context = _sqlite3_aggregate_contextPtr + .asFunction< + ffi.Pointer Function(ffi.Pointer, int) + >(); + + int sqlite3_aggregate_count(ffi.Pointer arg0) { + return _sqlite3_aggregate_count(arg0); + } + + late final _sqlite3_aggregate_countPtr = + _lookup< + ffi.NativeFunction)> + >('sqlite3_aggregate_count'); + late final _sqlite3_aggregate_count = _sqlite3_aggregate_countPtr + .asFunction)>(); + + /// CAPI3REF: Automatically Load Statically Linked Extensions + /// + /// ^This interface causes the xEntryPoint() function to be invoked for + /// each new [database connection] that is created. The idea here is that + /// xEntryPoint() is the entry point for a statically linked [SQLite extension] + /// that is to be automatically loaded into all new database connections. + /// + /// ^(Even though the function prototype shows that xEntryPoint() takes + /// no arguments and returns void, SQLite invokes xEntryPoint() with three + /// arguments and expects an integer result as if the signature of the + /// entry point where as follows: + /// + ///
+  ///    int xEntryPoint(
+  ///      sqlite3 *db,
+  ///      const char **pzErrMsg,
+  ///      const struct sqlite3_api_routines *pThunk
+  ///    );
+  /// 
)^ + /// + /// If the xEntryPoint routine encounters an error, it should make *pzErrMsg + /// point to an appropriate error message (obtained from [sqlite3_mprintf()]) + /// and return an appropriate [error code]. ^SQLite ensures that *pzErrMsg + /// is NULL before calling the xEntryPoint(). ^SQLite will invoke + /// [sqlite3_free()] on *pzErrMsg after xEntryPoint() returns. ^If any + /// xEntryPoint() returns an error, the [sqlite3_open()], [sqlite3_open16()], + /// or [sqlite3_open_v2()] call that provoked the xEntryPoint() will fail. + /// + /// ^Calling sqlite3_auto_extension(X) with an entry point X that is already + /// on the list of automatic extensions is a harmless no-op. ^No entry point + /// will be called more than once for each database connection that is opened. + /// + /// See also: [sqlite3_reset_auto_extension()] + /// and [sqlite3_cancel_auto_extension()] + int sqlite3_auto_extension( + ffi.Pointer> xEntryPoint, + ) { + return _sqlite3_auto_extension(xEntryPoint); + } + + late final _sqlite3_auto_extensionPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer>) + > + >('sqlite3_auto_extension'); + late final _sqlite3_auto_extension = _sqlite3_auto_extensionPtr + .asFunction< + int Function(ffi.Pointer>) + >(); + + int sqlite3_backup_finish(ffi.Pointer p) { + return _sqlite3_backup_finish(p); + } + + late final _sqlite3_backup_finishPtr = + _lookup< + ffi.NativeFunction)> + >('sqlite3_backup_finish'); + late final _sqlite3_backup_finish = _sqlite3_backup_finishPtr + .asFunction)>(); + + /// CAPI3REF: Online Backup API. + /// + /// The backup API copies the content of one database into another. + /// It is useful either for creating backups of databases or + /// for copying in-memory databases to or from persistent files. + /// + /// See Also: [Using the SQLite Online Backup API] + /// + /// ^SQLite holds a write transaction open on the destination database file + /// for the duration of the backup operation. + /// ^The source database is read-locked only while it is being read; + /// it is not locked continuously for the entire backup operation. + /// ^Thus, the backup may be performed on a live source database without + /// preventing other database connections from + /// reading or writing to the source database while the backup is underway. + /// + /// ^(To perform a backup operation: + ///
    + ///
  1. sqlite3_backup_init() is called once to initialize the + /// backup, + ///
  2. sqlite3_backup_step() is called one or more times to transfer + /// the data between the two databases, and finally + ///
  3. sqlite3_backup_finish() is called to release all resources + /// associated with the backup operation. + ///
)^ + /// There should be exactly one call to sqlite3_backup_finish() for each + /// successful call to sqlite3_backup_init(). + /// + /// [[sqlite3_backup_init()]] sqlite3_backup_init() + /// + /// ^The D and N arguments to sqlite3_backup_init(D,N,S,M) are the + /// [database connection] associated with the destination database + /// and the database name, respectively. + /// ^The database name is "main" for the main database, "temp" for the + /// temporary database, or the name specified after the AS keyword in + /// an [ATTACH] statement for an attached database. + /// ^The S and M arguments passed to + /// sqlite3_backup_init(D,N,S,M) identify the [database connection] + /// and database name of the source database, respectively. + /// ^The source and destination [database connections] (parameters S and D) + /// must be different or else sqlite3_backup_init(D,N,S,M) will fail with + /// an error. + /// + /// ^A call to sqlite3_backup_init() will fail, returning NULL, if + /// there is already a read or read-write transaction open on the + /// destination database. + /// + /// ^If an error occurs within sqlite3_backup_init(D,N,S,M), then NULL is + /// returned and an error code and error message are stored in the + /// destination [database connection] D. + /// ^The error code and message for the failed call to sqlite3_backup_init() + /// can be retrieved using the [sqlite3_errcode()], [sqlite3_errmsg()], and/or + /// [sqlite3_errmsg16()] functions. + /// ^A successful call to sqlite3_backup_init() returns a pointer to an + /// [sqlite3_backup] object. + /// ^The [sqlite3_backup] object may be used with the sqlite3_backup_step() and + /// sqlite3_backup_finish() functions to perform the specified backup + /// operation. + /// + /// [[sqlite3_backup_step()]] sqlite3_backup_step() + /// + /// ^Function sqlite3_backup_step(B,N) will copy up to N pages between + /// the source and destination databases specified by [sqlite3_backup] object B. + /// ^If N is negative, all remaining source pages are copied. + /// ^If sqlite3_backup_step(B,N) successfully copies N pages and there + /// are still more pages to be copied, then the function returns [SQLITE_OK]. + /// ^If sqlite3_backup_step(B,N) successfully finishes copying all pages + /// from source to destination, then it returns [SQLITE_DONE]. + /// ^If an error occurs while running sqlite3_backup_step(B,N), + /// then an [error code] is returned. ^As well as [SQLITE_OK] and + /// [SQLITE_DONE], a call to sqlite3_backup_step() may return [SQLITE_READONLY], + /// [SQLITE_NOMEM], [SQLITE_BUSY], [SQLITE_LOCKED], or an + /// [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX] extended error code. + /// + /// ^(The sqlite3_backup_step() might return [SQLITE_READONLY] if + ///
    + ///
  1. the destination database was opened read-only, or + ///
  2. the destination database is using write-ahead-log journaling + /// and the destination and source page sizes differ, or + ///
  3. the destination database is an in-memory database and the + /// destination and source page sizes differ. + ///
)^ + /// + /// ^If sqlite3_backup_step() cannot obtain a required file-system lock, then + /// the [sqlite3_busy_handler | busy-handler function] + /// is invoked (if one is specified). ^If the + /// busy-handler returns non-zero before the lock is available, then + /// [SQLITE_BUSY] is returned to the caller. ^In this case the call to + /// sqlite3_backup_step() can be retried later. ^If the source + /// [database connection] + /// is being used to write to the source database when sqlite3_backup_step() + /// is called, then [SQLITE_LOCKED] is returned immediately. ^Again, in this + /// case the call to sqlite3_backup_step() can be retried later on. ^(If + /// [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX], [SQLITE_NOMEM], or + /// [SQLITE_READONLY] is returned, then + /// there is no point in retrying the call to sqlite3_backup_step(). These + /// errors are considered fatal.)^ The application must accept + /// that the backup operation has failed and pass the backup operation handle + /// to the sqlite3_backup_finish() to release associated resources. + /// + /// ^The first call to sqlite3_backup_step() obtains an exclusive lock + /// on the destination file. ^The exclusive lock is not released until either + /// sqlite3_backup_finish() is called or the backup operation is complete + /// and sqlite3_backup_step() returns [SQLITE_DONE]. ^Every call to + /// sqlite3_backup_step() obtains a [shared lock] on the source database that + /// lasts for the duration of the sqlite3_backup_step() call. + /// ^Because the source database is not locked between calls to + /// sqlite3_backup_step(), the source database may be modified mid-way + /// through the backup process. ^If the source database is modified by an + /// external process or via a database connection other than the one being + /// used by the backup operation, then the backup will be automatically + /// restarted by the next call to sqlite3_backup_step(). ^If the source + /// database is modified by the using the same database connection as is used + /// by the backup operation, then the backup database is automatically + /// updated at the same time. + /// + /// [[sqlite3_backup_finish()]] sqlite3_backup_finish() + /// + /// When sqlite3_backup_step() has returned [SQLITE_DONE], or when the + /// application wishes to abandon the backup operation, the application + /// should destroy the [sqlite3_backup] by passing it to sqlite3_backup_finish(). + /// ^The sqlite3_backup_finish() interfaces releases all + /// resources associated with the [sqlite3_backup] object. + /// ^If sqlite3_backup_step() has not yet returned [SQLITE_DONE], then any + /// active write-transaction on the destination database is rolled back. + /// The [sqlite3_backup] object is invalid + /// and may not be used following a call to sqlite3_backup_finish(). + /// + /// ^The value returned by sqlite3_backup_finish is [SQLITE_OK] if no + /// sqlite3_backup_step() errors occurred, regardless or whether or not + /// sqlite3_backup_step() completed. + /// ^If an out-of-memory condition or IO error occurred during any prior + /// sqlite3_backup_step() call on the same [sqlite3_backup] object, then + /// sqlite3_backup_finish() returns the corresponding [error code]. + /// + /// ^A return of [SQLITE_BUSY] or [SQLITE_LOCKED] from sqlite3_backup_step() + /// is not a permanent error and does not affect the return value of + /// sqlite3_backup_finish(). + /// + /// [[sqlite3_backup_remaining()]] [[sqlite3_backup_pagecount()]] + /// sqlite3_backup_remaining() and sqlite3_backup_pagecount() + /// + /// ^The sqlite3_backup_remaining() routine returns the number of pages still + /// to be backed up at the conclusion of the most recent sqlite3_backup_step(). + /// ^The sqlite3_backup_pagecount() routine returns the total number of pages + /// in the source database at the conclusion of the most recent + /// sqlite3_backup_step(). + /// ^(The values returned by these functions are only updated by + /// sqlite3_backup_step(). If the source database is modified in a way that + /// changes the size of the source database or the number of pages remaining, + /// those changes are not reflected in the output of sqlite3_backup_pagecount() + /// and sqlite3_backup_remaining() until after the next + /// sqlite3_backup_step().)^ + /// + /// Concurrent Usage of Database Handles + /// + /// ^The source [database connection] may be used by the application for other + /// purposes while a backup operation is underway or being initialized. + /// ^If SQLite is compiled and configured to support threadsafe database + /// connections, then the source database connection may be used concurrently + /// from within other threads. + /// + /// However, the application must guarantee that the destination + /// [database connection] is not passed to any other API (by any thread) after + /// sqlite3_backup_init() is called and before the corresponding call to + /// sqlite3_backup_finish(). SQLite does not currently check to see + /// if the application incorrectly accesses the destination [database connection] + /// and so no error code is reported, but the operations may malfunction + /// nevertheless. Use of the destination database connection while a + /// backup is in progress might also also cause a mutex deadlock. + /// + /// If running in [shared cache mode], the application must + /// guarantee that the shared cache used by the destination database + /// is not accessed while the backup is running. In practice this means + /// that the application must guarantee that the disk file being + /// backed up to is not accessed by any connection within the process, + /// not just the specific connection that was passed to sqlite3_backup_init(). + /// + /// The [sqlite3_backup] object itself is partially threadsafe. Multiple + /// threads may safely make multiple concurrent calls to sqlite3_backup_step(). + /// However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount() + /// APIs are not strictly speaking threadsafe. If they are invoked at the + /// same time as another thread is invoking sqlite3_backup_step() it is + /// possible that they return invalid values. + ffi.Pointer sqlite3_backup_init( + ffi.Pointer pDest, + ffi.Pointer zDestName, + ffi.Pointer pSource, + ffi.Pointer zSourceName, + ) { + return _sqlite3_backup_init(pDest, zDestName, pSource, zSourceName); + } + + late final _sqlite3_backup_initPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >('sqlite3_backup_init'); + late final _sqlite3_backup_init = _sqlite3_backup_initPtr + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); + + int sqlite3_backup_pagecount(ffi.Pointer p) { + return _sqlite3_backup_pagecount(p); + } + + late final _sqlite3_backup_pagecountPtr = + _lookup< + ffi.NativeFunction)> + >('sqlite3_backup_pagecount'); + late final _sqlite3_backup_pagecount = _sqlite3_backup_pagecountPtr + .asFunction)>(); + + int sqlite3_backup_remaining(ffi.Pointer p) { + return _sqlite3_backup_remaining(p); + } + + late final _sqlite3_backup_remainingPtr = + _lookup< + ffi.NativeFunction)> + >('sqlite3_backup_remaining'); + late final _sqlite3_backup_remaining = _sqlite3_backup_remainingPtr + .asFunction)>(); + + int sqlite3_backup_step(ffi.Pointer p, int nPage) { + return _sqlite3_backup_step(p, nPage); + } + + late final _sqlite3_backup_stepPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Int) + > + >('sqlite3_backup_step'); + late final _sqlite3_backup_step = _sqlite3_backup_stepPtr + .asFunction, int)>(); + + /// CAPI3REF: Binding Values To Prepared Statements + /// KEYWORDS: {host parameter} {host parameters} {host parameter name} + /// KEYWORDS: {SQL parameter} {SQL parameters} {parameter binding} + /// METHOD: sqlite3_stmt + /// + /// ^(In the SQL statement text input to [sqlite3_prepare_v2()] and its variants, + /// literals may be replaced by a [parameter] that matches one of following + /// templates: + /// + ///
    + ///
  • ? + ///
  • ?NNN + ///
  • :VVV + ///
  • @VVV + ///
  • $VVV + ///
+ /// + /// In the templates above, NNN represents an integer literal, + /// and VVV represents an alphanumeric identifier.)^ ^The values of these + /// parameters (also called "host parameter names" or "SQL parameters") + /// can be set using the sqlite3_bind_*() routines defined here. + /// + /// ^The first argument to the sqlite3_bind_*() routines is always + /// a pointer to the [sqlite3_stmt] object returned from + /// [sqlite3_prepare_v2()] or its variants. + /// + /// ^The second argument is the index of the SQL parameter to be set. + /// ^The leftmost SQL parameter has an index of 1. ^When the same named + /// SQL parameter is used more than once, second and subsequent + /// occurrences have the same index as the first occurrence. + /// ^The index for named parameters can be looked up using the + /// [sqlite3_bind_parameter_index()] API if desired. ^The index + /// for "?NNN" parameters is the value of NNN. + /// ^The NNN value must be between 1 and the [sqlite3_limit()] + /// parameter [SQLITE_LIMIT_VARIABLE_NUMBER] (default value: 32766). + /// + /// ^The third argument is the value to bind to the parameter. + /// ^If the third parameter to sqlite3_bind_text() or sqlite3_bind_text16() + /// or sqlite3_bind_blob() is a NULL pointer then the fourth parameter + /// is ignored and the end result is the same as sqlite3_bind_null(). + /// ^If the third parameter to sqlite3_bind_text() is not NULL, then + /// it should be a pointer to well-formed UTF8 text. + /// ^If the third parameter to sqlite3_bind_text16() is not NULL, then + /// it should be a pointer to well-formed UTF16 text. + /// ^If the third parameter to sqlite3_bind_text64() is not NULL, then + /// it should be a pointer to a well-formed unicode string that is + /// either UTF8 if the sixth parameter is SQLITE_UTF8, or UTF16 + /// otherwise. + /// + /// [[byte-order determination rules]] ^The byte-order of + /// UTF16 input text is determined by the byte-order mark (BOM, U+FEFF) + /// found in first character, which is removed, or in the absence of a BOM + /// the byte order is the native byte order of the host + /// machine for sqlite3_bind_text16() or the byte order specified in + /// the 6th parameter for sqlite3_bind_text64().)^ + /// ^If UTF16 input text contains invalid unicode + /// characters, then SQLite might change those invalid characters + /// into the unicode replacement character: U+FFFD. + /// + /// ^(In those routines that have a fourth argument, its value is the + /// number of bytes in the parameter. To be clear: the value is the + /// number of bytes in the value, not the number of characters.)^ + /// ^If the fourth parameter to sqlite3_bind_text() or sqlite3_bind_text16() + /// is negative, then the length of the string is + /// the number of bytes up to the first zero terminator. + /// If the fourth parameter to sqlite3_bind_blob() is negative, then + /// the behavior is undefined. + /// If a non-negative fourth parameter is provided to sqlite3_bind_text() + /// or sqlite3_bind_text16() or sqlite3_bind_text64() then + /// that parameter must be the byte offset + /// where the NUL terminator would occur assuming the string were NUL + /// terminated. If any NUL characters occurs at byte offsets less than + /// the value of the fourth parameter then the resulting string value will + /// contain embedded NULs. The result of expressions involving strings + /// with embedded NULs is undefined. + /// + /// ^The fifth argument to the BLOB and string binding interfaces + /// is a destructor used to dispose of the BLOB or + /// string after SQLite has finished with it. ^The destructor is called + /// to dispose of the BLOB or string even if the call to the bind API fails, + /// except the destructor is not called if the third parameter is a NULL + /// pointer or the fourth parameter is negative. + /// ^If the fifth argument is + /// the special value [SQLITE_STATIC], then SQLite assumes that the + /// information is in static, unmanaged space and does not need to be freed. + /// ^If the fifth argument has the value [SQLITE_TRANSIENT], then + /// SQLite makes its own private copy of the data immediately, before + /// the sqlite3_bind_*() routine returns. + /// + /// ^The sixth argument to sqlite3_bind_text64() must be one of + /// [SQLITE_UTF8], [SQLITE_UTF16], [SQLITE_UTF16BE], or [SQLITE_UTF16LE] + /// to specify the encoding of the text in the third parameter. If + /// the sixth argument to sqlite3_bind_text64() is not one of the + /// allowed values shown above, or if the text encoding is different + /// from the encoding specified by the sixth parameter, then the behavior + /// is undefined. + /// + /// ^The sqlite3_bind_zeroblob() routine binds a BLOB of length N that + /// is filled with zeroes. ^A zeroblob uses a fixed amount of memory + /// (just an integer to hold its size) while it is being processed. + /// Zeroblobs are intended to serve as placeholders for BLOBs whose + /// content is later written using + /// [sqlite3_blob_open | incremental BLOB I/O] routines. + /// ^A negative value for the zeroblob results in a zero-length BLOB. + /// + /// ^The sqlite3_bind_pointer(S,I,P,T,D) routine causes the I-th parameter in + /// [prepared statement] S to have an SQL value of NULL, but to also be + /// associated with the pointer P of type T. ^D is either a NULL pointer or + /// a pointer to a destructor function for P. ^SQLite will invoke the + /// destructor D with a single argument of P when it is finished using + /// P. The T parameter should be a static string, preferably a string + /// literal. The sqlite3_bind_pointer() routine is part of the + /// [pointer passing interface] added for SQLite 3.20.0. + /// + /// ^If any of the sqlite3_bind_*() routines are called with a NULL pointer + /// for the [prepared statement] or with a prepared statement for which + /// [sqlite3_step()] has been called more recently than [sqlite3_reset()], + /// then the call will return [SQLITE_MISUSE]. If any sqlite3_bind_() + /// routine is passed a [prepared statement] that has been finalized, the + /// result is undefined and probably harmful. + /// + /// ^Bindings are not cleared by the [sqlite3_reset()] routine. + /// ^Unbound parameters are interpreted as NULL. + /// + /// ^The sqlite3_bind_* routines return [SQLITE_OK] on success or an + /// [error code] if anything goes wrong. + /// ^[SQLITE_TOOBIG] might be returned if the size of a string or BLOB + /// exceeds limits imposed by [sqlite3_limit]([SQLITE_LIMIT_LENGTH]) or + /// [SQLITE_MAX_LENGTH]. + /// ^[SQLITE_RANGE] is returned if the parameter + /// index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails. + /// + /// See also: [sqlite3_bind_parameter_count()], + /// [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()]. + int sqlite3_bind_blob( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, + int n, + ffi.Pointer)>> + arg4, + ) { + return _sqlite3_bind_blob(arg0, arg1, arg2, n, arg4); + } + + late final _sqlite3_bind_blobPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Int, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + > + >('sqlite3_bind_blob'); + late final _sqlite3_bind_blob = _sqlite3_bind_blobPtr + .asFunction< + int Function( + ffi.Pointer, + int, + ffi.Pointer, + int, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + >(); + + int sqlite3_bind_blob64( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, + int arg3, + ffi.Pointer)>> + arg4, + ) { + return _sqlite3_bind_blob64(arg0, arg1, arg2, arg3, arg4); + } + + late final _sqlite3_bind_blob64Ptr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + sqlite3_uint64, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + > + >('sqlite3_bind_blob64'); + late final _sqlite3_bind_blob64 = _sqlite3_bind_blob64Ptr + .asFunction< + int Function( + ffi.Pointer, + int, + ffi.Pointer, + int, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + >(); + + int sqlite3_bind_double( + ffi.Pointer arg0, + int arg1, + double arg2, + ) { + return _sqlite3_bind_double(arg0, arg1, arg2); + } + + late final _sqlite3_bind_doublePtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Double) + > + >('sqlite3_bind_double'); + late final _sqlite3_bind_double = _sqlite3_bind_doublePtr + .asFunction, int, double)>(); + + int sqlite3_bind_int(ffi.Pointer arg0, int arg1, int arg2) { + return _sqlite3_bind_int(arg0, arg1, arg2); + } + + late final _sqlite3_bind_intPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Int) + > + >('sqlite3_bind_int'); + late final _sqlite3_bind_int = _sqlite3_bind_intPtr + .asFunction, int, int)>(); + + int sqlite3_bind_int64(ffi.Pointer arg0, int arg1, int arg2) { + return _sqlite3_bind_int64(arg0, arg1, arg2); + } + + late final _sqlite3_bind_int64Ptr = + _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Int, sqlite3_int64) + > + >('sqlite3_bind_int64'); + late final _sqlite3_bind_int64 = _sqlite3_bind_int64Ptr + .asFunction, int, int)>(); + + int sqlite3_bind_null(ffi.Pointer arg0, int arg1) { + return _sqlite3_bind_null(arg0, arg1); + } + + late final _sqlite3_bind_nullPtr = + _lookup< + ffi.NativeFunction, ffi.Int)> + >('sqlite3_bind_null'); + late final _sqlite3_bind_null = _sqlite3_bind_nullPtr + .asFunction, int)>(); + + /// CAPI3REF: Number Of SQL Parameters + /// METHOD: sqlite3_stmt + /// + /// ^This routine can be used to find the number of [SQL parameters] + /// in a [prepared statement]. SQL parameters are tokens of the + /// form "?", "?NNN", ":AAA", "$AAA", or "@AAA" that serve as + /// placeholders for values that are [sqlite3_bind_blob | bound] + /// to the parameters at a later time. + /// + /// ^(This routine actually returns the index of the largest (rightmost) + /// parameter. For all forms except ?NNN, this will correspond to the + /// number of unique parameters. If parameters of the ?NNN form are used, + /// there may be gaps in the list.)^ + /// + /// See also: [sqlite3_bind_blob|sqlite3_bind()], + /// [sqlite3_bind_parameter_name()], and + /// [sqlite3_bind_parameter_index()]. + int sqlite3_bind_parameter_count(ffi.Pointer arg0) { + return _sqlite3_bind_parameter_count(arg0); + } + + late final _sqlite3_bind_parameter_countPtr = + _lookup)>>( + 'sqlite3_bind_parameter_count', + ); + late final _sqlite3_bind_parameter_count = _sqlite3_bind_parameter_countPtr + .asFunction)>(); + + /// CAPI3REF: Index Of A Parameter With A Given Name + /// METHOD: sqlite3_stmt + /// + /// ^Return the index of an SQL parameter given its name. ^The + /// index value returned is suitable for use as the second + /// parameter to [sqlite3_bind_blob|sqlite3_bind()]. ^A zero + /// is returned if no matching parameter is found. ^The parameter + /// name must be given in UTF-8 even if the original statement + /// was prepared from UTF-16 text using [sqlite3_prepare16_v2()] or + /// [sqlite3_prepare16_v3()]. + /// + /// See also: [sqlite3_bind_blob|sqlite3_bind()], + /// [sqlite3_bind_parameter_count()], and + /// [sqlite3_bind_parameter_name()]. + int sqlite3_bind_parameter_index( + ffi.Pointer arg0, + ffi.Pointer zName, + ) { + return _sqlite3_bind_parameter_index(arg0, zName); + } + + late final _sqlite3_bind_parameter_indexPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer) + > + >('sqlite3_bind_parameter_index'); + late final _sqlite3_bind_parameter_index = _sqlite3_bind_parameter_indexPtr + .asFunction< + int Function(ffi.Pointer, ffi.Pointer) + >(); + + /// CAPI3REF: Name Of A Host Parameter + /// METHOD: sqlite3_stmt + /// + /// ^The sqlite3_bind_parameter_name(P,N) interface returns + /// the name of the N-th [SQL parameter] in the [prepared statement] P. + /// ^(SQL parameters of the form "?NNN" or ":AAA" or "@AAA" or "$AAA" + /// have a name which is the string "?NNN" or ":AAA" or "@AAA" or "$AAA" + /// respectively. + /// In other words, the initial ":" or "$" or "@" or "?" + /// is included as part of the name.)^ + /// ^Parameters of the form "?" without a following integer have no name + /// and are referred to as "nameless" or "anonymous parameters". + /// + /// ^The first host parameter has an index of 1, not 0. + /// + /// ^If the value N is out of range or if the N-th parameter is + /// nameless, then NULL is returned. ^The returned string is + /// always in UTF-8 encoding even if the named parameter was + /// originally specified as UTF-16 in [sqlite3_prepare16()], + /// [sqlite3_prepare16_v2()], or [sqlite3_prepare16_v3()]. + /// + /// See also: [sqlite3_bind_blob|sqlite3_bind()], + /// [sqlite3_bind_parameter_count()], and + /// [sqlite3_bind_parameter_index()]. + ffi.Pointer sqlite3_bind_parameter_name( + ffi.Pointer arg0, + int arg1, + ) { + return _sqlite3_bind_parameter_name(arg0, arg1); + } + + late final _sqlite3_bind_parameter_namePtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Int) + > + >('sqlite3_bind_parameter_name'); + late final _sqlite3_bind_parameter_name = _sqlite3_bind_parameter_namePtr + .asFunction< + ffi.Pointer Function(ffi.Pointer, int) + >(); + + int sqlite3_bind_pointer( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer)>> + arg4, + ) { + return _sqlite3_bind_pointer(arg0, arg1, arg2, arg3, arg4); + } + + late final _sqlite3_bind_pointerPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + > + >('sqlite3_bind_pointer'); + late final _sqlite3_bind_pointer = _sqlite3_bind_pointerPtr + .asFunction< + int Function( + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + >(); + + int sqlite3_bind_text( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, + int arg3, + ffi.Pointer)>> + arg4, + ) { + return _sqlite3_bind_text(arg0, arg1, arg2, arg3, arg4); + } + + late final _sqlite3_bind_textPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Int, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + > + >('sqlite3_bind_text'); + late final _sqlite3_bind_text = _sqlite3_bind_textPtr + .asFunction< + int Function( + ffi.Pointer, + int, + ffi.Pointer, + int, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + >(); + + int sqlite3_bind_text16( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, + int arg3, + ffi.Pointer)>> + arg4, + ) { + return _sqlite3_bind_text16(arg0, arg1, arg2, arg3, arg4); + } + + late final _sqlite3_bind_text16Ptr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Int, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + > + >('sqlite3_bind_text16'); + late final _sqlite3_bind_text16 = _sqlite3_bind_text16Ptr + .asFunction< + int Function( + ffi.Pointer, + int, + ffi.Pointer, + int, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + >(); + + int sqlite3_bind_text64( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, + int arg3, + ffi.Pointer)>> + arg4, + int encoding, + ) { + return _sqlite3_bind_text64(arg0, arg1, arg2, arg3, arg4, encoding); + } + + late final _sqlite3_bind_text64Ptr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + sqlite3_uint64, + ffi.Pointer< + ffi.NativeFunction)> + >, + ffi.UnsignedChar, + ) + > + >('sqlite3_bind_text64'); + late final _sqlite3_bind_text64 = _sqlite3_bind_text64Ptr + .asFunction< + int Function( + ffi.Pointer, + int, + ffi.Pointer, + int, + ffi.Pointer< + ffi.NativeFunction)> + >, + int, + ) + >(); + + int sqlite3_bind_value( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, + ) { + return _sqlite3_bind_value(arg0, arg1, arg2); + } + + late final _sqlite3_bind_valuePtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ) + > + >('sqlite3_bind_value'); + late final _sqlite3_bind_value = _sqlite3_bind_valuePtr + .asFunction< + int Function(ffi.Pointer, int, ffi.Pointer) + >(); + + int sqlite3_bind_zeroblob(ffi.Pointer arg0, int arg1, int n) { + return _sqlite3_bind_zeroblob(arg0, arg1, n); + } + + late final _sqlite3_bind_zeroblobPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Int) + > + >('sqlite3_bind_zeroblob'); + late final _sqlite3_bind_zeroblob = _sqlite3_bind_zeroblobPtr + .asFunction, int, int)>(); + + int sqlite3_bind_zeroblob64( + ffi.Pointer arg0, + int arg1, + int arg2, + ) { + return _sqlite3_bind_zeroblob64(arg0, arg1, arg2); + } + + late final _sqlite3_bind_zeroblob64Ptr = + _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Int, sqlite3_uint64) + > + >('sqlite3_bind_zeroblob64'); + late final _sqlite3_bind_zeroblob64 = _sqlite3_bind_zeroblob64Ptr + .asFunction, int, int)>(); + + /// CAPI3REF: Return The Size Of An Open BLOB + /// METHOD: sqlite3_blob + /// + /// ^Returns the size in bytes of the BLOB accessible via the + /// successfully opened [BLOB handle] in its only argument. ^The + /// incremental blob I/O routines can only read or overwriting existing + /// blob content; they cannot change the size of a blob. + /// + /// This routine only works on a [BLOB handle] which has been created + /// by a prior successful call to [sqlite3_blob_open()] and which has not + /// been closed by [sqlite3_blob_close()]. Passing any other pointer in + /// to this routine results in undefined and probably undesirable behavior. + int sqlite3_blob_bytes(ffi.Pointer arg0) { + return _sqlite3_blob_bytes(arg0); + } + + late final _sqlite3_blob_bytesPtr = + _lookup)>>( + 'sqlite3_blob_bytes', + ); + late final _sqlite3_blob_bytes = _sqlite3_blob_bytesPtr + .asFunction)>(); + + /// CAPI3REF: Close A BLOB Handle + /// DESTRUCTOR: sqlite3_blob + /// + /// ^This function closes an open [BLOB handle]. ^(The BLOB handle is closed + /// unconditionally. Even if this routine returns an error code, the + /// handle is still closed.)^ + /// + /// ^If the blob handle being closed was opened for read-write access, and if + /// the database is in auto-commit mode and there are no other open read-write + /// blob handles or active write statements, the current transaction is + /// committed. ^If an error occurs while committing the transaction, an error + /// code is returned and the transaction rolled back. + /// + /// Calling this function with an argument that is not a NULL pointer or an + /// open blob handle results in undefined behaviour. ^Calling this routine + /// with a null pointer (such as would be returned by a failed call to + /// [sqlite3_blob_open()]) is a harmless no-op. ^Otherwise, if this function + /// is passed a valid open blob handle, the values returned by the + /// sqlite3_errcode() and sqlite3_errmsg() functions are set before returning. + int sqlite3_blob_close(ffi.Pointer arg0) { + return _sqlite3_blob_close(arg0); + } + + late final _sqlite3_blob_closePtr = + _lookup)>>( + 'sqlite3_blob_close', + ); + late final _sqlite3_blob_close = _sqlite3_blob_closePtr + .asFunction)>(); + + /// CAPI3REF: Open A BLOB For Incremental I/O + /// METHOD: sqlite3 + /// CONSTRUCTOR: sqlite3_blob + /// + /// ^(This interfaces opens a [BLOB handle | handle] to the BLOB located + /// in row iRow, column zColumn, table zTable in database zDb; + /// in other words, the same BLOB that would be selected by: + /// + ///
+  /// SELECT zColumn FROM zDb.zTable WHERE [rowid] = iRow;
+  /// 
)^ + /// + /// ^(Parameter zDb is not the filename that contains the database, but + /// rather the symbolic name of the database. For attached databases, this is + /// the name that appears after the AS keyword in the [ATTACH] statement. + /// For the main database file, the database name is "main". For TEMP + /// tables, the database name is "temp".)^ + /// + /// ^If the flags parameter is non-zero, then the BLOB is opened for read + /// and write access. ^If the flags parameter is zero, the BLOB is opened for + /// read-only access. + /// + /// ^(On success, [SQLITE_OK] is returned and the new [BLOB handle] is stored + /// in *ppBlob. Otherwise an [error code] is returned and, unless the error + /// code is SQLITE_MISUSE, *ppBlob is set to NULL.)^ ^This means that, provided + /// the API is not misused, it is always safe to call [sqlite3_blob_close()] + /// on *ppBlob after this function it returns. + /// + /// This function fails with SQLITE_ERROR if any of the following are true: + ///
    + ///
  • ^(Database zDb does not exist)^, + ///
  • ^(Table zTable does not exist within database zDb)^, + ///
  • ^(Table zTable is a WITHOUT ROWID table)^, + ///
  • ^(Column zColumn does not exist)^, + ///
  • ^(Row iRow is not present in the table)^, + ///
  • ^(The specified column of row iRow contains a value that is not + /// a TEXT or BLOB value)^, + ///
  • ^(Column zColumn is part of an index, PRIMARY KEY or UNIQUE + /// constraint and the blob is being opened for read/write access)^, + ///
  • ^([foreign key constraints | Foreign key constraints] are enabled, + /// column zColumn is part of a [child key] definition and the blob is + /// being opened for read/write access)^. + ///
+ /// + /// ^Unless it returns SQLITE_MISUSE, this function sets the + /// [database connection] error code and message accessible via + /// [sqlite3_errcode()] and [sqlite3_errmsg()] and related functions. + /// + /// A BLOB referenced by sqlite3_blob_open() may be read using the + /// [sqlite3_blob_read()] interface and modified by using + /// [sqlite3_blob_write()]. The [BLOB handle] can be moved to a + /// different row of the same table using the [sqlite3_blob_reopen()] + /// interface. However, the column, table, or database of a [BLOB handle] + /// cannot be changed after the [BLOB handle] is opened. + /// + /// ^(If the row that a BLOB handle points to is modified by an + /// [UPDATE], [DELETE], or by [ON CONFLICT] side-effects + /// then the BLOB handle is marked as "expired". + /// This is true if any column of the row is changed, even a column + /// other than the one the BLOB handle is open on.)^ + /// ^Calls to [sqlite3_blob_read()] and [sqlite3_blob_write()] for + /// an expired BLOB handle fail with a return code of [SQLITE_ABORT]. + /// ^(Changes written into a BLOB prior to the BLOB expiring are not + /// rolled back by the expiration of the BLOB. Such changes will eventually + /// commit if the transaction continues to completion.)^ + /// + /// ^Use the [sqlite3_blob_bytes()] interface to determine the size of + /// the opened blob. ^The size of a blob may not be changed by this + /// interface. Use the [UPDATE] SQL command to change the size of a + /// blob. + /// + /// ^The [sqlite3_bind_zeroblob()] and [sqlite3_result_zeroblob()] interfaces + /// and the built-in [zeroblob] SQL function may be used to create a + /// zero-filled blob to read or write using the incremental-blob interface. + /// + /// To avoid a resource leak, every open [BLOB handle] should eventually + /// be released by a call to [sqlite3_blob_close()]. + /// + /// See also: [sqlite3_blob_close()], + /// [sqlite3_blob_reopen()], [sqlite3_blob_read()], + /// [sqlite3_blob_bytes()], [sqlite3_blob_write()]. + int sqlite3_blob_open( + ffi.Pointer arg0, + ffi.Pointer zDb, + ffi.Pointer zTable, + ffi.Pointer zColumn, + int iRow, + int flags, + ffi.Pointer> ppBlob, + ) { + return _sqlite3_blob_open(arg0, zDb, zTable, zColumn, iRow, flags, ppBlob); + } + + late final _sqlite3_blob_openPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + sqlite3_int64, + ffi.Int, + ffi.Pointer>, + ) + > + >('sqlite3_blob_open'); + late final _sqlite3_blob_open = _sqlite3_blob_openPtr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer>, + ) + >(); + + /// CAPI3REF: Read Data From A BLOB Incrementally + /// METHOD: sqlite3_blob + /// + /// ^(This function is used to read data from an open [BLOB handle] into a + /// caller-supplied buffer. N bytes of data are copied into buffer Z + /// from the open BLOB, starting at offset iOffset.)^ + /// + /// ^If offset iOffset is less than N bytes from the end of the BLOB, + /// [SQLITE_ERROR] is returned and no data is read. ^If N or iOffset is + /// less than zero, [SQLITE_ERROR] is returned and no data is read. + /// ^The size of the blob (and hence the maximum value of N+iOffset) + /// can be determined using the [sqlite3_blob_bytes()] interface. + /// + /// ^An attempt to read from an expired [BLOB handle] fails with an + /// error code of [SQLITE_ABORT]. + /// + /// ^(On success, sqlite3_blob_read() returns SQLITE_OK. + /// Otherwise, an [error code] or an [extended error code] is returned.)^ + /// + /// This routine only works on a [BLOB handle] which has been created + /// by a prior successful call to [sqlite3_blob_open()] and which has not + /// been closed by [sqlite3_blob_close()]. Passing any other pointer in + /// to this routine results in undefined and probably undesirable behavior. + /// + /// See also: [sqlite3_blob_write()]. + int sqlite3_blob_read( + ffi.Pointer arg0, + ffi.Pointer Z, + int N, + int iOffset, + ) { + return _sqlite3_blob_read(arg0, Z, N, iOffset); + } + + late final _sqlite3_blob_readPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Int, + ) + > + >('sqlite3_blob_read'); + late final _sqlite3_blob_read = _sqlite3_blob_readPtr + .asFunction< + int Function(ffi.Pointer, ffi.Pointer, int, int) + >(); + + /// CAPI3REF: Move a BLOB Handle to a New Row + /// METHOD: sqlite3_blob + /// + /// ^This function is used to move an existing [BLOB handle] so that it points + /// to a different row of the same database table. ^The new row is identified + /// by the rowid value passed as the second argument. Only the row can be + /// changed. ^The database, table and column on which the blob handle is open + /// remain the same. Moving an existing [BLOB handle] to a new row is + /// faster than closing the existing handle and opening a new one. + /// + /// ^(The new row must meet the same criteria as for [sqlite3_blob_open()] - + /// it must exist and there must be either a blob or text value stored in + /// the nominated column.)^ ^If the new row is not present in the table, or if + /// it does not contain a blob or text value, or if another error occurs, an + /// SQLite error code is returned and the blob handle is considered aborted. + /// ^All subsequent calls to [sqlite3_blob_read()], [sqlite3_blob_write()] or + /// [sqlite3_blob_reopen()] on an aborted blob handle immediately return + /// SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle + /// always returns zero. + /// + /// ^This function sets the database handle error code and message. + int sqlite3_blob_reopen(ffi.Pointer arg0, int arg1) { + return _sqlite3_blob_reopen(arg0, arg1); + } + + late final _sqlite3_blob_reopenPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, sqlite3_int64) + > + >('sqlite3_blob_reopen'); + late final _sqlite3_blob_reopen = _sqlite3_blob_reopenPtr + .asFunction, int)>(); + + /// CAPI3REF: Write Data Into A BLOB Incrementally + /// METHOD: sqlite3_blob + /// + /// ^(This function is used to write data into an open [BLOB handle] from a + /// caller-supplied buffer. N bytes of data are copied from the buffer Z + /// into the open BLOB, starting at offset iOffset.)^ + /// + /// ^(On success, sqlite3_blob_write() returns SQLITE_OK. + /// Otherwise, an [error code] or an [extended error code] is returned.)^ + /// ^Unless SQLITE_MISUSE is returned, this function sets the + /// [database connection] error code and message accessible via + /// [sqlite3_errcode()] and [sqlite3_errmsg()] and related functions. + /// + /// ^If the [BLOB handle] passed as the first argument was not opened for + /// writing (the flags parameter to [sqlite3_blob_open()] was zero), + /// this function returns [SQLITE_READONLY]. + /// + /// This function may only modify the contents of the BLOB; it is + /// not possible to increase the size of a BLOB using this API. + /// ^If offset iOffset is less than N bytes from the end of the BLOB, + /// [SQLITE_ERROR] is returned and no data is written. The size of the + /// BLOB (and hence the maximum value of N+iOffset) can be determined + /// using the [sqlite3_blob_bytes()] interface. ^If N or iOffset are less + /// than zero [SQLITE_ERROR] is returned and no data is written. + /// + /// ^An attempt to write to an expired [BLOB handle] fails with an + /// error code of [SQLITE_ABORT]. ^Writes to the BLOB that occurred + /// before the [BLOB handle] expired are not rolled back by the + /// expiration of the handle, though of course those changes might + /// have been overwritten by the statement that expired the BLOB handle + /// or by other independent statements. + /// + /// This routine only works on a [BLOB handle] which has been created + /// by a prior successful call to [sqlite3_blob_open()] and which has not + /// been closed by [sqlite3_blob_close()]. Passing any other pointer in + /// to this routine results in undefined and probably undesirable behavior. + /// + /// See also: [sqlite3_blob_read()]. + int sqlite3_blob_write( + ffi.Pointer arg0, + ffi.Pointer z, + int n, + int iOffset, + ) { + return _sqlite3_blob_write(arg0, z, n, iOffset); + } + + late final _sqlite3_blob_writePtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Int, + ) + > + >('sqlite3_blob_write'); + late final _sqlite3_blob_write = _sqlite3_blob_writePtr + .asFunction< + int Function(ffi.Pointer, ffi.Pointer, int, int) + >(); + + /// CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors + /// KEYWORDS: {busy-handler callback} {busy handler} + /// METHOD: sqlite3 + /// + /// ^The sqlite3_busy_handler(D,X,P) routine sets a callback function X + /// that might be invoked with argument P whenever + /// an attempt is made to access a database table associated with + /// [database connection] D when another thread + /// or process has the table locked. + /// The sqlite3_busy_handler() interface is used to implement + /// [sqlite3_busy_timeout()] and [PRAGMA busy_timeout]. + /// + /// ^If the busy callback is NULL, then [SQLITE_BUSY] + /// is returned immediately upon encountering the lock. ^If the busy callback + /// is not NULL, then the callback might be invoked with two arguments. + /// + /// ^The first argument to the busy handler is a copy of the void* pointer which + /// is the third argument to sqlite3_busy_handler(). ^The second argument to + /// the busy handler callback is the number of times that the busy handler has + /// been invoked previously for the same locking event. ^If the + /// busy callback returns 0, then no additional attempts are made to + /// access the database and [SQLITE_BUSY] is returned + /// to the application. + /// ^If the callback returns non-zero, then another attempt + /// is made to access the database and the cycle repeats. + /// + /// The presence of a busy handler does not guarantee that it will be invoked + /// when there is lock contention. ^If SQLite determines that invoking the busy + /// handler could result in a deadlock, it will go ahead and return [SQLITE_BUSY] + /// to the application instead of invoking the + /// busy handler. + /// Consider a scenario where one process is holding a read lock that + /// it is trying to promote to a reserved lock and + /// a second process is holding a reserved lock that it is trying + /// to promote to an exclusive lock. The first process cannot proceed + /// because it is blocked by the second and the second process cannot + /// proceed because it is blocked by the first. If both processes + /// invoke the busy handlers, neither will make any progress. Therefore, + /// SQLite returns [SQLITE_BUSY] for the first process, hoping that this + /// will induce the first process to release its read lock and allow + /// the second process to proceed. + /// + /// ^The default busy callback is NULL. + /// + /// ^(There can only be a single busy handler defined for each + /// [database connection]. Setting a new busy handler clears any + /// previously set handler.)^ ^Note that calling [sqlite3_busy_timeout()] + /// or evaluating [PRAGMA busy_timeout=N] will change the + /// busy handler and thus clear any previously set busy handler. + /// + /// The busy callback should not take any actions which modify the + /// database connection that invoked the busy handler. In other words, + /// the busy handler is not reentrant. Any such actions + /// result in undefined behavior. + /// + /// A busy handler must not close the database connection + /// or [prepared statement] that invoked the busy handler. + int sqlite3_busy_handler( + ffi.Pointer arg0, + ffi.Pointer< + ffi.NativeFunction, ffi.Int)> + > + arg1, + ffi.Pointer arg2, + ) { + return _sqlite3_busy_handler(arg0, arg1, arg2); + } + + late final _sqlite3_busy_handlerPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Int) + > + >, + ffi.Pointer, + ) + > + >('sqlite3_busy_handler'); + late final _sqlite3_busy_handler = _sqlite3_busy_handlerPtr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction, ffi.Int)> + >, + ffi.Pointer, + ) + >(); + + /// CAPI3REF: Set A Busy Timeout + /// METHOD: sqlite3 + /// + /// ^This routine sets a [sqlite3_busy_handler | busy handler] that sleeps + /// for a specified amount of time when a table is locked. ^The handler + /// will sleep multiple times until at least "ms" milliseconds of sleeping + /// have accumulated. ^After at least "ms" milliseconds of sleeping, + /// the handler returns 0 which causes [sqlite3_step()] to return + /// [SQLITE_BUSY]. + /// + /// ^Calling this routine with an argument less than or equal to zero + /// turns off all busy handlers. + /// + /// ^(There can only be a single busy handler for a particular + /// [database connection] at any given moment. If another busy handler + /// was defined (using [sqlite3_busy_handler()]) prior to calling + /// this routine, that other busy handler is cleared.)^ + /// + /// See also: [PRAGMA busy_timeout] + int sqlite3_busy_timeout(ffi.Pointer arg0, int ms) { + return _sqlite3_busy_timeout(arg0, ms); + } + + late final _sqlite3_busy_timeoutPtr = + _lookup< + ffi.NativeFunction, ffi.Int)> + >('sqlite3_busy_timeout'); + late final _sqlite3_busy_timeout = _sqlite3_busy_timeoutPtr + .asFunction, int)>(); + + /// CAPI3REF: Cancel Automatic Extension Loading + /// + /// ^The [sqlite3_cancel_auto_extension(X)] interface unregisters the + /// initialization routine X that was registered using a prior call to + /// [sqlite3_auto_extension(X)]. ^The [sqlite3_cancel_auto_extension(X)] + /// routine returns 1 if initialization routine X was successfully + /// unregistered and it returns 0 if X was not on the list of initialization + /// routines. + int sqlite3_cancel_auto_extension( + ffi.Pointer> xEntryPoint, + ) { + return _sqlite3_cancel_auto_extension(xEntryPoint); + } + + late final _sqlite3_cancel_auto_extensionPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer>) + > + >('sqlite3_cancel_auto_extension'); + late final _sqlite3_cancel_auto_extension = _sqlite3_cancel_auto_extensionPtr + .asFunction< + int Function(ffi.Pointer>) + >(); + + /// CAPI3REF: Count The Number Of Rows Modified + /// METHOD: sqlite3 + /// + /// ^This function returns the number of rows modified, inserted or + /// deleted by the most recently completed INSERT, UPDATE or DELETE + /// statement on the database connection specified by the only parameter. + /// ^Executing any other type of SQL statement does not modify the value + /// returned by this function. + /// + /// ^Only changes made directly by the INSERT, UPDATE or DELETE statement are + /// considered - auxiliary changes caused by [CREATE TRIGGER | triggers], + /// [foreign key actions] or [REPLACE] constraint resolution are not counted. + /// + /// Changes to a view that are intercepted by + /// [INSTEAD OF trigger | INSTEAD OF triggers] are not counted. ^The value + /// returned by sqlite3_changes() immediately after an INSERT, UPDATE or + /// DELETE statement run on a view is always zero. Only changes made to real + /// tables are counted. + /// + /// Things are more complicated if the sqlite3_changes() function is + /// executed while a trigger program is running. This may happen if the + /// program uses the [changes() SQL function], or if some other callback + /// function invokes sqlite3_changes() directly. Essentially: + /// + ///
    + ///
  • ^(Before entering a trigger program the value returned by + /// sqlite3_changes() function is saved. After the trigger program + /// has finished, the original value is restored.)^ + /// + ///
  • ^(Within a trigger program each INSERT, UPDATE and DELETE + /// statement sets the value returned by sqlite3_changes() + /// upon completion as normal. Of course, this value will not include + /// any changes performed by sub-triggers, as the sqlite3_changes() + /// value will be saved and restored after each sub-trigger has run.)^ + ///
+ /// + /// ^This means that if the changes() SQL function (or similar) is used + /// by the first INSERT, UPDATE or DELETE statement within a trigger, it + /// returns the value as set when the calling statement began executing. + /// ^If it is used by the second or subsequent such statement within a trigger + /// program, the value returned reflects the number of rows modified by the + /// previous INSERT, UPDATE or DELETE statement within the same trigger. + /// + /// If a separate thread makes changes on the same database connection + /// while [sqlite3_changes()] is running then the value returned + /// is unpredictable and not meaningful. + /// + /// See also: + ///
    + ///
  • the [sqlite3_total_changes()] interface + ///
  • the [count_changes pragma] + ///
  • the [changes() SQL function] + ///
  • the [data_version pragma] + ///
+ int sqlite3_changes(ffi.Pointer arg0) { + return _sqlite3_changes(arg0); + } + + late final _sqlite3_changesPtr = + _lookup)>>( + 'sqlite3_changes', + ); + late final _sqlite3_changes = _sqlite3_changesPtr + .asFunction)>(); + + /// CAPI3REF: Reset All Bindings On A Prepared Statement + /// METHOD: sqlite3_stmt + /// + /// ^Contrary to the intuition of many, [sqlite3_reset()] does not reset + /// the [sqlite3_bind_blob | bindings] on a [prepared statement]. + /// ^Use this routine to reset all host parameters to NULL. + int sqlite3_clear_bindings(ffi.Pointer arg0) { + return _sqlite3_clear_bindings(arg0); + } + + late final _sqlite3_clear_bindingsPtr = + _lookup)>>( + 'sqlite3_clear_bindings', + ); + late final _sqlite3_clear_bindings = _sqlite3_clear_bindingsPtr + .asFunction)>(); + + /// CAPI3REF: Closing A Database Connection + /// DESTRUCTOR: sqlite3 + /// + /// ^The sqlite3_close() and sqlite3_close_v2() routines are destructors + /// for the [sqlite3] object. + /// ^Calls to sqlite3_close() and sqlite3_close_v2() return [SQLITE_OK] if + /// the [sqlite3] object is successfully destroyed and all associated + /// resources are deallocated. + /// + /// Ideally, applications should [sqlite3_finalize | finalize] all + /// [prepared statements], [sqlite3_blob_close | close] all [BLOB handles], and + /// [sqlite3_backup_finish | finish] all [sqlite3_backup] objects associated + /// with the [sqlite3] object prior to attempting to close the object. + /// ^If the database connection is associated with unfinalized prepared + /// statements, BLOB handlers, and/or unfinished sqlite3_backup objects then + /// sqlite3_close() will leave the database connection open and return + /// [SQLITE_BUSY]. ^If sqlite3_close_v2() is called with unfinalized prepared + /// statements, unclosed BLOB handlers, and/or unfinished sqlite3_backups, + /// it returns [SQLITE_OK] regardless, but instead of deallocating the database + /// connection immediately, it marks the database connection as an unusable + /// "zombie" and makes arrangements to automatically deallocate the database + /// connection after all prepared statements are finalized, all BLOB handles + /// are closed, and all backups have finished. The sqlite3_close_v2() interface + /// is intended for use with host languages that are garbage collected, and + /// where the order in which destructors are called is arbitrary. + /// + /// ^If an [sqlite3] object is destroyed while a transaction is open, + /// the transaction is automatically rolled back. + /// + /// The C parameter to [sqlite3_close(C)] and [sqlite3_close_v2(C)] + /// must be either a NULL + /// pointer or an [sqlite3] object pointer obtained + /// from [sqlite3_open()], [sqlite3_open16()], or + /// [sqlite3_open_v2()], and not previously closed. + /// ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer + /// argument is a harmless no-op. + int sqlite3_close(ffi.Pointer arg0) { + return _sqlite3_close(arg0); + } + + late final _sqlite3_closePtr = + _lookup)>>( + 'sqlite3_close', + ); + late final _sqlite3_close = _sqlite3_closePtr + .asFunction)>(); + + int sqlite3_close_v2(ffi.Pointer arg0) { + return _sqlite3_close_v2(arg0); + } + + late final _sqlite3_close_v2Ptr = + _lookup)>>( + 'sqlite3_close_v2', + ); + late final _sqlite3_close_v2 = _sqlite3_close_v2Ptr + .asFunction)>(); + + /// CAPI3REF: Collation Needed Callbacks + /// METHOD: sqlite3 + /// + /// ^To avoid having to register all collation sequences before a database + /// can be used, a single callback function may be registered with the + /// [database connection] to be invoked whenever an undefined collation + /// sequence is required. + /// + /// ^If the function is registered using the sqlite3_collation_needed() API, + /// then it is passed the names of undefined collation sequences as strings + /// encoded in UTF-8. ^If sqlite3_collation_needed16() is used, + /// the names are passed as UTF-16 in machine native byte order. + /// ^A call to either function replaces the existing collation-needed callback. + /// + /// ^(When the callback is invoked, the first argument passed is a copy + /// of the second argument to sqlite3_collation_needed() or + /// sqlite3_collation_needed16(). The second argument is the database + /// connection. The third argument is one of [SQLITE_UTF8], [SQLITE_UTF16BE], + /// or [SQLITE_UTF16LE], indicating the most desirable form of the collation + /// sequence function required. The fourth parameter is the name of the + /// required collation sequence.)^ + /// + /// The callback function should register the desired collation using + /// [sqlite3_create_collation()], [sqlite3_create_collation16()], or + /// [sqlite3_create_collation_v2()]. + int sqlite3_collation_needed( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ) + > + > + arg2, + ) { + return _sqlite3_collation_needed(arg0, arg1, arg2); + } + + late final _sqlite3_collation_neededPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ) + > + >, + ) + > + >('sqlite3_collation_needed'); + late final _sqlite3_collation_needed = _sqlite3_collation_neededPtr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ) + > + >, + ) + >(); + + int sqlite3_collation_needed16( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ) + > + > + arg2, + ) { + return _sqlite3_collation_needed16(arg0, arg1, arg2); + } + + late final _sqlite3_collation_needed16Ptr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ) + > + >, + ) + > + >('sqlite3_collation_needed16'); + late final _sqlite3_collation_needed16 = _sqlite3_collation_needed16Ptr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ) + > + >, + ) + >(); + + /// CAPI3REF: Result Values From A Query + /// KEYWORDS: {column access functions} + /// METHOD: sqlite3_stmt + /// + /// Summary: + ///
+ ///
sqlite3_column_blobBLOB result + ///
sqlite3_column_doubleREAL result + ///
sqlite3_column_int32-bit INTEGER result + ///
sqlite3_column_int6464-bit INTEGER result + ///
sqlite3_column_textUTF-8 TEXT result + ///
sqlite3_column_text16UTF-16 TEXT result + ///
sqlite3_column_valueThe result as an + /// [sqlite3_value|unprotected sqlite3_value] object. + ///
    + ///
sqlite3_column_bytesSize of a BLOB + /// or a UTF-8 TEXT result in bytes + ///
sqlite3_column_bytes16   + /// →  Size of UTF-16 + /// TEXT in bytes + ///
sqlite3_column_typeDefault + /// datatype of the result + ///
+ /// + /// Details: + /// + /// ^These routines return information about a single column of the current + /// result row of a query. ^In every case the first argument is a pointer + /// to the [prepared statement] that is being evaluated (the [sqlite3_stmt*] + /// that was returned from [sqlite3_prepare_v2()] or one of its variants) + /// and the second argument is the index of the column for which information + /// should be returned. ^The leftmost column of the result set has the index 0. + /// ^The number of columns in the result can be determined using + /// [sqlite3_column_count()]. + /// + /// If the SQL statement does not currently point to a valid row, or if the + /// column index is out of range, the result is undefined. + /// These routines may only be called when the most recent call to + /// [sqlite3_step()] has returned [SQLITE_ROW] and neither + /// [sqlite3_reset()] nor [sqlite3_finalize()] have been called subsequently. + /// If any of these routines are called after [sqlite3_reset()] or + /// [sqlite3_finalize()] or after [sqlite3_step()] has returned + /// something other than [SQLITE_ROW], the results are undefined. + /// If [sqlite3_step()] or [sqlite3_reset()] or [sqlite3_finalize()] + /// are called from a different thread while any of these routines + /// are pending, then the results are undefined. + /// + /// The first six interfaces (_blob, _double, _int, _int64, _text, and _text16) + /// each return the value of a result column in a specific data format. If + /// the result column is not initially in the requested format (for example, + /// if the query returns an integer but the sqlite3_column_text() interface + /// is used to extract the value) then an automatic type conversion is performed. + /// + /// ^The sqlite3_column_type() routine returns the + /// [SQLITE_INTEGER | datatype code] for the initial data type + /// of the result column. ^The returned value is one of [SQLITE_INTEGER], + /// [SQLITE_FLOAT], [SQLITE_TEXT], [SQLITE_BLOB], or [SQLITE_NULL]. + /// The return value of sqlite3_column_type() can be used to decide which + /// of the first six interface should be used to extract the column value. + /// The value returned by sqlite3_column_type() is only meaningful if no + /// automatic type conversions have occurred for the value in question. + /// After a type conversion, the result of calling sqlite3_column_type() + /// is undefined, though harmless. Future + /// versions of SQLite may change the behavior of sqlite3_column_type() + /// following a type conversion. + /// + /// If the result is a BLOB or a TEXT string, then the sqlite3_column_bytes() + /// or sqlite3_column_bytes16() interfaces can be used to determine the size + /// of that BLOB or string. + /// + /// ^If the result is a BLOB or UTF-8 string then the sqlite3_column_bytes() + /// routine returns the number of bytes in that BLOB or string. + /// ^If the result is a UTF-16 string, then sqlite3_column_bytes() converts + /// the string to UTF-8 and then returns the number of bytes. + /// ^If the result is a numeric value then sqlite3_column_bytes() uses + /// [sqlite3_snprintf()] to convert that value to a UTF-8 string and returns + /// the number of bytes in that string. + /// ^If the result is NULL, then sqlite3_column_bytes() returns zero. + /// + /// ^If the result is a BLOB or UTF-16 string then the sqlite3_column_bytes16() + /// routine returns the number of bytes in that BLOB or string. + /// ^If the result is a UTF-8 string, then sqlite3_column_bytes16() converts + /// the string to UTF-16 and then returns the number of bytes. + /// ^If the result is a numeric value then sqlite3_column_bytes16() uses + /// [sqlite3_snprintf()] to convert that value to a UTF-16 string and returns + /// the number of bytes in that string. + /// ^If the result is NULL, then sqlite3_column_bytes16() returns zero. + /// + /// ^The values returned by [sqlite3_column_bytes()] and + /// [sqlite3_column_bytes16()] do not include the zero terminators at the end + /// of the string. ^For clarity: the values returned by + /// [sqlite3_column_bytes()] and [sqlite3_column_bytes16()] are the number of + /// bytes in the string, not the number of characters. + /// + /// ^Strings returned by sqlite3_column_text() and sqlite3_column_text16(), + /// even empty strings, are always zero-terminated. ^The return + /// value from sqlite3_column_blob() for a zero-length BLOB is a NULL pointer. + /// + /// Warning: ^The object returned by [sqlite3_column_value()] is an + /// [unprotected sqlite3_value] object. In a multithreaded environment, + /// an unprotected sqlite3_value object may only be used safely with + /// [sqlite3_bind_value()] and [sqlite3_result_value()]. + /// If the [unprotected sqlite3_value] object returned by + /// [sqlite3_column_value()] is used in any other way, including calls + /// to routines like [sqlite3_value_int()], [sqlite3_value_text()], + /// or [sqlite3_value_bytes()], the behavior is not threadsafe. + /// Hence, the sqlite3_column_value() interface + /// is normally only useful within the implementation of + /// [application-defined SQL functions] or [virtual tables], not within + /// top-level application code. + /// + /// The these routines may attempt to convert the datatype of the result. + /// ^For example, if the internal representation is FLOAT and a text result + /// is requested, [sqlite3_snprintf()] is used internally to perform the + /// conversion automatically. ^(The following table details the conversions + /// that are applied: + /// + ///
+ /// + ///
Internal
Type
Requested
Type
Conversion + /// + ///
NULL INTEGER Result is 0 + ///
NULL FLOAT Result is 0.0 + ///
NULL TEXT Result is a NULL pointer + ///
NULL BLOB Result is a NULL pointer + ///
INTEGER FLOAT Convert from integer to float + ///
INTEGER TEXT ASCII rendering of the integer + ///
INTEGER BLOB Same as INTEGER->TEXT + ///
FLOAT INTEGER [CAST] to INTEGER + ///
FLOAT TEXT ASCII rendering of the float + ///
FLOAT BLOB [CAST] to BLOB + ///
TEXT INTEGER [CAST] to INTEGER + ///
TEXT FLOAT [CAST] to REAL + ///
TEXT BLOB No change + ///
BLOB INTEGER [CAST] to INTEGER + ///
BLOB FLOAT [CAST] to REAL + ///
BLOB TEXT Add a zero terminator if needed + ///
+ ///
)^ + /// + /// Note that when type conversions occur, pointers returned by prior + /// calls to sqlite3_column_blob(), sqlite3_column_text(), and/or + /// sqlite3_column_text16() may be invalidated. + /// Type conversions and pointer invalidations might occur + /// in the following cases: + /// + ///
    + ///
  • The initial content is a BLOB and sqlite3_column_text() or + /// sqlite3_column_text16() is called. A zero-terminator might + /// need to be added to the string.
  • + ///
  • The initial content is UTF-8 text and sqlite3_column_bytes16() or + /// sqlite3_column_text16() is called. The content must be converted + /// to UTF-16.
  • + ///
  • The initial content is UTF-16 text and sqlite3_column_bytes() or + /// sqlite3_column_text() is called. The content must be converted + /// to UTF-8.
  • + ///
+ /// + /// ^Conversions between UTF-16be and UTF-16le are always done in place and do + /// not invalidate a prior pointer, though of course the content of the buffer + /// that the prior pointer references will have been modified. Other kinds + /// of conversion are done in place when it is possible, but sometimes they + /// are not possible and in those cases prior pointers are invalidated. + /// + /// The safest policy is to invoke these routines + /// in one of the following ways: + /// + ///
    + ///
  • sqlite3_column_text() followed by sqlite3_column_bytes()
  • + ///
  • sqlite3_column_blob() followed by sqlite3_column_bytes()
  • + ///
  • sqlite3_column_text16() followed by sqlite3_column_bytes16()
  • + ///
+ /// + /// In other words, you should call sqlite3_column_text(), + /// sqlite3_column_blob(), or sqlite3_column_text16() first to force the result + /// into the desired format, then invoke sqlite3_column_bytes() or + /// sqlite3_column_bytes16() to find the size of the result. Do not mix calls + /// to sqlite3_column_text() or sqlite3_column_blob() with calls to + /// sqlite3_column_bytes16(), and do not mix calls to sqlite3_column_text16() + /// with calls to sqlite3_column_bytes(). + /// + /// ^The pointers returned are valid until a type conversion occurs as + /// described above, or until [sqlite3_step()] or [sqlite3_reset()] or + /// [sqlite3_finalize()] is called. ^The memory space used to hold strings + /// and BLOBs is freed automatically. Do not pass the pointers returned + /// from [sqlite3_column_blob()], [sqlite3_column_text()], etc. into + /// [sqlite3_free()]. + /// + /// As long as the input parameters are correct, these routines will only + /// fail if an out-of-memory error occurs during a format conversion. + /// Only the following subset of interfaces are subject to out-of-memory + /// errors: + /// + ///
    + ///
  • sqlite3_column_blob() + ///
  • sqlite3_column_text() + ///
  • sqlite3_column_text16() + ///
  • sqlite3_column_bytes() + ///
  • sqlite3_column_bytes16() + ///
+ /// + /// If an out-of-memory error occurs, then the return value from these + /// routines is the same as if the column had contained an SQL NULL value. + /// Valid SQL NULL returns can be distinguished from out-of-memory errors + /// by invoking the [sqlite3_errcode()] immediately after the suspect + /// return value is obtained and before any + /// other SQLite interface is called on the same [database connection]. + ffi.Pointer sqlite3_column_blob( + ffi.Pointer arg0, + int iCol, + ) { + return _sqlite3_column_blob(arg0, iCol); + } + + late final _sqlite3_column_blobPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Int) + > + >('sqlite3_column_blob'); + late final _sqlite3_column_blob = _sqlite3_column_blobPtr + .asFunction< + ffi.Pointer Function(ffi.Pointer, int) + >(); + + int sqlite3_column_bytes(ffi.Pointer arg0, int iCol) { + return _sqlite3_column_bytes(arg0, iCol); + } + + late final _sqlite3_column_bytesPtr = + _lookup< + ffi.NativeFunction, ffi.Int)> + >('sqlite3_column_bytes'); + late final _sqlite3_column_bytes = _sqlite3_column_bytesPtr + .asFunction, int)>(); + + int sqlite3_column_bytes16(ffi.Pointer arg0, int iCol) { + return _sqlite3_column_bytes16(arg0, iCol); + } + + late final _sqlite3_column_bytes16Ptr = + _lookup< + ffi.NativeFunction, ffi.Int)> + >('sqlite3_column_bytes16'); + late final _sqlite3_column_bytes16 = _sqlite3_column_bytes16Ptr + .asFunction, int)>(); + + /// CAPI3REF: Number Of Columns In A Result Set + /// METHOD: sqlite3_stmt + /// + /// ^Return the number of columns in the result set returned by the + /// [prepared statement]. ^If this routine returns 0, that means the + /// [prepared statement] returns no data (for example an [UPDATE]). + /// ^However, just because this routine returns a positive number does not + /// mean that one or more rows of data will be returned. ^A SELECT statement + /// will always have a positive sqlite3_column_count() but depending on the + /// WHERE clause constraints and the table content, it might return no rows. + /// + /// See also: [sqlite3_data_count()] + int sqlite3_column_count(ffi.Pointer pStmt) { + return _sqlite3_column_count(pStmt); + } + + late final _sqlite3_column_countPtr = + _lookup)>>( + 'sqlite3_column_count', + ); + late final _sqlite3_column_count = _sqlite3_column_countPtr + .asFunction)>(); + + /// CAPI3REF: Source Of Data In A Query Result + /// METHOD: sqlite3_stmt + /// + /// ^These routines provide a means to determine the database, table, and + /// table column that is the origin of a particular result column in + /// [SELECT] statement. + /// ^The name of the database or table or column can be returned as + /// either a UTF-8 or UTF-16 string. ^The _database_ routines return + /// the database name, the _table_ routines return the table name, and + /// the origin_ routines return the column name. + /// ^The returned string is valid until the [prepared statement] is destroyed + /// using [sqlite3_finalize()] or until the statement is automatically + /// reprepared by the first call to [sqlite3_step()] for a particular run + /// or until the same information is requested + /// again in a different encoding. + /// + /// ^The names returned are the original un-aliased names of the + /// database, table, and column. + /// + /// ^The first argument to these interfaces is a [prepared statement]. + /// ^These functions return information about the Nth result column returned by + /// the statement, where N is the second function argument. + /// ^The left-most column is column 0 for these routines. + /// + /// ^If the Nth column returned by the statement is an expression or + /// subquery and is not a column value, then all of these functions return + /// NULL. ^These routines might also return NULL if a memory allocation error + /// occurs. ^Otherwise, they return the name of the attached database, table, + /// or column that query result column was extracted from. + /// + /// ^As with all other SQLite APIs, those whose names end with "16" return + /// UTF-16 encoded strings and the other functions return UTF-8. + /// + /// ^These APIs are only available if the library was compiled with the + /// [SQLITE_ENABLE_COLUMN_METADATA] C-preprocessor symbol. + /// + /// If two or more threads call one or more + /// [sqlite3_column_database_name | column metadata interfaces] + /// for the same [prepared statement] and result column + /// at the same time then the results are undefined. + ffi.Pointer sqlite3_column_database_name( + ffi.Pointer arg0, + int arg1, + ) { + return _sqlite3_column_database_name(arg0, arg1); + } + + late final _sqlite3_column_database_namePtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Int) + > + >('sqlite3_column_database_name'); + late final _sqlite3_column_database_name = _sqlite3_column_database_namePtr + .asFunction< + ffi.Pointer Function(ffi.Pointer, int) + >(); + + ffi.Pointer sqlite3_column_database_name16( + ffi.Pointer arg0, + int arg1, + ) { + return _sqlite3_column_database_name16(arg0, arg1); + } + + late final _sqlite3_column_database_name16Ptr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Int) + > + >('sqlite3_column_database_name16'); + late final _sqlite3_column_database_name16 = + _sqlite3_column_database_name16Ptr + .asFunction< + ffi.Pointer Function(ffi.Pointer, int) + >(); + + /// CAPI3REF: Declared Datatype Of A Query Result + /// METHOD: sqlite3_stmt + /// + /// ^(The first parameter is a [prepared statement]. + /// If this statement is a [SELECT] statement and the Nth column of the + /// returned result set of that [SELECT] is a table column (not an + /// expression or subquery) then the declared type of the table + /// column is returned.)^ ^If the Nth column of the result set is an + /// expression or subquery, then a NULL pointer is returned. + /// ^The returned string is always UTF-8 encoded. + /// + /// ^(For example, given the database schema: + /// + /// CREATE TABLE t1(c1 VARIANT); + /// + /// and the following statement to be compiled: + /// + /// SELECT c1 + 1, c1 FROM t1; + /// + /// this routine would return the string "VARIANT" for the second result + /// column (i==1), and a NULL pointer for the first result column (i==0).)^ + /// + /// ^SQLite uses dynamic run-time typing. ^So just because a column + /// is declared to contain a particular type does not mean that the + /// data stored in that column is of the declared type. SQLite is + /// strongly typed, but the typing is dynamic not static. ^Type + /// is associated with individual values, not with the containers + /// used to hold those values. + ffi.Pointer sqlite3_column_decltype( + ffi.Pointer arg0, + int arg1, + ) { + return _sqlite3_column_decltype(arg0, arg1); + } + + late final _sqlite3_column_decltypePtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Int) + > + >('sqlite3_column_decltype'); + late final _sqlite3_column_decltype = _sqlite3_column_decltypePtr + .asFunction< + ffi.Pointer Function(ffi.Pointer, int) + >(); + + ffi.Pointer sqlite3_column_decltype16( + ffi.Pointer arg0, + int arg1, + ) { + return _sqlite3_column_decltype16(arg0, arg1); + } + + late final _sqlite3_column_decltype16Ptr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Int) + > + >('sqlite3_column_decltype16'); + late final _sqlite3_column_decltype16 = _sqlite3_column_decltype16Ptr + .asFunction< + ffi.Pointer Function(ffi.Pointer, int) + >(); + + double sqlite3_column_double(ffi.Pointer arg0, int iCol) { + return _sqlite3_column_double(arg0, iCol); + } + + late final _sqlite3_column_doublePtr = + _lookup< + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, ffi.Int) + > + >('sqlite3_column_double'); + late final _sqlite3_column_double = _sqlite3_column_doublePtr + .asFunction, int)>(); + + int sqlite3_column_int(ffi.Pointer arg0, int iCol) { + return _sqlite3_column_int(arg0, iCol); + } + + late final _sqlite3_column_intPtr = + _lookup< + ffi.NativeFunction, ffi.Int)> + >('sqlite3_column_int'); + late final _sqlite3_column_int = _sqlite3_column_intPtr + .asFunction, int)>(); + + int sqlite3_column_int64(ffi.Pointer arg0, int iCol) { + return _sqlite3_column_int64(arg0, iCol); + } + + late final _sqlite3_column_int64Ptr = + _lookup< + ffi.NativeFunction< + sqlite3_int64 Function(ffi.Pointer, ffi.Int) + > + >('sqlite3_column_int64'); + late final _sqlite3_column_int64 = _sqlite3_column_int64Ptr + .asFunction, int)>(); + + /// CAPI3REF: Column Names In A Result Set + /// METHOD: sqlite3_stmt + /// + /// ^These routines return the name assigned to a particular column + /// in the result set of a [SELECT] statement. ^The sqlite3_column_name() + /// interface returns a pointer to a zero-terminated UTF-8 string + /// and sqlite3_column_name16() returns a pointer to a zero-terminated + /// UTF-16 string. ^The first parameter is the [prepared statement] + /// that implements the [SELECT] statement. ^The second parameter is the + /// column number. ^The leftmost column is number 0. + /// + /// ^The returned string pointer is valid until either the [prepared statement] + /// is destroyed by [sqlite3_finalize()] or until the statement is automatically + /// reprepared by the first call to [sqlite3_step()] for a particular run + /// or until the next call to + /// sqlite3_column_name() or sqlite3_column_name16() on the same column. + /// + /// ^If sqlite3_malloc() fails during the processing of either routine + /// (for example during a conversion from UTF-8 to UTF-16) then a + /// NULL pointer is returned. + /// + /// ^The name of a result column is the value of the "AS" clause for + /// that column, if there is an AS clause. If there is no AS clause + /// then the name of the column is unspecified and may change from + /// one release of SQLite to the next. + ffi.Pointer sqlite3_column_name( + ffi.Pointer arg0, + int N, + ) { + return _sqlite3_column_name(arg0, N); + } + + late final _sqlite3_column_namePtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Int) + > + >('sqlite3_column_name'); + late final _sqlite3_column_name = _sqlite3_column_namePtr + .asFunction< + ffi.Pointer Function(ffi.Pointer, int) + >(); + + ffi.Pointer sqlite3_column_name16( + ffi.Pointer arg0, + int N, + ) { + return _sqlite3_column_name16(arg0, N); + } + + late final _sqlite3_column_name16Ptr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Int) + > + >('sqlite3_column_name16'); + late final _sqlite3_column_name16 = _sqlite3_column_name16Ptr + .asFunction< + ffi.Pointer Function(ffi.Pointer, int) + >(); + + ffi.Pointer sqlite3_column_origin_name( + ffi.Pointer arg0, + int arg1, + ) { + return _sqlite3_column_origin_name(arg0, arg1); + } + + late final _sqlite3_column_origin_namePtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Int) + > + >('sqlite3_column_origin_name'); + late final _sqlite3_column_origin_name = _sqlite3_column_origin_namePtr + .asFunction< + ffi.Pointer Function(ffi.Pointer, int) + >(); + + ffi.Pointer sqlite3_column_origin_name16( + ffi.Pointer arg0, + int arg1, + ) { + return _sqlite3_column_origin_name16(arg0, arg1); + } + + late final _sqlite3_column_origin_name16Ptr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Int) + > + >('sqlite3_column_origin_name16'); + late final _sqlite3_column_origin_name16 = _sqlite3_column_origin_name16Ptr + .asFunction< + ffi.Pointer Function(ffi.Pointer, int) + >(); + + ffi.Pointer sqlite3_column_table_name( + ffi.Pointer arg0, + int arg1, + ) { + return _sqlite3_column_table_name(arg0, arg1); + } + + late final _sqlite3_column_table_namePtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Int) + > + >('sqlite3_column_table_name'); + late final _sqlite3_column_table_name = _sqlite3_column_table_namePtr + .asFunction< + ffi.Pointer Function(ffi.Pointer, int) + >(); + + ffi.Pointer sqlite3_column_table_name16( + ffi.Pointer arg0, + int arg1, + ) { + return _sqlite3_column_table_name16(arg0, arg1); + } + + late final _sqlite3_column_table_name16Ptr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Int) + > + >('sqlite3_column_table_name16'); + late final _sqlite3_column_table_name16 = _sqlite3_column_table_name16Ptr + .asFunction< + ffi.Pointer Function(ffi.Pointer, int) + >(); + + ffi.Pointer sqlite3_column_text( + ffi.Pointer arg0, + int iCol, + ) { + return _sqlite3_column_text(arg0, iCol); + } + + late final _sqlite3_column_textPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Int, + ) + > + >('sqlite3_column_text'); + late final _sqlite3_column_text = _sqlite3_column_textPtr + .asFunction< + ffi.Pointer Function(ffi.Pointer, int) + >(); + + ffi.Pointer sqlite3_column_text16( + ffi.Pointer arg0, + int iCol, + ) { + return _sqlite3_column_text16(arg0, iCol); + } + + late final _sqlite3_column_text16Ptr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Int) + > + >('sqlite3_column_text16'); + late final _sqlite3_column_text16 = _sqlite3_column_text16Ptr + .asFunction< + ffi.Pointer Function(ffi.Pointer, int) + >(); + + int sqlite3_column_type(ffi.Pointer arg0, int iCol) { + return _sqlite3_column_type(arg0, iCol); + } + + late final _sqlite3_column_typePtr = + _lookup< + ffi.NativeFunction, ffi.Int)> + >('sqlite3_column_type'); + late final _sqlite3_column_type = _sqlite3_column_typePtr + .asFunction, int)>(); + + ffi.Pointer sqlite3_column_value( + ffi.Pointer arg0, + int iCol, + ) { + return _sqlite3_column_value(arg0, iCol); + } + + late final _sqlite3_column_valuePtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Int, + ) + > + >('sqlite3_column_value'); + late final _sqlite3_column_value = _sqlite3_column_valuePtr + .asFunction< + ffi.Pointer Function(ffi.Pointer, int) + >(); + + /// CAPI3REF: Commit And Rollback Notification Callbacks + /// METHOD: sqlite3 + /// + /// ^The sqlite3_commit_hook() interface registers a callback + /// function to be invoked whenever a transaction is [COMMIT | committed]. + /// ^Any callback set by a previous call to sqlite3_commit_hook() + /// for the same database connection is overridden. + /// ^The sqlite3_rollback_hook() interface registers a callback + /// function to be invoked whenever a transaction is [ROLLBACK | rolled back]. + /// ^Any callback set by a previous call to sqlite3_rollback_hook() + /// for the same database connection is overridden. + /// ^The pArg argument is passed through to the callback. + /// ^If the callback on a commit hook function returns non-zero, + /// then the commit is converted into a rollback. + /// + /// ^The sqlite3_commit_hook(D,C,P) and sqlite3_rollback_hook(D,C,P) functions + /// return the P argument from the previous call of the same function + /// on the same [database connection] D, or NULL for + /// the first call for each function on D. + /// + /// The commit and rollback hook callbacks are not reentrant. + /// The callback implementation must not do anything that will modify + /// the database connection that invoked the callback. Any actions + /// to modify the database connection must be deferred until after the + /// completion of the [sqlite3_step()] call that triggered the commit + /// or rollback hook in the first place. + /// Note that running any other SQL statements, including SELECT statements, + /// or merely calling [sqlite3_prepare_v2()] and [sqlite3_step()] will modify + /// the database connections for the meaning of "modify" in this paragraph. + /// + /// ^Registering a NULL function disables the callback. + /// + /// ^When the commit hook callback routine returns zero, the [COMMIT] + /// operation is allowed to continue normally. ^If the commit hook + /// returns non-zero, then the [COMMIT] is converted into a [ROLLBACK]. + /// ^The rollback hook is invoked on a rollback that results from a commit + /// hook returning non-zero, just as it would be with any other rollback. + /// + /// ^For the purposes of this API, a transaction is said to have been + /// rolled back if an explicit "ROLLBACK" statement is executed, or + /// an error or constraint causes an implicit rollback to occur. + /// ^The rollback callback is not invoked if a transaction is + /// automatically rolled back because the database connection is closed. + /// + /// See also the [sqlite3_update_hook()] interface. + ffi.Pointer sqlite3_commit_hook( + ffi.Pointer arg0, + ffi.Pointer)>> + arg1, + ffi.Pointer arg2, + ) { + return _sqlite3_commit_hook(arg0, arg1, arg2); + } + + late final _sqlite3_commit_hookPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction)> + >, + ffi.Pointer, + ) + > + >('sqlite3_commit_hook'); + late final _sqlite3_commit_hook = _sqlite3_commit_hookPtr + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction)> + >, + ffi.Pointer, + ) + >(); + + ffi.Pointer sqlite3_compileoption_get(int N) { + return _sqlite3_compileoption_get(N); + } + + late final _sqlite3_compileoption_getPtr = + _lookup Function(ffi.Int)>>( + 'sqlite3_compileoption_get', + ); + late final _sqlite3_compileoption_get = _sqlite3_compileoption_getPtr + .asFunction Function(int)>(); + + int sqlite3_compileoption_used(ffi.Pointer zOptName) { + return _sqlite3_compileoption_used(zOptName); + } + + late final _sqlite3_compileoption_usedPtr = + _lookup)>>( + 'sqlite3_compileoption_used', + ); + late final _sqlite3_compileoption_used = _sqlite3_compileoption_usedPtr + .asFunction)>(); + + /// CAPI3REF: Determine If An SQL Statement Is Complete + /// + /// These routines are useful during command-line input to determine if the + /// currently entered text seems to form a complete SQL statement or + /// if additional input is needed before sending the text into + /// SQLite for parsing. ^These routines return 1 if the input string + /// appears to be a complete SQL statement. ^A statement is judged to be + /// complete if it ends with a semicolon token and is not a prefix of a + /// well-formed CREATE TRIGGER statement. ^Semicolons that are embedded within + /// string literals or quoted identifier names or comments are not + /// independent tokens (they are part of the token in which they are + /// embedded) and thus do not count as a statement terminator. ^Whitespace + /// and comments that follow the final semicolon are ignored. + /// + /// ^These routines return 0 if the statement is incomplete. ^If a + /// memory allocation fails, then SQLITE_NOMEM is returned. + /// + /// ^These routines do not parse the SQL statements thus + /// will not detect syntactically incorrect SQL. + /// + /// ^(If SQLite has not been initialized using [sqlite3_initialize()] prior + /// to invoking sqlite3_complete16() then sqlite3_initialize() is invoked + /// automatically by sqlite3_complete16(). If that initialization fails, + /// then the return value from sqlite3_complete16() will be non-zero + /// regardless of whether or not the input SQL is complete.)^ + /// + /// The input to [sqlite3_complete()] must be a zero-terminated + /// UTF-8 string. + /// + /// The input to [sqlite3_complete16()] must be a zero-terminated + /// UTF-16 string in native byte order. + int sqlite3_complete(ffi.Pointer sql) { + return _sqlite3_complete(sql); + } + + late final _sqlite3_completePtr = + _lookup)>>( + 'sqlite3_complete', + ); + late final _sqlite3_complete = _sqlite3_completePtr + .asFunction)>(); + + int sqlite3_complete16(ffi.Pointer sql) { + return _sqlite3_complete16(sql); + } + + late final _sqlite3_complete16Ptr = + _lookup)>>( + 'sqlite3_complete16', + ); + late final _sqlite3_complete16 = _sqlite3_complete16Ptr + .asFunction)>(); + + /// CAPI3REF: Configuring The SQLite Library + /// + /// The sqlite3_config() interface is used to make global configuration + /// changes to SQLite in order to tune SQLite to the specific needs of + /// the application. The default configuration is recommended for most + /// applications and so this routine is usually not necessary. It is + /// provided to support rare applications with unusual needs. + /// + /// The sqlite3_config() interface is not threadsafe. The application + /// must ensure that no other SQLite interfaces are invoked by other + /// threads while sqlite3_config() is running. + /// + /// The sqlite3_config() interface + /// may only be invoked prior to library initialization using + /// [sqlite3_initialize()] or after shutdown by [sqlite3_shutdown()]. + /// ^If sqlite3_config() is called after [sqlite3_initialize()] and before + /// [sqlite3_shutdown()] then it will return SQLITE_MISUSE. + /// Note, however, that ^sqlite3_config() can be called as part of the + /// implementation of an application-defined [sqlite3_os_init()]. + /// + /// The first argument to sqlite3_config() is an integer + /// [configuration option] that determines + /// what property of SQLite is to be configured. Subsequent arguments + /// vary depending on the [configuration option] + /// in the first argument. + /// + /// ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK]. + /// ^If the option is unknown or SQLite is unable to set the option + /// then this routine returns a non-zero [error code]. + int sqlite3_config(int arg0) { + return _sqlite3_config(arg0); + } + + late final _sqlite3_configPtr = + _lookup>('sqlite3_config'); + late final _sqlite3_config = _sqlite3_configPtr + .asFunction(); + + /// CAPI3REF: Database Connection For Functions + /// METHOD: sqlite3_context + /// + /// ^The sqlite3_context_db_handle() interface returns a copy of + /// the pointer to the [database connection] (the 1st parameter) + /// of the [sqlite3_create_function()] + /// and [sqlite3_create_function16()] routines that originally + /// registered the application defined function. + ffi.Pointer sqlite3_context_db_handle( + ffi.Pointer arg0, + ) { + return _sqlite3_context_db_handle(arg0); + } + + late final _sqlite3_context_db_handlePtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer) + > + >('sqlite3_context_db_handle'); + late final _sqlite3_context_db_handle = _sqlite3_context_db_handlePtr + .asFunction< + ffi.Pointer Function(ffi.Pointer) + >(); + + /// CAPI3REF: Define New Collating Sequences + /// METHOD: sqlite3 + /// + /// ^These functions add, remove, or modify a [collation] associated + /// with the [database connection] specified as the first argument. + /// + /// ^The name of the collation is a UTF-8 string + /// for sqlite3_create_collation() and sqlite3_create_collation_v2() + /// and a UTF-16 string in native byte order for sqlite3_create_collation16(). + /// ^Collation names that compare equal according to [sqlite3_strnicmp()] are + /// considered to be the same name. + /// + /// ^(The third argument (eTextRep) must be one of the constants: + ///
    + ///
  • [SQLITE_UTF8], + ///
  • [SQLITE_UTF16LE], + ///
  • [SQLITE_UTF16BE], + ///
  • [SQLITE_UTF16], or + ///
  • [SQLITE_UTF16_ALIGNED]. + ///
)^ + /// ^The eTextRep argument determines the encoding of strings passed + /// to the collating function callback, xCompare. + /// ^The [SQLITE_UTF16] and [SQLITE_UTF16_ALIGNED] values for eTextRep + /// force strings to be UTF16 with native byte order. + /// ^The [SQLITE_UTF16_ALIGNED] value for eTextRep forces strings to begin + /// on an even byte address. + /// + /// ^The fourth argument, pArg, is an application data pointer that is passed + /// through as the first argument to the collating function callback. + /// + /// ^The fifth argument, xCompare, is a pointer to the collating function. + /// ^Multiple collating functions can be registered using the same name but + /// with different eTextRep parameters and SQLite will use whichever + /// function requires the least amount of data transformation. + /// ^If the xCompare argument is NULL then the collating function is + /// deleted. ^When all collating functions having the same name are deleted, + /// that collation is no longer usable. + /// + /// ^The collating function callback is invoked with a copy of the pArg + /// application data pointer and with two strings in the encoding specified + /// by the eTextRep argument. The two integer parameters to the collating + /// function callback are the length of the two strings, in bytes. The collating + /// function must return an integer that is negative, zero, or positive + /// if the first string is less than, equal to, or greater than the second, + /// respectively. A collating function must always return the same answer + /// given the same inputs. If two or more collating functions are registered + /// to the same collation name (using different eTextRep values) then all + /// must give an equivalent answer when invoked with equivalent strings. + /// The collating function must obey the following properties for all + /// strings A, B, and C: + /// + ///
    + ///
  1. If A==B then B==A. + ///
  2. If A==B and B==C then A==C. + ///
  3. If A<B THEN B>A. + ///
  4. If A<B and B<C then A<C. + ///
+ /// + /// If a collating function fails any of the above constraints and that + /// collating function is registered and used, then the behavior of SQLite + /// is undefined. + /// + /// ^The sqlite3_create_collation_v2() works like sqlite3_create_collation() + /// with the addition that the xDestroy callback is invoked on pArg when + /// the collating function is deleted. + /// ^Collating functions are deleted when they are overridden by later + /// calls to the collation creation functions or when the + /// [database connection] is closed using [sqlite3_close()]. + /// + /// ^The xDestroy callback is not called if the + /// sqlite3_create_collation_v2() function fails. Applications that invoke + /// sqlite3_create_collation_v2() with a non-NULL xDestroy argument should + /// check the return code and dispose of the application data pointer + /// themselves rather than expecting SQLite to deal with it for them. + /// This is different from every other SQLite interface. The inconsistency + /// is unfortunate but cannot be changed without breaking backwards + /// compatibility. + /// + /// See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()]. + int sqlite3_create_collation( + ffi.Pointer arg0, + ffi.Pointer zName, + int eTextRep, + ffi.Pointer pArg, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ) + > + > + xCompare, + ) { + return _sqlite3_create_collation(arg0, zName, eTextRep, pArg, xCompare); + } + + late final _sqlite3_create_collationPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ) + > + >, + ) + > + >('sqlite3_create_collation'); + late final _sqlite3_create_collation = _sqlite3_create_collationPtr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ) + > + >, + ) + >(); + + int sqlite3_create_collation16( + ffi.Pointer arg0, + ffi.Pointer zName, + int eTextRep, + ffi.Pointer pArg, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ) + > + > + xCompare, + ) { + return _sqlite3_create_collation16(arg0, zName, eTextRep, pArg, xCompare); + } + + late final _sqlite3_create_collation16Ptr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ) + > + >, + ) + > + >('sqlite3_create_collation16'); + late final _sqlite3_create_collation16 = _sqlite3_create_collation16Ptr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ) + > + >, + ) + >(); + + int sqlite3_create_collation_v2( + ffi.Pointer arg0, + ffi.Pointer zName, + int eTextRep, + ffi.Pointer pArg, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ) + > + > + xCompare, + ffi.Pointer)>> + xDestroy, + ) { + return _sqlite3_create_collation_v2( + arg0, + zName, + eTextRep, + pArg, + xCompare, + xDestroy, + ); + } + + late final _sqlite3_create_collation_v2Ptr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ) + > + >, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + > + >('sqlite3_create_collation_v2'); + late final _sqlite3_create_collation_v2 = _sqlite3_create_collation_v2Ptr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ) + > + >, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + >(); + + /// CAPI3REF: Create and Destroy VFS Filenames + /// + /// These interfces are provided for use by [VFS shim] implementations and + /// are not useful outside of that context. + /// + /// The sqlite3_create_filename(D,J,W,N,P) allocates memory to hold a version of + /// database filename D with corresponding journal file J and WAL file W and + /// with N URI parameters key/values pairs in the array P. The result from + /// sqlite3_create_filename(D,J,W,N,P) is a pointer to a database filename that + /// is safe to pass to routines like: + ///
    + ///
  • [sqlite3_uri_parameter()], + ///
  • [sqlite3_uri_boolean()], + ///
  • [sqlite3_uri_int64()], + ///
  • [sqlite3_uri_key()], + ///
  • [sqlite3_filename_database()], + ///
  • [sqlite3_filename_journal()], or + ///
  • [sqlite3_filename_wal()]. + ///
+ /// If a memory allocation error occurs, sqlite3_create_filename() might + /// return a NULL pointer. The memory obtained from sqlite3_create_filename(X) + /// must be released by a corresponding call to sqlite3_free_filename(Y). + /// + /// The P parameter in sqlite3_create_filename(D,J,W,N,P) should be an array + /// of 2*N pointers to strings. Each pair of pointers in this array corresponds + /// to a key and value for a query parameter. The P parameter may be a NULL + /// pointer if N is zero. None of the 2*N pointers in the P array may be + /// NULL pointers and key pointers should not be empty strings. + /// None of the D, J, or W parameters to sqlite3_create_filename(D,J,W,N,P) may + /// be NULL pointers, though they can be empty strings. + /// + /// The sqlite3_free_filename(Y) routine releases a memory allocation + /// previously obtained from sqlite3_create_filename(). Invoking + /// sqlite3_free_filename(Y) where Y is a NULL pointer is a harmless no-op. + /// + /// If the Y parameter to sqlite3_free_filename(Y) is anything other + /// than a NULL pointer or a pointer previously acquired from + /// sqlite3_create_filename(), then bad things such as heap + /// corruption or segfaults may occur. The value Y should be + /// used again after sqlite3_free_filename(Y) has been called. This means + /// that if the [sqlite3_vfs.xOpen()] method of a VFS has been called using Y, + /// then the corresponding [sqlite3_module.xClose() method should also be + /// invoked prior to calling sqlite3_free_filename(Y). + ffi.Pointer sqlite3_create_filename( + ffi.Pointer zDatabase, + ffi.Pointer zJournal, + ffi.Pointer zWal, + int nParam, + ffi.Pointer> azParam, + ) { + return _sqlite3_create_filename(zDatabase, zJournal, zWal, nParam, azParam); + } + + late final _sqlite3_create_filenamePtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ) + > + >('sqlite3_create_filename'); + late final _sqlite3_create_filename = _sqlite3_create_filenamePtr + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ) + >(); + + /// CAPI3REF: Create Or Redefine SQL Functions + /// KEYWORDS: {function creation routines} + /// METHOD: sqlite3 + /// + /// ^These functions (collectively known as "function creation routines") + /// are used to add SQL functions or aggregates or to redefine the behavior + /// of existing SQL functions or aggregates. The only differences between + /// the three "sqlite3_create_function*" routines are the text encoding + /// expected for the second parameter (the name of the function being + /// created) and the presence or absence of a destructor callback for + /// the application data pointer. Function sqlite3_create_window_function() + /// is similar, but allows the user to supply the extra callback functions + /// needed by [aggregate window functions]. + /// + /// ^The first parameter is the [database connection] to which the SQL + /// function is to be added. ^If an application uses more than one database + /// connection then application-defined SQL functions must be added + /// to each database connection separately. + /// + /// ^The second parameter is the name of the SQL function to be created or + /// redefined. ^The length of the name is limited to 255 bytes in a UTF-8 + /// representation, exclusive of the zero-terminator. ^Note that the name + /// length limit is in UTF-8 bytes, not characters nor UTF-16 bytes. + /// ^Any attempt to create a function with a longer name + /// will result in [SQLITE_MISUSE] being returned. + /// + /// ^The third parameter (nArg) + /// is the number of arguments that the SQL function or + /// aggregate takes. ^If this parameter is -1, then the SQL function or + /// aggregate may take any number of arguments between 0 and the limit + /// set by [sqlite3_limit]([SQLITE_LIMIT_FUNCTION_ARG]). If the third + /// parameter is less than -1 or greater than 127 then the behavior is + /// undefined. + /// + /// ^The fourth parameter, eTextRep, specifies what + /// [SQLITE_UTF8 | text encoding] this SQL function prefers for + /// its parameters. The application should set this parameter to + /// [SQLITE_UTF16LE] if the function implementation invokes + /// [sqlite3_value_text16le()] on an input, or [SQLITE_UTF16BE] if the + /// implementation invokes [sqlite3_value_text16be()] on an input, or + /// [SQLITE_UTF16] if [sqlite3_value_text16()] is used, or [SQLITE_UTF8] + /// otherwise. ^The same SQL function may be registered multiple times using + /// different preferred text encodings, with different implementations for + /// each encoding. + /// ^When multiple implementations of the same function are available, SQLite + /// will pick the one that involves the least amount of data conversion. + /// + /// ^The fourth parameter may optionally be ORed with [SQLITE_DETERMINISTIC] + /// to signal that the function will always return the same result given + /// the same inputs within a single SQL statement. Most SQL functions are + /// deterministic. The built-in [random()] SQL function is an example of a + /// function that is not deterministic. The SQLite query planner is able to + /// perform additional optimizations on deterministic functions, so use + /// of the [SQLITE_DETERMINISTIC] flag is recommended where possible. + /// + /// ^The fourth parameter may also optionally include the [SQLITE_DIRECTONLY] + /// flag, which if present prevents the function from being invoked from + /// within VIEWs, TRIGGERs, CHECK constraints, generated column expressions, + /// index expressions, or the WHERE clause of partial indexes. + /// + /// + /// For best security, the [SQLITE_DIRECTONLY] flag is recommended for + /// all application-defined SQL functions that do not need to be + /// used inside of triggers, view, CHECK constraints, or other elements of + /// the database schema. This flags is especially recommended for SQL + /// functions that have side effects or reveal internal application state. + /// Without this flag, an attacker might be able to modify the schema of + /// a database file to include invocations of the function with parameters + /// chosen by the attacker, which the application will then execute when + /// the database file is opened and read. + /// + /// + /// ^(The fifth parameter is an arbitrary pointer. The implementation of the + /// function can gain access to this pointer using [sqlite3_user_data()].)^ + /// + /// ^The sixth, seventh and eighth parameters passed to the three + /// "sqlite3_create_function*" functions, xFunc, xStep and xFinal, are + /// pointers to C-language functions that implement the SQL function or + /// aggregate. ^A scalar SQL function requires an implementation of the xFunc + /// callback only; NULL pointers must be passed as the xStep and xFinal + /// parameters. ^An aggregate SQL function requires an implementation of xStep + /// and xFinal and NULL pointer must be passed for xFunc. ^To delete an existing + /// SQL function or aggregate, pass NULL pointers for all three function + /// callbacks. + /// + /// ^The sixth, seventh, eighth and ninth parameters (xStep, xFinal, xValue + /// and xInverse) passed to sqlite3_create_window_function are pointers to + /// C-language callbacks that implement the new function. xStep and xFinal + /// must both be non-NULL. xValue and xInverse may either both be NULL, in + /// which case a regular aggregate function is created, or must both be + /// non-NULL, in which case the new function may be used as either an aggregate + /// or aggregate window function. More details regarding the implementation + /// of aggregate window functions are + /// [user-defined window functions|available here]. + /// + /// ^(If the final parameter to sqlite3_create_function_v2() or + /// sqlite3_create_window_function() is not NULL, then it is destructor for + /// the application data pointer. The destructor is invoked when the function + /// is deleted, either by being overloaded or when the database connection + /// closes.)^ ^The destructor is also invoked if the call to + /// sqlite3_create_function_v2() fails. ^When the destructor callback is + /// invoked, it is passed a single argument which is a copy of the application + /// data pointer which was the fifth parameter to sqlite3_create_function_v2(). + /// + /// ^It is permitted to register multiple implementations of the same + /// functions with the same name but with either differing numbers of + /// arguments or differing preferred text encodings. ^SQLite will use + /// the implementation that most closely matches the way in which the + /// SQL function is used. ^A function implementation with a non-negative + /// nArg parameter is a better match than a function implementation with + /// a negative nArg. ^A function where the preferred text encoding + /// matches the database encoding is a better + /// match than a function where the encoding is different. + /// ^A function where the encoding difference is between UTF16le and UTF16be + /// is a closer match than a function where the encoding difference is + /// between UTF8 and UTF16. + /// + /// ^Built-in functions may be overloaded by new application-defined functions. + /// + /// ^An application-defined function is permitted to call other + /// SQLite interfaces. However, such calls must not + /// close the database connection nor finalize or reset the prepared + /// statement in which the function is running. + int sqlite3_create_function( + ffi.Pointer db, + ffi.Pointer zFunctionName, + int nArg, + int eTextRep, + ffi.Pointer pApp, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ) + > + > + xFunc, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ) + > + > + xStep, + ffi.Pointer< + ffi.NativeFunction)> + > + xFinal, + ) { + return _sqlite3_create_function( + db, + zFunctionName, + nArg, + eTextRep, + pApp, + xFunc, + xStep, + xFinal, + ); + } + + late final _sqlite3_create_functionPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Int, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ) + > + >, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ) + > + >, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer) + > + >, + ) + > + >('sqlite3_create_function'); + late final _sqlite3_create_function = _sqlite3_create_functionPtr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ) + > + >, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ) + > + >, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + >(); + + int sqlite3_create_function16( + ffi.Pointer db, + ffi.Pointer zFunctionName, + int nArg, + int eTextRep, + ffi.Pointer pApp, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ) + > + > + xFunc, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ) + > + > + xStep, + ffi.Pointer< + ffi.NativeFunction)> + > + xFinal, + ) { + return _sqlite3_create_function16( + db, + zFunctionName, + nArg, + eTextRep, + pApp, + xFunc, + xStep, + xFinal, + ); + } + + late final _sqlite3_create_function16Ptr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Int, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ) + > + >, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ) + > + >, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer) + > + >, + ) + > + >('sqlite3_create_function16'); + late final _sqlite3_create_function16 = _sqlite3_create_function16Ptr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ) + > + >, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ) + > + >, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + >(); + + int sqlite3_create_function_v2( + ffi.Pointer db, + ffi.Pointer zFunctionName, + int nArg, + int eTextRep, + ffi.Pointer pApp, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ) + > + > + xFunc, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ) + > + > + xStep, + ffi.Pointer< + ffi.NativeFunction)> + > + xFinal, + ffi.Pointer)>> + xDestroy, + ) { + return _sqlite3_create_function_v2( + db, + zFunctionName, + nArg, + eTextRep, + pApp, + xFunc, + xStep, + xFinal, + xDestroy, + ); + } + + late final _sqlite3_create_function_v2Ptr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Int, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ) + > + >, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ) + > + >, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer) + > + >, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + > + >('sqlite3_create_function_v2'); + late final _sqlite3_create_function_v2 = _sqlite3_create_function_v2Ptr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ) + > + >, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ) + > + >, + ffi.Pointer< + ffi.NativeFunction)> + >, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + >(); + + /// CAPI3REF: Register A Virtual Table Implementation + /// METHOD: sqlite3 + /// + /// ^These routines are used to register a new [virtual table module] name. + /// ^Module names must be registered before + /// creating a new [virtual table] using the module and before using a + /// preexisting [virtual table] for the module. + /// + /// ^The module name is registered on the [database connection] specified + /// by the first parameter. ^The name of the module is given by the + /// second parameter. ^The third parameter is a pointer to + /// the implementation of the [virtual table module]. ^The fourth + /// parameter is an arbitrary client data pointer that is passed through + /// into the [xCreate] and [xConnect] methods of the virtual table module + /// when a new virtual table is be being created or reinitialized. + /// + /// ^The sqlite3_create_module_v2() interface has a fifth parameter which + /// is a pointer to a destructor for the pClientData. ^SQLite will + /// invoke the destructor function (if it is not NULL) when SQLite + /// no longer needs the pClientData pointer. ^The destructor will also + /// be invoked if the call to sqlite3_create_module_v2() fails. + /// ^The sqlite3_create_module() + /// interface is equivalent to sqlite3_create_module_v2() with a NULL + /// destructor. + /// + /// ^If the third parameter (the pointer to the sqlite3_module object) is + /// NULL then no new module is create and any existing modules with the + /// same name are dropped. + /// + /// See also: [sqlite3_drop_modules()] + int sqlite3_create_module( + ffi.Pointer db, + ffi.Pointer zName, + ffi.Pointer p, + ffi.Pointer pClientData, + ) { + return _sqlite3_create_module(db, zName, p, pClientData); + } + + late final _sqlite3_create_modulePtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >('sqlite3_create_module'); + late final _sqlite3_create_module = _sqlite3_create_modulePtr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); + + int sqlite3_create_module_v2( + ffi.Pointer db, + ffi.Pointer zName, + ffi.Pointer p, + ffi.Pointer pClientData, + ffi.Pointer)>> + xDestroy, + ) { + return _sqlite3_create_module_v2(db, zName, p, pClientData, xDestroy); + } + + late final _sqlite3_create_module_v2Ptr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + > + >('sqlite3_create_module_v2'); + late final _sqlite3_create_module_v2 = _sqlite3_create_module_v2Ptr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + >(); + + int sqlite3_create_window_function( + ffi.Pointer db, + ffi.Pointer zFunctionName, + int nArg, + int eTextRep, + ffi.Pointer pApp, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ) + > + > + xStep, + ffi.Pointer< + ffi.NativeFunction)> + > + xFinal, + ffi.Pointer< + ffi.NativeFunction)> + > + xValue, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ) + > + > + xInverse, + ffi.Pointer)>> + xDestroy, + ) { + return _sqlite3_create_window_function( + db, + zFunctionName, + nArg, + eTextRep, + pApp, + xStep, + xFinal, + xValue, + xInverse, + xDestroy, + ); + } + + late final _sqlite3_create_window_functionPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Int, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ) + > + >, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer) + > + >, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer) + > + >, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ) + > + >, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + > + >('sqlite3_create_window_function'); + late final _sqlite3_create_window_function = + _sqlite3_create_window_functionPtr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ) + > + >, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer) + > + >, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer) + > + >, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ) + > + >, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + >(); + + /// CAPI3REF: Number of columns in a result set + /// METHOD: sqlite3_stmt + /// + /// ^The sqlite3_data_count(P) interface returns the number of columns in the + /// current row of the result set of [prepared statement] P. + /// ^If prepared statement P does not have results ready to return + /// (via calls to the [sqlite3_column_int | sqlite3_column()] family of + /// interfaces) then sqlite3_data_count(P) returns 0. + /// ^The sqlite3_data_count(P) routine also returns 0 if P is a NULL pointer. + /// ^The sqlite3_data_count(P) routine returns 0 if the previous call to + /// [sqlite3_step](P) returned [SQLITE_DONE]. ^The sqlite3_data_count(P) + /// will return non-zero if previous call to [sqlite3_step](P) returned + /// [SQLITE_ROW], except in the case of the [PRAGMA incremental_vacuum] + /// where it always returns zero since each step of that multi-step + /// pragma returns 0 columns of data. + /// + /// See also: [sqlite3_column_count()] + int sqlite3_data_count(ffi.Pointer pStmt) { + return _sqlite3_data_count(pStmt); + } + + late final _sqlite3_data_countPtr = + _lookup)>>( + 'sqlite3_data_count', + ); + late final _sqlite3_data_count = _sqlite3_data_countPtr + .asFunction)>(); + + /// CAPI3REF: Name Of The Folder Holding Database Files + /// + /// ^(If this global variable is made to point to a string which is + /// the name of a folder (a.k.a. directory), then all database files + /// specified with a relative pathname and created or accessed by + /// SQLite when using a built-in windows [sqlite3_vfs | VFS] will be assumed + /// to be relative to that directory.)^ ^If this variable is a NULL + /// pointer, then SQLite assumes that all database files specified + /// with a relative pathname are relative to the current directory + /// for the process. Only the windows VFS makes use of this global + /// variable; it is ignored by the unix VFS. + /// + /// Changing the value of this variable while a database connection is + /// open can result in a corrupt database. + /// + /// It is not safe to read or modify this variable in more than one + /// thread at a time. It is not safe to read or modify this variable + /// if a [database connection] is being used at the same time in a separate + /// thread. + /// It is intended that this variable be set once + /// as part of process initialization and before any SQLite interface + /// routines have been called and that this variable remain unchanged + /// thereafter. + /// + /// ^The [data_store_directory pragma] may modify this variable and cause + /// it to point to memory obtained from [sqlite3_malloc]. ^Furthermore, + /// the [data_store_directory pragma] always assumes that any string + /// that this variable points to is held in memory obtained from + /// [sqlite3_malloc] and the pragma may attempt to free that memory + /// using [sqlite3_free]. + /// Hence, if this variable is modified directly, either it should be + /// made NULL or made to point to memory obtained from [sqlite3_malloc] + /// or else the use of the [data_store_directory pragma] should be avoided. + late final ffi.Pointer> _sqlite3_data_directory = + _lookup>('sqlite3_data_directory'); + + ffi.Pointer get sqlite3_data_directory => + _sqlite3_data_directory.value; + + set sqlite3_data_directory(ffi.Pointer value) => + _sqlite3_data_directory.value = value; + + /// CAPI3REF: Database File Corresponding To A Journal + /// + /// ^If X is the name of a rollback or WAL-mode journal file that is + /// passed into the xOpen method of [sqlite3_vfs], then + /// sqlite3_database_file_object(X) returns a pointer to the [sqlite3_file] + /// object that represents the main database file. + /// + /// This routine is intended for use in custom [VFS] implementations + /// only. It is not a general-purpose interface. + /// The argument sqlite3_file_object(X) must be a filename pointer that + /// has been passed into [sqlite3_vfs].xOpen method where the + /// flags parameter to xOpen contains one of the bits + /// [SQLITE_OPEN_MAIN_JOURNAL] or [SQLITE_OPEN_WAL]. Any other use + /// of this routine results in undefined and probably undesirable + /// behavior. + ffi.Pointer sqlite3_database_file_object( + ffi.Pointer arg0, + ) { + return _sqlite3_database_file_object(arg0); + } + + late final _sqlite3_database_file_objectPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer) + > + >('sqlite3_database_file_object'); + late final _sqlite3_database_file_object = _sqlite3_database_file_objectPtr + .asFunction Function(ffi.Pointer)>(); + + /// CAPI3REF: Flush caches to disk mid-transaction + /// + /// ^If a write-transaction is open on [database connection] D when the + /// [sqlite3_db_cacheflush(D)] interface invoked, any dirty + /// pages in the pager-cache that are not currently in use are written out + /// to disk. A dirty page may be in use if a database cursor created by an + /// active SQL statement is reading from it, or if it is page 1 of a database + /// file (page 1 is always "in use"). ^The [sqlite3_db_cacheflush(D)] + /// interface flushes caches for all schemas - "main", "temp", and + /// any [attached] databases. + /// + /// ^If this function needs to obtain extra database locks before dirty pages + /// can be flushed to disk, it does so. ^If those locks cannot be obtained + /// immediately and there is a busy-handler callback configured, it is invoked + /// in the usual manner. ^If the required lock still cannot be obtained, then + /// the database is skipped and an attempt made to flush any dirty pages + /// belonging to the next (if any) database. ^If any databases are skipped + /// because locks cannot be obtained, but no other error occurs, this + /// function returns SQLITE_BUSY. + /// + /// ^If any other error occurs while flushing dirty pages to disk (for + /// example an IO error or out-of-memory condition), then processing is + /// abandoned and an SQLite [error code] is returned to the caller immediately. + /// + /// ^Otherwise, if no error occurs, [sqlite3_db_cacheflush()] returns SQLITE_OK. + /// + /// ^This function does not set the database handle error code or message + /// returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions. + int sqlite3_db_cacheflush(ffi.Pointer arg0) { + return _sqlite3_db_cacheflush(arg0); + } + + late final _sqlite3_db_cacheflushPtr = + _lookup)>>( + 'sqlite3_db_cacheflush', + ); + late final _sqlite3_db_cacheflush = _sqlite3_db_cacheflushPtr + .asFunction)>(); + + /// CAPI3REF: Configure database connections + /// METHOD: sqlite3 + /// + /// The sqlite3_db_config() interface is used to make configuration + /// changes to a [database connection]. The interface is similar to + /// [sqlite3_config()] except that the changes apply to a single + /// [database connection] (specified in the first argument). + /// + /// The second argument to sqlite3_db_config(D,V,...) is the + /// [SQLITE_DBCONFIG_LOOKASIDE | configuration verb] - an integer code + /// that indicates what aspect of the [database connection] is being configured. + /// Subsequent arguments vary depending on the configuration verb. + /// + /// ^Calls to sqlite3_db_config() return SQLITE_OK if and only if + /// the call is considered successful. + int sqlite3_db_config(ffi.Pointer arg0, int op) { + return _sqlite3_db_config(arg0, op); + } + + late final _sqlite3_db_configPtr = + _lookup< + ffi.NativeFunction, ffi.Int)> + >('sqlite3_db_config'); + late final _sqlite3_db_config = _sqlite3_db_configPtr + .asFunction, int)>(); + + /// CAPI3REF: Return The Filename For A Database Connection + /// METHOD: sqlite3 + /// + /// ^The sqlite3_db_filename(D,N) interface returns a pointer to the filename + /// associated with database N of connection D. + /// ^If there is no attached database N on the database + /// connection D, or if database N is a temporary or in-memory database, then + /// this function will return either a NULL pointer or an empty string. + /// + /// ^The string value returned by this routine is owned and managed by + /// the database connection. ^The value will be valid until the database N + /// is [DETACH]-ed or until the database connection closes. + /// + /// ^The filename returned by this function is the output of the + /// xFullPathname method of the [VFS]. ^In other words, the filename + /// will be an absolute pathname, even if the filename used + /// to open the database originally was a URI or relative pathname. + /// + /// If the filename pointer returned by this routine is not NULL, then it + /// can be used as the filename input parameter to these routines: + ///
    + ///
  • [sqlite3_uri_parameter()] + ///
  • [sqlite3_uri_boolean()] + ///
  • [sqlite3_uri_int64()] + ///
  • [sqlite3_filename_database()] + ///
  • [sqlite3_filename_journal()] + ///
  • [sqlite3_filename_wal()] + ///
+ ffi.Pointer sqlite3_db_filename( + ffi.Pointer db, + ffi.Pointer zDbName, + ) { + return _sqlite3_db_filename(db, zDbName); + } + + late final _sqlite3_db_filenamePtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >('sqlite3_db_filename'); + late final _sqlite3_db_filename = _sqlite3_db_filenamePtr + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); + + /// CAPI3REF: Find The Database Handle Of A Prepared Statement + /// METHOD: sqlite3_stmt + /// + /// ^The sqlite3_db_handle interface returns the [database connection] handle + /// to which a [prepared statement] belongs. ^The [database connection] + /// returned by sqlite3_db_handle is the same [database connection] + /// that was the first argument + /// to the [sqlite3_prepare_v2()] call (or its variants) that was used to + /// create the statement in the first place. + ffi.Pointer sqlite3_db_handle(ffi.Pointer arg0) { + return _sqlite3_db_handle(arg0); + } + + late final _sqlite3_db_handlePtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer) + > + >('sqlite3_db_handle'); + late final _sqlite3_db_handle = _sqlite3_db_handlePtr + .asFunction Function(ffi.Pointer)>(); + + /// CAPI3REF: Retrieve the mutex for a database connection + /// METHOD: sqlite3 + /// + /// ^This interface returns a pointer the [sqlite3_mutex] object that + /// serializes access to the [database connection] given in the argument + /// when the [threading mode] is Serialized. + /// ^If the [threading mode] is Single-thread or Multi-thread then this + /// routine returns a NULL pointer. + ffi.Pointer sqlite3_db_mutex(ffi.Pointer arg0) { + return _sqlite3_db_mutex(arg0); + } + + late final _sqlite3_db_mutexPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer) + > + >('sqlite3_db_mutex'); + late final _sqlite3_db_mutex = _sqlite3_db_mutexPtr + .asFunction Function(ffi.Pointer)>(); + + /// CAPI3REF: Determine if a database is read-only + /// METHOD: sqlite3 + /// + /// ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N + /// of connection D is read-only, 0 if it is read/write, or -1 if N is not + /// the name of a database on connection D. + int sqlite3_db_readonly( + ffi.Pointer db, + ffi.Pointer zDbName, + ) { + return _sqlite3_db_readonly(db, zDbName); + } + + late final _sqlite3_db_readonlyPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer) + > + >('sqlite3_db_readonly'); + late final _sqlite3_db_readonly = _sqlite3_db_readonlyPtr + .asFunction, ffi.Pointer)>(); + + /// CAPI3REF: Free Memory Used By A Database Connection + /// METHOD: sqlite3 + /// + /// ^The sqlite3_db_release_memory(D) interface attempts to free as much heap + /// memory as possible from database connection D. Unlike the + /// [sqlite3_release_memory()] interface, this interface is in effect even + /// when the [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is + /// omitted. + /// + /// See also: [sqlite3_release_memory()] + int sqlite3_db_release_memory(ffi.Pointer arg0) { + return _sqlite3_db_release_memory(arg0); + } + + late final _sqlite3_db_release_memoryPtr = + _lookup)>>( + 'sqlite3_db_release_memory', + ); + late final _sqlite3_db_release_memory = _sqlite3_db_release_memoryPtr + .asFunction)>(); + + /// CAPI3REF: Database Connection Status + /// METHOD: sqlite3 + /// + /// ^This interface is used to retrieve runtime status information + /// about a single [database connection]. ^The first argument is the + /// database connection object to be interrogated. ^The second argument + /// is an integer constant, taken from the set of + /// [SQLITE_DBSTATUS options], that + /// determines the parameter to interrogate. The set of + /// [SQLITE_DBSTATUS options] is likely + /// to grow in future releases of SQLite. + /// + /// ^The current value of the requested parameter is written into *pCur + /// and the highest instantaneous value is written into *pHiwtr. ^If + /// the resetFlg is true, then the highest instantaneous value is + /// reset back down to the current value. + /// + /// ^The sqlite3_db_status() routine returns SQLITE_OK on success and a + /// non-zero [error code] on failure. + /// + /// See also: [sqlite3_status()] and [sqlite3_stmt_status()]. + int sqlite3_db_status( + ffi.Pointer arg0, + int op, + ffi.Pointer pCur, + ffi.Pointer pHiwtr, + int resetFlg, + ) { + return _sqlite3_db_status(arg0, op, pCur, pHiwtr, resetFlg); + } + + late final _sqlite3_db_statusPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ) + > + >('sqlite3_db_status'); + late final _sqlite3_db_status = _sqlite3_db_statusPtr + .asFunction< + int Function( + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + int, + ) + >(); + + /// CAPI3REF: Declare The Schema Of A Virtual Table + /// + /// ^The [xCreate] and [xConnect] methods of a + /// [virtual table module] call this interface + /// to declare the format (the names and datatypes of the columns) of + /// the virtual tables they implement. + int sqlite3_declare_vtab( + ffi.Pointer arg0, + ffi.Pointer zSQL, + ) { + return _sqlite3_declare_vtab(arg0, zSQL); + } + + late final _sqlite3_declare_vtabPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer) + > + >('sqlite3_declare_vtab'); + late final _sqlite3_declare_vtab = _sqlite3_declare_vtabPtr + .asFunction, ffi.Pointer)>(); + + /// CAPI3REF: Deserialize a database + /// + /// The sqlite3_deserialize(D,S,P,N,M,F) interface causes the + /// [database connection] D to disconnect from database S and then + /// reopen S as an in-memory database based on the serialization contained + /// in P. The serialized database P is N bytes in size. M is the size of + /// the buffer P, which might be larger than N. If M is larger than N, and + /// the SQLITE_DESERIALIZE_READONLY bit is not set in F, then SQLite is + /// permitted to add content to the in-memory database as long as the total + /// size does not exceed M bytes. + /// + /// If the SQLITE_DESERIALIZE_FREEONCLOSE bit is set in F, then SQLite will + /// invoke sqlite3_free() on the serialization buffer when the database + /// connection closes. If the SQLITE_DESERIALIZE_RESIZEABLE bit is set, then + /// SQLite will try to increase the buffer size using sqlite3_realloc64() + /// if writes on the database cause it to grow larger than M bytes. + /// + /// The sqlite3_deserialize() interface will fail with SQLITE_BUSY if the + /// database is currently in a read transaction or is involved in a backup + /// operation. + /// + /// If sqlite3_deserialize(D,S,P,N,M,F) fails for any reason and if the + /// SQLITE_DESERIALIZE_FREEONCLOSE bit is set in argument F, then + /// [sqlite3_free()] is invoked on argument P prior to returning. + /// + /// This interface is only available if SQLite is compiled with the + /// [SQLITE_ENABLE_DESERIALIZE] option. + int sqlite3_deserialize( + ffi.Pointer db, + ffi.Pointer zSchema, + ffi.Pointer pData, + int szDb, + int szBuf, + int mFlags, + ) { + return _sqlite3_deserialize(db, zSchema, pData, szDb, szBuf, mFlags); + } + + late final _sqlite3_deserializePtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + sqlite3_int64, + sqlite3_int64, + ffi.UnsignedInt, + ) + > + >('sqlite3_deserialize'); + late final _sqlite3_deserialize = _sqlite3_deserializePtr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + int, + ) + >(); + + /// CAPI3REF: Remove Unnecessary Virtual Table Implementations + /// METHOD: sqlite3 + /// + /// ^The sqlite3_drop_modules(D,L) interface removes all virtual + /// table modules from database connection D except those named on list L. + /// The L parameter must be either NULL or a pointer to an array of pointers + /// to strings where the array is terminated by a single NULL pointer. + /// ^If the L parameter is NULL, then all virtual table modules are removed. + /// + /// See also: [sqlite3_create_module()] + int sqlite3_drop_modules( + ffi.Pointer db, + ffi.Pointer> azKeep, + ) { + return _sqlite3_drop_modules(db, azKeep); + } + + late final _sqlite3_drop_modulesPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer>, + ) + > + >('sqlite3_drop_modules'); + late final _sqlite3_drop_modules = _sqlite3_drop_modulesPtr + .asFunction< + int Function(ffi.Pointer, ffi.Pointer>) + >(); + + /// CAPI3REF: Enable Or Disable Extension Loading + /// METHOD: sqlite3 + /// + /// ^So as not to open security holes in older applications that are + /// unprepared to deal with [extension loading], and as a means of disabling + /// [extension loading] while evaluating user-entered SQL, the following API + /// is provided to turn the [sqlite3_load_extension()] mechanism on and off. + /// + /// ^Extension loading is off by default. + /// ^Call the sqlite3_enable_load_extension() routine with onoff==1 + /// to turn extension loading on and call it with onoff==0 to turn + /// it back off again. + /// + /// ^This interface enables or disables both the C-API + /// [sqlite3_load_extension()] and the SQL function [load_extension()]. + /// ^(Use [sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],..) + /// to enable or disable only the C-API.)^ + /// + /// Security warning: It is recommended that extension loading + /// be enabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method + /// rather than this interface, so the [load_extension()] SQL function + /// remains disabled. This will prevent SQL injections from giving attackers + /// access to extension loading capabilities. + int sqlite3_enable_load_extension(ffi.Pointer db, int onoff) { + return _sqlite3_enable_load_extension(db, onoff); + } + + late final _sqlite3_enable_load_extensionPtr = + _lookup< + ffi.NativeFunction, ffi.Int)> + >('sqlite3_enable_load_extension'); + late final _sqlite3_enable_load_extension = _sqlite3_enable_load_extensionPtr + .asFunction, int)>(); + + /// CAPI3REF: Enable Or Disable Shared Pager Cache + /// + /// ^(This routine enables or disables the sharing of the database cache + /// and schema data structures between [database connection | connections] + /// to the same database. Sharing is enabled if the argument is true + /// and disabled if the argument is false.)^ + /// + /// ^Cache sharing is enabled and disabled for an entire process. + /// This is a change as of SQLite [version 3.5.0] ([dateof:3.5.0]). + /// In prior versions of SQLite, + /// sharing was enabled or disabled for each thread separately. + /// + /// ^(The cache sharing mode set by this interface effects all subsequent + /// calls to [sqlite3_open()], [sqlite3_open_v2()], and [sqlite3_open16()]. + /// Existing database connections continue to use the sharing mode + /// that was in effect at the time they were opened.)^ + /// + /// ^(This routine returns [SQLITE_OK] if shared cache was enabled or disabled + /// successfully. An [error code] is returned otherwise.)^ + /// + /// ^Shared cache is disabled by default. It is recommended that it stay + /// that way. In other words, do not use this routine. This interface + /// continues to be provided for historical compatibility, but its use is + /// discouraged. Any use of shared cache is discouraged. If shared cache + /// must be used, it is recommended that shared cache only be enabled for + /// individual database connections using the [sqlite3_open_v2()] interface + /// with the [SQLITE_OPEN_SHAREDCACHE] flag. + /// + /// Note: This method is disabled on MacOS X 10.7 and iOS version 5.0 + /// and will always return SQLITE_MISUSE. On those systems, + /// shared cache mode should be enabled per-database connection via + /// [sqlite3_open_v2()] with [SQLITE_OPEN_SHAREDCACHE]. + /// + /// This interface is threadsafe on processors where writing a + /// 32-bit integer is atomic. + /// + /// See Also: [SQLite Shared-Cache Mode] + int sqlite3_enable_shared_cache(int arg0) { + return _sqlite3_enable_shared_cache(arg0); + } + + late final _sqlite3_enable_shared_cachePtr = + _lookup>( + 'sqlite3_enable_shared_cache', + ); + late final _sqlite3_enable_shared_cache = _sqlite3_enable_shared_cachePtr + .asFunction(); + + /// CAPI3REF: Error Codes And Messages + /// METHOD: sqlite3 + /// + /// ^If the most recent sqlite3_* API call associated with + /// [database connection] D failed, then the sqlite3_errcode(D) interface + /// returns the numeric [result code] or [extended result code] for that + /// API call. + /// ^The sqlite3_extended_errcode() + /// interface is the same except that it always returns the + /// [extended result code] even when extended result codes are + /// disabled. + /// + /// The values returned by sqlite3_errcode() and/or + /// sqlite3_extended_errcode() might change with each API call. + /// Except, there are some interfaces that are guaranteed to never + /// change the value of the error code. The error-code preserving + /// interfaces are: + /// + ///
    + ///
  • sqlite3_errcode() + ///
  • sqlite3_extended_errcode() + ///
  • sqlite3_errmsg() + ///
  • sqlite3_errmsg16() + ///
+ /// + /// ^The sqlite3_errmsg() and sqlite3_errmsg16() return English-language + /// text that describes the error, as either UTF-8 or UTF-16 respectively. + /// ^(Memory to hold the error message string is managed internally. + /// The application does not need to worry about freeing the result. + /// However, the error string might be overwritten or deallocated by + /// subsequent calls to other SQLite interface functions.)^ + /// + /// ^The sqlite3_errstr() interface returns the English-language text + /// that describes the [result code], as UTF-8. + /// ^(Memory to hold the error message string is managed internally + /// and must not be freed by the application)^. + /// + /// When the serialized [threading mode] is in use, it might be the + /// case that a second error occurs on a separate thread in between + /// the time of the first error and the call to these interfaces. + /// When that happens, the second error will be reported since these + /// interfaces always report the most recent result. To avoid + /// this, each thread can obtain exclusive use of the [database connection] D + /// by invoking [sqlite3_mutex_enter]([sqlite3_db_mutex](D)) before beginning + /// to use D and invoking [sqlite3_mutex_leave]([sqlite3_db_mutex](D)) after + /// all calls to the interfaces listed here are completed. + /// + /// If an interface fails with SQLITE_MISUSE, that means the interface + /// was invoked incorrectly by the application. In that case, the + /// error code and message may or may not be set. + int sqlite3_errcode(ffi.Pointer db) { + return _sqlite3_errcode(db); + } + + late final _sqlite3_errcodePtr = + _lookup)>>( + 'sqlite3_errcode', + ); + late final _sqlite3_errcode = _sqlite3_errcodePtr + .asFunction)>(); + + ffi.Pointer sqlite3_errmsg(ffi.Pointer arg0) { + return _sqlite3_errmsg(arg0); + } + + late final _sqlite3_errmsgPtr = + _lookup< + ffi.NativeFunction Function(ffi.Pointer)> + >('sqlite3_errmsg'); + late final _sqlite3_errmsg = _sqlite3_errmsgPtr + .asFunction Function(ffi.Pointer)>(); + + ffi.Pointer sqlite3_errmsg16(ffi.Pointer arg0) { + return _sqlite3_errmsg16(arg0); + } + + late final _sqlite3_errmsg16Ptr = + _lookup< + ffi.NativeFunction Function(ffi.Pointer)> + >('sqlite3_errmsg16'); + late final _sqlite3_errmsg16 = _sqlite3_errmsg16Ptr + .asFunction Function(ffi.Pointer)>(); + + ffi.Pointer sqlite3_errstr(int arg0) { + return _sqlite3_errstr(arg0); + } + + late final _sqlite3_errstrPtr = + _lookup Function(ffi.Int)>>( + 'sqlite3_errstr', + ); + late final _sqlite3_errstr = _sqlite3_errstrPtr + .asFunction Function(int)>(); + + /// CAPI3REF: One-Step Query Execution Interface + /// METHOD: sqlite3 + /// + /// The sqlite3_exec() interface is a convenience wrapper around + /// [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()], + /// that allows an application to run multiple statements of SQL + /// without having to use a lot of C code. + /// + /// ^The sqlite3_exec() interface runs zero or more UTF-8 encoded, + /// semicolon-separate SQL statements passed into its 2nd argument, + /// in the context of the [database connection] passed in as its 1st + /// argument. ^If the callback function of the 3rd argument to + /// sqlite3_exec() is not NULL, then it is invoked for each result row + /// coming out of the evaluated SQL statements. ^The 4th argument to + /// sqlite3_exec() is relayed through to the 1st argument of each + /// callback invocation. ^If the callback pointer to sqlite3_exec() + /// is NULL, then no callback is ever invoked and result rows are + /// ignored. + /// + /// ^If an error occurs while evaluating the SQL statements passed into + /// sqlite3_exec(), then execution of the current statement stops and + /// subsequent statements are skipped. ^If the 5th parameter to sqlite3_exec() + /// is not NULL then any error message is written into memory obtained + /// from [sqlite3_malloc()] and passed back through the 5th parameter. + /// To avoid memory leaks, the application should invoke [sqlite3_free()] + /// on error message strings returned through the 5th parameter of + /// sqlite3_exec() after the error message string is no longer needed. + /// ^If the 5th parameter to sqlite3_exec() is not NULL and no errors + /// occur, then sqlite3_exec() sets the pointer in its 5th parameter to + /// NULL before returning. + /// + /// ^If an sqlite3_exec() callback returns non-zero, the sqlite3_exec() + /// routine returns SQLITE_ABORT without invoking the callback again and + /// without running any subsequent SQL statements. + /// + /// ^The 2nd argument to the sqlite3_exec() callback function is the + /// number of columns in the result. ^The 3rd argument to the sqlite3_exec() + /// callback is an array of pointers to strings obtained as if from + /// [sqlite3_column_text()], one for each column. ^If an element of a + /// result row is NULL then the corresponding string pointer for the + /// sqlite3_exec() callback is a NULL pointer. ^The 4th argument to the + /// sqlite3_exec() callback is an array of pointers to strings where each + /// entry represents the name of corresponding result column as obtained + /// from [sqlite3_column_name()]. + /// + /// ^If the 2nd parameter to sqlite3_exec() is a NULL pointer, a pointer + /// to an empty string, or a pointer that contains only whitespace and/or + /// SQL comments, then no SQL statements are evaluated and the database + /// is not changed. + /// + /// Restrictions: + /// + ///
    + ///
  • The application must ensure that the 1st parameter to sqlite3_exec() + /// is a valid and open [database connection]. + ///
  • The application must not close the [database connection] specified by + /// the 1st parameter to sqlite3_exec() while sqlite3_exec() is running. + ///
  • The application must not modify the SQL statement text passed into + /// the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running. + ///
+ int sqlite3_exec( + ffi.Pointer arg0, + ffi.Pointer sql, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ffi.Pointer>, + ) + > + > + callback, + ffi.Pointer arg3, + ffi.Pointer> errmsg, + ) { + return _sqlite3_exec(arg0, sql, callback, arg3, errmsg); + } + + late final _sqlite3_execPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ffi.Pointer>, + ) + > + >, + ffi.Pointer, + ffi.Pointer>, + ) + > + >('sqlite3_exec'); + late final _sqlite3_exec = _sqlite3_execPtr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ffi.Pointer>, + ) + > + >, + ffi.Pointer, + ffi.Pointer>, + ) + >(); + + ffi.Pointer sqlite3_expanded_sql(ffi.Pointer pStmt) { + return _sqlite3_expanded_sql(pStmt); + } + + late final _sqlite3_expanded_sqlPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer) + > + >('sqlite3_expanded_sql'); + late final _sqlite3_expanded_sql = _sqlite3_expanded_sqlPtr + .asFunction Function(ffi.Pointer)>(); + + int sqlite3_expired(ffi.Pointer arg0) { + return _sqlite3_expired(arg0); + } + + late final _sqlite3_expiredPtr = + _lookup)>>( + 'sqlite3_expired', + ); + late final _sqlite3_expired = _sqlite3_expiredPtr + .asFunction)>(); + + int sqlite3_extended_errcode(ffi.Pointer db) { + return _sqlite3_extended_errcode(db); + } + + late final _sqlite3_extended_errcodePtr = + _lookup)>>( + 'sqlite3_extended_errcode', + ); + late final _sqlite3_extended_errcode = _sqlite3_extended_errcodePtr + .asFunction)>(); + + /// CAPI3REF: Enable Or Disable Extended Result Codes + /// METHOD: sqlite3 + /// + /// ^The sqlite3_extended_result_codes() routine enables or disables the + /// [extended result codes] feature of SQLite. ^The extended result + /// codes are disabled by default for historical compatibility. + int sqlite3_extended_result_codes(ffi.Pointer arg0, int onoff) { + return _sqlite3_extended_result_codes(arg0, onoff); + } + + late final _sqlite3_extended_result_codesPtr = + _lookup< + ffi.NativeFunction, ffi.Int)> + >('sqlite3_extended_result_codes'); + late final _sqlite3_extended_result_codes = _sqlite3_extended_result_codesPtr + .asFunction, int)>(); + + /// CAPI3REF: Low-Level Control Of Database Files + /// METHOD: sqlite3 + /// KEYWORDS: {file control} + /// + /// ^The [sqlite3_file_control()] interface makes a direct call to the + /// xFileControl method for the [sqlite3_io_methods] object associated + /// with a particular database identified by the second argument. ^The + /// name of the database is "main" for the main database or "temp" for the + /// TEMP database, or the name that appears after the AS keyword for + /// databases that are added using the [ATTACH] SQL command. + /// ^A NULL pointer can be used in place of "main" to refer to the + /// main database file. + /// ^The third and fourth parameters to this routine + /// are passed directly through to the second and third parameters of + /// the xFileControl method. ^The return value of the xFileControl + /// method becomes the return value of this routine. + /// + /// A few opcodes for [sqlite3_file_control()] are handled directly + /// by the SQLite core and never invoke the + /// sqlite3_io_methods.xFileControl method. + /// ^The [SQLITE_FCNTL_FILE_POINTER] value for the op parameter causes + /// a pointer to the underlying [sqlite3_file] object to be written into + /// the space pointed to by the 4th parameter. The + /// [SQLITE_FCNTL_JOURNAL_POINTER] works similarly except that it returns + /// the [sqlite3_file] object associated with the journal file instead of + /// the main database. The [SQLITE_FCNTL_VFS_POINTER] opcode returns + /// a pointer to the underlying [sqlite3_vfs] object for the file. + /// The [SQLITE_FCNTL_DATA_VERSION] returns the data version counter + /// from the pager. + /// + /// ^If the second parameter (zDbName) does not match the name of any + /// open database file, then SQLITE_ERROR is returned. ^This error + /// code is not remembered and will not be recalled by [sqlite3_errcode()] + /// or [sqlite3_errmsg()]. The underlying xFileControl method might + /// also return SQLITE_ERROR. There is no way to distinguish between + /// an incorrect zDbName and an SQLITE_ERROR return from the underlying + /// xFileControl method. + /// + /// See also: [file control opcodes] + int sqlite3_file_control( + ffi.Pointer arg0, + ffi.Pointer zDbName, + int op, + ffi.Pointer arg3, + ) { + return _sqlite3_file_control(arg0, zDbName, op, arg3); + } + + late final _sqlite3_file_controlPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ) + > + >('sqlite3_file_control'); + late final _sqlite3_file_control = _sqlite3_file_controlPtr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ) + >(); + + /// CAPI3REF: Translate filenames + /// + /// These routines are available to [VFS|custom VFS implementations] for + /// translating filenames between the main database file, the journal file, + /// and the WAL file. + /// + /// If F is the name of an sqlite database file, journal file, or WAL file + /// passed by the SQLite core into the VFS, then sqlite3_filename_database(F) + /// returns the name of the corresponding database file. + /// + /// If F is the name of an sqlite database file, journal file, or WAL file + /// passed by the SQLite core into the VFS, or if F is a database filename + /// obtained from [sqlite3_db_filename()], then sqlite3_filename_journal(F) + /// returns the name of the corresponding rollback journal file. + /// + /// If F is the name of an sqlite database file, journal file, or WAL file + /// that was passed by the SQLite core into the VFS, or if F is a database + /// filename obtained from [sqlite3_db_filename()], then + /// sqlite3_filename_wal(F) returns the name of the corresponding + /// WAL file. + /// + /// In all of the above, if F is not the name of a database, journal or WAL + /// filename passed into the VFS from the SQLite core and F is not the + /// return value from [sqlite3_db_filename()], then the result is + /// undefined and is likely a memory access violation. + ffi.Pointer sqlite3_filename_database(ffi.Pointer arg0) { + return _sqlite3_filename_database(arg0); + } + + late final _sqlite3_filename_databasePtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer) + > + >('sqlite3_filename_database'); + late final _sqlite3_filename_database = _sqlite3_filename_databasePtr + .asFunction Function(ffi.Pointer)>(); + + ffi.Pointer sqlite3_filename_journal(ffi.Pointer arg0) { + return _sqlite3_filename_journal(arg0); + } + + late final _sqlite3_filename_journalPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer) + > + >('sqlite3_filename_journal'); + late final _sqlite3_filename_journal = _sqlite3_filename_journalPtr + .asFunction Function(ffi.Pointer)>(); + + ffi.Pointer sqlite3_filename_wal(ffi.Pointer arg0) { + return _sqlite3_filename_wal(arg0); + } + + late final _sqlite3_filename_walPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer) + > + >('sqlite3_filename_wal'); + late final _sqlite3_filename_wal = _sqlite3_filename_walPtr + .asFunction Function(ffi.Pointer)>(); + + /// CAPI3REF: Destroy A Prepared Statement Object + /// DESTRUCTOR: sqlite3_stmt + /// + /// ^The sqlite3_finalize() function is called to delete a [prepared statement]. + /// ^If the most recent evaluation of the statement encountered no errors + /// or if the statement is never been evaluated, then sqlite3_finalize() returns + /// SQLITE_OK. ^If the most recent evaluation of statement S failed, then + /// sqlite3_finalize(S) returns the appropriate [error code] or + /// [extended error code]. + /// + /// ^The sqlite3_finalize(S) routine can be called at any point during + /// the life cycle of [prepared statement] S: + /// before statement S is ever evaluated, after + /// one or more calls to [sqlite3_reset()], or after any call + /// to [sqlite3_step()] regardless of whether or not the statement has + /// completed execution. + /// + /// ^Invoking sqlite3_finalize() on a NULL pointer is a harmless no-op. + /// + /// The application must finalize every [prepared statement] in order to avoid + /// resource leaks. It is a grievous error for the application to try to use + /// a prepared statement after it has been finalized. Any use of a prepared + /// statement after it has been finalized can result in undefined and + /// undesirable behavior such as segfaults and heap corruption. + int sqlite3_finalize(ffi.Pointer pStmt) { + return _sqlite3_finalize(pStmt); + } + + late final _sqlite3_finalizePtr = + _lookup)>>( + 'sqlite3_finalize', + ); + late final _sqlite3_finalize = _sqlite3_finalizePtr + .asFunction)>(); + + void sqlite3_free(ffi.Pointer arg0) { + return _sqlite3_free(arg0); + } + + late final _sqlite3_freePtr = + _lookup)>>( + 'sqlite3_free', + ); + late final _sqlite3_free = _sqlite3_freePtr + .asFunction)>(); + + void sqlite3_free_filename(ffi.Pointer arg0) { + return _sqlite3_free_filename(arg0); + } + + late final _sqlite3_free_filenamePtr = + _lookup)>>( + 'sqlite3_free_filename', + ); + late final _sqlite3_free_filename = _sqlite3_free_filenamePtr + .asFunction)>(); + + void sqlite3_free_table(ffi.Pointer> result) { + return _sqlite3_free_table(result); + } + + late final _sqlite3_free_tablePtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer>) + > + >('sqlite3_free_table'); + late final _sqlite3_free_table = _sqlite3_free_tablePtr + .asFunction>)>(); + + /// CAPI3REF: Test For Auto-Commit Mode + /// KEYWORDS: {autocommit mode} + /// METHOD: sqlite3 + /// + /// ^The sqlite3_get_autocommit() interface returns non-zero or + /// zero if the given database connection is or is not in autocommit mode, + /// respectively. ^Autocommit mode is on by default. + /// ^Autocommit mode is disabled by a [BEGIN] statement. + /// ^Autocommit mode is re-enabled by a [COMMIT] or [ROLLBACK]. + /// + /// If certain kinds of errors occur on a statement within a multi-statement + /// transaction (errors including [SQLITE_FULL], [SQLITE_IOERR], + /// [SQLITE_NOMEM], [SQLITE_BUSY], and [SQLITE_INTERRUPT]) then the + /// transaction might be rolled back automatically. The only way to + /// find out whether SQLite automatically rolled back the transaction after + /// an error is to use this function. + /// + /// If another thread changes the autocommit status of the database + /// connection while this routine is running, then the return value + /// is undefined. + int sqlite3_get_autocommit(ffi.Pointer arg0) { + return _sqlite3_get_autocommit(arg0); + } + + late final _sqlite3_get_autocommitPtr = + _lookup)>>( + 'sqlite3_get_autocommit', + ); + late final _sqlite3_get_autocommit = _sqlite3_get_autocommitPtr + .asFunction)>(); + + /// CAPI3REF: Function Auxiliary Data + /// METHOD: sqlite3_context + /// + /// These functions may be used by (non-aggregate) SQL functions to + /// associate metadata with argument values. If the same value is passed to + /// multiple invocations of the same SQL function during query execution, under + /// some circumstances the associated metadata may be preserved. An example + /// of where this might be useful is in a regular-expression matching + /// function. The compiled version of the regular expression can be stored as + /// metadata associated with the pattern string. + /// Then as long as the pattern string remains the same, + /// the compiled regular expression can be reused on multiple + /// invocations of the same function. + /// + /// ^The sqlite3_get_auxdata(C,N) interface returns a pointer to the metadata + /// associated by the sqlite3_set_auxdata(C,N,P,X) function with the Nth argument + /// value to the application-defined function. ^N is zero for the left-most + /// function argument. ^If there is no metadata + /// associated with the function argument, the sqlite3_get_auxdata(C,N) interface + /// returns a NULL pointer. + /// + /// ^The sqlite3_set_auxdata(C,N,P,X) interface saves P as metadata for the N-th + /// argument of the application-defined function. ^Subsequent + /// calls to sqlite3_get_auxdata(C,N) return P from the most recent + /// sqlite3_set_auxdata(C,N,P,X) call if the metadata is still valid or + /// NULL if the metadata has been discarded. + /// ^After each call to sqlite3_set_auxdata(C,N,P,X) where X is not NULL, + /// SQLite will invoke the destructor function X with parameter P exactly + /// once, when the metadata is discarded. + /// SQLite is free to discard the metadata at any time, including:
    + ///
  • ^(when the corresponding function parameter changes)^, or + ///
  • ^(when [sqlite3_reset()] or [sqlite3_finalize()] is called for the + /// SQL statement)^, or + ///
  • ^(when sqlite3_set_auxdata() is invoked again on the same + /// parameter)^, or + ///
  • ^(during the original sqlite3_set_auxdata() call when a memory + /// allocation error occurs.)^
+ /// + /// Note the last bullet in particular. The destructor X in + /// sqlite3_set_auxdata(C,N,P,X) might be called immediately, before the + /// sqlite3_set_auxdata() interface even returns. Hence sqlite3_set_auxdata() + /// should be called near the end of the function implementation and the + /// function implementation should not make any use of P after + /// sqlite3_set_auxdata() has been called. + /// + /// ^(In practice, metadata is preserved between function calls for + /// function parameters that are compile-time constants, including literal + /// values and [parameters] and expressions composed from the same.)^ + /// + /// The value of the N parameter to these interfaces should be non-negative. + /// Future enhancements may make use of negative N values to define new + /// kinds of function caching behavior. + /// + /// These routines must be called from the same thread in which + /// the SQL function is running. + ffi.Pointer sqlite3_get_auxdata( + ffi.Pointer arg0, + int N, + ) { + return _sqlite3_get_auxdata(arg0, N); + } + + late final _sqlite3_get_auxdataPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Int) + > + >('sqlite3_get_auxdata'); + late final _sqlite3_get_auxdata = _sqlite3_get_auxdataPtr + .asFunction< + ffi.Pointer Function(ffi.Pointer, int) + >(); + + /// CAPI3REF: Convenience Routines For Running Queries + /// METHOD: sqlite3 + /// + /// This is a legacy interface that is preserved for backwards compatibility. + /// Use of this interface is not recommended. + /// + /// Definition: A result table is memory data structure created by the + /// [sqlite3_get_table()] interface. A result table records the + /// complete query results from one or more queries. + /// + /// The table conceptually has a number of rows and columns. But + /// these numbers are not part of the result table itself. These + /// numbers are obtained separately. Let N be the number of rows + /// and M be the number of columns. + /// + /// A result table is an array of pointers to zero-terminated UTF-8 strings. + /// There are (N+1)*M elements in the array. The first M pointers point + /// to zero-terminated strings that contain the names of the columns. + /// The remaining entries all point to query results. NULL values result + /// in NULL pointers. All other values are in their UTF-8 zero-terminated + /// string representation as returned by [sqlite3_column_text()]. + /// + /// A result table might consist of one or more memory allocations. + /// It is not safe to pass a result table directly to [sqlite3_free()]. + /// A result table should be deallocated using [sqlite3_free_table()]. + /// + /// ^(As an example of the result table format, suppose a query result + /// is as follows: + /// + ///
+  /// Name        | Age
+  /// -----------------------
+  /// Alice       | 43
+  /// Bob         | 28
+  /// Cindy       | 21
+  /// 
+ /// + /// There are two columns (M==2) and three rows (N==3). Thus the + /// result table has 8 entries. Suppose the result table is stored + /// in an array named azResult. Then azResult holds this content: + /// + ///
+  /// azResult[0] = "Name";
+  /// azResult[1] = "Age";
+  /// azResult[2] = "Alice";
+  /// azResult[3] = "43";
+  /// azResult[4] = "Bob";
+  /// azResult[5] = "28";
+  /// azResult[6] = "Cindy";
+  /// azResult[7] = "21";
+  /// 
)^ + /// + /// ^The sqlite3_get_table() function evaluates one or more + /// semicolon-separated SQL statements in the zero-terminated UTF-8 + /// string of its 2nd parameter and returns a result table to the + /// pointer given in its 3rd parameter. + /// + /// After the application has finished with the result from sqlite3_get_table(), + /// it must pass the result table pointer to sqlite3_free_table() in order to + /// release the memory that was malloced. Because of the way the + /// [sqlite3_malloc()] happens within sqlite3_get_table(), the calling + /// function must not try to call [sqlite3_free()] directly. Only + /// [sqlite3_free_table()] is able to release the memory properly and safely. + /// + /// The sqlite3_get_table() interface is implemented as a wrapper around + /// [sqlite3_exec()]. The sqlite3_get_table() routine does not have access + /// to any internal data structures of SQLite. It uses only the public + /// interface defined here. As a consequence, errors that occur in the + /// wrapper layer outside of the internal [sqlite3_exec()] call are not + /// reflected in subsequent calls to [sqlite3_errcode()] or + /// [sqlite3_errmsg()]. + int sqlite3_get_table( + ffi.Pointer db, + ffi.Pointer zSql, + ffi.Pointer>> pazResult, + ffi.Pointer pnRow, + ffi.Pointer pnColumn, + ffi.Pointer> pzErrmsg, + ) { + return _sqlite3_get_table(db, zSql, pazResult, pnRow, pnColumn, pzErrmsg); + } + + late final _sqlite3_get_tablePtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ) + > + >('sqlite3_get_table'); + late final _sqlite3_get_table = _sqlite3_get_tablePtr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ) + >(); + + int sqlite3_global_recover() { + return _sqlite3_global_recover(); + } + + late final _sqlite3_global_recoverPtr = + _lookup>('sqlite3_global_recover'); + late final _sqlite3_global_recover = _sqlite3_global_recoverPtr + .asFunction(); + + int sqlite3_hard_heap_limit64(int N) { + return _sqlite3_hard_heap_limit64(N); + } + + late final _sqlite3_hard_heap_limit64Ptr = + _lookup>( + 'sqlite3_hard_heap_limit64', + ); + late final _sqlite3_hard_heap_limit64 = _sqlite3_hard_heap_limit64Ptr + .asFunction(); + + /// CAPI3REF: Initialize The SQLite Library + /// + /// ^The sqlite3_initialize() routine initializes the + /// SQLite library. ^The sqlite3_shutdown() routine + /// deallocates any resources that were allocated by sqlite3_initialize(). + /// These routines are designed to aid in process initialization and + /// shutdown on embedded systems. Workstation applications using + /// SQLite normally do not need to invoke either of these routines. + /// + /// A call to sqlite3_initialize() is an "effective" call if it is + /// the first time sqlite3_initialize() is invoked during the lifetime of + /// the process, or if it is the first time sqlite3_initialize() is invoked + /// following a call to sqlite3_shutdown(). ^(Only an effective call + /// of sqlite3_initialize() does any initialization. All other calls + /// are harmless no-ops.)^ + /// + /// A call to sqlite3_shutdown() is an "effective" call if it is the first + /// call to sqlite3_shutdown() since the last sqlite3_initialize(). ^(Only + /// an effective call to sqlite3_shutdown() does any deinitialization. + /// All other valid calls to sqlite3_shutdown() are harmless no-ops.)^ + /// + /// The sqlite3_initialize() interface is threadsafe, but sqlite3_shutdown() + /// is not. The sqlite3_shutdown() interface must only be called from a + /// single thread. All open [database connections] must be closed and all + /// other SQLite resources must be deallocated prior to invoking + /// sqlite3_shutdown(). + /// + /// Among other things, ^sqlite3_initialize() will invoke + /// sqlite3_os_init(). Similarly, ^sqlite3_shutdown() + /// will invoke sqlite3_os_end(). + /// + /// ^The sqlite3_initialize() routine returns [SQLITE_OK] on success. + /// ^If for some reason, sqlite3_initialize() is unable to initialize + /// the library (perhaps it is unable to allocate a needed resource such + /// as a mutex) it returns an [error code] other than [SQLITE_OK]. + /// + /// ^The sqlite3_initialize() routine is called internally by many other + /// SQLite interfaces so that an application usually does not need to + /// invoke sqlite3_initialize() directly. For example, [sqlite3_open()] + /// calls sqlite3_initialize() so the SQLite library will be automatically + /// initialized when [sqlite3_open()] is called if it has not be initialized + /// already. ^However, if SQLite is compiled with the [SQLITE_OMIT_AUTOINIT] + /// compile-time option, then the automatic calls to sqlite3_initialize() + /// are omitted and the application must call sqlite3_initialize() directly + /// prior to using any other SQLite interface. For maximum portability, + /// it is recommended that applications always invoke sqlite3_initialize() + /// directly prior to using any other SQLite interface. Future releases + /// of SQLite may require this. In other words, the behavior exhibited + /// when SQLite is compiled with [SQLITE_OMIT_AUTOINIT] might become the + /// default behavior in some future release of SQLite. + /// + /// The sqlite3_os_init() routine does operating-system specific + /// initialization of the SQLite library. The sqlite3_os_end() + /// routine undoes the effect of sqlite3_os_init(). Typical tasks + /// performed by these routines include allocation or deallocation + /// of static resources, initialization of global variables, + /// setting up a default [sqlite3_vfs] module, or setting up + /// a default configuration using [sqlite3_config()]. + /// + /// The application should never invoke either sqlite3_os_init() + /// or sqlite3_os_end() directly. The application should only invoke + /// sqlite3_initialize() and sqlite3_shutdown(). The sqlite3_os_init() + /// interface is called automatically by sqlite3_initialize() and + /// sqlite3_os_end() is called by sqlite3_shutdown(). Appropriate + /// implementations for sqlite3_os_init() and sqlite3_os_end() + /// are built into SQLite when it is compiled for Unix, Windows, or OS/2. + /// When [custom builds | built for other platforms] + /// (using the [SQLITE_OS_OTHER=1] compile-time + /// option) the application must supply a suitable implementation for + /// sqlite3_os_init() and sqlite3_os_end(). An application-supplied + /// implementation of sqlite3_os_init() or sqlite3_os_end() + /// must return [SQLITE_OK] on success and some other [error code] upon + /// failure. + int sqlite3_initialize() { + return _sqlite3_initialize(); + } + + late final _sqlite3_initializePtr = + _lookup>('sqlite3_initialize'); + late final _sqlite3_initialize = _sqlite3_initializePtr + .asFunction(); + + /// CAPI3REF: Interrupt A Long-Running Query + /// METHOD: sqlite3 + /// + /// ^This function causes any pending database operation to abort and + /// return at its earliest opportunity. This routine is typically + /// called in response to a user action such as pressing "Cancel" + /// or Ctrl-C where the user wants a long query operation to halt + /// immediately. + /// + /// ^It is safe to call this routine from a thread different from the + /// thread that is currently running the database operation. But it + /// is not safe to call this routine with a [database connection] that + /// is closed or might close before sqlite3_interrupt() returns. + /// + /// ^If an SQL operation is very nearly finished at the time when + /// sqlite3_interrupt() is called, then it might not have an opportunity + /// to be interrupted and might continue to completion. + /// + /// ^An SQL operation that is interrupted will return [SQLITE_INTERRUPT]. + /// ^If the interrupted SQL operation is an INSERT, UPDATE, or DELETE + /// that is inside an explicit transaction, then the entire transaction + /// will be rolled back automatically. + /// + /// ^The sqlite3_interrupt(D) call is in effect until all currently running + /// SQL statements on [database connection] D complete. ^Any new SQL statements + /// that are started after the sqlite3_interrupt() call and before the + /// running statement count reaches zero are interrupted as if they had been + /// running prior to the sqlite3_interrupt() call. ^New SQL statements + /// that are started after the running statement count reaches zero are + /// not effected by the sqlite3_interrupt(). + /// ^A call to sqlite3_interrupt(D) that occurs when there are no running + /// SQL statements is a no-op and has no effect on SQL statements + /// that are started after the sqlite3_interrupt() call returns. + void sqlite3_interrupt(ffi.Pointer arg0) { + return _sqlite3_interrupt(arg0); + } + + late final _sqlite3_interruptPtr = + _lookup)>>( + 'sqlite3_interrupt', + ); + late final _sqlite3_interrupt = _sqlite3_interruptPtr + .asFunction)>(); + + int sqlite3_keyword_check(ffi.Pointer arg0, int arg1) { + return _sqlite3_keyword_check(arg0, arg1); + } + + late final _sqlite3_keyword_checkPtr = + _lookup< + ffi.NativeFunction, ffi.Int)> + >('sqlite3_keyword_check'); + late final _sqlite3_keyword_check = _sqlite3_keyword_checkPtr + .asFunction, int)>(); + + /// CAPI3REF: SQL Keyword Checking + /// + /// These routines provide access to the set of SQL language keywords + /// recognized by SQLite. Applications can uses these routines to determine + /// whether or not a specific identifier needs to be escaped (for example, + /// by enclosing in double-quotes) so as not to confuse the parser. + /// + /// The sqlite3_keyword_count() interface returns the number of distinct + /// keywords understood by SQLite. + /// + /// The sqlite3_keyword_name(N,Z,L) interface finds the N-th keyword and + /// makes *Z point to that keyword expressed as UTF8 and writes the number + /// of bytes in the keyword into *L. The string that *Z points to is not + /// zero-terminated. The sqlite3_keyword_name(N,Z,L) routine returns + /// SQLITE_OK if N is within bounds and SQLITE_ERROR if not. If either Z + /// or L are NULL or invalid pointers then calls to + /// sqlite3_keyword_name(N,Z,L) result in undefined behavior. + /// + /// The sqlite3_keyword_check(Z,L) interface checks to see whether or not + /// the L-byte UTF8 identifier that Z points to is a keyword, returning non-zero + /// if it is and zero if not. + /// + /// The parser used by SQLite is forgiving. It is often possible to use + /// a keyword as an identifier as long as such use does not result in a + /// parsing ambiguity. For example, the statement + /// "CREATE TABLE BEGIN(REPLACE,PRAGMA,END);" is accepted by SQLite, and + /// creates a new table named "BEGIN" with three columns named + /// "REPLACE", "PRAGMA", and "END". Nevertheless, best practice is to avoid + /// using keywords as identifiers. Common techniques used to avoid keyword + /// name collisions include: + ///
    + ///
  • Put all identifier names inside double-quotes. This is the official + /// SQL way to escape identifier names. + ///
  • Put identifier names inside [...]. This is not standard SQL, + /// but it is what SQL Server does and so lots of programmers use this + /// technique. + ///
  • Begin every identifier with the letter "Z" as no SQL keywords start + /// with "Z". + ///
  • Include a digit somewhere in every identifier name. + ///
+ /// + /// Note that the number of keywords understood by SQLite can depend on + /// compile-time options. For example, "VACUUM" is not a keyword if + /// SQLite is compiled with the [-DSQLITE_OMIT_VACUUM] option. Also, + /// new keywords may be added to future releases of SQLite. + int sqlite3_keyword_count() { + return _sqlite3_keyword_count(); + } + + late final _sqlite3_keyword_countPtr = + _lookup>('sqlite3_keyword_count'); + late final _sqlite3_keyword_count = _sqlite3_keyword_countPtr + .asFunction(); + + int sqlite3_keyword_name( + int arg0, + ffi.Pointer> arg1, + ffi.Pointer arg2, + ) { + return _sqlite3_keyword_name(arg0, arg1, arg2); + } + + late final _sqlite3_keyword_namePtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, + ffi.Pointer>, + ffi.Pointer, + ) + > + >('sqlite3_keyword_name'); + late final _sqlite3_keyword_name = _sqlite3_keyword_namePtr + .asFunction< + int Function( + int, + ffi.Pointer>, + ffi.Pointer, + ) + >(); + + /// CAPI3REF: Last Insert Rowid + /// METHOD: sqlite3 + /// + /// ^Each entry in most SQLite tables (except for [WITHOUT ROWID] tables) + /// has a unique 64-bit signed + /// integer key called the [ROWID | "rowid"]. ^The rowid is always available + /// as an undeclared column named ROWID, OID, or _ROWID_ as long as those + /// names are not also used by explicitly declared columns. ^If + /// the table has a column of type [INTEGER PRIMARY KEY] then that column + /// is another alias for the rowid. + /// + /// ^The sqlite3_last_insert_rowid(D) interface usually returns the [rowid] of + /// the most recent successful [INSERT] into a rowid table or [virtual table] + /// on database connection D. ^Inserts into [WITHOUT ROWID] tables are not + /// recorded. ^If no successful [INSERT]s into rowid tables have ever occurred + /// on the database connection D, then sqlite3_last_insert_rowid(D) returns + /// zero. + /// + /// As well as being set automatically as rows are inserted into database + /// tables, the value returned by this function may be set explicitly by + /// [sqlite3_set_last_insert_rowid()] + /// + /// Some virtual table implementations may INSERT rows into rowid tables as + /// part of committing a transaction (e.g. to flush data accumulated in memory + /// to disk). In this case subsequent calls to this function return the rowid + /// associated with these internal INSERT operations, which leads to + /// unintuitive results. Virtual table implementations that do write to rowid + /// tables in this way can avoid this problem by restoring the original + /// rowid value using [sqlite3_set_last_insert_rowid()] before returning + /// control to the user. + /// + /// ^(If an [INSERT] occurs within a trigger then this routine will + /// return the [rowid] of the inserted row as long as the trigger is + /// running. Once the trigger program ends, the value returned + /// by this routine reverts to what it was before the trigger was fired.)^ + /// + /// ^An [INSERT] that fails due to a constraint violation is not a + /// successful [INSERT] and does not change the value returned by this + /// routine. ^Thus INSERT OR FAIL, INSERT OR IGNORE, INSERT OR ROLLBACK, + /// and INSERT OR ABORT make no changes to the return value of this + /// routine when their insertion fails. ^(When INSERT OR REPLACE + /// encounters a constraint violation, it does not fail. The + /// INSERT continues to completion after deleting rows that caused + /// the constraint problem so INSERT OR REPLACE will always change + /// the return value of this interface.)^ + /// + /// ^For the purposes of this routine, an [INSERT] is considered to + /// be successful even if it is subsequently rolled back. + /// + /// This function is accessible to SQL statements via the + /// [last_insert_rowid() SQL function]. + /// + /// If a separate thread performs a new [INSERT] on the same + /// database connection while the [sqlite3_last_insert_rowid()] + /// function is running and thus changes the last insert [rowid], + /// then the value returned by [sqlite3_last_insert_rowid()] is + /// unpredictable and might not equal either the old or the new + /// last insert [rowid]. + int sqlite3_last_insert_rowid(ffi.Pointer arg0) { + return _sqlite3_last_insert_rowid(arg0); + } + + late final _sqlite3_last_insert_rowidPtr = + _lookup)>>( + 'sqlite3_last_insert_rowid', + ); + late final _sqlite3_last_insert_rowid = _sqlite3_last_insert_rowidPtr + .asFunction)>(); + + ffi.Pointer sqlite3_libversion() { + return _sqlite3_libversion(); + } + + late final _sqlite3_libversionPtr = + _lookup Function()>>( + 'sqlite3_libversion', + ); + late final _sqlite3_libversion = _sqlite3_libversionPtr + .asFunction Function()>(); + + int sqlite3_libversion_number() { + return _sqlite3_libversion_number(); + } + + late final _sqlite3_libversion_numberPtr = + _lookup>( + 'sqlite3_libversion_number', + ); + late final _sqlite3_libversion_number = _sqlite3_libversion_numberPtr + .asFunction(); + + /// CAPI3REF: Run-time Limits + /// METHOD: sqlite3 + /// + /// ^(This interface allows the size of various constructs to be limited + /// on a connection by connection basis. The first parameter is the + /// [database connection] whose limit is to be set or queried. The + /// second parameter is one of the [limit categories] that define a + /// class of constructs to be size limited. The third parameter is the + /// new limit for that construct.)^ + /// + /// ^If the new limit is a negative number, the limit is unchanged. + /// ^(For each limit category SQLITE_LIMIT_NAME there is a + /// [limits | hard upper bound] + /// set at compile-time by a C preprocessor macro called + /// [limits | SQLITE_MAX_NAME]. + /// (The "_LIMIT_" in the name is changed to "_MAX_".))^ + /// ^Attempts to increase a limit above its hard upper bound are + /// silently truncated to the hard upper bound. + /// + /// ^Regardless of whether or not the limit was changed, the + /// [sqlite3_limit()] interface returns the prior value of the limit. + /// ^Hence, to find the current value of a limit without changing it, + /// simply invoke this interface with the third parameter set to -1. + /// + /// Run-time limits are intended for use in applications that manage + /// both their own internal database and also databases that are controlled + /// by untrusted external sources. An example application might be a + /// web browser that has its own databases for storing history and + /// separate databases controlled by JavaScript applications downloaded + /// off the Internet. The internal databases can be given the + /// large, default limits. Databases managed by external sources can + /// be given much smaller limits designed to prevent a denial of service + /// attack. Developers might also want to use the [sqlite3_set_authorizer()] + /// interface to further control untrusted SQL. The size of the database + /// created by an untrusted script can be contained using the + /// [max_page_count] [PRAGMA]. + /// + /// New run-time limit categories may be added in future releases. + int sqlite3_limit(ffi.Pointer arg0, int id, int newVal) { + return _sqlite3_limit(arg0, id, newVal); + } + + late final _sqlite3_limitPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Int) + > + >('sqlite3_limit'); + late final _sqlite3_limit = _sqlite3_limitPtr + .asFunction, int, int)>(); + + /// CAPI3REF: Load An Extension + /// METHOD: sqlite3 + /// + /// ^This interface loads an SQLite extension library from the named file. + /// + /// ^The sqlite3_load_extension() interface attempts to load an + /// [SQLite extension] library contained in the file zFile. If + /// the file cannot be loaded directly, attempts are made to load + /// with various operating-system specific extensions added. + /// So for example, if "samplelib" cannot be loaded, then names like + /// "samplelib.so" or "samplelib.dylib" or "samplelib.dll" might + /// be tried also. + /// + /// ^The entry point is zProc. + /// ^(zProc may be 0, in which case SQLite will try to come up with an + /// entry point name on its own. It first tries "sqlite3_extension_init". + /// If that does not work, it constructs a name "sqlite3_X_init" where the + /// X is consists of the lower-case equivalent of all ASCII alphabetic + /// characters in the filename from the last "/" to the first following + /// "." and omitting any initial "lib".)^ + /// ^The sqlite3_load_extension() interface returns + /// [SQLITE_OK] on success and [SQLITE_ERROR] if something goes wrong. + /// ^If an error occurs and pzErrMsg is not 0, then the + /// [sqlite3_load_extension()] interface shall attempt to + /// fill *pzErrMsg with error message text stored in memory + /// obtained from [sqlite3_malloc()]. The calling function + /// should free this memory by calling [sqlite3_free()]. + /// + /// ^Extension loading must be enabled using + /// [sqlite3_enable_load_extension()] or + /// [sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],1,NULL) + /// prior to calling this API, + /// otherwise an error will be returned. + /// + /// Security warning: It is recommended that the + /// [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method be used to enable only this + /// interface. The use of the [sqlite3_enable_load_extension()] interface + /// should be avoided. This will keep the SQL function [load_extension()] + /// disabled and prevent SQL injections from giving attackers + /// access to extension loading capabilities. + /// + /// See also the [load_extension() SQL function]. + int sqlite3_load_extension( + ffi.Pointer db, + ffi.Pointer zFile, + ffi.Pointer zProc, + ffi.Pointer> pzErrMsg, + ) { + return _sqlite3_load_extension(db, zFile, zProc, pzErrMsg); + } + + late final _sqlite3_load_extensionPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ) + > + >('sqlite3_load_extension'); + late final _sqlite3_load_extension = _sqlite3_load_extensionPtr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ) + >(); + + /// CAPI3REF: Error Logging Interface + /// + /// ^The [sqlite3_log()] interface writes a message into the [error log] + /// established by the [SQLITE_CONFIG_LOG] option to [sqlite3_config()]. + /// ^If logging is enabled, the zFormat string and subsequent arguments are + /// used with [sqlite3_snprintf()] to generate the final output string. + /// + /// The sqlite3_log() interface is intended for use by extensions such as + /// virtual tables, collating functions, and SQL functions. While there is + /// nothing to prevent an application from calling sqlite3_log(), doing so + /// is considered bad form. + /// + /// The zFormat string must not be NULL. + /// + /// To avoid deadlocks and other threading problems, the sqlite3_log() routine + /// will not use dynamically allocated memory. The log message is stored in + /// a fixed-length buffer on the stack. If the log message is longer than + /// a few hundred characters, it will be truncated to the length of the + /// buffer. + void sqlite3_log(int iErrCode, ffi.Pointer zFormat) { + return _sqlite3_log(iErrCode, zFormat); + } + + late final _sqlite3_logPtr = + _lookup< + ffi.NativeFunction)> + >('sqlite3_log'); + late final _sqlite3_log = _sqlite3_logPtr + .asFunction)>(); + + /// CAPI3REF: Memory Allocation Subsystem + /// + /// The SQLite core uses these three routines for all of its own + /// internal memory allocation needs. "Core" in the previous sentence + /// does not include operating-system specific [VFS] implementation. The + /// Windows VFS uses native malloc() and free() for some operations. + /// + /// ^The sqlite3_malloc() routine returns a pointer to a block + /// of memory at least N bytes in length, where N is the parameter. + /// ^If sqlite3_malloc() is unable to obtain sufficient free + /// memory, it returns a NULL pointer. ^If the parameter N to + /// sqlite3_malloc() is zero or negative then sqlite3_malloc() returns + /// a NULL pointer. + /// + /// ^The sqlite3_malloc64(N) routine works just like + /// sqlite3_malloc(N) except that N is an unsigned 64-bit integer instead + /// of a signed 32-bit integer. + /// + /// ^Calling sqlite3_free() with a pointer previously returned + /// by sqlite3_malloc() or sqlite3_realloc() releases that memory so + /// that it might be reused. ^The sqlite3_free() routine is + /// a no-op if is called with a NULL pointer. Passing a NULL pointer + /// to sqlite3_free() is harmless. After being freed, memory + /// should neither be read nor written. Even reading previously freed + /// memory might result in a segmentation fault or other severe error. + /// Memory corruption, a segmentation fault, or other severe error + /// might result if sqlite3_free() is called with a non-NULL pointer that + /// was not obtained from sqlite3_malloc() or sqlite3_realloc(). + /// + /// ^The sqlite3_realloc(X,N) interface attempts to resize a + /// prior memory allocation X to be at least N bytes. + /// ^If the X parameter to sqlite3_realloc(X,N) + /// is a NULL pointer then its behavior is identical to calling + /// sqlite3_malloc(N). + /// ^If the N parameter to sqlite3_realloc(X,N) is zero or + /// negative then the behavior is exactly the same as calling + /// sqlite3_free(X). + /// ^sqlite3_realloc(X,N) returns a pointer to a memory allocation + /// of at least N bytes in size or NULL if insufficient memory is available. + /// ^If M is the size of the prior allocation, then min(N,M) bytes + /// of the prior allocation are copied into the beginning of buffer returned + /// by sqlite3_realloc(X,N) and the prior allocation is freed. + /// ^If sqlite3_realloc(X,N) returns NULL and N is positive, then the + /// prior allocation is not freed. + /// + /// ^The sqlite3_realloc64(X,N) interfaces works the same as + /// sqlite3_realloc(X,N) except that N is a 64-bit unsigned integer instead + /// of a 32-bit signed integer. + /// + /// ^If X is a memory allocation previously obtained from sqlite3_malloc(), + /// sqlite3_malloc64(), sqlite3_realloc(), or sqlite3_realloc64(), then + /// sqlite3_msize(X) returns the size of that memory allocation in bytes. + /// ^The value returned by sqlite3_msize(X) might be larger than the number + /// of bytes requested when X was allocated. ^If X is a NULL pointer then + /// sqlite3_msize(X) returns zero. If X points to something that is not + /// the beginning of memory allocation, or if it points to a formerly + /// valid memory allocation that has now been freed, then the behavior + /// of sqlite3_msize(X) is undefined and possibly harmful. + /// + /// ^The memory returned by sqlite3_malloc(), sqlite3_realloc(), + /// sqlite3_malloc64(), and sqlite3_realloc64() + /// is always aligned to at least an 8 byte boundary, or to a + /// 4 byte boundary if the [SQLITE_4_BYTE_ALIGNED_MALLOC] compile-time + /// option is used. + /// + /// The pointer arguments to [sqlite3_free()] and [sqlite3_realloc()] + /// must be either NULL or else pointers obtained from a prior + /// invocation of [sqlite3_malloc()] or [sqlite3_realloc()] that have + /// not yet been released. + /// + /// The application must not read or write any part of + /// a block of memory after it has been released using + /// [sqlite3_free()] or [sqlite3_realloc()]. + ffi.Pointer sqlite3_malloc(int arg0) { + return _sqlite3_malloc(arg0); + } + + late final _sqlite3_mallocPtr = + _lookup Function(ffi.Int)>>( + 'sqlite3_malloc', + ); + late final _sqlite3_malloc = _sqlite3_mallocPtr + .asFunction Function(int)>(); + + ffi.Pointer sqlite3_malloc64(int arg0) { + return _sqlite3_malloc64(arg0); + } + + late final _sqlite3_malloc64Ptr = + _lookup< + ffi.NativeFunction Function(sqlite3_uint64)> + >('sqlite3_malloc64'); + late final _sqlite3_malloc64 = _sqlite3_malloc64Ptr + .asFunction Function(int)>(); + + int sqlite3_memory_alarm( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, sqlite3_int64, ffi.Int) + > + > + arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _sqlite3_memory_alarm(arg0, arg1, arg2); + } + + late final _sqlite3_memory_alarmPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, sqlite3_int64, ffi.Int) + > + >, + ffi.Pointer, + sqlite3_int64, + ) + > + >('sqlite3_memory_alarm'); + late final _sqlite3_memory_alarm = _sqlite3_memory_alarmPtr + .asFunction< + int Function( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, sqlite3_int64, ffi.Int) + > + >, + ffi.Pointer, + int, + ) + >(); + + int sqlite3_memory_highwater(int resetFlag) { + return _sqlite3_memory_highwater(resetFlag); + } + + late final _sqlite3_memory_highwaterPtr = + _lookup>( + 'sqlite3_memory_highwater', + ); + late final _sqlite3_memory_highwater = _sqlite3_memory_highwaterPtr + .asFunction(); + + /// CAPI3REF: Memory Allocator Statistics + /// + /// SQLite provides these two interfaces for reporting on the status + /// of the [sqlite3_malloc()], [sqlite3_free()], and [sqlite3_realloc()] + /// routines, which form the built-in memory allocation subsystem. + /// + /// ^The [sqlite3_memory_used()] routine returns the number of bytes + /// of memory currently outstanding (malloced but not freed). + /// ^The [sqlite3_memory_highwater()] routine returns the maximum + /// value of [sqlite3_memory_used()] since the high-water mark + /// was last reset. ^The values returned by [sqlite3_memory_used()] and + /// [sqlite3_memory_highwater()] include any overhead + /// added by SQLite in its implementation of [sqlite3_malloc()], + /// but not overhead added by the any underlying system library + /// routines that [sqlite3_malloc()] may call. + /// + /// ^The memory high-water mark is reset to the current value of + /// [sqlite3_memory_used()] if and only if the parameter to + /// [sqlite3_memory_highwater()] is true. ^The value returned + /// by [sqlite3_memory_highwater(1)] is the high-water mark + /// prior to the reset. + int sqlite3_memory_used() { + return _sqlite3_memory_used(); + } + + late final _sqlite3_memory_usedPtr = + _lookup>( + 'sqlite3_memory_used', + ); + late final _sqlite3_memory_used = _sqlite3_memory_usedPtr + .asFunction(); + + /// CAPI3REF: Formatted String Printing Functions + /// + /// These routines are work-alikes of the "printf()" family of functions + /// from the standard C library. + /// These routines understand most of the common formatting options from + /// the standard library printf() + /// plus some additional non-standard formats ([%q], [%Q], [%w], and [%z]). + /// See the [built-in printf()] documentation for details. + /// + /// ^The sqlite3_mprintf() and sqlite3_vmprintf() routines write their + /// results into memory obtained from [sqlite3_malloc64()]. + /// The strings returned by these two routines should be + /// released by [sqlite3_free()]. ^Both routines return a + /// NULL pointer if [sqlite3_malloc64()] is unable to allocate enough + /// memory to hold the resulting string. + /// + /// ^(The sqlite3_snprintf() routine is similar to "snprintf()" from + /// the standard C library. The result is written into the + /// buffer supplied as the second parameter whose size is given by + /// the first parameter. Note that the order of the + /// first two parameters is reversed from snprintf().)^ This is an + /// historical accident that cannot be fixed without breaking + /// backwards compatibility. ^(Note also that sqlite3_snprintf() + /// returns a pointer to its buffer instead of the number of + /// characters actually written into the buffer.)^ We admit that + /// the number of characters written would be a more useful return + /// value but we cannot change the implementation of sqlite3_snprintf() + /// now without breaking compatibility. + /// + /// ^As long as the buffer size is greater than zero, sqlite3_snprintf() + /// guarantees that the buffer is always zero-terminated. ^The first + /// parameter "n" is the total size of the buffer, including space for + /// the zero terminator. So the longest string that can be completely + /// written will be n-1 characters. + /// + /// ^The sqlite3_vsnprintf() routine is a varargs version of sqlite3_snprintf(). + /// + /// See also: [built-in printf()], [printf() SQL function] + ffi.Pointer sqlite3_mprintf(ffi.Pointer arg0) { + return _sqlite3_mprintf(arg0); + } + + late final _sqlite3_mprintfPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer) + > + >('sqlite3_mprintf'); + late final _sqlite3_mprintf = _sqlite3_mprintfPtr + .asFunction Function(ffi.Pointer)>(); + + int sqlite3_msize(ffi.Pointer arg0) { + return _sqlite3_msize(arg0); + } + + late final _sqlite3_msizePtr = + _lookup< + ffi.NativeFunction)> + >('sqlite3_msize'); + late final _sqlite3_msize = _sqlite3_msizePtr + .asFunction)>(); + + /// CAPI3REF: Mutexes + /// + /// The SQLite core uses these routines for thread + /// synchronization. Though they are intended for internal + /// use by SQLite, code that links against SQLite is + /// permitted to use any of these routines. + /// + /// The SQLite source code contains multiple implementations + /// of these mutex routines. An appropriate implementation + /// is selected automatically at compile-time. The following + /// implementations are available in the SQLite core: + /// + ///
    + ///
  • SQLITE_MUTEX_PTHREADS + ///
  • SQLITE_MUTEX_W32 + ///
  • SQLITE_MUTEX_NOOP + ///
+ /// + /// The SQLITE_MUTEX_NOOP implementation is a set of routines + /// that does no real locking and is appropriate for use in + /// a single-threaded application. The SQLITE_MUTEX_PTHREADS and + /// SQLITE_MUTEX_W32 implementations are appropriate for use on Unix + /// and Windows. + /// + /// If SQLite is compiled with the SQLITE_MUTEX_APPDEF preprocessor + /// macro defined (with "-DSQLITE_MUTEX_APPDEF=1"), then no mutex + /// implementation is included with the library. In this case the + /// application must supply a custom mutex implementation using the + /// [SQLITE_CONFIG_MUTEX] option of the sqlite3_config() function + /// before calling sqlite3_initialize() or any other public sqlite3_ + /// function that calls sqlite3_initialize(). + /// + /// ^The sqlite3_mutex_alloc() routine allocates a new + /// mutex and returns a pointer to it. ^The sqlite3_mutex_alloc() + /// routine returns NULL if it is unable to allocate the requested + /// mutex. The argument to sqlite3_mutex_alloc() must one of these + /// integer constants: + /// + ///
    + ///
  • SQLITE_MUTEX_FAST + ///
  • SQLITE_MUTEX_RECURSIVE + ///
  • SQLITE_MUTEX_STATIC_MASTER + ///
  • SQLITE_MUTEX_STATIC_MEM + ///
  • SQLITE_MUTEX_STATIC_OPEN + ///
  • SQLITE_MUTEX_STATIC_PRNG + ///
  • SQLITE_MUTEX_STATIC_LRU + ///
  • SQLITE_MUTEX_STATIC_PMEM + ///
  • SQLITE_MUTEX_STATIC_APP1 + ///
  • SQLITE_MUTEX_STATIC_APP2 + ///
  • SQLITE_MUTEX_STATIC_APP3 + ///
  • SQLITE_MUTEX_STATIC_VFS1 + ///
  • SQLITE_MUTEX_STATIC_VFS2 + ///
  • SQLITE_MUTEX_STATIC_VFS3 + ///
+ /// + /// ^The first two constants (SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE) + /// cause sqlite3_mutex_alloc() to create + /// a new mutex. ^The new mutex is recursive when SQLITE_MUTEX_RECURSIVE + /// is used but not necessarily so when SQLITE_MUTEX_FAST is used. + /// The mutex implementation does not need to make a distinction + /// between SQLITE_MUTEX_RECURSIVE and SQLITE_MUTEX_FAST if it does + /// not want to. SQLite will only request a recursive mutex in + /// cases where it really needs one. If a faster non-recursive mutex + /// implementation is available on the host platform, the mutex subsystem + /// might return such a mutex in response to SQLITE_MUTEX_FAST. + /// + /// ^The other allowed parameters to sqlite3_mutex_alloc() (anything other + /// than SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE) each return + /// a pointer to a static preexisting mutex. ^Nine static mutexes are + /// used by the current version of SQLite. Future versions of SQLite + /// may add additional static mutexes. Static mutexes are for internal + /// use by SQLite only. Applications that use SQLite mutexes should + /// use only the dynamic mutexes returned by SQLITE_MUTEX_FAST or + /// SQLITE_MUTEX_RECURSIVE. + /// + /// ^Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST + /// or SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc() + /// returns a different mutex on every call. ^For the static + /// mutex types, the same mutex is returned on every call that has + /// the same type number. + /// + /// ^The sqlite3_mutex_free() routine deallocates a previously + /// allocated dynamic mutex. Attempting to deallocate a static + /// mutex results in undefined behavior. + /// + /// ^The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt + /// to enter a mutex. ^If another thread is already within the mutex, + /// sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return + /// SQLITE_BUSY. ^The sqlite3_mutex_try() interface returns [SQLITE_OK] + /// upon successful entry. ^(Mutexes created using + /// SQLITE_MUTEX_RECURSIVE can be entered multiple times by the same thread. + /// In such cases, the + /// mutex must be exited an equal number of times before another thread + /// can enter.)^ If the same thread tries to enter any mutex other + /// than an SQLITE_MUTEX_RECURSIVE more than once, the behavior is undefined. + /// + /// ^(Some systems (for example, Windows 95) do not support the operation + /// implemented by sqlite3_mutex_try(). On those systems, sqlite3_mutex_try() + /// will always return SQLITE_BUSY. The SQLite core only ever uses + /// sqlite3_mutex_try() as an optimization so this is acceptable + /// behavior.)^ + /// + /// ^The sqlite3_mutex_leave() routine exits a mutex that was + /// previously entered by the same thread. The behavior + /// is undefined if the mutex is not currently entered by the + /// calling thread or is not currently allocated. + /// + /// ^If the argument to sqlite3_mutex_enter(), sqlite3_mutex_try(), or + /// sqlite3_mutex_leave() is a NULL pointer, then all three routines + /// behave as no-ops. + /// + /// See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()]. + ffi.Pointer sqlite3_mutex_alloc(int arg0) { + return _sqlite3_mutex_alloc(arg0); + } + + late final _sqlite3_mutex_allocPtr = + _lookup Function(ffi.Int)>>( + 'sqlite3_mutex_alloc', + ); + late final _sqlite3_mutex_alloc = _sqlite3_mutex_allocPtr + .asFunction Function(int)>(); + + void sqlite3_mutex_enter(ffi.Pointer arg0) { + return _sqlite3_mutex_enter(arg0); + } + + late final _sqlite3_mutex_enterPtr = + _lookup< + ffi.NativeFunction)> + >('sqlite3_mutex_enter'); + late final _sqlite3_mutex_enter = _sqlite3_mutex_enterPtr + .asFunction)>(); + + void sqlite3_mutex_free(ffi.Pointer arg0) { + return _sqlite3_mutex_free(arg0); + } + + late final _sqlite3_mutex_freePtr = + _lookup< + ffi.NativeFunction)> + >('sqlite3_mutex_free'); + late final _sqlite3_mutex_free = _sqlite3_mutex_freePtr + .asFunction)>(); + + int sqlite3_mutex_held(ffi.Pointer arg0) { + return _sqlite3_mutex_held(arg0); + } + + late final _sqlite3_mutex_heldPtr = + _lookup)>>( + 'sqlite3_mutex_held', + ); + late final _sqlite3_mutex_held = _sqlite3_mutex_heldPtr + .asFunction)>(); + + void sqlite3_mutex_leave(ffi.Pointer arg0) { + return _sqlite3_mutex_leave(arg0); + } + + late final _sqlite3_mutex_leavePtr = + _lookup< + ffi.NativeFunction)> + >('sqlite3_mutex_leave'); + late final _sqlite3_mutex_leave = _sqlite3_mutex_leavePtr + .asFunction)>(); + + int sqlite3_mutex_notheld(ffi.Pointer arg0) { + return _sqlite3_mutex_notheld(arg0); + } + + late final _sqlite3_mutex_notheldPtr = + _lookup)>>( + 'sqlite3_mutex_notheld', + ); + late final _sqlite3_mutex_notheld = _sqlite3_mutex_notheldPtr + .asFunction)>(); + + int sqlite3_mutex_try(ffi.Pointer arg0) { + return _sqlite3_mutex_try(arg0); + } + + late final _sqlite3_mutex_tryPtr = + _lookup)>>( + 'sqlite3_mutex_try', + ); + late final _sqlite3_mutex_try = _sqlite3_mutex_tryPtr + .asFunction)>(); + + /// CAPI3REF: Find the next prepared statement + /// METHOD: sqlite3 + /// + /// ^This interface returns a pointer to the next [prepared statement] after + /// pStmt associated with the [database connection] pDb. ^If pStmt is NULL + /// then this interface returns a pointer to the first prepared statement + /// associated with the database connection pDb. ^If no prepared statement + /// satisfies the conditions of this routine, it returns NULL. + /// + /// The [database connection] pointer D in a call to + /// [sqlite3_next_stmt(D,S)] must refer to an open database + /// connection and in particular must not be a NULL pointer. + ffi.Pointer sqlite3_next_stmt( + ffi.Pointer pDb, + ffi.Pointer pStmt, + ) { + return _sqlite3_next_stmt(pDb, pStmt); + } + + late final _sqlite3_next_stmtPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >('sqlite3_next_stmt'); + late final _sqlite3_next_stmt = _sqlite3_next_stmtPtr + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); + + ffi.Pointer sqlite3_normalized_sql( + ffi.Pointer pStmt, + ) { + return _sqlite3_normalized_sql(pStmt); + } + + late final _sqlite3_normalized_sqlPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer) + > + >('sqlite3_normalized_sql'); + late final _sqlite3_normalized_sql = _sqlite3_normalized_sqlPtr + .asFunction Function(ffi.Pointer)>(); + + /// CAPI3REF: Opening A New Database Connection + /// CONSTRUCTOR: sqlite3 + /// + /// ^These routines open an SQLite database file as specified by the + /// filename argument. ^The filename argument is interpreted as UTF-8 for + /// sqlite3_open() and sqlite3_open_v2() and as UTF-16 in the native byte + /// order for sqlite3_open16(). ^(A [database connection] handle is usually + /// returned in *ppDb, even if an error occurs. The only exception is that + /// if SQLite is unable to allocate memory to hold the [sqlite3] object, + /// a NULL will be written into *ppDb instead of a pointer to the [sqlite3] + /// object.)^ ^(If the database is opened (and/or created) successfully, then + /// [SQLITE_OK] is returned. Otherwise an [error code] is returned.)^ ^The + /// [sqlite3_errmsg()] or [sqlite3_errmsg16()] routines can be used to obtain + /// an English language description of the error following a failure of any + /// of the sqlite3_open() routines. + /// + /// ^The default encoding will be UTF-8 for databases created using + /// sqlite3_open() or sqlite3_open_v2(). ^The default encoding for databases + /// created using sqlite3_open16() will be UTF-16 in the native byte order. + /// + /// Whether or not an error occurs when it is opened, resources + /// associated with the [database connection] handle should be released by + /// passing it to [sqlite3_close()] when it is no longer required. + /// + /// The sqlite3_open_v2() interface works like sqlite3_open() + /// except that it accepts two additional parameters for additional control + /// over the new database connection. ^(The flags parameter to + /// sqlite3_open_v2() must include, at a minimum, one of the following + /// three flag combinations:)^ + /// + ///
+ /// ^(
[SQLITE_OPEN_READONLY]
+ ///
The database is opened in read-only mode. If the database does not + /// already exist, an error is returned.
)^ + /// + /// ^(
[SQLITE_OPEN_READWRITE]
+ ///
The database is opened for reading and writing if possible, or reading + /// only if the file is write protected by the operating system. In either + /// case the database must already exist, otherwise an error is returned.
)^ + /// + /// ^(
[SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]
+ ///
The database is opened for reading and writing, and is created if + /// it does not already exist. This is the behavior that is always used for + /// sqlite3_open() and sqlite3_open16().
)^ + ///
+ /// + /// In addition to the required flags, the following optional flags are + /// also supported: + /// + ///
+ /// ^(
[SQLITE_OPEN_URI]
+ ///
The filename can be interpreted as a URI if this flag is set.
)^ + /// + /// ^(
[SQLITE_OPEN_MEMORY]
+ ///
The database will be opened as an in-memory database. The database + /// is named by the "filename" argument for the purposes of cache-sharing, + /// if shared cache mode is enabled, but the "filename" is otherwise ignored. + ///
)^ + /// + /// ^(
[SQLITE_OPEN_NOMUTEX]
+ ///
The new database connection will use the "multi-thread" + /// [threading mode].)^ This means that separate threads are allowed + /// to use SQLite at the same time, as long as each thread is using + /// a different [database connection]. + /// + /// ^(
[SQLITE_OPEN_FULLMUTEX]
+ ///
The new database connection will use the "serialized" + /// [threading mode].)^ This means the multiple threads can safely + /// attempt to use the same database connection at the same time. + /// (Mutexes will block any actual concurrency, but in this mode + /// there is no harm in trying.) + /// + /// ^(
[SQLITE_OPEN_SHAREDCACHE]
+ ///
The database is opened [shared cache] enabled, overriding + /// the default shared cache setting provided by + /// [sqlite3_enable_shared_cache()].)^ + /// + /// ^(
[SQLITE_OPEN_PRIVATECACHE]
+ ///
The database is opened [shared cache] disabled, overriding + /// the default shared cache setting provided by + /// [sqlite3_enable_shared_cache()].)^ + /// + /// [[OPEN_NOFOLLOW]] ^(
[SQLITE_OPEN_NOFOLLOW]
+ ///
The database filename is not allowed to be a symbolic link
+ ///
)^ + /// + /// If the 3rd parameter to sqlite3_open_v2() is not one of the + /// required combinations shown above optionally combined with other + /// [SQLITE_OPEN_READONLY | SQLITE_OPEN_* bits] + /// then the behavior is undefined. + /// + /// ^The fourth parameter to sqlite3_open_v2() is the name of the + /// [sqlite3_vfs] object that defines the operating system interface that + /// the new database connection should use. ^If the fourth parameter is + /// a NULL pointer then the default [sqlite3_vfs] object is used. + /// + /// ^If the filename is ":memory:", then a private, temporary in-memory database + /// is created for the connection. ^This in-memory database will vanish when + /// the database connection is closed. Future versions of SQLite might + /// make use of additional special filenames that begin with the ":" character. + /// It is recommended that when a database filename actually does begin with + /// a ":" character you should prefix the filename with a pathname such as + /// "./" to avoid ambiguity. + /// + /// ^If the filename is an empty string, then a private, temporary + /// on-disk database will be created. ^This private database will be + /// automatically deleted as soon as the database connection is closed. + /// + /// [[URI filenames in sqlite3_open()]]

URI Filenames

+ /// + /// ^If [URI filename] interpretation is enabled, and the filename argument + /// begins with "file:", then the filename is interpreted as a URI. ^URI + /// filename interpretation is enabled if the [SQLITE_OPEN_URI] flag is + /// set in the third argument to sqlite3_open_v2(), or if it has + /// been enabled globally using the [SQLITE_CONFIG_URI] option with the + /// [sqlite3_config()] method or by the [SQLITE_USE_URI] compile-time option. + /// URI filename interpretation is turned off + /// by default, but future releases of SQLite might enable URI filename + /// interpretation by default. See "[URI filenames]" for additional + /// information. + /// + /// URI filenames are parsed according to RFC 3986. ^If the URI contains an + /// authority, then it must be either an empty string or the string + /// "localhost". ^If the authority is not an empty string or "localhost", an + /// error is returned to the caller. ^The fragment component of a URI, if + /// present, is ignored. + /// + /// ^SQLite uses the path component of the URI as the name of the disk file + /// which contains the database. ^If the path begins with a '/' character, + /// then it is interpreted as an absolute path. ^If the path does not begin + /// with a '/' (meaning that the authority section is omitted from the URI) + /// then the path is interpreted as a relative path. + /// ^(On windows, the first component of an absolute path + /// is a drive specification (e.g. "C:").)^ + /// + /// [[core URI query parameters]] + /// The query component of a URI may contain parameters that are interpreted + /// either by SQLite itself, or by a [VFS | custom VFS implementation]. + /// SQLite and its built-in [VFSes] interpret the + /// following query parameters: + /// + ///
    + ///
  • vfs: ^The "vfs" parameter may be used to specify the name of + /// a VFS object that provides the operating system interface that should + /// be used to access the database file on disk. ^If this option is set to + /// an empty string the default VFS object is used. ^Specifying an unknown + /// VFS is an error. ^If sqlite3_open_v2() is used and the vfs option is + /// present, then the VFS specified by the option takes precedence over + /// the value passed as the fourth parameter to sqlite3_open_v2(). + /// + ///
  • mode: ^(The mode parameter may be set to either "ro", "rw", + /// "rwc", or "memory". Attempting to set it to any other value is + /// an error)^. + /// ^If "ro" is specified, then the database is opened for read-only + /// access, just as if the [SQLITE_OPEN_READONLY] flag had been set in the + /// third argument to sqlite3_open_v2(). ^If the mode option is set to + /// "rw", then the database is opened for read-write (but not create) + /// access, as if SQLITE_OPEN_READWRITE (but not SQLITE_OPEN_CREATE) had + /// been set. ^Value "rwc" is equivalent to setting both + /// SQLITE_OPEN_READWRITE and SQLITE_OPEN_CREATE. ^If the mode option is + /// set to "memory" then a pure [in-memory database] that never reads + /// or writes from disk is used. ^It is an error to specify a value for + /// the mode parameter that is less restrictive than that specified by + /// the flags passed in the third parameter to sqlite3_open_v2(). + /// + ///
  • cache: ^The cache parameter may be set to either "shared" or + /// "private". ^Setting it to "shared" is equivalent to setting the + /// SQLITE_OPEN_SHAREDCACHE bit in the flags argument passed to + /// sqlite3_open_v2(). ^Setting the cache parameter to "private" is + /// equivalent to setting the SQLITE_OPEN_PRIVATECACHE bit. + /// ^If sqlite3_open_v2() is used and the "cache" parameter is present in + /// a URI filename, its value overrides any behavior requested by setting + /// SQLITE_OPEN_PRIVATECACHE or SQLITE_OPEN_SHAREDCACHE flag. + /// + ///
  • psow: ^The psow parameter indicates whether or not the + /// [powersafe overwrite] property does or does not apply to the + /// storage media on which the database file resides. + /// + ///
  • nolock: ^The nolock parameter is a boolean query parameter + /// which if set disables file locking in rollback journal modes. This + /// is useful for accessing a database on a filesystem that does not + /// support locking. Caution: Database corruption might result if two + /// or more processes write to the same database and any one of those + /// processes uses nolock=1. + /// + ///
  • immutable: ^The immutable parameter is a boolean query + /// parameter that indicates that the database file is stored on + /// read-only media. ^When immutable is set, SQLite assumes that the + /// database file cannot be changed, even by a process with higher + /// privilege, and so the database is opened read-only and all locking + /// and change detection is disabled. Caution: Setting the immutable + /// property on a database file that does in fact change can result + /// in incorrect query results and/or [SQLITE_CORRUPT] errors. + /// See also: [SQLITE_IOCAP_IMMUTABLE]. + /// + ///
+ /// + /// ^Specifying an unknown parameter in the query component of a URI is not an + /// error. Future versions of SQLite might understand additional query + /// parameters. See "[query parameters with special meaning to SQLite]" for + /// additional information. + /// + /// [[URI filename examples]]

URI filename examples

+ /// + /// + ///
URI filenames Results + ///
file:data.db + /// Open the file "data.db" in the current directory. + ///
file:/home/fred/data.db
+ /// file:///home/fred/data.db
+ /// file://localhost/home/fred/data.db
+ /// Open the database file "/home/fred/data.db". + ///
file://darkstar/home/fred/data.db + /// An error. "darkstar" is not a recognized authority. + ///
+ /// file:///C:/Documents%20and%20Settings/fred/Desktop/data.db + /// Windows only: Open the file "data.db" on fred's desktop on drive + /// C:. Note that the %20 escaping in this example is not strictly + /// necessary - space characters can be used literally + /// in URI filenames. + ///
file:data.db?mode=ro&cache=private + /// Open file "data.db" in the current directory for read-only access. + /// Regardless of whether or not shared-cache mode is enabled by + /// default, use a private cache. + ///
file:/home/fred/data.db?vfs=unix-dotfile + /// Open file "/home/fred/data.db". Use the special VFS "unix-dotfile" + /// that uses dot-files in place of posix advisory locking. + ///
file:data.db?mode=readonly + /// An error. "readonly" is not a valid option for the "mode" parameter. + ///
+ /// + /// ^URI hexadecimal escape sequences (%HH) are supported within the path and + /// query components of a URI. A hexadecimal escape sequence consists of a + /// percent sign - "%" - followed by exactly two hexadecimal digits + /// specifying an octet value. ^Before the path or query components of a + /// URI filename are interpreted, they are encoded using UTF-8 and all + /// hexadecimal escape sequences replaced by a single byte containing the + /// corresponding octet. If this process generates an invalid UTF-8 encoding, + /// the results are undefined. + /// + /// Note to Windows users: The encoding used for the filename argument + /// of sqlite3_open() and sqlite3_open_v2() must be UTF-8, not whatever + /// codepage is currently defined. Filenames containing international + /// characters must be converted to UTF-8 prior to passing them into + /// sqlite3_open() or sqlite3_open_v2(). + /// + /// Note to Windows Runtime users: The temporary directory must be set + /// prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various + /// features that require the use of temporary files may fail. + /// + /// See also: [sqlite3_temp_directory] + int sqlite3_open( + ffi.Pointer filename, + ffi.Pointer> ppDb, + ) { + return _sqlite3_open(filename, ppDb); + } + + late final _sqlite3_openPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer>, + ) + > + >('sqlite3_open'); + late final _sqlite3_open = _sqlite3_openPtr + .asFunction< + int Function(ffi.Pointer, ffi.Pointer>) + >(); + + int sqlite3_open16( + ffi.Pointer filename, + ffi.Pointer> ppDb, + ) { + return _sqlite3_open16(filename, ppDb); + } + + late final _sqlite3_open16Ptr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer>, + ) + > + >('sqlite3_open16'); + late final _sqlite3_open16 = _sqlite3_open16Ptr + .asFunction< + int Function(ffi.Pointer, ffi.Pointer>) + >(); + + int sqlite3_open_v2( + ffi.Pointer filename, + ffi.Pointer> ppDb, + int flags, + ffi.Pointer zVfs, + ) { + return _sqlite3_open_v2(filename, ppDb, flags, zVfs); + } + + late final _sqlite3_open_v2Ptr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer>, + ffi.Int, + ffi.Pointer, + ) + > + >('sqlite3_open_v2'); + late final _sqlite3_open_v2 = _sqlite3_open_v2Ptr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer>, + int, + ffi.Pointer, + ) + >(); + + int sqlite3_os_end() { + return _sqlite3_os_end(); + } + + late final _sqlite3_os_endPtr = + _lookup>('sqlite3_os_end'); + late final _sqlite3_os_end = _sqlite3_os_endPtr.asFunction(); + + int sqlite3_os_init() { + return _sqlite3_os_init(); + } + + late final _sqlite3_os_initPtr = + _lookup>('sqlite3_os_init'); + late final _sqlite3_os_init = _sqlite3_os_initPtr + .asFunction(); + + /// CAPI3REF: Overload A Function For A Virtual Table + /// METHOD: sqlite3 + /// + /// ^(Virtual tables can provide alternative implementations of functions + /// using the [xFindFunction] method of the [virtual table module]. + /// But global versions of those functions + /// must exist in order to be overloaded.)^ + /// + /// ^(This API makes sure a global version of a function with a particular + /// name and number of parameters exists. If no such function exists + /// before this API is called, a new function is created.)^ ^The implementation + /// of the new function always causes an exception to be thrown. So + /// the new function is not good for anything by itself. Its only + /// purpose is to be a placeholder function that can be overloaded + /// by a [virtual table]. + int sqlite3_overload_function( + ffi.Pointer arg0, + ffi.Pointer zFuncName, + int nArg, + ) { + return _sqlite3_overload_function(arg0, zFuncName, nArg); + } + + late final _sqlite3_overload_functionPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, ffi.Int) + > + >('sqlite3_overload_function'); + late final _sqlite3_overload_function = _sqlite3_overload_functionPtr + .asFunction< + int Function(ffi.Pointer, ffi.Pointer, int) + >(); + + /// CAPI3REF: Compiling An SQL Statement + /// KEYWORDS: {SQL statement compiler} + /// METHOD: sqlite3 + /// CONSTRUCTOR: sqlite3_stmt + /// + /// To execute an SQL statement, it must first be compiled into a byte-code + /// program using one of these routines. Or, in other words, these routines + /// are constructors for the [prepared statement] object. + /// + /// The preferred routine to use is [sqlite3_prepare_v2()]. The + /// [sqlite3_prepare()] interface is legacy and should be avoided. + /// [sqlite3_prepare_v3()] has an extra "prepFlags" option that is used + /// for special purposes. + /// + /// The use of the UTF-8 interfaces is preferred, as SQLite currently + /// does all parsing using UTF-8. The UTF-16 interfaces are provided + /// as a convenience. The UTF-16 interfaces work by converting the + /// input text into UTF-8, then invoking the corresponding UTF-8 interface. + /// + /// The first argument, "db", is a [database connection] obtained from a + /// prior successful call to [sqlite3_open()], [sqlite3_open_v2()] or + /// [sqlite3_open16()]. The database connection must not have been closed. + /// + /// The second argument, "zSql", is the statement to be compiled, encoded + /// as either UTF-8 or UTF-16. The sqlite3_prepare(), sqlite3_prepare_v2(), + /// and sqlite3_prepare_v3() + /// interfaces use UTF-8, and sqlite3_prepare16(), sqlite3_prepare16_v2(), + /// and sqlite3_prepare16_v3() use UTF-16. + /// + /// ^If the nByte argument is negative, then zSql is read up to the + /// first zero terminator. ^If nByte is positive, then it is the + /// number of bytes read from zSql. ^If nByte is zero, then no prepared + /// statement is generated. + /// If the caller knows that the supplied string is nul-terminated, then + /// there is a small performance advantage to passing an nByte parameter that + /// is the number of bytes in the input string including + /// the nul-terminator. + /// + /// ^If pzTail is not NULL then *pzTail is made to point to the first byte + /// past the end of the first SQL statement in zSql. These routines only + /// compile the first statement in zSql, so *pzTail is left pointing to + /// what remains uncompiled. + /// + /// ^*ppStmt is left pointing to a compiled [prepared statement] that can be + /// executed using [sqlite3_step()]. ^If there is an error, *ppStmt is set + /// to NULL. ^If the input text contains no SQL (if the input is an empty + /// string or a comment) then *ppStmt is set to NULL. + /// The calling procedure is responsible for deleting the compiled + /// SQL statement using [sqlite3_finalize()] after it has finished with it. + /// ppStmt may not be NULL. + /// + /// ^On success, the sqlite3_prepare() family of routines return [SQLITE_OK]; + /// otherwise an [error code] is returned. + /// + /// The sqlite3_prepare_v2(), sqlite3_prepare_v3(), sqlite3_prepare16_v2(), + /// and sqlite3_prepare16_v3() interfaces are recommended for all new programs. + /// The older interfaces (sqlite3_prepare() and sqlite3_prepare16()) + /// are retained for backwards compatibility, but their use is discouraged. + /// ^In the "vX" interfaces, the prepared statement + /// that is returned (the [sqlite3_stmt] object) contains a copy of the + /// original SQL text. This causes the [sqlite3_step()] interface to + /// behave differently in three ways: + /// + ///
    + ///
  1. + /// ^If the database schema changes, instead of returning [SQLITE_SCHEMA] as it + /// always used to do, [sqlite3_step()] will automatically recompile the SQL + /// statement and try to run it again. As many as [SQLITE_MAX_SCHEMA_RETRY] + /// retries will occur before sqlite3_step() gives up and returns an error. + ///
  2. + /// + ///
  3. + /// ^When an error occurs, [sqlite3_step()] will return one of the detailed + /// [error codes] or [extended error codes]. ^The legacy behavior was that + /// [sqlite3_step()] would only return a generic [SQLITE_ERROR] result code + /// and the application would have to make a second call to [sqlite3_reset()] + /// in order to find the underlying cause of the problem. With the "v2" prepare + /// interfaces, the underlying reason for the error is returned immediately. + ///
  4. + /// + ///
  5. + /// ^If the specific value bound to a [parameter | host parameter] in the + /// WHERE clause might influence the choice of query plan for a statement, + /// then the statement will be automatically recompiled, as if there had been + /// a schema change, on the first [sqlite3_step()] call following any change + /// to the [sqlite3_bind_text | bindings] of that [parameter]. + /// ^The specific value of a WHERE-clause [parameter] might influence the + /// choice of query plan if the parameter is the left-hand side of a [LIKE] + /// or [GLOB] operator or if the parameter is compared to an indexed column + /// and the [SQLITE_ENABLE_STAT4] compile-time option is enabled. + ///
  6. + ///
+ /// + ///

^sqlite3_prepare_v3() differs from sqlite3_prepare_v2() only in having + /// the extra prepFlags parameter, which is a bit array consisting of zero or + /// more of the [SQLITE_PREPARE_PERSISTENT|SQLITE_PREPARE_*] flags. ^The + /// sqlite3_prepare_v2() interface works exactly the same as + /// sqlite3_prepare_v3() with a zero prepFlags parameter. + int sqlite3_prepare( + ffi.Pointer db, + ffi.Pointer zSql, + int nByte, + ffi.Pointer> ppStmt, + ffi.Pointer> pzTail, + ) { + return _sqlite3_prepare(db, zSql, nByte, ppStmt, pzTail); + } + + late final _sqlite3_preparePtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ffi.Pointer>, + ) + > + >('sqlite3_prepare'); + late final _sqlite3_prepare = _sqlite3_preparePtr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer>, + ) + >(); + + int sqlite3_prepare16( + ffi.Pointer db, + ffi.Pointer zSql, + int nByte, + ffi.Pointer> ppStmt, + ffi.Pointer> pzTail, + ) { + return _sqlite3_prepare16(db, zSql, nByte, ppStmt, pzTail); + } + + late final _sqlite3_prepare16Ptr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ffi.Pointer>, + ) + > + >('sqlite3_prepare16'); + late final _sqlite3_prepare16 = _sqlite3_prepare16Ptr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer>, + ) + >(); + + int sqlite3_prepare16_v2( + ffi.Pointer db, + ffi.Pointer zSql, + int nByte, + ffi.Pointer> ppStmt, + ffi.Pointer> pzTail, + ) { + return _sqlite3_prepare16_v2(db, zSql, nByte, ppStmt, pzTail); + } + + late final _sqlite3_prepare16_v2Ptr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ffi.Pointer>, + ) + > + >('sqlite3_prepare16_v2'); + late final _sqlite3_prepare16_v2 = _sqlite3_prepare16_v2Ptr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer>, + ) + >(); + + int sqlite3_prepare16_v3( + ffi.Pointer db, + ffi.Pointer zSql, + int nByte, + int prepFlags, + ffi.Pointer> ppStmt, + ffi.Pointer> pzTail, + ) { + return _sqlite3_prepare16_v3(db, zSql, nByte, prepFlags, ppStmt, pzTail); + } + + late final _sqlite3_prepare16_v3Ptr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.UnsignedInt, + ffi.Pointer>, + ffi.Pointer>, + ) + > + >('sqlite3_prepare16_v3'); + late final _sqlite3_prepare16_v3 = _sqlite3_prepare16_v3Ptr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer>, + ffi.Pointer>, + ) + >(); + + int sqlite3_prepare_v2( + ffi.Pointer db, + ffi.Pointer zSql, + int nByte, + ffi.Pointer> ppStmt, + ffi.Pointer> pzTail, + ) { + return _sqlite3_prepare_v2(db, zSql, nByte, ppStmt, pzTail); + } + + late final _sqlite3_prepare_v2Ptr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ffi.Pointer>, + ) + > + >('sqlite3_prepare_v2'); + late final _sqlite3_prepare_v2 = _sqlite3_prepare_v2Ptr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer>, + ) + >(); + + int sqlite3_prepare_v3( + ffi.Pointer db, + ffi.Pointer zSql, + int nByte, + int prepFlags, + ffi.Pointer> ppStmt, + ffi.Pointer> pzTail, + ) { + return _sqlite3_prepare_v3(db, zSql, nByte, prepFlags, ppStmt, pzTail); + } + + late final _sqlite3_prepare_v3Ptr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.UnsignedInt, + ffi.Pointer>, + ffi.Pointer>, + ) + > + >('sqlite3_prepare_v3'); + late final _sqlite3_prepare_v3 = _sqlite3_prepare_v3Ptr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer>, + ffi.Pointer>, + ) + >(); + + ffi.Pointer sqlite3_profile( + ffi.Pointer arg0, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + sqlite3_uint64, + ) + > + > + xProfile, + ffi.Pointer arg2, + ) { + return _sqlite3_profile(arg0, xProfile, arg2); + } + + late final _sqlite3_profilePtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + sqlite3_uint64, + ) + > + >, + ffi.Pointer, + ) + > + >('sqlite3_profile'); + late final _sqlite3_profile = _sqlite3_profilePtr + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + sqlite3_uint64, + ) + > + >, + ffi.Pointer, + ) + >(); + + /// CAPI3REF: Query Progress Callbacks + /// METHOD: sqlite3 + /// + /// ^The sqlite3_progress_handler(D,N,X,P) interface causes the callback + /// function X to be invoked periodically during long running calls to + /// [sqlite3_exec()], [sqlite3_step()] and [sqlite3_get_table()] for + /// database connection D. An example use for this + /// interface is to keep a GUI updated during a large query. + /// + /// ^The parameter P is passed through as the only parameter to the + /// callback function X. ^The parameter N is the approximate number of + /// [virtual machine instructions] that are evaluated between successive + /// invocations of the callback X. ^If N is less than one then the progress + /// handler is disabled. + /// + /// ^Only a single progress handler may be defined at one time per + /// [database connection]; setting a new progress handler cancels the + /// old one. ^Setting parameter X to NULL disables the progress handler. + /// ^The progress handler is also disabled by setting N to a value less + /// than 1. + /// + /// ^If the progress callback returns non-zero, the operation is + /// interrupted. This feature can be used to implement a + /// "Cancel" button on a GUI progress dialog box. + /// + /// The progress handler callback must not do anything that will modify + /// the database connection that invoked the progress handler. + /// Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their + /// database connections for the meaning of "modify" in this paragraph. + void sqlite3_progress_handler( + ffi.Pointer arg0, + int arg1, + ffi.Pointer)>> + arg2, + ffi.Pointer arg3, + ) { + return _sqlite3_progress_handler(arg0, arg1, arg2, arg3); + } + + late final _sqlite3_progress_handlerPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer< + ffi.NativeFunction)> + >, + ffi.Pointer, + ) + > + >('sqlite3_progress_handler'); + late final _sqlite3_progress_handler = _sqlite3_progress_handlerPtr + .asFunction< + void Function( + ffi.Pointer, + int, + ffi.Pointer< + ffi.NativeFunction)> + >, + ffi.Pointer, + ) + >(); + + /// CAPI3REF: Pseudo-Random Number Generator + /// + /// SQLite contains a high-quality pseudo-random number generator (PRNG) used to + /// select random [ROWID | ROWIDs] when inserting new records into a table that + /// already uses the largest possible [ROWID]. The PRNG is also used for + /// the built-in random() and randomblob() SQL functions. This interface allows + /// applications to access the same PRNG for other purposes. + /// + /// ^A call to this routine stores N bytes of randomness into buffer P. + /// ^The P parameter can be a NULL pointer. + /// + /// ^If this routine has not been previously called or if the previous + /// call had N less than one or a NULL pointer for P, then the PRNG is + /// seeded using randomness obtained from the xRandomness method of + /// the default [sqlite3_vfs] object. + /// ^If the previous call to this routine had an N of 1 or more and a + /// non-NULL P then the pseudo-randomness is generated + /// internally and without recourse to the [sqlite3_vfs] xRandomness + /// method. + void sqlite3_randomness(int N, ffi.Pointer P) { + return _sqlite3_randomness(N, P); + } + + late final _sqlite3_randomnessPtr = + _lookup< + ffi.NativeFunction)> + >('sqlite3_randomness'); + late final _sqlite3_randomness = _sqlite3_randomnessPtr + .asFunction)>(); + + ffi.Pointer sqlite3_realloc(ffi.Pointer arg0, int arg1) { + return _sqlite3_realloc(arg0, arg1); + } + + late final _sqlite3_reallocPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Int) + > + >('sqlite3_realloc'); + late final _sqlite3_realloc = _sqlite3_reallocPtr + .asFunction Function(ffi.Pointer, int)>(); + + ffi.Pointer sqlite3_realloc64( + ffi.Pointer arg0, + int arg1, + ) { + return _sqlite3_realloc64(arg0, arg1); + } + + late final _sqlite3_realloc64Ptr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, sqlite3_uint64) + > + >('sqlite3_realloc64'); + late final _sqlite3_realloc64 = _sqlite3_realloc64Ptr + .asFunction Function(ffi.Pointer, int)>(); + + /// CAPI3REF: Attempt To Free Heap Memory + /// + /// ^The sqlite3_release_memory() interface attempts to free N bytes + /// of heap memory by deallocating non-essential memory allocations + /// held by the database library. Memory used to cache database + /// pages to improve performance is an example of non-essential memory. + /// ^sqlite3_release_memory() returns the number of bytes actually freed, + /// which might be more or less than the amount requested. + /// ^The sqlite3_release_memory() routine is a no-op returning zero + /// if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT]. + /// + /// See also: [sqlite3_db_release_memory()] + int sqlite3_release_memory(int arg0) { + return _sqlite3_release_memory(arg0); + } + + late final _sqlite3_release_memoryPtr = + _lookup>( + 'sqlite3_release_memory', + ); + late final _sqlite3_release_memory = _sqlite3_release_memoryPtr + .asFunction(); + + /// CAPI3REF: Reset A Prepared Statement Object + /// METHOD: sqlite3_stmt + /// + /// The sqlite3_reset() function is called to reset a [prepared statement] + /// object back to its initial state, ready to be re-executed. + /// ^Any SQL statement variables that had values bound to them using + /// the [sqlite3_bind_blob | sqlite3_bind_*() API] retain their values. + /// Use [sqlite3_clear_bindings()] to reset the bindings. + /// + /// ^The [sqlite3_reset(S)] interface resets the [prepared statement] S + /// back to the beginning of its program. + /// + /// ^If the most recent call to [sqlite3_step(S)] for the + /// [prepared statement] S returned [SQLITE_ROW] or [SQLITE_DONE], + /// or if [sqlite3_step(S)] has never before been called on S, + /// then [sqlite3_reset(S)] returns [SQLITE_OK]. + /// + /// ^If the most recent call to [sqlite3_step(S)] for the + /// [prepared statement] S indicated an error, then + /// [sqlite3_reset(S)] returns an appropriate [error code]. + /// + /// ^The [sqlite3_reset(S)] interface does not change the values + /// of any [sqlite3_bind_blob|bindings] on the [prepared statement] S. + int sqlite3_reset(ffi.Pointer pStmt) { + return _sqlite3_reset(pStmt); + } + + late final _sqlite3_resetPtr = + _lookup)>>( + 'sqlite3_reset', + ); + late final _sqlite3_reset = _sqlite3_resetPtr + .asFunction)>(); + + /// CAPI3REF: Reset Automatic Extension Loading + /// + /// ^This interface disables all automatic extensions previously + /// registered using [sqlite3_auto_extension()]. + void sqlite3_reset_auto_extension() { + return _sqlite3_reset_auto_extension(); + } + + late final _sqlite3_reset_auto_extensionPtr = + _lookup>( + 'sqlite3_reset_auto_extension', + ); + late final _sqlite3_reset_auto_extension = _sqlite3_reset_auto_extensionPtr + .asFunction(); + + /// CAPI3REF: Setting The Result Of An SQL Function + /// METHOD: sqlite3_context + /// + /// These routines are used by the xFunc or xFinal callbacks that + /// implement SQL functions and aggregates. See + /// [sqlite3_create_function()] and [sqlite3_create_function16()] + /// for additional information. + /// + /// These functions work very much like the [parameter binding] family of + /// functions used to bind values to host parameters in prepared statements. + /// Refer to the [SQL parameter] documentation for additional information. + /// + /// ^The sqlite3_result_blob() interface sets the result from + /// an application-defined function to be the BLOB whose content is pointed + /// to by the second parameter and which is N bytes long where N is the + /// third parameter. + /// + /// ^The sqlite3_result_zeroblob(C,N) and sqlite3_result_zeroblob64(C,N) + /// interfaces set the result of the application-defined function to be + /// a BLOB containing all zero bytes and N bytes in size. + /// + /// ^The sqlite3_result_double() interface sets the result from + /// an application-defined function to be a floating point value specified + /// by its 2nd argument. + /// + /// ^The sqlite3_result_error() and sqlite3_result_error16() functions + /// cause the implemented SQL function to throw an exception. + /// ^SQLite uses the string pointed to by the + /// 2nd parameter of sqlite3_result_error() or sqlite3_result_error16() + /// as the text of an error message. ^SQLite interprets the error + /// message string from sqlite3_result_error() as UTF-8. ^SQLite + /// interprets the string from sqlite3_result_error16() as UTF-16 using + /// the same [byte-order determination rules] as [sqlite3_bind_text16()]. + /// ^If the third parameter to sqlite3_result_error() + /// or sqlite3_result_error16() is negative then SQLite takes as the error + /// message all text up through the first zero character. + /// ^If the third parameter to sqlite3_result_error() or + /// sqlite3_result_error16() is non-negative then SQLite takes that many + /// bytes (not characters) from the 2nd parameter as the error message. + /// ^The sqlite3_result_error() and sqlite3_result_error16() + /// routines make a private copy of the error message text before + /// they return. Hence, the calling function can deallocate or + /// modify the text after they return without harm. + /// ^The sqlite3_result_error_code() function changes the error code + /// returned by SQLite as a result of an error in a function. ^By default, + /// the error code is SQLITE_ERROR. ^A subsequent call to sqlite3_result_error() + /// or sqlite3_result_error16() resets the error code to SQLITE_ERROR. + /// + /// ^The sqlite3_result_error_toobig() interface causes SQLite to throw an + /// error indicating that a string or BLOB is too long to represent. + /// + /// ^The sqlite3_result_error_nomem() interface causes SQLite to throw an + /// error indicating that a memory allocation failed. + /// + /// ^The sqlite3_result_int() interface sets the return value + /// of the application-defined function to be the 32-bit signed integer + /// value given in the 2nd argument. + /// ^The sqlite3_result_int64() interface sets the return value + /// of the application-defined function to be the 64-bit signed integer + /// value given in the 2nd argument. + /// + /// ^The sqlite3_result_null() interface sets the return value + /// of the application-defined function to be NULL. + /// + /// ^The sqlite3_result_text(), sqlite3_result_text16(), + /// sqlite3_result_text16le(), and sqlite3_result_text16be() interfaces + /// set the return value of the application-defined function to be + /// a text string which is represented as UTF-8, UTF-16 native byte order, + /// UTF-16 little endian, or UTF-16 big endian, respectively. + /// ^The sqlite3_result_text64() interface sets the return value of an + /// application-defined function to be a text string in an encoding + /// specified by the fifth (and last) parameter, which must be one + /// of [SQLITE_UTF8], [SQLITE_UTF16], [SQLITE_UTF16BE], or [SQLITE_UTF16LE]. + /// ^SQLite takes the text result from the application from + /// the 2nd parameter of the sqlite3_result_text* interfaces. + /// ^If the 3rd parameter to the sqlite3_result_text* interfaces + /// is negative, then SQLite takes result text from the 2nd parameter + /// through the first zero character. + /// ^If the 3rd parameter to the sqlite3_result_text* interfaces + /// is non-negative, then as many bytes (not characters) of the text + /// pointed to by the 2nd parameter are taken as the application-defined + /// function result. If the 3rd parameter is non-negative, then it + /// must be the byte offset into the string where the NUL terminator would + /// appear if the string where NUL terminated. If any NUL characters occur + /// in the string at a byte offset that is less than the value of the 3rd + /// parameter, then the resulting string will contain embedded NULs and the + /// result of expressions operating on strings with embedded NULs is undefined. + /// ^If the 4th parameter to the sqlite3_result_text* interfaces + /// or sqlite3_result_blob is a non-NULL pointer, then SQLite calls that + /// function as the destructor on the text or BLOB result when it has + /// finished using that result. + /// ^If the 4th parameter to the sqlite3_result_text* interfaces or to + /// sqlite3_result_blob is the special constant SQLITE_STATIC, then SQLite + /// assumes that the text or BLOB result is in constant space and does not + /// copy the content of the parameter nor call a destructor on the content + /// when it has finished using that result. + /// ^If the 4th parameter to the sqlite3_result_text* interfaces + /// or sqlite3_result_blob is the special constant SQLITE_TRANSIENT + /// then SQLite makes a copy of the result into space obtained + /// from [sqlite3_malloc()] before it returns. + /// + /// ^For the sqlite3_result_text16(), sqlite3_result_text16le(), and + /// sqlite3_result_text16be() routines, and for sqlite3_result_text64() + /// when the encoding is not UTF8, if the input UTF16 begins with a + /// byte-order mark (BOM, U+FEFF) then the BOM is removed from the + /// string and the rest of the string is interpreted according to the + /// byte-order specified by the BOM. ^The byte-order specified by + /// the BOM at the beginning of the text overrides the byte-order + /// specified by the interface procedure. ^So, for example, if + /// sqlite3_result_text16le() is invoked with text that begins + /// with bytes 0xfe, 0xff (a big-endian byte-order mark) then the + /// first two bytes of input are skipped and the remaining input + /// is interpreted as UTF16BE text. + /// + /// ^For UTF16 input text to the sqlite3_result_text16(), + /// sqlite3_result_text16be(), sqlite3_result_text16le(), and + /// sqlite3_result_text64() routines, if the text contains invalid + /// UTF16 characters, the invalid characters might be converted + /// into the unicode replacement character, U+FFFD. + /// + /// ^The sqlite3_result_value() interface sets the result of + /// the application-defined function to be a copy of the + /// [unprotected sqlite3_value] object specified by the 2nd parameter. ^The + /// sqlite3_result_value() interface makes a copy of the [sqlite3_value] + /// so that the [sqlite3_value] specified in the parameter may change or + /// be deallocated after sqlite3_result_value() returns without harm. + /// ^A [protected sqlite3_value] object may always be used where an + /// [unprotected sqlite3_value] object is required, so either + /// kind of [sqlite3_value] object can be used with this interface. + /// + /// ^The sqlite3_result_pointer(C,P,T,D) interface sets the result to an + /// SQL NULL value, just like [sqlite3_result_null(C)], except that it + /// also associates the host-language pointer P or type T with that + /// NULL value such that the pointer can be retrieved within an + /// [application-defined SQL function] using [sqlite3_value_pointer()]. + /// ^If the D parameter is not NULL, then it is a pointer to a destructor + /// for the P parameter. ^SQLite invokes D with P as its only argument + /// when SQLite is finished with P. The T parameter should be a static + /// string and preferably a string literal. The sqlite3_result_pointer() + /// routine is part of the [pointer passing interface] added for SQLite 3.20.0. + /// + /// If these routines are called from within the different thread + /// than the one containing the application-defined function that received + /// the [sqlite3_context] pointer, the results are undefined. + void sqlite3_result_blob( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer)>> + arg3, + ) { + return _sqlite3_result_blob(arg0, arg1, arg2, arg3); + } + + late final _sqlite3_result_blobPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + > + >('sqlite3_result_blob'); + late final _sqlite3_result_blob = _sqlite3_result_blobPtr + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + >(); + + void sqlite3_result_blob64( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer)>> + arg3, + ) { + return _sqlite3_result_blob64(arg0, arg1, arg2, arg3); + } + + late final _sqlite3_result_blob64Ptr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + sqlite3_uint64, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + > + >('sqlite3_result_blob64'); + late final _sqlite3_result_blob64 = _sqlite3_result_blob64Ptr + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + >(); + + void sqlite3_result_double(ffi.Pointer arg0, double arg1) { + return _sqlite3_result_double(arg0, arg1); + } + + late final _sqlite3_result_doublePtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Double) + > + >('sqlite3_result_double'); + late final _sqlite3_result_double = _sqlite3_result_doublePtr + .asFunction, double)>(); + + void sqlite3_result_error( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _sqlite3_result_error(arg0, arg1, arg2); + } + + late final _sqlite3_result_errorPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ) + > + >('sqlite3_result_error'); + late final _sqlite3_result_error = _sqlite3_result_errorPtr + .asFunction< + void Function(ffi.Pointer, ffi.Pointer, int) + >(); + + void sqlite3_result_error16( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _sqlite3_result_error16(arg0, arg1, arg2); + } + + late final _sqlite3_result_error16Ptr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ) + > + >('sqlite3_result_error16'); + late final _sqlite3_result_error16 = _sqlite3_result_error16Ptr + .asFunction< + void Function(ffi.Pointer, ffi.Pointer, int) + >(); + + void sqlite3_result_error_code(ffi.Pointer arg0, int arg1) { + return _sqlite3_result_error_code(arg0, arg1); + } + + late final _sqlite3_result_error_codePtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Int) + > + >('sqlite3_result_error_code'); + late final _sqlite3_result_error_code = _sqlite3_result_error_codePtr + .asFunction, int)>(); + + void sqlite3_result_error_nomem(ffi.Pointer arg0) { + return _sqlite3_result_error_nomem(arg0); + } + + late final _sqlite3_result_error_nomemPtr = + _lookup< + ffi.NativeFunction)> + >('sqlite3_result_error_nomem'); + late final _sqlite3_result_error_nomem = _sqlite3_result_error_nomemPtr + .asFunction)>(); + + void sqlite3_result_error_toobig(ffi.Pointer arg0) { + return _sqlite3_result_error_toobig(arg0); + } + + late final _sqlite3_result_error_toobigPtr = + _lookup< + ffi.NativeFunction)> + >('sqlite3_result_error_toobig'); + late final _sqlite3_result_error_toobig = _sqlite3_result_error_toobigPtr + .asFunction)>(); + + void sqlite3_result_int(ffi.Pointer arg0, int arg1) { + return _sqlite3_result_int(arg0, arg1); + } + + late final _sqlite3_result_intPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Int) + > + >('sqlite3_result_int'); + late final _sqlite3_result_int = _sqlite3_result_intPtr + .asFunction, int)>(); + + void sqlite3_result_int64(ffi.Pointer arg0, int arg1) { + return _sqlite3_result_int64(arg0, arg1); + } + + late final _sqlite3_result_int64Ptr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, sqlite3_int64) + > + >('sqlite3_result_int64'); + late final _sqlite3_result_int64 = _sqlite3_result_int64Ptr + .asFunction, int)>(); + + void sqlite3_result_null(ffi.Pointer arg0) { + return _sqlite3_result_null(arg0); + } + + late final _sqlite3_result_nullPtr = + _lookup< + ffi.NativeFunction)> + >('sqlite3_result_null'); + late final _sqlite3_result_null = _sqlite3_result_nullPtr + .asFunction)>(); + + void sqlite3_result_pointer( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer)>> + arg3, + ) { + return _sqlite3_result_pointer(arg0, arg1, arg2, arg3); + } + + late final _sqlite3_result_pointerPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + > + >('sqlite3_result_pointer'); + late final _sqlite3_result_pointer = _sqlite3_result_pointerPtr + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + >(); + + /// CAPI3REF: Setting The Subtype Of An SQL Function + /// METHOD: sqlite3_context + /// + /// The sqlite3_result_subtype(C,T) function causes the subtype of + /// the result from the [application-defined SQL function] with + /// [sqlite3_context] C to be the value T. Only the lower 8 bits + /// of the subtype T are preserved in current versions of SQLite; + /// higher order bits are discarded. + /// The number of subtype bytes preserved by SQLite might increase + /// in future releases of SQLite. + void sqlite3_result_subtype(ffi.Pointer arg0, int arg1) { + return _sqlite3_result_subtype(arg0, arg1); + } + + late final _sqlite3_result_subtypePtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.UnsignedInt) + > + >('sqlite3_result_subtype'); + late final _sqlite3_result_subtype = _sqlite3_result_subtypePtr + .asFunction, int)>(); + + void sqlite3_result_text( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer)>> + arg3, + ) { + return _sqlite3_result_text(arg0, arg1, arg2, arg3); + } + + late final _sqlite3_result_textPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + > + >('sqlite3_result_text'); + late final _sqlite3_result_text = _sqlite3_result_textPtr + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + >(); + + void sqlite3_result_text16( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer)>> + arg3, + ) { + return _sqlite3_result_text16(arg0, arg1, arg2, arg3); + } + + late final _sqlite3_result_text16Ptr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + > + >('sqlite3_result_text16'); + late final _sqlite3_result_text16 = _sqlite3_result_text16Ptr + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + >(); + + void sqlite3_result_text16be( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer)>> + arg3, + ) { + return _sqlite3_result_text16be(arg0, arg1, arg2, arg3); + } + + late final _sqlite3_result_text16bePtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + > + >('sqlite3_result_text16be'); + late final _sqlite3_result_text16be = _sqlite3_result_text16bePtr + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + >(); + + void sqlite3_result_text16le( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer)>> + arg3, + ) { + return _sqlite3_result_text16le(arg0, arg1, arg2, arg3); + } + + late final _sqlite3_result_text16lePtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + > + >('sqlite3_result_text16le'); + late final _sqlite3_result_text16le = _sqlite3_result_text16lePtr + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + >(); + + void sqlite3_result_text64( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer)>> + arg3, + int encoding, + ) { + return _sqlite3_result_text64(arg0, arg1, arg2, arg3, encoding); + } + + late final _sqlite3_result_text64Ptr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + sqlite3_uint64, + ffi.Pointer< + ffi.NativeFunction)> + >, + ffi.UnsignedChar, + ) + > + >('sqlite3_result_text64'); + late final _sqlite3_result_text64 = _sqlite3_result_text64Ptr + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer< + ffi.NativeFunction)> + >, + int, + ) + >(); + + void sqlite3_result_value( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _sqlite3_result_value(arg0, arg1); + } + + late final _sqlite3_result_valuePtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >('sqlite3_result_value'); + late final _sqlite3_result_value = _sqlite3_result_valuePtr + .asFunction< + void Function(ffi.Pointer, ffi.Pointer) + >(); + + void sqlite3_result_zeroblob(ffi.Pointer arg0, int n) { + return _sqlite3_result_zeroblob(arg0, n); + } + + late final _sqlite3_result_zeroblobPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Int) + > + >('sqlite3_result_zeroblob'); + late final _sqlite3_result_zeroblob = _sqlite3_result_zeroblobPtr + .asFunction, int)>(); + + int sqlite3_result_zeroblob64(ffi.Pointer arg0, int n) { + return _sqlite3_result_zeroblob64(arg0, n); + } + + late final _sqlite3_result_zeroblob64Ptr = + _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, sqlite3_uint64) + > + >('sqlite3_result_zeroblob64'); + late final _sqlite3_result_zeroblob64 = _sqlite3_result_zeroblob64Ptr + .asFunction, int)>(); + + ffi.Pointer sqlite3_rollback_hook( + ffi.Pointer arg0, + ffi.Pointer)>> + arg1, + ffi.Pointer arg2, + ) { + return _sqlite3_rollback_hook(arg0, arg1, arg2); + } + + late final _sqlite3_rollback_hookPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction)> + >, + ffi.Pointer, + ) + > + >('sqlite3_rollback_hook'); + late final _sqlite3_rollback_hook = _sqlite3_rollback_hookPtr + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction)> + >, + ffi.Pointer, + ) + >(); + + /// Register a geometry callback named zGeom that can be used as part of an + /// R-Tree geometry query as follows: + /// + /// SELECT ... FROM WHERE MATCH $zGeom(... params ...) + int sqlite3_rtree_geometry_callback( + ffi.Pointer db, + ffi.Pointer zGeom, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ) + > + > + xGeom, + ffi.Pointer pContext, + ) { + return _sqlite3_rtree_geometry_callback(db, zGeom, xGeom, pContext); + } + + late final _sqlite3_rtree_geometry_callbackPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ) + > + >, + ffi.Pointer, + ) + > + >('sqlite3_rtree_geometry_callback'); + late final _sqlite3_rtree_geometry_callback = + _sqlite3_rtree_geometry_callbackPtr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ) + > + >, + ffi.Pointer, + ) + >(); + + /// Register a 2nd-generation geometry callback named zScore that can be + /// used as part of an R-Tree geometry query as follows: + /// + /// SELECT ... FROM WHERE MATCH $zQueryFunc(... params ...) + int sqlite3_rtree_query_callback( + ffi.Pointer db, + ffi.Pointer zQueryFunc, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer) + > + > + xQueryFunc, + ffi.Pointer pContext, + ffi.Pointer)>> + xDestructor, + ) { + return _sqlite3_rtree_query_callback( + db, + zQueryFunc, + xQueryFunc, + pContext, + xDestructor, + ); + } + + late final _sqlite3_rtree_query_callbackPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer) + > + >, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + > + >('sqlite3_rtree_query_callback'); + late final _sqlite3_rtree_query_callback = _sqlite3_rtree_query_callbackPtr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer) + > + >, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + >(); + + /// CAPI3REF: Serialize a database + /// + /// The sqlite3_serialize(D,S,P,F) interface returns a pointer to memory + /// that is a serialization of the S database on [database connection] D. + /// If P is not a NULL pointer, then the size of the database in bytes + /// is written into *P. + /// + /// For an ordinary on-disk database file, the serialization is just a + /// copy of the disk file. For an in-memory database or a "TEMP" database, + /// the serialization is the same sequence of bytes which would be written + /// to disk if that database where backed up to disk. + /// + /// The usual case is that sqlite3_serialize() copies the serialization of + /// the database into memory obtained from [sqlite3_malloc64()] and returns + /// a pointer to that memory. The caller is responsible for freeing the + /// returned value to avoid a memory leak. However, if the F argument + /// contains the SQLITE_SERIALIZE_NOCOPY bit, then no memory allocations + /// are made, and the sqlite3_serialize() function will return a pointer + /// to the contiguous memory representation of the database that SQLite + /// is currently using for that database, or NULL if the no such contiguous + /// memory representation of the database exists. A contiguous memory + /// representation of the database will usually only exist if there has + /// been a prior call to [sqlite3_deserialize(D,S,...)] with the same + /// values of D and S. + /// The size of the database is written into *P even if the + /// SQLITE_SERIALIZE_NOCOPY bit is set but no contiguous copy + /// of the database exists. + /// + /// A call to sqlite3_serialize(D,S,P,F) might return NULL even if the + /// SQLITE_SERIALIZE_NOCOPY bit is omitted from argument F if a memory + /// allocation error occurs. + /// + /// This interface is only available if SQLite is compiled with the + /// [SQLITE_ENABLE_DESERIALIZE] option. + ffi.Pointer sqlite3_serialize( + ffi.Pointer db, + ffi.Pointer zSchema, + ffi.Pointer piSize, + int mFlags, + ) { + return _sqlite3_serialize(db, zSchema, piSize, mFlags); + } + + late final _sqlite3_serializePtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ) + > + >('sqlite3_serialize'); + late final _sqlite3_serialize = _sqlite3_serializePtr + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ) + >(); + + /// CAPI3REF: Compile-Time Authorization Callbacks + /// METHOD: sqlite3 + /// KEYWORDS: {authorizer callback} + /// + /// ^This routine registers an authorizer callback with a particular + /// [database connection], supplied in the first argument. + /// ^The authorizer callback is invoked as SQL statements are being compiled + /// by [sqlite3_prepare()] or its variants [sqlite3_prepare_v2()], + /// [sqlite3_prepare_v3()], [sqlite3_prepare16()], [sqlite3_prepare16_v2()], + /// and [sqlite3_prepare16_v3()]. ^At various + /// points during the compilation process, as logic is being created + /// to perform various actions, the authorizer callback is invoked to + /// see if those actions are allowed. ^The authorizer callback should + /// return [SQLITE_OK] to allow the action, [SQLITE_IGNORE] to disallow the + /// specific action but allow the SQL statement to continue to be + /// compiled, or [SQLITE_DENY] to cause the entire SQL statement to be + /// rejected with an error. ^If the authorizer callback returns + /// any value other than [SQLITE_IGNORE], [SQLITE_OK], or [SQLITE_DENY] + /// then the [sqlite3_prepare_v2()] or equivalent call that triggered + /// the authorizer will fail with an error message. + /// + /// When the callback returns [SQLITE_OK], that means the operation + /// requested is ok. ^When the callback returns [SQLITE_DENY], the + /// [sqlite3_prepare_v2()] or equivalent call that triggered the + /// authorizer will fail with an error message explaining that + /// access is denied. + /// + /// ^The first parameter to the authorizer callback is a copy of the third + /// parameter to the sqlite3_set_authorizer() interface. ^The second parameter + /// to the callback is an integer [SQLITE_COPY | action code] that specifies + /// the particular action to be authorized. ^The third through sixth parameters + /// to the callback are either NULL pointers or zero-terminated strings + /// that contain additional details about the action to be authorized. + /// Applications must always be prepared to encounter a NULL pointer in any + /// of the third through the sixth parameters of the authorization callback. + /// + /// ^If the action code is [SQLITE_READ] + /// and the callback returns [SQLITE_IGNORE] then the + /// [prepared statement] statement is constructed to substitute + /// a NULL value in place of the table column that would have + /// been read if [SQLITE_OK] had been returned. The [SQLITE_IGNORE] + /// return can be used to deny an untrusted user access to individual + /// columns of a table. + /// ^When a table is referenced by a [SELECT] but no column values are + /// extracted from that table (for example in a query like + /// "SELECT count(*) FROM tab") then the [SQLITE_READ] authorizer callback + /// is invoked once for that table with a column name that is an empty string. + /// ^If the action code is [SQLITE_DELETE] and the callback returns + /// [SQLITE_IGNORE] then the [DELETE] operation proceeds but the + /// [truncate optimization] is disabled and all rows are deleted individually. + /// + /// An authorizer is used when [sqlite3_prepare | preparing] + /// SQL statements from an untrusted source, to ensure that the SQL statements + /// do not try to access data they are not allowed to see, or that they do not + /// try to execute malicious statements that damage the database. For + /// example, an application may allow a user to enter arbitrary + /// SQL queries for evaluation by a database. But the application does + /// not want the user to be able to make arbitrary changes to the + /// database. An authorizer could then be put in place while the + /// user-entered SQL is being [sqlite3_prepare | prepared] that + /// disallows everything except [SELECT] statements. + /// + /// Applications that need to process SQL from untrusted sources + /// might also consider lowering resource limits using [sqlite3_limit()] + /// and limiting database size using the [max_page_count] [PRAGMA] + /// in addition to using an authorizer. + /// + /// ^(Only a single authorizer can be in place on a database connection + /// at a time. Each call to sqlite3_set_authorizer overrides the + /// previous call.)^ ^Disable the authorizer by installing a NULL callback. + /// The authorizer is disabled by default. + /// + /// The authorizer callback must not do anything that will modify + /// the database connection that invoked the authorizer callback. + /// Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their + /// database connections for the meaning of "modify" in this paragraph. + /// + /// ^When [sqlite3_prepare_v2()] is used to prepare a statement, the + /// statement might be re-prepared during [sqlite3_step()] due to a + /// schema change. Hence, the application should ensure that the + /// correct authorizer callback remains in place during the [sqlite3_step()]. + /// + /// ^Note that the authorizer callback is invoked only during + /// [sqlite3_prepare()] or its variants. Authorization is not + /// performed during statement evaluation in [sqlite3_step()], unless + /// as stated in the previous paragraph, sqlite3_step() invokes + /// sqlite3_prepare_v2() to reprepare a statement after a schema change. + int sqlite3_set_authorizer( + ffi.Pointer arg0, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + > + xAuth, + ffi.Pointer pUserData, + ) { + return _sqlite3_set_authorizer(arg0, xAuth, pUserData); + } + + late final _sqlite3_set_authorizerPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >, + ffi.Pointer, + ) + > + >('sqlite3_set_authorizer'); + late final _sqlite3_set_authorizer = _sqlite3_set_authorizerPtr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >, + ffi.Pointer, + ) + >(); + + void sqlite3_set_auxdata( + ffi.Pointer arg0, + int N, + ffi.Pointer arg2, + ffi.Pointer)>> + arg3, + ) { + return _sqlite3_set_auxdata(arg0, N, arg2, arg3); + } + + late final _sqlite3_set_auxdataPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + > + >('sqlite3_set_auxdata'); + late final _sqlite3_set_auxdata = _sqlite3_set_auxdataPtr + .asFunction< + void Function( + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + >(); + + /// CAPI3REF: Set the Last Insert Rowid value. + /// METHOD: sqlite3 + /// + /// The sqlite3_set_last_insert_rowid(D, R) method allows the application to + /// set the value returned by calling sqlite3_last_insert_rowid(D) to R + /// without inserting a row into the database. + void sqlite3_set_last_insert_rowid(ffi.Pointer arg0, int arg1) { + return _sqlite3_set_last_insert_rowid(arg0, arg1); + } + + late final _sqlite3_set_last_insert_rowidPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, sqlite3_int64) + > + >('sqlite3_set_last_insert_rowid'); + late final _sqlite3_set_last_insert_rowid = _sqlite3_set_last_insert_rowidPtr + .asFunction, int)>(); + + int sqlite3_shutdown() { + return _sqlite3_shutdown(); + } + + late final _sqlite3_shutdownPtr = + _lookup>('sqlite3_shutdown'); + late final _sqlite3_shutdown = _sqlite3_shutdownPtr + .asFunction(); + + /// CAPI3REF: Suspend Execution For A Short Time + /// + /// The sqlite3_sleep() function causes the current thread to suspend execution + /// for at least a number of milliseconds specified in its parameter. + /// + /// If the operating system does not support sleep requests with + /// millisecond time resolution, then the time will be rounded up to + /// the nearest second. The number of milliseconds of sleep actually + /// requested from the operating system is returned. + /// + /// ^SQLite implements this interface by calling the xSleep() + /// method of the default [sqlite3_vfs] object. If the xSleep() method + /// of the default VFS is not implemented correctly, or not implemented at + /// all, then the behavior of sqlite3_sleep() may deviate from the description + /// in the previous paragraphs. + int sqlite3_sleep(int arg0) { + return _sqlite3_sleep(arg0); + } + + late final _sqlite3_sleepPtr = + _lookup>('sqlite3_sleep'); + late final _sqlite3_sleep = _sqlite3_sleepPtr.asFunction(); + + /// CAPI3REF: Compare the ages of two snapshot handles. + /// METHOD: sqlite3_snapshot + /// + /// The sqlite3_snapshot_cmp(P1, P2) interface is used to compare the ages + /// of two valid snapshot handles. + /// + /// If the two snapshot handles are not associated with the same database + /// file, the result of the comparison is undefined. + /// + /// Additionally, the result of the comparison is only valid if both of the + /// snapshot handles were obtained by calling sqlite3_snapshot_get() since the + /// last time the wal file was deleted. The wal file is deleted when the + /// database is changed back to rollback mode or when the number of database + /// clients drops to zero. If either snapshot handle was obtained before the + /// wal file was last deleted, the value returned by this function + /// is undefined. + /// + /// Otherwise, this API returns a negative value if P1 refers to an older + /// snapshot than P2, zero if the two handles refer to the same database + /// snapshot, and a positive value if P1 is a newer snapshot than P2. + /// + /// This interface is only available if SQLite is compiled with the + /// [SQLITE_ENABLE_SNAPSHOT] option. + int sqlite3_snapshot_cmp( + ffi.Pointer p1, + ffi.Pointer p2, + ) { + return _sqlite3_snapshot_cmp(p1, p2); + } + + late final _sqlite3_snapshot_cmpPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >('sqlite3_snapshot_cmp'); + late final _sqlite3_snapshot_cmp = _sqlite3_snapshot_cmpPtr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); + + /// CAPI3REF: Destroy a snapshot + /// DESTRUCTOR: sqlite3_snapshot + /// + /// ^The [sqlite3_snapshot_free(P)] interface destroys [sqlite3_snapshot] P. + /// The application must eventually free every [sqlite3_snapshot] object + /// using this routine to avoid a memory leak. + /// + /// The [sqlite3_snapshot_free()] interface is only available when the + /// [SQLITE_ENABLE_SNAPSHOT] compile-time option is used. + void sqlite3_snapshot_free(ffi.Pointer arg0) { + return _sqlite3_snapshot_free(arg0); + } + + late final _sqlite3_snapshot_freePtr = + _lookup< + ffi.NativeFunction)> + >('sqlite3_snapshot_free'); + late final _sqlite3_snapshot_free = _sqlite3_snapshot_freePtr + .asFunction)>(); + + /// CAPI3REF: Record A Database Snapshot + /// CONSTRUCTOR: sqlite3_snapshot + /// + /// ^The [sqlite3_snapshot_get(D,S,P)] interface attempts to make a + /// new [sqlite3_snapshot] object that records the current state of + /// schema S in database connection D. ^On success, the + /// [sqlite3_snapshot_get(D,S,P)] interface writes a pointer to the newly + /// created [sqlite3_snapshot] object into *P and returns SQLITE_OK. + /// If there is not already a read-transaction open on schema S when + /// this function is called, one is opened automatically. + /// + /// The following must be true for this function to succeed. If any of + /// the following statements are false when sqlite3_snapshot_get() is + /// called, SQLITE_ERROR is returned. The final value of *P is undefined + /// in this case. + /// + ///

    + ///
  • The database handle must not be in [autocommit mode]. + /// + ///
  • Schema S of [database connection] D must be a [WAL mode] database. + /// + ///
  • There must not be a write transaction open on schema S of database + /// connection D. + /// + ///
  • One or more transactions must have been written to the current wal + /// file since it was created on disk (by any connection). This means + /// that a snapshot cannot be taken on a wal mode database with no wal + /// file immediately after it is first opened. At least one transaction + /// must be written to it first. + ///
+ /// + /// This function may also return SQLITE_NOMEM. If it is called with the + /// database handle in autocommit mode but fails for some other reason, + /// whether or not a read transaction is opened on schema S is undefined. + /// + /// The [sqlite3_snapshot] object returned from a successful call to + /// [sqlite3_snapshot_get()] must be freed using [sqlite3_snapshot_free()] + /// to avoid a memory leak. + /// + /// The [sqlite3_snapshot_get()] interface is only available when the + /// [SQLITE_ENABLE_SNAPSHOT] compile-time option is used. + int sqlite3_snapshot_get( + ffi.Pointer db, + ffi.Pointer zSchema, + ffi.Pointer> ppSnapshot, + ) { + return _sqlite3_snapshot_get(db, zSchema, ppSnapshot); + } + + late final _sqlite3_snapshot_getPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ) + > + >('sqlite3_snapshot_get'); + late final _sqlite3_snapshot_get = _sqlite3_snapshot_getPtr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ) + >(); + + /// CAPI3REF: Start a read transaction on an historical snapshot + /// METHOD: sqlite3_snapshot + /// + /// ^The [sqlite3_snapshot_open(D,S,P)] interface either starts a new read + /// transaction or upgrades an existing one for schema S of + /// [database connection] D such that the read transaction refers to + /// historical [snapshot] P, rather than the most recent change to the + /// database. ^The [sqlite3_snapshot_open()] interface returns SQLITE_OK + /// on success or an appropriate [error code] if it fails. + /// + /// ^In order to succeed, the database connection must not be in + /// [autocommit mode] when [sqlite3_snapshot_open(D,S,P)] is called. If there + /// is already a read transaction open on schema S, then the database handle + /// must have no active statements (SELECT statements that have been passed + /// to sqlite3_step() but not sqlite3_reset() or sqlite3_finalize()). + /// SQLITE_ERROR is returned if either of these conditions is violated, or + /// if schema S does not exist, or if the snapshot object is invalid. + /// + /// ^A call to sqlite3_snapshot_open() will fail to open if the specified + /// snapshot has been overwritten by a [checkpoint]. In this case + /// SQLITE_ERROR_SNAPSHOT is returned. + /// + /// If there is already a read transaction open when this function is + /// invoked, then the same read transaction remains open (on the same + /// database snapshot) if SQLITE_ERROR, SQLITE_BUSY or SQLITE_ERROR_SNAPSHOT + /// is returned. If another error code - for example SQLITE_PROTOCOL or an + /// SQLITE_IOERR error code - is returned, then the final state of the + /// read transaction is undefined. If SQLITE_OK is returned, then the + /// read transaction is now open on database snapshot P. + /// + /// ^(A call to [sqlite3_snapshot_open(D,S,P)] will fail if the + /// database connection D does not know that the database file for + /// schema S is in [WAL mode]. A database connection might not know + /// that the database file is in [WAL mode] if there has been no prior + /// I/O on that database connection, or if the database entered [WAL mode] + /// after the most recent I/O on the database connection.)^ + /// (Hint: Run "[PRAGMA application_id]" against a newly opened + /// database connection in order to make it ready to use snapshots.) + /// + /// The [sqlite3_snapshot_open()] interface is only available when the + /// [SQLITE_ENABLE_SNAPSHOT] compile-time option is used. + int sqlite3_snapshot_open( + ffi.Pointer db, + ffi.Pointer zSchema, + ffi.Pointer pSnapshot, + ) { + return _sqlite3_snapshot_open(db, zSchema, pSnapshot); + } + + late final _sqlite3_snapshot_openPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >('sqlite3_snapshot_open'); + late final _sqlite3_snapshot_open = _sqlite3_snapshot_openPtr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); + + /// CAPI3REF: Recover snapshots from a wal file + /// METHOD: sqlite3_snapshot + /// + /// If a [WAL file] remains on disk after all database connections close + /// (either through the use of the [SQLITE_FCNTL_PERSIST_WAL] [file control] + /// or because the last process to have the database opened exited without + /// calling [sqlite3_close()]) and a new connection is subsequently opened + /// on that database and [WAL file], the [sqlite3_snapshot_open()] interface + /// will only be able to open the last transaction added to the WAL file + /// even though the WAL file contains other valid transactions. + /// + /// This function attempts to scan the WAL file associated with database zDb + /// of database handle db and make all valid snapshots available to + /// sqlite3_snapshot_open(). It is an error if there is already a read + /// transaction open on the database, or if the database is not a WAL mode + /// database. + /// + /// SQLITE_OK is returned if successful, or an SQLite error code otherwise. + /// + /// This interface is only available if SQLite is compiled with the + /// [SQLITE_ENABLE_SNAPSHOT] option. + int sqlite3_snapshot_recover( + ffi.Pointer db, + ffi.Pointer zDb, + ) { + return _sqlite3_snapshot_recover(db, zDb); + } + + late final _sqlite3_snapshot_recoverPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer) + > + >('sqlite3_snapshot_recover'); + late final _sqlite3_snapshot_recover = _sqlite3_snapshot_recoverPtr + .asFunction, ffi.Pointer)>(); + + ffi.Pointer sqlite3_snprintf( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + return _sqlite3_snprintf(arg0, arg1, arg2); + } + + late final _sqlite3_snprintfPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ) + > + >('sqlite3_snprintf'); + late final _sqlite3_snprintf = _sqlite3_snprintfPtr + .asFunction< + ffi.Pointer Function( + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); + + /// CAPI3REF: Deprecated Soft Heap Limit Interface + /// DEPRECATED + /// + /// This is a deprecated version of the [sqlite3_soft_heap_limit64()] + /// interface. This routine is provided for historical compatibility + /// only. All new applications should use the + /// [sqlite3_soft_heap_limit64()] interface rather than this one. + void sqlite3_soft_heap_limit(int N) { + return _sqlite3_soft_heap_limit(N); + } + + late final _sqlite3_soft_heap_limitPtr = + _lookup>( + 'sqlite3_soft_heap_limit', + ); + late final _sqlite3_soft_heap_limit = _sqlite3_soft_heap_limitPtr + .asFunction(); + + /// CAPI3REF: Impose A Limit On Heap Size + /// + /// These interfaces impose limits on the amount of heap memory that will be + /// by all database connections within a single process. + /// + /// ^The sqlite3_soft_heap_limit64() interface sets and/or queries the + /// soft limit on the amount of heap memory that may be allocated by SQLite. + /// ^SQLite strives to keep heap memory utilization below the soft heap + /// limit by reducing the number of pages held in the page cache + /// as heap memory usages approaches the limit. + /// ^The soft heap limit is "soft" because even though SQLite strives to stay + /// below the limit, it will exceed the limit rather than generate + /// an [SQLITE_NOMEM] error. In other words, the soft heap limit + /// is advisory only. + /// + /// ^The sqlite3_hard_heap_limit64(N) interface sets a hard upper bound of + /// N bytes on the amount of memory that will be allocated. ^The + /// sqlite3_hard_heap_limit64(N) interface is similar to + /// sqlite3_soft_heap_limit64(N) except that memory allocations will fail + /// when the hard heap limit is reached. + /// + /// ^The return value from both sqlite3_soft_heap_limit64() and + /// sqlite3_hard_heap_limit64() is the size of + /// the heap limit prior to the call, or negative in the case of an + /// error. ^If the argument N is negative + /// then no change is made to the heap limit. Hence, the current + /// size of heap limits can be determined by invoking + /// sqlite3_soft_heap_limit64(-1) or sqlite3_hard_heap_limit(-1). + /// + /// ^Setting the heap limits to zero disables the heap limiter mechanism. + /// + /// ^The soft heap limit may not be greater than the hard heap limit. + /// ^If the hard heap limit is enabled and if sqlite3_soft_heap_limit(N) + /// is invoked with a value of N that is greater than the hard heap limit, + /// the the soft heap limit is set to the value of the hard heap limit. + /// ^The soft heap limit is automatically enabled whenever the hard heap + /// limit is enabled. ^When sqlite3_hard_heap_limit64(N) is invoked and + /// the soft heap limit is outside the range of 1..N, then the soft heap + /// limit is set to N. ^Invoking sqlite3_soft_heap_limit64(0) when the + /// hard heap limit is enabled makes the soft heap limit equal to the + /// hard heap limit. + /// + /// The memory allocation limits can also be adjusted using + /// [PRAGMA soft_heap_limit] and [PRAGMA hard_heap_limit]. + /// + /// ^(The heap limits are not enforced in the current implementation + /// if one or more of following conditions are true: + /// + ///
    + ///
  • The limit value is set to zero. + ///
  • Memory accounting is disabled using a combination of the + /// [sqlite3_config]([SQLITE_CONFIG_MEMSTATUS],...) start-time option and + /// the [SQLITE_DEFAULT_MEMSTATUS] compile-time option. + ///
  • An alternative page cache implementation is specified using + /// [sqlite3_config]([SQLITE_CONFIG_PCACHE2],...). + ///
  • The page cache allocates from its own memory pool supplied + /// by [sqlite3_config]([SQLITE_CONFIG_PAGECACHE],...) rather than + /// from the heap. + ///
)^ + /// + /// The circumstances under which SQLite will enforce the heap limits may + /// changes in future releases of SQLite. + int sqlite3_soft_heap_limit64(int N) { + return _sqlite3_soft_heap_limit64(N); + } + + late final _sqlite3_soft_heap_limit64Ptr = + _lookup>( + 'sqlite3_soft_heap_limit64', + ); + late final _sqlite3_soft_heap_limit64 = _sqlite3_soft_heap_limit64Ptr + .asFunction(); + + ffi.Pointer sqlite3_sourceid() { + return _sqlite3_sourceid(); + } + + late final _sqlite3_sourceidPtr = + _lookup Function()>>( + 'sqlite3_sourceid', + ); + late final _sqlite3_sourceid = _sqlite3_sourceidPtr + .asFunction Function()>(); + + /// CAPI3REF: Retrieving Statement SQL + /// METHOD: sqlite3_stmt + /// + /// ^The sqlite3_sql(P) interface returns a pointer to a copy of the UTF-8 + /// SQL text used to create [prepared statement] P if P was + /// created by [sqlite3_prepare_v2()], [sqlite3_prepare_v3()], + /// [sqlite3_prepare16_v2()], or [sqlite3_prepare16_v3()]. + /// ^The sqlite3_expanded_sql(P) interface returns a pointer to a UTF-8 + /// string containing the SQL text of prepared statement P with + /// [bound parameters] expanded. + /// ^The sqlite3_normalized_sql(P) interface returns a pointer to a UTF-8 + /// string containing the normalized SQL text of prepared statement P. The + /// semantics used to normalize a SQL statement are unspecified and subject + /// to change. At a minimum, literal values will be replaced with suitable + /// placeholders. + /// + /// ^(For example, if a prepared statement is created using the SQL + /// text "SELECT $abc,:xyz" and if parameter $abc is bound to integer 2345 + /// and parameter :xyz is unbound, then sqlite3_sql() will return + /// the original string, "SELECT $abc,:xyz" but sqlite3_expanded_sql() + /// will return "SELECT 2345,NULL".)^ + /// + /// ^The sqlite3_expanded_sql() interface returns NULL if insufficient memory + /// is available to hold the result, or if the result would exceed the + /// the maximum string length determined by the [SQLITE_LIMIT_LENGTH]. + /// + /// ^The [SQLITE_TRACE_SIZE_LIMIT] compile-time option limits the size of + /// bound parameter expansions. ^The [SQLITE_OMIT_TRACE] compile-time + /// option causes sqlite3_expanded_sql() to always return NULL. + /// + /// ^The strings returned by sqlite3_sql(P) and sqlite3_normalized_sql(P) + /// are managed by SQLite and are automatically freed when the prepared + /// statement is finalized. + /// ^The string returned by sqlite3_expanded_sql(P), on the other hand, + /// is obtained from [sqlite3_malloc()] and must be free by the application + /// by passing it to [sqlite3_free()]. + ffi.Pointer sqlite3_sql(ffi.Pointer pStmt) { + return _sqlite3_sql(pStmt); + } + + late final _sqlite3_sqlPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer) + > + >('sqlite3_sql'); + late final _sqlite3_sql = _sqlite3_sqlPtr + .asFunction Function(ffi.Pointer)>(); + + /// CAPI3REF: SQLite Runtime Status + /// + /// ^These interfaces are used to retrieve runtime status information + /// about the performance of SQLite, and optionally to reset various + /// highwater marks. ^The first argument is an integer code for + /// the specific parameter to measure. ^(Recognized integer codes + /// are of the form [status parameters | SQLITE_STATUS_...].)^ + /// ^The current value of the parameter is returned into *pCurrent. + /// ^The highest recorded value is returned in *pHighwater. ^If the + /// resetFlag is true, then the highest record value is reset after + /// *pHighwater is written. ^(Some parameters do not record the highest + /// value. For those parameters + /// nothing is written into *pHighwater and the resetFlag is ignored.)^ + /// ^(Other parameters record only the highwater mark and not the current + /// value. For these latter parameters nothing is written into *pCurrent.)^ + /// + /// ^The sqlite3_status() and sqlite3_status64() routines return + /// SQLITE_OK on success and a non-zero [error code] on failure. + /// + /// If either the current value or the highwater mark is too large to + /// be represented by a 32-bit integer, then the values returned by + /// sqlite3_status() are undefined. + /// + /// See also: [sqlite3_db_status()] + int sqlite3_status( + int op, + ffi.Pointer pCurrent, + ffi.Pointer pHighwater, + int resetFlag, + ) { + return _sqlite3_status(op, pCurrent, pHighwater, resetFlag); + } + + late final _sqlite3_statusPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ) + > + >('sqlite3_status'); + late final _sqlite3_status = _sqlite3_statusPtr + .asFunction< + int Function(int, ffi.Pointer, ffi.Pointer, int) + >(); + + int sqlite3_status64( + int op, + ffi.Pointer pCurrent, + ffi.Pointer pHighwater, + int resetFlag, + ) { + return _sqlite3_status64(op, pCurrent, pHighwater, resetFlag); + } + + late final _sqlite3_status64Ptr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ) + > + >('sqlite3_status64'); + late final _sqlite3_status64 = _sqlite3_status64Ptr + .asFunction< + int Function( + int, + ffi.Pointer, + ffi.Pointer, + int, + ) + >(); + + /// CAPI3REF: Evaluate An SQL Statement + /// METHOD: sqlite3_stmt + /// + /// After a [prepared statement] has been prepared using any of + /// [sqlite3_prepare_v2()], [sqlite3_prepare_v3()], [sqlite3_prepare16_v2()], + /// or [sqlite3_prepare16_v3()] or one of the legacy + /// interfaces [sqlite3_prepare()] or [sqlite3_prepare16()], this function + /// must be called one or more times to evaluate the statement. + /// + /// The details of the behavior of the sqlite3_step() interface depend + /// on whether the statement was prepared using the newer "vX" interfaces + /// [sqlite3_prepare_v3()], [sqlite3_prepare_v2()], [sqlite3_prepare16_v3()], + /// [sqlite3_prepare16_v2()] or the older legacy + /// interfaces [sqlite3_prepare()] and [sqlite3_prepare16()]. The use of the + /// new "vX" interface is recommended for new applications but the legacy + /// interface will continue to be supported. + /// + /// ^In the legacy interface, the return value will be either [SQLITE_BUSY], + /// [SQLITE_DONE], [SQLITE_ROW], [SQLITE_ERROR], or [SQLITE_MISUSE]. + /// ^With the "v2" interface, any of the other [result codes] or + /// [extended result codes] might be returned as well. + /// + /// ^[SQLITE_BUSY] means that the database engine was unable to acquire the + /// database locks it needs to do its job. ^If the statement is a [COMMIT] + /// or occurs outside of an explicit transaction, then you can retry the + /// statement. If the statement is not a [COMMIT] and occurs within an + /// explicit transaction then you should rollback the transaction before + /// continuing. + /// + /// ^[SQLITE_DONE] means that the statement has finished executing + /// successfully. sqlite3_step() should not be called again on this virtual + /// machine without first calling [sqlite3_reset()] to reset the virtual + /// machine back to its initial state. + /// + /// ^If the SQL statement being executed returns any data, then [SQLITE_ROW] + /// is returned each time a new row of data is ready for processing by the + /// caller. The values may be accessed using the [column access functions]. + /// sqlite3_step() is called again to retrieve the next row of data. + /// + /// ^[SQLITE_ERROR] means that a run-time error (such as a constraint + /// violation) has occurred. sqlite3_step() should not be called again on + /// the VM. More information may be found by calling [sqlite3_errmsg()]. + /// ^With the legacy interface, a more specific error code (for example, + /// [SQLITE_INTERRUPT], [SQLITE_SCHEMA], [SQLITE_CORRUPT], and so forth) + /// can be obtained by calling [sqlite3_reset()] on the + /// [prepared statement]. ^In the "v2" interface, + /// the more specific error code is returned directly by sqlite3_step(). + /// + /// [SQLITE_MISUSE] means that the this routine was called inappropriately. + /// Perhaps it was called on a [prepared statement] that has + /// already been [sqlite3_finalize | finalized] or on one that had + /// previously returned [SQLITE_ERROR] or [SQLITE_DONE]. Or it could + /// be the case that the same database connection is being used by two or + /// more threads at the same moment in time. + /// + /// For all versions of SQLite up to and including 3.6.23.1, a call to + /// [sqlite3_reset()] was required after sqlite3_step() returned anything + /// other than [SQLITE_ROW] before any subsequent invocation of + /// sqlite3_step(). Failure to reset the prepared statement using + /// [sqlite3_reset()] would result in an [SQLITE_MISUSE] return from + /// sqlite3_step(). But after [version 3.6.23.1] ([dateof:3.6.23.1], + /// sqlite3_step() began + /// calling [sqlite3_reset()] automatically in this circumstance rather + /// than returning [SQLITE_MISUSE]. This is not considered a compatibility + /// break because any application that ever receives an SQLITE_MISUSE error + /// is broken by definition. The [SQLITE_OMIT_AUTORESET] compile-time option + /// can be used to restore the legacy behavior. + /// + /// Goofy Interface Alert: In the legacy interface, the sqlite3_step() + /// API always returns a generic error code, [SQLITE_ERROR], following any + /// error other than [SQLITE_BUSY] and [SQLITE_MISUSE]. You must call + /// [sqlite3_reset()] or [sqlite3_finalize()] in order to find one of the + /// specific [error codes] that better describes the error. + /// We admit that this is a goofy design. The problem has been fixed + /// with the "v2" interface. If you prepare all of your SQL statements + /// using [sqlite3_prepare_v3()] or [sqlite3_prepare_v2()] + /// or [sqlite3_prepare16_v2()] or [sqlite3_prepare16_v3()] instead + /// of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces, + /// then the more specific [error codes] are returned directly + /// by sqlite3_step(). The use of the "vX" interfaces is recommended. + int sqlite3_step(ffi.Pointer arg0) { + return _sqlite3_step(arg0); + } + + late final _sqlite3_stepPtr = + _lookup)>>( + 'sqlite3_step', + ); + late final _sqlite3_step = _sqlite3_stepPtr + .asFunction)>(); + + /// CAPI3REF: Determine If A Prepared Statement Has Been Reset + /// METHOD: sqlite3_stmt + /// + /// ^The sqlite3_stmt_busy(S) interface returns true (non-zero) if the + /// [prepared statement] S has been stepped at least once using + /// [sqlite3_step(S)] but has neither run to completion (returned + /// [SQLITE_DONE] from [sqlite3_step(S)]) nor + /// been reset using [sqlite3_reset(S)]. ^The sqlite3_stmt_busy(S) + /// interface returns false if S is a NULL pointer. If S is not a + /// NULL pointer and is not a pointer to a valid [prepared statement] + /// object, then the behavior is undefined and probably undesirable. + /// + /// This interface can be used in combination [sqlite3_next_stmt()] + /// to locate all prepared statements associated with a database + /// connection that are in need of being reset. This can be used, + /// for example, in diagnostic routines to search for prepared + /// statements that are holding a transaction open. + int sqlite3_stmt_busy(ffi.Pointer arg0) { + return _sqlite3_stmt_busy(arg0); + } + + late final _sqlite3_stmt_busyPtr = + _lookup)>>( + 'sqlite3_stmt_busy', + ); + late final _sqlite3_stmt_busy = _sqlite3_stmt_busyPtr + .asFunction)>(); + + /// CAPI3REF: Query The EXPLAIN Setting For A Prepared Statement + /// METHOD: sqlite3_stmt + /// + /// ^The sqlite3_stmt_isexplain(S) interface returns 1 if the + /// prepared statement S is an EXPLAIN statement, or 2 if the + /// statement S is an EXPLAIN QUERY PLAN. + /// ^The sqlite3_stmt_isexplain(S) interface returns 0 if S is + /// an ordinary statement or a NULL pointer. + int sqlite3_stmt_isexplain(ffi.Pointer pStmt) { + return _sqlite3_stmt_isexplain(pStmt); + } + + late final _sqlite3_stmt_isexplainPtr = + _lookup)>>( + 'sqlite3_stmt_isexplain', + ); + late final _sqlite3_stmt_isexplain = _sqlite3_stmt_isexplainPtr + .asFunction)>(); + + /// CAPI3REF: Determine If An SQL Statement Writes The Database + /// METHOD: sqlite3_stmt + /// + /// ^The sqlite3_stmt_readonly(X) interface returns true (non-zero) if + /// and only if the [prepared statement] X makes no direct changes to + /// the content of the database file. + /// + /// Note that [application-defined SQL functions] or + /// [virtual tables] might change the database indirectly as a side effect. + /// ^(For example, if an application defines a function "eval()" that + /// calls [sqlite3_exec()], then the following SQL statement would + /// change the database file through side-effects: + /// + ///
+  /// SELECT eval('DELETE FROM t1') FROM t2;
+  /// 
+ /// + /// But because the [SELECT] statement does not change the database file + /// directly, sqlite3_stmt_readonly() would still return true.)^ + /// + /// ^Transaction control statements such as [BEGIN], [COMMIT], [ROLLBACK], + /// [SAVEPOINT], and [RELEASE] cause sqlite3_stmt_readonly() to return true, + /// since the statements themselves do not actually modify the database but + /// rather they control the timing of when other statements modify the + /// database. ^The [ATTACH] and [DETACH] statements also cause + /// sqlite3_stmt_readonly() to return true since, while those statements + /// change the configuration of a database connection, they do not make + /// changes to the content of the database files on disk. + /// ^The sqlite3_stmt_readonly() interface returns true for [BEGIN] since + /// [BEGIN] merely sets internal flags, but the [BEGIN|BEGIN IMMEDIATE] and + /// [BEGIN|BEGIN EXCLUSIVE] commands do touch the database and so + /// sqlite3_stmt_readonly() returns false for those commands. + int sqlite3_stmt_readonly(ffi.Pointer pStmt) { + return _sqlite3_stmt_readonly(pStmt); + } + + late final _sqlite3_stmt_readonlyPtr = + _lookup)>>( + 'sqlite3_stmt_readonly', + ); + late final _sqlite3_stmt_readonly = _sqlite3_stmt_readonlyPtr + .asFunction)>(); + + /// CAPI3REF: Prepared Statement Scan Status + /// METHOD: sqlite3_stmt + /// + /// This interface returns information about the predicted and measured + /// performance for pStmt. Advanced applications can use this + /// interface to compare the predicted and the measured performance and + /// issue warnings and/or rerun [ANALYZE] if discrepancies are found. + /// + /// Since this interface is expected to be rarely used, it is only + /// available if SQLite is compiled using the [SQLITE_ENABLE_STMT_SCANSTATUS] + /// compile-time option. + /// + /// The "iScanStatusOp" parameter determines which status information to return. + /// The "iScanStatusOp" must be one of the [scanstatus options] or the behavior + /// of this interface is undefined. + /// ^The requested measurement is written into a variable pointed to by + /// the "pOut" parameter. + /// Parameter "idx" identifies the specific loop to retrieve statistics for. + /// Loops are numbered starting from zero. ^If idx is out of range - less than + /// zero or greater than or equal to the total number of loops used to implement + /// the statement - a non-zero value is returned and the variable that pOut + /// points to is unchanged. + /// + /// ^Statistics might not be available for all loops in all statements. ^In cases + /// where there exist loops with no available statistics, this function behaves + /// as if the loop did not exist - it returns non-zero and leave the variable + /// that pOut points to unchanged. + /// + /// See also: [sqlite3_stmt_scanstatus_reset()] + int sqlite3_stmt_scanstatus( + ffi.Pointer pStmt, + int idx, + int iScanStatusOp, + ffi.Pointer pOut, + ) { + return _sqlite3_stmt_scanstatus(pStmt, idx, iScanStatusOp, pOut); + } + + late final _sqlite3_stmt_scanstatusPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Int, + ffi.Pointer, + ) + > + >('sqlite3_stmt_scanstatus'); + late final _sqlite3_stmt_scanstatus = _sqlite3_stmt_scanstatusPtr + .asFunction< + int Function(ffi.Pointer, int, int, ffi.Pointer) + >(); + + /// CAPI3REF: Zero Scan-Status Counters + /// METHOD: sqlite3_stmt + /// + /// ^Zero all [sqlite3_stmt_scanstatus()] related event counters. + /// + /// This API is only available if the library is built with pre-processor + /// symbol [SQLITE_ENABLE_STMT_SCANSTATUS] defined. + void sqlite3_stmt_scanstatus_reset(ffi.Pointer arg0) { + return _sqlite3_stmt_scanstatus_reset(arg0); + } + + late final _sqlite3_stmt_scanstatus_resetPtr = + _lookup)>>( + 'sqlite3_stmt_scanstatus_reset', + ); + late final _sqlite3_stmt_scanstatus_reset = _sqlite3_stmt_scanstatus_resetPtr + .asFunction)>(); + + /// CAPI3REF: Prepared Statement Status + /// METHOD: sqlite3_stmt + /// + /// ^(Each prepared statement maintains various + /// [SQLITE_STMTSTATUS counters] that measure the number + /// of times it has performed specific operations.)^ These counters can + /// be used to monitor the performance characteristics of the prepared + /// statements. For example, if the number of table steps greatly exceeds + /// the number of table searches or result rows, that would tend to indicate + /// that the prepared statement is using a full table scan rather than + /// an index. + /// + /// ^(This interface is used to retrieve and reset counter values from + /// a [prepared statement]. The first argument is the prepared statement + /// object to be interrogated. The second argument + /// is an integer code for a specific [SQLITE_STMTSTATUS counter] + /// to be interrogated.)^ + /// ^The current value of the requested counter is returned. + /// ^If the resetFlg is true, then the counter is reset to zero after this + /// interface call returns. + /// + /// See also: [sqlite3_status()] and [sqlite3_db_status()]. + int sqlite3_stmt_status( + ffi.Pointer arg0, + int op, + int resetFlg, + ) { + return _sqlite3_stmt_status(arg0, op, resetFlg); + } + + late final _sqlite3_stmt_statusPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Int) + > + >('sqlite3_stmt_status'); + late final _sqlite3_stmt_status = _sqlite3_stmt_statusPtr + .asFunction, int, int)>(); + + void sqlite3_str_append( + ffi.Pointer arg0, + ffi.Pointer zIn, + int N, + ) { + return _sqlite3_str_append(arg0, zIn, N); + } + + late final _sqlite3_str_appendPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ) + > + >('sqlite3_str_append'); + late final _sqlite3_str_append = _sqlite3_str_appendPtr + .asFunction< + void Function(ffi.Pointer, ffi.Pointer, int) + >(); + + void sqlite3_str_appendall( + ffi.Pointer arg0, + ffi.Pointer zIn, + ) { + return _sqlite3_str_appendall(arg0, zIn); + } + + late final _sqlite3_str_appendallPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer) + > + >('sqlite3_str_appendall'); + late final _sqlite3_str_appendall = _sqlite3_str_appendallPtr + .asFunction< + void Function(ffi.Pointer, ffi.Pointer) + >(); + + void sqlite3_str_appendchar(ffi.Pointer arg0, int N, int C) { + return _sqlite3_str_appendchar(arg0, N, C); + } + + late final _sqlite3_str_appendcharPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Int, ffi.Char) + > + >('sqlite3_str_appendchar'); + late final _sqlite3_str_appendchar = _sqlite3_str_appendcharPtr + .asFunction, int, int)>(); + + /// CAPI3REF: Add Content To A Dynamic String + /// METHOD: sqlite3_str + /// + /// These interfaces add content to an sqlite3_str object previously obtained + /// from [sqlite3_str_new()]. + /// + /// ^The [sqlite3_str_appendf(X,F,...)] and + /// [sqlite3_str_vappendf(X,F,V)] interfaces uses the [built-in printf] + /// functionality of SQLite to append formatted text onto the end of + /// [sqlite3_str] object X. + /// + /// ^The [sqlite3_str_append(X,S,N)] method appends exactly N bytes from string S + /// onto the end of the [sqlite3_str] object X. N must be non-negative. + /// S must contain at least N non-zero bytes of content. To append a + /// zero-terminated string in its entirety, use the [sqlite3_str_appendall()] + /// method instead. + /// + /// ^The [sqlite3_str_appendall(X,S)] method appends the complete content of + /// zero-terminated string S onto the end of [sqlite3_str] object X. + /// + /// ^The [sqlite3_str_appendchar(X,N,C)] method appends N copies of the + /// single-byte character C onto the end of [sqlite3_str] object X. + /// ^This method can be used, for example, to add whitespace indentation. + /// + /// ^The [sqlite3_str_reset(X)] method resets the string under construction + /// inside [sqlite3_str] object X back to zero bytes in length. + /// + /// These methods do not return a result code. ^If an error occurs, that fact + /// is recorded in the [sqlite3_str] object and can be recovered by a + /// subsequent call to [sqlite3_str_errcode(X)]. + void sqlite3_str_appendf( + ffi.Pointer arg0, + ffi.Pointer zFormat, + ) { + return _sqlite3_str_appendf(arg0, zFormat); + } + + late final _sqlite3_str_appendfPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer) + > + >('sqlite3_str_appendf'); + late final _sqlite3_str_appendf = _sqlite3_str_appendfPtr + .asFunction< + void Function(ffi.Pointer, ffi.Pointer) + >(); + + /// CAPI3REF: Status Of A Dynamic String + /// METHOD: sqlite3_str + /// + /// These interfaces return the current status of an [sqlite3_str] object. + /// + /// ^If any prior errors have occurred while constructing the dynamic string + /// in sqlite3_str X, then the [sqlite3_str_errcode(X)] method will return + /// an appropriate error code. ^The [sqlite3_str_errcode(X)] method returns + /// [SQLITE_NOMEM] following any out-of-memory error, or + /// [SQLITE_TOOBIG] if the size of the dynamic string exceeds + /// [SQLITE_MAX_LENGTH], or [SQLITE_OK] if there have been no errors. + /// + /// ^The [sqlite3_str_length(X)] method returns the current length, in bytes, + /// of the dynamic string under construction in [sqlite3_str] object X. + /// ^The length returned by [sqlite3_str_length(X)] does not include the + /// zero-termination byte. + /// + /// ^The [sqlite3_str_value(X)] method returns a pointer to the current + /// content of the dynamic string under construction in X. The value + /// returned by [sqlite3_str_value(X)] is managed by the sqlite3_str object X + /// and might be freed or altered by any subsequent method on the same + /// [sqlite3_str] object. Applications must not used the pointer returned + /// [sqlite3_str_value(X)] after any subsequent method call on the same + /// object. ^Applications may change the content of the string returned + /// by [sqlite3_str_value(X)] as long as they do not write into any bytes + /// outside the range of 0 to [sqlite3_str_length(X)] and do not read or + /// write any byte after any subsequent sqlite3_str method call. + int sqlite3_str_errcode(ffi.Pointer arg0) { + return _sqlite3_str_errcode(arg0); + } + + late final _sqlite3_str_errcodePtr = + _lookup)>>( + 'sqlite3_str_errcode', + ); + late final _sqlite3_str_errcode = _sqlite3_str_errcodePtr + .asFunction)>(); + + /// CAPI3REF: Finalize A Dynamic String + /// DESTRUCTOR: sqlite3_str + /// + /// ^The [sqlite3_str_finish(X)] interface destroys the sqlite3_str object X + /// and returns a pointer to a memory buffer obtained from [sqlite3_malloc64()] + /// that contains the constructed string. The calling application should + /// pass the returned value to [sqlite3_free()] to avoid a memory leak. + /// ^The [sqlite3_str_finish(X)] interface may return a NULL pointer if any + /// errors were encountered during construction of the string. ^The + /// [sqlite3_str_finish(X)] interface will also return a NULL pointer if the + /// string in [sqlite3_str] object X is zero bytes long. + ffi.Pointer sqlite3_str_finish(ffi.Pointer arg0) { + return _sqlite3_str_finish(arg0); + } + + late final _sqlite3_str_finishPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer) + > + >('sqlite3_str_finish'); + late final _sqlite3_str_finish = _sqlite3_str_finishPtr + .asFunction Function(ffi.Pointer)>(); + + int sqlite3_str_length(ffi.Pointer arg0) { + return _sqlite3_str_length(arg0); + } + + late final _sqlite3_str_lengthPtr = + _lookup)>>( + 'sqlite3_str_length', + ); + late final _sqlite3_str_length = _sqlite3_str_lengthPtr + .asFunction)>(); + + /// CAPI3REF: Create A New Dynamic String Object + /// CONSTRUCTOR: sqlite3_str + /// + /// ^The [sqlite3_str_new(D)] interface allocates and initializes + /// a new [sqlite3_str] object. To avoid memory leaks, the object returned by + /// [sqlite3_str_new()] must be freed by a subsequent call to + /// [sqlite3_str_finish(X)]. + /// + /// ^The [sqlite3_str_new(D)] interface always returns a pointer to a + /// valid [sqlite3_str] object, though in the event of an out-of-memory + /// error the returned object might be a special singleton that will + /// silently reject new text, always return SQLITE_NOMEM from + /// [sqlite3_str_errcode()], always return 0 for + /// [sqlite3_str_length()], and always return NULL from + /// [sqlite3_str_finish(X)]. It is always safe to use the value + /// returned by [sqlite3_str_new(D)] as the sqlite3_str parameter + /// to any of the other [sqlite3_str] methods. + /// + /// The D parameter to [sqlite3_str_new(D)] may be NULL. If the + /// D parameter in [sqlite3_str_new(D)] is not NULL, then the maximum + /// length of the string contained in the [sqlite3_str] object will be + /// the value set for [sqlite3_limit](D,[SQLITE_LIMIT_LENGTH]) instead + /// of [SQLITE_MAX_LENGTH]. + ffi.Pointer sqlite3_str_new(ffi.Pointer arg0) { + return _sqlite3_str_new(arg0); + } + + late final _sqlite3_str_newPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer) + > + >('sqlite3_str_new'); + late final _sqlite3_str_new = _sqlite3_str_newPtr + .asFunction Function(ffi.Pointer)>(); + + void sqlite3_str_reset(ffi.Pointer arg0) { + return _sqlite3_str_reset(arg0); + } + + late final _sqlite3_str_resetPtr = + _lookup)>>( + 'sqlite3_str_reset', + ); + late final _sqlite3_str_reset = _sqlite3_str_resetPtr + .asFunction)>(); + + ffi.Pointer sqlite3_str_value(ffi.Pointer arg0) { + return _sqlite3_str_value(arg0); + } + + late final _sqlite3_str_valuePtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer) + > + >('sqlite3_str_value'); + late final _sqlite3_str_value = _sqlite3_str_valuePtr + .asFunction Function(ffi.Pointer)>(); + + /// CAPI3REF: String Globbing + /// + /// ^The [sqlite3_strglob(P,X)] interface returns zero if and only if + /// string X matches the [GLOB] pattern P. + /// ^The definition of [GLOB] pattern matching used in + /// [sqlite3_strglob(P,X)] is the same as for the "X GLOB P" operator in the + /// SQL dialect understood by SQLite. ^The [sqlite3_strglob(P,X)] function + /// is case sensitive. + /// + /// Note that this routine returns zero on a match and non-zero if the strings + /// do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()]. + /// + /// See also: [sqlite3_strlike()]. + int sqlite3_strglob(ffi.Pointer zGlob, ffi.Pointer zStr) { + return _sqlite3_strglob(zGlob, zStr); + } + + late final _sqlite3_strglobPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer) + > + >('sqlite3_strglob'); + late final _sqlite3_strglob = _sqlite3_strglobPtr + .asFunction, ffi.Pointer)>(); + + /// CAPI3REF: String Comparison + /// + /// ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications + /// and extensions to compare the contents of two buffers containing UTF-8 + /// strings in a case-independent fashion, using the same definition of "case + /// independence" that SQLite uses internally when comparing identifiers. + int sqlite3_stricmp(ffi.Pointer arg0, ffi.Pointer arg1) { + return _sqlite3_stricmp(arg0, arg1); + } + + late final _sqlite3_stricmpPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer) + > + >('sqlite3_stricmp'); + late final _sqlite3_stricmp = _sqlite3_stricmpPtr + .asFunction, ffi.Pointer)>(); + + /// CAPI3REF: String LIKE Matching + /// + /// ^The [sqlite3_strlike(P,X,E)] interface returns zero if and only if + /// string X matches the [LIKE] pattern P with escape character E. + /// ^The definition of [LIKE] pattern matching used in + /// [sqlite3_strlike(P,X,E)] is the same as for the "X LIKE P ESCAPE E" + /// operator in the SQL dialect understood by SQLite. ^For "X LIKE P" without + /// the ESCAPE clause, set the E parameter of [sqlite3_strlike(P,X,E)] to 0. + /// ^As with the LIKE operator, the [sqlite3_strlike(P,X,E)] function is case + /// insensitive - equivalent upper and lower case ASCII characters match + /// one another. + /// + /// ^The [sqlite3_strlike(P,X,E)] function matches Unicode characters, though + /// only ASCII characters are case folded. + /// + /// Note that this routine returns zero on a match and non-zero if the strings + /// do not match, the same as [sqlite3_stricmp()] and [sqlite3_strnicmp()]. + /// + /// See also: [sqlite3_strglob()]. + int sqlite3_strlike( + ffi.Pointer zGlob, + ffi.Pointer zStr, + int cEsc, + ) { + return _sqlite3_strlike(zGlob, zStr, cEsc); + } + + late final _sqlite3_strlikePtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ) + > + >('sqlite3_strlike'); + late final _sqlite3_strlike = _sqlite3_strlikePtr + .asFunction< + int Function(ffi.Pointer, ffi.Pointer, int) + >(); + + int sqlite3_strnicmp( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _sqlite3_strnicmp(arg0, arg1, arg2); + } + + late final _sqlite3_strnicmpPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ) + > + >('sqlite3_strnicmp'); + late final _sqlite3_strnicmp = _sqlite3_strnicmpPtr + .asFunction< + int Function(ffi.Pointer, ffi.Pointer, int) + >(); + + /// CAPI3REF: Low-level system error code + /// + /// ^Attempt to return the underlying operating system error code or error + /// number that caused the most recent I/O error or failure to open a file. + /// The return value is OS-dependent. For example, on unix systems, after + /// [sqlite3_open_v2()] returns [SQLITE_CANTOPEN], this interface could be + /// called to get back the underlying "errno" that caused the problem, such + /// as ENOSPC, EAUTH, EISDIR, and so forth. + int sqlite3_system_errno(ffi.Pointer arg0) { + return _sqlite3_system_errno(arg0); + } + + late final _sqlite3_system_errnoPtr = + _lookup)>>( + 'sqlite3_system_errno', + ); + late final _sqlite3_system_errno = _sqlite3_system_errnoPtr + .asFunction)>(); + + /// CAPI3REF: Extract Metadata About A Column Of A Table + /// METHOD: sqlite3 + /// + /// ^(The sqlite3_table_column_metadata(X,D,T,C,....) routine returns + /// information about column C of table T in database D + /// on [database connection] X.)^ ^The sqlite3_table_column_metadata() + /// interface returns SQLITE_OK and fills in the non-NULL pointers in + /// the final five arguments with appropriate values if the specified + /// column exists. ^The sqlite3_table_column_metadata() interface returns + /// SQLITE_ERROR if the specified column does not exist. + /// ^If the column-name parameter to sqlite3_table_column_metadata() is a + /// NULL pointer, then this routine simply checks for the existence of the + /// table and returns SQLITE_OK if the table exists and SQLITE_ERROR if it + /// does not. If the table name parameter T in a call to + /// sqlite3_table_column_metadata(X,D,T,C,...) is NULL then the result is + /// undefined behavior. + /// + /// ^The column is identified by the second, third and fourth parameters to + /// this function. ^(The second parameter is either the name of the database + /// (i.e. "main", "temp", or an attached database) containing the specified + /// table or NULL.)^ ^If it is NULL, then all attached databases are searched + /// for the table using the same algorithm used by the database engine to + /// resolve unqualified table references. + /// + /// ^The third and fourth parameters to this function are the table and column + /// name of the desired column, respectively. + /// + /// ^Metadata is returned by writing to the memory locations passed as the 5th + /// and subsequent parameters to this function. ^Any of these arguments may be + /// NULL, in which case the corresponding element of metadata is omitted. + /// + /// ^(
+ /// + ///
Parameter Output
Type
Description + /// + ///
5th const char* Data type + ///
6th const char* Name of default collation sequence + ///
7th int True if column has a NOT NULL constraint + ///
8th int True if column is part of the PRIMARY KEY + ///
9th int True if column is [AUTOINCREMENT] + ///
+ ///
)^ + /// + /// ^The memory pointed to by the character pointers returned for the + /// declaration type and collation sequence is valid until the next + /// call to any SQLite API function. + /// + /// ^If the specified table is actually a view, an [error code] is returned. + /// + /// ^If the specified column is "rowid", "oid" or "_rowid_" and the table + /// is not a [WITHOUT ROWID] table and an + /// [INTEGER PRIMARY KEY] column has been explicitly declared, then the output + /// parameters are set for the explicitly declared column. ^(If there is no + /// [INTEGER PRIMARY KEY] column, then the outputs + /// for the [rowid] are set as follows: + /// + ///
+  /// data type: "INTEGER"
+  /// collation sequence: "BINARY"
+  /// not null: 0
+  /// primary key: 1
+  /// auto increment: 0
+  /// 
)^ + /// + /// ^This function causes all database schemas to be read from disk and + /// parsed, if that has not already been done, and returns an error if + /// any errors are encountered while loading the schema. + int sqlite3_table_column_metadata( + ffi.Pointer db, + ffi.Pointer zDbName, + ffi.Pointer zTableName, + ffi.Pointer zColumnName, + ffi.Pointer> pzDataType, + ffi.Pointer> pzCollSeq, + ffi.Pointer pNotNull, + ffi.Pointer pPrimaryKey, + ffi.Pointer pAutoinc, + ) { + return _sqlite3_table_column_metadata( + db, + zDbName, + zTableName, + zColumnName, + pzDataType, + pzCollSeq, + pNotNull, + pPrimaryKey, + pAutoinc, + ); + } + + late final _sqlite3_table_column_metadataPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >('sqlite3_table_column_metadata'); + late final _sqlite3_table_column_metadata = _sqlite3_table_column_metadataPtr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(); + + /// CAPI3REF: Name Of The Folder Holding Temporary Files + /// + /// ^(If this global variable is made to point to a string which is + /// the name of a folder (a.k.a. directory), then all temporary files + /// created by SQLite when using a built-in [sqlite3_vfs | VFS] + /// will be placed in that directory.)^ ^If this variable + /// is a NULL pointer, then SQLite performs a search for an appropriate + /// temporary file directory. + /// + /// Applications are strongly discouraged from using this global variable. + /// It is required to set a temporary folder on Windows Runtime (WinRT). + /// But for all other platforms, it is highly recommended that applications + /// neither read nor write this variable. This global variable is a relic + /// that exists for backwards compatibility of legacy applications and should + /// be avoided in new projects. + /// + /// It is not safe to read or modify this variable in more than one + /// thread at a time. It is not safe to read or modify this variable + /// if a [database connection] is being used at the same time in a separate + /// thread. + /// It is intended that this variable be set once + /// as part of process initialization and before any SQLite interface + /// routines have been called and that this variable remain unchanged + /// thereafter. + /// + /// ^The [temp_store_directory pragma] may modify this variable and cause + /// it to point to memory obtained from [sqlite3_malloc]. ^Furthermore, + /// the [temp_store_directory pragma] always assumes that any string + /// that this variable points to is held in memory obtained from + /// [sqlite3_malloc] and the pragma may attempt to free that memory + /// using [sqlite3_free]. + /// Hence, if this variable is modified directly, either it should be + /// made NULL or made to point to memory obtained from [sqlite3_malloc] + /// or else the use of the [temp_store_directory pragma] should be avoided. + /// Except when requested by the [temp_store_directory pragma], SQLite + /// does not free the memory that sqlite3_temp_directory points to. If + /// the application wants that memory to be freed, it must do + /// so itself, taking care to only do so after all [database connection] + /// objects have been destroyed. + /// + /// Note to Windows Runtime users: The temporary directory must be set + /// prior to calling [sqlite3_open] or [sqlite3_open_v2]. Otherwise, various + /// features that require the use of temporary files may fail. Here is an + /// example of how to do this using C++ with the Windows Runtime: + /// + ///
+  /// LPCWSTR zPath = Windows::Storage::ApplicationData::Current->
+  ///       TemporaryFolder->Path->Data();
+  /// char zPathBuf[MAX_PATH + 1];
+  /// memset(zPathBuf, 0, sizeof(zPathBuf));
+  /// WideCharToMultiByte(CP_UTF8, 0, zPath, -1, zPathBuf, sizeof(zPathBuf),
+  ///       NULL, NULL);
+  /// sqlite3_temp_directory = sqlite3_mprintf("%s", zPathBuf);
+  /// 
+ late final ffi.Pointer> _sqlite3_temp_directory = + _lookup>('sqlite3_temp_directory'); + + ffi.Pointer get sqlite3_temp_directory => + _sqlite3_temp_directory.value; + + set sqlite3_temp_directory(ffi.Pointer value) => + _sqlite3_temp_directory.value = value; + + /// CAPI3REF: Testing Interface + /// + /// ^The sqlite3_test_control() interface is used to read out internal + /// state of SQLite and to inject faults into SQLite for testing + /// purposes. ^The first parameter is an operation code that determines + /// the number, meaning, and operation of all subsequent parameters. + /// + /// This interface is not for use by applications. It exists solely + /// for verifying the correct operation of the SQLite library. Depending + /// on how the SQLite library is compiled, this interface might not exist. + /// + /// The details of the operation codes, their meanings, the parameters + /// they take, and what they do are all subject to change without notice. + /// Unlike most of the SQLite API, this function is not guaranteed to + /// operate consistently from one release to the next. + int sqlite3_test_control(int op) { + return _sqlite3_test_control(op); + } + + late final _sqlite3_test_controlPtr = + _lookup>( + 'sqlite3_test_control', + ); + late final _sqlite3_test_control = _sqlite3_test_controlPtr + .asFunction(); + + void sqlite3_thread_cleanup() { + return _sqlite3_thread_cleanup(); + } + + late final _sqlite3_thread_cleanupPtr = + _lookup>( + 'sqlite3_thread_cleanup', + ); + late final _sqlite3_thread_cleanup = _sqlite3_thread_cleanupPtr + .asFunction(); + + /// CAPI3REF: Test To See If The Library Is Threadsafe + /// + /// ^The sqlite3_threadsafe() function returns zero if and only if + /// SQLite was compiled with mutexing code omitted due to the + /// [SQLITE_THREADSAFE] compile-time option being set to 0. + /// + /// SQLite can be compiled with or without mutexes. When + /// the [SQLITE_THREADSAFE] C preprocessor macro is 1 or 2, mutexes + /// are enabled and SQLite is threadsafe. When the + /// [SQLITE_THREADSAFE] macro is 0, + /// the mutexes are omitted. Without the mutexes, it is not safe + /// to use SQLite concurrently from more than one thread. + /// + /// Enabling mutexes incurs a measurable performance penalty. + /// So if speed is of utmost importance, it makes sense to disable + /// the mutexes. But for maximum safety, mutexes should be enabled. + /// ^The default behavior is for mutexes to be enabled. + /// + /// This interface can be used by an application to make sure that the + /// version of SQLite that it is linking against was compiled with + /// the desired setting of the [SQLITE_THREADSAFE] macro. + /// + /// This interface only reports on the compile-time mutex setting + /// of the [SQLITE_THREADSAFE] flag. If SQLite is compiled with + /// SQLITE_THREADSAFE=1 or =2 then mutexes are enabled by default but + /// can be fully or partially disabled using a call to [sqlite3_config()] + /// with the verbs [SQLITE_CONFIG_SINGLETHREAD], [SQLITE_CONFIG_MULTITHREAD], + /// or [SQLITE_CONFIG_SERIALIZED]. ^(The return value of the + /// sqlite3_threadsafe() function shows only the compile-time setting of + /// thread safety, not any run-time changes to that setting made by + /// sqlite3_config(). In other words, the return value from sqlite3_threadsafe() + /// is unchanged by calls to sqlite3_config().)^ + /// + /// See the [threading mode] documentation for additional information. + int sqlite3_threadsafe() { + return _sqlite3_threadsafe(); + } + + late final _sqlite3_threadsafePtr = + _lookup>('sqlite3_threadsafe'); + late final _sqlite3_threadsafe = _sqlite3_threadsafePtr + .asFunction(); + + /// CAPI3REF: Total Number Of Rows Modified + /// METHOD: sqlite3 + /// + /// ^This function returns the total number of rows inserted, modified or + /// deleted by all [INSERT], [UPDATE] or [DELETE] statements completed + /// since the database connection was opened, including those executed as + /// part of trigger programs. ^Executing any other type of SQL statement + /// does not affect the value returned by sqlite3_total_changes(). + /// + /// ^Changes made as part of [foreign key actions] are included in the + /// count, but those made as part of REPLACE constraint resolution are + /// not. ^Changes to a view that are intercepted by INSTEAD OF triggers + /// are not counted. + /// + /// The [sqlite3_total_changes(D)] interface only reports the number + /// of rows that changed due to SQL statement run against database + /// connection D. Any changes by other database connections are ignored. + /// To detect changes against a database file from other database + /// connections use the [PRAGMA data_version] command or the + /// [SQLITE_FCNTL_DATA_VERSION] [file control]. + /// + /// If a separate thread makes changes on the same database connection + /// while [sqlite3_total_changes()] is running then the value + /// returned is unpredictable and not meaningful. + /// + /// See also: + ///
    + ///
  • the [sqlite3_changes()] interface + ///
  • the [count_changes pragma] + ///
  • the [changes() SQL function] + ///
  • the [data_version pragma] + ///
  • the [SQLITE_FCNTL_DATA_VERSION] [file control] + ///
+ int sqlite3_total_changes(ffi.Pointer arg0) { + return _sqlite3_total_changes(arg0); + } + + late final _sqlite3_total_changesPtr = + _lookup)>>( + 'sqlite3_total_changes', + ); + late final _sqlite3_total_changes = _sqlite3_total_changesPtr + .asFunction)>(); + + /// CAPI3REF: Tracing And Profiling Functions + /// METHOD: sqlite3 + /// + /// These routines are deprecated. Use the [sqlite3_trace_v2()] interface + /// instead of the routines described here. + /// + /// These routines register callback functions that can be used for + /// tracing and profiling the execution of SQL statements. + /// + /// ^The callback function registered by sqlite3_trace() is invoked at + /// various times when an SQL statement is being run by [sqlite3_step()]. + /// ^The sqlite3_trace() callback is invoked with a UTF-8 rendering of the + /// SQL statement text as the statement first begins executing. + /// ^(Additional sqlite3_trace() callbacks might occur + /// as each triggered subprogram is entered. The callbacks for triggers + /// contain a UTF-8 SQL comment that identifies the trigger.)^ + /// + /// The [SQLITE_TRACE_SIZE_LIMIT] compile-time option can be used to limit + /// the length of [bound parameter] expansion in the output of sqlite3_trace(). + /// + /// ^The callback function registered by sqlite3_profile() is invoked + /// as each SQL statement finishes. ^The profile callback contains + /// the original statement text and an estimate of wall-clock time + /// of how long that statement took to run. ^The profile callback + /// time is in units of nanoseconds, however the current implementation + /// is only capable of millisecond resolution so the six least significant + /// digits in the time are meaningless. Future versions of SQLite + /// might provide greater resolution on the profiler callback. Invoking + /// either [sqlite3_trace()] or [sqlite3_trace_v2()] will cancel the + /// profile callback. + ffi.Pointer sqlite3_trace( + ffi.Pointer arg0, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer) + > + > + xTrace, + ffi.Pointer arg2, + ) { + return _sqlite3_trace(arg0, xTrace, arg2); + } + + late final _sqlite3_tracePtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer) + > + >, + ffi.Pointer, + ) + > + >('sqlite3_trace'); + late final _sqlite3_trace = _sqlite3_tracePtr + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer) + > + >, + ffi.Pointer, + ) + >(); + + /// CAPI3REF: SQL Trace Hook + /// METHOD: sqlite3 + /// + /// ^The sqlite3_trace_v2(D,M,X,P) interface registers a trace callback + /// function X against [database connection] D, using property mask M + /// and context pointer P. ^If the X callback is + /// NULL or if the M mask is zero, then tracing is disabled. The + /// M argument should be the bitwise OR-ed combination of + /// zero or more [SQLITE_TRACE] constants. + /// + /// ^Each call to either sqlite3_trace() or sqlite3_trace_v2() overrides + /// (cancels) any prior calls to sqlite3_trace() or sqlite3_trace_v2(). + /// + /// ^The X callback is invoked whenever any of the events identified by + /// mask M occur. ^The integer return value from the callback is currently + /// ignored, though this may change in future releases. Callback + /// implementations should return zero to ensure future compatibility. + /// + /// ^A trace callback is invoked with four arguments: callback(T,C,P,X). + /// ^The T argument is one of the [SQLITE_TRACE] + /// constants to indicate why the callback was invoked. + /// ^The C argument is a copy of the context pointer. + /// The P and X arguments are pointers whose meanings depend on T. + /// + /// The sqlite3_trace_v2() interface is intended to replace the legacy + /// interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which + /// are deprecated. + int sqlite3_trace_v2( + ffi.Pointer arg0, + int uMask, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.UnsignedInt, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + > + xCallback, + ffi.Pointer pCtx, + ) { + return _sqlite3_trace_v2(arg0, uMask, xCallback, pCtx); + } + + late final _sqlite3_trace_v2Ptr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.UnsignedInt, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.UnsignedInt, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >, + ffi.Pointer, + ) + > + >('sqlite3_trace_v2'); + late final _sqlite3_trace_v2 = _sqlite3_trace_v2Ptr + .asFunction< + int Function( + ffi.Pointer, + int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.UnsignedInt, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >, + ffi.Pointer, + ) + >(); + + int sqlite3_transfer_bindings( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _sqlite3_transfer_bindings(arg0, arg1); + } + + late final _sqlite3_transfer_bindingsPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer) + > + >('sqlite3_transfer_bindings'); + late final _sqlite3_transfer_bindings = _sqlite3_transfer_bindingsPtr + .asFunction< + int Function(ffi.Pointer, ffi.Pointer) + >(); + + /// CAPI3REF: Unlock Notification + /// METHOD: sqlite3 + /// + /// ^When running in shared-cache mode, a database operation may fail with + /// an [SQLITE_LOCKED] error if the required locks on the shared-cache or + /// individual tables within the shared-cache cannot be obtained. See + /// [SQLite Shared-Cache Mode] for a description of shared-cache locking. + /// ^This API may be used to register a callback that SQLite will invoke + /// when the connection currently holding the required lock relinquishes it. + /// ^This API is only available if the library was compiled with the + /// [SQLITE_ENABLE_UNLOCK_NOTIFY] C-preprocessor symbol defined. + /// + /// See Also: [Using the SQLite Unlock Notification Feature]. + /// + /// ^Shared-cache locks are released when a database connection concludes + /// its current transaction, either by committing it or rolling it back. + /// + /// ^When a connection (known as the blocked connection) fails to obtain a + /// shared-cache lock and SQLITE_LOCKED is returned to the caller, the + /// identity of the database connection (the blocking connection) that + /// has locked the required resource is stored internally. ^After an + /// application receives an SQLITE_LOCKED error, it may call the + /// sqlite3_unlock_notify() method with the blocked connection handle as + /// the first argument to register for a callback that will be invoked + /// when the blocking connections current transaction is concluded. ^The + /// callback is invoked from within the [sqlite3_step] or [sqlite3_close] + /// call that concludes the blocking connection's transaction. + /// + /// ^(If sqlite3_unlock_notify() is called in a multi-threaded application, + /// there is a chance that the blocking connection will have already + /// concluded its transaction by the time sqlite3_unlock_notify() is invoked. + /// If this happens, then the specified callback is invoked immediately, + /// from within the call to sqlite3_unlock_notify().)^ + /// + /// ^If the blocked connection is attempting to obtain a write-lock on a + /// shared-cache table, and more than one other connection currently holds + /// a read-lock on the same table, then SQLite arbitrarily selects one of + /// the other connections to use as the blocking connection. + /// + /// ^(There may be at most one unlock-notify callback registered by a + /// blocked connection. If sqlite3_unlock_notify() is called when the + /// blocked connection already has a registered unlock-notify callback, + /// then the new callback replaces the old.)^ ^If sqlite3_unlock_notify() is + /// called with a NULL pointer as its second argument, then any existing + /// unlock-notify callback is canceled. ^The blocked connections + /// unlock-notify callback may also be canceled by closing the blocked + /// connection using [sqlite3_close()]. + /// + /// The unlock-notify callback is not reentrant. If an application invokes + /// any sqlite3_xxx API functions from within an unlock-notify callback, a + /// crash or deadlock may be the result. + /// + /// ^Unless deadlock is detected (see below), sqlite3_unlock_notify() always + /// returns SQLITE_OK. + /// + /// Callback Invocation Details + /// + /// When an unlock-notify callback is registered, the application provides a + /// single void* pointer that is passed to the callback when it is invoked. + /// However, the signature of the callback function allows SQLite to pass + /// it an array of void* context pointers. The first argument passed to + /// an unlock-notify callback is a pointer to an array of void* pointers, + /// and the second is the number of entries in the array. + /// + /// When a blocking connection's transaction is concluded, there may be + /// more than one blocked connection that has registered for an unlock-notify + /// callback. ^If two or more such blocked connections have specified the + /// same callback function, then instead of invoking the callback function + /// multiple times, it is invoked once with the set of void* context pointers + /// specified by the blocked connections bundled together into an array. + /// This gives the application an opportunity to prioritize any actions + /// related to the set of unblocked database connections. + /// + /// Deadlock Detection + /// + /// Assuming that after registering for an unlock-notify callback a + /// database waits for the callback to be issued before taking any further + /// action (a reasonable assumption), then using this API may cause the + /// application to deadlock. For example, if connection X is waiting for + /// connection Y's transaction to be concluded, and similarly connection + /// Y is waiting on connection X's transaction, then neither connection + /// will proceed and the system may remain deadlocked indefinitely. + /// + /// To avoid this scenario, the sqlite3_unlock_notify() performs deadlock + /// detection. ^If a given call to sqlite3_unlock_notify() would put the + /// system in a deadlocked state, then SQLITE_LOCKED is returned and no + /// unlock-notify callback is registered. The system is said to be in + /// a deadlocked state if connection A has registered for an unlock-notify + /// callback on the conclusion of connection B's transaction, and connection + /// B has itself registered for an unlock-notify callback when connection + /// A's transaction is concluded. ^Indirect deadlock is also detected, so + /// the system is also considered to be deadlocked if connection B has + /// registered for an unlock-notify callback on the conclusion of connection + /// C's transaction, where connection C is waiting on connection A. ^Any + /// number of levels of indirection are allowed. + /// + /// The "DROP TABLE" Exception + /// + /// When a call to [sqlite3_step()] returns SQLITE_LOCKED, it is almost + /// always appropriate to call sqlite3_unlock_notify(). There is however, + /// one exception. When executing a "DROP TABLE" or "DROP INDEX" statement, + /// SQLite checks if there are any currently executing SELECT statements + /// that belong to the same connection. If there are, SQLITE_LOCKED is + /// returned. In this case there is no "blocking connection", so invoking + /// sqlite3_unlock_notify() results in the unlock-notify callback being + /// invoked immediately. If the application then re-attempts the "DROP TABLE" + /// or "DROP INDEX" query, an infinite loop might be the result. + /// + /// One way around this problem is to check the extended error code returned + /// by an sqlite3_step() call. ^(If there is a blocking connection, then the + /// extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in + /// the special "DROP TABLE/INDEX" case, the extended error code is just + /// SQLITE_LOCKED.)^ + int sqlite3_unlock_notify( + ffi.Pointer pBlocked, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer> apArg, + ffi.Int nArg, + ) + > + > + xNotify, + ffi.Pointer pNotifyArg, + ) { + return _sqlite3_unlock_notify(pBlocked, xNotify, pNotifyArg); + } + + late final _sqlite3_unlock_notifyPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer> apArg, + ffi.Int nArg, + ) + > + >, + ffi.Pointer, + ) + > + >('sqlite3_unlock_notify'); + late final _sqlite3_unlock_notify = _sqlite3_unlock_notifyPtr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer> apArg, + ffi.Int nArg, + ) + > + >, + ffi.Pointer, + ) + >(); + + /// CAPI3REF: Data Change Notification Callbacks + /// METHOD: sqlite3 + /// + /// ^The sqlite3_update_hook() interface registers a callback function + /// with the [database connection] identified by the first argument + /// to be invoked whenever a row is updated, inserted or deleted in + /// a [rowid table]. + /// ^Any callback set by a previous call to this function + /// for the same database connection is overridden. + /// + /// ^The second argument is a pointer to the function to invoke when a + /// row is updated, inserted or deleted in a rowid table. + /// ^The first argument to the callback is a copy of the third argument + /// to sqlite3_update_hook(). + /// ^The second callback argument is one of [SQLITE_INSERT], [SQLITE_DELETE], + /// or [SQLITE_UPDATE], depending on the operation that caused the callback + /// to be invoked. + /// ^The third and fourth arguments to the callback contain pointers to the + /// database and table name containing the affected row. + /// ^The final callback parameter is the [rowid] of the row. + /// ^In the case of an update, this is the [rowid] after the update takes place. + /// + /// ^(The update hook is not invoked when internal system tables are + /// modified (i.e. sqlite_master and sqlite_sequence).)^ + /// ^The update hook is not invoked when [WITHOUT ROWID] tables are modified. + /// + /// ^In the current implementation, the update hook + /// is not invoked when conflicting rows are deleted because of an + /// [ON CONFLICT | ON CONFLICT REPLACE] clause. ^Nor is the update hook + /// invoked when rows are deleted using the [truncate optimization]. + /// The exceptions defined in this paragraph might change in a future + /// release of SQLite. + /// + /// The update hook implementation must not do anything that will modify + /// the database connection that invoked the update hook. Any actions + /// to modify the database connection must be deferred until after the + /// completion of the [sqlite3_step()] call that triggered the update hook. + /// Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their + /// database connections for the meaning of "modify" in this paragraph. + /// + /// ^The sqlite3_update_hook(D,C,P) function + /// returns the P argument from the previous call + /// on the same [database connection] D, or NULL for + /// the first call on D. + /// + /// See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()], + /// and [sqlite3_preupdate_hook()] interfaces. + ffi.Pointer sqlite3_update_hook( + ffi.Pointer arg0, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Pointer, + sqlite3_int64, + ) + > + > + arg1, + ffi.Pointer arg2, + ) { + return _sqlite3_update_hook(arg0, arg1, arg2); + } + + late final _sqlite3_update_hookPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Pointer, + sqlite3_int64, + ) + > + >, + ffi.Pointer, + ) + > + >('sqlite3_update_hook'); + late final _sqlite3_update_hook = _sqlite3_update_hookPtr + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Pointer, + sqlite3_int64, + ) + > + >, + ffi.Pointer, + ) + >(); + + int sqlite3_uri_boolean( + ffi.Pointer zFile, + ffi.Pointer zParam, + int bDefault, + ) { + return _sqlite3_uri_boolean(zFile, zParam, bDefault); + } + + late final _sqlite3_uri_booleanPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ) + > + >('sqlite3_uri_boolean'); + late final _sqlite3_uri_boolean = _sqlite3_uri_booleanPtr + .asFunction< + int Function(ffi.Pointer, ffi.Pointer, int) + >(); + + int sqlite3_uri_int64( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _sqlite3_uri_int64(arg0, arg1, arg2); + } + + late final _sqlite3_uri_int64Ptr = + _lookup< + ffi.NativeFunction< + sqlite3_int64 Function( + ffi.Pointer, + ffi.Pointer, + sqlite3_int64, + ) + > + >('sqlite3_uri_int64'); + late final _sqlite3_uri_int64 = _sqlite3_uri_int64Ptr + .asFunction< + int Function(ffi.Pointer, ffi.Pointer, int) + >(); + + ffi.Pointer sqlite3_uri_key( + ffi.Pointer zFilename, + int N, + ) { + return _sqlite3_uri_key(zFilename, N); + } + + late final _sqlite3_uri_keyPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Int) + > + >('sqlite3_uri_key'); + late final _sqlite3_uri_key = _sqlite3_uri_keyPtr + .asFunction Function(ffi.Pointer, int)>(); + + /// CAPI3REF: Obtain Values For URI Parameters + /// + /// These are utility routines, useful to [VFS|custom VFS implementations], + /// that check if a database file was a URI that contained a specific query + /// parameter, and if so obtains the value of that query parameter. + /// + /// The first parameter to these interfaces (hereafter referred to + /// as F) must be one of: + ///
    + ///
  • A database filename pointer created by the SQLite core and + /// passed into the xOpen() method of a VFS implemention, or + ///
  • A filename obtained from [sqlite3_db_filename()], or + ///
  • A new filename constructed using [sqlite3_create_filename()]. + ///
+ /// If the F parameter is not one of the above, then the behavior is + /// undefined and probably undesirable. Older versions of SQLite were + /// more tolerant of invalid F parameters than newer versions. + /// + /// If F is a suitable filename (as described in the previous paragraph) + /// and if P is the name of the query parameter, then + /// sqlite3_uri_parameter(F,P) returns the value of the P + /// parameter if it exists or a NULL pointer if P does not appear as a + /// query parameter on F. If P is a query parameter of F and it + /// has no explicit value, then sqlite3_uri_parameter(F,P) returns + /// a pointer to an empty string. + /// + /// The sqlite3_uri_boolean(F,P,B) routine assumes that P is a boolean + /// parameter and returns true (1) or false (0) according to the value + /// of P. The sqlite3_uri_boolean(F,P,B) routine returns true (1) if the + /// value of query parameter P is one of "yes", "true", or "on" in any + /// case or if the value begins with a non-zero number. The + /// sqlite3_uri_boolean(F,P,B) routines returns false (0) if the value of + /// query parameter P is one of "no", "false", or "off" in any case or + /// if the value begins with a numeric zero. If P is not a query + /// parameter on F or if the value of P does not match any of the + /// above, then sqlite3_uri_boolean(F,P,B) returns (B!=0). + /// + /// The sqlite3_uri_int64(F,P,D) routine converts the value of P into a + /// 64-bit signed integer and returns that integer, or D if P does not + /// exist. If the value of P is something other than an integer, then + /// zero is returned. + /// + /// The sqlite3_uri_key(F,N) returns a pointer to the name (not + /// the value) of the N-th query parameter for filename F, or a NULL + /// pointer if N is less than zero or greater than the number of query + /// parameters minus 1. The N value is zero-based so N should be 0 to obtain + /// the name of the first query parameter, 1 for the second parameter, and + /// so forth. + /// + /// If F is a NULL pointer, then sqlite3_uri_parameter(F,P) returns NULL and + /// sqlite3_uri_boolean(F,P,B) returns B. If F is not a NULL pointer and + /// is not a database file pathname pointer that the SQLite core passed + /// into the xOpen VFS method, then the behavior of this routine is undefined + /// and probably undesirable. + /// + /// Beginning with SQLite [version 3.31.0] ([dateof:3.31.0]) the input F + /// parameter can also be the name of a rollback journal file or WAL file + /// in addition to the main database file. Prior to version 3.31.0, these + /// routines would only work if F was the name of the main database file. + /// When the F parameter is the name of the rollback journal or WAL file, + /// it has access to all the same query parameters as were found on the + /// main database file. + /// + /// See the [URI filename] documentation for additional information. + ffi.Pointer sqlite3_uri_parameter( + ffi.Pointer zFilename, + ffi.Pointer zParam, + ) { + return _sqlite3_uri_parameter(zFilename, zParam); + } + + late final _sqlite3_uri_parameterPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >('sqlite3_uri_parameter'); + late final _sqlite3_uri_parameter = _sqlite3_uri_parameterPtr + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); + + /// CAPI3REF: User Data For Functions + /// METHOD: sqlite3_context + /// + /// ^The sqlite3_user_data() interface returns a copy of + /// the pointer that was the pUserData parameter (the 5th parameter) + /// of the [sqlite3_create_function()] + /// and [sqlite3_create_function16()] routines that originally + /// registered the application defined function. + /// + /// This routine must be called from the same thread in which + /// the application-defined function is running. + ffi.Pointer sqlite3_user_data(ffi.Pointer arg0) { + return _sqlite3_user_data(arg0); + } + + late final _sqlite3_user_dataPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer) + > + >('sqlite3_user_data'); + late final _sqlite3_user_data = _sqlite3_user_dataPtr + .asFunction< + ffi.Pointer Function(ffi.Pointer) + >(); + + /// CAPI3REF: Obtaining SQL Values + /// METHOD: sqlite3_value + /// + /// Summary: + ///
+ ///
sqlite3_value_blobBLOB value + ///
sqlite3_value_doubleREAL value + ///
sqlite3_value_int32-bit INTEGER value + ///
sqlite3_value_int6464-bit INTEGER value + ///
sqlite3_value_pointerPointer value + ///
sqlite3_value_textUTF-8 TEXT value + ///
sqlite3_value_text16UTF-16 TEXT value in + /// the native byteorder + ///
sqlite3_value_text16beUTF-16be TEXT value + ///
sqlite3_value_text16leUTF-16le TEXT value + ///
    + ///
sqlite3_value_bytesSize of a BLOB + /// or a UTF-8 TEXT in bytes + ///
sqlite3_value_bytes16   + /// →  Size of UTF-16 + /// TEXT in bytes + ///
sqlite3_value_typeDefault + /// datatype of the value + ///
sqlite3_value_numeric_type   + /// →  Best numeric datatype of the value + ///
sqlite3_value_nochange   + /// →  True if the column is unchanged in an UPDATE + /// against a virtual table. + ///
sqlite3_value_frombind   + /// →  True if value originated from a [bound parameter] + ///
+ /// + /// Details: + /// + /// These routines extract type, size, and content information from + /// [protected sqlite3_value] objects. Protected sqlite3_value objects + /// are used to pass parameter information into the functions that + /// implement [application-defined SQL functions] and [virtual tables]. + /// + /// These routines work only with [protected sqlite3_value] objects. + /// Any attempt to use these routines on an [unprotected sqlite3_value] + /// is not threadsafe. + /// + /// ^These routines work just like the corresponding [column access functions] + /// except that these routines take a single [protected sqlite3_value] object + /// pointer instead of a [sqlite3_stmt*] pointer and an integer column number. + /// + /// ^The sqlite3_value_text16() interface extracts a UTF-16 string + /// in the native byte-order of the host machine. ^The + /// sqlite3_value_text16be() and sqlite3_value_text16le() interfaces + /// extract UTF-16 strings as big-endian and little-endian respectively. + /// + /// ^If [sqlite3_value] object V was initialized + /// using [sqlite3_bind_pointer(S,I,P,X,D)] or [sqlite3_result_pointer(C,P,X,D)] + /// and if X and Y are strings that compare equal according to strcmp(X,Y), + /// then sqlite3_value_pointer(V,Y) will return the pointer P. ^Otherwise, + /// sqlite3_value_pointer(V,Y) returns a NULL. The sqlite3_bind_pointer() + /// routine is part of the [pointer passing interface] added for SQLite 3.20.0. + /// + /// ^(The sqlite3_value_type(V) interface returns the + /// [SQLITE_INTEGER | datatype code] for the initial datatype of the + /// [sqlite3_value] object V. The returned value is one of [SQLITE_INTEGER], + /// [SQLITE_FLOAT], [SQLITE_TEXT], [SQLITE_BLOB], or [SQLITE_NULL].)^ + /// Other interfaces might change the datatype for an sqlite3_value object. + /// For example, if the datatype is initially SQLITE_INTEGER and + /// sqlite3_value_text(V) is called to extract a text value for that + /// integer, then subsequent calls to sqlite3_value_type(V) might return + /// SQLITE_TEXT. Whether or not a persistent internal datatype conversion + /// occurs is undefined and may change from one release of SQLite to the next. + /// + /// ^(The sqlite3_value_numeric_type() interface attempts to apply + /// numeric affinity to the value. This means that an attempt is + /// made to convert the value to an integer or floating point. If + /// such a conversion is possible without loss of information (in other + /// words, if the value is a string that looks like a number) + /// then the conversion is performed. Otherwise no conversion occurs. + /// The [SQLITE_INTEGER | datatype] after conversion is returned.)^ + /// + /// ^Within the [xUpdate] method of a [virtual table], the + /// sqlite3_value_nochange(X) interface returns true if and only if + /// the column corresponding to X is unchanged by the UPDATE operation + /// that the xUpdate method call was invoked to implement and if + /// and the prior [xColumn] method call that was invoked to extracted + /// the value for that column returned without setting a result (probably + /// because it queried [sqlite3_vtab_nochange()] and found that the column + /// was unchanging). ^Within an [xUpdate] method, any value for which + /// sqlite3_value_nochange(X) is true will in all other respects appear + /// to be a NULL value. If sqlite3_value_nochange(X) is invoked anywhere other + /// than within an [xUpdate] method call for an UPDATE statement, then + /// the return value is arbitrary and meaningless. + /// + /// ^The sqlite3_value_frombind(X) interface returns non-zero if the + /// value X originated from one of the [sqlite3_bind_int|sqlite3_bind()] + /// interfaces. ^If X comes from an SQL literal value, or a table column, + /// or an expression, then sqlite3_value_frombind(X) returns zero. + /// + /// Please pay particular attention to the fact that the pointer returned + /// from [sqlite3_value_blob()], [sqlite3_value_text()], or + /// [sqlite3_value_text16()] can be invalidated by a subsequent call to + /// [sqlite3_value_bytes()], [sqlite3_value_bytes16()], [sqlite3_value_text()], + /// or [sqlite3_value_text16()]. + /// + /// These routines must be called from the same thread as + /// the SQL function that supplied the [sqlite3_value*] parameters. + /// + /// As long as the input parameter is correct, these routines can only + /// fail if an out-of-memory error occurs during a format conversion. + /// Only the following subset of interfaces are subject to out-of-memory + /// errors: + /// + ///
    + ///
  • sqlite3_value_blob() + ///
  • sqlite3_value_text() + ///
  • sqlite3_value_text16() + ///
  • sqlite3_value_text16le() + ///
  • sqlite3_value_text16be() + ///
  • sqlite3_value_bytes() + ///
  • sqlite3_value_bytes16() + ///
+ /// + /// If an out-of-memory error occurs, then the return value from these + /// routines is the same as if the column had contained an SQL NULL value. + /// Valid SQL NULL returns can be distinguished from out-of-memory errors + /// by invoking the [sqlite3_errcode()] immediately after the suspect + /// return value is obtained and before any + /// other SQLite interface is called on the same [database connection]. + ffi.Pointer sqlite3_value_blob(ffi.Pointer arg0) { + return _sqlite3_value_blob(arg0); + } + + late final _sqlite3_value_blobPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer) + > + >('sqlite3_value_blob'); + late final _sqlite3_value_blob = _sqlite3_value_blobPtr + .asFunction Function(ffi.Pointer)>(); + + int sqlite3_value_bytes(ffi.Pointer arg0) { + return _sqlite3_value_bytes(arg0); + } + + late final _sqlite3_value_bytesPtr = + _lookup)>>( + 'sqlite3_value_bytes', + ); + late final _sqlite3_value_bytes = _sqlite3_value_bytesPtr + .asFunction)>(); + + int sqlite3_value_bytes16(ffi.Pointer arg0) { + return _sqlite3_value_bytes16(arg0); + } + + late final _sqlite3_value_bytes16Ptr = + _lookup)>>( + 'sqlite3_value_bytes16', + ); + late final _sqlite3_value_bytes16 = _sqlite3_value_bytes16Ptr + .asFunction)>(); + + double sqlite3_value_double(ffi.Pointer arg0) { + return _sqlite3_value_double(arg0); + } + + late final _sqlite3_value_doublePtr = + _lookup< + ffi.NativeFunction)> + >('sqlite3_value_double'); + late final _sqlite3_value_double = _sqlite3_value_doublePtr + .asFunction)>(); + + /// CAPI3REF: Copy And Free SQL Values + /// METHOD: sqlite3_value + /// + /// ^The sqlite3_value_dup(V) interface makes a copy of the [sqlite3_value] + /// object D and returns a pointer to that copy. ^The [sqlite3_value] returned + /// is a [protected sqlite3_value] object even if the input is not. + /// ^The sqlite3_value_dup(V) interface returns NULL if V is NULL or if a + /// memory allocation fails. + /// + /// ^The sqlite3_value_free(V) interface frees an [sqlite3_value] object + /// previously obtained from [sqlite3_value_dup()]. ^If V is a NULL pointer + /// then sqlite3_value_free(V) is a harmless no-op. + ffi.Pointer sqlite3_value_dup( + ffi.Pointer arg0, + ) { + return _sqlite3_value_dup(arg0); + } + + late final _sqlite3_value_dupPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer) + > + >('sqlite3_value_dup'); + late final _sqlite3_value_dup = _sqlite3_value_dupPtr + .asFunction< + ffi.Pointer Function(ffi.Pointer) + >(); + + void sqlite3_value_free(ffi.Pointer arg0) { + return _sqlite3_value_free(arg0); + } + + late final _sqlite3_value_freePtr = + _lookup< + ffi.NativeFunction)> + >('sqlite3_value_free'); + late final _sqlite3_value_free = _sqlite3_value_freePtr + .asFunction)>(); + + int sqlite3_value_frombind(ffi.Pointer arg0) { + return _sqlite3_value_frombind(arg0); + } + + late final _sqlite3_value_frombindPtr = + _lookup)>>( + 'sqlite3_value_frombind', + ); + late final _sqlite3_value_frombind = _sqlite3_value_frombindPtr + .asFunction)>(); + + int sqlite3_value_int(ffi.Pointer arg0) { + return _sqlite3_value_int(arg0); + } + + late final _sqlite3_value_intPtr = + _lookup)>>( + 'sqlite3_value_int', + ); + late final _sqlite3_value_int = _sqlite3_value_intPtr + .asFunction)>(); + + int sqlite3_value_int64(ffi.Pointer arg0) { + return _sqlite3_value_int64(arg0); + } + + late final _sqlite3_value_int64Ptr = + _lookup< + ffi.NativeFunction)> + >('sqlite3_value_int64'); + late final _sqlite3_value_int64 = _sqlite3_value_int64Ptr + .asFunction)>(); + + int sqlite3_value_nochange(ffi.Pointer arg0) { + return _sqlite3_value_nochange(arg0); + } + + late final _sqlite3_value_nochangePtr = + _lookup)>>( + 'sqlite3_value_nochange', + ); + late final _sqlite3_value_nochange = _sqlite3_value_nochangePtr + .asFunction)>(); + + int sqlite3_value_numeric_type(ffi.Pointer arg0) { + return _sqlite3_value_numeric_type(arg0); + } + + late final _sqlite3_value_numeric_typePtr = + _lookup)>>( + 'sqlite3_value_numeric_type', + ); + late final _sqlite3_value_numeric_type = _sqlite3_value_numeric_typePtr + .asFunction)>(); + + ffi.Pointer sqlite3_value_pointer( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _sqlite3_value_pointer(arg0, arg1); + } + + late final _sqlite3_value_pointerPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >('sqlite3_value_pointer'); + late final _sqlite3_value_pointer = _sqlite3_value_pointerPtr + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); + + /// CAPI3REF: Finding The Subtype Of SQL Values + /// METHOD: sqlite3_value + /// + /// The sqlite3_value_subtype(V) function returns the subtype for + /// an [application-defined SQL function] argument V. The subtype + /// information can be used to pass a limited amount of context from + /// one SQL function to another. Use the [sqlite3_result_subtype()] + /// routine to set the subtype for the return value of an SQL function. + int sqlite3_value_subtype(ffi.Pointer arg0) { + return _sqlite3_value_subtype(arg0); + } + + late final _sqlite3_value_subtypePtr = + _lookup< + ffi.NativeFunction)> + >('sqlite3_value_subtype'); + late final _sqlite3_value_subtype = _sqlite3_value_subtypePtr + .asFunction)>(); + + ffi.Pointer sqlite3_value_text( + ffi.Pointer arg0, + ) { + return _sqlite3_value_text(arg0); + } + + late final _sqlite3_value_textPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer) + > + >('sqlite3_value_text'); + late final _sqlite3_value_text = _sqlite3_value_textPtr + .asFunction< + ffi.Pointer Function(ffi.Pointer) + >(); + + ffi.Pointer sqlite3_value_text16(ffi.Pointer arg0) { + return _sqlite3_value_text16(arg0); + } + + late final _sqlite3_value_text16Ptr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer) + > + >('sqlite3_value_text16'); + late final _sqlite3_value_text16 = _sqlite3_value_text16Ptr + .asFunction Function(ffi.Pointer)>(); + + ffi.Pointer sqlite3_value_text16be( + ffi.Pointer arg0, + ) { + return _sqlite3_value_text16be(arg0); + } + + late final _sqlite3_value_text16bePtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer) + > + >('sqlite3_value_text16be'); + late final _sqlite3_value_text16be = _sqlite3_value_text16bePtr + .asFunction Function(ffi.Pointer)>(); + + ffi.Pointer sqlite3_value_text16le( + ffi.Pointer arg0, + ) { + return _sqlite3_value_text16le(arg0); + } + + late final _sqlite3_value_text16lePtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer) + > + >('sqlite3_value_text16le'); + late final _sqlite3_value_text16le = _sqlite3_value_text16lePtr + .asFunction Function(ffi.Pointer)>(); + + int sqlite3_value_type(ffi.Pointer arg0) { + return _sqlite3_value_type(arg0); + } + + late final _sqlite3_value_typePtr = + _lookup)>>( + 'sqlite3_value_type', + ); + late final _sqlite3_value_type = _sqlite3_value_typePtr + .asFunction)>(); + + /// CAPI3REF: Run-Time Library Version Numbers + /// KEYWORDS: sqlite3_version sqlite3_sourceid + /// + /// These interfaces provide the same information as the [SQLITE_VERSION], + /// [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros + /// but are associated with the library instead of the header file. ^(Cautious + /// programmers might include assert() statements in their application to + /// verify that values returned by these interfaces match the macros in + /// the header, and thus ensure that the application is + /// compiled with matching library and header files. + /// + ///
+  /// assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER );
+  /// assert( strncmp(sqlite3_sourceid(),SQLITE_SOURCE_ID,80)==0 );
+  /// assert( strcmp(sqlite3_libversion(),SQLITE_VERSION)==0 );
+  /// 
)^ + /// + /// ^The sqlite3_version[] string constant contains the text of [SQLITE_VERSION] + /// macro. ^The sqlite3_libversion() function returns a pointer to the + /// to the sqlite3_version[] string constant. The sqlite3_libversion() + /// function is provided for use in DLLs since DLL users usually do not have + /// direct access to string constants within the DLL. ^The + /// sqlite3_libversion_number() function returns an integer equal to + /// [SQLITE_VERSION_NUMBER]. ^(The sqlite3_sourceid() function returns + /// a pointer to a string constant whose value is the same as the + /// [SQLITE_SOURCE_ID] C preprocessor macro. Except if SQLite is built + /// using an edited copy of [the amalgamation], then the last four characters + /// of the hash might be different from [SQLITE_SOURCE_ID].)^ + /// + /// See also: [sqlite_version()] and [sqlite_source_id()]. + late final ffi.Pointer> _sqlite3_version = + _lookup>('sqlite3_version'); + + ffi.Pointer get sqlite3_version => _sqlite3_version.value; + + set sqlite3_version(ffi.Pointer value) => + _sqlite3_version.value = value; + + /// CAPI3REF: Virtual File System Objects + /// + /// A virtual filesystem (VFS) is an [sqlite3_vfs] object + /// that SQLite uses to interact + /// with the underlying operating system. Most SQLite builds come with a + /// single default VFS that is appropriate for the host computer. + /// New VFSes can be registered and existing VFSes can be unregistered. + /// The following interfaces are provided. + /// + /// ^The sqlite3_vfs_find() interface returns a pointer to a VFS given its name. + /// ^Names are case sensitive. + /// ^Names are zero-terminated UTF-8 strings. + /// ^If there is no match, a NULL pointer is returned. + /// ^If zVfsName is NULL then the default VFS is returned. + /// + /// ^New VFSes are registered with sqlite3_vfs_register(). + /// ^Each new VFS becomes the default VFS if the makeDflt flag is set. + /// ^The same VFS can be registered multiple times without injury. + /// ^To make an existing VFS into the default VFS, register it again + /// with the makeDflt flag set. If two different VFSes with the + /// same name are registered, the behavior is undefined. If a + /// VFS is registered with a name that is NULL or an empty string, + /// then the behavior is undefined. + /// + /// ^Unregister a VFS with the sqlite3_vfs_unregister() interface. + /// ^(If the default VFS is unregistered, another VFS is chosen as + /// the default. The choice for the new VFS is arbitrary.)^ + ffi.Pointer sqlite3_vfs_find(ffi.Pointer zVfsName) { + return _sqlite3_vfs_find(zVfsName); + } + + late final _sqlite3_vfs_findPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer) + > + >('sqlite3_vfs_find'); + late final _sqlite3_vfs_find = _sqlite3_vfs_findPtr + .asFunction Function(ffi.Pointer)>(); + + int sqlite3_vfs_register(ffi.Pointer arg0, int makeDflt) { + return _sqlite3_vfs_register(arg0, makeDflt); + } + + late final _sqlite3_vfs_registerPtr = + _lookup< + ffi.NativeFunction, ffi.Int)> + >('sqlite3_vfs_register'); + late final _sqlite3_vfs_register = _sqlite3_vfs_registerPtr + .asFunction, int)>(); + + int sqlite3_vfs_unregister(ffi.Pointer arg0) { + return _sqlite3_vfs_unregister(arg0); + } + + late final _sqlite3_vfs_unregisterPtr = + _lookup)>>( + 'sqlite3_vfs_unregister', + ); + late final _sqlite3_vfs_unregister = _sqlite3_vfs_unregisterPtr + .asFunction)>(); + + /// CAPI3REF: Determine The Collation For a Virtual Table Constraint + /// + /// This function may only be called from within a call to the [xBestIndex] + /// method of a [virtual table]. + /// + /// The first argument must be the sqlite3_index_info object that is the + /// first parameter to the xBestIndex() method. The second argument must be + /// an index into the aConstraint[] array belonging to the sqlite3_index_info + /// structure passed to xBestIndex. This function returns a pointer to a buffer + /// containing the name of the collation sequence for the corresponding + /// constraint. + ffi.Pointer sqlite3_vtab_collation( + ffi.Pointer arg0, + int arg1, + ) { + return _sqlite3_vtab_collation(arg0, arg1); + } + + late final _sqlite3_vtab_collationPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Int, + ) + > + >('sqlite3_vtab_collation'); + late final _sqlite3_vtab_collation = _sqlite3_vtab_collationPtr + .asFunction< + ffi.Pointer Function(ffi.Pointer, int) + >(); + + /// CAPI3REF: Virtual Table Interface Configuration + /// + /// This function may be called by either the [xConnect] or [xCreate] method + /// of a [virtual table] implementation to configure + /// various facets of the virtual table interface. + /// + /// If this interface is invoked outside the context of an xConnect or + /// xCreate virtual table method then the behavior is undefined. + /// + /// In the call sqlite3_vtab_config(D,C,...) the D parameter is the + /// [database connection] in which the virtual table is being created and + /// which is passed in as the first argument to the [xConnect] or [xCreate] + /// method that is invoking sqlite3_vtab_config(). The C parameter is one + /// of the [virtual table configuration options]. The presence and meaning + /// of parameters after C depend on which [virtual table configuration option] + /// is used. + int sqlite3_vtab_config(ffi.Pointer arg0, int op) { + return _sqlite3_vtab_config(arg0, op); + } + + late final _sqlite3_vtab_configPtr = + _lookup< + ffi.NativeFunction, ffi.Int)> + >('sqlite3_vtab_config'); + late final _sqlite3_vtab_config = _sqlite3_vtab_configPtr + .asFunction, int)>(); + + /// CAPI3REF: Determine If Virtual Table Column Access Is For UPDATE + /// + /// If the sqlite3_vtab_nochange(X) routine is called within the [xColumn] + /// method of a [virtual table], then it returns true if and only if the + /// column is being fetched as part of an UPDATE operation during which the + /// column value will not change. Applications might use this to substitute + /// a return value that is less expensive to compute and that the corresponding + /// [xUpdate] method understands as a "no-change" value. + /// + /// If the [xColumn] method calls sqlite3_vtab_nochange() and finds that + /// the column is not changed by the UPDATE statement, then the xColumn + /// method can optionally return without setting a result, without calling + /// any of the [sqlite3_result_int|sqlite3_result_xxxxx() interfaces]. + /// In that case, [sqlite3_value_nochange(X)] will return true for the + /// same column in the [xUpdate] method. + int sqlite3_vtab_nochange(ffi.Pointer arg0) { + return _sqlite3_vtab_nochange(arg0); + } + + late final _sqlite3_vtab_nochangePtr = + _lookup< + ffi.NativeFunction)> + >('sqlite3_vtab_nochange'); + late final _sqlite3_vtab_nochange = _sqlite3_vtab_nochangePtr + .asFunction)>(); + + /// CAPI3REF: Determine The Virtual Table Conflict Policy + /// + /// This function may only be called from within a call to the [xUpdate] method + /// of a [virtual table] implementation for an INSERT or UPDATE operation. ^The + /// value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL], + /// [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode + /// of the SQL statement that triggered the call to the [xUpdate] method of the + /// [virtual table]. + int sqlite3_vtab_on_conflict(ffi.Pointer arg0) { + return _sqlite3_vtab_on_conflict(arg0); + } + + late final _sqlite3_vtab_on_conflictPtr = + _lookup)>>( + 'sqlite3_vtab_on_conflict', + ); + late final _sqlite3_vtab_on_conflict = _sqlite3_vtab_on_conflictPtr + .asFunction)>(); + + /// CAPI3REF: Configure an auto-checkpoint + /// METHOD: sqlite3 + /// + /// ^The [sqlite3_wal_autocheckpoint(D,N)] is a wrapper around + /// [sqlite3_wal_hook()] that causes any database on [database connection] D + /// to automatically [checkpoint] + /// after committing a transaction if there are N or + /// more frames in the [write-ahead log] file. ^Passing zero or + /// a negative value as the nFrame parameter disables automatic + /// checkpoints entirely. + /// + /// ^The callback registered by this function replaces any existing callback + /// registered using [sqlite3_wal_hook()]. ^Likewise, registering a callback + /// using [sqlite3_wal_hook()] disables the automatic checkpoint mechanism + /// configured by this function. + /// + /// ^The [wal_autocheckpoint pragma] can be used to invoke this interface + /// from SQL. + /// + /// ^Checkpoints initiated by this mechanism are + /// [sqlite3_wal_checkpoint_v2|PASSIVE]. + /// + /// ^Every new [database connection] defaults to having the auto-checkpoint + /// enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT] + /// pages. The use of this interface + /// is only necessary if the default setting is found to be suboptimal + /// for a particular application. + int sqlite3_wal_autocheckpoint(ffi.Pointer db, int N) { + return _sqlite3_wal_autocheckpoint(db, N); + } + + late final _sqlite3_wal_autocheckpointPtr = + _lookup< + ffi.NativeFunction, ffi.Int)> + >('sqlite3_wal_autocheckpoint'); + late final _sqlite3_wal_autocheckpoint = _sqlite3_wal_autocheckpointPtr + .asFunction, int)>(); + + /// CAPI3REF: Checkpoint a database + /// METHOD: sqlite3 + /// + /// ^(The sqlite3_wal_checkpoint(D,X) is equivalent to + /// [sqlite3_wal_checkpoint_v2](D,X,[SQLITE_CHECKPOINT_PASSIVE],0,0).)^ + /// + /// In brief, sqlite3_wal_checkpoint(D,X) causes the content in the + /// [write-ahead log] for database X on [database connection] D to be + /// transferred into the database file and for the write-ahead log to + /// be reset. See the [checkpointing] documentation for addition + /// information. + /// + /// This interface used to be the only way to cause a checkpoint to + /// occur. But then the newer and more powerful [sqlite3_wal_checkpoint_v2()] + /// interface was added. This interface is retained for backwards + /// compatibility and as a convenience for applications that need to manually + /// start a callback but which do not need the full power (and corresponding + /// complication) of [sqlite3_wal_checkpoint_v2()]. + int sqlite3_wal_checkpoint( + ffi.Pointer db, + ffi.Pointer zDb, + ) { + return _sqlite3_wal_checkpoint(db, zDb); + } + + late final _sqlite3_wal_checkpointPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer) + > + >('sqlite3_wal_checkpoint'); + late final _sqlite3_wal_checkpoint = _sqlite3_wal_checkpointPtr + .asFunction, ffi.Pointer)>(); + + /// CAPI3REF: Checkpoint a database + /// METHOD: sqlite3 + /// + /// ^(The sqlite3_wal_checkpoint_v2(D,X,M,L,C) interface runs a checkpoint + /// operation on database X of [database connection] D in mode M. Status + /// information is written back into integers pointed to by L and C.)^ + /// ^(The M parameter must be a valid [checkpoint mode]:)^ + /// + ///
+ ///
SQLITE_CHECKPOINT_PASSIVE
+ /// ^Checkpoint as many frames as possible without waiting for any database + /// readers or writers to finish, then sync the database file if all frames + /// in the log were checkpointed. ^The [busy-handler callback] + /// is never invoked in the SQLITE_CHECKPOINT_PASSIVE mode. + /// ^On the other hand, passive mode might leave the checkpoint unfinished + /// if there are concurrent readers or writers. + /// + ///
SQLITE_CHECKPOINT_FULL
+ /// ^This mode blocks (it invokes the + /// [sqlite3_busy_handler|busy-handler callback]) until there is no + /// database writer and all readers are reading from the most recent database + /// snapshot. ^It then checkpoints all frames in the log file and syncs the + /// database file. ^This mode blocks new database writers while it is pending, + /// but new database readers are allowed to continue unimpeded. + /// + ///
SQLITE_CHECKPOINT_RESTART
+ /// ^This mode works the same way as SQLITE_CHECKPOINT_FULL with the addition + /// that after checkpointing the log file it blocks (calls the + /// [busy-handler callback]) + /// until all readers are reading from the database file only. ^This ensures + /// that the next writer will restart the log file from the beginning. + /// ^Like SQLITE_CHECKPOINT_FULL, this mode blocks new + /// database writer attempts while it is pending, but does not impede readers. + /// + ///
SQLITE_CHECKPOINT_TRUNCATE
+ /// ^This mode works the same way as SQLITE_CHECKPOINT_RESTART with the + /// addition that it also truncates the log file to zero bytes just prior + /// to a successful return. + ///
+ /// + /// ^If pnLog is not NULL, then *pnLog is set to the total number of frames in + /// the log file or to -1 if the checkpoint could not run because + /// of an error or because the database is not in [WAL mode]. ^If pnCkpt is not + /// NULL,then *pnCkpt is set to the total number of checkpointed frames in the + /// log file (including any that were already checkpointed before the function + /// was called) or to -1 if the checkpoint could not run due to an error or + /// because the database is not in WAL mode. ^Note that upon successful + /// completion of an SQLITE_CHECKPOINT_TRUNCATE, the log file will have been + /// truncated to zero bytes and so both *pnLog and *pnCkpt will be set to zero. + /// + /// ^All calls obtain an exclusive "checkpoint" lock on the database file. ^If + /// any other process is running a checkpoint operation at the same time, the + /// lock cannot be obtained and SQLITE_BUSY is returned. ^Even if there is a + /// busy-handler configured, it will not be invoked in this case. + /// + /// ^The SQLITE_CHECKPOINT_FULL, RESTART and TRUNCATE modes also obtain the + /// exclusive "writer" lock on the database file. ^If the writer lock cannot be + /// obtained immediately, and a busy-handler is configured, it is invoked and + /// the writer lock retried until either the busy-handler returns 0 or the lock + /// is successfully obtained. ^The busy-handler is also invoked while waiting for + /// database readers as described above. ^If the busy-handler returns 0 before + /// the writer lock is obtained or while waiting for database readers, the + /// checkpoint operation proceeds from that point in the same way as + /// SQLITE_CHECKPOINT_PASSIVE - checkpointing as many frames as possible + /// without blocking any further. ^SQLITE_BUSY is returned in this case. + /// + /// ^If parameter zDb is NULL or points to a zero length string, then the + /// specified operation is attempted on all WAL databases [attached] to + /// [database connection] db. In this case the + /// values written to output parameters *pnLog and *pnCkpt are undefined. ^If + /// an SQLITE_BUSY error is encountered when processing one or more of the + /// attached WAL databases, the operation is still attempted on any remaining + /// attached databases and SQLITE_BUSY is returned at the end. ^If any other + /// error occurs while processing an attached database, processing is abandoned + /// and the error code is returned to the caller immediately. ^If no error + /// (SQLITE_BUSY or otherwise) is encountered while processing the attached + /// databases, SQLITE_OK is returned. + /// + /// ^If database zDb is the name of an attached database that is not in WAL + /// mode, SQLITE_OK is returned and both *pnLog and *pnCkpt set to -1. ^If + /// zDb is not NULL (or a zero length string) and is not the name of any + /// attached database, SQLITE_ERROR is returned to the caller. + /// + /// ^Unless it returns SQLITE_MISUSE, + /// the sqlite3_wal_checkpoint_v2() interface + /// sets the error information that is queried by + /// [sqlite3_errcode()] and [sqlite3_errmsg()]. + /// + /// ^The [PRAGMA wal_checkpoint] command can be used to invoke this interface + /// from SQL. + int sqlite3_wal_checkpoint_v2( + ffi.Pointer db, + ffi.Pointer zDb, + int eMode, + ffi.Pointer pnLog, + ffi.Pointer pnCkpt, + ) { + return _sqlite3_wal_checkpoint_v2(db, zDb, eMode, pnLog, pnCkpt); + } + + late final _sqlite3_wal_checkpoint_v2Ptr = + _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ) + > + >('sqlite3_wal_checkpoint_v2'); + late final _sqlite3_wal_checkpoint_v2 = _sqlite3_wal_checkpoint_v2Ptr + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ) + >(); + + /// CAPI3REF: Write-Ahead Log Commit Hook + /// METHOD: sqlite3 + /// + /// ^The [sqlite3_wal_hook()] function is used to register a callback that + /// is invoked each time data is committed to a database in wal mode. + /// + /// ^(The callback is invoked by SQLite after the commit has taken place and + /// the associated write-lock on the database released)^, so the implementation + /// may read, write or [checkpoint] the database as required. + /// + /// ^The first parameter passed to the callback function when it is invoked + /// is a copy of the third parameter passed to sqlite3_wal_hook() when + /// registering the callback. ^The second is a copy of the database handle. + /// ^The third parameter is the name of the database that was written to - + /// either "main" or the name of an [ATTACH]-ed database. ^The fourth parameter + /// is the number of pages currently in the write-ahead log file, + /// including those that were just committed. + /// + /// The callback function should normally return [SQLITE_OK]. ^If an error + /// code is returned, that error will propagate back up through the + /// SQLite code base to cause the statement that provoked the callback + /// to report an error, though the commit will have still occurred. If the + /// callback returns [SQLITE_ROW] or [SQLITE_DONE], or if it returns a value + /// that does not correspond to any valid SQLite error code, the results + /// are undefined. + /// + /// A single database handle may have at most a single write-ahead log callback + /// registered at one time. ^Calling [sqlite3_wal_hook()] replaces any + /// previously registered write-ahead log callback. ^Note that the + /// [sqlite3_wal_autocheckpoint()] interface and the + /// [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will + /// overwrite any prior [sqlite3_wal_hook()] settings. + ffi.Pointer sqlite3_wal_hook( + ffi.Pointer arg0, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ) + > + > + arg1, + ffi.Pointer arg2, + ) { + return _sqlite3_wal_hook(arg0, arg1, arg2); + } + + late final _sqlite3_wal_hookPtr = + _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ) + > + >, + ffi.Pointer, + ) + > + >('sqlite3_wal_hook'); + late final _sqlite3_wal_hook = _sqlite3_wal_hookPtr + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ) + > + >, + ffi.Pointer, + ) + >(); + + /// CAPI3REF: Win32 Specific Interface + /// + /// These interfaces are available only on Windows. The + /// [sqlite3_win32_set_directory] interface is used to set the value associated + /// with the [sqlite3_temp_directory] or [sqlite3_data_directory] variable, to + /// zValue, depending on the value of the type parameter. The zValue parameter + /// should be NULL to cause the previous value to be freed via [sqlite3_free]; + /// a non-NULL value will be copied into memory obtained from [sqlite3_malloc] + /// prior to being used. The [sqlite3_win32_set_directory] interface returns + /// [SQLITE_OK] to indicate success, [SQLITE_ERROR] if the type is unsupported, + /// or [SQLITE_NOMEM] if memory could not be allocated. The value of the + /// [sqlite3_data_directory] variable is intended to act as a replacement for + /// the current directory on the sub-platforms of Win32 where that concept is + /// not present, e.g. WinRT and UWP. The [sqlite3_win32_set_directory8] and + /// [sqlite3_win32_set_directory16] interfaces behave exactly the same as the + /// sqlite3_win32_set_directory interface except the string parameter must be + /// UTF-8 or UTF-16, respectively. + int sqlite3_win32_set_directory(int type, ffi.Pointer zValue) { + return _sqlite3_win32_set_directory(type, zValue); + } + + late final _sqlite3_win32_set_directoryPtr = + _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.UnsignedLong, ffi.Pointer) + > + >('sqlite3_win32_set_directory'); + late final _sqlite3_win32_set_directory = _sqlite3_win32_set_directoryPtr + .asFunction)>(); + + int sqlite3_win32_set_directory16(int type, ffi.Pointer zValue) { + return _sqlite3_win32_set_directory16(type, zValue); + } + + late final _sqlite3_win32_set_directory16Ptr = + _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.UnsignedLong, ffi.Pointer) + > + >('sqlite3_win32_set_directory16'); + late final _sqlite3_win32_set_directory16 = _sqlite3_win32_set_directory16Ptr + .asFunction)>(); + + int sqlite3_win32_set_directory8(int type, ffi.Pointer zValue) { + return _sqlite3_win32_set_directory8(type, zValue); + } + + late final _sqlite3_win32_set_directory8Ptr = + _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.UnsignedLong, ffi.Pointer) + > + >('sqlite3_win32_set_directory8'); + late final _sqlite3_win32_set_directory8 = _sqlite3_win32_set_directory8Ptr + .asFunction)>(); +} + +const int FTS5_TOKENIZE_AUX = 8; + +const int FTS5_TOKENIZE_DOCUMENT = 4; + +const int FTS5_TOKENIZE_PREFIX = 2; + +const int FTS5_TOKENIZE_QUERY = 1; + +const int FTS5_TOKEN_COLOCATED = 1; + +const int FULLY_WITHIN = 2; + +final class Fts5Context extends ffi.Opaque {} + +/// EXTENSION API FUNCTIONS +/// +/// xUserData(pFts): +/// Return a copy of the context pointer the extension function was +/// registered with. +/// +/// xColumnTotalSize(pFts, iCol, pnToken): +/// If parameter iCol is less than zero, set output variable *pnToken +/// to the total number of tokens in the FTS5 table. Or, if iCol is +/// non-negative but less than the number of columns in the table, return +/// the total number of tokens in column iCol, considering all rows in +/// the FTS5 table. +/// +/// If parameter iCol is greater than or equal to the number of columns +/// in the table, SQLITE_RANGE is returned. Or, if an error occurs (e.g. +/// an OOM condition or IO error), an appropriate SQLite error code is +/// returned. +/// +/// xColumnCount(pFts): +/// Return the number of columns in the table. +/// +/// xColumnSize(pFts, iCol, pnToken): +/// If parameter iCol is less than zero, set output variable *pnToken +/// to the total number of tokens in the current row. Or, if iCol is +/// non-negative but less than the number of columns in the table, set +/// *pnToken to the number of tokens in column iCol of the current row. +/// +/// If parameter iCol is greater than or equal to the number of columns +/// in the table, SQLITE_RANGE is returned. Or, if an error occurs (e.g. +/// an OOM condition or IO error), an appropriate SQLite error code is +/// returned. +/// +/// This function may be quite inefficient if used with an FTS5 table +/// created with the "columnsize=0" option. +/// +/// xColumnText: +/// This function attempts to retrieve the text of column iCol of the +/// current document. If successful, (*pz) is set to point to a buffer +/// containing the text in utf-8 encoding, (*pn) is set to the size in bytes +/// (not characters) of the buffer and SQLITE_OK is returned. Otherwise, +/// if an error occurs, an SQLite error code is returned and the final values +/// of (*pz) and (*pn) are undefined. +/// +/// xPhraseCount: +/// Returns the number of phrases in the current query expression. +/// +/// xPhraseSize: +/// Returns the number of tokens in phrase iPhrase of the query. Phrases +/// are numbered starting from zero. +/// +/// xInstCount: +/// Set *pnInst to the total number of occurrences of all phrases within +/// the query within the current row. Return SQLITE_OK if successful, or +/// an error code (i.e. SQLITE_NOMEM) if an error occurs. +/// +/// This API can be quite slow if used with an FTS5 table created with the +/// "detail=none" or "detail=column" option. If the FTS5 table is created +/// with either "detail=none" or "detail=column" and "content=" option +/// (i.e. if it is a contentless table), then this API always returns 0. +/// +/// xInst: +/// Query for the details of phrase match iIdx within the current row. +/// Phrase matches are numbered starting from zero, so the iIdx argument +/// should be greater than or equal to zero and smaller than the value +/// output by xInstCount(). +/// +/// Usually, output parameter *piPhrase is set to the phrase number, *piCol +/// to the column in which it occurs and *piOff the token offset of the +/// first token of the phrase. Returns SQLITE_OK if successful, or an error +/// code (i.e. SQLITE_NOMEM) if an error occurs. +/// +/// This API can be quite slow if used with an FTS5 table created with the +/// "detail=none" or "detail=column" option. +/// +/// xRowid: +/// Returns the rowid of the current row. +/// +/// xTokenize: +/// Tokenize text using the tokenizer belonging to the FTS5 table. +/// +/// xQueryPhrase(pFts5, iPhrase, pUserData, xCallback): +/// This API function is used to query the FTS table for phrase iPhrase +/// of the current query. Specifically, a query equivalent to: +/// +/// ... FROM ftstable WHERE ftstable MATCH $p ORDER BY rowid +/// +/// with $p set to a phrase equivalent to the phrase iPhrase of the +/// current query is executed. Any column filter that applies to +/// phrase iPhrase of the current query is included in $p. For each +/// row visited, the callback function passed as the fourth argument +/// is invoked. The context and API objects passed to the callback +/// function may be used to access the properties of each matched row. +/// Invoking Api.xUserData() returns a copy of the pointer passed as +/// the third argument to pUserData. +/// +/// If the callback function returns any value other than SQLITE_OK, the +/// query is abandoned and the xQueryPhrase function returns immediately. +/// If the returned value is SQLITE_DONE, xQueryPhrase returns SQLITE_OK. +/// Otherwise, the error code is propagated upwards. +/// +/// If the query runs to completion without incident, SQLITE_OK is returned. +/// Or, if some error occurs before the query completes or is aborted by +/// the callback, an SQLite error code is returned. +/// +/// +/// xSetAuxdata(pFts5, pAux, xDelete) +/// +/// Save the pointer passed as the second argument as the extension function's +/// "auxiliary data". The pointer may then be retrieved by the current or any +/// future invocation of the same fts5 extension function made as part of +/// the same MATCH query using the xGetAuxdata() API. +/// +/// Each extension function is allocated a single auxiliary data slot for +/// each FTS query (MATCH expression). If the extension function is invoked +/// more than once for a single FTS query, then all invocations share a +/// single auxiliary data context. +/// +/// If there is already an auxiliary data pointer when this function is +/// invoked, then it is replaced by the new pointer. If an xDelete callback +/// was specified along with the original pointer, it is invoked at this +/// point. +/// +/// The xDelete callback, if one is specified, is also invoked on the +/// auxiliary data pointer after the FTS5 query has finished. +/// +/// If an error (e.g. an OOM condition) occurs within this function, +/// the auxiliary data is set to NULL and an error code returned. If the +/// xDelete parameter was not NULL, it is invoked on the auxiliary data +/// pointer before returning. +/// +/// +/// xGetAuxdata(pFts5, bClear) +/// +/// Returns the current auxiliary data pointer for the fts5 extension +/// function. See the xSetAuxdata() method for details. +/// +/// If the bClear argument is non-zero, then the auxiliary data is cleared +/// (set to NULL) before this function returns. In this case the xDelete, +/// if any, is not invoked. +/// +/// +/// xRowCount(pFts5, pnRow) +/// +/// This function is used to retrieve the total number of rows in the table. +/// In other words, the same value that would be returned by: +/// +/// SELECT count(*) FROM ftstable; +/// +/// xPhraseFirst() +/// This function is used, along with type Fts5PhraseIter and the xPhraseNext +/// method, to iterate through all instances of a single query phrase within +/// the current row. This is the same information as is accessible via the +/// xInstCount/xInst APIs. While the xInstCount/xInst APIs are more convenient +/// to use, this API may be faster under some circumstances. To iterate +/// through instances of phrase iPhrase, use the following code: +/// +/// Fts5PhraseIter iter; +/// int iCol, iOff; +/// for(pApi->xPhraseFirst(pFts, iPhrase, &iter, &iCol, &iOff); +/// iCol>=0; +/// pApi->xPhraseNext(pFts, &iter, &iCol, &iOff) +/// ){ +/// // An instance of phrase iPhrase at offset iOff of column iCol +/// } +/// +/// The Fts5PhraseIter structure is defined above. Applications should not +/// modify this structure directly - it should only be used as shown above +/// with the xPhraseFirst() and xPhraseNext() API methods (and by +/// xPhraseFirstColumn() and xPhraseNextColumn() as illustrated below). +/// +/// This API can be quite slow if used with an FTS5 table created with the +/// "detail=none" or "detail=column" option. If the FTS5 table is created +/// with either "detail=none" or "detail=column" and "content=" option +/// (i.e. if it is a contentless table), then this API always iterates +/// through an empty set (all calls to xPhraseFirst() set iCol to -1). +/// +/// xPhraseNext() +/// See xPhraseFirst above. +/// +/// xPhraseFirstColumn() +/// This function and xPhraseNextColumn() are similar to the xPhraseFirst() +/// and xPhraseNext() APIs described above. The difference is that instead +/// of iterating through all instances of a phrase in the current row, these +/// APIs are used to iterate through the set of columns in the current row +/// that contain one or more instances of a specified phrase. For example: +/// +/// Fts5PhraseIter iter; +/// int iCol; +/// for(pApi->xPhraseFirstColumn(pFts, iPhrase, &iter, &iCol); +/// iCol>=0; +/// pApi->xPhraseNextColumn(pFts, &iter, &iCol) +/// ){ +/// // Column iCol contains at least one instance of phrase iPhrase +/// } +/// +/// This API can be quite slow if used with an FTS5 table created with the +/// "detail=none" option. If the FTS5 table is created with either +/// "detail=none" "content=" option (i.e. if it is a contentless table), +/// then this API always iterates through an empty set (all calls to +/// xPhraseFirstColumn() set iCol to -1). +/// +/// The information accessed using this API and its companion +/// xPhraseFirstColumn() may also be obtained using xPhraseFirst/xPhraseNext +/// (or xInst/xInstCount). The chief advantage of this API is that it is +/// significantly more efficient than those alternatives when used with +/// "detail=column" tables. +/// +/// xPhraseNextColumn() +/// See xPhraseFirstColumn above. +final class Fts5ExtensionApi extends ffi.Struct { + /// Currently always set to 3 + @ffi.Int() + external int iVersion; + + external ffi.Pointer< + ffi.NativeFunction Function(ffi.Pointer)> + > + xUserData; + + external ffi.Pointer< + ffi.NativeFunction)> + > + xColumnCount; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer) + > + > + xRowCount; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ) + > + > + xColumnTotalSize; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Int, + ffi.Int, + ffi.Int, + ) + > + >, + ) + > + > + xTokenize; + + external ffi.Pointer< + ffi.NativeFunction)> + > + xPhraseCount; + + external ffi.Pointer< + ffi.NativeFunction, ffi.Int)> + > + xPhraseSize; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer) + > + > + xInstCount; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + > + xInst; + + external ffi.Pointer< + ffi.NativeFunction)> + > + xRowid; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ffi.Pointer, + ) + > + > + xColumnText; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Pointer) + > + > + xColumnSize; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >, + ) + > + > + xQueryPhrase; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + > + > + xSetAuxdata; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Int) + > + > + xGetAuxdata; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + > + xPhraseFirst; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + > + xPhraseNext; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ) + > + > + xPhraseFirstColumn; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + > + xPhraseNextColumn; + + static ffi.Pointer $allocate( + ffi.Allocator $allocator, { + required int iVersion, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer) + > + > + xUserData, + required ffi.Pointer< + ffi.NativeFunction)> + > + xColumnCount, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer) + > + > + xRowCount, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ) + > + > + xColumnTotalSize, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Int, + ffi.Int, + ffi.Int, + ) + > + >, + ) + > + > + xTokenize, + required ffi.Pointer< + ffi.NativeFunction)> + > + xPhraseCount, + required ffi.Pointer< + ffi.NativeFunction, ffi.Int)> + > + xPhraseSize, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer) + > + > + xInstCount, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + > + xInst, + required ffi.Pointer< + ffi.NativeFunction)> + > + xRowid, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ffi.Pointer, + ) + > + > + xColumnText, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ) + > + > + xColumnSize, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >, + ) + > + > + xQueryPhrase, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction)> + >, + ) + > + > + xSetAuxdata, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Int) + > + > + xGetAuxdata, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + > + xPhraseFirst, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + > + xPhraseNext, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ) + > + > + xPhraseFirstColumn, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + > + xPhraseNextColumn, + }) => $allocator() + ..ref.iVersion = iVersion + ..ref.xUserData = xUserData + ..ref.xColumnCount = xColumnCount + ..ref.xRowCount = xRowCount + ..ref.xColumnTotalSize = xColumnTotalSize + ..ref.xTokenize = xTokenize + ..ref.xPhraseCount = xPhraseCount + ..ref.xPhraseSize = xPhraseSize + ..ref.xInstCount = xInstCount + ..ref.xInst = xInst + ..ref.xRowid = xRowid + ..ref.xColumnText = xColumnText + ..ref.xColumnSize = xColumnSize + ..ref.xQueryPhrase = xQueryPhrase + ..ref.xSetAuxdata = xSetAuxdata + ..ref.xGetAuxdata = xGetAuxdata + ..ref.xPhraseFirst = xPhraseFirst + ..ref.xPhraseNext = xPhraseNext + ..ref.xPhraseFirstColumn = xPhraseFirstColumn + ..ref.xPhraseNextColumn = xPhraseNextColumn; +} + +final class Fts5PhraseIter extends ffi.Struct { + external ffi.Pointer a; + + external ffi.Pointer b; + + static ffi.Pointer $allocate( + ffi.Allocator $allocator, { + required ffi.Pointer a, + required ffi.Pointer b, + }) => $allocator() + ..ref.a = a + ..ref.b = b; +} + +final class Fts5Tokenizer extends ffi.Opaque {} + +const int NOT_WITHIN = 0; + +const int PARTLY_WITHIN = 1; + +const int SQLITE3_TEXT = 3; + +const int SQLITE_ABORT = 4; + +const int SQLITE_ABORT_ROLLBACK = 516; + +const int SQLITE_ACCESS_EXISTS = 0; + +const int SQLITE_ACCESS_READ = 2; + +const int SQLITE_ACCESS_READWRITE = 1; + +const int SQLITE_ALTER_TABLE = 26; + +const int SQLITE_ANALYZE = 28; + +const int SQLITE_ANY = 5; + +const int SQLITE_ATTACH = 24; + +const int SQLITE_AUTH = 23; + +const int SQLITE_AUTH_USER = 279; + +const int SQLITE_BLOB = 4; + +const int SQLITE_BUSY = 5; + +const int SQLITE_BUSY_RECOVERY = 261; + +const int SQLITE_BUSY_SNAPSHOT = 517; + +const int SQLITE_BUSY_TIMEOUT = 773; + +const int SQLITE_CANTOPEN = 14; + +const int SQLITE_CANTOPEN_CONVPATH = 1038; + +const int SQLITE_CANTOPEN_DIRTYWAL = 1294; + +const int SQLITE_CANTOPEN_FULLPATH = 782; + +const int SQLITE_CANTOPEN_ISDIR = 526; + +const int SQLITE_CANTOPEN_NOTEMPDIR = 270; + +const int SQLITE_CANTOPEN_SYMLINK = 1550; + +const int SQLITE_CHECKPOINT_FULL = 1; + +const int SQLITE_CHECKPOINT_PASSIVE = 0; + +const int SQLITE_CHECKPOINT_RESTART = 2; + +const int SQLITE_CHECKPOINT_TRUNCATE = 3; + +const int SQLITE_CONFIG_COVERING_INDEX_SCAN = 20; + +const int SQLITE_CONFIG_GETMALLOC = 5; + +const int SQLITE_CONFIG_GETMUTEX = 11; + +const int SQLITE_CONFIG_GETPCACHE = 15; + +const int SQLITE_CONFIG_GETPCACHE2 = 19; + +const int SQLITE_CONFIG_HEAP = 8; + +const int SQLITE_CONFIG_LOG = 16; + +const int SQLITE_CONFIG_LOOKASIDE = 13; + +const int SQLITE_CONFIG_MALLOC = 4; + +const int SQLITE_CONFIG_MEMDB_MAXSIZE = 29; + +const int SQLITE_CONFIG_MEMSTATUS = 9; + +const int SQLITE_CONFIG_MMAP_SIZE = 22; + +const int SQLITE_CONFIG_MULTITHREAD = 2; + +const int SQLITE_CONFIG_MUTEX = 10; + +const int SQLITE_CONFIG_PAGECACHE = 7; + +const int SQLITE_CONFIG_PCACHE = 14; + +const int SQLITE_CONFIG_PCACHE2 = 18; + +const int SQLITE_CONFIG_PCACHE_HDRSZ = 24; + +const int SQLITE_CONFIG_PMASZ = 25; + +const int SQLITE_CONFIG_SCRATCH = 6; + +const int SQLITE_CONFIG_SERIALIZED = 3; + +const int SQLITE_CONFIG_SINGLETHREAD = 1; + +const int SQLITE_CONFIG_SMALL_MALLOC = 27; + +const int SQLITE_CONFIG_SORTERREF_SIZE = 28; + +const int SQLITE_CONFIG_SQLLOG = 21; + +const int SQLITE_CONFIG_STMTJRNL_SPILL = 26; + +const int SQLITE_CONFIG_URI = 17; + +const int SQLITE_CONFIG_WIN32_HEAPSIZE = 23; + +const int SQLITE_CONSTRAINT = 19; + +const int SQLITE_CONSTRAINT_CHECK = 275; + +const int SQLITE_CONSTRAINT_COMMITHOOK = 531; + +const int SQLITE_CONSTRAINT_FOREIGNKEY = 787; + +const int SQLITE_CONSTRAINT_FUNCTION = 1043; + +const int SQLITE_CONSTRAINT_NOTNULL = 1299; + +const int SQLITE_CONSTRAINT_PINNED = 2835; + +const int SQLITE_CONSTRAINT_PRIMARYKEY = 1555; + +const int SQLITE_CONSTRAINT_ROWID = 2579; + +const int SQLITE_CONSTRAINT_TRIGGER = 1811; + +const int SQLITE_CONSTRAINT_UNIQUE = 2067; + +const int SQLITE_CONSTRAINT_VTAB = 2323; + +const int SQLITE_COPY = 0; + +const int SQLITE_CORRUPT = 11; + +const int SQLITE_CORRUPT_INDEX = 779; + +const int SQLITE_CORRUPT_SEQUENCE = 523; + +const int SQLITE_CORRUPT_VTAB = 267; + +const int SQLITE_CREATE_INDEX = 1; + +const int SQLITE_CREATE_TABLE = 2; + +const int SQLITE_CREATE_TEMP_INDEX = 3; + +const int SQLITE_CREATE_TEMP_TABLE = 4; + +const int SQLITE_CREATE_TEMP_TRIGGER = 5; + +const int SQLITE_CREATE_TEMP_VIEW = 6; + +const int SQLITE_CREATE_TRIGGER = 7; + +const int SQLITE_CREATE_VIEW = 8; + +const int SQLITE_CREATE_VTABLE = 29; + +const int SQLITE_DBCONFIG_DEFENSIVE = 1010; + +const int SQLITE_DBCONFIG_DQS_DDL = 1014; + +const int SQLITE_DBCONFIG_DQS_DML = 1013; + +const int SQLITE_DBCONFIG_ENABLE_FKEY = 1002; + +const int SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER = 1004; + +const int SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION = 1005; + +const int SQLITE_DBCONFIG_ENABLE_QPSG = 1007; + +const int SQLITE_DBCONFIG_ENABLE_TRIGGER = 1003; + +const int SQLITE_DBCONFIG_ENABLE_VIEW = 1015; + +const int SQLITE_DBCONFIG_LEGACY_ALTER_TABLE = 1012; + +const int SQLITE_DBCONFIG_LEGACY_FILE_FORMAT = 1016; + +const int SQLITE_DBCONFIG_LOOKASIDE = 1001; + +const int SQLITE_DBCONFIG_MAINDBNAME = 1000; + +const int SQLITE_DBCONFIG_MAX = 1017; + +const int SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE = 1006; + +const int SQLITE_DBCONFIG_RESET_DATABASE = 1009; + +const int SQLITE_DBCONFIG_TRIGGER_EQP = 1008; + +const int SQLITE_DBCONFIG_TRUSTED_SCHEMA = 1017; + +const int SQLITE_DBCONFIG_WRITABLE_SCHEMA = 1011; + +const int SQLITE_DBSTATUS_CACHE_HIT = 7; + +const int SQLITE_DBSTATUS_CACHE_MISS = 8; + +const int SQLITE_DBSTATUS_CACHE_SPILL = 12; + +const int SQLITE_DBSTATUS_CACHE_USED = 1; + +const int SQLITE_DBSTATUS_CACHE_USED_SHARED = 11; + +const int SQLITE_DBSTATUS_CACHE_WRITE = 9; + +const int SQLITE_DBSTATUS_DEFERRED_FKS = 10; + +const int SQLITE_DBSTATUS_LOOKASIDE_HIT = 4; + +const int SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL = 6; + +const int SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE = 5; + +const int SQLITE_DBSTATUS_LOOKASIDE_USED = 0; + +const int SQLITE_DBSTATUS_MAX = 12; + +const int SQLITE_DBSTATUS_SCHEMA_USED = 2; + +const int SQLITE_DBSTATUS_STMT_USED = 3; + +const int SQLITE_DELETE = 9; + +const int SQLITE_DENY = 1; + +const int SQLITE_DESERIALIZE_FREEONCLOSE = 1; + +const int SQLITE_DESERIALIZE_READONLY = 4; + +const int SQLITE_DESERIALIZE_RESIZEABLE = 2; + +const int SQLITE_DETACH = 25; + +const int SQLITE_DETERMINISTIC = 2048; + +const int SQLITE_DIRECTONLY = 524288; + +const int SQLITE_DONE = 101; + +const int SQLITE_DROP_INDEX = 10; + +const int SQLITE_DROP_TABLE = 11; + +const int SQLITE_DROP_TEMP_INDEX = 12; + +const int SQLITE_DROP_TEMP_TABLE = 13; + +const int SQLITE_DROP_TEMP_TRIGGER = 14; + +const int SQLITE_DROP_TEMP_VIEW = 15; + +const int SQLITE_DROP_TRIGGER = 16; + +const int SQLITE_DROP_VIEW = 17; + +const int SQLITE_DROP_VTABLE = 30; + +const int SQLITE_EMPTY = 16; + +const int SQLITE_ERROR = 1; + +const int SQLITE_ERROR_MISSING_COLLSEQ = 257; + +const int SQLITE_ERROR_RETRY = 513; + +const int SQLITE_ERROR_SNAPSHOT = 769; + +const int SQLITE_FAIL = 3; + +const int SQLITE_FCNTL_BEGIN_ATOMIC_WRITE = 31; + +const int SQLITE_FCNTL_BUSYHANDLER = 15; + +const int SQLITE_FCNTL_CHUNK_SIZE = 6; + +const int SQLITE_FCNTL_CKPT_DONE = 37; + +const int SQLITE_FCNTL_CKPT_START = 39; + +const int SQLITE_FCNTL_COMMIT_ATOMIC_WRITE = 32; + +const int SQLITE_FCNTL_COMMIT_PHASETWO = 22; + +const int SQLITE_FCNTL_DATA_VERSION = 35; + +const int SQLITE_FCNTL_FILE_POINTER = 7; + +const int SQLITE_FCNTL_GET_LOCKPROXYFILE = 2; + +const int SQLITE_FCNTL_HAS_MOVED = 20; + +const int SQLITE_FCNTL_JOURNAL_POINTER = 28; + +const int SQLITE_FCNTL_LAST_ERRNO = 4; + +const int SQLITE_FCNTL_LOCKSTATE = 1; + +const int SQLITE_FCNTL_LOCK_TIMEOUT = 34; + +const int SQLITE_FCNTL_MMAP_SIZE = 18; + +const int SQLITE_FCNTL_OVERWRITE = 11; + +const int SQLITE_FCNTL_PDB = 30; + +const int SQLITE_FCNTL_PERSIST_WAL = 10; + +const int SQLITE_FCNTL_POWERSAFE_OVERWRITE = 13; + +const int SQLITE_FCNTL_PRAGMA = 14; + +const int SQLITE_FCNTL_RBU = 26; + +const int SQLITE_FCNTL_RESERVE_BYTES = 38; + +const int SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE = 33; + +const int SQLITE_FCNTL_SET_LOCKPROXYFILE = 3; + +const int SQLITE_FCNTL_SIZE_HINT = 5; + +const int SQLITE_FCNTL_SIZE_LIMIT = 36; + +const int SQLITE_FCNTL_SYNC = 21; + +const int SQLITE_FCNTL_SYNC_OMITTED = 8; + +const int SQLITE_FCNTL_TEMPFILENAME = 16; + +const int SQLITE_FCNTL_TRACE = 19; + +const int SQLITE_FCNTL_VFSNAME = 12; + +const int SQLITE_FCNTL_VFS_POINTER = 27; + +const int SQLITE_FCNTL_WAL_BLOCK = 24; + +const int SQLITE_FCNTL_WIN32_AV_RETRY = 9; + +const int SQLITE_FCNTL_WIN32_GET_HANDLE = 29; + +const int SQLITE_FCNTL_WIN32_SET_HANDLE = 23; + +const int SQLITE_FCNTL_ZIPVFS = 25; + +const int SQLITE_FLOAT = 2; + +const int SQLITE_FORMAT = 24; + +const int SQLITE_FULL = 13; + +const int SQLITE_FUNCTION = 31; + +const int SQLITE_GET_LOCKPROXYFILE = 2; + +const int SQLITE_IGNORE = 2; + +const int SQLITE_INDEX_CONSTRAINT_EQ = 2; + +const int SQLITE_INDEX_CONSTRAINT_FUNCTION = 150; + +const int SQLITE_INDEX_CONSTRAINT_GE = 32; + +const int SQLITE_INDEX_CONSTRAINT_GLOB = 66; + +const int SQLITE_INDEX_CONSTRAINT_GT = 4; + +const int SQLITE_INDEX_CONSTRAINT_IS = 72; + +const int SQLITE_INDEX_CONSTRAINT_ISNOT = 69; + +const int SQLITE_INDEX_CONSTRAINT_ISNOTNULL = 70; + +const int SQLITE_INDEX_CONSTRAINT_ISNULL = 71; + +const int SQLITE_INDEX_CONSTRAINT_LE = 8; + +const int SQLITE_INDEX_CONSTRAINT_LIKE = 65; + +const int SQLITE_INDEX_CONSTRAINT_LT = 16; + +const int SQLITE_INDEX_CONSTRAINT_MATCH = 64; + +const int SQLITE_INDEX_CONSTRAINT_NE = 68; + +const int SQLITE_INDEX_CONSTRAINT_REGEXP = 67; + +const int SQLITE_INDEX_SCAN_UNIQUE = 1; + +const int SQLITE_INNOCUOUS = 2097152; + +const int SQLITE_INSERT = 18; + +const int SQLITE_INTEGER = 1; + +const int SQLITE_INTERNAL = 2; + +const int SQLITE_INTERRUPT = 9; + +const int SQLITE_IOCAP_ATOMIC = 1; + +const int SQLITE_IOCAP_ATOMIC16K = 64; + +const int SQLITE_IOCAP_ATOMIC1K = 4; + +const int SQLITE_IOCAP_ATOMIC2K = 8; + +const int SQLITE_IOCAP_ATOMIC32K = 128; + +const int SQLITE_IOCAP_ATOMIC4K = 16; + +const int SQLITE_IOCAP_ATOMIC512 = 2; + +const int SQLITE_IOCAP_ATOMIC64K = 256; + +const int SQLITE_IOCAP_ATOMIC8K = 32; + +const int SQLITE_IOCAP_BATCH_ATOMIC = 16384; + +const int SQLITE_IOCAP_IMMUTABLE = 8192; + +const int SQLITE_IOCAP_POWERSAFE_OVERWRITE = 4096; + +const int SQLITE_IOCAP_SAFE_APPEND = 512; + +const int SQLITE_IOCAP_SEQUENTIAL = 1024; + +const int SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN = 2048; + +const int SQLITE_IOERR = 10; + +const int SQLITE_IOERR_ACCESS = 3338; + +const int SQLITE_IOERR_AUTH = 7178; + +const int SQLITE_IOERR_BEGIN_ATOMIC = 7434; + +const int SQLITE_IOERR_BLOCKED = 2826; + +const int SQLITE_IOERR_CHECKRESERVEDLOCK = 3594; + +const int SQLITE_IOERR_CLOSE = 4106; + +const int SQLITE_IOERR_COMMIT_ATOMIC = 7690; + +const int SQLITE_IOERR_CONVPATH = 6666; + +const int SQLITE_IOERR_DATA = 8202; + +const int SQLITE_IOERR_DELETE = 2570; + +const int SQLITE_IOERR_DELETE_NOENT = 5898; + +const int SQLITE_IOERR_DIR_CLOSE = 4362; + +const int SQLITE_IOERR_DIR_FSYNC = 1290; + +const int SQLITE_IOERR_FSTAT = 1802; + +const int SQLITE_IOERR_FSYNC = 1034; + +const int SQLITE_IOERR_GETTEMPPATH = 6410; + +const int SQLITE_IOERR_LOCK = 3850; + +const int SQLITE_IOERR_MMAP = 6154; + +const int SQLITE_IOERR_NOMEM = 3082; + +const int SQLITE_IOERR_RDLOCK = 2314; + +const int SQLITE_IOERR_READ = 266; + +const int SQLITE_IOERR_ROLLBACK_ATOMIC = 7946; + +const int SQLITE_IOERR_SEEK = 5642; + +const int SQLITE_IOERR_SHMLOCK = 5130; + +const int SQLITE_IOERR_SHMMAP = 5386; + +const int SQLITE_IOERR_SHMOPEN = 4618; + +const int SQLITE_IOERR_SHMSIZE = 4874; + +const int SQLITE_IOERR_SHORT_READ = 522; + +const int SQLITE_IOERR_TRUNCATE = 1546; + +const int SQLITE_IOERR_UNLOCK = 2058; + +const int SQLITE_IOERR_VNODE = 6922; + +const int SQLITE_IOERR_WRITE = 778; + +const int SQLITE_LAST_ERRNO = 4; + +const int SQLITE_LIMIT_ATTACHED = 7; + +const int SQLITE_LIMIT_COLUMN = 2; + +const int SQLITE_LIMIT_COMPOUND_SELECT = 4; + +const int SQLITE_LIMIT_EXPR_DEPTH = 3; + +const int SQLITE_LIMIT_FUNCTION_ARG = 6; + +const int SQLITE_LIMIT_LENGTH = 0; + +const int SQLITE_LIMIT_LIKE_PATTERN_LENGTH = 8; + +const int SQLITE_LIMIT_SQL_LENGTH = 1; + +const int SQLITE_LIMIT_TRIGGER_DEPTH = 10; + +const int SQLITE_LIMIT_VARIABLE_NUMBER = 9; + +const int SQLITE_LIMIT_VDBE_OP = 5; + +const int SQLITE_LIMIT_WORKER_THREADS = 11; + +const int SQLITE_LOCKED = 6; + +const int SQLITE_LOCKED_SHAREDCACHE = 262; + +const int SQLITE_LOCKED_VTAB = 518; + +const int SQLITE_LOCK_EXCLUSIVE = 4; + +const int SQLITE_LOCK_NONE = 0; + +const int SQLITE_LOCK_PENDING = 3; + +const int SQLITE_LOCK_RESERVED = 2; + +const int SQLITE_LOCK_SHARED = 1; + +const int SQLITE_MISMATCH = 20; + +const int SQLITE_MISUSE = 21; + +const int SQLITE_MUTEX_FAST = 0; + +const int SQLITE_MUTEX_RECURSIVE = 1; + +const int SQLITE_MUTEX_STATIC_APP1 = 8; + +const int SQLITE_MUTEX_STATIC_APP2 = 9; + +const int SQLITE_MUTEX_STATIC_APP3 = 10; + +const int SQLITE_MUTEX_STATIC_LRU = 6; + +const int SQLITE_MUTEX_STATIC_LRU2 = 7; + +const int SQLITE_MUTEX_STATIC_MASTER = 2; + +const int SQLITE_MUTEX_STATIC_MEM = 3; + +const int SQLITE_MUTEX_STATIC_MEM2 = 4; + +const int SQLITE_MUTEX_STATIC_OPEN = 4; + +const int SQLITE_MUTEX_STATIC_PMEM = 7; + +const int SQLITE_MUTEX_STATIC_PRNG = 5; + +const int SQLITE_MUTEX_STATIC_VFS1 = 11; + +const int SQLITE_MUTEX_STATIC_VFS2 = 12; + +const int SQLITE_MUTEX_STATIC_VFS3 = 13; + +const int SQLITE_NOLFS = 22; + +const int SQLITE_NOMEM = 7; + +const int SQLITE_NOTADB = 26; + +const int SQLITE_NOTFOUND = 12; + +const int SQLITE_NOTICE = 27; + +const int SQLITE_NOTICE_RECOVER_ROLLBACK = 539; + +const int SQLITE_NOTICE_RECOVER_WAL = 283; + +const int SQLITE_NULL = 5; + +const int SQLITE_OK = 0; + +const int SQLITE_OK_LOAD_PERMANENTLY = 256; + +const int SQLITE_OK_SYMLINK = 512; + +const int SQLITE_OPEN_AUTOPROXY = 32; + +const int SQLITE_OPEN_CREATE = 4; + +const int SQLITE_OPEN_DELETEONCLOSE = 8; + +const int SQLITE_OPEN_EXCLUSIVE = 16; + +const int SQLITE_OPEN_FULLMUTEX = 65536; + +const int SQLITE_OPEN_MAIN_DB = 256; + +const int SQLITE_OPEN_MAIN_JOURNAL = 2048; + +const int SQLITE_OPEN_MASTER_JOURNAL = 16384; + +const int SQLITE_OPEN_MEMORY = 128; + +const int SQLITE_OPEN_NOFOLLOW = 16777216; + +const int SQLITE_OPEN_NOMUTEX = 32768; + +const int SQLITE_OPEN_PRIVATECACHE = 262144; + +const int SQLITE_OPEN_READONLY = 1; + +const int SQLITE_OPEN_READWRITE = 2; + +const int SQLITE_OPEN_SHAREDCACHE = 131072; + +const int SQLITE_OPEN_SUBJOURNAL = 8192; + +const int SQLITE_OPEN_TEMP_DB = 512; + +const int SQLITE_OPEN_TEMP_JOURNAL = 4096; + +const int SQLITE_OPEN_TRANSIENT_DB = 1024; + +const int SQLITE_OPEN_URI = 64; + +const int SQLITE_OPEN_WAL = 524288; + +const int SQLITE_PERM = 3; + +const int SQLITE_PRAGMA = 19; + +const int SQLITE_PREPARE_NORMALIZE = 2; + +const int SQLITE_PREPARE_NO_VTAB = 4; + +const int SQLITE_PREPARE_PERSISTENT = 1; + +const int SQLITE_PROTOCOL = 15; + +const int SQLITE_RANGE = 25; + +const int SQLITE_READ = 20; + +const int SQLITE_READONLY = 8; + +const int SQLITE_READONLY_CANTINIT = 1288; + +const int SQLITE_READONLY_CANTLOCK = 520; + +const int SQLITE_READONLY_DBMOVED = 1032; + +const int SQLITE_READONLY_DIRECTORY = 1544; + +const int SQLITE_READONLY_RECOVERY = 264; + +const int SQLITE_READONLY_ROLLBACK = 776; + +const int SQLITE_RECURSIVE = 33; + +const int SQLITE_REINDEX = 27; + +const int SQLITE_REPLACE = 5; + +const int SQLITE_ROLLBACK = 1; + +const int SQLITE_ROW = 100; + +const int SQLITE_SAVEPOINT = 32; + +const int SQLITE_SCANSTAT_EST = 2; + +const int SQLITE_SCANSTAT_EXPLAIN = 4; + +const int SQLITE_SCANSTAT_NAME = 3; + +const int SQLITE_SCANSTAT_NLOOP = 0; + +const int SQLITE_SCANSTAT_NVISIT = 1; + +const int SQLITE_SCANSTAT_SELECTID = 5; + +const int SQLITE_SCHEMA = 17; + +const int SQLITE_SELECT = 21; + +const int SQLITE_SERIALIZE_NOCOPY = 1; + +const int SQLITE_SET_LOCKPROXYFILE = 3; + +const int SQLITE_SHM_EXCLUSIVE = 8; + +const int SQLITE_SHM_LOCK = 2; + +const int SQLITE_SHM_NLOCK = 8; + +const int SQLITE_SHM_SHARED = 4; + +const int SQLITE_SHM_UNLOCK = 1; + +const String SQLITE_SOURCE_ID = + '2020-06-18 14:00:33 7ebdfa80be8e8e73324b8d66b3460222eb74c7e9dfd655b48d6ca7e1933cc8fd'; + +const int SQLITE_STATUS_MALLOC_COUNT = 9; + +const int SQLITE_STATUS_MALLOC_SIZE = 5; + +const int SQLITE_STATUS_MEMORY_USED = 0; + +const int SQLITE_STATUS_PAGECACHE_OVERFLOW = 2; + +const int SQLITE_STATUS_PAGECACHE_SIZE = 7; + +const int SQLITE_STATUS_PAGECACHE_USED = 1; + +const int SQLITE_STATUS_PARSER_STACK = 6; + +const int SQLITE_STATUS_SCRATCH_OVERFLOW = 4; + +const int SQLITE_STATUS_SCRATCH_SIZE = 8; + +const int SQLITE_STATUS_SCRATCH_USED = 3; + +const int SQLITE_STMTSTATUS_AUTOINDEX = 3; + +const int SQLITE_STMTSTATUS_FULLSCAN_STEP = 1; + +const int SQLITE_STMTSTATUS_MEMUSED = 99; + +const int SQLITE_STMTSTATUS_REPREPARE = 5; + +const int SQLITE_STMTSTATUS_RUN = 6; + +const int SQLITE_STMTSTATUS_SORT = 2; + +const int SQLITE_STMTSTATUS_VM_STEP = 4; + +const int SQLITE_SUBTYPE = 1048576; + +const int SQLITE_SYNC_DATAONLY = 16; + +const int SQLITE_SYNC_FULL = 3; + +const int SQLITE_SYNC_NORMAL = 2; + +const int SQLITE_TESTCTRL_ALWAYS = 13; + +const int SQLITE_TESTCTRL_ASSERT = 12; + +const int SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS = 10; + +const int SQLITE_TESTCTRL_BITVEC_TEST = 8; + +const int SQLITE_TESTCTRL_BYTEORDER = 22; + +const int SQLITE_TESTCTRL_EXPLAIN_STMT = 19; + +const int SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS = 29; + +const int SQLITE_TESTCTRL_FAULT_INSTALL = 9; + +const int SQLITE_TESTCTRL_FIRST = 5; + +const int SQLITE_TESTCTRL_IMPOSTER = 25; + +const int SQLITE_TESTCTRL_INTERNAL_FUNCTIONS = 17; + +const int SQLITE_TESTCTRL_ISINIT = 23; + +const int SQLITE_TESTCTRL_ISKEYWORD = 16; + +const int SQLITE_TESTCTRL_LAST = 29; + +const int SQLITE_TESTCTRL_LOCALTIME_FAULT = 18; + +const int SQLITE_TESTCTRL_NEVER_CORRUPT = 20; + +const int SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD = 19; + +const int SQLITE_TESTCTRL_OPTIMIZATIONS = 15; + +const int SQLITE_TESTCTRL_PARSER_COVERAGE = 26; + +const int SQLITE_TESTCTRL_PENDING_BYTE = 11; + +const int SQLITE_TESTCTRL_PRNG_RESET = 7; + +const int SQLITE_TESTCTRL_PRNG_RESTORE = 6; + +const int SQLITE_TESTCTRL_PRNG_SAVE = 5; + +const int SQLITE_TESTCTRL_PRNG_SEED = 28; + +const int SQLITE_TESTCTRL_RESERVE = 14; + +const int SQLITE_TESTCTRL_RESULT_INTREAL = 27; + +const int SQLITE_TESTCTRL_SCRATCHMALLOC = 17; + +const int SQLITE_TESTCTRL_SORTER_MMAP = 24; + +const int SQLITE_TESTCTRL_VDBE_COVERAGE = 21; + +const int SQLITE_TEXT = 3; + +const int SQLITE_TOOBIG = 18; + +const int SQLITE_TRACE_CLOSE = 8; + +const int SQLITE_TRACE_PROFILE = 2; + +const int SQLITE_TRACE_ROW = 4; + +const int SQLITE_TRACE_STMT = 1; + +const int SQLITE_TRANSACTION = 22; + +const int SQLITE_UPDATE = 23; + +const int SQLITE_UTF16 = 4; + +const int SQLITE_UTF16BE = 3; + +const int SQLITE_UTF16LE = 2; + +const int SQLITE_UTF16_ALIGNED = 8; + +const int SQLITE_UTF8 = 1; + +const String SQLITE_VERSION = '3.32.3'; + +const int SQLITE_VERSION_NUMBER = 3032003; + +const int SQLITE_VTAB_CONSTRAINT_SUPPORT = 1; + +const int SQLITE_VTAB_DIRECTONLY = 3; + +const int SQLITE_VTAB_INNOCUOUS = 2; + +const int SQLITE_WARNING = 28; + +const int SQLITE_WARNING_AUTOINDEX = 284; + +const int SQLITE_WIN32_DATA_DIRECTORY_TYPE = 1; + +const int SQLITE_WIN32_TEMP_DIRECTORY_TYPE = 2; + +final class fts5_api extends ffi.Struct { + /// Currently always set to 2 + @ffi.Int() + external int iVersion; + + /// Create a new tokenizer + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer pApi, + ffi.Pointer zName, + ffi.Pointer pContext, + ffi.Pointer pTokenizer, + ffi.Pointer< + ffi.NativeFunction)> + > + xDestroy, + ) + > + > + xCreateTokenizer; + + /// Find an existing tokenizer + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer pApi, + ffi.Pointer zName, + ffi.Pointer> ppContext, + ffi.Pointer pTokenizer, + ) + > + > + xFindTokenizer; + + /// Create a new auxiliary function + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer pApi, + ffi.Pointer zName, + ffi.Pointer pContext, + fts5_extension_function xFunction, + ffi.Pointer< + ffi.NativeFunction)> + > + xDestroy, + ) + > + > + xCreateFunction; + + static ffi.Pointer $allocate( + ffi.Allocator $allocator, { + required int iVersion, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer pApi, + ffi.Pointer zName, + ffi.Pointer pContext, + ffi.Pointer pTokenizer, + ffi.Pointer< + ffi.NativeFunction)> + > + xDestroy, + ) + > + > + xCreateTokenizer, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer pApi, + ffi.Pointer zName, + ffi.Pointer> ppContext, + ffi.Pointer pTokenizer, + ) + > + > + xFindTokenizer, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer pApi, + ffi.Pointer zName, + ffi.Pointer pContext, + fts5_extension_function xFunction, + ffi.Pointer< + ffi.NativeFunction)> + > + xDestroy, + ) + > + > + xCreateFunction, + }) => $allocator() + ..ref.iVersion = iVersion + ..ref.xCreateTokenizer = xCreateTokenizer + ..ref.xFindTokenizer = xFindTokenizer + ..ref.xCreateFunction = xCreateFunction; +} + +typedef fts5_extension_function = + ffi.Pointer>; +typedef fts5_extension_functionFunction = + ffi.Void Function( + ffi.Pointer pApi, + ffi.Pointer pFts, + ffi.Pointer pCtx, + ffi.Int nVal, + ffi.Pointer> apVal, + ); +typedef Dartfts5_extension_functionFunction = + void Function( + ffi.Pointer pApi, + ffi.Pointer pFts, + ffi.Pointer pCtx, + int nVal, + ffi.Pointer> apVal, + ); + +final class fts5_tokenizer extends ffi.Struct { + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer>, + ffi.Int, + ffi.Pointer>, + ) + > + > + xCreate; + + external ffi.Pointer< + ffi.NativeFunction)> + > + xDelete; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Int, + ffi.Int, + ffi.Int, + ) + > + >, + ) + > + > + xTokenize; + + static ffi.Pointer $allocate( + ffi.Allocator $allocator, { + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer>, + ffi.Int, + ffi.Pointer>, + ) + > + > + xCreate, + required ffi.Pointer< + ffi.NativeFunction)> + > + xDelete, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Int, + ffi.Int, + ffi.Int, + ) + > + >, + ) + > + > + xTokenize, + }) => $allocator() + ..ref.xCreate = xCreate + ..ref.xDelete = xDelete + ..ref.xTokenize = xTokenize; +} + +final class sqlite3 extends ffi.Opaque {} + +final class sqlite3_api_routines extends ffi.Opaque {} + +final class sqlite3_backup extends ffi.Opaque {} + +final class sqlite3_blob extends ffi.Opaque {} + +/// The type for a callback function. +/// This is legacy and deprecated. It is included for historical +/// compatibility and is not documented. +typedef sqlite3_callback = + ffi.Pointer>; +typedef sqlite3_callbackFunction = + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ffi.Pointer>, + ); +typedef Dartsqlite3_callbackFunction = + int Function( + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer>, + ); + +final class sqlite3_context extends ffi.Opaque {} + +/// CAPI3REF: Constants Defining Special Destructor Behavior +/// +/// These are special values for the destructor that is passed in as the +/// final argument to routines like [sqlite3_result_blob()]. ^If the destructor +/// argument is SQLITE_STATIC, it means that the content pointer is constant +/// and will never change. It does not need to be destroyed. ^The +/// SQLITE_TRANSIENT value means that the content will likely change in +/// the near future and that SQLite should make its own private copy of +/// the content before returning. +/// +/// The typedef is necessary to work around problems in certain +/// C++ compilers. +typedef sqlite3_destructor_type = + ffi.Pointer>; +typedef sqlite3_destructor_typeFunction = + ffi.Void Function(ffi.Pointer); +typedef Dartsqlite3_destructor_typeFunction = + void Function(ffi.Pointer); + +final class sqlite3_file extends ffi.Struct { + /// Methods for an open file + external ffi.Pointer pMethods; + + static ffi.Pointer $allocate( + ffi.Allocator $allocator, { + required ffi.Pointer pMethods, + }) => $allocator()..ref.pMethods = pMethods; +} + +final class sqlite3_index_constraint extends ffi.Struct { + /// Column constrained. -1 for ROWID + @ffi.Int() + external int iColumn; + + /// Constraint operator + @ffi.UnsignedChar() + external int op; + + /// True if this constraint is usable + @ffi.UnsignedChar() + external int usable; + + /// Used internally - xBestIndex should ignore + @ffi.Int() + external int iTermOffset; + + static ffi.Pointer $allocate( + ffi.Allocator $allocator, { + required int iColumn, + required int op, + required int usable, + required int iTermOffset, + }) => $allocator() + ..ref.iColumn = iColumn + ..ref.op = op + ..ref.usable = usable + ..ref.iTermOffset = iTermOffset; +} + +/// Outputs +final class sqlite3_index_constraint_usage extends ffi.Struct { + /// if >0, constraint is part of argv to xFilter + @ffi.Int() + external int argvIndex; + + /// Do not code a test for this constraint + @ffi.UnsignedChar() + external int omit; + + static ffi.Pointer $allocate( + ffi.Allocator $allocator, { + required int argvIndex, + required int omit, + }) => $allocator() + ..ref.argvIndex = argvIndex + ..ref.omit = omit; +} + +/// CAPI3REF: Virtual Table Indexing Information +/// KEYWORDS: sqlite3_index_info +/// +/// The sqlite3_index_info structure and its substructures is used as part +/// of the [virtual table] interface to +/// pass information into and receive the reply from the [xBestIndex] +/// method of a [virtual table module]. The fields under **Inputs** are the +/// inputs to xBestIndex and are read-only. xBestIndex inserts its +/// results into the **Outputs** fields. +/// +/// ^(The aConstraint[] array records WHERE clause constraints of the form: +/// +///
column OP expr
+/// +/// where OP is =, <, <=, >, or >=.)^ ^(The particular operator is +/// stored in aConstraint[].op using one of the +/// [SQLITE_INDEX_CONSTRAINT_EQ | SQLITE_INDEX_CONSTRAINT_ values].)^ +/// ^(The index of the column is stored in +/// aConstraint[].iColumn.)^ ^(aConstraint[].usable is TRUE if the +/// expr on the right-hand side can be evaluated (and thus the constraint +/// is usable) and false if it cannot.)^ +/// +/// ^The optimizer automatically inverts terms of the form "expr OP column" +/// and makes other simplifications to the WHERE clause in an attempt to +/// get as many WHERE clause terms into the form shown above as possible. +/// ^The aConstraint[] array only reports WHERE clause terms that are +/// relevant to the particular virtual table being queried. +/// +/// ^Information about the ORDER BY clause is stored in aOrderBy[]. +/// ^Each term of aOrderBy records a column of the ORDER BY clause. +/// +/// The colUsed field indicates which columns of the virtual table may be +/// required by the current scan. Virtual table columns are numbered from +/// zero in the order in which they appear within the CREATE TABLE statement +/// passed to sqlite3_declare_vtab(). For the first 63 columns (columns 0-62), +/// the corresponding bit is set within the colUsed mask if the column may be +/// required by SQLite. If the table has at least 64 columns and any column +/// to the right of the first 63 is required, then bit 63 of colUsed is also +/// set. In other words, column iCol may be required if the expression +/// (colUsed & ((sqlite3_uint64)1 << (iCol>=63 ? 63 : iCol))) evaluates to +/// non-zero. +/// +/// The [xBestIndex] method must fill aConstraintUsage[] with information +/// about what parameters to pass to xFilter. ^If argvIndex>0 then +/// the right-hand side of the corresponding aConstraint[] is evaluated +/// and becomes the argvIndex-th entry in argv. ^(If aConstraintUsage[].omit +/// is true, then the constraint is assumed to be fully handled by the +/// virtual table and might not be checked again by the byte code.)^ ^(The +/// aConstraintUsage[].omit flag is an optimization hint. When the omit flag +/// is left in its default setting of false, the constraint will always be +/// checked separately in byte code. If the omit flag is change to true, then +/// the constraint may or may not be checked in byte code. In other words, +/// when the omit flag is true there is no guarantee that the constraint will +/// not be checked again using byte code.)^ +/// +/// ^The idxNum and idxPtr values are recorded and passed into the +/// [xFilter] method. +/// ^[sqlite3_free()] is used to free idxPtr if and only if +/// needToFreeIdxPtr is true. +/// +/// ^The orderByConsumed means that output from [xFilter]/[xNext] will occur in +/// the correct order to satisfy the ORDER BY clause so that no separate +/// sorting step is required. +/// +/// ^The estimatedCost value is an estimate of the cost of a particular +/// strategy. A cost of N indicates that the cost of the strategy is similar +/// to a linear scan of an SQLite table with N rows. A cost of log(N) +/// indicates that the expense of the operation is similar to that of a +/// binary search on a unique indexed field of an SQLite table with N rows. +/// +/// ^The estimatedRows value is an estimate of the number of rows that +/// will be returned by the strategy. +/// +/// The xBestIndex method may optionally populate the idxFlags field with a +/// mask of SQLITE_INDEX_SCAN_* flags. Currently there is only one such flag - +/// SQLITE_INDEX_SCAN_UNIQUE. If the xBestIndex method sets this flag, SQLite +/// assumes that the strategy may visit at most one row. +/// +/// Additionally, if xBestIndex sets the SQLITE_INDEX_SCAN_UNIQUE flag, then +/// SQLite also assumes that if a call to the xUpdate() method is made as +/// part of the same statement to delete or update a virtual table row and the +/// implementation returns SQLITE_CONSTRAINT, then there is no need to rollback +/// any database changes. In other words, if the xUpdate() returns +/// SQLITE_CONSTRAINT, the database contents must be exactly as they were +/// before xUpdate was called. By contrast, if SQLITE_INDEX_SCAN_UNIQUE is not +/// set and xUpdate returns SQLITE_CONSTRAINT, any database changes made by +/// the xUpdate method are automatically rolled back by SQLite. +/// +/// IMPORTANT: The estimatedRows field was added to the sqlite3_index_info +/// structure for SQLite [version 3.8.2] ([dateof:3.8.2]). +/// If a virtual table extension is +/// used with an SQLite version earlier than 3.8.2, the results of attempting +/// to read or write the estimatedRows field are undefined (but are likely +/// to include crashing the application). The estimatedRows field should +/// therefore only be used if [sqlite3_libversion_number()] returns a +/// value greater than or equal to 3008002. Similarly, the idxFlags field +/// was added for [version 3.9.0] ([dateof:3.9.0]). +/// It may therefore only be used if +/// sqlite3_libversion_number() returns a value greater than or equal to +/// 3009000. +final class sqlite3_index_info extends ffi.Struct { + /// Number of entries in aConstraint + @ffi.Int() + external int nConstraint; + + /// Table of WHERE clause constraints + external ffi.Pointer aConstraint; + + /// Number of terms in the ORDER BY clause + @ffi.Int() + external int nOrderBy; + + /// The ORDER BY clause + external ffi.Pointer aOrderBy; + + external ffi.Pointer aConstraintUsage; + + /// Number used to identify the index + @ffi.Int() + external int idxNum; + + /// String, possibly obtained from sqlite3_malloc + external ffi.Pointer idxStr; + + /// Free idxStr using sqlite3_free() if true + @ffi.Int() + external int needToFreeIdxStr; + + /// True if output is already ordered + @ffi.Int() + external int orderByConsumed; + + /// Estimated cost of using this index + @ffi.Double() + external double estimatedCost; + + /// Estimated number of rows returned + @sqlite3_int64() + external int estimatedRows; + + /// Mask of SQLITE_INDEX_SCAN_* flags + @ffi.Int() + external int idxFlags; + + /// Input: Mask of columns used by statement + @sqlite3_uint64() + external int colUsed; + + static ffi.Pointer $allocate( + ffi.Allocator $allocator, { + required int nConstraint, + required ffi.Pointer aConstraint, + required int nOrderBy, + required ffi.Pointer aOrderBy, + required ffi.Pointer aConstraintUsage, + required int idxNum, + required ffi.Pointer idxStr, + required int needToFreeIdxStr, + required int orderByConsumed, + required double estimatedCost, + required int estimatedRows, + required int idxFlags, + required int colUsed, + }) => $allocator() + ..ref.nConstraint = nConstraint + ..ref.aConstraint = aConstraint + ..ref.nOrderBy = nOrderBy + ..ref.aOrderBy = aOrderBy + ..ref.aConstraintUsage = aConstraintUsage + ..ref.idxNum = idxNum + ..ref.idxStr = idxStr + ..ref.needToFreeIdxStr = needToFreeIdxStr + ..ref.orderByConsumed = orderByConsumed + ..ref.estimatedCost = estimatedCost + ..ref.estimatedRows = estimatedRows + ..ref.idxFlags = idxFlags + ..ref.colUsed = colUsed; +} + +final class sqlite3_index_orderby extends ffi.Struct { + /// Column number + @ffi.Int() + external int iColumn; + + /// True for DESC. False for ASC. + @ffi.UnsignedChar() + external int desc; + + static ffi.Pointer $allocate( + ffi.Allocator $allocator, { + required int iColumn, + required int desc, + }) => $allocator() + ..ref.iColumn = iColumn + ..ref.desc = desc; +} + +typedef sqlite3_int64 = sqlite_int64; + +final class sqlite3_io_methods extends ffi.Opaque {} + +final class sqlite3_mem_methods extends ffi.Struct { + /// Memory allocation function + external ffi.Pointer< + ffi.NativeFunction Function(ffi.Int)> + > + xMalloc; + + /// Free a prior allocation + external ffi.Pointer< + ffi.NativeFunction)> + > + xFree; + + /// Resize an allocation + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Int) + > + > + xRealloc; + + /// Return the size of an allocation + external ffi.Pointer< + ffi.NativeFunction)> + > + xSize; + + /// Round up request size to allocation size + external ffi.Pointer> xRoundup; + + /// Initialize the memory allocator + external ffi.Pointer< + ffi.NativeFunction)> + > + xInit; + + /// Deinitialize the memory allocator + external ffi.Pointer< + ffi.NativeFunction)> + > + xShutdown; + + /// Argument to xInit() and xShutdown() + external ffi.Pointer pAppData; + + static ffi.Pointer $allocate( + ffi.Allocator $allocator, { + required ffi.Pointer< + ffi.NativeFunction Function(ffi.Int)> + > + xMalloc, + required ffi.Pointer< + ffi.NativeFunction)> + > + xFree, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Int) + > + > + xRealloc, + required ffi.Pointer< + ffi.NativeFunction)> + > + xSize, + required ffi.Pointer> + xRoundup, + required ffi.Pointer< + ffi.NativeFunction)> + > + xInit, + required ffi.Pointer< + ffi.NativeFunction)> + > + xShutdown, + required ffi.Pointer pAppData, + }) => $allocator() + ..ref.xMalloc = xMalloc + ..ref.xFree = xFree + ..ref.xRealloc = xRealloc + ..ref.xSize = xSize + ..ref.xRoundup = xRoundup + ..ref.xInit = xInit + ..ref.xShutdown = xShutdown + ..ref.pAppData = pAppData; +} + +/// CAPI3REF: Virtual Table Object +/// KEYWORDS: sqlite3_module {virtual table module} +/// +/// This structure, sometimes called a "virtual table module", +/// defines the implementation of a [virtual table]. +/// This structure consists mostly of methods for the module. +/// +/// ^A virtual table module is created by filling in a persistent +/// instance of this structure and passing a pointer to that instance +/// to [sqlite3_create_module()] or [sqlite3_create_module_v2()]. +/// ^The registration remains valid until it is replaced by a different +/// module or until the [database connection] closes. The content +/// of this structure must not change while it is registered with +/// any database connection. +final class sqlite3_module extends ffi.Struct { + @ffi.Int() + external int iVersion; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ffi.Pointer>, + ffi.Pointer>, + ) + > + > + xCreate; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ffi.Pointer>, + ffi.Pointer>, + ) + > + > + xConnect; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ) + > + > + xBestIndex; + + external ffi.Pointer< + ffi.NativeFunction pVTab)> + > + xDisconnect; + + external ffi.Pointer< + ffi.NativeFunction pVTab)> + > + xDestroy; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer pVTab, + ffi.Pointer> ppCursor, + ) + > + > + xOpen; + + external ffi.Pointer< + ffi.NativeFunction)> + > + xClose; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ) + > + > + xFilter; + + external ffi.Pointer< + ffi.NativeFunction)> + > + xNext; + + external ffi.Pointer< + ffi.NativeFunction)> + > + xEof; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ) + > + > + xColumn; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ) + > + > + xRowid; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ffi.Pointer, + ) + > + > + xUpdate; + + external ffi.Pointer< + ffi.NativeFunction pVTab)> + > + xBegin; + + external ffi.Pointer< + ffi.NativeFunction pVTab)> + > + xSync; + + external ffi.Pointer< + ffi.NativeFunction pVTab)> + > + xCommit; + + external ffi.Pointer< + ffi.NativeFunction pVTab)> + > + xRollback; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer pVtab, + ffi.Int nArg, + ffi.Pointer zName, + ffi.Pointer< + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ) + > + > + > + pxFunc, + ffi.Pointer> ppArg, + ) + > + > + xFindFunction; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer pVtab, + ffi.Pointer zNew, + ) + > + > + xRename; + + /// The methods above are in version 1 of the sqlite_module object. Those + /// below are for version 2 and greater. + external ffi.Pointer< + ffi.NativeFunction, ffi.Int)> + > + xSavepoint; + + external ffi.Pointer< + ffi.NativeFunction, ffi.Int)> + > + xRelease; + + external ffi.Pointer< + ffi.NativeFunction, ffi.Int)> + > + xRollbackTo; + + /// The methods above are in versions 1 and 2 of the sqlite_module object. + /// Those below are for version 3 and greater. + external ffi.Pointer< + ffi.NativeFunction)> + > + xShadowName; + + static ffi.Pointer $allocate( + ffi.Allocator $allocator, { + required int iVersion, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ffi.Pointer>, + ffi.Pointer>, + ) + > + > + xCreate, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ffi.Pointer>, + ffi.Pointer>, + ) + > + > + xConnect, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ) + > + > + xBestIndex, + required ffi.Pointer< + ffi.NativeFunction pVTab)> + > + xDisconnect, + required ffi.Pointer< + ffi.NativeFunction pVTab)> + > + xDestroy, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer pVTab, + ffi.Pointer> ppCursor, + ) + > + > + xOpen, + required ffi.Pointer< + ffi.NativeFunction)> + > + xClose, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ) + > + > + xFilter, + required ffi.Pointer< + ffi.NativeFunction)> + > + xNext, + required ffi.Pointer< + ffi.NativeFunction)> + > + xEof, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ) + > + > + xColumn, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ) + > + > + xRowid, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ffi.Pointer, + ) + > + > + xUpdate, + required ffi.Pointer< + ffi.NativeFunction pVTab)> + > + xBegin, + required ffi.Pointer< + ffi.NativeFunction pVTab)> + > + xSync, + required ffi.Pointer< + ffi.NativeFunction pVTab)> + > + xCommit, + required ffi.Pointer< + ffi.NativeFunction pVTab)> + > + xRollback, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer pVtab, + ffi.Int nArg, + ffi.Pointer zName, + ffi.Pointer< + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ) + > + > + > + pxFunc, + ffi.Pointer> ppArg, + ) + > + > + xFindFunction, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer pVtab, + ffi.Pointer zNew, + ) + > + > + xRename, + required ffi.Pointer< + ffi.NativeFunction, ffi.Int)> + > + xSavepoint, + required ffi.Pointer< + ffi.NativeFunction, ffi.Int)> + > + xRelease, + required ffi.Pointer< + ffi.NativeFunction, ffi.Int)> + > + xRollbackTo, + required ffi.Pointer< + ffi.NativeFunction)> + > + xShadowName, + }) => $allocator() + ..ref.iVersion = iVersion + ..ref.xCreate = xCreate + ..ref.xConnect = xConnect + ..ref.xBestIndex = xBestIndex + ..ref.xDisconnect = xDisconnect + ..ref.xDestroy = xDestroy + ..ref.xOpen = xOpen + ..ref.xClose = xClose + ..ref.xFilter = xFilter + ..ref.xNext = xNext + ..ref.xEof = xEof + ..ref.xColumn = xColumn + ..ref.xRowid = xRowid + ..ref.xUpdate = xUpdate + ..ref.xBegin = xBegin + ..ref.xSync = xSync + ..ref.xCommit = xCommit + ..ref.xRollback = xRollback + ..ref.xFindFunction = xFindFunction + ..ref.xRename = xRename + ..ref.xSavepoint = xSavepoint + ..ref.xRelease = xRelease + ..ref.xRollbackTo = xRollbackTo + ..ref.xShadowName = xShadowName; +} + +final class sqlite3_mutex extends ffi.Opaque {} + +final class sqlite3_mutex_methods extends ffi.Struct { + external ffi.Pointer> xMutexInit; + + external ffi.Pointer> xMutexEnd; + + external ffi.Pointer< + ffi.NativeFunction Function(ffi.Int)> + > + xMutexAlloc; + + external ffi.Pointer< + ffi.NativeFunction)> + > + xMutexFree; + + external ffi.Pointer< + ffi.NativeFunction)> + > + xMutexEnter; + + external ffi.Pointer< + ffi.NativeFunction)> + > + xMutexTry; + + external ffi.Pointer< + ffi.NativeFunction)> + > + xMutexLeave; + + external ffi.Pointer< + ffi.NativeFunction)> + > + xMutexHeld; + + external ffi.Pointer< + ffi.NativeFunction)> + > + xMutexNotheld; + + static ffi.Pointer $allocate( + ffi.Allocator $allocator, { + required ffi.Pointer> xMutexInit, + required ffi.Pointer> xMutexEnd, + required ffi.Pointer< + ffi.NativeFunction Function(ffi.Int)> + > + xMutexAlloc, + required ffi.Pointer< + ffi.NativeFunction)> + > + xMutexFree, + required ffi.Pointer< + ffi.NativeFunction)> + > + xMutexEnter, + required ffi.Pointer< + ffi.NativeFunction)> + > + xMutexTry, + required ffi.Pointer< + ffi.NativeFunction)> + > + xMutexLeave, + required ffi.Pointer< + ffi.NativeFunction)> + > + xMutexHeld, + required ffi.Pointer< + ffi.NativeFunction)> + > + xMutexNotheld, + }) => $allocator() + ..ref.xMutexInit = xMutexInit + ..ref.xMutexEnd = xMutexEnd + ..ref.xMutexAlloc = xMutexAlloc + ..ref.xMutexFree = xMutexFree + ..ref.xMutexEnter = xMutexEnter + ..ref.xMutexTry = xMutexTry + ..ref.xMutexLeave = xMutexLeave + ..ref.xMutexHeld = xMutexHeld + ..ref.xMutexNotheld = xMutexNotheld; +} + +final class sqlite3_pcache extends ffi.Opaque {} + +final class sqlite3_pcache_methods extends ffi.Struct { + external ffi.Pointer pArg; + + external ffi.Pointer< + ffi.NativeFunction)> + > + xInit; + + external ffi.Pointer< + ffi.NativeFunction)> + > + xShutdown; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Int szPage, ffi.Int bPurgeable) + > + > + xCreate; + + external ffi.Pointer< + ffi.NativeFunction, ffi.Int)> + > + xCachesize; + + external ffi.Pointer< + ffi.NativeFunction)> + > + xPagecount; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.UnsignedInt, + ffi.Int, + ) + > + > + xFetch; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ) + > + > + xUnpin; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ) + > + > + xRekey; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.UnsignedInt) + > + > + xTruncate; + + external ffi.Pointer< + ffi.NativeFunction)> + > + xDestroy; + + static ffi.Pointer $allocate( + ffi.Allocator $allocator, { + required ffi.Pointer pArg, + required ffi.Pointer< + ffi.NativeFunction)> + > + xInit, + required ffi.Pointer< + ffi.NativeFunction)> + > + xShutdown, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Int szPage, ffi.Int bPurgeable) + > + > + xCreate, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Int) + > + > + xCachesize, + required ffi.Pointer< + ffi.NativeFunction)> + > + xPagecount, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.UnsignedInt, + ffi.Int, + ) + > + > + xFetch, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ) + > + > + xUnpin, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ) + > + > + xRekey, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.UnsignedInt) + > + > + xTruncate, + required ffi.Pointer< + ffi.NativeFunction)> + > + xDestroy, + }) => $allocator() + ..ref.pArg = pArg + ..ref.xInit = xInit + ..ref.xShutdown = xShutdown + ..ref.xCreate = xCreate + ..ref.xCachesize = xCachesize + ..ref.xPagecount = xPagecount + ..ref.xFetch = xFetch + ..ref.xUnpin = xUnpin + ..ref.xRekey = xRekey + ..ref.xTruncate = xTruncate + ..ref.xDestroy = xDestroy; +} + +final class sqlite3_pcache_methods2 extends ffi.Struct { + @ffi.Int() + external int iVersion; + + external ffi.Pointer pArg; + + external ffi.Pointer< + ffi.NativeFunction)> + > + xInit; + + external ffi.Pointer< + ffi.NativeFunction)> + > + xShutdown; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Int szPage, + ffi.Int szExtra, + ffi.Int bPurgeable, + ) + > + > + xCreate; + + external ffi.Pointer< + ffi.NativeFunction, ffi.Int)> + > + xCachesize; + + external ffi.Pointer< + ffi.NativeFunction)> + > + xPagecount; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.UnsignedInt, + ffi.Int, + ) + > + > + xFetch; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ) + > + > + xUnpin; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ) + > + > + xRekey; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.UnsignedInt) + > + > + xTruncate; + + external ffi.Pointer< + ffi.NativeFunction)> + > + xDestroy; + + external ffi.Pointer< + ffi.NativeFunction)> + > + xShrink; + + static ffi.Pointer $allocate( + ffi.Allocator $allocator, { + required int iVersion, + required ffi.Pointer pArg, + required ffi.Pointer< + ffi.NativeFunction)> + > + xInit, + required ffi.Pointer< + ffi.NativeFunction)> + > + xShutdown, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Int szPage, + ffi.Int szExtra, + ffi.Int bPurgeable, + ) + > + > + xCreate, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Int) + > + > + xCachesize, + required ffi.Pointer< + ffi.NativeFunction)> + > + xPagecount, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.UnsignedInt, + ffi.Int, + ) + > + > + xFetch, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ) + > + > + xUnpin, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ) + > + > + xRekey, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.UnsignedInt) + > + > + xTruncate, + required ffi.Pointer< + ffi.NativeFunction)> + > + xDestroy, + required ffi.Pointer< + ffi.NativeFunction)> + > + xShrink, + }) => $allocator() + ..ref.iVersion = iVersion + ..ref.pArg = pArg + ..ref.xInit = xInit + ..ref.xShutdown = xShutdown + ..ref.xCreate = xCreate + ..ref.xCachesize = xCachesize + ..ref.xPagecount = xPagecount + ..ref.xFetch = xFetch + ..ref.xUnpin = xUnpin + ..ref.xRekey = xRekey + ..ref.xTruncate = xTruncate + ..ref.xDestroy = xDestroy + ..ref.xShrink = xShrink; +} + +final class sqlite3_pcache_page extends ffi.Struct { + /// The content of the page + external ffi.Pointer pBuf; + + /// Extra information associated with the page + external ffi.Pointer pExtra; + + static ffi.Pointer $allocate( + ffi.Allocator $allocator, { + required ffi.Pointer pBuf, + required ffi.Pointer pExtra, + }) => $allocator() + ..ref.pBuf = pBuf + ..ref.pExtra = pExtra; +} + +typedef sqlite3_rtree_dbl = ffi.Double; +typedef Dartsqlite3_rtree_dbl = double; + +/// A pointer to a structure of the following type is passed as the first +/// argument to callbacks registered using rtree_geometry_callback(). +final class sqlite3_rtree_geometry extends ffi.Struct { + /// Copy of pContext passed to s_r_g_c() + external ffi.Pointer pContext; + + /// Size of array aParam[] + @ffi.Int() + external int nParam; + + /// Parameters passed to SQL geom function + external ffi.Pointer aParam; + + /// Callback implementation user data + external ffi.Pointer pUser; + + /// Called by SQLite to clean up pUser + external ffi.Pointer< + ffi.NativeFunction)> + > + xDelUser; + + static ffi.Pointer $allocate( + ffi.Allocator $allocator, { + required ffi.Pointer pContext, + required int nParam, + required ffi.Pointer aParam, + required ffi.Pointer pUser, + required ffi.Pointer< + ffi.NativeFunction)> + > + xDelUser, + }) => $allocator() + ..ref.pContext = pContext + ..ref.nParam = nParam + ..ref.aParam = aParam + ..ref.pUser = pUser + ..ref.xDelUser = xDelUser; +} + +/// A pointer to a structure of the following type is passed as the +/// argument to scored geometry callback registered using +/// sqlite3_rtree_query_callback(). +/// +/// Note that the first 5 fields of this structure are identical to +/// sqlite3_rtree_geometry. This structure is a subclass of +/// sqlite3_rtree_geometry. +final class sqlite3_rtree_query_info extends ffi.Struct { + /// pContext from when function registered + external ffi.Pointer pContext; + + /// Number of function parameters + @ffi.Int() + external int nParam; + + /// value of function parameters + external ffi.Pointer aParam; + + /// callback can use this, if desired + external ffi.Pointer pUser; + + /// function to free pUser + external ffi.Pointer< + ffi.NativeFunction)> + > + xDelUser; + + /// Coordinates of node or entry to check + external ffi.Pointer aCoord; + + /// Number of pending entries in the queue + external ffi.Pointer anQueue; + + /// Number of coordinates + @ffi.Int() + external int nCoord; + + /// Level of current node or entry + @ffi.Int() + external int iLevel; + + /// The largest iLevel value in the tree + @ffi.Int() + external int mxLevel; + + /// Rowid for current entry + @sqlite3_int64() + external int iRowid; + + /// Score of parent node + @sqlite3_rtree_dbl() + external double rParentScore; + + /// Visibility of parent node + @ffi.Int() + external int eParentWithin; + + /// OUT: Visibility + @ffi.Int() + external int eWithin; + + /// OUT: Write the score here + @sqlite3_rtree_dbl() + external double rScore; + + /// Original SQL values of parameters + external ffi.Pointer> apSqlParam; + + static ffi.Pointer $allocate( + ffi.Allocator $allocator, { + required ffi.Pointer pContext, + required int nParam, + required ffi.Pointer aParam, + required ffi.Pointer pUser, + required ffi.Pointer< + ffi.NativeFunction)> + > + xDelUser, + required ffi.Pointer aCoord, + required ffi.Pointer anQueue, + required int nCoord, + required int iLevel, + required int mxLevel, + required int iRowid, + required double rParentScore, + required int eParentWithin, + required int eWithin, + required double rScore, + required ffi.Pointer> apSqlParam, + }) => $allocator() + ..ref.pContext = pContext + ..ref.nParam = nParam + ..ref.aParam = aParam + ..ref.pUser = pUser + ..ref.xDelUser = xDelUser + ..ref.aCoord = aCoord + ..ref.anQueue = anQueue + ..ref.nCoord = nCoord + ..ref.iLevel = iLevel + ..ref.mxLevel = mxLevel + ..ref.iRowid = iRowid + ..ref.rParentScore = rParentScore + ..ref.eParentWithin = eParentWithin + ..ref.eWithin = eWithin + ..ref.rScore = rScore + ..ref.apSqlParam = apSqlParam; +} + +/// CAPI3REF: Database Snapshot +/// KEYWORDS: {snapshot} {sqlite3_snapshot} +/// +/// An instance of the snapshot object records the state of a [WAL mode] +/// database for some specific point in history. +/// +/// In [WAL mode], multiple [database connections] that are open on the +/// same database file can each be reading a different historical version +/// of the database file. When a [database connection] begins a read +/// transaction, that connection sees an unchanging copy of the database +/// as it existed for the point in time when the transaction first started. +/// Subsequent changes to the database from other connections are not seen +/// by the reader until a new read transaction is started. +/// +/// The sqlite3_snapshot object records state information about an historical +/// version of the database file so that it is possible to later open a new read +/// transaction that sees that historical version of the database rather than +/// the most recent version. +final class sqlite3_snapshot extends ffi.Struct { + @ffi.Array.multi([48]) + external ffi.Array hidden; +} + +final class sqlite3_stmt extends ffi.Opaque {} + +final class sqlite3_str extends ffi.Opaque {} + +typedef sqlite3_syscall_ptr = + ffi.Pointer>; +typedef sqlite3_syscall_ptrFunction = ffi.Void Function(); +typedef Dartsqlite3_syscall_ptrFunction = void Function(); +typedef sqlite3_uint64 = sqlite_uint64; + +final class sqlite3_value extends ffi.Opaque {} + +final class sqlite3_vfs extends ffi.Struct { + /// Structure version number (currently 3) + @ffi.Int() + external int iVersion; + + /// Size of subclassed sqlite3_file + @ffi.Int() + external int szOsFile; + + /// Maximum file pathname length + @ffi.Int() + external int mxPathname; + + /// Next registered VFS + external ffi.Pointer pNext; + + /// Name of this virtual file system + external ffi.Pointer zName; + + /// Pointer to application-specific data + external ffi.Pointer pAppData; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ) + > + > + xOpen; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, ffi.Int) + > + > + xDelete; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ) + > + > + xAccess; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ) + > + > + xFullPathname; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + > + > + xDlOpen; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ) + > + > + xDlError; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer> Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + > + xDlSym; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer) + > + > + xDlClose; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Pointer) + > + > + xRandomness; + + external ffi.Pointer< + ffi.NativeFunction, ffi.Int)> + > + xSleep; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer) + > + > + xCurrentTime; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Pointer) + > + > + xGetLastError; + + /// The methods above are in version 1 of the sqlite_vfs object + /// definition. Those that follow are added in version 2 or later + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer) + > + > + xCurrentTimeInt64; + + /// The methods above are in versions 1 and 2 of the sqlite_vfs object. + /// Those below are for version 3 and greater. + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + sqlite3_syscall_ptr, + ) + > + > + xSetSystemCall; + + external ffi.Pointer< + ffi.NativeFunction< + sqlite3_syscall_ptr Function( + ffi.Pointer, + ffi.Pointer, + ) + > + > + xGetSystemCall; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + > + > + xNextSystemCall; + + static ffi.Pointer $allocate( + ffi.Allocator $allocator, { + required int iVersion, + required int szOsFile, + required int mxPathname, + required ffi.Pointer pNext, + required ffi.Pointer zName, + required ffi.Pointer pAppData, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ) + > + > + xOpen, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ) + > + > + xDelete, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ) + > + > + xAccess, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ) + > + > + xFullPathname, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + > + > + xDlOpen, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ) + > + > + xDlError, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer> Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + > + xDlSym, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer) + > + > + xDlClose, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ) + > + > + xRandomness, + required ffi.Pointer< + ffi.NativeFunction, ffi.Int)> + > + xSleep, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer) + > + > + xCurrentTime, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer, + ) + > + > + xGetLastError, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer) + > + > + xCurrentTimeInt64, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + sqlite3_syscall_ptr, + ) + > + > + xSetSystemCall, + required ffi.Pointer< + ffi.NativeFunction< + sqlite3_syscall_ptr Function( + ffi.Pointer, + ffi.Pointer, + ) + > + > + xGetSystemCall, + required ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + > + > + xNextSystemCall, + }) => $allocator() + ..ref.iVersion = iVersion + ..ref.szOsFile = szOsFile + ..ref.mxPathname = mxPathname + ..ref.pNext = pNext + ..ref.zName = zName + ..ref.pAppData = pAppData + ..ref.xOpen = xOpen + ..ref.xDelete = xDelete + ..ref.xAccess = xAccess + ..ref.xFullPathname = xFullPathname + ..ref.xDlOpen = xDlOpen + ..ref.xDlError = xDlError + ..ref.xDlSym = xDlSym + ..ref.xDlClose = xDlClose + ..ref.xRandomness = xRandomness + ..ref.xSleep = xSleep + ..ref.xCurrentTime = xCurrentTime + ..ref.xGetLastError = xGetLastError + ..ref.xCurrentTimeInt64 = xCurrentTimeInt64 + ..ref.xSetSystemCall = xSetSystemCall + ..ref.xGetSystemCall = xGetSystemCall + ..ref.xNextSystemCall = xNextSystemCall; +} + +/// CAPI3REF: Virtual Table Instance Object +/// KEYWORDS: sqlite3_vtab +/// +/// Every [virtual table module] implementation uses a subclass +/// of this object to describe a particular instance +/// of the [virtual table]. Each subclass will +/// be tailored to the specific needs of the module implementation. +/// The purpose of this superclass is to define certain fields that are +/// common to all module implementations. +/// +/// ^Virtual tables methods can set an error message by assigning a +/// string obtained from [sqlite3_mprintf()] to zErrMsg. The method should +/// take care that any prior string is freed by a call to [sqlite3_free()] +/// prior to assigning a new string to zErrMsg. ^After the error message +/// is delivered up to the client application, the string will be automatically +/// freed by sqlite3_free() and the zErrMsg field will be zeroed. +final class sqlite3_vtab extends ffi.Struct { + /// The module for this virtual table + external ffi.Pointer pModule; + + /// Number of open cursors + @ffi.Int() + external int nRef; + + /// Error message from sqlite3_mprintf() + external ffi.Pointer zErrMsg; + + static ffi.Pointer $allocate( + ffi.Allocator $allocator, { + required ffi.Pointer pModule, + required int nRef, + required ffi.Pointer zErrMsg, + }) => $allocator() + ..ref.pModule = pModule + ..ref.nRef = nRef + ..ref.zErrMsg = zErrMsg; +} + +/// CAPI3REF: Virtual Table Cursor Object +/// KEYWORDS: sqlite3_vtab_cursor {virtual table cursor} +/// +/// Every [virtual table module] implementation uses a subclass of the +/// following structure to describe cursors that point into the +/// [virtual table] and are used +/// to loop through the virtual table. Cursors are created using the +/// [sqlite3_module.xOpen | xOpen] method of the module and are destroyed +/// by the [sqlite3_module.xClose | xClose] method. Cursors are used +/// by the [xFilter], [xNext], [xEof], [xColumn], and [xRowid] methods +/// of the module. Each module implementation will define +/// the content of a cursor structure to suit its own needs. +/// +/// This superclass exists in order to define fields of the cursor that +/// are common to all implementations. +final class sqlite3_vtab_cursor extends ffi.Struct { + /// Virtual table of this cursor + external ffi.Pointer pVtab; + + static ffi.Pointer $allocate( + ffi.Allocator $allocator, { + required ffi.Pointer pVtab, + }) => $allocator()..ref.pVtab = pVtab; +} + +typedef sqlite_int64 = ffi.LongLong; +typedef Dartsqlite_int64 = int; +typedef sqlite_uint64 = ffi.UnsignedLongLong; +typedef Dartsqlite_uint64 = int; diff --git a/pkgs/ffigen/test/large_integration_tests/large_test.dart b/pkgs/ffigen/test/large_integration_tests/large_test.dart index 0d075ea74c..4877413155 100644 --- a/pkgs/ffigen/test/large_integration_tests/large_test.dart +++ b/pkgs/ffigen/test/large_integration_tests/large_test.dart @@ -140,6 +140,7 @@ void main() { ], include: (Uri header) => header.pathSegments.last == 'cJSON.h', ), + visitors: const [IncludeAllVisitor()], ); final context = testContext(generator); final library = parse(context); @@ -174,7 +175,7 @@ void main() { ], include: (Uri header) => header.pathSegments.last == 'sqlite3.h', ), - visitors: const [_LargeTestVisitor()], + visitors: const [IncludeAllVisitor(), _LargeTestVisitor()], ); final context = testContext(generator); final library = parse(context); diff --git a/pkgs/ffigen/test/native_objc_test/bad_method_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/bad_method_test_bindings.dart index 515c0abf06..979c3b7b55 100644 --- a/pkgs/ffigen/test/native_objc_test/bad_method_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/bad_method_test_bindings.dart @@ -2,6 +2,9 @@ // // Generated by `package:ffigen`. // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package +@ffi.DefaultAsset('package:ffigen/objc_test') +library; + import 'dart:ffi' as ffi; import 'package:objective_c/objective_c.dart' as objc; import 'package:ffi/ffi.dart' as pkg_ffi; diff --git a/pkgs/ffigen/test/native_objc_test/bad_override_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/bad_override_test_bindings.dart index b03b55c2fe..671f52d1c7 100644 --- a/pkgs/ffigen/test/native_objc_test/bad_override_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/bad_override_test_bindings.dart @@ -2,6 +2,9 @@ // // Generated by `package:ffigen`. // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package +@ffi.DefaultAsset('package:ffigen/objc_test') +library; + import 'dart:ffi' as ffi; import 'package:objective_c/objective_c.dart' as objc; import 'package:ffi/ffi.dart' as pkg_ffi; diff --git a/pkgs/ffigen/test/native_objc_test/block_annotation_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/block_annotation_test_bindings.dart index 6a586634ef..adb3b40f30 100644 --- a/pkgs/ffigen/test/native_objc_test/block_annotation_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/block_annotation_test_bindings.dart @@ -206,7 +206,7 @@ extension type BlockAnnotationTest._(objc.ObjCObject object$) } /// invokeConsumedObjectListenerAsync: - static NSThread invokeConsumedObjectListenerAsync( + static objc.NSThread invokeConsumedObjectListenerAsync( objc.ObjCBlock, EmptyObject)> block, ) { final _$$ref = block.ref; @@ -215,7 +215,7 @@ extension type BlockAnnotationTest._(objc.ObjCObject object$) _sel_invokeConsumedObjectListenerAsync_, _$$ref.pointer, ); - return NSThread.fromPointer($ret, retain: true, release: true); + return objc.NSThread.fromPointer($ret, retain: true, release: true); } /// invokeConsumedObjectListenerSync: @@ -245,7 +245,7 @@ extension type BlockAnnotationTest._(objc.ObjCObject object$) } /// invokeObjectListenerAsync: - static NSThread invokeObjectListenerAsync( + static objc.NSThread invokeObjectListenerAsync( objc.ObjCBlock, EmptyObject)> block, ) { final _$$ref = block.ref; @@ -254,7 +254,7 @@ extension type BlockAnnotationTest._(objc.ObjCObject object$) _sel_invokeObjectListenerAsync_, _$$ref.pointer, ); - return NSThread.fromPointer($ret, retain: true, release: true); + return objc.NSThread.fromPointer($ret, retain: true, release: true); } /// invokeObjectListenerSync: @@ -1169,426 +1169,6 @@ extension EmptyObject$Methods on EmptyObject { } } -/// NSThread -extension type NSThread._(objc.ObjCObject object$) - implements objc.ObjCObject, objc.NSObject { - /// Constructs a [NSThread] that points to the same underlying object as [other]. - NSThread.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); - } - - /// Constructs a [NSThread] that wraps the given raw object pointer. - NSThread.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); - } - - /// Returns whether [obj] is an instance of [NSThread]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSThread, - ); - - /// alloc - static NSThread alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_alloc); - return NSThread.fromPointer($ret, retain: false, release: true); - } - - /// allocWithZone: - static NSThread allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSThread, - _sel_allocWithZone_, - zone, - ); - return NSThread.fromPointer($ret, retain: false, release: true); - } - - /// callStackReturnAddresses - static objc.NSArray getCallStackReturnAddresses() { - objc.checkOsVersionInternal( - 'NSThread.callStackReturnAddresses', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _class_NSThread, - _sel_callStackReturnAddresses, - ); - return objc.NSArray.fromPointer($ret, retain: true, release: true); - } - - /// callStackSymbols - static objc.NSArray getCallStackSymbols() { - objc.checkOsVersionInternal( - 'NSThread.callStackSymbols', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_callStackSymbols); - return objc.NSArray.fromPointer($ret, retain: true, release: true); - } - - /// currentThread - static NSThread getCurrentThread() { - final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_currentThread); - return NSThread.fromPointer($ret, retain: true, release: true); - } - - /// detachNewThreadSelector:toTarget:withObject: - static void detachNewThreadSelector( - ffi.Pointer selector, { - required objc.ObjCObject toTarget, - objc.ObjCObject? withObject, - }) { - final _$$ref = toTarget.ref; - final _$$ref$1 = withObject?.ref; - _objc_msgSend_lzbvjm( - _class_NSThread, - _sel_detachNewThreadSelector_toTarget_withObject_, - selector, - _$$ref.pointer, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - } - - /// detachNewThreadWithBlock: - static void detachNewThreadWithBlock( - objc.ObjCBlock block, - ) { - final _$$ref = block.ref; - objc.checkOsVersionInternal( - 'NSThread.detachNewThreadWithBlock:', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), - ); - _objc_msgSend_f167m6( - _class_NSThread, - _sel_detachNewThreadWithBlock_, - _$$ref.pointer, - ); - } - - /// exit - static void exit() { - _objc_msgSend_1pl9qdv(_class_NSThread, _sel_exit); - } - - /// isMainThread - static bool getIsMainThread$1() { - objc.checkOsVersionInternal( - 'NSThread.isMainThread', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - return _objc_msgSend_91o635(_class_NSThread, _sel_isMainThread); - } - - /// isMultiThreaded - static bool isMultiThreaded() { - return _objc_msgSend_91o635(_class_NSThread, _sel_isMultiThreaded); - } - - /// mainThread - static NSThread getMainThread() { - objc.checkOsVersionInternal( - 'NSThread.mainThread', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_mainThread); - return NSThread.fromPointer($ret, retain: true, release: true); - } - - /// new - static NSThread new$() { - final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_new); - return NSThread.fromPointer($ret, retain: false, release: true); - } - - /// setThreadPriority: - static bool setThreadPriority(double p) { - return _objc_msgSend_18chyc(_class_NSThread, _sel_setThreadPriority_, p); - } - - /// sleepForTimeInterval: - static void sleepForTimeInterval(double ti) { - _objc_msgSend_hwm8nu(_class_NSThread, _sel_sleepForTimeInterval_, ti); - } - - /// sleepUntilDate: - static void sleepUntilDate(objc.NSDate date) { - final _$$ref = date.ref; - _objc_msgSend_xtuoz7(_class_NSThread, _sel_sleepUntilDate_, _$$ref.pointer); - } - - /// threadPriority - static double threadPriority$1() { - return objc.useMsgSendVariants - ? _objc_msgSend_1ukqyt8Fpret(_class_NSThread, _sel_threadPriority) - : _objc_msgSend_1ukqyt8(_class_NSThread, _sel_threadPriority); - } - - /// Returns a new instance of NSThread constructed with the default `new` method. - NSThread() : this.as(new$().object$); -} - -extension NSThread$Methods on NSThread { - /// cancel - void cancel() { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.cancel', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_cancel); - } - - /// init - NSThread init() { - final _$$ref$2 = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.init', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref$2.retainAndReturnPointer(), - _sel_init, - ); - return NSThread.fromPointer($ret, retain: false, release: true); - } - - /// initWithBlock: - NSThread initWithBlock(objc.ObjCBlock block) { - final _$$ref = object$.ref; - final _$$ref$1 = block.ref; - objc.checkOsVersionInternal( - 'NSThread.initWithBlock:', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), - ); - final $ret = _objc_msgSend_nnxkei( - _$$ref.retainAndReturnPointer(), - _sel_initWithBlock_, - _$$ref$1.pointer, - ); - return NSThread.fromPointer($ret, retain: false, release: true); - } - - /// initWithTarget:selector:object: - NSThread initWithTarget( - objc.ObjCObject target, { - required ffi.Pointer selector, - objc.ObjCObject? object, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = target.ref; - final _$$ref$2 = object?.ref; - objc.checkOsVersionInternal( - 'NSThread.initWithTarget:selector:object:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - final $ret = _objc_msgSend_1eldwyi( - _$$ref.retainAndReturnPointer(), - _sel_initWithTarget_selector_object_, - _$$ref$1.pointer, - selector, - _$$ref$2?.pointer ?? ffi.nullptr, - ); - return NSThread.fromPointer($ret, retain: false, release: true); - } - - /// isCancelled - bool get isCancelled { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.isCancelled', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isCancelled); - } - - /// isExecuting - bool get isExecuting { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.isExecuting', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isExecuting); - } - - /// isFinished - bool get isFinished { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.isFinished', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isFinished); - } - - /// isMainThread - bool get isMainThread { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.isMainThread', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isMainThread); - } - - /// main - void main() { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.main', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_main); - } - - /// name - objc.NSString? get name { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.name', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_name); - return $ret.address == 0 - ? null - : objc.NSString.fromPointer($ret, retain: true, release: true); - } - - /// qualityOfService - objc.NSQualityOfService get qualityOfService { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.qualityOfService', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), - ); - final $ret = _objc_msgSend_oi8iq9(_$$ref.pointer, _sel_qualityOfService); - return objc.NSQualityOfService.fromValue($ret); - } - - /// setName: - set name(objc.NSString? value) { - final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; - objc.checkOsVersionInternal( - 'NSThread.setName:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_setName_, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - } - - /// setQualityOfService: - set qualityOfService(objc.NSQualityOfService value) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.setQualityOfService:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), - ); - _objc_msgSend_n2da1l( - _$$ref.pointer, - _sel_setQualityOfService_, - value.value, - ); - } - - /// setStackSize: - set stackSize(int value) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.setStackSize:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - _objc_msgSend_1i9r4xy(_$$ref.pointer, _sel_setStackSize_, value); - } - - /// setThreadPriority: - set threadPriority(double value) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.setThreadPriority:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - _objc_msgSend_hwm8nu(_$$ref.pointer, _sel_setThreadPriority_, value); - } - - /// stackSize - int get stackSize { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.stackSize', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_stackSize); - } - - /// start - void start() { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.start', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_start); - } - - /// threadDictionary - objc.NSMutableDictionary get threadDictionary { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_threadDictionary); - return objc.NSMutableDictionary.fromPointer( - $ret, - retain: true, - release: true, - ); - } - - /// threadPriority - double get threadPriority { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.threadPriority', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - return objc.useMsgSendVariants - ? _objc_msgSend_1ukqyt8Fpret(_$$ref.pointer, _sel_threadPriority) - : _objc_msgSend_1ukqyt8(_$$ref.pointer, _sel_threadPriority); - } -} - /// Construction methods for `objc.ObjCBlock Function(ffi.Pointer)>`. abstract final class ObjCBlock_EmptyBlock_ffiVoid { /// Returns a block that wraps the given raw block pointer. @@ -3232,14 +2812,6 @@ final _class_EmptyObject = objc.getClass( _class_EmptyObject_raw, ).cast(), ); -@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSThread') -external ffi.Pointer _class_NSThread_raw; -final _class_NSThread = objc.getClass( - "NSThread", - () => ffi.Native.addressOf>( - _class_NSThread_raw, - ).cast(), -); final _objc_msgSend_151sglz = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -3255,23 +2827,6 @@ final _objc_msgSend_151sglz = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_18chyc = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Double, - ) - > - >() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - double, - ) - >(); final _objc_msgSend_19nvye5 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -3306,59 +2861,6 @@ final _objc_msgSend_1cwp428 = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_1eldwyi = 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, - ) - >(); -final _objc_msgSend_1i9r4xy = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ) - > - >() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ) - >(); -final _objc_msgSend_1pl9qdv = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); final _objc_msgSend_1ploomx = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -3393,36 +2895,6 @@ final _objc_msgSend_1sotr3r = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_1ukqyt8 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Double Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - double Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); -final _objc_msgSend_1ukqyt8Fpret = objc.msgSendFpretPointer - .cast< - ffi.NativeFunction< - ffi.Double Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - double Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); final _objc_msgSend_4js6t = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -3440,21 +2912,6 @@ final _objc_msgSend_4js6t = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_91o635 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); final _objc_msgSend_e3qsqz = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -3489,61 +2946,6 @@ final _objc_msgSend_f167m6 = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_hwm8nu = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Double, - ) - > - >() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - double, - ) - >(); -final _objc_msgSend_lzbvjm = 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, - ) - >(); -final _objc_msgSend_n2da1l = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ) - > - >() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ) - >(); final _objc_msgSend_nnxkei = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -3561,21 +2963,6 @@ final _objc_msgSend_nnxkei = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_oi8iq9 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); final _objc_msgSend_uwvaik = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -3625,21 +3012,6 @@ final _objc_msgSend_xtuoz7 = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_xw2lbc = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); @ffi.Native Function()>( symbol: '_z0xonr_BlockAnnotationTestProtocol', ) @@ -3651,24 +3023,8 @@ final _protocol_BlockAnnotationTestProtocol = objc.getProtocol( ); late final _sel_alloc = objc.registerName("alloc"); late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); -late final _sel_callStackReturnAddresses = objc.registerName( - "callStackReturnAddresses", -); -late final _sel_callStackSymbols = objc.registerName("callStackSymbols"); -late final _sel_cancel = objc.registerName("cancel"); late final _sel_conformsToProtocol_ = objc.registerName("conformsToProtocol:"); -late final _sel_currentThread = objc.registerName("currentThread"); -late final _sel_detachNewThreadSelector_toTarget_withObject_ = objc - .registerName("detachNewThreadSelector:toTarget:withObject:"); -late final _sel_detachNewThreadWithBlock_ = objc.registerName( - "detachNewThreadWithBlock:", -); -late final _sel_exit = objc.registerName("exit"); late final _sel_init = objc.registerName("init"); -late final _sel_initWithBlock_ = objc.registerName("initWithBlock:"); -late final _sel_initWithTarget_selector_object_ = objc.registerName( - "initWithTarget:selector:object:", -); late final _sel_invokeBlockProducer_ = objc.registerName( "invokeBlockProducer:", ); @@ -3699,19 +3055,11 @@ late final _sel_invokeRetainedBlockProducer_ = objc.registerName( late final _sel_invokeRetainedObjectProducer_ = objc.registerName( "invokeRetainedObjectProducer:", ); -late final _sel_isCancelled = objc.registerName("isCancelled"); -late final _sel_isExecuting = objc.registerName("isExecuting"); -late final _sel_isFinished = objc.registerName("isFinished"); late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); -late final _sel_isMainThread = objc.registerName("isMainThread"); -late final _sel_isMultiThreaded = objc.registerName("isMultiThreaded"); late final _sel_listenConsumedObject_ = objc.registerName( "listenConsumedObject:", ); late final _sel_listenObject_ = objc.registerName("listenObject:"); -late final _sel_main = objc.registerName("main"); -late final _sel_mainThread = objc.registerName("mainThread"); -late final _sel_name = objc.registerName("name"); late final _sel_new = objc.registerName("new"); late final _sel_newBlockProducer = objc.registerName("newBlockProducer"); late final _sel_newConsumedObjectReceiver = objc.registerName( @@ -3733,24 +3081,9 @@ late final _sel_produceRetainedBlock = objc.registerName( late final _sel_produceRetainedObject = objc.registerName( "produceRetainedObject", ); -late final _sel_qualityOfService = objc.registerName("qualityOfService"); late final _sel_receiveConsumedObject_ = objc.registerName( "receiveConsumedObject:", ); late final _sel_receiveObject_ = objc.registerName("receiveObject:"); -late final _sel_setName_ = objc.registerName("setName:"); -late final _sel_setQualityOfService_ = objc.registerName( - "setQualityOfService:", -); -late final _sel_setStackSize_ = objc.registerName("setStackSize:"); -late final _sel_setThreadPriority_ = objc.registerName("setThreadPriority:"); -late final _sel_sleepForTimeInterval_ = objc.registerName( - "sleepForTimeInterval:", -); -late final _sel_sleepUntilDate_ = objc.registerName("sleepUntilDate:"); -late final _sel_stackSize = objc.registerName("stackSize"); -late final _sel_start = objc.registerName("start"); -late final _sel_threadDictionary = objc.registerName("threadDictionary"); -late final _sel_threadPriority = objc.registerName("threadPriority"); typedef instancetype = ffi.Pointer; typedef Dartinstancetype = objc.ObjCObject; diff --git a/pkgs/ffigen/test/native_objc_test/block_inherit_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/block_inherit_test_bindings.dart index 77927d6247..defbb62c26 100644 --- a/pkgs/ffigen/test/native_objc_test/block_inherit_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/block_inherit_test_bindings.dart @@ -2,6 +2,9 @@ // // Generated by `package:ffigen`. // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package +@ffi.DefaultAsset('package:ffigen/objc_test') +library; + import 'dart:ffi' as ffi; import 'package:objective_c/objective_c.dart' as objc; import 'package:ffi/ffi.dart' as pkg_ffi; diff --git a/pkgs/ffigen/test/native_objc_test/block_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/block_test_bindings.dart index 1b59421697..1a76af745f 100644 --- a/pkgs/ffigen/test/native_objc_test/block_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/block_test_bindings.dart @@ -367,14 +367,14 @@ extension type BlockTester._(objc.ObjCObject object$) } /// callOnNewThread: - static NSThread callOnNewThread(DartVoidBlock block) { + static objc.NSThread callOnNewThread(DartVoidBlock block) { final _$$ref = block.ref; final $ret = _objc_msgSend_nnxkei( _class_BlockTester, _sel_callOnNewThread_, _$$ref.pointer, ); - return NSThread.fromPointer($ret, retain: false, release: true); + return objc.NSThread.fromPointer($ret, retain: false, release: true); } /// callOnSameThread: @@ -441,14 +441,14 @@ extension type BlockTester._(objc.ObjCObject object$) } /// callWithBlockOnNewThread: - static NSThread callWithBlockOnNewThread(DartListenerBlock block) { + static objc.NSThread callWithBlockOnNewThread(DartListenerBlock block) { final _$$ref = block.ref; final $ret = _objc_msgSend_nnxkei( _class_BlockTester, _sel_callWithBlockOnNewThread_, _$$ref.pointer, ); - return NSThread.fromPointer($ret, retain: false, release: true); + return objc.NSThread.fromPointer($ret, retain: false, release: true); } /// new @@ -705,427 +705,6 @@ typedef DartListenerBlock = typedef NSStringListenerBlock = ffi.Pointer; typedef DartNSStringListenerBlock = objc.ObjCBlock; - -/// NSThread -extension type NSThread._(objc.ObjCObject object$) - implements objc.ObjCObject, objc.NSObject { - /// Constructs a [NSThread] that points to the same underlying object as [other]. - NSThread.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); - } - - /// Constructs a [NSThread] that wraps the given raw object pointer. - NSThread.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); - } - - /// Returns whether [obj] is an instance of [NSThread]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSThread, - ); - - /// alloc - static NSThread alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_alloc); - return NSThread.fromPointer($ret, retain: false, release: true); - } - - /// allocWithZone: - static NSThread allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSThread, - _sel_allocWithZone_, - zone, - ); - return NSThread.fromPointer($ret, retain: false, release: true); - } - - /// callStackReturnAddresses - static objc.NSArray getCallStackReturnAddresses() { - objc.checkOsVersionInternal( - 'NSThread.callStackReturnAddresses', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _class_NSThread, - _sel_callStackReturnAddresses, - ); - return objc.NSArray.fromPointer($ret, retain: true, release: true); - } - - /// callStackSymbols - static objc.NSArray getCallStackSymbols() { - objc.checkOsVersionInternal( - 'NSThread.callStackSymbols', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_callStackSymbols); - return objc.NSArray.fromPointer($ret, retain: true, release: true); - } - - /// currentThread - static NSThread getCurrentThread() { - final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_currentThread); - return NSThread.fromPointer($ret, retain: true, release: true); - } - - /// detachNewThreadSelector:toTarget:withObject: - static void detachNewThreadSelector( - ffi.Pointer selector, { - required objc.ObjCObject toTarget, - objc.ObjCObject? withObject, - }) { - final _$$ref = toTarget.ref; - final _$$ref$1 = withObject?.ref; - _objc_msgSend_lzbvjm( - _class_NSThread, - _sel_detachNewThreadSelector_toTarget_withObject_, - selector, - _$$ref.pointer, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - } - - /// detachNewThreadWithBlock: - static void detachNewThreadWithBlock( - objc.ObjCBlock block, - ) { - final _$$ref = block.ref; - objc.checkOsVersionInternal( - 'NSThread.detachNewThreadWithBlock:', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), - ); - _objc_msgSend_f167m6( - _class_NSThread, - _sel_detachNewThreadWithBlock_, - _$$ref.pointer, - ); - } - - /// exit - static void exit() { - _objc_msgSend_1pl9qdv(_class_NSThread, _sel_exit); - } - - /// isMainThread - static bool getIsMainThread$1() { - objc.checkOsVersionInternal( - 'NSThread.isMainThread', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - return _objc_msgSend_91o635(_class_NSThread, _sel_isMainThread); - } - - /// isMultiThreaded - static bool isMultiThreaded() { - return _objc_msgSend_91o635(_class_NSThread, _sel_isMultiThreaded); - } - - /// mainThread - static NSThread getMainThread() { - objc.checkOsVersionInternal( - 'NSThread.mainThread', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_mainThread); - return NSThread.fromPointer($ret, retain: true, release: true); - } - - /// new - static NSThread new$() { - final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_new); - return NSThread.fromPointer($ret, retain: false, release: true); - } - - /// setThreadPriority: - static bool setThreadPriority(double p) { - return _objc_msgSend_18chyc(_class_NSThread, _sel_setThreadPriority_, p); - } - - /// sleepForTimeInterval: - static void sleepForTimeInterval(double ti) { - _objc_msgSend_hwm8nu(_class_NSThread, _sel_sleepForTimeInterval_, ti); - } - - /// sleepUntilDate: - static void sleepUntilDate(objc.NSDate date) { - final _$$ref = date.ref; - _objc_msgSend_xtuoz7(_class_NSThread, _sel_sleepUntilDate_, _$$ref.pointer); - } - - /// threadPriority - static double threadPriority$1() { - return objc.useMsgSendVariants - ? _objc_msgSend_1ukqyt8Fpret(_class_NSThread, _sel_threadPriority) - : _objc_msgSend_1ukqyt8(_class_NSThread, _sel_threadPriority); - } - - /// Returns a new instance of NSThread constructed with the default `new` method. - NSThread() : this.as(new$().object$); -} - -extension NSThread$Methods on NSThread { - /// cancel - void cancel() { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.cancel', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_cancel); - } - - /// init - NSThread init() { - final _$$ref$2 = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.init', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref$2.retainAndReturnPointer(), - _sel_init, - ); - return NSThread.fromPointer($ret, retain: false, release: true); - } - - /// initWithBlock: - NSThread initWithBlock(objc.ObjCBlock block) { - final _$$ref = object$.ref; - final _$$ref$1 = block.ref; - objc.checkOsVersionInternal( - 'NSThread.initWithBlock:', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), - ); - final $ret = _objc_msgSend_nnxkei( - _$$ref.retainAndReturnPointer(), - _sel_initWithBlock_, - _$$ref$1.pointer, - ); - return NSThread.fromPointer($ret, retain: false, release: true); - } - - /// initWithTarget:selector:object: - NSThread initWithTarget( - objc.ObjCObject target, { - required ffi.Pointer selector, - objc.ObjCObject? object, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = target.ref; - final _$$ref$2 = object?.ref; - objc.checkOsVersionInternal( - 'NSThread.initWithTarget:selector:object:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - final $ret = _objc_msgSend_1eldwyi( - _$$ref.retainAndReturnPointer(), - _sel_initWithTarget_selector_object_, - _$$ref$1.pointer, - selector, - _$$ref$2?.pointer ?? ffi.nullptr, - ); - return NSThread.fromPointer($ret, retain: false, release: true); - } - - /// isCancelled - bool get isCancelled { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.isCancelled', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isCancelled); - } - - /// isExecuting - bool get isExecuting { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.isExecuting', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isExecuting); - } - - /// isFinished - bool get isFinished { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.isFinished', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isFinished); - } - - /// isMainThread - bool get isMainThread { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.isMainThread', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isMainThread); - } - - /// main - void main() { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.main', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_main); - } - - /// name - objc.NSString? get name { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.name', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_name); - return $ret.address == 0 - ? null - : objc.NSString.fromPointer($ret, retain: true, release: true); - } - - /// qualityOfService - objc.NSQualityOfService get qualityOfService { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.qualityOfService', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), - ); - final $ret = _objc_msgSend_oi8iq9(_$$ref.pointer, _sel_qualityOfService); - return objc.NSQualityOfService.fromValue($ret); - } - - /// setName: - set name(objc.NSString? value) { - final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; - objc.checkOsVersionInternal( - 'NSThread.setName:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_setName_, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - } - - /// setQualityOfService: - set qualityOfService(objc.NSQualityOfService value) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.setQualityOfService:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), - ); - _objc_msgSend_n2da1l( - _$$ref.pointer, - _sel_setQualityOfService_, - value.value, - ); - } - - /// setStackSize: - set stackSize(int value) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.setStackSize:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - _objc_msgSend_1i9r4xy(_$$ref.pointer, _sel_setStackSize_, value); - } - - /// setThreadPriority: - set threadPriority(double value) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.setThreadPriority:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - _objc_msgSend_hwm8nu(_$$ref.pointer, _sel_setThreadPriority_, value); - } - - /// stackSize - int get stackSize { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.stackSize', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_stackSize); - } - - /// start - void start() { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.start', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_start); - } - - /// threadDictionary - objc.NSMutableDictionary get threadDictionary { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_threadDictionary); - return objc.NSMutableDictionary.fromPointer( - $ret, - retain: true, - release: true, - ); - } - - /// threadPriority - double get threadPriority { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.threadPriority', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - return objc.useMsgSendVariants - ? _objc_msgSend_1ukqyt8Fpret(_$$ref.pointer, _sel_threadPriority) - : _objc_msgSend_1ukqyt8(_$$ref.pointer, _sel_threadPriority); - } -} - typedef NoTrampolineListenerBlock = ffi.Pointer; typedef DartNoTrampolineListenerBlock = objc.ObjCBlock)>; @@ -4629,14 +4208,6 @@ final _class_DummyObject = objc.getClass( _class_DummyObject_raw, ).cast(), ); -@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSThread') -external ffi.Pointer _class_NSThread_raw; -final _class_NSThread = objc.getClass( - "NSThread", - () => ffi.Native.addressOf>( - _class_NSThread_raw, - ).cast(), -); final _objc_msgSend_129vhbw = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -4669,23 +4240,6 @@ final _objc_msgSend_151sglz = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_18chyc = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Double, - ) - > - >() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - double, - ) - >(); final _objc_msgSend_18yul99 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -4739,27 +4293,6 @@ final _objc_msgSend_1cwp428 = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_1eldwyi = 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, - ) - >(); final _objc_msgSend_1gew1vm = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -4796,23 +4329,6 @@ final _objc_msgSend_1gew1vmStret = objc.msgSendStretPointer ffi.Pointer, ) >(); -final _objc_msgSend_1i9r4xy = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ) - > - >() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ) - >(); final _objc_msgSend_1pl9qdv = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -4828,36 +4344,6 @@ final _objc_msgSend_1pl9qdv = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_1ukqyt8 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Double Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - double Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); -final _objc_msgSend_1ukqyt8Fpret = objc.msgSendFpretPointer - .cast< - ffi.NativeFunction< - ffi.Double Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - double Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); final _objc_msgSend_8mj2fv = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -4892,21 +4378,6 @@ final _objc_msgSend_8mj2fvFpret = objc.msgSendFpretPointer ffi.Pointer, ) >(); -final _objc_msgSend_91o635 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); final _objc_msgSend_aclumu = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -4941,23 +4412,6 @@ final _objc_msgSend_f167m6 = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_hwm8nu = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Double, - ) - > - >() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - double, - ) - >(); final _objc_msgSend_jevgay = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -4977,44 +4431,6 @@ final _objc_msgSend_jevgay = objc.msgSendPointer int, ) >(); -final _objc_msgSend_lzbvjm = 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, - ) - >(); -final _objc_msgSend_n2da1l = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ) - > - >() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ) - >(); final _objc_msgSend_nnxkei = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -5066,21 +4482,6 @@ final _objc_msgSend_o8bnmsFpret = objc.msgSendFpretPointer ffi.Pointer, ) >(); -final _objc_msgSend_oi8iq9 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); final _objc_msgSend_ovsamd = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -5166,21 +4567,6 @@ final _objc_msgSend_xtuoz7 = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_xw2lbc = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); final _objc_msgSend_yhkuco = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -5246,47 +4632,23 @@ late final _sel_callOnSameThreadOutsideIsolate_ = objc.registerName( ); late final _sel_callOnSameThread_ = objc.registerName("callOnSameThread:"); late final _sel_callSelectorBlock_ = objc.registerName("callSelectorBlock:"); -late final _sel_callStackReturnAddresses = objc.registerName( - "callStackReturnAddresses", -); -late final _sel_callStackSymbols = objc.registerName("callStackSymbols"); late final _sel_callStructListener_ = objc.registerName("callStructListener:"); late final _sel_callVec4Block_ = objc.registerName("callVec4Block:"); late final _sel_callWithBlockOnNewThread_ = objc.registerName( "callWithBlockOnNewThread:", ); late final _sel_call_ = objc.registerName("call:"); -late final _sel_cancel = objc.registerName("cancel"); -late final _sel_currentThread = objc.registerName("currentThread"); late final _sel_dealloc = objc.registerName("dealloc"); -late final _sel_detachNewThreadSelector_toTarget_withObject_ = objc - .registerName("detachNewThreadSelector:toTarget:withObject:"); -late final _sel_detachNewThreadWithBlock_ = objc.registerName( - "detachNewThreadWithBlock:", -); -late final _sel_exit = objc.registerName("exit"); late final _sel_getBlock = objc.registerName("getBlock"); late final _sel_init = objc.registerName("init"); -late final _sel_initWithBlock_ = objc.registerName("initWithBlock:"); late final _sel_initWithCounter_ = objc.registerName("initWithCounter:"); -late final _sel_initWithTarget_selector_object_ = objc.registerName( - "initWithTarget:selector:object:", -); late final _sel_invokeAndReleaseListenerOnNewThread = objc.registerName( "invokeAndReleaseListenerOnNewThread", ); late final _sel_invokeAndReleaseListener_ = objc.registerName( "invokeAndReleaseListener:", ); -late final _sel_isCancelled = objc.registerName("isCancelled"); -late final _sel_isExecuting = objc.registerName("isExecuting"); -late final _sel_isFinished = objc.registerName("isFinished"); late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); -late final _sel_isMainThread = objc.registerName("isMainThread"); -late final _sel_isMultiThreaded = objc.registerName("isMultiThreaded"); -late final _sel_main = objc.registerName("main"); -late final _sel_mainThread = objc.registerName("mainThread"); -late final _sel_name = objc.registerName("name"); late final _sel_new = objc.registerName("new"); late final _sel_newBlockBlock_ = objc.registerName("newBlockBlock:"); late final _sel_newBlock_withMult_ = objc.registerName("newBlock:withMult:"); @@ -5295,22 +4657,7 @@ late final _sel_newFromListener_ = objc.registerName("newFromListener:"); late final _sel_newFromMultiplier_ = objc.registerName("newFromMultiplier:"); late final _sel_newWithCounter_ = objc.registerName("newWithCounter:"); late final _sel_pokeBlock = objc.registerName("pokeBlock"); -late final _sel_qualityOfService = objc.registerName("qualityOfService"); late final _sel_setCounter_ = objc.registerName("setCounter:"); -late final _sel_setName_ = objc.registerName("setName:"); -late final _sel_setQualityOfService_ = objc.registerName( - "setQualityOfService:", -); -late final _sel_setStackSize_ = objc.registerName("setStackSize:"); -late final _sel_setThreadPriority_ = objc.registerName("setThreadPriority:"); late final _sel_setup_ = objc.registerName("setup:"); -late final _sel_sleepForTimeInterval_ = objc.registerName( - "sleepForTimeInterval:", -); -late final _sel_sleepUntilDate_ = objc.registerName("sleepUntilDate:"); -late final _sel_stackSize = objc.registerName("stackSize"); -late final _sel_start = objc.registerName("start"); -late final _sel_threadDictionary = objc.registerName("threadDictionary"); -late final _sel_threadPriority = objc.registerName("threadPriority"); typedef instancetype = ffi.Pointer; typedef Dartinstancetype = objc.ObjCObject; diff --git a/pkgs/ffigen/test/native_objc_test/cast_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/cast_test_bindings.dart index dfc59e5951..48dc54c9e9 100644 --- a/pkgs/ffigen/test/native_objc_test/cast_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/cast_test_bindings.dart @@ -2,6 +2,9 @@ // // Generated by `package:ffigen`. // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package +@ffi.DefaultAsset('package:ffigen/objc_test') +library; + import 'dart:ffi' as ffi; import 'package:objective_c/objective_c.dart' as objc; import 'package:ffi/ffi.dart' as pkg_ffi; diff --git a/pkgs/ffigen/test/native_objc_test/category_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/category_test_bindings.dart index 8182357469..0dfe309e7d 100644 --- a/pkgs/ffigen/test/native_objc_test/category_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/category_test_bindings.dart @@ -2,6 +2,9 @@ // // Generated by `package:ffigen`. // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package +@ffi.DefaultAsset('package:ffigen/objc_test') +library; + import 'dart:ffi' as ffi; import 'package:objective_c/objective_c.dart' as objc; import 'package:ffi/ffi.dart' as pkg_ffi; @@ -255,88 +258,6 @@ extension Mul on Thing { } } -/// NSItemProvider -extension NSItemProvider on objc.NSURL {} - -/// NSPromisedItems -extension NSPromisedItems on objc.NSURL { - /// checkPromisedItemIsReachableAndReturnError: - bool checkPromisedItemIsReachableAndReturnError() { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.checkPromisedItemIsReachableAndReturnError:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), - ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1dom33q( - _$$ref.pointer, - _sel_checkPromisedItemIsReachableAndReturnError_, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret; - } finally { - pkg_ffi.calloc.free($err); - } - } - - /// getPromisedItemResourceValue:forKey:error: - bool getPromisedItemResourceValue( - ffi.Pointer> value, { - required objc.NSString forKey, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = forKey.ref; - objc.checkOsVersionInternal( - 'NSURL.getPromisedItemResourceValue:forKey:error:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), - ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1j9bhml( - _$$ref.pointer, - _sel_getPromisedItemResourceValue_forKey_error_, - value, - _$$ref$1.pointer, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret; - } finally { - pkg_ffi.calloc.free($err); - } - } - - /// promisedItemResourceValuesForKeys:error: - objc.NSDictionary? promisedItemResourceValuesForKeys(objc.NSArray keys) { - final _$$ref = object$.ref; - final _$$ref$1 = keys.ref; - objc.checkOsVersionInternal( - 'NSURL.promisedItemResourceValuesForKeys:error:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), - ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1lhpu4m( - _$$ref.pointer, - _sel_promisedItemResourceValuesForKeys_error_, - _$$ref$1.pointer, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : objc.NSDictionary.fromPointer($ret, retain: true, release: true); - } finally { - pkg_ffi.calloc.free($err); - } - } -} - /// NSString extension NSString on Thing { /// nsStringExtension @@ -355,338 +276,6 @@ extension NSURLCategory on objc.NSURL { } } -/// NSURLLoading -extension NSURLLoading on objc.NSURL { - /// URLHandleUsingCache: - @Deprecated('Use NSURLConnection instead') - objc.NSURLHandle? URLHandleUsingCache(bool shouldUseCache) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.URLHandleUsingCache:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_1t6aok9( - _$$ref.pointer, - _sel_URLHandleUsingCache_, - shouldUseCache, - ); - return $ret.address == 0 - ? null - : objc.NSURLHandle.fromPointer($ret, retain: true, release: true); - } - - /// loadResourceDataNotifyingClient:usingCache: - @Deprecated('Use NSURLConnection instead') - void loadResourceDataNotifyingClient( - objc.ObjCObject client, { - required bool usingCache, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = client.ref; - objc.checkOsVersionInternal( - 'NSURL.loadResourceDataNotifyingClient:usingCache:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_6p7ndb( - _$$ref.pointer, - _sel_loadResourceDataNotifyingClient_usingCache_, - _$$ref$1.pointer, - usingCache, - ); - } - - /// propertyForKey: - @Deprecated('Use NSURLConnection instead') - objc.ObjCObject? propertyForKey(objc.NSString propertyKey) { - final _$$ref = object$.ref; - final _$$ref$1 = propertyKey.ref; - objc.checkOsVersionInternal( - 'NSURL.propertyForKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_propertyForKey_, - _$$ref$1.pointer, - ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); - } - - /// resourceDataUsingCache: - @Deprecated('Use NSURLConnection instead') - objc.NSData? resourceDataUsingCache(bool shouldUseCache) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.resourceDataUsingCache:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_1t6aok9( - _$$ref.pointer, - _sel_resourceDataUsingCache_, - shouldUseCache, - ); - return $ret.address == 0 - ? null - : objc.NSData.fromPointer($ret, retain: true, release: true); - } - - /// setProperty:forKey: - @Deprecated('Use NSURLConnection instead') - bool setProperty(objc.ObjCObject property, {required objc.NSString forKey}) { - final _$$ref = object$.ref; - final _$$ref$1 = property.ref; - final _$$ref$2 = forKey.ref; - objc.checkOsVersionInternal( - 'NSURL.setProperty:forKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_1lsax7n( - _$$ref.pointer, - _sel_setProperty_forKey_, - _$$ref$1.pointer, - _$$ref$2.pointer, - ); - } - - /// setResourceData: - @Deprecated('Use NSURLConnection instead') - bool setResourceData(objc.NSData data) { - final _$$ref = object$.ref; - final _$$ref$1 = data.ref; - objc.checkOsVersionInternal( - 'NSURL.setResourceData:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_setResourceData_, - _$$ref$1.pointer, - ); - } -} - -/// NSURLPathUtilities -extension NSURLPathUtilities on objc.NSURL { - /// URLByAppendingPathComponent: - objc.NSURL? URLByAppendingPathComponent(objc.NSString pathComponent) { - final _$$ref = object$.ref; - final _$$ref$1 = pathComponent.ref; - objc.checkOsVersionInternal( - 'NSURL.URLByAppendingPathComponent:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_URLByAppendingPathComponent_, - _$$ref$1.pointer, - ); - return $ret.address == 0 - ? null - : objc.NSURL.fromPointer($ret, retain: true, release: true); - } - - /// URLByAppendingPathComponent:isDirectory: - objc.NSURL? URLByAppendingPathComponent$1( - objc.NSString pathComponent, { - required bool isDirectory, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = pathComponent.ref; - objc.checkOsVersionInternal( - 'NSURL.URLByAppendingPathComponent:isDirectory:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_17amj0z( - _$$ref.pointer, - _sel_URLByAppendingPathComponent_isDirectory_, - _$$ref$1.pointer, - isDirectory, - ); - return $ret.address == 0 - ? null - : objc.NSURL.fromPointer($ret, retain: true, release: true); - } - - /// URLByAppendingPathExtension: - objc.NSURL? URLByAppendingPathExtension(objc.NSString pathExtension) { - final _$$ref = object$.ref; - final _$$ref$1 = pathExtension.ref; - objc.checkOsVersionInternal( - 'NSURL.URLByAppendingPathExtension:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_URLByAppendingPathExtension_, - _$$ref$1.pointer, - ); - return $ret.address == 0 - ? null - : objc.NSURL.fromPointer($ret, retain: true, release: true); - } - - /// URLByDeletingLastPathComponent - objc.NSURL? get URLByDeletingLastPathComponent { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.URLByDeletingLastPathComponent', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_URLByDeletingLastPathComponent, - ); - return $ret.address == 0 - ? null - : objc.NSURL.fromPointer($ret, retain: true, release: true); - } - - /// URLByDeletingPathExtension - objc.NSURL? get URLByDeletingPathExtension { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.URLByDeletingPathExtension', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_URLByDeletingPathExtension, - ); - return $ret.address == 0 - ? null - : objc.NSURL.fromPointer($ret, retain: true, release: true); - } - - /// URLByResolvingSymlinksInPath - objc.NSURL? get URLByResolvingSymlinksInPath { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.URLByResolvingSymlinksInPath', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_URLByResolvingSymlinksInPath, - ); - return $ret.address == 0 - ? null - : objc.NSURL.fromPointer($ret, retain: true, release: true); - } - - /// URLByStandardizingPath - objc.NSURL? get URLByStandardizingPath { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.URLByStandardizingPath', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_URLByStandardizingPath, - ); - return $ret.address == 0 - ? null - : objc.NSURL.fromPointer($ret, retain: true, release: true); - } - - /// checkResourceIsReachableAndReturnError: - bool checkResourceIsReachableAndReturnError() { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.checkResourceIsReachableAndReturnError:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1dom33q( - _$$ref.pointer, - _sel_checkResourceIsReachableAndReturnError_, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret; - } finally { - pkg_ffi.calloc.free($err); - } - } - - /// lastPathComponent - objc.NSString? get lastPathComponent { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.lastPathComponent', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_lastPathComponent); - return $ret.address == 0 - ? null - : objc.NSString.fromPointer($ret, retain: true, release: true); - } - - /// pathComponents - objc.NSArray? get pathComponents { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.pathComponents', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_pathComponents); - return $ret.address == 0 - ? null - : objc.NSArray.fromPointer($ret, retain: true, release: true); - } - - /// pathExtension - objc.NSString? get pathExtension { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.pathExtension', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_pathExtension); - return $ret.address == 0 - ? null - : objc.NSString.fromPointer($ret, retain: true, release: true); - } - - /// fileURLWithPathComponents: - static objc.NSURL? fileURLWithPathComponents(objc.NSArray components) { - final _$$ref = components.ref; - objc.checkOsVersionInternal( - 'NSURL.fileURLWithPathComponents:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _class_NSURL, - _sel_fileURLWithPathComponents_, - _$$ref.pointer, - ); - return $ret.address == 0 - ? null - : objc.NSURL.fromPointer($ret, retain: true, release: true); - } -} - /// StaticAndInstanceMethodsWithSameNameCategory extension StaticAndInstanceMethodsWithSameNameCategory on Thing { /// sameNameMethod @@ -869,25 +458,6 @@ final _objc_msgSend_151sglz = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_17amj0z = 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, - ) - >(); final _objc_msgSend_19nvye5 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -922,23 +492,6 @@ final _objc_msgSend_1cwp428 = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_1dom33q = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ) - > - >() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ) - >(); final _objc_msgSend_1gcq84o = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -954,65 +507,6 @@ final _objc_msgSend_1gcq84o = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_1j9bhml = 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>, - ) - >(); -final _objc_msgSend_1lhpu4m = 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_1lsax7n = 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_1q0lyci = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -1049,42 +543,6 @@ final _objc_msgSend_1sotr3r = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_1t6aok9 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ) - > - >() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - bool, - ) - >(); -final _objc_msgSend_6p7ndb = 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, - ) - >(); final _objc_msgSend_91o635 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -1100,30 +558,6 @@ final _objc_msgSend_91o635 = objc.msgSendPointer ffi.Pointer, ) >(); -late final _sel_URLByAppendingPathComponent_ = objc.registerName( - "URLByAppendingPathComponent:", -); -late final _sel_URLByAppendingPathComponent_isDirectory_ = objc.registerName( - "URLByAppendingPathComponent:isDirectory:", -); -late final _sel_URLByAppendingPathExtension_ = objc.registerName( - "URLByAppendingPathExtension:", -); -late final _sel_URLByDeletingLastPathComponent = objc.registerName( - "URLByDeletingLastPathComponent", -); -late final _sel_URLByDeletingPathExtension = objc.registerName( - "URLByDeletingPathExtension", -); -late final _sel_URLByResolvingSymlinksInPath = objc.registerName( - "URLByResolvingSymlinksInPath", -); -late final _sel_URLByStandardizingPath = objc.registerName( - "URLByStandardizingPath", -); -late final _sel_URLHandleUsingCache_ = objc.registerName( - "URLHandleUsingCache:", -); late final _sel_add_Y_ = objc.registerName("add:Y:"); late final _sel_alloc = objc.registerName("alloc"); late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); @@ -1133,44 +567,17 @@ late final _sel_anonymousCategoryMethod = objc.registerName( late final _sel_anonymousCategoryStaticMethod = objc.registerName( "anonymousCategoryStaticMethod", ); -late final _sel_checkPromisedItemIsReachableAndReturnError_ = objc.registerName( - "checkPromisedItemIsReachableAndReturnError:", -); -late final _sel_checkResourceIsReachableAndReturnError_ = objc.registerName( - "checkResourceIsReachableAndReturnError:", -); late final _sel_extensionMethod = objc.registerName("extensionMethod"); -late final _sel_fileURLWithPathComponents_ = objc.registerName( - "fileURLWithPathComponents:", -); -late final _sel_getPromisedItemResourceValue_forKey_error_ = objc.registerName( - "getPromisedItemResourceValue:forKey:error:", -); late final _sel_init = objc.registerName("init"); late final _sel_initWithCoder_ = objc.registerName("initWithCoder:"); late final _sel_instancetypeMethod = objc.registerName("instancetypeMethod"); late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); -late final _sel_lastPathComponent = objc.registerName("lastPathComponent"); -late final _sel_loadResourceDataNotifyingClient_usingCache_ = objc.registerName( - "loadResourceDataNotifyingClient:usingCache:", -); late final _sel_method = objc.registerName("method"); late final _sel_mul_Y_ = objc.registerName("mul:Y:"); late final _sel_new = objc.registerName("new"); late final _sel_nsStringExtension = objc.registerName("nsStringExtension"); -late final _sel_pathComponents = objc.registerName("pathComponents"); -late final _sel_pathExtension = objc.registerName("pathExtension"); -late final _sel_promisedItemResourceValuesForKeys_error_ = objc.registerName( - "promisedItemResourceValuesForKeys:error:", -); -late final _sel_propertyForKey_ = objc.registerName("propertyForKey:"); late final _sel_protoMethod = objc.registerName("protoMethod"); -late final _sel_resourceDataUsingCache_ = objc.registerName( - "resourceDataUsingCache:", -); late final _sel_sameNameMethod = objc.registerName("sameNameMethod"); -late final _sel_setProperty_forKey_ = objc.registerName("setProperty:forKey:"); -late final _sel_setResourceData_ = objc.registerName("setResourceData:"); late final _sel_someProperty = objc.registerName("someProperty"); late final _sel_staticMethod = objc.registerName("staticMethod"); late final _sel_staticProtoMethod = objc.registerName("staticProtoMethod"); diff --git a/pkgs/ffigen/test/native_objc_test/enum_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/enum_test_bindings.dart index 26b4718d9c..69c75622ba 100644 --- a/pkgs/ffigen/test/native_objc_test/enum_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/enum_test_bindings.dart @@ -2,6 +2,9 @@ // // Generated by `package:ffigen`. // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package +@ffi.DefaultAsset('package:ffigen/objc_test') +library; + import 'dart:ffi' as ffi; import 'package:objective_c/objective_c.dart' as objc; import 'package:ffi/ffi.dart' as pkg_ffi; diff --git a/pkgs/ffigen/test/native_objc_test/error_method_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/error_method_test_bindings.dart index 5ad39ec2f7..c6ab28adcb 100644 --- a/pkgs/ffigen/test/native_objc_test/error_method_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/error_method_test_bindings.dart @@ -2,6 +2,9 @@ // // Generated by `package:ffigen`. // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package +@ffi.DefaultAsset('package:ffigen/objc_test') +library; + import 'dart:ffi' as ffi; import 'package:objective_c/objective_c.dart' as objc; import 'package:ffi/ffi.dart' as pkg_ffi; diff --git a/pkgs/ffigen/test/native_objc_test/failed_to_load_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/failed_to_load_test_bindings.dart index 5bb3da4d34..d4eece0ac7 100644 --- a/pkgs/ffigen/test/native_objc_test/failed_to_load_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/failed_to_load_test_bindings.dart @@ -2,6 +2,9 @@ // // Generated by `package:ffigen`. // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package +@ffi.DefaultAsset('package:ffigen/objc_test') +library; + import 'dart:ffi' as ffi; import 'package:objective_c/objective_c.dart' as objc; import 'package:ffi/ffi.dart' as pkg_ffi; diff --git a/pkgs/ffigen/test/native_objc_test/forward_decl_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/forward_decl_test_bindings.dart index 1c9095379c..8bb70d5aaa 100644 --- a/pkgs/ffigen/test/native_objc_test/forward_decl_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/forward_decl_test_bindings.dart @@ -2,6 +2,9 @@ // // Generated by `package:ffigen`. // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package +@ffi.DefaultAsset('package:ffigen/objc_test') +library; + import 'dart:ffi' as ffi; import 'package:objective_c/objective_c.dart' as objc; import 'package:ffi/ffi.dart' as pkg_ffi; diff --git a/pkgs/ffigen/test/native_objc_test/inherited_instancetype_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/inherited_instancetype_test_bindings.dart index a5bca571ea..8c348a2b1b 100644 --- a/pkgs/ffigen/test/native_objc_test/inherited_instancetype_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/inherited_instancetype_test_bindings.dart @@ -2,6 +2,9 @@ // // Generated by `package:ffigen`. // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package +@ffi.DefaultAsset('package:ffigen/objc_test') +library; + import 'dart:ffi' as ffi; import 'package:objective_c/objective_c.dart' as objc; import 'package:ffi/ffi.dart' as pkg_ffi; diff --git a/pkgs/ffigen/test/native_objc_test/is_instance_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/is_instance_test_bindings.dart index b722b4cbce..2b6dff6264 100644 --- a/pkgs/ffigen/test/native_objc_test/is_instance_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/is_instance_test_bindings.dart @@ -2,6 +2,9 @@ // // Generated by `package:ffigen`. // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package +@ffi.DefaultAsset('package:ffigen/objc_test') +library; + import 'dart:ffi' as ffi; import 'package:objective_c/objective_c.dart' as objc; import 'package:ffi/ffi.dart' as pkg_ffi; diff --git a/pkgs/ffigen/test/native_objc_test/log_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/log_test_bindings.dart index ae40f689a6..60a47bac85 100644 --- a/pkgs/ffigen/test/native_objc_test/log_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/log_test_bindings.dart @@ -2,6 +2,9 @@ // // Generated by `package:ffigen`. // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package +@ffi.DefaultAsset('package:ffigen/objc_test') +library; + import 'dart:ffi' as ffi; import 'package:objective_c/objective_c.dart' as objc; import 'package:ffi/ffi.dart' as pkg_ffi; diff --git a/pkgs/ffigen/test/native_objc_test/method_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/method_test_bindings.dart index 9a76875663..9e69d99ae0 100644 --- a/pkgs/ffigen/test/native_objc_test/method_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/method_test_bindings.dart @@ -2,6 +2,9 @@ // // Generated by `package:ffigen`. // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package +@ffi.DefaultAsset('package:ffigen/objc_test') +library; + import 'dart:ffi' as ffi; import 'package:objective_c/objective_c.dart' as objc; import 'package:ffi/ffi.dart' as pkg_ffi; diff --git a/pkgs/ffigen/test/native_objc_test/native_objc_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/native_objc_test_bindings.dart index b48842f3b2..799d4b20e7 100644 --- a/pkgs/ffigen/test/native_objc_test/native_objc_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/native_objc_test_bindings.dart @@ -2,6 +2,9 @@ // // Generated by `package:ffigen`. // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package +@ffi.DefaultAsset('package:ffigen/objc_test') +library; + import 'dart:ffi' as ffi; import 'package:objective_c/objective_c.dart' as objc; import 'package:ffi/ffi.dart' as pkg_ffi; diff --git a/pkgs/ffigen/test/native_objc_test/nullable_inheritance_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/nullable_inheritance_test_bindings.dart index cdb4038d33..d23849d8c3 100644 --- a/pkgs/ffigen/test/native_objc_test/nullable_inheritance_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/nullable_inheritance_test_bindings.dart @@ -2,6 +2,9 @@ // // Generated by `package:ffigen`. // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package +@ffi.DefaultAsset('package:ffigen/objc_test') +library; + import 'dart:ffi' as ffi; import 'package:objective_c/objective_c.dart' as objc; import 'package:ffi/ffi.dart' as pkg_ffi; diff --git a/pkgs/ffigen/test/native_objc_test/nullable_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/nullable_test_bindings.dart index 2178465df2..7752c90330 100644 --- a/pkgs/ffigen/test/native_objc_test/nullable_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/nullable_test_bindings.dart @@ -2,6 +2,9 @@ // // Generated by `package:ffigen`. // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package +@ffi.DefaultAsset('package:ffigen/objc_test') +library; + import 'dart:ffi' as ffi; import 'package:objective_c/objective_c.dart' as objc; import 'package:ffi/ffi.dart' as pkg_ffi; diff --git a/pkgs/ffigen/test/native_objc_test/property_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/property_test_bindings.dart index 92b3a3caf3..b087a6e9d1 100644 --- a/pkgs/ffigen/test/native_objc_test/property_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/property_test_bindings.dart @@ -2,6 +2,9 @@ // // Generated by `package:ffigen`. // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package +@ffi.DefaultAsset('package:ffigen/objc_test') +library; + import 'dart:ffi' as ffi; import 'package:objective_c/objective_c.dart' as objc; import 'package:ffi/ffi.dart' as pkg_ffi; diff --git a/pkgs/ffigen/test/native_objc_test/rename_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/rename_test_bindings.dart index 631414d591..e1122f16e9 100644 --- a/pkgs/ffigen/test/native_objc_test/rename_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/rename_test_bindings.dart @@ -2,6 +2,9 @@ // // Generated by `package:ffigen`. // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package +@ffi.DefaultAsset('package:ffigen/objc_test') +library; + import 'dart:ffi' as ffi; import 'package:objective_c/objective_c.dart' as objc; import 'package:ffi/ffi.dart' as pkg_ffi; diff --git a/pkgs/ffigen/test/native_objc_test/runtime_version_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/runtime_version_test_bindings.dart index 8ab79b15b7..ada69a62c7 100644 --- a/pkgs/ffigen/test/native_objc_test/runtime_version_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/runtime_version_test_bindings.dart @@ -4,6 +4,9 @@ // // Generated by `package:ffigen`. // ignore_for_file: type=lint, unused_import, deprecated_member_use_from_same_package +@ffi.DefaultAsset('package:ffigen/objc_test') +library; + import 'dart:ffi' as ffi; import 'package:objective_c/objective_c.dart' as objc; import 'package:ffi/ffi.dart' as pkg_ffi; diff --git a/pkgs/ffigen/test/native_objc_test/sdk_variable_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/sdk_variable_test_bindings.dart index 45141a6e73..511e937427 100644 --- a/pkgs/ffigen/test/native_objc_test/sdk_variable_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/sdk_variable_test_bindings.dart @@ -2,6 +2,9 @@ // // Generated by `package:ffigen`. // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package +@ffi.DefaultAsset('package:ffigen/objc_test') +library; + import 'dart:ffi' as ffi; import 'package:objective_c/objective_c.dart' as objc; import 'package:ffi/ffi.dart' as pkg_ffi; diff --git a/pkgs/ffigen/test/native_objc_test/string_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/string_test_bindings.dart index 83798790bf..a9bf85ff01 100644 --- a/pkgs/ffigen/test/native_objc_test/string_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/string_test_bindings.dart @@ -2,6 +2,9 @@ // // Generated by `package:ffigen`. // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package +@ffi.DefaultAsset('package:ffigen/objc_test') +library; + import 'dart:ffi' as ffi; import 'package:objective_c/objective_c.dart' as objc; import 'package:ffi/ffi.dart' as pkg_ffi; diff --git a/pkgs/ffigen/test/native_objc_test/typedef_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/typedef_test_bindings.dart index c7befa762f..27994312cd 100644 --- a/pkgs/ffigen/test/native_objc_test/typedef_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/typedef_test_bindings.dart @@ -2,6 +2,9 @@ // // Generated by `package:ffigen`. // ignore_for_file: type=lint, unused_import, unused_element, deprecated_member_use_from_same_package +@ffi.DefaultAsset('package:ffigen/objc_test') +library; + import 'dart:ffi' as ffi; import 'package:objective_c/objective_c.dart' as objc; import 'package:ffi/ffi.dart' as pkg_ffi; diff --git a/pkgs/ffigen/tool/check_sorted_bindings.dart b/pkgs/ffigen/tool/check_sorted_bindings.dart new file mode 100644 index 0000000000..e5409e3a02 --- /dev/null +++ b/pkgs/ffigen/tool/check_sorted_bindings.dart @@ -0,0 +1,286 @@ +// 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 'dart:io'; +import 'dart:typed_data'; + +import 'package:path/path.dart' as path; + +import 'summarize_bindings.dart'; + +class FileInfo { + final File file; + final String repoRelativePath; + final int size; + + FileInfo({ + required this.file, + required this.repoRelativePath, + required this.size, + }); +} + +enum _DiffOpType { equal, insert, delete } + +class _DiffOp { + final _DiffOpType type; + final String text; + final int oldLine; + final int newLine; + + _DiffOp(this.type, this.text, this.oldLine, this.newLine); +} + +String createUnifiedDiff( + String oldContent, + String newContent, { + required String oldHeader, + required String newHeader, + int contextSize = 3, +}) { + final oldLines = oldContent.split('\n'); + if (oldLines.isNotEmpty && oldLines.last.isEmpty) oldLines.removeLast(); + final newLines = newContent.split('\n'); + if (newLines.isNotEmpty && newLines.last.isEmpty) newLines.removeLast(); + + final m = oldLines.length; + final n = newLines.length; + + final dp = List.generate(m + 1, (_) => Int32List(n + 1)); + for (var i = m - 1; i >= 0; i--) { + for (var j = n - 1; j >= 0; j--) { + if (oldLines[i] == newLines[j]) { + dp[i][j] = 1 + dp[i + 1][j + 1]; + } else { + dp[i][j] = dp[i + 1][j] > dp[i][j + 1] ? dp[i + 1][j] : dp[i][j + 1]; + } + } + } + + int i = 0, j = 0; + final edits = <_DiffOp>[]; + while (i < m && j < n) { + if (oldLines[i] == newLines[j]) { + edits.add(_DiffOp(_DiffOpType.equal, oldLines[i], i + 1, j + 1)); + i++; + j++; + } else if (dp[i + 1][j] >= dp[i][j + 1]) { + edits.add(_DiffOp(_DiffOpType.delete, oldLines[i], i + 1, j + 1)); + i++; + } else { + edits.add(_DiffOp(_DiffOpType.insert, newLines[j], i + 1, j + 1)); + j++; + } + } + while (i < m) { + edits.add(_DiffOp(_DiffOpType.delete, oldLines[i], i + 1, j + 1)); + i++; + } + while (j < n) { + edits.add(_DiffOp(_DiffOpType.insert, newLines[j], i + 1, j + 1)); + j++; + } + + final hasDiff = edits.any((e) => e.type != _DiffOpType.equal); + if (!hasDiff) return ''; + + final buf = StringBuffer(); + buf.writeln('--- $oldHeader'); + buf.writeln('+++ $newHeader'); + + int idx = 0; + while (idx < edits.length) { + while (idx < edits.length && edits[idx].type == _DiffOpType.equal) { + idx++; + } + if (idx >= edits.length) break; + + final hunkStart = (idx - contextSize).clamp(0, edits.length); + int hunkEnd = idx; + while (hunkEnd < edits.length) { + if (edits[hunkEnd].type != _DiffOpType.equal) { + hunkEnd = (hunkEnd + contextSize + 1).clamp(0, edits.length); + } else { + int nextChange = hunkEnd; + while (nextChange < edits.length && edits[nextChange].type == _DiffOpType.equal) { + nextChange++; + } + if (nextChange < edits.length && nextChange - hunkEnd <= contextSize * 2) { + hunkEnd = nextChange; + } else { + break; + } + } + } + + final hunkEdits = edits.sublist(hunkStart, hunkEnd); + final oldStart = hunkEdits.first.oldLine; + final oldLength = hunkEdits.where((e) => e.type != _DiffOpType.insert).length; + final newStart = hunkEdits.first.newLine; + final newLength = hunkEdits.where((e) => e.type != _DiffOpType.delete).length; + + buf.writeln('@@ -$oldStart,$oldLength +$newStart,$newLength @@'); + for (final edit in hunkEdits) { + switch (edit.type) { + case _DiffOpType.equal: + buf.writeln(' ${edit.text}'); + break; + case _DiffOpType.delete: + buf.writeln('-${edit.text}'); + break; + case _DiffOpType.insert: + buf.writeln('+${edit.text}'); + break; + } + } + idx = hunkEnd; + } + + return buf.toString(); +} + +String findRepoRoot() { + try { + final result = Process.runSync('git', ['rev-parse', '--show-toplevel']); + if (result.exitCode == 0) { + return (result.stdout as String).trim(); + } + } catch (_) {} + + var current = Directory.current.absolute; + while (current.path != current.parent.path) { + if (Directory(path.join(current.path, 'pkgs')).existsSync()) { + return current.path; + } + current = current.parent; + } + return Directory.current.absolute.path; +} + +bool isExcludedPath(String relativePath) { + final parts = path.split(relativePath); + for (final part in parts) { + if (part == 'temp' || part == 'bin' || part.startsWith('.temp')) { + return true; + } + } + return false; +} + +bool isGeneratedBindingFile(File file) { + final filename = path.basename(file.path); + if (filename == 'writer.dart') { + return false; + } + if (filename.startsWith('_expected_') && filename.endsWith('.dart')) { + return true; + } + try { + final content = file.readAsStringSync(); + if (content.contains('AUTO GENERATED FILE')) { + return true; + } + } catch (_) {} + return false; +} + +Future main() async { + final repoRoot = findRepoRoot(); + final pkgsDir = Directory(path.join(repoRoot, 'pkgs')); + + if (!pkgsDir.existsSync()) { + print('Error: pkgs directory non-existent at ${pkgsDir.path}'); + exit(1); + } + + final files = []; + + final result = Process.runSync('git', ['ls-files'], workingDirectory: repoRoot); + if (result.exitCode != 0) { + print('Error: git ls-files failed with code ${result.exitCode}'); + print(result.stderr); + exit(1); + } + + final lines = (result.stdout as String).split('\n'); + for (final line in lines) { + final repoRelativePath = line.trim().replaceAll('\\', '/'); + if (repoRelativePath.isEmpty || !repoRelativePath.endsWith('.dart')) { + continue; + } + if (!repoRelativePath.startsWith('pkgs/')) { + continue; + } + if (isExcludedPath(repoRelativePath)) { + continue; + } + final file = File(path.join(repoRoot, repoRelativePath)); + if (!file.existsSync()) { + continue; + } + if (isGeneratedBindingFile(file)) { + files.add(FileInfo( + file: file, + repoRelativePath: repoRelativePath, + size: file.lengthSync(), + )); + } + } + + + // Sort strictly by file size in bytes (smallest to largest) + files.sort((a, b) { + final sizeCompare = a.size.compareTo(b.size); + if (sizeCompare != 0) return sizeCompare; + return a.repoRelativePath.compareTo(b.repoRelativePath); + }); + + final total = files.length; + print('Found $total generated binding files to check.\n'); + + for (var i = 0; i < total; i++) { + final fileInfo = files[i]; + final countStr = '[${i + 1}/$total]'; + final sizeStr = '(${fileInfo.size} bytes)'; + final pathStr = '${fileInfo.repoRelativePath}...'; + + stdout.write('$countStr $sizeStr $pathStr '); + await stdout.flush(); + + final currentContent = fileInfo.file.readAsStringSync(); + + var gitResult = await Process.run('git', ['show', 'main:${fileInfo.repoRelativePath}']); + if (gitResult.exitCode != 0) { + final originResult = await Process.run('git', ['show', 'origin/main:${fileInfo.repoRelativePath}']); + if (originResult.exitCode == 0) { + gitResult = originResult; + } + } + + final mainContent = gitResult.exitCode == 0 ? (gitResult.stdout as String) : ''; + + final currentSummary = summarizeContent(currentContent); + final mainSummary = summarizeContent(mainContent); + + if (currentSummary == mainSummary) { + print('-> CLEAN'); + } else { + print('-> DIFF DETECTED!'); + final diff = createUnifiedDiff( + mainSummary, + currentSummary, + oldHeader: 'main/${fileInfo.repoRelativePath}', + newHeader: 'current/${fileInfo.repoRelativePath}', + ); + if (diff.isNotEmpty) { + print(diff); + } else { + print('(AST summaries differ but diff output was empty)'); + } + // exit(1); + } + } + + print('\nAll $total files checked successfully with no diffs detected.'); +} From 173954ce931c647cf9613cb17f147477c7096694 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Thu, 30 Jul 2026 18:35:31 +1000 Subject: [PATCH 16/37] Headers -> Input --- .../code_assets/example/host_name/tool/ffigen.dart | 4 ++-- .../example/mini_audio/tool/ffigen.dart | 2 +- pkgs/code_assets/example/sqlite/tool/ffigen.dart | 2 +- .../example/sqlite_no_link/tool/ffigen.dart | 2 +- .../example/sqlite_prebuilt/tool/ffigen.dart | 2 +- .../code_assets/example/stb_image/tool/ffigen.dart | 2 +- pkgs/ffigen/README.md | 2 +- pkgs/ffigen/example/add/tool/ffigen.dart | 2 +- pkgs/ffigen/example/objective_c/generate_code.dart | 2 +- pkgs/ffigen/lib/ffigen.dart | 2 +- pkgs/ffigen/lib/src/code_generator/library.dart | 2 +- .../code_generator/objc_built_in_functions.dart | 2 +- pkgs/ffigen/lib/src/code_generator/writer.dart | 2 +- pkgs/ffigen/lib/src/config_provider/config.dart | 12 ++++++------ .../lib/src/config_provider/config_types.dart | 4 ++-- .../ffigen/lib/src/config_provider/spec_utils.dart | 4 ++-- .../lib/src/config_provider/yaml_config.dart | 14 +++++++------- pkgs/ffigen/lib/src/context.dart | 2 +- pkgs/ffigen/lib/src/header_parser/parser.dart | 6 +++--- .../header_parser/sub_parsers/macro_parser.dart | 2 +- .../src/header_parser/translation_unit_parser.dart | 2 +- .../reserved_keyword_collision_test.dart | 2 +- .../test/config_tests/compiler_opts_test.dart | 2 +- .../test/example_tests/libclang_example_test.dart | 2 +- .../test/header_parser_tests/record_use_test.dart | 2 +- .../ffigen/test/header_parser_tests/sort_test.dart | 2 +- .../large_integration_tests/large_objc_test.dart | 2 +- .../test/large_integration_tests/large_test.dart | 6 +++--- .../test/native_cpp_test/verify_bindings_test.dart | 8 ++++---- .../test/native_objc_test/deprecated_test.dart | 2 +- .../test/native_objc_test/ns_range_test.dart | 2 +- .../native_objc_test/swift_unavailable_test.dart | 2 +- .../test/native_objc_test/transitive_test.dart | 2 +- pkgs/ffigen/test/public_ast_visitor_test.dart | 12 ++++++------ pkgs/ffigen/test/unit_tests/config_util_test.dart | 2 +- pkgs/ffigen/tool/generate_code.dart | 2 +- .../treeshaking_dylib_record_use/tool/ffigen.dart | 4 ++-- pkgs/jni/tool/generate_ffi_bindings.dart | 2 +- pkgs/objective_c/tool/generate_code.dart | 6 +++--- pkgs/swiftgen/lib/src/generator.dart | 2 +- 40 files changed, 69 insertions(+), 69 deletions(-) diff --git a/pkgs/code_assets/example/host_name/tool/ffigen.dart b/pkgs/code_assets/example/host_name/tool/ffigen.dart index 1226cc46cc..d97d0cb3ed 100644 --- a/pkgs/code_assets/example/host_name/tool/ffigen.dart +++ b/pkgs/code_assets/example/host_name/tool/ffigen.dart @@ -12,7 +12,7 @@ void main() { final FfiGenerator generator; if (Platform.isWindows) { generator = FfiGenerator( - headers: Headers(entryPoints: [packageRoot.resolve('src/windows.h')]), + input: Input(entryPoints: [packageRoot.resolve('src/windows.h')]), visitors: visitors, output: Output( dartFile: packageRoot.resolve('lib/src/third_party/windows.dart'), @@ -26,7 +26,7 @@ void main() { ); } else { generator = FfiGenerator( - headers: Headers(entryPoints: [packageRoot.resolve('src/unix.h')]), + input: Input(entryPoints: [packageRoot.resolve('src/unix.h')]), visitors: visitors, output: Output( dartFile: packageRoot.resolve('lib/src/third_party/unix.dart'), diff --git a/pkgs/code_assets/example/mini_audio/tool/ffigen.dart b/pkgs/code_assets/example/mini_audio/tool/ffigen.dart index e79995d414..4c35abf63c 100644 --- a/pkgs/code_assets/example/mini_audio/tool/ffigen.dart +++ b/pkgs/code_assets/example/mini_audio/tool/ffigen.dart @@ -9,7 +9,7 @@ import 'package:ffigen/ffigen.dart'; void main() { final packageRoot = Platform.script.resolve('../'); FfiGenerator( - headers: Headers( + input: Input( entryPoints: [packageRoot.resolve('third_party/miniaudio.h')], ), visitors: const [ diff --git a/pkgs/code_assets/example/sqlite/tool/ffigen.dart b/pkgs/code_assets/example/sqlite/tool/ffigen.dart index 7921d4c416..0718921ffa 100644 --- a/pkgs/code_assets/example/sqlite/tool/ffigen.dart +++ b/pkgs/code_assets/example/sqlite/tool/ffigen.dart @@ -9,7 +9,7 @@ import 'package:ffigen/ffigen.dart'; void main() { final packageRoot = Platform.script.resolve('../'); FfiGenerator( - headers: Headers( + input: Input( entryPoints: [packageRoot.resolve('third_party/sqlite/sqlite3.h')], ), visitors: const [ diff --git a/pkgs/code_assets/example/sqlite_no_link/tool/ffigen.dart b/pkgs/code_assets/example/sqlite_no_link/tool/ffigen.dart index 76d0e18ddb..25f9232b5d 100644 --- a/pkgs/code_assets/example/sqlite_no_link/tool/ffigen.dart +++ b/pkgs/code_assets/example/sqlite_no_link/tool/ffigen.dart @@ -9,7 +9,7 @@ import 'package:ffigen/ffigen.dart'; void main() { final packageRoot = Platform.script.resolve('../'); FfiGenerator( - headers: Headers( + input: Input( entryPoints: [packageRoot.resolve('third_party/sqlite/sqlite3.h')], ), visitors: const [ diff --git a/pkgs/code_assets/example/sqlite_prebuilt/tool/ffigen.dart b/pkgs/code_assets/example/sqlite_prebuilt/tool/ffigen.dart index 76d0e18ddb..25f9232b5d 100644 --- a/pkgs/code_assets/example/sqlite_prebuilt/tool/ffigen.dart +++ b/pkgs/code_assets/example/sqlite_prebuilt/tool/ffigen.dart @@ -9,7 +9,7 @@ import 'package:ffigen/ffigen.dart'; void main() { final packageRoot = Platform.script.resolve('../'); FfiGenerator( - headers: Headers( + input: Input( entryPoints: [packageRoot.resolve('third_party/sqlite/sqlite3.h')], ), visitors: const [ diff --git a/pkgs/code_assets/example/stb_image/tool/ffigen.dart b/pkgs/code_assets/example/stb_image/tool/ffigen.dart index 5c0e1d9be4..0945c3f115 100644 --- a/pkgs/code_assets/example/stb_image/tool/ffigen.dart +++ b/pkgs/code_assets/example/stb_image/tool/ffigen.dart @@ -9,7 +9,7 @@ import 'package:ffigen/ffigen.dart'; void main() { final packageRoot = Platform.script.resolve('../'); FfiGenerator( - headers: Headers( + input: Input( entryPoints: [packageRoot.resolve('third_party/stb_image.h')], ), visitors: const [ diff --git a/pkgs/ffigen/README.md b/pkgs/ffigen/README.md index 190f275cc4..5e237bf0a1 100644 --- a/pkgs/ffigen/README.md +++ b/pkgs/ffigen/README.md @@ -64,7 +64,7 @@ app has been created via `dart create ffigen_example`. // Required. Output path for the generated bindings. output: Output(dartFile: packageRoot.resolve('lib/add.g.dart')), // Optional. Where to look for header files. - headers: Headers(entryPoints: [packageRoot.resolve('src/add.h')]), + input: Input(entryPoints: [packageRoot.resolve('src/add.h')]), // Optional. What functions to generate bindings for. functions: Functions.includeSet({'add'}), ).generate(); diff --git a/pkgs/ffigen/example/add/tool/ffigen.dart b/pkgs/ffigen/example/add/tool/ffigen.dart index 56a22b32ae..1ff5e37453 100644 --- a/pkgs/ffigen/example/add/tool/ffigen.dart +++ b/pkgs/ffigen/example/add/tool/ffigen.dart @@ -8,7 +8,7 @@ import 'package:ffigen/ffigen.dart'; FfiGenerator getConfig(Uri packageRoot) { return FfiGenerator( output: Output(dartFile: packageRoot.resolve('lib/add.g.dart')), - headers: Headers(entryPoints: [packageRoot.resolve('src/add.h')]), + input: Input(entryPoints: [packageRoot.resolve('src/add.h')]), visitors: [ const IncludeSetVisitor(functions: {'add'}), ], diff --git a/pkgs/ffigen/example/objective_c/generate_code.dart b/pkgs/ffigen/example/objective_c/generate_code.dart index 4d3f2cedb9..fa34a21173 100644 --- a/pkgs/ffigen/example/objective_c/generate_code.dart +++ b/pkgs/ffigen/example/objective_c/generate_code.dart @@ -8,7 +8,7 @@ import 'package:ffigen/ffigen.dart'; import 'package:logging/logging.dart'; final config = FfiGenerator( - headers: Headers( + input: Input( // The entryPoints are the files that FFIgen should scan to find the APIs // you want to generate bindings for. You can use the macSdkPath or // iosSdkPath getters to find the Apple SDKs. diff --git a/pkgs/ffigen/lib/ffigen.dart b/pkgs/ffigen/lib/ffigen.dart index 0fdc230c52..26bb068231 100644 --- a/pkgs/ffigen/lib/ffigen.dart +++ b/pkgs/ffigen/lib/ffigen.dart @@ -27,7 +27,7 @@ export 'src/config_provider.dart' ExternalVersions, FfiGenerator, Functions, - Headers, + Input, NativeExternalBindings, ObjectiveC, Output, diff --git a/pkgs/ffigen/lib/src/code_generator/library.dart b/pkgs/ffigen/lib/src/code_generator/library.dart index 970cedee73..b6cc91debc 100644 --- a/pkgs/ffigen/lib/src/code_generator/library.dart +++ b/pkgs/ffigen/lib/src/code_generator/library.dart @@ -38,7 +38,7 @@ class Library { context.config.objectiveC?.generateForPackageObjectiveC ?? false, // ignore: deprecated_member_use_from_same_package libraryImports: context.config.libraryImports, - nativeEntryPoints: context.config.headers.entryPoints + nativeEntryPoints: context.config.input.entryPoints .map((uri) => uri.toFilePath()) .toList(), context: context, 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 8b85a243c2..27ba67a98c 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 @@ -223,7 +223,7 @@ class ObjCBuiltInFunctions { // a hash of parts of the config. static String _libraryIdFromConfigHash(Config config) => fnvHash32( [ - ...config.headers.entryPoints, + ...config.input.entryPoints, config.output.dartFile, config.output.objCFile, ].map((uri) => path.basename(uri.toFilePath())).join('\n'), diff --git a/pkgs/ffigen/lib/src/code_generator/writer.dart b/pkgs/ffigen/lib/src/code_generator/writer.dart index 605c898247..5a0b8fd1c4 100644 --- a/pkgs/ffigen/lib/src/code_generator/writer.dart +++ b/pkgs/ffigen/lib/src/code_generator/writer.dart @@ -409,7 +409,7 @@ id objc_retainBlock(id); final s = StringBuffer(); final outDir = p.dirname(outFilename); // Emit each entry-point header exactly once. - for (final header in context.config.headers.entryPoints) { + for (final header in context.config.input.entryPoints) { s.write('#include "${p.relative(header.toFilePath(), from: outDir)}"\n'); } s.write(r''' diff --git a/pkgs/ffigen/lib/src/config_provider/config.dart b/pkgs/ffigen/lib/src/config_provider/config.dart index 7b794bb292..7bf8bcbcc7 100644 --- a/pkgs/ffigen/lib/src/config_provider/config.dart +++ b/pkgs/ffigen/lib/src/config_provider/config.dart @@ -19,8 +19,8 @@ final class FfiGenerator { /// User custom visitors to modify/filter AST elements. final List visitors; - /// The configuration for header parsing of [FfiGenerator]. - final Headers headers; + /// The input configuration for header parsing of [FfiGenerator]. + final Input input; /// Configuration for functions. final Functions functions; @@ -72,7 +72,7 @@ final class FfiGenerator { const FfiGenerator({ this.visitors = const [], - this.headers = const Headers(), + this.input = const Input(), this.functions = const Functions(), this.cpp, this.objectiveC, @@ -102,8 +102,8 @@ final class FfiGenerator { } } -/// The configuration for header parsing of [FfiGenerator]. -final class Headers { +/// The input configuration for header parsing of [FfiGenerator]. +final class Input { /// Path to headers. May not contain globs. final List entryPoints; @@ -119,7 +119,7 @@ final class Headers { /// Where to ignore compiler warnings/errors in source header files. final bool ignoreSourceErrors; - const Headers({ + const Input({ this.entryPoints = const [], this.include = _includeDefault, this.compilerOptions, diff --git a/pkgs/ffigen/lib/src/config_provider/config_types.dart b/pkgs/ffigen/lib/src/config_provider/config_types.dart index da19f9ecdc..859d58245c 100644 --- a/pkgs/ffigen/lib/src/config_provider/config_types.dart +++ b/pkgs/ffigen/lib/src/config_provider/config_types.dart @@ -60,7 +60,7 @@ class StructPackingOverride { } // Holds headers and filters for header. -class YamlHeaders { +class YamlInput { /// Path to headers. /// /// This contains all the headers, after extraction from Globs. @@ -69,7 +69,7 @@ class YamlHeaders { /// Include filter for headers. final HeaderIncludeFilter includeFilter; - YamlHeaders({List? entryPoints, HeaderIncludeFilter? includeFilter}) + YamlInput({List? entryPoints, HeaderIncludeFilter? includeFilter}) : entryPoints = entryPoints?.map(Uri.file).toList() ?? [], includeFilter = includeFilter ?? GlobHeaderFilter(); } diff --git a/pkgs/ffigen/lib/src/config_provider/spec_utils.dart b/pkgs/ffigen/lib/src/config_provider/spec_utils.dart index 10963e3006..0c8de99b19 100644 --- a/pkgs/ffigen/lib/src/config_provider/spec_utils.dart +++ b/pkgs/ffigen/lib/src/config_provider/spec_utils.dart @@ -286,7 +286,7 @@ List compilerOptsExtractor(List value) { return list; } -YamlHeaders headersExtractor( +YamlInput inputExtractor( Logger logger, Map> yamlConfig, String? configFilename, @@ -322,7 +322,7 @@ YamlHeaders headersExtractor( } } } - return YamlHeaders( + return YamlInput( entryPoints: entryPoints, includeFilter: GlobHeaderFilter(includeGlobs: includeGlobs), ); diff --git a/pkgs/ffigen/lib/src/config_provider/yaml_config.dart b/pkgs/ffigen/lib/src/config_provider/yaml_config.dart index 4a949a4fbf..5a80310d2f 100644 --- a/pkgs/ffigen/lib/src/config_provider/yaml_config.dart +++ b/pkgs/ffigen/lib/src/config_provider/yaml_config.dart @@ -50,13 +50,13 @@ final class YamlConfig { late Language _language; /// Path to headers. May not contain globs. - List get entryPoints => _headers.entryPoints; + List get entryPoints => _input.entryPoints; /// Whether to include a specific header. This exists in addition to /// [entryPoints] to allow filtering of transitively included headers. bool shouldIncludeHeader(Uri header) => - _headers.includeFilter.shouldInclude(header); - late YamlHeaders _headers; + _input.includeFilter.shouldInclude(header); + late YamlInput _input; /// CommandLine Arguments to pass to clang_compiler. List get compilerOpts => _compilerOpts; @@ -358,7 +358,7 @@ final class YamlConfig { key: strings.headers, required: true, valueConfigSpec: - HeterogeneousMapConfigSpec, YamlHeaders>( + HeterogeneousMapConfigSpec, YamlInput>( entries: [ HeterogeneousMapEntry( key: strings.entryPoints, @@ -374,12 +374,12 @@ final class YamlConfig { ), ), ], - transform: (node) => headersExtractor( + transform: (node) => inputExtractor( logger, node.value, filename?.toFilePath(), ), - result: (node) => _headers = node.value, + result: (node) => _input = node.value, ), ), HeterogeneousMapEntry( @@ -1215,7 +1215,7 @@ final class YamlConfig { return FfiGenerator( visitors: [yamlVisitor], - headers: Headers( + input: Input( compilerOptions: compilerOpts, entryPoints: entryPoints, include: shouldIncludeHeader, diff --git a/pkgs/ffigen/lib/src/context.dart b/pkgs/ffigen/lib/src/context.dart index 241c3a00f5..93b9bbb043 100644 --- a/pkgs/ffigen/lib/src/context.dart +++ b/pkgs/ffigen/lib/src/context.dart @@ -28,7 +28,7 @@ class Context { final reportedCommentRanges = <((String, int), (String, int))>{}; final libs = LibraryImports(); late final compilerOpts = - config.headers.compilerOptions ?? defaultCompilerOpts(logger); + config.input.compilerOptions ?? defaultCompilerOpts(logger); final Scope rootScope = Scope.createRoot('root'); final Scope rootObjCScope = Scope.createRoot('objc_root'); late final ExtraSymbols extraSymbols; diff --git a/pkgs/ffigen/lib/src/header_parser/parser.dart b/pkgs/ffigen/lib/src/header_parser/parser.dart index beb12cdf50..05950f8960 100644 --- a/pkgs/ffigen/lib/src/header_parser/parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/parser.dart @@ -73,12 +73,12 @@ List parseToBindings(Context context) { final bindings = {}; // Log all headers for user. - context.logger.info('Input Headers: ${config.headers.entryPoints}'); + context.logger.info('Input Headers: ${config.input.entryPoints}'); final tuList = >[]; // Parse all translation units from entry points. - for (final headerLocationUri in config.headers.entryPoints) { + for (final headerLocationUri in config.input.entryPoints) { final headerLocation = headerLocationUri.toFilePath(); context.logger.fine('Creating TranslationUnit for header: $headerLocation'); @@ -115,7 +115,7 @@ List parseToBindings(Context context) { 'The compiler found warnings/errors in source files.', ); context.logger.warning('This will likely generate invalid bindings.'); - if (config.headers.ignoreSourceErrors) { + if (config.input.ignoreSourceErrors) { context.logger.warning( 'Ignored source errors. (User supplied --ignore-source-errors)', ); diff --git a/pkgs/ffigen/lib/src/header_parser/sub_parsers/macro_parser.dart b/pkgs/ffigen/lib/src/header_parser/sub_parsers/macro_parser.dart index 86a9f0b8d3..d9930d377b 100644 --- a/pkgs/ffigen/lib/src/header_parser/sub_parsers/macro_parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/sub_parsers/macro_parser.dart @@ -194,7 +194,7 @@ File createFileForMacros(Context context) { // Write file contents. final sb = StringBuffer(); - for (final h in context.config.headers.entryPoints) { + for (final h in context.config.input.entryPoints) { final fullHeaderPath = File(h.toFilePath()).absolute.path; sb.writeln('#include "$fullHeaderPath"'); } diff --git a/pkgs/ffigen/lib/src/header_parser/translation_unit_parser.dart b/pkgs/ffigen/lib/src/header_parser/translation_unit_parser.dart index 8d4022f31d..36534af6e0 100644 --- a/pkgs/ffigen/lib/src/header_parser/translation_unit_parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/translation_unit_parser.dart @@ -26,7 +26,7 @@ Set parseTranslationUnit( translationUnitCursor.visitChildren((cursor) { final file = cursor.sourceFileName(); if (file.isEmpty) return; - if (headers[file] ??= context.config.headers.include(Uri.file(file))) { + if (headers[file] ??= context.config.input.include(Uri.file(file))) { try { logger.finest('rootCursorVisitor: ${cursor.completeStringRepr()}'); switch (clang.clang_getCursorKind(cursor)) { diff --git a/pkgs/ffigen/test/collision_tests/reserved_keyword_collision_test.dart b/pkgs/ffigen/test/collision_tests/reserved_keyword_collision_test.dart index 1e907bee77..46a946305a 100644 --- a/pkgs/ffigen/test/collision_tests/reserved_keyword_collision_test.dart +++ b/pkgs/ffigen/test/collision_tests/reserved_keyword_collision_test.dart @@ -21,7 +21,7 @@ void main() { style: const DynamicLibraryBindings(), ), - headers: Headers( + input: Input( entryPoints: [ Uri.file( path.join( diff --git a/pkgs/ffigen/test/config_tests/compiler_opts_test.dart b/pkgs/ffigen/test/config_tests/compiler_opts_test.dart index d844f95412..8559faba45 100644 --- a/pkgs/ffigen/test/config_tests/compiler_opts_test.dart +++ b/pkgs/ffigen/test/config_tests/compiler_opts_test.dart @@ -37,7 +37,7 @@ ${strings.compilerOptsAuto}: ${strings.includeCStdLib}: false '''); expect( - config.headers.compilerOptions, + config.input.compilerOptions, equals([if (Platform.isMacOS) '-Wno-nullability-completeness']), ); }); diff --git a/pkgs/ffigen/test/example_tests/libclang_example_test.dart b/pkgs/ffigen/test/example_tests/libclang_example_test.dart index 22dd0a0c0e..6396f06945 100644 --- a/pkgs/ffigen/test/example_tests/libclang_example_test.dart +++ b/pkgs/ffigen/test/example_tests/libclang_example_test.dart @@ -28,7 +28,7 @@ void main() { // compiler options. It can't use absolute paths because it's checked in // yaml code. To support concurrent tests, we can't set Directory.current. // As a workaround, add an extra '-I' option that uses the absolute path. - generator.headers.compilerOptions!.add( + generator.input.compilerOptions!.add( '-I${path.join(packagePathForTests, 'third_party/libclang/include')}', ); diff --git a/pkgs/ffigen/test/header_parser_tests/record_use_test.dart b/pkgs/ffigen/test/header_parser_tests/record_use_test.dart index a5d9aabdeb..f5af365904 100644 --- a/pkgs/ffigen/test/header_parser_tests/record_use_test.dart +++ b/pkgs/ffigen/test/header_parser_tests/record_use_test.dart @@ -30,7 +30,7 @@ void main() { ); final generator = FfiGenerator( visitors: [_RecordUseVisitor()], - headers: Headers(entryPoints: [Uri.file(headerFile)]), + input: Input(entryPoints: [Uri.file(headerFile)]), output: Output( dartFile: Uri.file('unused.dart'), style: const NativeExternalBindings(), diff --git a/pkgs/ffigen/test/header_parser_tests/sort_test.dart b/pkgs/ffigen/test/header_parser_tests/sort_test.dart index 8c27bce36f..9b151d8e6a 100644 --- a/pkgs/ffigen/test/header_parser_tests/sort_test.dart +++ b/pkgs/ffigen/test/header_parser_tests/sort_test.dart @@ -19,7 +19,7 @@ void main() { testContext( FfiGenerator( output: Output(dartFile: Uri.file('unused')), - headers: Headers( + input: Input( entryPoints: [ Uri.file( path.join( diff --git a/pkgs/ffigen/test/large_integration_tests/large_objc_test.dart b/pkgs/ffigen/test/large_integration_tests/large_objc_test.dart index b60b27aece..d9ec608495 100644 --- a/pkgs/ffigen/test/large_integration_tests/large_objc_test.dart +++ b/pkgs/ffigen/test/large_integration_tests/large_objc_test.dart @@ -121,7 +121,7 @@ void main() { final generator = FfiGenerator( visitors: [_RandomIncludeVisitor()], - headers: Headers( + input: Input( entryPoints: [ Uri.file( path.join( diff --git a/pkgs/ffigen/test/large_integration_tests/large_test.dart b/pkgs/ffigen/test/large_integration_tests/large_test.dart index 4877413155..761dfa190a 100644 --- a/pkgs/ffigen/test/large_integration_tests/large_test.dart +++ b/pkgs/ffigen/test/large_integration_tests/large_test.dart @@ -39,7 +39,7 @@ void main() { wrapperDocComment: 'Bindings to LibClang.', ), ), - headers: Headers( + input: Input( compilerOptions: [...defaultCompilerOpts(logger), '-I$includeDir'], entryPoints: [ Uri.file( @@ -127,7 +127,7 @@ void main() { wrapperDocComment: 'Bindings to Cjson.', ), ), - headers: Headers( + input: Input( entryPoints: [ Uri.file( path.join( @@ -162,7 +162,7 @@ void main() { ), commentType: const CommentType(CommentStyle.any, CommentLength.full), ), - headers: Headers( + input: Input( entryPoints: [ Uri.file( path.join( diff --git a/pkgs/ffigen/test/native_cpp_test/verify_bindings_test.dart b/pkgs/ffigen/test/native_cpp_test/verify_bindings_test.dart index be74dd0635..22ad14d744 100644 --- a/pkgs/ffigen/test/native_cpp_test/verify_bindings_test.dart +++ b/pkgs/ffigen/test/native_cpp_test/verify_bindings_test.dart @@ -37,7 +37,7 @@ void main() { assetId: 'package:ffigen/cpp_test', ), ), - headers: Headers( + input: Input( entryPoints: [ Uri.file(path.join(testDir.path, 'cpp_class_test.h')), Uri.file(path.join(testDir.path, 'finalizer_test_subject.h')), @@ -46,7 +46,7 @@ void main() { ), cpp: const Cpp(), visitors: [ - IncludeSetVisitor(cppClasses: {'Animal', 'FinalizerTestSubject'}), + const IncludeSetVisitor(cppClasses: {'Animal', 'FinalizerTestSubject'}), ], ), 'memory_edge_cases': FfiGenerator( @@ -56,7 +56,7 @@ void main() { assetId: 'package:ffigen/cpp_test', ), ), - headers: Headers( + input: Input( entryPoints: [ Uri.file(path.join(testDir.path, 'memory_edge_cases.h')), ], @@ -64,7 +64,7 @@ void main() { ), cpp: const Cpp(), visitors: [ - IncludeSetVisitor(cppClasses: {'Node'}), + const IncludeSetVisitor(cppClasses: {'Node'}), ], ), }; diff --git a/pkgs/ffigen/test/native_objc_test/deprecated_test.dart b/pkgs/ffigen/test/native_objc_test/deprecated_test.dart index 76bd83ea06..363f17acd3 100644 --- a/pkgs/ffigen/test/native_objc_test/deprecated_test.dart +++ b/pkgs/ffigen/test/native_objc_test/deprecated_test.dart @@ -32,7 +32,7 @@ String bindingsForVersion({Versions? iosVers, Versions? macosVers}) { wrapperDocComment: 'Tests API deprecation', ), ), - headers: Headers( + input: Input( entryPoints: [ Uri.file( path.join( diff --git a/pkgs/ffigen/test/native_objc_test/ns_range_test.dart b/pkgs/ffigen/test/native_objc_test/ns_range_test.dart index 6f9fb958d6..2af3ff7dee 100644 --- a/pkgs/ffigen/test/native_objc_test/ns_range_test.dart +++ b/pkgs/ffigen/test/native_objc_test/ns_range_test.dart @@ -34,7 +34,7 @@ void main() { wrapperName: 'NSRangeTestObjCLibrary', ), ), - headers: Headers( + input: Input( entryPoints: [ Uri.file( path.join( diff --git a/pkgs/ffigen/test/native_objc_test/swift_unavailable_test.dart b/pkgs/ffigen/test/native_objc_test/swift_unavailable_test.dart index da5be5fb2b..fffacaf47d 100644 --- a/pkgs/ffigen/test/native_objc_test/swift_unavailable_test.dart +++ b/pkgs/ffigen/test/native_objc_test/swift_unavailable_test.dart @@ -35,7 +35,7 @@ void main() { wrapperDocComment: 'Tests SWIFT_UNAVAILABLE annotation', ), ), - headers: Headers( + input: Input( entryPoints: [ Uri.file( path.join( diff --git a/pkgs/ffigen/test/native_objc_test/transitive_test.dart b/pkgs/ffigen/test/native_objc_test/transitive_test.dart index 074b4f04b3..aaa0799a0c 100644 --- a/pkgs/ffigen/test/native_objc_test/transitive_test.dart +++ b/pkgs/ffigen/test/native_objc_test/transitive_test.dart @@ -31,7 +31,7 @@ String generate({bool includeTransitiveObjCCategories = true}) { wrapperDocComment: 'Tests transitive inclusion', ), ), - headers: Headers( + input: Input( entryPoints: [ Uri.file( path.join( diff --git a/pkgs/ffigen/test/public_ast_visitor_test.dart b/pkgs/ffigen/test/public_ast_visitor_test.dart index 8884fea82b..43b5d003ce 100644 --- a/pkgs/ffigen/test/public_ast_visitor_test.dart +++ b/pkgs/ffigen/test/public_ast_visitor_test.dart @@ -65,7 +65,7 @@ void main() { absPath('test/header_parser_tests/functions.h'), ); final generator = FfiGenerator( - headers: Headers(entryPoints: [headerUri]), + input: Input(entryPoints: [headerUri]), output: Output(dartFile: Uri.file('unused.dart')), visitors: [ const IncludeAllVisitor(), @@ -95,7 +95,7 @@ void main() { ); final autoWalker = _AutoWalkVisitor(); final generator = FfiGenerator( - headers: Headers(entryPoints: [headerUri]), + input: Input(entryPoints: [headerUri]), output: Output(dartFile: Uri.file('unused.dart')), visitors: [const IncludeAllVisitor(), autoWalker], ); @@ -112,7 +112,7 @@ void main() { ); final visitedFields = []; final generator = FfiGenerator( - headers: Headers(entryPoints: [headerUri]), + input: Input(entryPoints: [headerUri]), output: Output(dartFile: Uri.file('unused.dart')), visitors: [ const IncludeAllVisitor(), @@ -142,7 +142,7 @@ void main() { absPath('test/header_parser_tests/function_n_struct.h'), ); final generator = FfiGenerator( - headers: Headers(entryPoints: [headerUri]), + input: Input(entryPoints: [headerUri]), output: Output(dartFile: Uri.file('unused.dart')), visitors: [ const IncludeAllVisitor(), @@ -169,7 +169,7 @@ void main() { absPath('test/header_parser_tests/enum_int_mimic.h'), ); final generator = FfiGenerator( - headers: Headers(entryPoints: [headerUri]), + input: Input(entryPoints: [headerUri]), output: Output(dartFile: Uri.file('unused.dart')), visitors: [ const IncludeAllVisitor(), @@ -191,7 +191,7 @@ void main() { absPath('test/native_objc_test/transitive_test.h'), ); final generator = FfiGenerator( - headers: Headers(entryPoints: [headerUri]), + input: Input(entryPoints: [headerUri]), output: Output(dartFile: Uri.file('unused.dart')), objectiveC: const ObjectiveC(), visitors: [ diff --git a/pkgs/ffigen/test/unit_tests/config_util_test.dart b/pkgs/ffigen/test/unit_tests/config_util_test.dart index e5aaff12a3..f40d5e69d8 100644 --- a/pkgs/ffigen/test/unit_tests/config_util_test.dart +++ b/pkgs/ffigen/test/unit_tests/config_util_test.dart @@ -6,7 +6,7 @@ import '../test_utils.dart'; Struct createStruct(String name) { final generator = FfiGenerator( - headers: Headers(entryPoints: []), + input: const Input(entryPoints: []), output: Output(dartFile: Uri.file('unused.dart')), ); return Struct( diff --git a/pkgs/ffigen/tool/generate_code.dart b/pkgs/ffigen/tool/generate_code.dart index a4ea16ca71..772ab5ce50 100644 --- a/pkgs/ffigen/tool/generate_code.dart +++ b/pkgs/ffigen/tool/generate_code.dart @@ -156,7 +156,7 @@ class LibClangVisitor extends Visitor { void main() { final root = Platform.script.resolve('../'); FfiGenerator( - headers: Headers( + input: Input( entryPoints: [ root.resolve('third_party/libclang/include/clang-c/Index.h'), ], diff --git a/pkgs/hooks_runner/test_data/treeshaking_dylib_record_use/tool/ffigen.dart b/pkgs/hooks_runner/test_data/treeshaking_dylib_record_use/tool/ffigen.dart index 4d4174583e..0002549490 100644 --- a/pkgs/hooks_runner/test_data/treeshaking_dylib_record_use/tool/ffigen.dart +++ b/pkgs/hooks_runner/test_data/treeshaking_dylib_record_use/tool/ffigen.dart @@ -11,7 +11,7 @@ void main() { // 1. Generate bindings for add.c FfiGenerator( - headers: Headers( + input: Input( entryPoints: [packageRoot.resolve('src/add.c')], ), visitors: [const IncludeAllVisitor(), const RecordUseVisitor()], @@ -33,7 +33,7 @@ void main() { // 2. Generate bindings for multiply.c FfiGenerator( - headers: Headers( + input: Input( entryPoints: [packageRoot.resolve('src/multiply.c')], ), visitors: [const IncludeAllVisitor(), const RecordUseVisitor()], diff --git a/pkgs/jni/tool/generate_ffi_bindings.dart b/pkgs/jni/tool/generate_ffi_bindings.dart index a75b83bd3b..0f90312bc6 100644 --- a/pkgs/jni/tool/generate_ffi_bindings.dart +++ b/pkgs/jni/tool/generate_ffi_bindings.dart @@ -238,7 +238,7 @@ void main(List args) { logger.info('Generating FFI bindings for package:jni'); final generator = ffigen.FfiGenerator( - headers: ffigen.Headers( + input: ffigen.Input( entryPoints: [ Uri.file('src/dartjni.h'), Uri.file('src/third_party/global_jni_env.h'), diff --git a/pkgs/objective_c/tool/generate_code.dart b/pkgs/objective_c/tool/generate_code.dart index 7df32ca9da..460469aa96 100644 --- a/pkgs/objective_c/tool/generate_code.dart +++ b/pkgs/objective_c/tool/generate_code.dart @@ -657,7 +657,7 @@ Future run({required bool format}) async { print('Generating runtime bindings...'); FfiGenerator( - headers: Headers(entryPoints: [root.resolve('src/objective_c_runtime.h')]), + input: Input(entryPoints: [root.resolve('src/objective_c_runtime.h')]), visitors: [const RuntimeBindingsVisitor()], output: Output( preamble: ''' @@ -681,7 +681,7 @@ Future run({required bool format}) async { print('Generating C bindings...'); FfiGenerator( - headers: Headers( + input: Input( entryPoints: [ root.resolve('src/include/dart_api_dl.h'), root.resolve('src/objective_c.h'), @@ -709,7 +709,7 @@ Future run({required bool format}) async { print('Generating ObjC bindings...'); FfiGenerator( - headers: Headers( + input: Input( entryPoints: [ root.resolve('src/foundation.h'), root.resolve('src/input_stream_adapter.h'), diff --git a/pkgs/swiftgen/lib/src/generator.dart b/pkgs/swiftgen/lib/src/generator.dart index 53f3a20b61..27bcce9a15 100644 --- a/pkgs/swiftgen/lib/src/generator.dart +++ b/pkgs/swiftgen/lib/src/generator.dart @@ -120,7 +120,7 @@ extension SwiftGenGenerator on SwiftGenerator { categories: ffigen.objectiveC.categories, externalVersions: ffigen.objectiveC.externalVersions, ), - headers: fg.Headers( + input: fg.Input( entryPoints: [Uri.file(objcHeader)], compilerOptions: [ ...fg.defaultCompilerOpts(logger), From 22839e7300b3e891302aad14d6420cbac28c9c7c Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Thu, 30 Jul 2026 19:03:30 +1000 Subject: [PATCH 17/37] Move varArgs --- pkgs/ffigen/README.md | 4 +- .../libclang-example/generated_bindings.dart | 713 +----------------- pkgs/ffigen/lib/ffigen.dart | 1 - .../lib/src/code_generator/binding.dart | 3 +- pkgs/ffigen/lib/src/code_generator/func.dart | 39 + .../lib/src/code_generator/objc_block.dart | 3 +- .../lib/src/code_generator/objc_category.dart | 7 +- .../ffigen/lib/src/code_generator/writer.dart | 3 +- .../lib/src/config_provider/config.dart | 17 - .../lib/src/config_provider/yaml_config.dart | 54 +- pkgs/ffigen/lib/src/header_parser/parser.dart | 13 + .../sub_parsers/functiondecl_parser.dart | 69 +- .../ffigen/lib/src/public_ast/public_ast.dart | 5 + pkgs/ffigen/pubspec.yaml | 2 +- .../header_parser_tests/record_use_test.dart | 3 +- .../large_objc_test.dart | 27 +- .../native_cpp_test/verify_bindings_test.dart | 4 +- pkgs/ffigen/test/public_ast_visitor_test.dart | 25 + pkgs/ffigen/test/test_utils.dart | 5 +- .../test/unit_tests/config_util_test.dart | 4 +- pkgs/ffigen/tool/check_sorted_bindings.dart | 53 +- .../lib/src/objc_built_in_types.dart | 3 +- pkgs/objective_c/tool/generate_code.dart | 71 +- 23 files changed, 258 insertions(+), 870 deletions(-) diff --git a/pkgs/ffigen/README.md b/pkgs/ffigen/README.md index 5e237bf0a1..a7fcb020b3 100644 --- a/pkgs/ffigen/README.md +++ b/pkgs/ffigen/README.md @@ -65,8 +65,8 @@ app has been created via `dart create ffigen_example`. output: Output(dartFile: packageRoot.resolve('lib/add.g.dart')), // Optional. Where to look for header files. input: Input(entryPoints: [packageRoot.resolve('src/add.h')]), - // Optional. What functions to generate bindings for. - functions: Functions.includeSet({'add'}), + // Optional. Visitors to filter and customize generated bindings. + visitors: [const IncludeSetVisitor(functions: {'add'})], ).generate(); } ``` diff --git a/pkgs/ffigen/example/libclang-example/generated_bindings.dart b/pkgs/ffigen/example/libclang-example/generated_bindings.dart index bda253f448..fbf2f2c658 100644 --- a/pkgs/ffigen/example/libclang-example/generated_bindings.dart +++ b/pkgs/ffigen/example/libclang-example/generated_bindings.dart @@ -4406,7 +4406,9 @@ class LibClang { } late final _clang_getFileTimePtr = - _lookup>('clang_getFileTime'); + _lookup>( + 'clang_getFileTime', + ); late final _clang_getFileTime = _clang_getFileTimePtr .asFunction(); @@ -7480,7 +7482,7 @@ class _SymbolAddresses { get clang_getFileLocation => _library._clang_getFileLocationPtr; ffi.Pointer> get clang_getFileName => _library._clang_getFileNamePtr; - ffi.Pointer> + ffi.Pointer> get clang_getFileTime => _library._clang_getFileTimePtr; ffi.Pointer< ffi.NativeFunction)> @@ -8133,46 +8135,6 @@ final class CXCodeCompleteResults extends ffi.Struct { ..ref.NumResults = NumResults; } -/// Flags that can be passed to \c clang_codeCompleteAt() to -/// modify its behavior. -/// -/// The enumerators in this enumeration can be bitwise-OR'd together to -/// provide multiple options to \c clang_codeCompleteAt(). -enum CXCodeComplete_Flags { - /// Whether to include macros within the set of code - /// completions returned. - CXCodeComplete_IncludeMacros(1), - - /// Whether to include code patterns for language constructs - /// within the set of code completions, e.g., for loops. - CXCodeComplete_IncludeCodePatterns(2), - - /// Whether to include brief documentation within the set of code - /// completions returned. - CXCodeComplete_IncludeBriefComments(4), - - /// Whether to speed up completion by omitting top- or namespace-level entities - /// defined in the preamble. There's no guarantee any particular entity is - /// omitted. This may be useful if the headers are indexed externally. - CXCodeComplete_SkipPreamble(8), - - /// Whether to include completions with small - /// fix-its, e.g. change '.' to '->' on member access, etc. - CXCodeComplete_IncludeCompletionsWithFixIts(16); - - final int value; - const CXCodeComplete_Flags(this.value); - - static CXCodeComplete_Flags fromValue(int value) => switch (value) { - 1 => CXCodeComplete_IncludeMacros, - 2 => CXCodeComplete_IncludeCodePatterns, - 4 => CXCodeComplete_IncludeBriefComments, - 8 => CXCodeComplete_SkipPreamble, - 16 => CXCodeComplete_IncludeCompletionsWithFixIts, - _ => throw ArgumentError('Unknown value for CXCodeComplete_Flags: $value'), - }; -} - /// Describes a single piece of text within a code-completion string. /// /// Each "chunk" within a code-completion string (\c CXCompletionString) is @@ -8348,136 +8310,6 @@ enum CXCompletionChunkKind { }; } -/// Bits that represent the context under which completion is occurring. -/// -/// The enumerators in this enumeration may be bitwise-OR'd together if multiple -/// contexts are occurring simultaneously. -enum CXCompletionContext { - /// The context for completions is unexposed, as only Clang results - /// should be included. (This is equivalent to having no context bits set.) - CXCompletionContext_Unexposed(0), - - /// Completions for any possible type should be included in the results. - CXCompletionContext_AnyType(1), - - /// Completions for any possible value (variables, function calls, etc.) - /// should be included in the results. - CXCompletionContext_AnyValue(2), - - /// Completions for values that resolve to an Objective-C object should - /// be included in the results. - CXCompletionContext_ObjCObjectValue(4), - - /// Completions for values that resolve to an Objective-C selector - /// should be included in the results. - CXCompletionContext_ObjCSelectorValue(8), - - /// Completions for values that resolve to a C++ class type should be - /// included in the results. - CXCompletionContext_CXXClassTypeValue(16), - - /// Completions for fields of the member being accessed using the dot - /// operator should be included in the results. - CXCompletionContext_DotMemberAccess(32), - - /// Completions for fields of the member being accessed using the arrow - /// operator should be included in the results. - CXCompletionContext_ArrowMemberAccess(64), - - /// Completions for properties of the Objective-C object being accessed - /// using the dot operator should be included in the results. - CXCompletionContext_ObjCPropertyAccess(128), - - /// Completions for enum tags should be included in the results. - CXCompletionContext_EnumTag(256), - - /// Completions for union tags should be included in the results. - CXCompletionContext_UnionTag(512), - - /// Completions for struct tags should be included in the results. - CXCompletionContext_StructTag(1024), - - /// Completions for C++ class names should be included in the results. - CXCompletionContext_ClassTag(2048), - - /// Completions for C++ namespaces and namespace aliases should be - /// included in the results. - CXCompletionContext_Namespace(4096), - - /// Completions for C++ nested name specifiers should be included in - /// the results. - CXCompletionContext_NestedNameSpecifier(8192), - - /// Completions for Objective-C interfaces (classes) should be included - /// in the results. - CXCompletionContext_ObjCInterface(16384), - - /// Completions for Objective-C protocols should be included in - /// the results. - CXCompletionContext_ObjCProtocol(32768), - - /// Completions for Objective-C categories should be included in - /// the results. - CXCompletionContext_ObjCCategory(65536), - - /// Completions for Objective-C instance messages should be included - /// in the results. - CXCompletionContext_ObjCInstanceMessage(131072), - - /// Completions for Objective-C class messages should be included in - /// the results. - CXCompletionContext_ObjCClassMessage(262144), - - /// Completions for Objective-C selector names should be included in - /// the results. - CXCompletionContext_ObjCSelectorName(524288), - - /// Completions for preprocessor macro names should be included in - /// the results. - CXCompletionContext_MacroName(1048576), - - /// Natural language completions should be included in the results. - CXCompletionContext_NaturalLanguage(2097152), - - /// #include file completions should be included in the results. - CXCompletionContext_IncludedFile(4194304), - - /// The current context is unknown, so set all contexts. - CXCompletionContext_Unknown(8388607); - - final int value; - const CXCompletionContext(this.value); - - static CXCompletionContext fromValue(int value) => switch (value) { - 0 => CXCompletionContext_Unexposed, - 1 => CXCompletionContext_AnyType, - 2 => CXCompletionContext_AnyValue, - 4 => CXCompletionContext_ObjCObjectValue, - 8 => CXCompletionContext_ObjCSelectorValue, - 16 => CXCompletionContext_CXXClassTypeValue, - 32 => CXCompletionContext_DotMemberAccess, - 64 => CXCompletionContext_ArrowMemberAccess, - 128 => CXCompletionContext_ObjCPropertyAccess, - 256 => CXCompletionContext_EnumTag, - 512 => CXCompletionContext_UnionTag, - 1024 => CXCompletionContext_StructTag, - 2048 => CXCompletionContext_ClassTag, - 4096 => CXCompletionContext_Namespace, - 8192 => CXCompletionContext_NestedNameSpecifier, - 16384 => CXCompletionContext_ObjCInterface, - 32768 => CXCompletionContext_ObjCProtocol, - 65536 => CXCompletionContext_ObjCCategory, - 131072 => CXCompletionContext_ObjCInstanceMessage, - 262144 => CXCompletionContext_ObjCClassMessage, - 524288 => CXCompletionContext_ObjCSelectorName, - 1048576 => CXCompletionContext_MacroName, - 2097152 => CXCompletionContext_NaturalLanguage, - 4194304 => CXCompletionContext_IncludedFile, - 8388607 => CXCompletionContext_Unknown, - _ => throw ArgumentError('Unknown value for CXCompletionContext: $value'), - }; -} - /// A single result of code completion. final class CXCompletionResult extends ffi.Struct { /// The kind of entity that this completion refers to. @@ -9680,134 +9512,10 @@ typedef DartCXCursorVisitorFunction = CXClientData client_data, ); -/// Describes the exception specification of a cursor. -/// -/// A negative value indicates that the cursor is not a function declaration. -enum CXCursor_ExceptionSpecificationKind { - /// The cursor has no exception specification. - CXCursor_ExceptionSpecificationKind_None(0), - - /// The cursor has exception specification throw() - CXCursor_ExceptionSpecificationKind_DynamicNone(1), - - /// The cursor has exception specification throw(T1, T2) - CXCursor_ExceptionSpecificationKind_Dynamic(2), - - /// The cursor has exception specification throw(...). - CXCursor_ExceptionSpecificationKind_MSAny(3), - - /// The cursor has exception specification basic noexcept. - CXCursor_ExceptionSpecificationKind_BasicNoexcept(4), - - /// The cursor has exception specification computed noexcept. - CXCursor_ExceptionSpecificationKind_ComputedNoexcept(5), - - /// The exception specification has not yet been evaluated. - CXCursor_ExceptionSpecificationKind_Unevaluated(6), - - /// The exception specification has not yet been instantiated. - CXCursor_ExceptionSpecificationKind_Uninstantiated(7), - - /// The exception specification has not been parsed yet. - CXCursor_ExceptionSpecificationKind_Unparsed(8), - - /// The cursor has a __declspec(nothrow) exception specification. - CXCursor_ExceptionSpecificationKind_NoThrow(9); - - final int value; - const CXCursor_ExceptionSpecificationKind(this.value); - - static CXCursor_ExceptionSpecificationKind fromValue(int value) => - switch (value) { - 0 => CXCursor_ExceptionSpecificationKind_None, - 1 => CXCursor_ExceptionSpecificationKind_DynamicNone, - 2 => CXCursor_ExceptionSpecificationKind_Dynamic, - 3 => CXCursor_ExceptionSpecificationKind_MSAny, - 4 => CXCursor_ExceptionSpecificationKind_BasicNoexcept, - 5 => CXCursor_ExceptionSpecificationKind_ComputedNoexcept, - 6 => CXCursor_ExceptionSpecificationKind_Unevaluated, - 7 => CXCursor_ExceptionSpecificationKind_Uninstantiated, - 8 => CXCursor_ExceptionSpecificationKind_Unparsed, - 9 => CXCursor_ExceptionSpecificationKind_NoThrow, - _ => throw ArgumentError( - 'Unknown value for CXCursor_ExceptionSpecificationKind: $value', - ), - }; -} - /// A single diagnostic, containing the diagnostic's severity, /// location, text, source ranges, and fix-it hints. typedef CXDiagnostic = ffi.Pointer; -/// Options to control the display of diagnostics. -/// -/// The values in this enum are meant to be combined to customize the -/// behavior of \c clang_formatDiagnostic(). -enum CXDiagnosticDisplayOptions { - /// Display the source-location information where the - /// diagnostic was located. - /// - /// When set, diagnostics will be prefixed by the file, line, and - /// (optionally) column to which the diagnostic refers. For example, - /// - /// \code - /// test.c:28: warning: extra tokens at end of #endif directive - /// \endcode - /// - /// This option corresponds to the clang flag \c -fshow-source-location. - CXDiagnostic_DisplaySourceLocation(1), - - /// If displaying the source-location information of the - /// diagnostic, also include the column number. - /// - /// This option corresponds to the clang flag \c -fshow-column. - CXDiagnostic_DisplayColumn(2), - - /// If displaying the source-location information of the - /// diagnostic, also include information about source ranges in a - /// machine-parsable format. - /// - /// This option corresponds to the clang flag - /// \c -fdiagnostics-print-source-range-info. - CXDiagnostic_DisplaySourceRanges(4), - - /// Display the option name associated with this diagnostic, if any. - /// - /// The option name displayed (e.g., -Wconversion) will be placed in brackets - /// after the diagnostic text. This option corresponds to the clang flag - /// \c -fdiagnostics-show-option. - CXDiagnostic_DisplayOption(8), - - /// Display the category number associated with this diagnostic, if any. - /// - /// The category number is displayed within brackets after the diagnostic text. - /// This option corresponds to the clang flag - /// \c -fdiagnostics-show-category=id. - CXDiagnostic_DisplayCategoryId(16), - - /// Display the category name associated with this diagnostic, if any. - /// - /// The category name is displayed within brackets after the diagnostic text. - /// This option corresponds to the clang flag - /// \c -fdiagnostics-show-category=name. - CXDiagnostic_DisplayCategoryName(32); - - final int value; - const CXDiagnosticDisplayOptions(this.value); - - static CXDiagnosticDisplayOptions fromValue(int value) => switch (value) { - 1 => CXDiagnostic_DisplaySourceLocation, - 2 => CXDiagnostic_DisplayColumn, - 4 => CXDiagnostic_DisplaySourceRanges, - 8 => CXDiagnostic_DisplayOption, - 16 => CXDiagnostic_DisplayCategoryId, - 32 => CXDiagnostic_DisplayCategoryName, - _ => throw ArgumentError( - 'Unknown value for CXDiagnosticDisplayOptions: $value', - ), - }; -} - /// A group of CXDiagnostics. typedef CXDiagnosticSet = ffi.Pointer; @@ -10083,18 +9791,6 @@ final class CXIdxDeclInfo extends ffi.Struct { external int flags; } -enum CXIdxDeclInfoFlags { - CXIdxDeclFlag_Skipped(1); - - final int value; - const CXIdxDeclInfoFlags(this.value); - - static CXIdxDeclInfoFlags fromValue(int value) => switch (value) { - 1 => CXIdxDeclFlag_Skipped, - _ => throw ArgumentError('Unknown value for CXIdxDeclInfoFlags: $value'), - }; -} - /// Extra C++ template information for an entity. This can apply to: /// CXIdxEntity_Function /// CXIdxEntity_CXXClass @@ -10501,45 +10197,6 @@ typedef CXIndex = ffi.Pointer; /// translation units. typedef CXIndexAction = ffi.Pointer; -enum CXIndexOptFlags { - /// Used to indicate that no special indexing options are needed. - CXIndexOpt_None(0), - - /// Used to indicate that IndexerCallbacks#indexEntityReference should - /// be invoked for only one reference of an entity per source file that does - /// not also include a declaration/definition of the entity. - CXIndexOpt_SuppressRedundantRefs(1), - - /// Function-local symbols should be indexed. If this is not set - /// function-local symbols will be ignored. - CXIndexOpt_IndexFunctionLocalSymbols(2), - - /// Implicit function/class template instantiations should be indexed. - /// If this is not set, implicit instantiations will be ignored. - CXIndexOpt_IndexImplicitTemplateInstantiations(4), - - /// Suppress all compiler warnings when parsing for indexing. - CXIndexOpt_SuppressWarnings(8), - - /// Skip a function/method body that was already parsed during an - /// indexing session associated with a \c CXIndexAction object. - /// Bodies in system headers are always skipped. - CXIndexOpt_SkipParsedBodiesInSession(16); - - final int value; - const CXIndexOptFlags(this.value); - - static CXIndexOptFlags fromValue(int value) => switch (value) { - 0 => CXIndexOpt_None, - 1 => CXIndexOpt_SuppressRedundantRefs, - 2 => CXIndexOpt_IndexFunctionLocalSymbols, - 4 => CXIndexOpt_IndexImplicitTemplateInstantiations, - 8 => CXIndexOpt_SuppressWarnings, - 16 => CXIndexOpt_SkipParsedBodiesInSession, - _ => throw ArgumentError('Unknown value for CXIndexOptFlags: $value'), - }; -} - /// Describe the "language" of the entity referred to by a cursor. enum CXLanguageKind { CXLanguage_Invalid(0), @@ -10629,105 +10286,6 @@ enum CXLoadDiag_Error { /// @{ typedef CXModule = ffi.Pointer; -enum CXNameRefFlags { - /// Include the nested-name-specifier, e.g. Foo:: in x.Foo::y, in the - /// range. - CXNameRange_WantQualifier(1), - - /// Include the explicit template arguments, e.g. \ in x.f, - /// in the range. - CXNameRange_WantTemplateArgs(2), - - /// If the name is non-contiguous, return the full spanning range. - /// - /// Non-contiguous names occur in Objective-C when a selector with two or more - /// parameters is used, or in C++ when using an operator: - /// \code - /// [object doSomething:here withValue:there]; // Objective-C - /// return some_vector[1]; // C++ - /// \endcode - CXNameRange_WantSinglePiece(4); - - final int value; - const CXNameRefFlags(this.value); - - static CXNameRefFlags fromValue(int value) => switch (value) { - 1 => CXNameRange_WantQualifier, - 2 => CXNameRange_WantTemplateArgs, - 4 => CXNameRange_WantSinglePiece, - _ => throw ArgumentError('Unknown value for CXNameRefFlags: $value'), - }; -} - -/// 'Qualifiers' written next to the return and parameter types in -/// Objective-C method declarations. -enum CXObjCDeclQualifierKind { - CXObjCDeclQualifier_None(0), - CXObjCDeclQualifier_In(1), - CXObjCDeclQualifier_Inout(2), - CXObjCDeclQualifier_Out(4), - CXObjCDeclQualifier_Bycopy(8), - CXObjCDeclQualifier_Byref(16), - CXObjCDeclQualifier_Oneway(32); - - final int value; - const CXObjCDeclQualifierKind(this.value); - - static CXObjCDeclQualifierKind fromValue(int value) => switch (value) { - 0 => CXObjCDeclQualifier_None, - 1 => CXObjCDeclQualifier_In, - 2 => CXObjCDeclQualifier_Inout, - 4 => CXObjCDeclQualifier_Out, - 8 => CXObjCDeclQualifier_Bycopy, - 16 => CXObjCDeclQualifier_Byref, - 32 => CXObjCDeclQualifier_Oneway, - _ => throw ArgumentError( - 'Unknown value for CXObjCDeclQualifierKind: $value', - ), - }; -} - -/// Property attributes for a \c CXCursor_ObjCPropertyDecl. -enum CXObjCPropertyAttrKind { - CXObjCPropertyAttr_noattr(0), - CXObjCPropertyAttr_readonly(1), - CXObjCPropertyAttr_getter(2), - CXObjCPropertyAttr_assign(4), - CXObjCPropertyAttr_readwrite(8), - CXObjCPropertyAttr_retain(16), - CXObjCPropertyAttr_copy(32), - CXObjCPropertyAttr_nonatomic(64), - CXObjCPropertyAttr_setter(128), - CXObjCPropertyAttr_atomic(256), - CXObjCPropertyAttr_weak(512), - CXObjCPropertyAttr_strong(1024), - CXObjCPropertyAttr_unsafe_unretained(2048), - CXObjCPropertyAttr_class(4096); - - final int value; - const CXObjCPropertyAttrKind(this.value); - - static CXObjCPropertyAttrKind fromValue(int value) => switch (value) { - 0 => CXObjCPropertyAttr_noattr, - 1 => CXObjCPropertyAttr_readonly, - 2 => CXObjCPropertyAttr_getter, - 4 => CXObjCPropertyAttr_assign, - 8 => CXObjCPropertyAttr_readwrite, - 16 => CXObjCPropertyAttr_retain, - 32 => CXObjCPropertyAttr_copy, - 64 => CXObjCPropertyAttr_nonatomic, - 128 => CXObjCPropertyAttr_setter, - 256 => CXObjCPropertyAttr_atomic, - 512 => CXObjCPropertyAttr_weak, - 1024 => CXObjCPropertyAttr_strong, - 2048 => CXObjCPropertyAttr_unsafe_unretained, - 4096 => CXObjCPropertyAttr_class, - _ => throw ArgumentError( - 'Unknown value for CXObjCPropertyAttrKind: $value', - ), - }; -} - /// Describes the availability of a given entity on a particular platform, e.g., /// a particular class might only be available on Mac OS 10.7 or newer. final class CXPlatformAvailability extends ffi.Struct { @@ -10862,24 +10420,6 @@ enum CXRefQualifierKind { /// A remapping of original source files and their translated files. typedef CXRemapping = ffi.Pointer; -/// Flags that control the reparsing of translation units. -/// -/// The enumerators in this enumeration type are meant to be bitwise -/// ORed together to specify which options should be used when -/// reparsing the translation unit. -enum CXReparse_Flags { - /// Used to indicate that no special reparsing options are needed. - CXReparse_None(0); - - final int value; - const CXReparse_Flags(this.value); - - static CXReparse_Flags fromValue(int value) => switch (value) { - 0 => CXReparse_None, - _ => throw ArgumentError('Unknown value for CXReparse_Flags: $value'), - }; -} - enum CXResult { /// Function returned successfully. CXResult_Success(0), @@ -10902,62 +10442,6 @@ enum CXResult { }; } -/// Describes the kind of error that occurred (if any) in a call to -/// \c clang_saveTranslationUnit(). -enum CXSaveError { - /// Indicates that no error occurred while saving a translation unit. - CXSaveError_None(0), - - /// Indicates that an unknown error occurred while attempting to save - /// the file. - /// - /// This error typically indicates that file I/O failed when attempting to - /// write the file. - CXSaveError_Unknown(1), - - /// Indicates that errors during translation prevented this attempt - /// to save the translation unit. - /// - /// Errors that prevent the translation unit from being saved can be - /// extracted using \c clang_getNumDiagnostics() and \c clang_getDiagnostic(). - CXSaveError_TranslationErrors(2), - - /// Indicates that the translation unit to be saved was somehow - /// invalid (e.g., NULL). - CXSaveError_InvalidTU(3); - - final int value; - const CXSaveError(this.value); - - static CXSaveError fromValue(int value) => switch (value) { - 0 => CXSaveError_None, - 1 => CXSaveError_Unknown, - 2 => CXSaveError_TranslationErrors, - 3 => CXSaveError_InvalidTU, - _ => throw ArgumentError('Unknown value for CXSaveError: $value'), - }; -} - -/// Flags that control how translation units are saved. -/// -/// The enumerators in this enumeration type are meant to be bitwise -/// ORed together to specify which options should be used when -/// saving the translation unit. -enum CXSaveTranslationUnit_Flags { - /// Used to indicate that no special saving options are needed. - CXSaveTranslationUnit_None(0); - - final int value; - const CXSaveTranslationUnit_Flags(this.value); - - static CXSaveTranslationUnit_Flags fromValue(int value) => switch (value) { - 0 => CXSaveTranslationUnit_None, - _ => throw ArgumentError( - 'Unknown value for CXSaveTranslationUnit_Flags: $value', - ), - }; -} - /// Identifies a specific source location within a translation /// unit. /// @@ -11271,152 +10755,6 @@ typedef CXTranslationUnit = ffi.Pointer; final class CXTranslationUnitImpl extends ffi.Opaque {} -/// Flags that control the creation of translation units. -/// -/// The enumerators in this enumeration type are meant to be bitwise -/// ORed together to specify which options should be used when -/// constructing the translation unit. -enum CXTranslationUnit_Flags { - /// Used to indicate that no special translation-unit options are - /// needed. - CXTranslationUnit_None(0), - - /// Used to indicate that the parser should construct a "detailed" - /// preprocessing record, including all macro definitions and instantiations. - /// - /// Constructing a detailed preprocessing record requires more memory - /// and time to parse, since the information contained in the record - /// is usually not retained. However, it can be useful for - /// applications that require more detailed information about the - /// behavior of the preprocessor. - CXTranslationUnit_DetailedPreprocessingRecord(1), - - /// Used to indicate that the translation unit is incomplete. - /// - /// When a translation unit is considered "incomplete", semantic - /// analysis that is typically performed at the end of the - /// translation unit will be suppressed. For example, this suppresses - /// the completion of tentative declarations in C and of - /// instantiation of implicitly-instantiation function templates in - /// C++. This option is typically used when parsing a header with the - /// intent of producing a precompiled header. - CXTranslationUnit_Incomplete(2), - - /// Used to indicate that the translation unit should be built with an - /// implicit precompiled header for the preamble. - /// - /// An implicit precompiled header is used as an optimization when a - /// particular translation unit is likely to be reparsed many times - /// when the sources aren't changing that often. In this case, an - /// implicit precompiled header will be built containing all of the - /// initial includes at the top of the main file (what we refer to as - /// the "preamble" of the file). In subsequent parses, if the - /// preamble or the files in it have not changed, \c - /// clang_reparseTranslationUnit() will re-use the implicit - /// precompiled header to improve parsing performance. - CXTranslationUnit_PrecompiledPreamble(4), - - /// Used to indicate that the translation unit should cache some - /// code-completion results with each reparse of the source file. - /// - /// Caching of code-completion results is a performance optimization that - /// introduces some overhead to reparsing but improves the performance of - /// code-completion operations. - CXTranslationUnit_CacheCompletionResults(8), - - /// Used to indicate that the translation unit will be serialized with - /// \c clang_saveTranslationUnit. - /// - /// This option is typically used when parsing a header with the intent of - /// producing a precompiled header. - CXTranslationUnit_ForSerialization(16), - - /// DEPRECATED: Enabled chained precompiled preambles in C++. - /// - /// Note: this is a *temporary* option that is available only while - /// we are testing C++ precompiled preamble support. It is deprecated. - CXTranslationUnit_CXXChainedPCH(32), - - /// Used to indicate that function/method bodies should be skipped while - /// parsing. - /// - /// This option can be used to search for declarations/definitions while - /// ignoring the usages. - CXTranslationUnit_SkipFunctionBodies(64), - - /// Used to indicate that brief documentation comments should be - /// included into the set of code completions returned from this translation - /// unit. - CXTranslationUnit_IncludeBriefCommentsInCodeCompletion(128), - - /// Used to indicate that the precompiled preamble should be created on - /// the first parse. Otherwise it will be created on the first reparse. This - /// trades runtime on the first parse (serializing the preamble takes time) for - /// reduced runtime on the second parse (can now reuse the preamble). - CXTranslationUnit_CreatePreambleOnFirstParse(256), - - /// Do not stop processing when fatal errors are encountered. - /// - /// When fatal errors are encountered while parsing a translation unit, - /// semantic analysis is typically stopped early when compiling code. A common - /// source for fatal errors are unresolvable include files. For the - /// purposes of an IDE, this is undesirable behavior and as much information - /// as possible should be reported. Use this flag to enable this behavior. - CXTranslationUnit_KeepGoing(512), - - /// Sets the preprocessor in a mode for parsing a single file only. - CXTranslationUnit_SingleFileParse(1024), - - /// Used in combination with CXTranslationUnit_SkipFunctionBodies to - /// constrain the skipping of function bodies to the preamble. - /// - /// The function bodies of the main file are not skipped. - CXTranslationUnit_LimitSkipFunctionBodiesToPreamble(2048), - - /// Used to indicate that attributed types should be included in CXType. - CXTranslationUnit_IncludeAttributedTypes(4096), - - /// Used to indicate that implicit attributes should be visited. - CXTranslationUnit_VisitImplicitAttributes(8192), - - /// Used to indicate that non-errors from included files should be ignored. - /// - /// If set, clang_getDiagnosticSetFromTU() will not report e.g. warnings from - /// included files anymore. This speeds up clang_getDiagnosticSetFromTU() for - /// the case where these warnings are not of interest, as for an IDE for - /// example, which typically shows only the diagnostics in the main file. - CXTranslationUnit_IgnoreNonErrorsFromIncludedFiles(16384), - - /// Tells the preprocessor not to skip excluded conditional blocks. - CXTranslationUnit_RetainExcludedConditionalBlocks(32768); - - final int value; - const CXTranslationUnit_Flags(this.value); - - static CXTranslationUnit_Flags fromValue(int value) => switch (value) { - 0 => CXTranslationUnit_None, - 1 => CXTranslationUnit_DetailedPreprocessingRecord, - 2 => CXTranslationUnit_Incomplete, - 4 => CXTranslationUnit_PrecompiledPreamble, - 8 => CXTranslationUnit_CacheCompletionResults, - 16 => CXTranslationUnit_ForSerialization, - 32 => CXTranslationUnit_CXXChainedPCH, - 64 => CXTranslationUnit_SkipFunctionBodies, - 128 => CXTranslationUnit_IncludeBriefCommentsInCodeCompletion, - 256 => CXTranslationUnit_CreatePreambleOnFirstParse, - 512 => CXTranslationUnit_KeepGoing, - 1024 => CXTranslationUnit_SingleFileParse, - 2048 => CXTranslationUnit_LimitSkipFunctionBodiesToPreamble, - 4096 => CXTranslationUnit_IncludeAttributedTypes, - 8192 => CXTranslationUnit_VisitImplicitAttributes, - 16384 => CXTranslationUnit_IgnoreNonErrorsFromIncludedFiles, - 32768 => CXTranslationUnit_RetainExcludedConditionalBlocks, - _ => throw ArgumentError( - 'Unknown value for CXTranslationUnit_Flags: $value', - ), - }; -} - /// The type of an element in the abstract syntax tree. final class CXType extends ffi.Struct { @ffi.UnsignedInt() @@ -11692,45 +11030,6 @@ enum CXTypeKind { } } -/// List the possible error codes for \c clang_Type_getSizeOf, -/// \c clang_Type_getAlignOf, \c clang_Type_getOffsetOf and -/// \c clang_Cursor_getOffsetOf. -/// -/// A value of this enumeration type can be returned if the target type is not -/// a valid argument to sizeof, alignof or offsetof. -enum CXTypeLayoutError { - /// Type is of kind CXType_Invalid. - CXTypeLayoutError_Invalid(-1), - - /// The type is an incomplete Type. - CXTypeLayoutError_Incomplete(-2), - - /// The type is a dependent Type. - CXTypeLayoutError_Dependent(-3), - - /// The type is not a constant size type. - CXTypeLayoutError_NotConstantSize(-4), - - /// The Field name is not valid for this record. - CXTypeLayoutError_InvalidFieldName(-5), - - /// The type is undeduced. - CXTypeLayoutError_Undeduced(-6); - - final int value; - const CXTypeLayoutError(this.value); - - static CXTypeLayoutError fromValue(int value) => switch (value) { - -1 => CXTypeLayoutError_Invalid, - -2 => CXTypeLayoutError_Incomplete, - -3 => CXTypeLayoutError_Dependent, - -4 => CXTypeLayoutError_NotConstantSize, - -5 => CXTypeLayoutError_InvalidFieldName, - -6 => CXTypeLayoutError_Undeduced, - _ => throw ArgumentError('Unknown value for CXTypeLayoutError: $value'), - }; -} - enum CXTypeNullabilityKind { /// Values of this type can never be null. CXTypeNullability_NonNull(0), @@ -12066,7 +11365,3 @@ final class IndexerCallbacks extends ffi.Struct { ..ref.indexDeclaration = indexDeclaration ..ref.indexEntityReference = indexEntityReference; } - -typedef __darwin_time_t = ffi.Long; -typedef Dart__darwin_time_t = int; -typedef time_t = __darwin_time_t; diff --git a/pkgs/ffigen/lib/ffigen.dart b/pkgs/ffigen/lib/ffigen.dart index 26bb068231..a31a1f23bb 100644 --- a/pkgs/ffigen/lib/ffigen.dart +++ b/pkgs/ffigen/lib/ffigen.dart @@ -26,7 +26,6 @@ export 'src/config_provider.dart' EnumStyle, ExternalVersions, FfiGenerator, - Functions, Input, NativeExternalBindings, ObjectiveC, diff --git a/pkgs/ffigen/lib/src/code_generator/binding.dart b/pkgs/ffigen/lib/src/code_generator/binding.dart index 2f4d9c6e81..75620a64ef 100644 --- a/pkgs/ffigen/lib/src/code_generator/binding.dart +++ b/pkgs/ffigen/lib/src/code_generator/binding.dart @@ -32,7 +32,8 @@ abstract class Binding extends AstNode implements Declaration { final String? dartDoc; final bool isInternal; - /// Whether this binding was explicitly included or excluded by a user visitor or filter. + /// Whether this binding was explicitly included or excluded by a user + /// visitor or filter. bool? userDefinedIsIncluded; /// Whether these bindings should be generated. diff --git a/pkgs/ffigen/lib/src/code_generator/func.dart b/pkgs/ffigen/lib/src/code_generator/func.dart index 51359da588..23d0eb7d19 100644 --- a/pkgs/ffigen/lib/src/code_generator/func.dart +++ b/pkgs/ffigen/lib/src/code_generator/func.dart @@ -3,8 +3,10 @@ // BSD-style license that can be found in the LICENSE file. import '../code_generator.dart'; +import '../config_provider/config_types.dart' show VarArgFunction; import '../context.dart'; import '../header_parser/sub_parsers/api_availability.dart'; +import '../strings.dart' as strings; import '../visitor/ast.dart'; import 'binding_string.dart'; import 'local_variables.dart'; @@ -50,6 +52,8 @@ class Func extends LookUpBinding with HasLocalScope { final bool useNameForLookup; bool recordUse; final ApiAvailability? apiAvailability; + final bool isVariadic; + List varArgs; @override final bool loadFromNativeAsset; @@ -82,6 +86,8 @@ class Func extends LookUpBinding with HasLocalScope { super.isInternal, this.loadFromNativeAsset = false, this.apiAvailability, + this.isVariadic = false, + this.varArgs = const [], }) : functionType = FunctionType( returnType: returnType, parameters: parameters, @@ -107,6 +113,39 @@ class Func extends LookUpBinding with HasLocalScope { } } + /// Expands variant [Func] bindings based on [varArgs]. + List expandVarArgs() { + final expanded = []; + for (final vaFunc in varArgs) { + final f = Func( + dartDoc: dartDoc, + usr: usr.isNotEmpty + ? '$usr${strings.synthUsrChar} vaFunc: ${vaFunc.postfix}' + : '', + name: symbol.oldName + vaFunc.postfix, + originalName: originalName, + returnType: functionType.returnType, + parameters: functionType.parameters, + varArgParameters: [ + for (final ta in vaFunc.types) + Parameter(type: ta, name: 'va', objCConsumed: false), + ], + exposeSymbolAddress: exposeSymbolAddress, + exposeFunctionTypedefs: exposeFunctionTypedefs, + isLeaf: isLeaf, + recordUse: recordUse, + objCReturnsRetained: objCReturnsRetained, + loadFromNativeAsset: loadFromNativeAsset, + apiAvailability: apiAvailability, + useNameForLookup: useNameForLookup, + isInternal: isInternal, + ); + f.userDefinedIsIncluded = userDefinedIsIncluded; + expanded.add(f); + } + return expanded; + } + @override BindingString toBindingString(Writer w) { final s = StringBuffer(); diff --git a/pkgs/ffigen/lib/src/code_generator/objc_block.dart b/pkgs/ffigen/lib/src/code_generator/objc_block.dart index 73c06eb2cd..eb0509006c 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_block.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_block.dart @@ -152,7 +152,8 @@ class ObjCBlock extends BindingType with HasLocalScope { '${strings.synthUsrChar} objcBlock:', '${_reducedType(returnType).cacheKey()} ${returnsRetained ? 'R' : ''}', for (final param in params) - '${_reducedType(param.type).cacheKey()} ${param.objCConsumed ? 'C' : ''}', + '${_reducedType(param.type).cacheKey()} ' + '${param.objCConsumed ? 'C' : ''}', ].join(' '); } diff --git a/pkgs/ffigen/lib/src/code_generator/objc_category.dart b/pkgs/ffigen/lib/src/code_generator/objc_category.dart index f5fc47251a..17e2683724 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_category.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_category.dart @@ -49,7 +49,12 @@ class ObjCCategory extends NoLookUpBinding with ObjCMethods, HasLocalScope { @override BindingString toBindingString(Writer w) { - if (isObjCImport) return BindingString(type: BindingStringType.objcCategory, string: ''); + if (isObjCImport) { + return const BindingString( + type: BindingStringType.objcCategory, + string: '', + ); + } final s = StringBuffer(); s.write('\n'); s.write(makeDartDoc(dartDoc)); diff --git a/pkgs/ffigen/lib/src/code_generator/writer.dart b/pkgs/ffigen/lib/src/code_generator/writer.dart index 5a0b8fd1c4..f95e080143 100644 --- a/pkgs/ffigen/lib/src/code_generator/writer.dart +++ b/pkgs/ffigen/lib/src/code_generator/writer.dart @@ -197,7 +197,8 @@ const _\$objcVersionCheck = $objcPrefix.ObjCVersionCheck( 'chosen by the most common compilers for the various OS and ' 'architecture combinations. To prevent any crashes, remove the ' 'enums from your API surface. To rely on the (unsafe!) mimicking, ' - 'you can silence this warning on the EnumClass. Affected enums:\n\t${names.join('\n\t')}', + 'you can silence this warning on the EnumClass. Affected enums:\n\t' + '${names.join('\n\t')}', ); } diff --git a/pkgs/ffigen/lib/src/config_provider/config.dart b/pkgs/ffigen/lib/src/config_provider/config.dart index 7bf8bcbcc7..7a865684eb 100644 --- a/pkgs/ffigen/lib/src/config_provider/config.dart +++ b/pkgs/ffigen/lib/src/config_provider/config.dart @@ -22,9 +22,6 @@ final class FfiGenerator { /// The input configuration for header parsing of [FfiGenerator]. final Input input; - /// Configuration for functions. - final Functions functions; - /// C++ specific configuration. /// /// If `null`, C++ class bindings will not be generated. @@ -73,7 +70,6 @@ final class FfiGenerator { const FfiGenerator({ this.visitors = const [], this.input = const Input(), - this.functions = const Functions(), this.cpp, this.objectiveC, required this.output, @@ -138,19 +134,6 @@ enum EnumStyle { intConstants, } -/// Configuration for function declarations. -final class Functions { - /// Map from function's original name to [VarArgFunction]s. - /// - /// Dart doesn't support variadic functions. Instead, variadic functions are - /// handled by generating multiple versions of the same function, with - /// different signatures. Each [VarArgFunction] represents one of those - /// signatures. - final Map> varArgs; - - const Functions({this.varArgs = const >{}}); -} - /// Configuration for C++. final class Cpp { const Cpp(); diff --git a/pkgs/ffigen/lib/src/config_provider/yaml_config.dart b/pkgs/ffigen/lib/src/config_provider/yaml_config.dart index 5a80310d2f..7280a9a383 100644 --- a/pkgs/ffigen/lib/src/config_provider/yaml_config.dart +++ b/pkgs/ffigen/lib/src/config_provider/yaml_config.dart @@ -357,30 +357,26 @@ final class YamlConfig { HeterogeneousMapEntry( key: strings.headers, required: true, - valueConfigSpec: - HeterogeneousMapConfigSpec, YamlInput>( - entries: [ - HeterogeneousMapEntry( - key: strings.entryPoints, - valueConfigSpec: ListConfigSpec>( - childConfigSpec: StringConfigSpec(), - ), - required: true, - ), - HeterogeneousMapEntry( - key: strings.includeDirectives, - valueConfigSpec: ListConfigSpec>( - childConfigSpec: StringConfigSpec(), - ), - ), - ], - transform: (node) => inputExtractor( - logger, - node.value, - filename?.toFilePath(), + valueConfigSpec: HeterogeneousMapConfigSpec, YamlInput>( + entries: [ + HeterogeneousMapEntry( + key: strings.entryPoints, + valueConfigSpec: ListConfigSpec>( + childConfigSpec: StringConfigSpec(), + ), + required: true, + ), + HeterogeneousMapEntry( + key: strings.includeDirectives, + valueConfigSpec: ListConfigSpec>( + childConfigSpec: StringConfigSpec(), ), - result: (node) => _input = node.value, ), + ], + transform: (node) => + inputExtractor(logger, node.value, filename?.toFilePath()), + result: (node) => _input = node.value, + ), ), HeterogeneousMapEntry( key: strings.ignoreSourceErrors, @@ -1211,6 +1207,7 @@ final class YamlConfig { unionDependencies: _unionDependencies, includeUnusedTypedefs: _includeUnusedTypedefs, useSupportedTypedefs: _useSupportedTypedefs, + varArgFunctions: _varArgFunctions, ); return FfiGenerator( @@ -1235,7 +1232,6 @@ final class YamlConfig { wrapperDocComment: wrapperDocComment, ), ), - functions: Functions(varArgs: varArgFunctions), typedefTypeMappings: _typedefTypeMappings, objectiveC: language == Language.objc ? ObjectiveC( @@ -1278,6 +1274,7 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { final CompoundDependencies _unionDependencies; final bool _includeUnusedTypedefs; final bool _useSupportedTypedefs; + final Map> _varArgFunctions; YamlConfigAstVisitor({ required Map usrTypeMappings, @@ -1304,6 +1301,7 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { required CompoundDependencies unionDependencies, required bool includeUnusedTypedefs, required bool useSupportedTypedefs, + required Map> varArgFunctions, }) : _usrTypeMappings = usrTypeMappings, _typedefTypeMappings = typedefTypeMappings, _functionDecl = functionDecl, @@ -1327,7 +1325,8 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { _structDependencies = structDependencies, _unionDependencies = unionDependencies, _includeUnusedTypedefs = includeUnusedTypedefs, - _useSupportedTypedefs = useSupportedTypedefs; + _useSupportedTypedefs = useSupportedTypedefs, + _varArgFunctions = varArgFunctions; final bool _silenceEnumWarning; @@ -1457,6 +1456,10 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { if (_leafFunctions.shouldInclude(node.originalName)) { node.isLeaf = true; } + final varArgs = _varArgFunctions[node.originalName]; + if (varArgs != null) { + node.varArgs = varArgs; + } for (final p in node.parameters) { final pRenamed = _functionDecl.renameMember( node.originalName, @@ -1585,7 +1588,8 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { } else if (_objcCategories.isExplicitlyExcluded(node.originalName)) { node.isIncluded = false; } else if (isParentInterfaceIncluded) { - // Category extends an explicitly included interface with includeCategories=true. + // Category extends an explicitly included interface with + // includeCategories=true. node.isIncluded = true; } else if (_objcCategories.excludeAllByDefault) { node.isIncluded = false; diff --git a/pkgs/ffigen/lib/src/header_parser/parser.dart b/pkgs/ffigen/lib/src/header_parser/parser.dart index 05950f8960..e535d6d3c6 100644 --- a/pkgs/ffigen/lib/src/header_parser/parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/parser.dart @@ -188,6 +188,19 @@ List transformBindings(List rawBindings, Context context) { publicAst.accept(v); } + final expandedBindings = {}; + for (final binding in allBindingsWithImports) { + if (binding is Func && binding.isVariadic && binding.varArgs.isNotEmpty) { + expandedBindings.addAll(binding.expandVarArgs()); + } else { + expandedBindings.add(binding); + } + } + allBindingsWithImports.clear(); + allBindingsWithImports.addAll(expandedBindings); + allBindings.clear(); + allBindings.addAll(expandedBindings.where((b) => !b.isObjCImport)); + final applyConfigFiltersVisitation = ApplyConfigFiltersVisitation(config); visit(context, applyConfigFiltersVisitation, allBindingsWithImports); final directlyIncluded = applyConfigFiltersVisitation.directlyIncluded; diff --git a/pkgs/ffigen/lib/src/header_parser/sub_parsers/functiondecl_parser.dart b/pkgs/ffigen/lib/src/header_parser/sub_parsers/functiondecl_parser.dart index bf2a6d925d..d382e3f862 100644 --- a/pkgs/ffigen/lib/src/header_parser/sub_parsers/functiondecl_parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/sub_parsers/functiondecl_parser.dart @@ -4,9 +4,7 @@ import '../../code_generator.dart'; import '../../config_provider/config.dart'; -import '../../config_provider/config_types.dart'; import '../../context.dart'; -import '../../strings.dart'; import '../clang_bindings/clang_bindings.dart' as clang_types; import '../utils.dart'; import 'api_availability.dart'; @@ -88,49 +86,30 @@ List parseFunctionDeclaration( clang_types.CXCursorKind.CXCursor_NSReturnsRetained, ); - // Initialized with a single value with no prefix and empty var args. - var varArgFunctions = [null]; - if (config.functions.varArgs.containsKey(funcName)) { - if (clang.clang_isFunctionTypeVariadic(cursor.type()) == 1) { - varArgFunctions = config.functions.varArgs[funcName]!; - } else { - logger.warning( - 'Skipping variadic-argument config for function ' - "'$funcName' since its not variadic.", - ); - } - } - for (final vaFunc in varArgFunctions) { - var usr = funcUsr; - if (vaFunc != null) usr += '$synthUsrChar vaFunc: ${vaFunc.postfix}'; - funcs.add( - Func( - dartDoc: getCursorDocComment( - context, - cursor, - indent: nesting.length + commentPrefix.length, - availability: apiAvailability.dartDoc, - ), - usr: usr, - name: funcName + (vaFunc?.postfix ?? ''), - originalName: funcName, - returnType: returnType, - parameters: parameters, - varArgParameters: [ - for (final ta in vaFunc?.types ?? const []) - Parameter(type: ta, name: 'va', objCConsumed: false), - ], - exposeSymbolAddress: false, - exposeFunctionTypedefs: false, - isLeaf: false, - recordUse: false, - objCReturnsRetained: objCReturnsRetained, - loadFromNativeAsset: config.output.style is NativeExternalBindings, - apiAvailability: apiAvailability, - ), - ); - } - context.bindingsIndex.addFuncToSeen(funcUsr, funcs.last); + final isVariadic = clang.clang_isFunctionTypeVariadic(cursor.type()) == 1; + final func = Func( + dartDoc: getCursorDocComment( + context, + cursor, + indent: nesting.length + commentPrefix.length, + availability: apiAvailability.dartDoc, + ), + usr: funcUsr, + name: funcName, + originalName: funcName, + returnType: returnType, + parameters: parameters, + exposeSymbolAddress: false, + exposeFunctionTypedefs: false, + isLeaf: false, + recordUse: false, + objCReturnsRetained: objCReturnsRetained, + loadFromNativeAsset: config.output.style is NativeExternalBindings, + apiAvailability: apiAvailability, + isVariadic: isVariadic, + ); + funcs.add(func); + context.bindingsIndex.addFuncToSeen(funcUsr, func); } return funcs; diff --git a/pkgs/ffigen/lib/src/public_ast/public_ast.dart b/pkgs/ffigen/lib/src/public_ast/public_ast.dart index 477953d588..4ef9f00122 100644 --- a/pkgs/ffigen/lib/src/public_ast/public_ast.dart +++ b/pkgs/ffigen/lib/src/public_ast/public_ast.dart @@ -411,6 +411,11 @@ class Func extends Decl { bool get recordUse => _binding.recordUse; set recordUse(bool value) => _binding.recordUse = value; + bool get isVariadic => _binding.isVariadic; + + List get varArgs => _binding.varArgs; + set varArgs(List value) => _binding.varArgs = value; + List get parameters => _binding.functionType.parameters.map(Parameter.new).toList(); diff --git a/pkgs/ffigen/pubspec.yaml b/pkgs/ffigen/pubspec.yaml index 9d892a13aa..6f50a81b29 100644 --- a/pkgs/ffigen/pubspec.yaml +++ b/pkgs/ffigen/pubspec.yaml @@ -39,8 +39,8 @@ dependencies: yaml_edit: ^2.0.3 dev_dependencies: - async: ^2.11.0 analyzer: ^8.1.1 + async: ^2.11.0 dart_flutter_team_lints: ^3.5.2 json_schema: ^5.1.1 leak_tracker: ^11.0.2 diff --git a/pkgs/ffigen/test/header_parser_tests/record_use_test.dart b/pkgs/ffigen/test/header_parser_tests/record_use_test.dart index f5af365904..5e20cc752d 100644 --- a/pkgs/ffigen/test/header_parser_tests/record_use_test.dart +++ b/pkgs/ffigen/test/header_parser_tests/record_use_test.dart @@ -4,13 +4,12 @@ import 'package:ffigen/src/config_provider.dart'; import 'package:ffigen/src/header_parser.dart' show parse; +import 'package:ffigen/src/public_ast/public_ast.dart'; import 'package:path/path.dart' as p; import 'package:test/test.dart'; import '../test_utils.dart'; -import 'package:ffigen/src/public_ast/public_ast.dart'; - class _RecordUseVisitor extends Visitor { @override void visitFunc(Func node) { diff --git a/pkgs/ffigen/test/large_integration_tests/large_objc_test.dart b/pkgs/ffigen/test/large_integration_tests/large_objc_test.dart index d9ec608495..6a54e1a829 100644 --- a/pkgs/ffigen/test/large_integration_tests/large_objc_test.dart +++ b/pkgs/ffigen/test/large_integration_tests/large_objc_test.dart @@ -32,6 +32,9 @@ Future run(String exe, List args) async { return await process.exitCode; } +// Reducing the bindings to a random subset so that the test completes in a +// reasonable amount of time. +// TODO(https://github.com/dart-lang/sdk/issues/56247): Remove this. class _RandomIncludeVisitor extends Visitor { static const inclusionRatio = 0.1; static const seed = 1234; @@ -79,18 +82,25 @@ class _RandomIncludeVisitor extends Visitor { void visitObjCInterface(ObjCInterface node) { node.isIncluded = _randInclude('objcInterfaces', node.usr); for (final m in node.methods) { - m.isIncluded = - _randInclude('objcInterfaces.memb', node.usr, m.originalName); + m.isIncluded = _randInclude( + 'objcInterfaces.memb', + node.usr, + m.originalName, + ); } } @override void visitObjCProtocol(ObjCProtocol node) { - node.isIncluded = forceIncludedProtocols.contains(node.originalName) || + node.isIncluded = + forceIncludedProtocols.contains(node.originalName) || _randInclude('objcProtocols', node.usr); for (final m in node.methods) { - m.isIncluded = - _randInclude('objcProtocols.memb', node.usr, m.originalName); + m.isIncluded = _randInclude( + 'objcProtocols.memb', + node.usr, + m.originalName, + ); } } @@ -98,8 +108,11 @@ class _RandomIncludeVisitor extends Visitor { void visitObjCCategory(ObjCCategory node) { node.isIncluded = _randInclude('objcCategories', node.usr); for (final m in node.methods) { - m.isIncluded = - _randInclude('objcCategories.memb', node.usr, m.originalName); + m.isIncluded = _randInclude( + 'objcCategories.memb', + node.usr, + m.originalName, + ); } } } diff --git a/pkgs/ffigen/test/native_cpp_test/verify_bindings_test.dart b/pkgs/ffigen/test/native_cpp_test/verify_bindings_test.dart index 22ad14d744..4c990cea07 100644 --- a/pkgs/ffigen/test/native_cpp_test/verify_bindings_test.dart +++ b/pkgs/ffigen/test/native_cpp_test/verify_bindings_test.dart @@ -46,7 +46,9 @@ void main() { ), cpp: const Cpp(), visitors: [ - const IncludeSetVisitor(cppClasses: {'Animal', 'FinalizerTestSubject'}), + const IncludeSetVisitor( + cppClasses: {'Animal', 'FinalizerTestSubject'}, + ), ], ), 'memory_edge_cases': FfiGenerator( diff --git a/pkgs/ffigen/test/public_ast_visitor_test.dart b/pkgs/ffigen/test/public_ast_visitor_test.dart index 43b5d003ce..cca6799a6c 100644 --- a/pkgs/ffigen/test/public_ast_visitor_test.dart +++ b/pkgs/ffigen/test/public_ast_visitor_test.dart @@ -216,6 +216,31 @@ void main() { as code_gen.ObjCInterface; expect(interface.includeCategories, isFalse); }); + + test('Visitor setting varArgs for variadic functions', () { + final headerUri = Uri.file(absPath('test/header_parser_tests/varargs.h')); + final generator = FfiGenerator( + input: Input(entryPoints: [headerUri]), + output: Output(dartFile: Uri.file('unused.dart')), + visitors: [ + const IncludeAllVisitor(), + Visitor( + visitFunc: (Func node) { + if (node.originalName == 'myfunc') { + node.varArgs = [ + VarArgFunction('custom', [code_gen.intType]), + ]; + } + }, + ), + ], + ); + + final library = parser.parse(testContext(generator)); + final func = library.getBinding('myfunccustom') as code_gen.Func; + expect(func, isNotNull); + expect(func.name, 'myfunccustom'); + }); }); } diff --git a/pkgs/ffigen/test/test_utils.dart b/pkgs/ffigen/test/test_utils.dart index f833042b01..1b6a2509b8 100644 --- a/pkgs/ffigen/test/test_utils.dart +++ b/pkgs/ffigen/test/test_utils.dart @@ -4,8 +4,8 @@ import 'dart:ffi'; import 'dart:io'; -import 'package:ffi/ffi.dart'; +import 'package:ffi/ffi.dart'; import 'package:ffigen/src/code_generator.dart'; import 'package:ffigen/src/code_generator/scope.dart'; import 'package:ffigen/src/code_generator/utils.dart'; @@ -13,6 +13,7 @@ import 'package:ffigen/src/config_provider/config.dart'; import 'package:ffigen/src/config_provider/utils.dart'; import 'package:ffigen/src/config_provider/yaml_config.dart'; import 'package:ffigen/src/context.dart'; +import 'package:ffigen/src/public_ast/public_ast.dart'; import 'package:ffigen/src/visitor/ast.dart'; import 'package:ffigen/src/visitor/visitor.dart'; import 'package:logging/logging.dart'; @@ -21,8 +22,6 @@ import 'package:path/path.dart' as path; import 'package:test/test.dart'; import 'package:yaml/yaml.dart' as yaml; -import 'package:ffigen/src/public_ast/public_ast.dart'; - export 'package:ffigen/src/config_provider/utils.dart'; export 'package:ffigen/src/public_ast/public_ast.dart' show ExcludeAllVisitor, IncludeAllVisitor, IncludeSetVisitor, Visitor; diff --git a/pkgs/ffigen/test/unit_tests/config_util_test.dart b/pkgs/ffigen/test/unit_tests/config_util_test.dart index f40d5e69d8..09c968edcd 100644 --- a/pkgs/ffigen/test/unit_tests/config_util_test.dart +++ b/pkgs/ffigen/test/unit_tests/config_util_test.dart @@ -22,7 +22,7 @@ Struct createStruct(String name) { void main() { group('Visitor utils', () { test('IncludeSetVisitor', () { - final visitor = IncludeSetVisitor(structs: {'foo', 'bar'}); + final visitor = const IncludeSetVisitor(structs: {'foo', 'bar'}); final structFoo = createStruct('foo'); final structBaz = createStruct('baz'); visitor.visitStruct(structFoo); @@ -32,7 +32,7 @@ void main() { }); test('RenameMapVisitor', () { - final visitor = RenameMapVisitor({'foo': 'bar'}); + final visitor = const RenameMapVisitor({'foo': 'bar'}); final structFoo = createStruct('foo'); final structBaz = createStruct('baz'); visitor.visitStruct(structFoo); diff --git a/pkgs/ffigen/tool/check_sorted_bindings.dart b/pkgs/ffigen/tool/check_sorted_bindings.dart index e5409e3a02..81c5655902 100644 --- a/pkgs/ffigen/tool/check_sorted_bindings.dart +++ b/pkgs/ffigen/tool/check_sorted_bindings.dart @@ -58,7 +58,7 @@ String createUnifiedDiff( } } - int i = 0, j = 0; + var i = 0, j = 0; final edits = <_DiffOp>[]; while (i < m && j < n) { if (oldLines[i] == newLines[j]) { @@ -89,7 +89,7 @@ String createUnifiedDiff( buf.writeln('--- $oldHeader'); buf.writeln('+++ $newHeader'); - int idx = 0; + var idx = 0; while (idx < edits.length) { while (idx < edits.length && edits[idx].type == _DiffOpType.equal) { idx++; @@ -97,16 +97,18 @@ String createUnifiedDiff( if (idx >= edits.length) break; final hunkStart = (idx - contextSize).clamp(0, edits.length); - int hunkEnd = idx; + var hunkEnd = idx; while (hunkEnd < edits.length) { if (edits[hunkEnd].type != _DiffOpType.equal) { hunkEnd = (hunkEnd + contextSize + 1).clamp(0, edits.length); } else { - int nextChange = hunkEnd; - while (nextChange < edits.length && edits[nextChange].type == _DiffOpType.equal) { + var nextChange = hunkEnd; + while (nextChange < edits.length && + edits[nextChange].type == _DiffOpType.equal) { nextChange++; } - if (nextChange < edits.length && nextChange - hunkEnd <= contextSize * 2) { + if (nextChange < edits.length && + nextChange - hunkEnd <= contextSize * 2) { hunkEnd = nextChange; } else { break; @@ -116,9 +118,13 @@ String createUnifiedDiff( final hunkEdits = edits.sublist(hunkStart, hunkEnd); final oldStart = hunkEdits.first.oldLine; - final oldLength = hunkEdits.where((e) => e.type != _DiffOpType.insert).length; + final oldLength = hunkEdits + .where((e) => e.type != _DiffOpType.insert) + .length; final newStart = hunkEdits.first.newLine; - final newLength = hunkEdits.where((e) => e.type != _DiffOpType.delete).length; + final newLength = hunkEdits + .where((e) => e.type != _DiffOpType.delete) + .length; buf.writeln('@@ -$oldStart,$oldLength +$newStart,$newLength @@'); for (final edit in hunkEdits) { @@ -196,7 +202,9 @@ Future main() async { final files = []; - final result = Process.runSync('git', ['ls-files'], workingDirectory: repoRoot); + final result = Process.runSync('git', [ + 'ls-files', + ], workingDirectory: repoRoot); if (result.exitCode != 0) { print('Error: git ls-files failed with code ${result.exitCode}'); print(result.stderr); @@ -220,15 +228,16 @@ Future main() async { continue; } if (isGeneratedBindingFile(file)) { - files.add(FileInfo( - file: file, - repoRelativePath: repoRelativePath, - size: file.lengthSync(), - )); + files.add( + FileInfo( + file: file, + repoRelativePath: repoRelativePath, + size: file.lengthSync(), + ), + ); } } - // Sort strictly by file size in bytes (smallest to largest) files.sort((a, b) { final sizeCompare = a.size.compareTo(b.size); @@ -250,15 +259,23 @@ Future main() async { final currentContent = fileInfo.file.readAsStringSync(); - var gitResult = await Process.run('git', ['show', 'main:${fileInfo.repoRelativePath}']); + var gitResult = await Process.run('git', [ + 'show', + 'main:${fileInfo.repoRelativePath}', + ]); if (gitResult.exitCode != 0) { - final originResult = await Process.run('git', ['show', 'origin/main:${fileInfo.repoRelativePath}']); + final originResult = await Process.run('git', [ + 'show', + 'origin/main:${fileInfo.repoRelativePath}', + ]); if (originResult.exitCode == 0) { gitResult = originResult; } } - final mainContent = gitResult.exitCode == 0 ? (gitResult.stdout as String) : ''; + final mainContent = gitResult.exitCode == 0 + ? (gitResult.stdout as String) + : ''; final currentSummary = summarizeContent(currentContent); final mainSummary = summarizeContent(mainContent); diff --git a/pkgs/objective_c/lib/src/objc_built_in_types.dart b/pkgs/objective_c/lib/src/objc_built_in_types.dart index a60e8d35e1..5010cbd13b 100644 --- a/pkgs/objective_c/lib/src/objc_built_in_types.dart +++ b/pkgs/objective_c/lib/src/objc_built_in_types.dart @@ -12,7 +12,8 @@ const objCBuiltInInterfaces = { 'DOBJCDartProtocolBuilder': 'DartProtocolBuilder', 'NSArray': 'NSArray', 'NSAttributedString': 'NSAttributedString', - 'NSAttributedStringMarkdownParsingOptions': 'NSAttributedStringMarkdownParsingOptions', + 'NSAttributedStringMarkdownParsingOptions': + 'NSAttributedStringMarkdownParsingOptions', 'NSBundle': 'NSBundle', 'NSCharacterSet': 'NSCharacterSet', 'NSCoder': 'NSCoder', diff --git a/pkgs/objective_c/tool/generate_code.dart b/pkgs/objective_c/tool/generate_code.dart index 460469aa96..53c88c69c0 100644 --- a/pkgs/objective_c/tool/generate_code.dart +++ b/pkgs/objective_c/tool/generate_code.dart @@ -284,8 +284,7 @@ class CBindingsVisitor extends Visitor { class ObjCBindingsVisitor extends Visitor { static const interfaces = { 'DOBJCDartInputStreamAdapter': 'DartInputStreamAdapter', - 'DOBJCDartInputStreamAdapterWeakHolder': - 'DartInputStreamAdapterWeakHolder', + 'DOBJCDartInputStreamAdapterWeakHolder': 'DartInputStreamAdapterWeakHolder', 'DOBJCObservation': 'DOBJCObservation', 'DOBJCDartProtocolBuilder': 'DartProtocolBuilder', 'DOBJCDartProtocol': 'DartProtocol', @@ -531,8 +530,11 @@ class ObjCBindingsVisitor extends Visitor { List writeBuiltInTypes(String out, String bindingsFile) { final bindingsLines = File(bindingsFile).readAsLinesSync(); - Set findBindings(RegExp re) => - bindingsLines.map(re.firstMatch).nonNulls.map((match) => match[1]!).toSet(); + Set findBindings(RegExp re) => bindingsLines + .map(re.firstMatch) + .nonNulls + .map((match) => match[1]!) + .toSet(); final genInterfaces = findBindings( RegExp(r'^extension type ([^_]\w*)\._\( *objc\.ObjCObject '), @@ -555,21 +557,33 @@ List writeBuiltInTypes(String out, String bindingsFile) { final interfacesMap = { for (final name in genInterfaces) - (ObjCBindingsVisitor.interfaces.entries - .firstWhere((e) => e.value == name, orElse: () => MapEntry(name, name)) - .key): name, + ObjCBindingsVisitor.interfaces.entries + .firstWhere( + (e) => e.value == name, + orElse: () => MapEntry(name, name), + ) + .key: + name, }; final structsMap = { for (final name in genStructs) - (ObjCBindingsVisitor.structs.entries - .firstWhere((e) => e.value == name, orElse: () => MapEntry(name, name)) - .key): name, + ObjCBindingsVisitor.structs.entries + .firstWhere( + (e) => e.value == name, + orElse: () => MapEntry(name, name), + ) + .key: + name, }; final protocolsMap = { for (final name in genProtocols) - (ObjCBindingsVisitor.protocols.entries - .firstWhere((e) => e.value == name, orElse: () => MapEntry(name, name)) - .key): name, + ObjCBindingsVisitor.protocols.entries + .firstWhere( + (e) => e.value == name, + orElse: () => MapEntry(name, name), + ) + .key: + name, }; final s = StringBuffer(); @@ -589,21 +603,18 @@ List writeBuiltInTypes(String out, String bindingsFile) { Iterable? namesIterable, ]) { final keys = namesIterable ?? namesMap.keys; - final map = - namesIterable != null - ? {for (final k in keys) k: k} - : Map.from(namesMap); + final map = namesIterable != null + ? {for (final k in keys) k: k} + : Map.from(namesMap); exports.addAll(map.values); final anyRenames = map.entries.any((kv) => kv.key != kv.value); - final elements = - anyRenames - ? map.entries.map( - (kv) => - " '${kv.key.replaceAll(r'$', r'\$')}': '${kv.value.replaceAll(r'$', r'\$')}',", - ) - : map.keys.map( - (key) => " '${key.replaceAll(r'$', r'\$')}',", - ); + final elements = anyRenames + ? map.entries.map( + (kv) => + " '${kv.key.replaceAll(r'$', r'\$')}': " + "'${kv.value.replaceAll(r'$', r'\$')}',", + ) + : map.keys.map((key) => " '${key.replaceAll(r'$', r'\$')}',"); s.write(''' @@ -625,9 +636,7 @@ ${elements.join('\n')} for (final name in protocolsMap.values) if (genAllExtensions.contains('$name\$Methods')) '$name\$Methods', ]); - exports.addAll([ - for (final name in protocolsMap.values) '$name\$Builder', - ]); + exports.addAll([for (final name in protocolsMap.values) '$name\$Builder']); writeDecls('objCBuiltInCategories', {}, genCategories); File(out).writeAsStringSync(s.toString()); @@ -718,9 +727,7 @@ Future run({required bool format}) async { root.resolve('src/protocol.h'), ], ), - objectiveC: const ObjectiveC( - generateForPackageObjectiveC: true, - ), + objectiveC: const ObjectiveC(generateForPackageObjectiveC: true), visitors: [const ObjCBindingsVisitor()], output: Output( preamble: ''' From 983d31f390700c0e5b5326e6ab5cb49a4d664446 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Thu, 30 Jul 2026 19:49:03 +1000 Subject: [PATCH 18/37] more cleanup --- pkgs/ffigen/ffigen.schema.json | 3 --- pkgs/ffigen/lib/ffigen.dart | 2 +- .../lib/src/code_generator/typealias.dart | 9 --------- .../ffigen/lib/src/config_provider/config.dart | 2 +- .../public_ast.dart | 3 --- .../lib/src/config_provider/yaml_config.dart | 18 ++---------------- pkgs/ffigen/lib/src/header_parser/parser.dart | 2 +- .../type_extractor/extractor.dart | 2 +- pkgs/ffigen/lib/src/strings.dart | 1 - .../header_parser_tests/record_use_test.dart | 2 +- .../large_integration_tests/large_test.dart | 2 +- pkgs/ffigen/test/test_utils.dart | 6 +++--- 12 files changed, 11 insertions(+), 41 deletions(-) rename pkgs/ffigen/lib/src/{public_ast => config_provider}/public_ast.dart (99%) diff --git a/pkgs/ffigen/ffigen.schema.json b/pkgs/ffigen/ffigen.schema.json index e0893174df..fe173ce01b 100644 --- a/pkgs/ffigen/ffigen.schema.json +++ b/pkgs/ffigen/ffigen.schema.json @@ -433,9 +433,6 @@ "sort": { "type": "boolean" }, - "use-supported-typedefs": { - "type": "boolean" - }, "comments": { "$oneOf": [ { diff --git a/pkgs/ffigen/lib/ffigen.dart b/pkgs/ffigen/lib/ffigen.dart index a31a1f23bb..e0b62e033e 100644 --- a/pkgs/ffigen/lib/ffigen.dart +++ b/pkgs/ffigen/lib/ffigen.dart @@ -43,4 +43,4 @@ export 'src/config_provider.dart' macSdkUri, xcodePath, xcodeUri; -export 'src/public_ast/public_ast.dart'; +export 'src/config_provider/public_ast.dart'; diff --git a/pkgs/ffigen/lib/src/code_generator/typealias.dart b/pkgs/ffigen/lib/src/code_generator/typealias.dart index 5263d14635..8c004fa28a 100644 --- a/pkgs/ffigen/lib/src/code_generator/typealias.dart +++ b/pkgs/ffigen/lib/src/code_generator/typealias.dart @@ -27,7 +27,6 @@ class Typealias extends BindingType { bool isAnonymous; bool includeUnused; - bool useSupportedTypedefs; /// Creates a Typealias. /// @@ -42,7 +41,6 @@ class Typealias extends BindingType { bool genFfiDartType = false, bool isInternal = false, bool includeUnused = false, - bool useSupportedTypedefs = true, }) { final funcType = _getFunctionTypeFromPointer(type); if (funcType != null) { @@ -54,7 +52,6 @@ class Typealias extends BindingType { genFfiDartType: genFfiDartType, isInternal: isInternal, includeUnused: includeUnused, - useSupportedTypedefs: useSupportedTypedefs, ), ), ); @@ -70,7 +67,6 @@ class Typealias extends BindingType { genFfiDartType: genFfiDartType, isInternal: isInternal, includeUnused: includeUnused, - useSupportedTypedefs: useSupportedTypedefs, ); } return Typealias._( @@ -82,7 +78,6 @@ class Typealias extends BindingType { genFfiDartType: genFfiDartType, isInternal: isInternal, includeUnused: includeUnused, - useSupportedTypedefs: useSupportedTypedefs, ); } @@ -91,14 +86,12 @@ class Typealias extends BindingType { required String name, required Type type, bool includeUnused = false, - bool useSupportedTypedefs = true, }) : this._( usr: usr, name: name, type: type, isAnonymous: true, includeUnused: includeUnused, - useSupportedTypedefs: useSupportedTypedefs, ); Typealias._({ @@ -111,7 +104,6 @@ class Typealias extends BindingType { super.isInternal, this.isAnonymous = false, this.includeUnused = false, - this.useSupportedTypedefs = true, }) : _ffiDartAliasName = genFfiDartType ? Symbol('Dart$name', SymbolKind.klass) : null, @@ -267,7 +259,6 @@ class ObjCInstanceType extends Typealias { super.genFfiDartType, super.isInternal, super.includeUnused, - super.useSupportedTypedefs, }) : super._(); @override diff --git a/pkgs/ffigen/lib/src/config_provider/config.dart b/pkgs/ffigen/lib/src/config_provider/config.dart index 7a865684eb..a783922966 100644 --- a/pkgs/ffigen/lib/src/config_provider/config.dart +++ b/pkgs/ffigen/lib/src/config_provider/config.dart @@ -9,8 +9,8 @@ import 'package:meta/meta.dart'; import '../code_generator.dart'; import '../ffigen.dart'; -import '../public_ast/public_ast.dart' show Visitor; import 'config_types.dart'; +import 'public_ast.dart' show Visitor; /// The generator that generates bindings for `dart:ffi` from C and Objective-C /// headers. diff --git a/pkgs/ffigen/lib/src/public_ast/public_ast.dart b/pkgs/ffigen/lib/src/config_provider/public_ast.dart similarity index 99% rename from pkgs/ffigen/lib/src/public_ast/public_ast.dart rename to pkgs/ffigen/lib/src/config_provider/public_ast.dart index 4ef9f00122..bafbcfefdc 100644 --- a/pkgs/ffigen/lib/src/public_ast/public_ast.dart +++ b/pkgs/ffigen/lib/src/config_provider/public_ast.dart @@ -514,9 +514,6 @@ class Typealias extends Decl { bool get includeUnused => _binding.includeUnused; set includeUnused(bool value) => _binding.includeUnused = value; - bool get useSupportedTypedefs => _binding.useSupportedTypedefs; - set useSupportedTypedefs(bool value) => _binding.useSupportedTypedefs = value; - @override void accept(Visitor visitor) => visitor.visitTypealias(this); } diff --git a/pkgs/ffigen/lib/src/config_provider/yaml_config.dart b/pkgs/ffigen/lib/src/config_provider/yaml_config.dart index 7280a9a383..bd2d577d82 100644 --- a/pkgs/ffigen/lib/src/config_provider/yaml_config.dart +++ b/pkgs/ffigen/lib/src/config_provider/yaml_config.dart @@ -12,11 +12,11 @@ import 'package:package_config/package_config_types.dart'; import 'package:yaml/yaml.dart'; import '../code_generator.dart'; -import '../public_ast/public_ast.dart' as public_ast; import '../strings.dart' as strings; import 'config.dart'; import 'config_spec.dart'; import 'config_types.dart'; +import 'public_ast.dart' as public_ast; import 'spec_utils.dart'; /// Provides configurations to other modules. @@ -130,10 +130,6 @@ final class YamlConfig { bool get sort => _sort; late bool _sort; - /// If typedef of supported types(int8_t) should be directly used. - bool get useSupportedTypedefs => _useSupportedTypedefs; - late bool _useSupportedTypedefs; - /// Stores all the library imports specified by user including those for ffi /// and pkg_ffi. Map get libraryImports => _libraryImports; @@ -788,12 +784,7 @@ final class YamlConfig { defaultValue: (node) => false, resultOrDefault: (node) => _sort = node.value as bool, ), - HeterogeneousMapEntry( - key: strings.useSupportedTypedefs, - valueConfigSpec: BoolConfigSpec(), - defaultValue: (node) => true, - resultOrDefault: (node) => _useSupportedTypedefs = node.value as bool, - ), + HeterogeneousMapEntry( key: strings.comments, valueConfigSpec: _commentConfigSpec(), @@ -1206,7 +1197,6 @@ final class YamlConfig { structDependencies: _structDependencies, unionDependencies: _unionDependencies, includeUnusedTypedefs: _includeUnusedTypedefs, - useSupportedTypedefs: _useSupportedTypedefs, varArgFunctions: _varArgFunctions, ); @@ -1273,7 +1263,6 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { final CompoundDependencies _structDependencies; final CompoundDependencies _unionDependencies; final bool _includeUnusedTypedefs; - final bool _useSupportedTypedefs; final Map> _varArgFunctions; YamlConfigAstVisitor({ @@ -1300,7 +1289,6 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { required CompoundDependencies structDependencies, required CompoundDependencies unionDependencies, required bool includeUnusedTypedefs, - required bool useSupportedTypedefs, required Map> varArgFunctions, }) : _usrTypeMappings = usrTypeMappings, _typedefTypeMappings = typedefTypeMappings, @@ -1325,7 +1313,6 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { _structDependencies = structDependencies, _unionDependencies = unionDependencies, _includeUnusedTypedefs = includeUnusedTypedefs, - _useSupportedTypedefs = useSupportedTypedefs, _varArgFunctions = varArgFunctions; final bool _silenceEnumWarning; @@ -1495,7 +1482,6 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { @override void visitTypealias(public_ast.Typealias node) { node.includeUnused = _includeUnusedTypedefs; - node.useSupportedTypedefs = _useSupportedTypedefs; if (_typedefTypeMappings.containsKey(node.originalName)) { node.isIncluded = false; } else { diff --git a/pkgs/ffigen/lib/src/header_parser/parser.dart b/pkgs/ffigen/lib/src/header_parser/parser.dart index e535d6d3c6..14227a2c6b 100644 --- a/pkgs/ffigen/lib/src/header_parser/parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/parser.dart @@ -12,9 +12,9 @@ import 'package:meta/meta.dart'; import '../code_generator.dart'; import '../code_generator/scope.dart'; import '../config_provider.dart'; +import '../config_provider/public_ast.dart' as public_ast; import '../config_provider/utils.dart'; import '../context.dart'; -import '../public_ast/public_ast.dart' as public_ast; import '../strings.dart' as strings; import '../visitor/apply_config_filters.dart'; import '../visitor/ast.dart'; diff --git a/pkgs/ffigen/lib/src/header_parser/type_extractor/extractor.dart b/pkgs/ffigen/lib/src/header_parser/type_extractor/extractor.dart index c77f57056f..ec7c3e57d6 100644 --- a/pkgs/ffigen/lib/src/header_parser/type_extractor/extractor.dart +++ b/pkgs/ffigen/lib/src/header_parser/type_extractor/extractor.dart @@ -185,7 +185,7 @@ Type? _createTypeFromCursor( logger.fine(' Type Mapped from custom typedefTypeMappings'); return config.typedefTypeMappings[spelling]!; } - // Get name from supported typedef name if config allows. + // Get name from supported typedef name. if (suportedTypedefToSuportedNativeType.containsKey(spelling)) { logger.fine(' Type Mapped from supported typedef'); return NativeType(suportedTypedefToSuportedNativeType[spelling]!); diff --git a/pkgs/ffigen/lib/src/strings.dart b/pkgs/ffigen/lib/src/strings.dart index be2579959b..d865c1718e 100644 --- a/pkgs/ffigen/lib/src/strings.dart +++ b/pkgs/ffigen/lib/src/strings.dart @@ -208,7 +208,6 @@ const supportedNativeTypeMappings = { // Boolean flags. const sort = 'sort'; -const useSupportedTypedefs = 'use-supported-typedefs'; const silenceEnumWarning = 'silence-enum-warning'; const ignoreSourceErrors = 'ignore-source-errors'; diff --git a/pkgs/ffigen/test/header_parser_tests/record_use_test.dart b/pkgs/ffigen/test/header_parser_tests/record_use_test.dart index 5e20cc752d..7199e84704 100644 --- a/pkgs/ffigen/test/header_parser_tests/record_use_test.dart +++ b/pkgs/ffigen/test/header_parser_tests/record_use_test.dart @@ -3,8 +3,8 @@ // BSD-style license that can be found in the LICENSE file. import 'package:ffigen/src/config_provider.dart'; +import 'package:ffigen/src/config_provider/public_ast.dart'; import 'package:ffigen/src/header_parser.dart' show parse; -import 'package:ffigen/src/public_ast/public_ast.dart'; import 'package:path/path.dart' as p; import 'package:test/test.dart'; diff --git a/pkgs/ffigen/test/large_integration_tests/large_test.dart b/pkgs/ffigen/test/large_integration_tests/large_test.dart index 761dfa190a..8726dafe7a 100644 --- a/pkgs/ffigen/test/large_integration_tests/large_test.dart +++ b/pkgs/ffigen/test/large_integration_tests/large_test.dart @@ -4,9 +4,9 @@ import 'package:ffigen/src/config_provider/config.dart'; import 'package:ffigen/src/config_provider/config_types.dart'; +import 'package:ffigen/src/config_provider/public_ast.dart'; import 'package:ffigen/src/context.dart'; import 'package:ffigen/src/header_parser.dart'; -import 'package:ffigen/src/public_ast/public_ast.dart'; import 'package:logging/logging.dart'; import 'package:path/path.dart' as path; import 'package:test/test.dart'; diff --git a/pkgs/ffigen/test/test_utils.dart b/pkgs/ffigen/test/test_utils.dart index 1b6a2509b8..67a477e580 100644 --- a/pkgs/ffigen/test/test_utils.dart +++ b/pkgs/ffigen/test/test_utils.dart @@ -10,10 +10,10 @@ import 'package:ffigen/src/code_generator.dart'; import 'package:ffigen/src/code_generator/scope.dart'; import 'package:ffigen/src/code_generator/utils.dart'; import 'package:ffigen/src/config_provider/config.dart'; +import 'package:ffigen/src/config_provider/public_ast.dart'; import 'package:ffigen/src/config_provider/utils.dart'; import 'package:ffigen/src/config_provider/yaml_config.dart'; import 'package:ffigen/src/context.dart'; -import 'package:ffigen/src/public_ast/public_ast.dart'; import 'package:ffigen/src/visitor/ast.dart'; import 'package:ffigen/src/visitor/visitor.dart'; import 'package:logging/logging.dart'; @@ -22,9 +22,9 @@ import 'package:path/path.dart' as path; import 'package:test/test.dart'; import 'package:yaml/yaml.dart' as yaml; -export 'package:ffigen/src/config_provider/utils.dart'; -export 'package:ffigen/src/public_ast/public_ast.dart' +export 'package:ffigen/src/config_provider/public_ast.dart' show ExcludeAllVisitor, IncludeAllVisitor, IncludeSetVisitor, Visitor; +export 'package:ffigen/src/config_provider/utils.dart'; Context testContext([FfiGenerator? generator]) { final tmpDir = (Directory( From cceba6dc808f837c4ae86f6c305d4a7c7a199c82 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Thu, 30 Jul 2026 20:15:55 +1000 Subject: [PATCH 19/37] Split out _VisitorImpl --- .../lib/src/config_provider/public_ast.dart | 122 +++++++++++++++++- .../lib/src/config_provider/yaml_config.dart | 3 +- .../reserved_keyword_collision_test.dart | 4 +- .../header_parser_tests/record_use_test.dart | 2 + .../test/header_parser_tests/sort_test.dart | 4 +- .../large_objc_test.dart | 2 + .../native_objc_test/transitive_test.dart | 2 +- pkgs/ffigen/test/public_ast_visitor_test.dart | 16 ++- 8 files changed, 144 insertions(+), 11 deletions(-) diff --git a/pkgs/ffigen/lib/src/config_provider/public_ast.dart b/pkgs/ffigen/lib/src/config_provider/public_ast.dart index bafbcfefdc..9ff98b867f 100644 --- a/pkgs/ffigen/lib/src/config_provider/public_ast.dart +++ b/pkgs/ffigen/lib/src/config_provider/public_ast.dart @@ -6,7 +6,104 @@ import '../code_generator.dart' as ast; import '../config_provider.dart'; /// User-facing Visitor for FFIgen's Public AST. -class Visitor { +abstract class Visitor { + const Visitor(); + + factory Visitor.callback({ + void Function(PublicAst ast)? visitLibrary, + void Function(Struct node)? visitStruct, + void Function(Union node)? visitUnion, + void Function(EnumClass node)? visitEnum, + void Function(UnnamedEnumConstant node)? visitUnnamedEnumConstant, + void Function(Func node)? visitFunc, + void Function(Global node)? visitGlobal, + void Function(MacroConstant node)? visitMacroConstant, + void Function(Typealias node)? visitTypealias, + void Function(ObjCInterface node)? visitObjCInterface, + void Function(ObjCProtocol node)? visitObjCProtocol, + void Function(ObjCCategory node)? visitObjCCategory, + void Function(CppClass node)? visitCppClass, + void Function(Field node)? visitField, + void Function(EnumConstant node)? visitEnumConstant, + void Function(Parameter node)? visitParameter, + void Function(ObjCMethod node)? visitObjCMethod, + void Function(CppMethod node)? visitCppMethod, + }) = _VisitorImpl; + + void visitLibrary(PublicAst ast) { + ast.visitChildren(this); + } + + void visitStruct(Struct node) { + node.visitChildren(this); + } + + void visitUnion(Union node) { + node.visitChildren(this); + } + + void visitEnum(EnumClass node) { + node.visitChildren(this); + } + + void visitUnnamedEnumConstant(UnnamedEnumConstant node) { + node.visitChildren(this); + } + + void visitFunc(Func node) { + node.visitChildren(this); + } + + void visitGlobal(Global node) { + node.visitChildren(this); + } + + void visitMacroConstant(MacroConstant node) { + node.visitChildren(this); + } + + void visitTypealias(Typealias node) { + node.visitChildren(this); + } + + void visitObjCInterface(ObjCInterface node) { + node.visitChildren(this); + } + + void visitObjCProtocol(ObjCProtocol node) { + node.visitChildren(this); + } + + void visitObjCCategory(ObjCCategory node) { + node.visitChildren(this); + } + + void visitCppClass(CppClass node) { + node.visitChildren(this); + } + + void visitField(Field node) { + node.visitChildren(this); + } + + void visitEnumConstant(EnumConstant node) { + node.visitChildren(this); + } + + void visitParameter(Parameter node) { + node.visitChildren(this); + } + + void visitObjCMethod(ObjCMethod node) { + node.visitChildren(this); + } + + void visitCppMethod(CppMethod node) { + node.visitChildren(this); + } +} + +class _VisitorImpl extends Visitor { final void Function(PublicAst ast)? _visitLibrary; final void Function(Struct node)? _visitStruct; final void Function(Union node)? _visitUnion; @@ -26,7 +123,7 @@ class Visitor { final void Function(ObjCMethod node)? _visitObjCMethod; final void Function(CppMethod node)? _visitCppMethod; - const Visitor({ + const _VisitorImpl({ void Function(PublicAst ast)? visitLibrary, void Function(Struct node)? visitStruct, void Function(Union node)? visitUnion, @@ -62,93 +159,112 @@ class Visitor { _visitEnumConstant = visitEnumConstant, _visitParameter = visitParameter, _visitObjCMethod = visitObjCMethod, - _visitCppMethod = visitCppMethod; + _visitCppMethod = visitCppMethod, + super(); + @override void visitLibrary(PublicAst ast) { _visitLibrary?.call(ast); ast.visitChildren(this); } + @override void visitStruct(Struct node) { _visitStruct?.call(node); node.visitChildren(this); } + @override void visitUnion(Union node) { _visitUnion?.call(node); node.visitChildren(this); } + @override void visitEnum(EnumClass node) { _visitEnum?.call(node); node.visitChildren(this); } + @override void visitUnnamedEnumConstant(UnnamedEnumConstant node) { _visitUnnamedEnumConstant?.call(node); node.visitChildren(this); } + @override void visitFunc(Func node) { _visitFunc?.call(node); node.visitChildren(this); } + @override void visitGlobal(Global node) { _visitGlobal?.call(node); node.visitChildren(this); } + @override void visitMacroConstant(MacroConstant node) { _visitMacroConstant?.call(node); node.visitChildren(this); } + @override void visitTypealias(Typealias node) { _visitTypealias?.call(node); node.visitChildren(this); } + @override void visitObjCInterface(ObjCInterface node) { _visitObjCInterface?.call(node); node.visitChildren(this); } + @override void visitObjCProtocol(ObjCProtocol node) { _visitObjCProtocol?.call(node); node.visitChildren(this); } + @override void visitObjCCategory(ObjCCategory node) { _visitObjCCategory?.call(node); node.visitChildren(this); } + @override void visitCppClass(CppClass node) { _visitCppClass?.call(node); node.visitChildren(this); } + @override void visitField(Field node) { _visitField?.call(node); node.visitChildren(this); } + @override void visitEnumConstant(EnumConstant node) { _visitEnumConstant?.call(node); node.visitChildren(this); } + @override void visitParameter(Parameter node) { _visitParameter?.call(node); node.visitChildren(this); } + @override void visitObjCMethod(ObjCMethod node) { _visitObjCMethod?.call(node); node.visitChildren(this); } + @override void visitCppMethod(CppMethod node) { _visitCppMethod?.call(node); node.visitChildren(this); diff --git a/pkgs/ffigen/lib/src/config_provider/yaml_config.dart b/pkgs/ffigen/lib/src/config_provider/yaml_config.dart index bd2d577d82..377858f8d8 100644 --- a/pkgs/ffigen/lib/src/config_provider/yaml_config.dart +++ b/pkgs/ffigen/lib/src/config_provider/yaml_config.dart @@ -1313,7 +1313,8 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { _structDependencies = structDependencies, _unionDependencies = unionDependencies, _includeUnusedTypedefs = includeUnusedTypedefs, - _varArgFunctions = varArgFunctions; + _varArgFunctions = varArgFunctions, + super(); final bool _silenceEnumWarning; diff --git a/pkgs/ffigen/test/collision_tests/reserved_keyword_collision_test.dart b/pkgs/ffigen/test/collision_tests/reserved_keyword_collision_test.dart index 46a946305a..fd643bee8c 100644 --- a/pkgs/ffigen/test/collision_tests/reserved_keyword_collision_test.dart +++ b/pkgs/ffigen/test/collision_tests/reserved_keyword_collision_test.dart @@ -35,7 +35,9 @@ void main() { ), visitors: [ const IncludeAllVisitor(), - Visitor(visitTypealias: (node) => node.includeUnused = true), + Visitor.callback( + visitTypealias: (node) => node.includeUnused = true, + ), ], ), ), diff --git a/pkgs/ffigen/test/header_parser_tests/record_use_test.dart b/pkgs/ffigen/test/header_parser_tests/record_use_test.dart index 7199e84704..f44fd12223 100644 --- a/pkgs/ffigen/test/header_parser_tests/record_use_test.dart +++ b/pkgs/ffigen/test/header_parser_tests/record_use_test.dart @@ -11,6 +11,8 @@ import 'package:test/test.dart'; import '../test_utils.dart'; class _RecordUseVisitor extends Visitor { + _RecordUseVisitor(); + @override void visitFunc(Func node) { if (node.originalName == 'sum') { diff --git a/pkgs/ffigen/test/header_parser_tests/sort_test.dart b/pkgs/ffigen/test/header_parser_tests/sort_test.dart index 9b151d8e6a..cf8c52e0eb 100644 --- a/pkgs/ffigen/test/header_parser_tests/sort_test.dart +++ b/pkgs/ffigen/test/header_parser_tests/sort_test.dart @@ -33,7 +33,9 @@ void main() { ), visitors: [ const IncludeAllVisitor(), - Visitor(visitTypealias: (node) => node.includeUnused = true), + Visitor.callback( + visitTypealias: (node) => node.includeUnused = true, + ), ], ), ), diff --git a/pkgs/ffigen/test/large_integration_tests/large_objc_test.dart b/pkgs/ffigen/test/large_integration_tests/large_objc_test.dart index 6a54e1a829..6763b93a7d 100644 --- a/pkgs/ffigen/test/large_integration_tests/large_objc_test.dart +++ b/pkgs/ffigen/test/large_integration_tests/large_objc_test.dart @@ -36,6 +36,8 @@ Future run(String exe, List args) async { // reasonable amount of time. // TODO(https://github.com/dart-lang/sdk/issues/56247): Remove this. class _RandomIncludeVisitor extends Visitor { + _RandomIncludeVisitor(); + static const inclusionRatio = 0.1; static const seed = 1234; static const forceIncludedProtocols = {'NSTextLocation'}; diff --git a/pkgs/ffigen/test/native_objc_test/transitive_test.dart b/pkgs/ffigen/test/native_objc_test/transitive_test.dart index aaa0799a0c..ca4a696f5f 100644 --- a/pkgs/ffigen/test/native_objc_test/transitive_test.dart +++ b/pkgs/ffigen/test/native_objc_test/transitive_test.dart @@ -45,7 +45,7 @@ String generate({bool includeTransitiveObjCCategories = true}) { ), objectiveC: const ObjectiveC(), visitors: [ - Visitor( + Visitor.callback( visitObjCInterface: (node) { if ({ 'DirectlyIncluded', diff --git a/pkgs/ffigen/test/public_ast_visitor_test.dart b/pkgs/ffigen/test/public_ast_visitor_test.dart index cca6799a6c..e0b0e6c906 100644 --- a/pkgs/ffigen/test/public_ast_visitor_test.dart +++ b/pkgs/ffigen/test/public_ast_visitor_test.dart @@ -10,6 +10,8 @@ import 'package:test/test.dart'; import 'test_utils.dart'; class CustomRenamerVisitor extends Visitor { + CustomRenamerVisitor(); + @override void visitFunc(Func node) { if (node.originalName == 'func1') { @@ -34,6 +36,8 @@ class CustomRenamerVisitor extends Visitor { } class CustomExcluderVisitor extends Visitor { + CustomExcluderVisitor(); + @override void visitFunc(Func node) { if (node.originalName == 'func2') { @@ -50,6 +54,8 @@ class CustomExcluderVisitor extends Visitor { } class CustomLeafVisitor extends Visitor { + CustomLeafVisitor(); + @override void visitFunc(Func node) { if (node.originalName == 'func1' || node.name == 'myCustomFunc') { @@ -116,7 +122,7 @@ void main() { output: Output(dartFile: Uri.file('unused.dart')), visitors: [ const IncludeAllVisitor(), - Visitor( + Visitor.callback( visitFunc: (node) { if (node.originalName == 'func1') { node.name = 'inlineRenamedFunc1'; @@ -173,7 +179,7 @@ void main() { output: Output(dartFile: Uri.file('unused.dart')), visitors: [ const IncludeAllVisitor(), - Visitor( + Visitor.callback( visitEnum: (node) { node.silenceWarning = true; }, @@ -198,7 +204,7 @@ void main() { const IncludeSetVisitor( objcInterfaces: {'DirectlyIncludedIntForCat'}, ), - Visitor( + Visitor.callback( visitObjCInterface: (node) { if (node.originalName == 'DirectlyIncludedIntForCat') { expect(node.includeCategories, isTrue); @@ -224,7 +230,7 @@ void main() { output: Output(dartFile: Uri.file('unused.dart')), visitors: [ const IncludeAllVisitor(), - Visitor( + Visitor.callback( visitFunc: (Func node) { if (node.originalName == 'myfunc') { node.varArgs = [ @@ -245,6 +251,8 @@ void main() { } class _AutoWalkVisitor extends Visitor { + _AutoWalkVisitor(); + final visitedFieldNames = []; @override From 1de61b7ae85f66946b7014d97dcd2d838f674334 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Thu, 30 Jul 2026 21:51:53 +1000 Subject: [PATCH 20/37] migrate all configs --- .../example/host_name/tool/ffigen.dart | 9 +- .../example/mini_audio/tool/ffigen.dart | 4 +- .../example/stb_image/tool/ffigen.dart | 4 +- pkgs/jni/tool/generate_ffi_bindings.dart | 331 ++++---- pkgs/objective_c/tool/generate_code.dart | 802 ++++++++---------- pkgs/swiftgen/example/generate_code.dart | 10 +- pkgs/swiftgen/lib/src/config.dart | 38 +- pkgs/swiftgen/lib/src/generator.dart | 45 +- pkgs/swiftgen/test/integration/util.dart | 21 +- 9 files changed, 558 insertions(+), 706 deletions(-) diff --git a/pkgs/code_assets/example/host_name/tool/ffigen.dart b/pkgs/code_assets/example/host_name/tool/ffigen.dart index d97d0cb3ed..dfbbdec3d8 100644 --- a/pkgs/code_assets/example/host_name/tool/ffigen.dart +++ b/pkgs/code_assets/example/host_name/tool/ffigen.dart @@ -8,12 +8,13 @@ import 'package:ffigen/ffigen.dart'; void main() { final packageRoot = Platform.script.resolve('../'); - const visitors = [IncludeSetVisitor(functions: {'gethostname'})]; final FfiGenerator generator; if (Platform.isWindows) { generator = FfiGenerator( input: Input(entryPoints: [packageRoot.resolve('src/windows.h')]), - visitors: visitors, + visitors: const [ + IncludeSetVisitor(functions: {'gethostname'}), + ], output: Output( dartFile: packageRoot.resolve('lib/src/third_party/windows.dart'), preamble: ''' @@ -27,7 +28,9 @@ void main() { } else { generator = FfiGenerator( input: Input(entryPoints: [packageRoot.resolve('src/unix.h')]), - visitors: visitors, + visitors: const [ + IncludeSetVisitor(functions: {'gethostname'}), + ], output: Output( dartFile: packageRoot.resolve('lib/src/third_party/unix.dart'), preamble: ''' diff --git a/pkgs/code_assets/example/mini_audio/tool/ffigen.dart b/pkgs/code_assets/example/mini_audio/tool/ffigen.dart index 4c35abf63c..673884eaa4 100644 --- a/pkgs/code_assets/example/mini_audio/tool/ffigen.dart +++ b/pkgs/code_assets/example/mini_audio/tool/ffigen.dart @@ -9,9 +9,7 @@ import 'package:ffigen/ffigen.dart'; void main() { final packageRoot = Platform.script.resolve('../'); FfiGenerator( - input: Input( - entryPoints: [packageRoot.resolve('third_party/miniaudio.h')], - ), + input: Input(entryPoints: [packageRoot.resolve('third_party/miniaudio.h')]), visitors: const [ IncludeSetVisitor( functions: { diff --git a/pkgs/code_assets/example/stb_image/tool/ffigen.dart b/pkgs/code_assets/example/stb_image/tool/ffigen.dart index 0945c3f115..353e006701 100644 --- a/pkgs/code_assets/example/stb_image/tool/ffigen.dart +++ b/pkgs/code_assets/example/stb_image/tool/ffigen.dart @@ -9,9 +9,7 @@ import 'package:ffigen/ffigen.dart'; void main() { final packageRoot = Platform.script.resolve('../'); FfiGenerator( - input: Input( - entryPoints: [packageRoot.resolve('third_party/stb_image.h')], - ), + input: Input(entryPoints: [packageRoot.resolve('third_party/stb_image.h')]), visitors: const [ IncludeSetVisitor(functions: {'stbi_info'}), RecordUseVisitor(), diff --git a/pkgs/jni/tool/generate_ffi_bindings.dart b/pkgs/jni/tool/generate_ffi_bindings.dart index 0f90312bc6..d0dbe51458 100644 --- a/pkgs/jni/tool/generate_ffi_bindings.dart +++ b/pkgs/jni/tool/generate_ffi_bindings.dart @@ -18,181 +18,6 @@ import 'wrapper_generators/generate_c_extensions.dart'; import 'wrapper_generators/generate_dart_extensions.dart'; import 'wrapper_generators/logging.dart'; -class JniVisitor extends ffigen.Visitor { - static const enumRenames = { - 'JniType': 'JniCallType', - 'jobjectRefType': 'JObjectRefType', - }; - - static const funcRenames = { - 'FindClass': 'JniFindClass', - 'GetJavaVM': 'JniGetJavaVM', - }; - - static const excludedFuncs = { - 'GetJniContextPtr', - 'setJniGetters', - 'jni_log', - 'acquire_lock', - 'attach_thread', - 'check_exception', - 'destroy_cond', - 'destroy_lock', - 'init_cond', - 'init_lock', - 'load_class', - 'load_class_global_ref', - 'load_class_local_ref', - 'load_class_platform', - 'load_env', - 'load_field', - 'load_method', - 'load_static_field', - 'load_static_method', - 'release_lock', - 'signal_cond', - 'thread_id', - 'to_global_ref', - 'to_global_ref_result', - 'wait_for', - }; - - static final globalEnvNewObjectRegExp = RegExp(r'^globalEnv_NewObject$'); - static final globalEnvCallRegExp = RegExp( - r'^globalEnv_Call(Static|Nonvirtual|)[A-Z][a-z]+Method$', - ); - - static const excludedStructs = { - 'JniContext', - 'JniLocks', - 'JNIEnv', - '_JNIEnv', - 'JNIInvokeInterface', - '__va_list_tag', - 'CallbackResult', - }; - - static const structRenames = { - '_Dart_FinalizableHandle': 'Dart_FinalizableHandle_', - '_jfieldID': 'jfieldID_', - '_jmethodID': 'jmethodID_', - }; - - static const excludedGlobals = { - 'jni', - 'jniEnv', - 'context_getter', - 'env_getter', - }; - - static const excludedTypeDefs = { - 'va_list', - '__builtin_va_list', - }; - - static const typedefRenames = { - 'jbyte': 'JByteMarker', - 'jboolean': 'JBooleanMarker', - 'jchar': 'JCharMarker', - 'jshort': 'JShortMarker', - 'jint': 'JIntMarker', - 'jlong': 'JLongMarker', - 'jfloat': 'JFloatMarker', - 'jdouble': 'JDoubleMarker', - 'jsize': 'JSizeMarker', - 'jclass': 'JClassPtr', - 'jobject': 'JObjectPtr', - 'jmethodID': 'JMethodIDPtr', - 'jfieldID': 'JFieldIDPtr', - 'jthrowable': 'JThrowablePtr', - 'jstring': 'JStringPtr', - 'jarray': 'JArrayPtr', - 'jobjectArray': 'JObjectArrayPtr', - 'jbooleanArray': 'JBooleanArrayPtr', - 'jbyteArray': 'JByteArrayPtr', - 'jcharArray': 'JCharArrayPtr', - 'jshortArray': 'JShortArrayPtr', - 'jintArray': 'JIntArrayPtr', - 'jlongArray': 'JLongArrayPtr', - 'jfloatArray': 'JFloatArrayPtr', - 'jdoubleArray': 'JDoubleArrayPtr', - 'jweak': 'JWeakPtr', - 'jvalue': 'JValue', - }; - - const JniVisitor(); - - @override - void visitEnum(ffigen.EnumClass node) { - final renamed = enumRenames[node.originalName]; - if (renamed != null) { - node.name = renamed; - } - node.isIncluded = true; - } - - @override - void visitFunc(ffigen.Func node) { - if (node.originalName.startsWith('JNI_') || - excludedFuncs.contains(node.originalName) || - globalEnvNewObjectRegExp.hasMatch(node.originalName) || - globalEnvCallRegExp.hasMatch(node.originalName)) { - node.isIncluded = false; - return; - } - final renamed = funcRenames[node.originalName]; - if (renamed != null) { - node.name = renamed; - } - node.isIncluded = true; - } - - @override - void visitStruct(ffigen.Struct node) { - if (excludedStructs.contains(node.originalName)) { - node.isIncluded = false; - return; - } - final renamed = structRenames[node.originalName]; - if (renamed != null) { - node.name = renamed; - } - node.isIncluded = true; - } - - @override - void visitUnion(ffigen.Union node) { - if (node.originalName == 'jvalue') { - node.name = 'JValue'; - } - node.isIncluded = true; - } - - @override - void visitGlobal(ffigen.Global node) { - if (excludedGlobals.contains(node.originalName)) { - node.isIncluded = false; - return; - } - node.isIncluded = true; - } - - @override - void visitTypealias(ffigen.Typealias node) { - if (excludedTypeDefs.contains(node.originalName)) { - node.isIncluded = false; - return; - } - final renamed = typedefRenames[node.originalName]; - if (renamed != null) { - node.name = renamed; - } else if (node.originalName.startsWith('JNI')) { - node.name = 'Jni${node.originalName.substring(3)}'; - } - node.isIncluded = true; - } -} - void main(List args) { final levels = Map.fromEntries( Level.LEVELS.map((l) => MapEntry(l.name.toLowerCase(), l)), @@ -254,7 +79,161 @@ void main(List args) { compilerOptions: ['-Ithird_party/'], ignoreSourceErrors: true, ), - visitors: const [JniVisitor()], + visitors: [ + ffigen.Visitor.callback( + visitEnum: (node) { + const enumRenames = { + 'JniType': 'JniCallType', + 'jobjectRefType': 'JObjectRefType', + }; + final renamed = enumRenames[node.originalName]; + if (renamed != null) { + node.name = renamed; + } + node.isIncluded = true; + }, + visitFunc: (node) { + const excludedFuncs = { + 'GetJniContextPtr', + 'setJniGetters', + 'jni_log', + 'acquire_lock', + 'attach_thread', + 'check_exception', + 'destroy_cond', + 'destroy_lock', + 'init_cond', + 'init_lock', + 'load_class', + 'load_class_global_ref', + 'load_class_local_ref', + 'load_class_platform', + 'load_env', + 'load_field', + 'load_method', + 'load_static_field', + 'load_static_method', + 'release_lock', + 'signal_cond', + 'thread_id', + 'to_global_ref', + 'to_global_ref_result', + 'wait_for', + }; + final globalEnvNewObjectRegExp = RegExp(r'^globalEnv_NewObject$'); + final globalEnvCallRegExp = RegExp( + r'^globalEnv_Call(Static|Nonvirtual|)[A-Z][a-z]+Method$', + ); + const funcRenames = { + 'FindClass': 'JniFindClass', + 'GetJavaVM': 'JniGetJavaVM', + }; + if (node.originalName.startsWith('JNI_') || + excludedFuncs.contains(node.originalName) || + globalEnvNewObjectRegExp.hasMatch(node.originalName) || + globalEnvCallRegExp.hasMatch(node.originalName)) { + node.isIncluded = false; + return; + } + final renamed = funcRenames[node.originalName]; + if (renamed != null) { + node.name = renamed; + } + node.isIncluded = true; + }, + visitStruct: (node) { + node.dependencies = ffigen.CompoundDependencies.opaque; + const excludedStructs = { + 'JniContext', + 'JniLocks', + 'JNIEnv', + '_JNIEnv', + 'JNIInvokeInterface', + '__va_list_tag', + 'CallbackResult', + }; + const structRenames = { + '_Dart_FinalizableHandle': 'Dart_FinalizableHandle_', + '_jfieldID': 'jfieldID_', + '_jmethodID': 'jmethodID_', + }; + if (excludedStructs.contains(node.originalName)) { + node.isIncluded = false; + return; + } + final renamed = structRenames[node.originalName]; + if (renamed != null) { + node.name = renamed; + } + node.isIncluded = true; + }, + visitUnion: (node) { + if (node.originalName == 'jvalue') { + node.name = 'JValue'; + } + node.isIncluded = true; + }, + visitGlobal: (node) { + const excludedGlobals = { + 'jni', + 'jniEnv', + 'context_getter', + 'env_getter', + }; + if (excludedGlobals.contains(node.originalName)) { + node.isIncluded = false; + return; + } + node.isIncluded = true; + }, + visitTypealias: (node) { + const excludedTypeDefs = { + 'va_list', + '__builtin_va_list', + }; + const typedefRenames = { + 'jbyte': 'JByteMarker', + 'jboolean': 'JBooleanMarker', + 'jchar': 'JCharMarker', + 'jshort': 'JShortMarker', + 'jint': 'JIntMarker', + 'jlong': 'JLongMarker', + 'jfloat': 'JFloatMarker', + 'jdouble': 'JDoubleMarker', + 'jsize': 'JSizeMarker', + 'jclass': 'JClassPtr', + 'jobject': 'JObjectPtr', + 'jmethodID': 'JMethodIDPtr', + 'jfieldID': 'JFieldIDPtr', + 'jthrowable': 'JThrowablePtr', + 'jstring': 'JStringPtr', + 'jarray': 'JArrayPtr', + 'jobjectArray': 'JObjectArrayPtr', + 'jbooleanArray': 'JBooleanArrayPtr', + 'jbyteArray': 'JByteArrayPtr', + 'jcharArray': 'JCharArrayPtr', + 'jshortArray': 'JShortArrayPtr', + 'jintArray': 'JIntArrayPtr', + 'jlongArray': 'JLongArrayPtr', + 'jfloatArray': 'JFloatArrayPtr', + 'jdoubleArray': 'JDoubleArrayPtr', + 'jweak': 'JWeakPtr', + 'jvalue': 'JValue', + }; + if (excludedTypeDefs.contains(node.originalName)) { + node.isIncluded = false; + return; + } + final renamed = typedefRenames[node.originalName]; + if (renamed != null) { + node.name = renamed; + } else if (node.originalName.startsWith('JNI')) { + node.name = 'Jni${node.originalName.substring(3)}'; + } + node.isIncluded = true; + }, + ), + ], output: ffigen.Output( style: const ffigen.DynamicLibraryBindings(wrapperName: 'JniBindings'), preamble: ''' diff --git a/pkgs/objective_c/tool/generate_code.dart b/pkgs/objective_c/tool/generate_code.dart index 53c88c69c0..b1772a64fb 100644 --- a/pkgs/objective_c/tool/generate_code.dart +++ b/pkgs/objective_c/tool/generate_code.dart @@ -92,36 +92,46 @@ void mergeExtraMethods(String filename, Map extraMethods) { File(filename).writeAsStringSync(out.toString()); } -class RuntimeBindingsVisitor extends Visitor { - static const functions = { - 'object_getClass', - 'sel_registerName', - 'sel_getName', - 'protocol_getMethodDescription', - 'protocol_getName', - }; - - static const functionRenames = { - 'sel_registerName': 'registerName', - 'sel_getName': 'getName', - 'objc_getClass': 'getClass', +String renameRuntimeFunction(String name) { + const custom = { 'objc_retain': 'objectRetain', 'objc_retainBlock': 'blockRetain', 'objc_release': 'objectRelease', 'objc_autorelease': 'objectAutorelease', - 'objc_msgSend': 'msgSend', 'objc_msgSend_fpret': 'msgSendFpret', 'objc_msgSend_stret': 'msgSendStret', 'object_getClass': 'getObjectClass', - 'objc_copyClassList': 'copyClassList', - 'objc_getProtocol': 'getProtocol', - 'objc_autoreleasePoolPush': 'autoreleasePoolPush', - 'objc_autoreleasePoolPop': 'autoreleasePoolPop', - 'protocol_getMethodDescription': 'getMethodDescription', 'protocol_getName': 'getProtocolName', }; + if (custom.containsKey(name)) return custom[name]!; + for (final prefix in ['sel_', 'objc_', 'protocol_', 'object_']) { + if (name.startsWith(prefix)) { + return name.substring(prefix.length); + } + } + return name; +} + +String renameInterface(String name) => + name.startsWith('DOBJCDart') ? name.substring(5) : name; + +String renameProtocol(String name) => + name == 'NSObject' ? 'NSObjectProtocol' : name; + +String renameStruct(String name) => name.startsWith('__') + ? name.substring(2) + : (name.startsWith('_') ? name.substring(1) : name); - static const globals = { +void generateRuntimeBindings(Uri root) { + const functions = { + 'object_getClass', + 'sel_registerName', + 'sel_getName', + 'protocol_getMethodDescription', + 'protocol_getName', + }; + + const globals = { 'NSKeyValueChangeIndexesKey', 'NSKeyValueChangeKindKey', 'NSKeyValueChangeNewKey', @@ -130,78 +140,73 @@ class RuntimeBindingsVisitor extends Visitor { 'NSLocalizedDescriptionKey', }; - const RuntimeBindingsVisitor(); - - @override - void visitFunc(Func node) { - final isObjc = node.originalName.startsWith('objc_'); - if (!isObjc && !functions.contains(node.originalName)) { - node.isIncluded = false; - return; - } - node.isIncluded = true; - if (!node.originalName.startsWith('objc_msgSend')) { - node.isLeaf = true; - } - final renamed = functionRenames[node.originalName]; - if (renamed != null) { - node.name = renamed; - } - } - - @override - void visitGlobal(Global node) { - if (node.originalName.startsWith('_') && - node.originalName.endsWith('Block')) { - node.isIncluded = true; - node.name = node.originalName.substring(1); - } else if (globals.contains(node.originalName)) { - node.isIncluded = true; - if (node.originalName.startsWith('_')) { - node.name = node.originalName.substring(1); - } - } else { - node.isIncluded = false; - } - } - - @override - void visitStruct(Struct node) { - if (node.originalName.startsWith('_ObjC')) { - node.isIncluded = true; - node.name = 'ObjC${node.originalName.substring(5)}'; - } - } - - @override - void visitEnum(EnumClass node) { - node.isIncluded = false; - } - - @override - void visitMacroConstant(MacroConstant node) { - node.isIncluded = false; - } + FfiGenerator( + input: Input(entryPoints: [root.resolve('src/objective_c_runtime.h')]), + visitors: [ + Visitor.callback( + visitFunc: (node) { + final isObjc = node.originalName.startsWith('objc_'); + if (!isObjc && !functions.contains(node.originalName)) { + node.isIncluded = false; + return; + } + node.isIncluded = true; + if (!node.originalName.startsWith('objc_msgSend')) { + node.isLeaf = true; + } + node.name = renameRuntimeFunction(node.originalName); + }, + visitGlobal: (node) { + if (node.originalName.startsWith('_') && + node.originalName.endsWith('Block')) { + node.isIncluded = true; + node.name = node.originalName.substring(1); + } else if (globals.contains(node.originalName)) { + node.isIncluded = true; + if (node.originalName.startsWith('_')) { + node.name = node.originalName.substring(1); + } + } else { + node.isIncluded = false; + } + }, + visitStruct: (node) { + if (node.originalName.startsWith('_ObjC')) { + node.isIncluded = true; + node.name = 'ObjC${node.originalName.substring(5)}'; + } + }, + visitEnum: (node) => node.isIncluded = false, + visitMacroConstant: (node) => node.isIncluded = false, + visitUnnamedEnumConstant: (node) => node.isIncluded = false, + visitUnion: (node) => node.isIncluded = false, + ), + ], + output: Output( + 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. - @override - void visitUnnamedEnumConstant(UnnamedEnumConstant node) { - node.isIncluded = false; - } +// Bindings for `src/objective_c_runtime.h`. +// Regenerate bindings with `dart run tool/generate_code.dart`. - @override - void visitUnion(Union node) { - node.isIncluded = false; - } +// ignore_for_file: always_specify_types +// ignore_for_file: camel_case_types +// ignore_for_file: non_constant_identifier_names +// ignore_for_file: unused_element +// coverage:ignore-file +''', + style: const NativeExternalBindings(), + dartFile: root.resolve(runtimeBindings), + ), + ).generate(); } -class CBindingsVisitor extends Visitor { - static const structs = { - '_ObjCBlockDesc', - '_ObjCBlockImpl', - '_ObjCObjectImpl', - }; +void generateCBindings(Uri root) { + const structs = {'_ObjCBlockDesc', '_ObjCBlockImpl', '_ObjCObjectImpl'}; - static const nonLeaf = { + const nonLeaf = { 'DOBJC_deleteFinalizableHandle', 'DOBJC_disposeObjCBlockWithClosure', 'DOBJC_newFinalizableBool', @@ -209,148 +214,151 @@ class CBindingsVisitor extends Visitor { 'DOBJC_awaitWaiter', }; - const CBindingsVisitor(); - - @override - void visitFunc(Func node) { - final isDobjc = node.originalName.startsWith('DOBJC_'); - final isNewFinalizable = node.originalName == 'newFinalizableHandle'; - if (!isDobjc && !isNewFinalizable) { - node.isIncluded = false; - return; - } - node.isIncluded = true; - if (!nonLeaf.contains(node.originalName)) { - node.isLeaf = true; - } - if (isDobjc) { - node.name = node.originalName.substring(6); - } - } - - @override - void visitTypealias(Typealias node) { - if (node.originalName == 'Dart_FinalizableHandle') { - node.isIncluded = true; - } - } - - @override - void visitStruct(Struct node) { - if (node.originalName == '_DOBJC_Context') { - node.isIncluded = true; - node.name = 'DOBJC_Context'; - } else if (node.originalName == '_Dart_FinalizableHandle') { - node.isIncluded = true; - node.name = 'Dart_FinalizableHandle_'; - } else if (structs.contains(node.originalName)) { - node.isIncluded = true; - node.name = 'ObjC${node.originalName.substring(5)}'; - } else { - node.isIncluded = false; - } - } - - @override - void visitMacroConstant(MacroConstant node) { - if (node.originalName == 'ILLEGAL_PORT') { - node.isIncluded = true; - } else { - node.isIncluded = false; - } - } - - @override - void visitEnum(EnumClass node) { - node.isIncluded = false; - } - - @override - void visitGlobal(Global node) { - node.isIncluded = false; - } + FfiGenerator( + input: Input( + entryPoints: [ + root.resolve('src/include/dart_api_dl.h'), + root.resolve('src/objective_c.h'), + root.resolve('src/os_version.h'), + ], + ), + visitors: [ + Visitor.callback( + visitFunc: (node) { + final isDobjc = node.originalName.startsWith('DOBJC_'); + final isNewFinalizable = node.originalName == 'newFinalizableHandle'; + if (!isDobjc && !isNewFinalizable) { + node.isIncluded = false; + return; + } + node.isIncluded = true; + if (!nonLeaf.contains(node.originalName)) { + node.isLeaf = true; + } + if (isDobjc) { + node.name = node.originalName.substring(6); + } + }, + visitTypealias: (node) { + if (node.originalName == 'Dart_FinalizableHandle') { + node.isIncluded = true; + } + }, + visitStruct: (node) { + if (node.originalName == '_DOBJC_Context') { + node.isIncluded = true; + node.name = 'DOBJC_Context'; + } else if (node.originalName == '_Dart_FinalizableHandle') { + node.isIncluded = true; + node.name = 'Dart_FinalizableHandle_'; + } else if (structs.contains(node.originalName)) { + node.isIncluded = true; + node.name = 'ObjC${node.originalName.substring(5)}'; + } else { + node.isIncluded = false; + } + }, + visitMacroConstant: (node) { + if (node.originalName == 'ILLEGAL_PORT') { + node.isIncluded = true; + } else { + node.isIncluded = false; + } + }, + visitEnum: (node) => node.isIncluded = false, + visitGlobal: (node) => node.isIncluded = false, + visitUnnamedEnumConstant: (node) => node.isIncluded = false, + visitUnion: (node) => node.isIncluded = false, + ), + ], + output: Output( + 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. - @override - void visitUnnamedEnumConstant(UnnamedEnumConstant node) { - node.isIncluded = false; - } +// Bindings for `src/objective_c.h` etc. +// Regenerate bindings with `dart run tool/generate_code.dart`. - @override - void visitUnion(Union node) { - node.isIncluded = false; - } +// coverage:ignore-file +''', + style: const NativeExternalBindings( + assetId: 'package:objective_c/objective_c.dylib', + ), + dartFile: root.resolve(cBindings), + ), + ).generate(); } -class ObjCBindingsVisitor extends Visitor { - static const interfaces = { - 'DOBJCDartInputStreamAdapter': 'DartInputStreamAdapter', - 'DOBJCDartInputStreamAdapterWeakHolder': 'DartInputStreamAdapterWeakHolder', - 'DOBJCObservation': 'DOBJCObservation', - 'DOBJCDartProtocolBuilder': 'DartProtocolBuilder', - 'DOBJCDartProtocol': 'DartProtocol', - 'NSArray': 'NSArray', - 'NSAttributedString': 'NSAttributedString', - 'NSAttributedStringMarkdownParsingOptions': - 'NSAttributedStringMarkdownParsingOptions', - 'NSBundle': 'NSBundle', - 'NSCharacterSet': 'NSCharacterSet', - 'NSCoder': 'NSCoder', - 'NSData': 'NSData', - 'NSDate': 'NSDate', - 'NSDictionary': 'NSDictionary', - 'NSEnumerator': 'NSEnumerator', - 'NSError': 'NSError', - 'NSIndexSet': 'NSIndexSet', - 'NSInputStream': 'NSInputStream', - 'NSInvocation': 'NSInvocation', - 'NSItemProvider': 'NSItemProvider', - 'NSLocale': 'NSLocale', - 'NSMethodSignature': 'NSMethodSignature', - 'NSMutableArray': 'NSMutableArray', - 'NSMutableData': 'NSMutableData', - 'NSMutableDictionary': 'NSMutableDictionary', - 'NSMutableIndexSet': 'NSMutableIndexSet', - 'NSMutableOrderedSet': 'NSMutableOrderedSet', - 'NSMutableSet': 'NSMutableSet', - 'NSMutableString': 'NSMutableString', - 'NSNotification': 'NSNotification', - 'NSNull': 'NSNull', - 'NSNumber': 'NSNumber', - 'NSObject': 'NSObject', - 'NSOutputStream': 'NSOutputStream', - 'NSOrderedCollectionChange': 'NSOrderedCollectionChange', - 'NSOrderedCollectionDifference': 'NSOrderedCollectionDifference', - 'NSOrderedSet': 'NSOrderedSet', - 'NSPort': 'NSPort', - 'NSPortMessage': 'NSPortMessage', - 'NSProgress': 'NSProgress', - 'NSRunLoop': 'NSRunLoop', - 'NSSet': 'NSSet', - 'NSStream': 'NSStream', - 'NSString': 'NSString', - 'NSTimer': 'NSTimer', - 'NSURL': 'NSURL', - 'NSURLHandle': 'NSURLHandle', - 'NSValue': 'NSValue', - 'Protocol': 'Protocol', +void generateObjCBindings(Uri root) { + const interfaces = { + 'DOBJCDartInputStreamAdapter', + 'DOBJCDartInputStreamAdapterWeakHolder', + 'DOBJCObservation', + 'DOBJCDartProtocolBuilder', + 'DOBJCDartProtocol', + 'NSArray', + 'NSAttributedString', + 'NSAttributedStringMarkdownParsingOptions', + 'NSBundle', + 'NSCharacterSet', + 'NSCoder', + 'NSData', + 'NSDate', + 'NSDictionary', + 'NSEnumerator', + 'NSError', + 'NSIndexSet', + 'NSInputStream', + 'NSInvocation', + 'NSItemProvider', + 'NSLocale', + 'NSMethodSignature', + 'NSMutableArray', + 'NSMutableData', + 'NSMutableDictionary', + 'NSMutableIndexSet', + 'NSMutableOrderedSet', + 'NSMutableSet', + 'NSMutableString', + 'NSNotification', + 'NSNull', + 'NSNumber', + 'NSObject', + 'NSOutputStream', + 'NSOrderedCollectionChange', + 'NSOrderedCollectionDifference', + 'NSOrderedSet', + 'NSPort', + 'NSPortMessage', + 'NSProgress', + 'NSRunLoop', + 'NSSet', + 'NSStream', + 'NSString', + 'NSTimer', + 'NSURL', + 'NSURLHandle', + 'NSValue', + 'Protocol', }; - static const protocols = { - 'NSCoding': 'NSCoding', - 'NSCopying': 'NSCopying', - 'NSFastEnumeration': 'NSFastEnumeration', - 'NSItemProviderReading': 'NSItemProviderReading', - 'NSItemProviderWriting': 'NSItemProviderWriting', - 'NSMutableCopying': 'NSMutableCopying', - 'NSObject': 'NSObjectProtocol', - 'NSPortDelegate': 'NSPortDelegate', - 'NSSecureCoding': 'NSSecureCoding', - 'NSStreamDelegate': 'NSStreamDelegate', - 'NSURLHandleClient': 'NSURLHandleClient', - 'Observer': 'Observer', + const protocols = { + 'NSCoding', + 'NSCopying', + 'NSFastEnumeration', + 'NSItemProviderReading', + 'NSItemProviderWriting', + 'NSMutableCopying', + 'NSObject', + 'NSPortDelegate', + 'NSSecureCoding', + 'NSStreamDelegate', + 'NSURLHandleClient', + 'Observer', }; - static const categories = { + const categories = { 'NSDataCreation', 'NSExtendedArray', 'NSExtendedData', @@ -370,28 +378,28 @@ class ObjCBindingsVisitor extends Visitor { 'NSStringExtensionMethods', }; - static const structs = { - 'AEDesc': 'AEDesc', - '__CFRunLoop': 'CFRunLoop', - '__CFString': 'CFString', - 'CGPoint': 'CGPoint', - '_CGPoint': 'CGPoint', - 'CGRect': 'CGRect', - '_CGRect': 'CGRect', - 'CGSize': 'CGSize', - '_CGSize': 'CGSize', - 'NSEdgeInsets': 'NSEdgeInsets', - '_NSEdgeInsets': 'NSEdgeInsets', - 'NSFastEnumerationState': 'NSFastEnumerationState', - '_NSFastEnumerationState': 'NSFastEnumerationState', - '_NSRange': 'NSRange', - 'NSRange': 'NSRange', - '_NSZone': 'NSZone', - 'NSZone': 'NSZone', - 'OpaqueAEDataStorageType': 'OpaqueAEDataStorageType', + const structs = { + 'AEDesc', + '__CFRunLoop', + '__CFString', + 'CGPoint', + '_CGPoint', + 'CGRect', + '_CGRect', + 'CGSize', + '_CGSize', + 'NSEdgeInsets', + '_NSEdgeInsets', + 'NSFastEnumerationState', + '_NSFastEnumerationState', + '_NSRange', + 'NSRange', + '_NSZone', + 'NSZone', + 'OpaqueAEDataStorageType', }; - static const enums = { + const enums = { 'NSAppleEventSendOptions', 'NSAttributedStringEnumerationOptions', 'NSAttributedStringFormattingOptions', @@ -429,106 +437,113 @@ class ObjCBindingsVisitor extends Visitor { 'NSURLHandleStatus', }; - const ObjCBindingsVisitor(); - - @override - void visitFunc(Func node) { - node.isIncluded = false; - } - - @override - void visitObjCInterface(ObjCInterface node) { - final renamed = interfaces[node.originalName]; - if (renamed != null) { - node.isIncluded = true; - node.name = renamed; - } else { - node.isIncluded = false; - } - if (node.originalName == 'NSBundle') { - for (final method in node.methods) { - if (method.originalName == - 'localizedStringForKey:value:table:localizations:') { - method.isIncluded = false; - } - } - } - } - - @override - void visitObjCProtocol(ObjCProtocol node) { - final renamed = protocols[node.originalName]; - if (renamed != null) { - node.isIncluded = true; - node.name = renamed; - } else { - node.isIncluded = false; - } - } - - @override - void visitObjCCategory(ObjCCategory node) { - if (categories.contains(node.originalName)) { - node.isIncluded = true; - } else { - node.isIncluded = false; - } - } - - @override - void visitStruct(Struct node) { - node.dependencies = CompoundDependencies.opaque; - if (node.originalName.isEmpty) { - node.isIncluded = false; - return; - } - final renamed = structs[node.originalName]; - if (renamed != null) { - node.isIncluded = true; - node.name = renamed; - } else { - node.isIncluded = false; - } - } - - @override - void visitEnum(EnumClass node) { - if (enums.contains(node.originalName)) { - node.isIncluded = true; - } else { - node.isIncluded = false; - } - } + FfiGenerator( + input: Input( + entryPoints: [ + root.resolve('src/foundation.h'), + root.resolve('src/input_stream_adapter.h'), + root.resolve('src/ns_number.h'), + root.resolve('src/observer.h'), + root.resolve('src/protocol.h'), + ], + ), + objectiveC: const ObjectiveC(generateForPackageObjectiveC: true), + visitors: [ + Visitor.callback( + visitFunc: (node) => node.isIncluded = false, + visitObjCInterface: (node) { + if (interfaces.contains(node.originalName)) { + node.isIncluded = true; + node.name = renameInterface(node.originalName); + } else { + node.isIncluded = false; + } + if (node.originalName == 'NSBundle') { + for (final method in node.methods) { + if (method.originalName == + 'localizedStringForKey:value:table:localizations:') { + method.isIncluded = false; + } + } + } + }, + visitObjCProtocol: (node) { + if (protocols.contains(node.originalName)) { + node.isIncluded = true; + node.name = renameProtocol(node.originalName); + } else { + node.isIncluded = false; + } + }, + visitObjCCategory: (node) { + node.isIncluded = categories.contains(node.originalName); + }, + visitStruct: (node) { + node.dependencies = CompoundDependencies.opaque; + if (node.originalName.isNotEmpty && + structs.contains(node.originalName)) { + node.isIncluded = true; + node.name = renameStruct(node.originalName); + } else { + node.isIncluded = false; + } + }, + visitEnum: (node) { + node.isIncluded = enums.contains(node.originalName); + }, + visitTypealias: (node) { + if (node.originalName == 'CFStringRef') { + node.isIncluded = true; + } + }, + visitGlobal: (node) => node.isIncluded = false, + visitMacroConstant: (node) => node.isIncluded = false, + visitUnnamedEnumConstant: (node) => node.isIncluded = false, + visitUnion: (node) => node.isIncluded = false, + ), + ], + output: Output( + 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. - @override - void visitTypealias(Typealias node) { - if (node.originalName == 'CFStringRef') { - node.isIncluded = true; - } - } +// Bindings for package:objective_c's ObjC code and the Foundation framework. +// Regenerate bindings with `dart run tool/generate_code.dart`. - @override - void visitGlobal(Global node) { - node.isIncluded = false; - } +// coverage:ignore-file +''', + format: false, + style: const NativeExternalBindings( + assetId: 'package:objective_c/objective_c.dylib', + ), + dartFile: root.resolve(objcBindings), + objectiveCFile: root.resolve('src/objective_c_bindings_generated.m'), + ), + ).generate(); - @override - void visitMacroConstant(MacroConstant node) { - node.isIncluded = false; - } + mergeExtraMethods(objcBindings, parseExtraMethods(extraMethodsFile)); - @override - void visitUnnamedEnumConstant(UnnamedEnumConstant node) { - node.isIncluded = false; - } + print('Generating objc_built_in_types.dart...'); + final exports = writeBuiltInTypes( + builtInTypes, + objcBindings, + interfaces: interfaces, + structs: structs, + protocols: protocols, + ); - @override - void visitUnion(Union node) { - node.isIncluded = false; - } + print('Generating objc_bindings_exported.dart...'); + writeExports(exports, objcExports); } -List writeBuiltInTypes(String out, String bindingsFile) { +List writeBuiltInTypes( + String out, + String bindingsFile, { + required Set interfaces, + required Set structs, + required Set protocols, +}) { final bindingsLines = File(bindingsFile).readAsLinesSync(); Set findBindings(RegExp re) => bindingsLines .map(re.firstMatch) @@ -557,33 +572,22 @@ List writeBuiltInTypes(String out, String bindingsFile) { final interfacesMap = { for (final name in genInterfaces) - ObjCBindingsVisitor.interfaces.entries - .firstWhere( - (e) => e.value == name, - orElse: () => MapEntry(name, name), - ) - .key: - name, + interfaces.firstWhere( + (i) => renameInterface(i) == name, + orElse: () => name, + ): name, }; final structsMap = { for (final name in genStructs) - ObjCBindingsVisitor.structs.entries - .firstWhere( - (e) => e.value == name, - orElse: () => MapEntry(name, name), - ) - .key: + structs.firstWhere((s) => renameStruct(s) == name, orElse: () => name): name, }; final protocolsMap = { for (final name in genProtocols) - ObjCBindingsVisitor.protocols.entries - .firstWhere( - (e) => e.value == name, - orElse: () => MapEntry(name, name), - ) - .key: - name, + protocols.firstWhere( + (p) => renameProtocol(p) == name, + orElse: () => name, + ): name, }; final s = StringBuffer(); @@ -665,97 +669,13 @@ Future run({required bool format}) async { final root = (pkgUri ?? Platform.script).resolve('../'); print('Generating runtime bindings...'); - FfiGenerator( - input: Input(entryPoints: [root.resolve('src/objective_c_runtime.h')]), - visitors: [const RuntimeBindingsVisitor()], - output: Output( - 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/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 -// ignore_for_file: unused_element -// coverage:ignore-file -''', - style: const NativeExternalBindings(), - dartFile: root.resolve(runtimeBindings), - ), - ).generate(); + generateRuntimeBindings(root); print('Generating C bindings...'); - FfiGenerator( - input: Input( - entryPoints: [ - root.resolve('src/include/dart_api_dl.h'), - root.resolve('src/objective_c.h'), - root.resolve('src/os_version.h'), - ], - ), - visitors: [const CBindingsVisitor()], - output: Output( - 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/objective_c.h` etc. -// Regenerate bindings with `dart run tool/generate_code.dart`. - -// coverage:ignore-file -''', - style: const NativeExternalBindings( - assetId: 'package:objective_c/objective_c.dylib', - ), - dartFile: root.resolve(cBindings), - ), - ).generate(); + generateCBindings(root); print('Generating ObjC bindings...'); - FfiGenerator( - input: Input( - entryPoints: [ - root.resolve('src/foundation.h'), - root.resolve('src/input_stream_adapter.h'), - root.resolve('src/ns_number.h'), - root.resolve('src/observer.h'), - root.resolve('src/protocol.h'), - ], - ), - objectiveC: const ObjectiveC(generateForPackageObjectiveC: true), - visitors: [const ObjCBindingsVisitor()], - output: Output( - 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 package:objective_c's ObjC code and the Foundation framework. -// Regenerate bindings with `dart run tool/generate_code.dart`. - -// coverage:ignore-file -''', - format: false, - style: const NativeExternalBindings( - assetId: 'package:objective_c/objective_c.dylib', - ), - dartFile: root.resolve(objcBindings), - objectiveCFile: root.resolve('src/objective_c_bindings_generated.m'), - ), - ).generate(); - - mergeExtraMethods(objcBindings, parseExtraMethods(extraMethodsFile)); - - print('Generating objc_built_in_types.dart...'); - final exports = writeBuiltInTypes(builtInTypes, objcBindings); - - print('Generating objc_bindings_exported.dart...'); - writeExports(exports, objcExports); + generateObjCBindings(root); if (format) { print('Formatting bindings...'); diff --git a/pkgs/swiftgen/example/generate_code.dart b/pkgs/swiftgen/example/generate_code.dart index f85b532e19..b0bd019747 100644 --- a/pkgs/swiftgen/example/generate_code.dart +++ b/pkgs/swiftgen/example/generate_code.dart @@ -46,10 +46,14 @@ Future main() async { ios: fg.Versions(min: Version(12, 0, 0)), macos: fg.Versions(min: Version(10, 14, 0)), ), - interfaces: fg.Interfaces( - include: (decl) => decl.originalName == 'AVAudioPlayerWrapper', - ), ), + visitors: [ + fg.Visitor.callback( + visitObjCInterface: (node) { + node.isIncluded = node.originalName == 'AVAudioPlayerWrapper'; + }, + ), + ], ), ).generate(logger: logger, tempDirectory: Uri.directory('temp')); diff --git a/pkgs/swiftgen/lib/src/config.dart b/pkgs/swiftgen/lib/src/config.dart index d2ff5f86c0..f035e0ffbc 100644 --- a/pkgs/swiftgen/lib/src/config.dart +++ b/pkgs/swiftgen/lib/src/config.dart @@ -216,46 +216,14 @@ class SwiftModuleInput implements SwiftGenInput { /// Selected options from [ffigen.FfiGenerator]. class FfiGeneratorOptions { - /// [ffigen.FfiGenerator.functions] - final ffigen.Functions functions; - - /// [ffigen.FfiGenerator.structs] - final ffigen.Structs structs; - - /// [ffigen.FfiGenerator.unions] - final ffigen.Unions unions; - - /// [ffigen.FfiGenerator.enums] - final ffigen.Enums enums; - - /// [ffigen.FfiGenerator.unnamedEnums] - final ffigen.UnnamedEnums unnamedEnums; - - /// [ffigen.FfiGenerator.globals] - final ffigen.Globals globals; - - /// Configuration for integer types. - final ffigen.Integers integers; - - /// [ffigen.FfiGenerator.macros] - final ffigen.Macros macros; - - /// [ffigen.FfiGenerator.typedefs] - final ffigen.Typedefs typedefs; + /// User custom visitors to modify/filter AST elements. + final List visitors; /// [ffigen.FfiGenerator.objectiveC] final ffigen.ObjectiveC objectiveC; const FfiGeneratorOptions({ - this.functions = ffigen.Functions.excludeAll, - this.structs = ffigen.Structs.excludeAll, - this.unions = ffigen.Unions.excludeAll, - this.enums = ffigen.Enums.excludeAll, - this.unnamedEnums = ffigen.UnnamedEnums.excludeAll, - this.globals = ffigen.Globals.excludeAll, - this.integers = const ffigen.Integers(), - this.macros = ffigen.Macros.excludeAll, - this.typedefs = ffigen.Typedefs.excludeAll, + this.visitors = const [], this.objectiveC = const ffigen.ObjectiveC(), }); } diff --git a/pkgs/swiftgen/lib/src/generator.dart b/pkgs/swiftgen/lib/src/generator.dart index 27bcce9a15..3f65852e35 100644 --- a/pkgs/swiftgen/lib/src/generator.dart +++ b/pkgs/swiftgen/lib/src/generator.dart @@ -78,8 +78,6 @@ extension SwiftGenGenerator on SwiftGenerator { ], absTempDir); void _generateDartFile(Logger logger, String objcHeader) { - final interfaces = ffigen.objectiveC.interfaces; - final protocols = ffigen.objectiveC.protocols; fg.FfiGenerator( output: fg.Output( dartFile: output.dartFile, @@ -87,39 +85,18 @@ extension SwiftGenGenerator on SwiftGenerator { preamble: output.preamble, style: fg.NativeExternalBindings(assetId: output.assetId), ), - functions: ffigen.functions, - structs: ffigen.structs, - unions: ffigen.unions, - enums: ffigen.enums, - unnamedEnums: ffigen.unnamedEnums, - globals: ffigen.globals, - integers: ffigen.integers, - macros: ffigen.macros, - typedefs: ffigen.typedefs, - objectiveC: fg.ObjectiveC( - interfaces: fg.Interfaces( - include: interfaces.include, - includeMember: interfaces.includeMember, - rename: interfaces.rename, - renameMember: interfaces.renameMember, - includeTransitive: interfaces.includeTransitive, - module: interfaces.module != fg.Interfaces.noModule - ? interfaces.module - : (_) => output.module, + objectiveC: ffigen.objectiveC, + visitors: [ + fg.Visitor.callback( + visitObjCInterface: (node) { + node.module ??= output.module; + }, + visitObjCProtocol: (node) { + node.module ??= output.module; + }, ), - protocols: fg.Protocols( - include: protocols.include, - includeMember: protocols.includeMember, - rename: protocols.rename, - renameMember: protocols.renameMember, - includeTransitive: protocols.includeTransitive, - module: protocols.module != fg.Protocols.noModule - ? protocols.module - : (_) => output.module, - ), - categories: ffigen.objectiveC.categories, - externalVersions: ffigen.objectiveC.externalVersions, - ), + ...ffigen.visitors, + ], input: fg.Input( entryPoints: [Uri.file(objcHeader)], compilerOptions: [ diff --git a/pkgs/swiftgen/test/integration/util.dart b/pkgs/swiftgen/test/integration/util.dart index 790ed60c0e..d8d7b17e8d 100644 --- a/pkgs/swiftgen/test/integration/util.dart +++ b/pkgs/swiftgen/test/integration/util.dart @@ -60,7 +60,10 @@ class TestGenerator { inputs: [ isObjCCompatible ? ObjCCompatibleSwiftFileInput(files: [Uri.file(inputFile)]) - : SwiftFileInput(files: [Uri.file(inputFile)]), + : SwiftFileInput( + files: [Uri.file(inputFile)], + tempModuleName: name, + ), ], output: Output( swiftWrapperFile: isObjCCompatible @@ -78,14 +81,16 @@ class TestGenerator { ''', ), ffigen: FfiGeneratorOptions( - objectiveC: fg.ObjectiveC( - interfaces: fg.Interfaces( - include: (decl) => decl.originalName.startsWith('Test'), + visitors: [ + fg.Visitor.callback( + visitObjCInterface: (node) { + node.isIncluded = node.originalName.startsWith('Test'); + }, + visitObjCProtocol: (node) { + node.isIncluded = node.originalName.startsWith('Test'); + }, ), - protocols: fg.Protocols( - include: (decl) => decl.originalName.startsWith('Test'), - ), - ), + ], ), ).generate( logger: Logger.root..level = Level.SEVERE, From a53246278f3e8c0284835f9c605933af7836f942 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Mon, 3 Aug 2026 13:16:11 +1000 Subject: [PATCH 21/37] config docs --- .../lib/src/config_provider/config.dart | 48 ++++++++++++++++++- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/pkgs/ffigen/lib/src/config_provider/config.dart b/pkgs/ffigen/lib/src/config_provider/config.dart index a783922966..24c74bce52 100644 --- a/pkgs/ffigen/lib/src/config_provider/config.dart +++ b/pkgs/ffigen/lib/src/config_provider/config.dart @@ -16,10 +16,44 @@ import 'public_ast.dart' show Visitor; /// headers. // TODO: Add a code snippet example. final class FfiGenerator { - /// User custom visitors to modify/filter AST elements. + /// Visitors to configure generation options for target language declarations. + /// + /// You can filter declarations: + /// ```dart + /// Visitor.callback( + /// visitFunc: (node) { + /// if (node.originalName.startsWith('_')) { + /// node.isIncluded = false; + /// } + /// }, + /// ) + /// ``` + /// + /// You can rename declarations: + /// ```dart + /// Visitor.callback( + /// visitStruct: (node) { + /// if (node.originalName == 'custom_type') { + /// node.name = 'CustomType'; + /// } + /// }, + /// ) + /// ``` + /// + /// Multiple visitors can be provided, and are executed sequentially in order. + /// Nodes filtered out in an earlier pass (`node.isIncluded = false`) are + /// still visited in subsequent passes. + /// ```dart + /// Visitor.callback( + /// visitFunc: (node) { + /// if (!node.isIncluded) return; + /// // Process only included functions... + /// }, + /// ) + /// ``` final List visitors; - /// The input configuration for header parsing of [FfiGenerator]. + /// Input headers and compiler options. final Input input; /// C++ specific configuration. @@ -59,6 +93,11 @@ final class FfiGenerator { final List libraryImports; /// Custom type mappings for typedefs. + // TODO(https://github.com/dart-lang/native/issues/2595): Remove/change this. + @Deprecated( + 'This field will change type. See ' + 'https://github.com/dart-lang/native/issues/2595.', + ) final Map typedefTypeMappings; /// Path to the clang library. @@ -110,6 +149,11 @@ final class Input { static bool _includeDefault(Uri header) => true; /// Command line arguments to pass to clang_compiler. + /// + /// If `null`, default options based on your platform and target language are + /// used (for example, automatic macOS SDK path detection). + /// If an empty list `[]` is provided, default platform options are + /// suppressed. final List? compilerOptions; /// Where to ignore compiler warnings/errors in source header files. From b86079b196f2eafde92dc1783ceac9dba581a5ae Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Mon, 3 Aug 2026 13:28:27 +1000 Subject: [PATCH 22/37] typedefTypeMappings -> typedefImports --- .../lib/src/config_provider/config.dart | 4 ++-- .../lib/src/config_provider/yaml_config.dart | 20 +++++++++---------- .../type_extractor/extractor.dart | 8 +++++--- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/pkgs/ffigen/lib/src/config_provider/config.dart b/pkgs/ffigen/lib/src/config_provider/config.dart index 24c74bce52..d9ac806978 100644 --- a/pkgs/ffigen/lib/src/config_provider/config.dart +++ b/pkgs/ffigen/lib/src/config_provider/config.dart @@ -98,7 +98,7 @@ final class FfiGenerator { 'This field will change type. See ' 'https://github.com/dart-lang/native/issues/2595.', ) - final Map typedefTypeMappings; + final List typedefImports; /// Path to the clang library. /// @@ -122,7 +122,7 @@ final class FfiGenerator { 'https://github.com/dart-lang/native/issues/2597.', ) this.libraryImports = const [], - this.typedefTypeMappings = const {}, + this.typedefImports = const [], @Deprecated('Only visible for YamlConfig plumbing.') this.libclangDylib, }); diff --git a/pkgs/ffigen/lib/src/config_provider/yaml_config.dart b/pkgs/ffigen/lib/src/config_provider/yaml_config.dart index 377858f8d8..4e3968b452 100644 --- a/pkgs/ffigen/lib/src/config_provider/yaml_config.dart +++ b/pkgs/ffigen/lib/src/config_provider/yaml_config.dart @@ -141,8 +141,8 @@ final class YamlConfig { late Map _usrTypeMappings; /// Stores typedef name to ImportedType mappings specified by user. - Map get typedefTypeMappings => _typedefTypeMappings; - late Map _typedefTypeMappings; + List get typedefImports => _typedefImports; + late List _typedefImports; /// Stores struct name to ImportedType mappings specified by user. Map get structTypeMappings => _structTypeMappings; @@ -742,11 +742,11 @@ final class YamlConfig { ], result: (node) { final nodeValue = node.value as Map; - _typedefTypeMappings = makeImportTypeMapping( + _typedefImports = makeImportTypeMapping( (nodeValue[strings.typeMapTypedefs]) as Map>, _libraryImports, - ); + ).values.toList(); _structTypeMappings = makeImportTypeMapping( (nodeValue[strings.typeMapStructs]) as Map>, @@ -1175,7 +1175,7 @@ final class YamlConfig { FfiGenerator configAdapter() { final yamlVisitor = YamlConfigAstVisitor( usrTypeMappings: _usrTypeMappings, - typedefTypeMappings: _typedefTypeMappings, + typedefImports: _typedefImports, functionDecl: _functionDecl, structDecl: _structDecl, unionDecl: _unionDecl, @@ -1222,7 +1222,7 @@ final class YamlConfig { wrapperDocComment: wrapperDocComment, ), ), - typedefTypeMappings: _typedefTypeMappings, + typedefImports: _typedefImports, objectiveC: language == Language.objc ? ObjectiveC( externalVersions: externalVersions, @@ -1242,7 +1242,7 @@ final class YamlConfig { final class YamlConfigAstVisitor extends public_ast.Visitor { final Map _usrTypeMappings; - final Map _typedefTypeMappings; + final List _typedefImports; final YamlDeclarationFilters _functionDecl; final YamlDeclarationFilters _structDecl; final YamlDeclarationFilters _unionDecl; @@ -1267,7 +1267,7 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { YamlConfigAstVisitor({ required Map usrTypeMappings, - required Map typedefTypeMappings, + required List typedefImports, required YamlDeclarationFilters functionDecl, required YamlDeclarationFilters structDecl, required YamlDeclarationFilters unionDecl, @@ -1291,7 +1291,7 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { required bool includeUnusedTypedefs, required Map> varArgFunctions, }) : _usrTypeMappings = usrTypeMappings, - _typedefTypeMappings = typedefTypeMappings, + _typedefImports = typedefImports, _functionDecl = functionDecl, _structDecl = structDecl, _unionDecl = unionDecl, @@ -1483,7 +1483,7 @@ final class YamlConfigAstVisitor extends public_ast.Visitor { @override void visitTypealias(public_ast.Typealias node) { node.includeUnused = _includeUnusedTypedefs; - if (_typedefTypeMappings.containsKey(node.originalName)) { + if (_typedefImports.any((t) => t.nativeType == node.originalName)) { node.isIncluded = false; } else { _applyInclusion(node, _typedefs); diff --git a/pkgs/ffigen/lib/src/header_parser/type_extractor/extractor.dart b/pkgs/ffigen/lib/src/header_parser/type_extractor/extractor.dart index ad377f1d4f..749b3b3499 100644 --- a/pkgs/ffigen/lib/src/header_parser/type_extractor/extractor.dart +++ b/pkgs/ffigen/lib/src/header_parser/type_extractor/extractor.dart @@ -182,9 +182,11 @@ Type? _createTypeFromCursor( // those two types are ABI compatible, so just return bool regardless. return BooleanType(); } - if (config.typedefTypeMappings.containsKey(spelling)) { - logger.fine(' Type Mapped from custom typedefTypeMappings'); - return config.typedefTypeMappings[spelling]!; + for (final importedType in config.typedefImports) { + if (importedType.nativeType == spelling) { + logger.fine(' Type Mapped from custom typedefTypeMappings'); + return importedType; + } } // Get name from supported typedef name. if (suportedTypedefToSuportedNativeType.containsKey(spelling)) { From 1b767f77d94f5638b7f7b67dc63534b81f60d035 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Mon, 3 Aug 2026 13:33:42 +1000 Subject: [PATCH 23/37] mac only test --- pkgs/ffigen/test/public_ast_visitor_test.dart | 66 ++++++++++--------- 1 file changed, 36 insertions(+), 30 deletions(-) diff --git a/pkgs/ffigen/test/public_ast_visitor_test.dart b/pkgs/ffigen/test/public_ast_visitor_test.dart index e0b0e6c906..14c51e6b36 100644 --- a/pkgs/ffigen/test/public_ast_visitor_test.dart +++ b/pkgs/ffigen/test/public_ast_visitor_test.dart @@ -2,6 +2,8 @@ // 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 'dart:io'; + import 'package:ffigen/ffigen.dart'; import 'package:ffigen/src/code_generator.dart' as code_gen; import 'package:ffigen/src/header_parser.dart' as parser; @@ -192,36 +194,40 @@ void main() { expect(enumClass.silenceWarning, isTrue); }); - test('ObjCInterface.includeCategories option on public AST', () { - final headerUri = Uri.file( - absPath('test/native_objc_test/transitive_test.h'), - ); - final generator = FfiGenerator( - input: Input(entryPoints: [headerUri]), - output: Output(dartFile: Uri.file('unused.dart')), - objectiveC: const ObjectiveC(), - visitors: [ - const IncludeSetVisitor( - objcInterfaces: {'DirectlyIncludedIntForCat'}, - ), - Visitor.callback( - visitObjCInterface: (node) { - if (node.originalName == 'DirectlyIncludedIntForCat') { - expect(node.includeCategories, isTrue); - node.includeCategories = false; - expect(node.includeCategories, isFalse); - } - }, - ), - ], - ); - - final library = parser.parse(testContext(generator)); - final interface = - library.getBinding('DirectlyIncludedIntForCat') - as code_gen.ObjCInterface; - expect(interface.includeCategories, isFalse); - }); + test( + 'ObjCInterface.includeCategories option on public AST', + () { + final headerUri = Uri.file( + absPath('test/native_objc_test/transitive_test.h'), + ); + final generator = FfiGenerator( + input: Input(entryPoints: [headerUri]), + output: Output(dartFile: Uri.file('unused.dart')), + objectiveC: const ObjectiveC(), + visitors: [ + const IncludeSetVisitor( + objcInterfaces: {'DirectlyIncludedIntForCat'}, + ), + Visitor.callback( + visitObjCInterface: (node) { + if (node.originalName == 'DirectlyIncludedIntForCat') { + expect(node.includeCategories, isTrue); + node.includeCategories = false; + expect(node.includeCategories, isFalse); + } + }, + ), + ], + ); + + final library = parser.parse(testContext(generator)); + final interface = + library.getBinding('DirectlyIncludedIntForCat') + as code_gen.ObjCInterface; + expect(interface.includeCategories, isFalse); + }, + skip: !Platform.isMacOS ? 'macOS specific test' : null, + ); test('Visitor setting varArgs for variadic functions', () { final headerUri = Uri.file(absPath('test/header_parser_tests/varargs.h')); From b57df8c7f302675416041fbdf57b15134adbe8c8 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Mon, 3 Aug 2026 13:45:20 +1000 Subject: [PATCH 24/37] fix large_test --- .../libclang-example/generated_bindings.dart | 57 ++++---- .../objective_c/avf_audio_bindings.dart | 131 +----------------- .../lib/src/visitor/find_transitive_deps.dart | 5 +- .../_expected_dart_handle_bindings.dart | 5 +- ...expected_native_func_typedef_bindings.dart | 13 +- ..._expected_struct_fptr_fields_bindings.dart | 4 +- .../_expected_typedef_bindings.dart | 4 +- .../_expected_libclang_bindings.dart | 61 ++++---- .../_expected_sqlite_bindings.dart | 63 +++------ 9 files changed, 84 insertions(+), 259 deletions(-) diff --git a/pkgs/ffigen/example/libclang-example/generated_bindings.dart b/pkgs/ffigen/example/libclang-example/generated_bindings.dart index fbf2f2c658..f290f01eed 100644 --- a/pkgs/ffigen/example/libclang-example/generated_bindings.dart +++ b/pkgs/ffigen/example/libclang-example/generated_bindings.dart @@ -9498,19 +9498,15 @@ final class CXCursorSetImpl extends ffi.Opaque {} /// The visitor should return one of the \c CXChildVisitResult values /// to direct clang_visitCursorChildren(). typedef CXCursorVisitor = - ffi.Pointer>; -typedef CXCursorVisitorFunction = - ffi.UnsignedInt Function( - CXCursor cursor, - CXCursor parent, - CXClientData client_data, - ); -typedef DartCXCursorVisitorFunction = - CXChildVisitResult Function( - CXCursor cursor, - CXCursor parent, - CXClientData client_data, - ); + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedInt Function( + CXCursor cursor, + CXCursor parent, + CXClientData client_data, + ) + > + >; /// A single diagnostic, containing the diagnostic's severity, /// location, text, source ranges, and fix-it hints. @@ -9628,11 +9624,11 @@ enum CXEvalResultKind { /// The visitor should return one of the \c CXVisitorResult values /// to direct \c clang_Type_visitFields. typedef CXFieldVisitor = - ffi.Pointer>; -typedef CXFieldVisitorFunction = - ffi.UnsignedInt Function(CXCursor C, CXClientData client_data); -typedef DartCXFieldVisitorFunction = - CXVisitorResult Function(CXCursor C, CXClientData client_data); + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedInt Function(CXCursor C, CXClientData client_data) + > + >; /// A particular source file that is part of a translation unit. typedef CXFile = ffi.Pointer; @@ -10173,21 +10169,16 @@ final class CXIdxObjCProtocolRefListInfo extends ffi.Struct { /// array is sorted in order of immediate inclusion. For example, /// the first element refers to the location that included 'included_file'. typedef CXInclusionVisitor = - ffi.Pointer>; -typedef CXInclusionVisitorFunction = - ffi.Void Function( - CXFile included_file, - ffi.Pointer inclusion_stack, - ffi.UnsignedInt include_len, - CXClientData client_data, - ); -typedef DartCXInclusionVisitorFunction = - void Function( - CXFile included_file, - ffi.Pointer inclusion_stack, - int include_len, - CXClientData client_data, - ); + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + CXFile included_file, + ffi.Pointer inclusion_stack, + ffi.UnsignedInt include_len, + CXClientData client_data, + ) + > + >; /// An "index" that consists of a set of translation units that would /// typically be linked together into an executable or library. diff --git a/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart b/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart index 76236ccc66..f9de946d43 100644 --- a/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart +++ b/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart @@ -12,26 +12,6 @@ import 'package:ffi/ffi.dart' as pkg_ffi; const _$objcVersionCheck = objc.ObjCVersionCheck(9, 5); -enum AVAudioCommonFormat { - AVAudioOtherFormat(0), - AVAudioPCMFormatFloat32(1), - AVAudioPCMFormatFloat64(2), - AVAudioPCMFormatInt16(3), - AVAudioPCMFormatInt32(4); - - final int value; - const AVAudioCommonFormat(this.value); - - static AVAudioCommonFormat fromValue(int value) => switch (value) { - 0 => AVAudioOtherFormat, - 1 => AVAudioPCMFormatFloat32, - 2 => AVAudioPCMFormatFloat64, - 3 => AVAudioPCMFormatInt16, - 4 => AVAudioPCMFormatInt32, - _ => throw ArgumentError('Unknown value for AVAudioCommonFormat: $value'), - }; -} - /// AVAudioFormat /// /// AVAudioFormat @@ -764,7 +744,8 @@ extension AVAudioPlayer$Methods on AVAudioPlayer { } } -/// AVAudioPlayerDelegate +/// WARNING: AVAudioPlayerDelegate is a stub. To generate bindings for this class, include +/// AVAudioPlayerDelegate in your config's objc-protocols list. /// /// AVAudioPlayerDelegate extension type AVAudioPlayerDelegate._(objc.ObjCProtocol object$) @@ -796,26 +777,6 @@ extension type CASpatialAudioExperience._(objc.ObjCObject object$) }) : object$ = objc.ObjCObject(other, retain: retain, release: release) {} } -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_AVAudioChannelLayout', -) -external ffi.Pointer _class_AVAudioChannelLayout_raw; -final _class_AVAudioChannelLayout = objc.getClass( - "AVAudioChannelLayout", - () => ffi.Native.addressOf>( - _class_AVAudioChannelLayout_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_AVAudioFormat', -) -external ffi.Pointer _class_AVAudioFormat_raw; -final _class_AVAudioFormat = objc.getClass( - "AVAudioFormat", - () => ffi.Native.addressOf>( - _class_AVAudioFormat_raw, - ).cast(), -); @ffi.Native>( symbol: 'OBJC_CLASS_\$_AVAudioPlayer', ) @@ -826,16 +787,6 @@ final _class_AVAudioPlayer = objc.getClass( _class_AVAudioPlayer_raw, ).cast(), ); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_CASpatialAudioExperience', -) -external ffi.Pointer _class_CASpatialAudioExperience_raw; -final _class_CASpatialAudioExperience = objc.getClass( - "CASpatialAudioExperience", - () => ffi.Native.addressOf>( - _class_CASpatialAudioExperience_raw, - ).cast(), -); final _objc_msgSend_151sglz = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -1134,23 +1085,6 @@ final _objc_msgSend_91o635 = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_e3qsqz = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); final _objc_msgSend_hwm8nu = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -1217,31 +1151,12 @@ final _objc_msgSend_xw2lbc = objc.msgSendPointer ffi.Pointer, ) >(); -@ffi.Native Function()>( - symbol: '_1uu024u_AVAudioPlayerDelegate', -) -external ffi.Pointer -_protocol_AVAudioPlayerDelegate_raw(); -final _protocol_AVAudioPlayerDelegate = objc.getProtocol( - "AVAudioPlayerDelegate", - _protocol_AVAudioPlayerDelegate_raw, -); late final _sel_alloc = objc.registerName("alloc"); late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); -late final _sel_audioPlayerDecodeErrorDidOccur_error_ = objc.registerName( - "audioPlayerDecodeErrorDidOccur:error:", -); -late final _sel_audioPlayerDidFinishPlaying_successfully_ = objc.registerName( - "audioPlayerDidFinishPlaying:successfully:", -); late final _sel_averagePowerForChannel_ = objc.registerName( "averagePowerForChannel:", ); late final _sel_channelAssignments = objc.registerName("channelAssignments"); -late final _sel_channelCount = objc.registerName("channelCount"); -late final _sel_channelLayout = objc.registerName("channelLayout"); -late final _sel_commonFormat = objc.registerName("commonFormat"); -late final _sel_conformsToProtocol_ = objc.registerName("conformsToProtocol:"); late final _sel_currentDevice = objc.registerName("currentDevice"); late final _sel_currentTime = objc.registerName("currentTime"); late final _sel_data = objc.registerName("data"); @@ -1249,25 +1164,8 @@ late final _sel_delegate = objc.registerName("delegate"); late final _sel_deviceCurrentTime = objc.registerName("deviceCurrentTime"); late final _sel_duration = objc.registerName("duration"); late final _sel_enableRate = objc.registerName("enableRate"); -late final _sel_encodeWithCoder_ = objc.registerName("encodeWithCoder:"); late final _sel_format = objc.registerName("format"); -late final _sel_formatDescription = objc.registerName("formatDescription"); late final _sel_init = objc.registerName("init"); -late final _sel_initStandardFormatWithSampleRate_channelLayout_ = objc - .registerName("initStandardFormatWithSampleRate:channelLayout:"); -late final _sel_initStandardFormatWithSampleRate_channels_ = objc.registerName( - "initStandardFormatWithSampleRate:channels:", -); -late final _sel_initWithCMAudioFormatDescription_ = objc.registerName( - "initWithCMAudioFormatDescription:", -); -late final _sel_initWithCoder_ = objc.registerName("initWithCoder:"); -late final _sel_initWithCommonFormat_sampleRate_channels_interleaved_ = objc - .registerName("initWithCommonFormat:sampleRate:channels:interleaved:"); -late final _sel_initWithCommonFormat_sampleRate_interleaved_channelLayout_ = - objc.registerName( - "initWithCommonFormat:sampleRate:interleaved:channelLayout:", - ); late final _sel_initWithContentsOfURL_error_ = objc.registerName( "initWithContentsOfURL:error:", ); @@ -1278,31 +1176,12 @@ late final _sel_initWithData_error_ = objc.registerName("initWithData:error:"); late final _sel_initWithData_fileTypeHint_error_ = objc.registerName( "initWithData:fileTypeHint:error:", ); -late final _sel_initWithLayoutTag_ = objc.registerName("initWithLayoutTag:"); -late final _sel_initWithLayout_ = objc.registerName("initWithLayout:"); -late final _sel_initWithSettings_ = objc.registerName("initWithSettings:"); -late final _sel_initWithStreamDescription_ = objc.registerName( - "initWithStreamDescription:", -); -late final _sel_initWithStreamDescription_channelLayout_ = objc.registerName( - "initWithStreamDescription:channelLayout:", -); late final _sel_intendedSpatialExperience = objc.registerName( "intendedSpatialExperience", ); -late final _sel_isEqual_ = objc.registerName("isEqual:"); -late final _sel_isInterleaved = objc.registerName("isInterleaved"); late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); late final _sel_isMeteringEnabled = objc.registerName("isMeteringEnabled"); late final _sel_isPlaying = objc.registerName("isPlaying"); -late final _sel_isStandard = objc.registerName("isStandard"); -late final _sel_layout = objc.registerName("layout"); -late final _sel_layoutTag = objc.registerName("layoutTag"); -late final _sel_layoutWithLayoutTag_ = objc.registerName( - "layoutWithLayoutTag:", -); -late final _sel_layoutWithLayout_ = objc.registerName("layoutWithLayout:"); -late final _sel_magicCookie = objc.registerName("magicCookie"); late final _sel_new = objc.registerName("new"); late final _sel_numberOfChannels = objc.registerName("numberOfChannels"); late final _sel_numberOfLoops = objc.registerName("numberOfLoops"); @@ -1315,7 +1194,6 @@ late final _sel_play = objc.registerName("play"); late final _sel_playAtTime_ = objc.registerName("playAtTime:"); late final _sel_prepareToPlay = objc.registerName("prepareToPlay"); late final _sel_rate = objc.registerName("rate"); -late final _sel_sampleRate = objc.registerName("sampleRate"); late final _sel_setChannelAssignments_ = objc.registerName( "setChannelAssignments:", ); @@ -1326,7 +1204,6 @@ late final _sel_setEnableRate_ = objc.registerName("setEnableRate:"); late final _sel_setIntendedSpatialExperience_ = objc.registerName( "setIntendedSpatialExperience:", ); -late final _sel_setMagicCookie_ = objc.registerName("setMagicCookie:"); late final _sel_setMeteringEnabled_ = objc.registerName("setMeteringEnabled:"); late final _sel_setNumberOfLoops_ = objc.registerName("setNumberOfLoops:"); late final _sel_setPan_ = objc.registerName("setPan:"); @@ -1337,10 +1214,6 @@ late final _sel_setVolume_fadeDuration_ = objc.registerName( ); late final _sel_settings = objc.registerName("settings"); late final _sel_stop = objc.registerName("stop"); -late final _sel_streamDescription = objc.registerName("streamDescription"); -late final _sel_supportsSecureCoding = objc.registerName( - "supportsSecureCoding", -); late final _sel_updateMeters = objc.registerName("updateMeters"); late final _sel_url = objc.registerName("url"); late final _sel_volume = objc.registerName("volume"); diff --git a/pkgs/ffigen/lib/src/visitor/find_transitive_deps.dart b/pkgs/ffigen/lib/src/visitor/find_transitive_deps.dart index 8398c7d2e7..aa39a378ca 100644 --- a/pkgs/ffigen/lib/src/visitor/find_transitive_deps.dart +++ b/pkgs/ffigen/lib/src/visitor/find_transitive_deps.dart @@ -39,8 +39,9 @@ class FindTransitiveDepsVisitation extends Visitation { @override void visitTypealias(Typealias node) { - node.visitChildren(visitor); - if (!node.isAnonymous) { + if (node.isAnonymous) { + node.visitChildren(visitor); + } else { transitives.add(node); } } diff --git a/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_dart_handle_bindings.dart b/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_dart_handle_bindings.dart index f7947f5dff..5f5df1f17f 100644 --- a/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_dart_handle_bindings.dart +++ b/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_dart_handle_bindings.dart @@ -71,6 +71,5 @@ final class Struct2 extends ffi.Struct { }) => $allocator()..ref.h = h; } -typedef Typedef1 = ffi.Pointer>; -typedef Typedef1Function = ffi.Void Function(ffi.Handle); -typedef DartTypedef1Function = void Function(Object); +typedef Typedef1 = + ffi.Pointer>; diff --git a/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_native_func_typedef_bindings.dart b/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_native_func_typedef_bindings.dart index 52c3240100..eb0ed55bf9 100644 --- a/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_native_func_typedef_bindings.dart +++ b/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_native_func_typedef_bindings.dart @@ -71,10 +71,7 @@ class NativeLibrary { .asFunction(); } -typedef InsideReturnType = - ffi.Pointer>; -typedef InsideReturnTypeFunction = ffi.Void Function(); -typedef DartInsideReturnTypeFunction = void Function(); +typedef InsideReturnType = ffi.Pointer>; final class Struct extends ffi.Struct { external ffi.Pointer< @@ -108,10 +105,6 @@ final class Struct2 extends ffi.Struct { }) => $allocator()..ref.constFuncPointer = constFuncPointer; } -typedef VoidFuncPointer = - ffi.Pointer>; -typedef VoidFuncPointerFunction = ffi.Void Function(); -typedef DartVoidFuncPointerFunction = void Function(); +typedef VoidFuncPointer = ffi.Pointer>; typedef WithTypedefReturnType = - ffi.Pointer>; -typedef WithTypedefReturnTypeFunction = InsideReturnType Function(); + ffi.Pointer>; diff --git a/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_struct_fptr_fields_bindings.dart b/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_struct_fptr_fields_bindings.dart index 550cfc43c9..5608b359c1 100644 --- a/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_struct_fptr_fields_bindings.dart +++ b/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_struct_fptr_fields_bindings.dart @@ -5,9 +5,7 @@ import 'dart:ffi' as ffi; typedef ArithmeticOperation = - ffi.Pointer>; -typedef ArithmeticOperationFunction = ffi.Int Function(ffi.Int a, ffi.Int b); -typedef DartArithmeticOperationFunction = int Function(int a, int b); + ffi.Pointer>; final class S extends ffi.Struct { external ffi.Pointer> func1; diff --git a/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_typedef_bindings.dart b/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_typedef_bindings.dart index 7d2414c949..89d7474092 100644 --- a/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_typedef_bindings.dart +++ b/pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_typedef_bindings.dart @@ -97,9 +97,7 @@ typedef ExcludedStruct = _ExcludedStruct; typedef IncludedTypedef = ffi.Pointer; typedef NTyperef1 = ExcludedStruct; typedef NamedFunctionProto = - ffi.Pointer>; -typedef NamedFunctionProtoFunction = ffi.Void Function(); -typedef DartNamedFunctionProtoFunction = void Function(); + ffi.Pointer>; typedef NamedStructInTypedef = _NamedStructInTypedef; typedef NestingASpecifiedType = ffi.IntPtr; typedef DartNestingASpecifiedType = int; diff --git a/pkgs/ffigen/test/large_integration_tests/_expected_libclang_bindings.dart b/pkgs/ffigen/test/large_integration_tests/_expected_libclang_bindings.dart index c58e7d2628..d6d209cc5c 100644 --- a/pkgs/ffigen/test/large_integration_tests/_expected_libclang_bindings.dart +++ b/pkgs/ffigen/test/large_integration_tests/_expected_libclang_bindings.dart @@ -6920,19 +6920,15 @@ final class CXCursorSetImpl extends ffi.Opaque {} /// Visitor invoked for each cursor found by a traversal. typedef CXCursorVisitor = - ffi.Pointer>; -typedef CXCursorVisitorFunction = - ffi.UnsignedInt Function( - CXCursor cursor, - CXCursor parent, - CXClientData client_data, - ); -typedef DartCXCursorVisitorFunction = - CXChildVisitResult Function( - CXCursor cursor, - CXCursor parent, - CXClientData client_data, - ); + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedInt Function( + CXCursor cursor, + CXCursor parent, + CXClientData client_data, + ) + > + >; /// Describes the exception specification of a cursor. enum CXCursor_ExceptionSpecificationKind { @@ -7123,11 +7119,11 @@ enum CXEvalResultKind { /// Visitor invoked for each field found by a traversal. typedef CXFieldVisitor = - ffi.Pointer>; -typedef CXFieldVisitorFunction = - ffi.UnsignedInt Function(CXCursor C, CXClientData client_data); -typedef DartCXFieldVisitorFunction = - CXVisitorResult Function(CXCursor C, CXClientData client_data); + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedInt Function(CXCursor C, CXClientData client_data) + > + >; /// A particular source file that is part of a translation unit. typedef CXFile = ffi.Pointer; @@ -7651,21 +7647,16 @@ final class CXIdxObjCProtocolRefListInfo extends ffi.Struct { /// Visitor invoked for each file in a translation unit (used with /// clang_getInclusions()). typedef CXInclusionVisitor = - ffi.Pointer>; -typedef CXInclusionVisitorFunction = - ffi.Void Function( - CXFile included_file, - ffi.Pointer inclusion_stack, - ffi.UnsignedInt include_len, - CXClientData client_data, - ); -typedef DartCXInclusionVisitorFunction = - void Function( - CXFile included_file, - ffi.Pointer inclusion_stack, - int include_len, - CXClientData client_data, - ); + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + CXFile included_file, + ffi.Pointer inclusion_stack, + ffi.UnsignedInt include_len, + CXClientData client_data, + ) + > + >; /// An "index" that consists of a set of translation units that would typically /// be linked together into an executable or library. @@ -9123,6 +9114,4 @@ final class IndexerCallbacks extends ffi.Struct { ..ref.indexEntityReference = indexEntityReference; } -typedef __darwin_time_t = ffi.Long; -typedef Dart__darwin_time_t = int; -typedef time_t = __darwin_time_t; +typedef time_t = ffi.Long; diff --git a/pkgs/ffigen/test/large_integration_tests/_expected_sqlite_bindings.dart b/pkgs/ffigen/test/large_integration_tests/_expected_sqlite_bindings.dart index d00b72bbf3..f6594a9f6a 100644 --- a/pkgs/ffigen/test/large_integration_tests/_expected_sqlite_bindings.dart +++ b/pkgs/ffigen/test/large_integration_tests/_expected_sqlite_bindings.dart @@ -12465,23 +12465,17 @@ final class fts5_api extends ffi.Struct { } typedef fts5_extension_function = - ffi.Pointer>; -typedef fts5_extension_functionFunction = - ffi.Void Function( - ffi.Pointer pApi, - ffi.Pointer pFts, - ffi.Pointer pCtx, - ffi.Int nVal, - ffi.Pointer> apVal, - ); -typedef Dartfts5_extension_functionFunction = - void Function( - ffi.Pointer pApi, - ffi.Pointer pFts, - ffi.Pointer pCtx, - int nVal, - ffi.Pointer> apVal, - ); + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer pApi, + ffi.Pointer pFts, + ffi.Pointer pCtx, + ffi.Int nVal, + ffi.Pointer> apVal, + ) + > + >; final class fts5_tokenizer extends ffi.Struct { external ffi.Pointer< @@ -12585,21 +12579,16 @@ final class sqlite3_blob extends ffi.Opaque {} /// This is legacy and deprecated. It is included for historical /// compatibility and is not documented. typedef sqlite3_callback = - ffi.Pointer>; -typedef sqlite3_callbackFunction = - ffi.Int Function( - ffi.Pointer, - ffi.Int, - ffi.Pointer>, - ffi.Pointer>, - ); -typedef Dartsqlite3_callbackFunction = - int Function( - ffi.Pointer, - int, - ffi.Pointer>, - ffi.Pointer>, - ); + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Int, + ffi.Pointer>, + ffi.Pointer>, + ) + > + >; final class sqlite3_context extends ffi.Opaque {} @@ -12616,11 +12605,7 @@ final class sqlite3_context extends ffi.Opaque {} /// The typedef is necessary to work around problems in certain /// C++ compilers. typedef sqlite3_destructor_type = - ffi.Pointer>; -typedef sqlite3_destructor_typeFunction = - ffi.Void Function(ffi.Pointer); -typedef Dartsqlite3_destructor_typeFunction = - void Function(ffi.Pointer); + ffi.Pointer)>>; final class sqlite3_file extends ffi.Struct { /// Methods for an open file @@ -14006,9 +13991,7 @@ final class sqlite3_stmt extends ffi.Opaque {} final class sqlite3_str extends ffi.Opaque {} typedef sqlite3_syscall_ptr = - ffi.Pointer>; -typedef sqlite3_syscall_ptrFunction = ffi.Void Function(); -typedef Dartsqlite3_syscall_ptrFunction = void Function(); + ffi.Pointer>; typedef sqlite3_uint64 = sqlite_uint64; final class sqlite3_value extends ffi.Opaque {} From 2b5a5b384c4da064c185acbd91ad7f9d8e583c88 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Mon, 3 Aug 2026 14:31:30 +1000 Subject: [PATCH 25/37] cleaning up ObjC bindings --- .../code_generator/objc_built_in_types.dart | 104 +- .../category_test_bindings.dart | 596 + .../rename_test_bindings.dart | 14 +- pkgs/ffigen/tool/diff_bindings_with_main.dart | 28 + .../src/objective_c_bindings_exported.dart | 105 +- .../src/objective_c_bindings_generated.dart | 46171 ++++++---------- .../src/objective_c_bindings_generated.m | 347 +- pkgs/objective_c/tool/generate_code.dart | 13 +- 8 files changed, 16896 insertions(+), 30482 deletions(-) create mode 100644 pkgs/ffigen/tool/diff_bindings_with_main.dart diff --git a/pkgs/ffigen/lib/src/code_generator/objc_built_in_types.dart b/pkgs/ffigen/lib/src/code_generator/objc_built_in_types.dart index 3dc26d65b1..b8d7d04382 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_built_in_types.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_built_in_types.dart @@ -10,29 +10,22 @@ const objCBuiltInInterfaces = { 'DOBJCDartInputStreamAdapterWeakHolder': 'DartInputStreamAdapterWeakHolder', 'DOBJCDartProtocol': 'DartProtocol', 'DOBJCDartProtocolBuilder': 'DartProtocolBuilder', - 'NSArchiver': 'NSArchiver', 'NSArray': 'NSArray', 'NSAttributedString': 'NSAttributedString', 'NSAttributedStringMarkdownParsingOptions': 'NSAttributedStringMarkdownParsingOptions', 'NSBundle': 'NSBundle', - 'NSCalendarDate': 'NSCalendarDate', 'NSCharacterSet': 'NSCharacterSet', - 'NSClassDescription': 'NSClassDescription', 'NSCoder': 'NSCoder', - 'NSConnection': 'NSConnection', 'NSData': 'NSData', 'NSDate': 'NSDate', 'NSDictionary': 'NSDictionary', 'NSEnumerator': 'NSEnumerator', 'NSError': 'NSError', - 'NSFileManager': 'NSFileManager', - 'NSHost': 'NSHost', 'NSIndexSet': 'NSIndexSet', 'NSInputStream': 'NSInputStream', 'NSInvocation': 'NSInvocation', - 'NSKeyValueSharedObserversSnapshot': 'NSKeyValueSharedObserversSnapshot', - 'NSKeyedArchiver': 'NSKeyedArchiver', + 'NSItemProvider': 'NSItemProvider', 'NSLocale': 'NSLocale', 'NSMethodSignature': 'NSMethodSignature', 'NSMutableArray': 'NSMutableArray', @@ -49,20 +42,15 @@ const objCBuiltInInterfaces = { 'NSOrderedCollectionChange': 'NSOrderedCollectionChange', 'NSOrderedCollectionDifference': 'NSOrderedCollectionDifference', 'NSOrderedSet': 'NSOrderedSet', - 'NSOrthography': 'NSOrthography', 'NSOutputStream': 'NSOutputStream', 'NSPort': 'NSPort', - 'NSPortCoder': 'NSPortCoder', 'NSPortMessage': 'NSPortMessage', - 'NSPredicate': 'NSPredicate', 'NSProgress': 'NSProgress', 'NSRunLoop': 'NSRunLoop', - 'NSScriptObjectSpecifier': 'NSScriptObjectSpecifier', 'NSSet': 'NSSet', 'NSStream': 'NSStream', 'NSString': 'NSString', 'NSThread': 'NSThread', - 'NSTimeZone': 'NSTimeZone', 'NSTimer': 'NSTimer', 'NSURL': 'NSURL', 'NSURLHandle': 'NSURLHandle', @@ -133,46 +121,16 @@ const objCBuiltInProtocols = { 'NSPortDelegate': 'NSPortDelegate', 'NSSecureCoding': 'NSSecureCoding', 'NSStreamDelegate': 'NSStreamDelegate', - 'NSURLHandleClient': 'NSURLHandleClient', 'Observer': 'Observer', }; const objCBuiltInCategories = { - 'NSArchiverCallback', - 'NSArrayCreation', - 'NSArrayDiffing', - 'NSArrayPathExtensions', - 'NSAttributedStringCreateFromMarkdown', - 'NSAttributedStringFormatting', - 'NSBundleExtensionMethods', - 'NSBundleResourceRequestAdditions', - 'NSCalendarDateExtras', - 'NSClassDescriptionPrimitives', - 'NSCoderMethods', - 'NSComparisonMethods', - 'NSCopyLinkMoveHandler', - 'NSDataBase64Encoding', - 'NSDataCompression', 'NSDataCreation', - 'NSDateCreation', - 'NSDecimalNumberExtensions', - 'NSDelayedPerforming', - 'NSDeprecated', - 'NSDeprecatedKeyValueCoding', - 'NSDeprecatedKeyValueObservingCustomization', - 'NSDeprecatedMethods', - 'NSDictionaryCreation', - 'NSDiscardableContentProxy', - 'NSDistributedObjects', - 'NSErrorRecoveryAttempting', 'NSExtendedArray', - 'NSExtendedAttributedString', - 'NSExtendedCoder', 'NSExtendedData', 'NSExtendedDate', 'NSExtendedDictionary', 'NSExtendedEnumerator', - 'NSExtendedLocale', 'NSExtendedMutableArray', 'NSExtendedMutableData', 'NSExtendedMutableDictionary', @@ -180,68 +138,8 @@ const objCBuiltInCategories = { 'NSExtendedMutableSet', 'NSExtendedOrderedSet', 'NSExtendedSet', - 'NSExtendedStringPropertyListParsing', - 'NSFileAttributes', - 'NSGenericFastEnumeration', - 'NSGeometryCoding', - 'NSGeometryKeyedCoding', - 'NSInputStreamExtensions', - 'NSItemProvider', - 'NSKeyValueCoding', - 'NSKeyValueObserverNotification', - 'NSKeyValueObserverRegistration', - 'NSKeyValueObserving', - 'NSKeyValueObservingCustomization', - 'NSKeyValueSharedObserverRegistration', - 'NSKeyValueSorting', - 'NSKeyedArchiverObjectSubstitution', - 'NSKeyedUnarchiverObjectSubstitution', - 'NSLinguisticAnalysis', - 'NSLocaleCreation', - 'NSLocaleGeneralInfo', - 'NSMorphology', - 'NSMutableArrayCreation', - 'NSMutableArrayDiffing', - 'NSMutableDataCompression', - 'NSMutableDataCreation', - 'NSMutableDictionaryCreation', - 'NSMutableOrderedSetCreation', - 'NSMutableOrderedSetDiffing', - 'NSMutableSetCreation', - 'NSMutableStringExtensionMethods', - 'NSNotificationCreation', 'NSNumberCreation', 'NSNumberIsBool', 'NSNumberIsFloat', - 'NSOrderedPerform', - 'NSOrderedSetCreation', - 'NSOrderedSetDiffing', - 'NSOutputStreamExtensions', - 'NSPredicateSupport', - 'NSPromisedItems', - 'NSRunLoopConveniences', - 'NSScriptClassDescription', - 'NSScriptKeyValueCoding', - 'NSScriptObjectSpecifiers', - 'NSScripting', - 'NSScriptingComparisonMethods', - 'NSSetCreation', - 'NSSharedKeySetDictionary', - 'NSSocketStreamCreationExtensions', - 'NSSortDescriptorSorting', - 'NSStreamBoundPairCreationExtensions', - 'NSStringDeprecated', - 'NSStringEncodingDetection', 'NSStringExtensionMethods', - 'NSStringPathExtensions', - 'NSThreadPerformAdditions', - 'NSTypedstreamCompatibility', - 'NSURLClient', - 'NSURLLoading', - 'NSURLPathUtilities', - 'NSURLUtilities', - 'NSValueCreation', - 'NSValueExtensionMethods', - 'NSValueGeometryExtensions', - 'NSValueRangeExtensions', }; diff --git a/pkgs/ffigen/test/native_objc_test/category_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/category_test_bindings.dart index 45dcb81ca2..8e38ffdef2 100644 --- a/pkgs/ffigen/test/native_objc_test/category_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/category_test_bindings.dart @@ -258,6 +258,88 @@ extension Mul on Thing { } } +/// NSItemProvider +extension NSItemProvider on objc.NSURL {} + +/// NSPromisedItems +extension NSPromisedItems on objc.NSURL { + /// checkPromisedItemIsReachableAndReturnError: + bool checkPromisedItemIsReachableAndReturnError() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.checkPromisedItemIsReachableAndReturnError:', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1dom33q( + _$$ref.pointer, + _sel_checkPromisedItemIsReachableAndReturnError_, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret; + } finally { + pkg_ffi.calloc.free($err); + } + } + + /// getPromisedItemResourceValue:forKey:error: + bool getPromisedItemResourceValue( + ffi.Pointer> value, { + required objc.NSString forKey, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = forKey.ref; + objc.checkOsVersionInternal( + 'NSURL.getPromisedItemResourceValue:forKey:error:', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1j9bhml( + _$$ref.pointer, + _sel_getPromisedItemResourceValue_forKey_error_, + value, + _$$ref$1.pointer, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret; + } finally { + pkg_ffi.calloc.free($err); + } + } + + /// promisedItemResourceValuesForKeys:error: + objc.NSDictionary? promisedItemResourceValuesForKeys(objc.NSArray keys) { + final _$$ref = object$.ref; + final _$$ref$1 = keys.ref; + objc.checkOsVersionInternal( + 'NSURL.promisedItemResourceValuesForKeys:error:', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1lhpu4m( + _$$ref.pointer, + _sel_promisedItemResourceValuesForKeys_error_, + _$$ref$1.pointer, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } finally { + pkg_ffi.calloc.free($err); + } + } +} + /// NSString extension NSString on Thing { /// nsStringExtension @@ -276,6 +358,338 @@ extension NSURLCategory on objc.NSURL { } } +/// NSURLLoading +extension NSURLLoading on objc.NSURL { + /// URLHandleUsingCache: + @Deprecated('Use NSURLConnection instead') + objc.NSURLHandle? URLHandleUsingCache(bool shouldUseCache) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.URLHandleUsingCache:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1t6aok9( + _$$ref.pointer, + _sel_URLHandleUsingCache_, + shouldUseCache, + ); + return $ret.address == 0 + ? null + : objc.NSURLHandle.fromPointer($ret, retain: true, release: true); + } + + /// loadResourceDataNotifyingClient:usingCache: + @Deprecated('Use NSURLConnection instead') + void loadResourceDataNotifyingClient( + objc.ObjCObject client, { + required bool usingCache, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = client.ref; + objc.checkOsVersionInternal( + 'NSURL.loadResourceDataNotifyingClient:usingCache:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_6p7ndb( + _$$ref.pointer, + _sel_loadResourceDataNotifyingClient_usingCache_, + _$$ref$1.pointer, + usingCache, + ); + } + + /// propertyForKey: + @Deprecated('Use NSURLConnection instead') + objc.ObjCObject? propertyForKey(objc.NSString propertyKey) { + final _$$ref = object$.ref; + final _$$ref$1 = propertyKey.ref; + objc.checkOsVersionInternal( + 'NSURL.propertyForKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_propertyForKey_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } + + /// resourceDataUsingCache: + @Deprecated('Use NSURLConnection instead') + objc.NSData? resourceDataUsingCache(bool shouldUseCache) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.resourceDataUsingCache:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1t6aok9( + _$$ref.pointer, + _sel_resourceDataUsingCache_, + shouldUseCache, + ); + return $ret.address == 0 + ? null + : objc.NSData.fromPointer($ret, retain: true, release: true); + } + + /// setProperty:forKey: + @Deprecated('Use NSURLConnection instead') + bool setProperty(objc.ObjCObject property, {required objc.NSString forKey}) { + final _$$ref = object$.ref; + final _$$ref$1 = property.ref; + final _$$ref$2 = forKey.ref; + objc.checkOsVersionInternal( + 'NSURL.setProperty:forKey:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_1lsax7n( + _$$ref.pointer, + _sel_setProperty_forKey_, + _$$ref$1.pointer, + _$$ref$2.pointer, + ); + } + + /// setResourceData: + @Deprecated('Use NSURLConnection instead') + bool setResourceData(objc.NSData data) { + final _$$ref = object$.ref; + final _$$ref$1 = data.ref; + objc.checkOsVersionInternal( + 'NSURL.setResourceData:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_setResourceData_, + _$$ref$1.pointer, + ); + } +} + +/// NSURLPathUtilities +extension NSURLPathUtilities on objc.NSURL { + /// URLByAppendingPathComponent: + objc.NSURL? URLByAppendingPathComponent(objc.NSString pathComponent) { + final _$$ref = object$.ref; + final _$$ref$1 = pathComponent.ref; + objc.checkOsVersionInternal( + 'NSURL.URLByAppendingPathComponent:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_URLByAppendingPathComponent_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSURL.fromPointer($ret, retain: true, release: true); + } + + /// URLByAppendingPathComponent:isDirectory: + objc.NSURL? URLByAppendingPathComponent$1( + objc.NSString pathComponent, { + required bool isDirectory, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = pathComponent.ref; + objc.checkOsVersionInternal( + 'NSURL.URLByAppendingPathComponent:isDirectory:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + final $ret = _objc_msgSend_17amj0z( + _$$ref.pointer, + _sel_URLByAppendingPathComponent_isDirectory_, + _$$ref$1.pointer, + isDirectory, + ); + return $ret.address == 0 + ? null + : objc.NSURL.fromPointer($ret, retain: true, release: true); + } + + /// URLByAppendingPathExtension: + objc.NSURL? URLByAppendingPathExtension(objc.NSString pathExtension) { + final _$$ref = object$.ref; + final _$$ref$1 = pathExtension.ref; + objc.checkOsVersionInternal( + 'NSURL.URLByAppendingPathExtension:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_URLByAppendingPathExtension_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSURL.fromPointer($ret, retain: true, release: true); + } + + /// URLByDeletingLastPathComponent + objc.NSURL? get URLByDeletingLastPathComponent { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.URLByDeletingLastPathComponent', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_URLByDeletingLastPathComponent, + ); + return $ret.address == 0 + ? null + : objc.NSURL.fromPointer($ret, retain: true, release: true); + } + + /// URLByDeletingPathExtension + objc.NSURL? get URLByDeletingPathExtension { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.URLByDeletingPathExtension', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_URLByDeletingPathExtension, + ); + return $ret.address == 0 + ? null + : objc.NSURL.fromPointer($ret, retain: true, release: true); + } + + /// URLByResolvingSymlinksInPath + objc.NSURL? get URLByResolvingSymlinksInPath { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.URLByResolvingSymlinksInPath', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_URLByResolvingSymlinksInPath, + ); + return $ret.address == 0 + ? null + : objc.NSURL.fromPointer($ret, retain: true, release: true); + } + + /// URLByStandardizingPath + objc.NSURL? get URLByStandardizingPath { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.URLByStandardizingPath', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_URLByStandardizingPath, + ); + return $ret.address == 0 + ? null + : objc.NSURL.fromPointer($ret, retain: true, release: true); + } + + /// checkResourceIsReachableAndReturnError: + bool checkResourceIsReachableAndReturnError() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.checkResourceIsReachableAndReturnError:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1dom33q( + _$$ref.pointer, + _sel_checkResourceIsReachableAndReturnError_, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret; + } finally { + pkg_ffi.calloc.free($err); + } + } + + /// lastPathComponent + objc.NSString? get lastPathComponent { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.lastPathComponent', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_lastPathComponent); + return $ret.address == 0 + ? null + : objc.NSString.fromPointer($ret, retain: true, release: true); + } + + /// pathComponents + objc.NSArray? get pathComponents { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.pathComponents', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_pathComponents); + return $ret.address == 0 + ? null + : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// pathExtension + objc.NSString? get pathExtension { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.pathExtension', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_pathExtension); + return $ret.address == 0 + ? null + : objc.NSString.fromPointer($ret, retain: true, release: true); + } + + /// fileURLWithPathComponents: + static objc.NSURL? fileURLWithPathComponents(objc.NSArray components) { + final _$$ref = components.ref; + objc.checkOsVersionInternal( + 'NSURL.fileURLWithPathComponents:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _class_NSURL, + _sel_fileURLWithPathComponents_, + _$$ref.pointer, + ); + return $ret.address == 0 + ? null + : objc.NSURL.fromPointer($ret, retain: true, release: true); + } +} + /// StaticAndInstanceMethodsWithSameNameCategory extension StaticAndInstanceMethodsWithSameNameCategory on Thing { /// sameNameMethod @@ -458,6 +872,25 @@ final _objc_msgSend_151sglz = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_17amj0z = 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, + ) + >(); final _objc_msgSend_19nvye5 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -492,6 +925,23 @@ final _objc_msgSend_1cwp428 = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_1dom33q = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ) + > + >() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ) + >(); final _objc_msgSend_1gcq84o = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -507,6 +957,65 @@ final _objc_msgSend_1gcq84o = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_1j9bhml = 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>, + ) + >(); +final _objc_msgSend_1lhpu4m = 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_1lsax7n = 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_1q0lyci = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -543,6 +1052,42 @@ final _objc_msgSend_1sotr3r = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_1t6aok9 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ) + > + >() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + bool, + ) + >(); +final _objc_msgSend_6p7ndb = 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, + ) + >(); final _objc_msgSend_91o635 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -558,6 +1103,30 @@ final _objc_msgSend_91o635 = objc.msgSendPointer ffi.Pointer, ) >(); +late final _sel_URLByAppendingPathComponent_ = objc.registerName( + "URLByAppendingPathComponent:", +); +late final _sel_URLByAppendingPathComponent_isDirectory_ = objc.registerName( + "URLByAppendingPathComponent:isDirectory:", +); +late final _sel_URLByAppendingPathExtension_ = objc.registerName( + "URLByAppendingPathExtension:", +); +late final _sel_URLByDeletingLastPathComponent = objc.registerName( + "URLByDeletingLastPathComponent", +); +late final _sel_URLByDeletingPathExtension = objc.registerName( + "URLByDeletingPathExtension", +); +late final _sel_URLByResolvingSymlinksInPath = objc.registerName( + "URLByResolvingSymlinksInPath", +); +late final _sel_URLByStandardizingPath = objc.registerName( + "URLByStandardizingPath", +); +late final _sel_URLHandleUsingCache_ = objc.registerName( + "URLHandleUsingCache:", +); late final _sel_add_Y_ = objc.registerName("add:Y:"); late final _sel_alloc = objc.registerName("alloc"); late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); @@ -567,17 +1136,44 @@ late final _sel_anonymousCategoryMethod = objc.registerName( late final _sel_anonymousCategoryStaticMethod = objc.registerName( "anonymousCategoryStaticMethod", ); +late final _sel_checkPromisedItemIsReachableAndReturnError_ = objc.registerName( + "checkPromisedItemIsReachableAndReturnError:", +); +late final _sel_checkResourceIsReachableAndReturnError_ = objc.registerName( + "checkResourceIsReachableAndReturnError:", +); late final _sel_extensionMethod = objc.registerName("extensionMethod"); +late final _sel_fileURLWithPathComponents_ = objc.registerName( + "fileURLWithPathComponents:", +); +late final _sel_getPromisedItemResourceValue_forKey_error_ = objc.registerName( + "getPromisedItemResourceValue:forKey:error:", +); late final _sel_init = objc.registerName("init"); late final _sel_initWithCoder_ = objc.registerName("initWithCoder:"); late final _sel_instancetypeMethod = objc.registerName("instancetypeMethod"); late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); +late final _sel_lastPathComponent = objc.registerName("lastPathComponent"); +late final _sel_loadResourceDataNotifyingClient_usingCache_ = objc.registerName( + "loadResourceDataNotifyingClient:usingCache:", +); late final _sel_method = objc.registerName("method"); late final _sel_mul_Y_ = objc.registerName("mul:Y:"); late final _sel_new = objc.registerName("new"); late final _sel_nsStringExtension = objc.registerName("nsStringExtension"); +late final _sel_pathComponents = objc.registerName("pathComponents"); +late final _sel_pathExtension = objc.registerName("pathExtension"); +late final _sel_promisedItemResourceValuesForKeys_error_ = objc.registerName( + "promisedItemResourceValuesForKeys:error:", +); +late final _sel_propertyForKey_ = objc.registerName("propertyForKey:"); late final _sel_protoMethod = objc.registerName("protoMethod"); +late final _sel_resourceDataUsingCache_ = objc.registerName( + "resourceDataUsingCache:", +); late final _sel_sameNameMethod = objc.registerName("sameNameMethod"); +late final _sel_setProperty_forKey_ = objc.registerName("setProperty:forKey:"); +late final _sel_setResourceData_ = objc.registerName("setResourceData:"); late final _sel_someProperty = objc.registerName("someProperty"); late final _sel_staticMethod = objc.registerName("staticMethod"); late final _sel_staticProtoMethod = objc.registerName("staticProtoMethod"); diff --git a/pkgs/ffigen/test/native_objc_test/rename_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/rename_test_bindings.dart index 370dc06274..ea954ae1ef 100644 --- a/pkgs/ffigen/test/native_objc_test/rename_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/rename_test_bindings.dart @@ -36,19 +36,19 @@ extension type Renamed._(objc.ObjCObject object$) : _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, - _class__Renamed, + _class_Renamed, ); /// alloc static Renamed alloc() { - final $ret = _objc_msgSend_151sglz(_class__Renamed, _sel_alloc); + final $ret = _objc_msgSend_151sglz(_class_Renamed, _sel_alloc); return Renamed.fromPointer($ret, retain: false, release: true); } /// allocWithZone: static Renamed allocWithZone(ffi.Pointer zone) { final $ret = _objc_msgSend_1cwp428( - _class__Renamed, + _class_Renamed, _sel_allocWithZone_, zone, ); @@ -57,7 +57,7 @@ extension type Renamed._(objc.ObjCObject object$) /// new static Renamed new$() { - final $ret = _objc_msgSend_151sglz(_class__Renamed, _sel_new); + final $ret = _objc_msgSend_151sglz(_class_Renamed, _sel_new); return Renamed.fromPointer($ret, retain: false, release: true); } @@ -131,11 +131,11 @@ extension Renamed$Methods on Renamed { } @ffi.Native>(symbol: 'OBJC_CLASS_\$__Renamed') -external ffi.Pointer _class__Renamed_raw; -final _class__Renamed = objc.getClass( +external ffi.Pointer _class_Renamed_raw; +final _class_Renamed = objc.getClass( "_Renamed", () => ffi.Native.addressOf>( - _class__Renamed_raw, + _class_Renamed_raw, ).cast(), ); final _objc_msgSend_151sglz = objc.msgSendPointer diff --git a/pkgs/ffigen/tool/diff_bindings_with_main.dart b/pkgs/ffigen/tool/diff_bindings_with_main.dart new file mode 100644 index 0000000000..028601e21f --- /dev/null +++ b/pkgs/ffigen/tool/diff_bindings_with_main.dart @@ -0,0 +1,28 @@ +// 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 'dart:io'; +import 'package:path/path.dart' as path; + +Future main(List args) async { + final scriptDir = path.dirname(Platform.script.toFilePath()); + final shScript = path.join(scriptDir, 'diff_bindings_with_main.sh'); + final targetArgs = args.isEmpty + ? ['../objective_c/lib/src/objective_c_bindings_generated.dart'] + : args; + + final result = await Process.run( + '/bin/bash', + [shScript, ...targetArgs], + workingDirectory: path.dirname(scriptDir), + ); + + if (result.stdout.toString().isNotEmpty) { + stdout.write(result.stdout); + } + if (result.stderr.toString().isNotEmpty) { + stderr.write(result.stderr); + } + exitCode = result.exitCode; +} diff --git a/pkgs/objective_c/lib/src/objective_c_bindings_exported.dart b/pkgs/objective_c/lib/src/objective_c_bindings_exported.dart index 1df932ef7a..a08de457c3 100644 --- a/pkgs/objective_c/lib/src/objective_c_bindings_exported.dart +++ b/pkgs/objective_c/lib/src/objective_c_bindings_exported.dart @@ -23,18 +23,11 @@ export 'objective_c_bindings_generated.dart' DartProtocolBuilder, DartProtocolBuilder$Methods, NSAppleEventSendOptions, - NSArchiver, - NSArchiverCallback, NSArray, NSArray$Methods, - NSArrayCreation, - NSArrayDiffing, - NSArrayPathExtensions, NSAttributedString, NSAttributedString$Methods, - NSAttributedStringCreateFromMarkdown, NSAttributedStringEnumerationOptions, - NSAttributedStringFormatting, NSAttributedStringFormattingOptions, NSAttributedStringMarkdownInterpretedSyntax, NSAttributedStringMarkdownParsingFailurePolicy, @@ -43,34 +36,22 @@ export 'objective_c_bindings_generated.dart' NSBinarySearchingOptions, NSBundle, NSBundle$Methods, - NSBundleExtensionMethods, - NSBundleResourceRequestAdditions, - NSCalendarDate, - NSCalendarDateExtras, NSCharacterSet, NSCharacterSet$Methods, - NSClassDescription, - NSClassDescriptionPrimitives, NSCoder, NSCoder$Methods, - NSCoderMethods, NSCoding, NSCoding$Builder, NSCoding$Methods, NSCollectionChangeType, - NSComparisonMethods, NSComparisonResult, - NSConnection, - NSCopyLinkMoveHandler, NSCopying, NSCopying$Builder, NSCopying$Methods, NSData, NSData$Methods, NSDataBase64DecodingOptions, - NSDataBase64Encoding, NSDataBase64EncodingOptions, - NSDataCompression, NSDataCompressionAlgorithm, NSDataCreation, NSDataReadingOptions, @@ -78,34 +59,20 @@ export 'objective_c_bindings_generated.dart' NSDataWritingOptions, NSDate, NSDate$Methods, - NSDateCreation, - NSDecimalNumberExtensions, NSDecodingFailurePolicy, - NSDelayedPerforming, - NSDeprecated, - NSDeprecatedKeyValueCoding, - NSDeprecatedKeyValueObservingCustomization, - NSDeprecatedMethods, NSDictionary, NSDictionary$Methods, - NSDictionaryCreation, - NSDiscardableContentProxy, - NSDistributedObjects, NSEdgeInsets, NSEnumerationOptions, NSEnumerator, NSEnumerator$Methods, NSError, NSError$Methods, - NSErrorRecoveryAttempting, NSExtendedArray, - NSExtendedAttributedString, - NSExtendedCoder, NSExtendedData, NSExtendedDate, NSExtendedDictionary, NSExtendedEnumerator, - NSExtendedLocale, NSExtendedMutableArray, NSExtendedMutableData, NSExtendedMutableDictionary, @@ -113,25 +80,18 @@ export 'objective_c_bindings_generated.dart' NSExtendedMutableSet, NSExtendedOrderedSet, NSExtendedSet, - NSExtendedStringPropertyListParsing, NSFastEnumeration, NSFastEnumeration$Builder, NSFastEnumeration$Methods, NSFastEnumerationState, - NSFileAttributes, - NSFileManager, - NSGenericFastEnumeration, - NSGeometryCoding, - NSGeometryKeyedCoding, - NSHost, NSIndexSet, NSIndexSet$Methods, NSInputStream, NSInputStream$Methods, - NSInputStreamExtensions, NSInvocation, NSInvocation$Methods, NSItemProvider, + NSItemProvider$Methods, NSItemProviderFileOptions, NSItemProviderReading, NSItemProviderReading$Builder, @@ -141,58 +101,33 @@ export 'objective_c_bindings_generated.dart' NSItemProviderWriting$Builder, NSItemProviderWriting$Methods, NSKeyValueChange, - NSKeyValueCoding, - NSKeyValueObserverNotification, - NSKeyValueObserverRegistration, - NSKeyValueObserving, - NSKeyValueObservingCustomization, NSKeyValueObservingOptions, NSKeyValueSetMutationKind, - NSKeyValueSharedObserverRegistration, - NSKeyValueSharedObserversSnapshot, - NSKeyValueSorting, - NSKeyedArchiver, - NSKeyedArchiverObjectSubstitution, - NSKeyedUnarchiverObjectSubstitution, - NSLinguisticAnalysis, NSLinguisticTaggerOptions, NSLocale, NSLocale$Methods, - NSLocaleCreation, - NSLocaleGeneralInfo, NSLocaleLanguageDirection, NSMethodSignature, NSMethodSignature$Methods, - NSMorphology, NSMutableArray, NSMutableArray$Methods, - NSMutableArrayCreation, - NSMutableArrayDiffing, NSMutableCopying, NSMutableCopying$Builder, NSMutableCopying$Methods, NSMutableData, NSMutableData$Methods, - NSMutableDataCompression, - NSMutableDataCreation, NSMutableDictionary, NSMutableDictionary$Methods, - NSMutableDictionaryCreation, NSMutableIndexSet, NSMutableIndexSet$Methods, NSMutableOrderedSet, NSMutableOrderedSet$Methods, - NSMutableOrderedSetCreation, - NSMutableOrderedSetDiffing, NSMutableSet, NSMutableSet$Methods, - NSMutableSetCreation, NSMutableString, NSMutableString$Methods, - NSMutableStringExtensionMethods, NSNotification, NSNotification$Methods, - NSNotificationCreation, NSNull, NSNull$Methods, NSNumber, @@ -210,53 +145,32 @@ export 'objective_c_bindings_generated.dart' NSOrderedCollectionDifference, NSOrderedCollectionDifference$Methods, NSOrderedCollectionDifferenceCalculationOptions, - NSOrderedPerform, NSOrderedSet, NSOrderedSet$Methods, - NSOrderedSetCreation, - NSOrderedSetDiffing, - NSOrthography, NSOutputStream, NSOutputStream$Methods, - NSOutputStreamExtensions, NSPort, NSPort$Methods, - NSPortCoder, NSPortDelegate, NSPortDelegate$Builder, NSPortDelegate$Methods, NSPortMessage, NSPortMessage$Methods, - NSPredicate, - NSPredicateSupport, NSProgress, NSProgress$Methods, - NSPromisedItems, NSPropertyListFormat, NSQualityOfService, NSRange, NSRunLoop, NSRunLoop$Methods, - NSRunLoopConveniences, - NSScriptClassDescription, - NSScriptKeyValueCoding, - NSScriptObjectSpecifier, - NSScriptObjectSpecifiers, - NSScripting, - NSScriptingComparisonMethods, NSSecureCoding, NSSecureCoding$Builder, NSSecureCoding$Methods, NSSet, NSSet$Methods, - NSSetCreation, - NSSharedKeySetDictionary, - NSSocketStreamCreationExtensions, - NSSortDescriptorSorting, NSSortOptions, NSStream, NSStream$Methods, - NSStreamBoundPairCreationExtensions, NSStreamDelegate, NSStreamDelegate$Builder, NSStreamDelegate$Methods, @@ -265,39 +179,22 @@ export 'objective_c_bindings_generated.dart' NSString, NSString$Methods, NSStringCompareOptions, - NSStringDeprecated, NSStringEncodingConversionOptions, - NSStringEncodingDetection, NSStringEnumerationOptions, NSStringExtensionMethods, - NSStringPathExtensions, NSThread, NSThread$Methods, - NSThreadPerformAdditions, - NSTimeZone, NSTimer, NSTimer$Methods, - NSTypedstreamCompatibility, NSURL, NSURL$Methods, NSURLBookmarkCreationOptions, NSURLBookmarkResolutionOptions, - NSURLClient, NSURLHandle, NSURLHandle$Methods, - NSURLHandleClient, - NSURLHandleClient$Builder, - NSURLHandleClient$Methods, NSURLHandleStatus, - NSURLLoading, - NSURLPathUtilities, - NSURLUtilities, NSValue, NSValue$Methods, - NSValueCreation, - NSValueExtensionMethods, - NSValueGeometryExtensions, - NSValueRangeExtensions, NSZone, Observer, Observer$Builder, 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 652cce182b..c4902c8b6b 100644 --- a/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart +++ b/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart @@ -205,21 +205,6 @@ external bool _1wx624s_protocolTrampoline_e3qsqz( ffi.Pointer arg0, ); -@ffi.Native< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) ->() -external void _1wx624s_protocolTrampoline_fjrv01( - ffi.Pointer target, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, -); - @ffi.Native< ffi.Void Function( ffi.Pointer, @@ -289,26 +274,6 @@ external ffi.Pointer _1wx624s_wrapBlockingBlock_18v1jvf( directInvoke, ); -@ffi.Native< - ffi.Pointer Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer args) - > - >, - ) ->(isLeaf: true) -external ffi.Pointer _1wx624s_wrapBlockingBlock_1a22wz( - int port, - ffi.Pointer context, - ffi.Pointer< - ffi.NativeFunction args)> - > - directInvoke, -); - @ffi.Native< ffi.Pointer Function( ffi.Int64, @@ -429,26 +394,6 @@ external ffi.Pointer _1wx624s_wrapBlockingBlock_1sr3ozv( directInvoke, ); -@ffi.Native< - ffi.Pointer Function( - ffi.Int64, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer args) - > - >, - ) ->(isLeaf: true) -external ffi.Pointer _1wx624s_wrapBlockingBlock_fjrv01( - int port, - ffi.Pointer context, - ffi.Pointer< - ffi.NativeFunction args)> - > - directInvoke, -); - @ffi.Native< ffi.Pointer Function( ffi.Int64, @@ -680,17 +625,6 @@ external ffi.Pointer _1wx624s_wrapListenerBlock_18v1jvf( ffi.Pointer context, ); -@ffi.Native< - ffi.Pointer Function( - ffi.Int64, - ffi.Pointer, - ) ->(isLeaf: true) -external ffi.Pointer _1wx624s_wrapListenerBlock_1a22wz( - int port, - ffi.Pointer context, -); - @ffi.Native< ffi.Pointer Function( ffi.Int64, @@ -757,17 +691,6 @@ external ffi.Pointer _1wx624s_wrapListenerBlock_1sr3ozv( ffi.Pointer context, ); -@ffi.Native< - ffi.Pointer Function( - ffi.Int64, - ffi.Pointer, - ) ->(isLeaf: true) -external ffi.Pointer _1wx624s_wrapListenerBlock_fjrv01( - int port, - ffi.Pointer context, -); - @ffi.Native< ffi.Pointer Function( ffi.Int64, @@ -1667,6 +1590,8 @@ extension DartProtocolBuilder$Methods on DartProtocolBuilder { } } +/// iOS: unavailable +/// macOS: introduced 10.11.0 sealed class NSAppleEventSendOptions { static const NSAppleEventSendNoReply = 1; static const NSAppleEventSendQueueReply = 2; @@ -1681,72 +1606,6 @@ sealed class NSAppleEventSendOptions { static const NSAppleEventSendDefaultOptions = 35; } -/// NSArchiver -/// -/// NSArchiver -@Deprecated('Use NSKeyedArchiver instead') -extension type NSArchiver._(objc.ObjCObject object$) - implements objc.ObjCObject, NSCoder { - /// Constructs a [NSArchiver] that points to the same underlying object as [other]. - NSArchiver.as(objc.ObjCObject other) : object$ = other { - objc.checkOsVersionInternal( - 'NSArchiver', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - } - - /// Constructs a [NSArchiver] that wraps the given raw object pointer. - NSArchiver.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - objc.checkOsVersionInternal( - 'NSArchiver', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - } -} - -/// NSArchiverCallback -extension NSArchiverCallback on NSObject { - /// classForArchiver - objc.ObjCObject? get classForArchiver { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSObject.classForArchiver', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_classForArchiver); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); - } - - /// replacementObjectForArchiver: - @Deprecated('Deprecated') - objc.ObjCObject? replacementObjectForArchiver(NSArchiver archiver) { - final _$$ref = object$.ref; - final _$$ref$1 = archiver.ref; - objc.checkOsVersionInternal( - 'NSObject.replacementObjectForArchiver:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_replacementObjectForArchiver_, - _$$ref$1.pointer, - ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); - } -} - /// NSArray extension type NSArray._(objc.ObjCObject object$) implements @@ -2000,177 +1859,6 @@ extension NSArray$Methods on NSArray { } } -/// NSArrayCreation -extension NSArrayCreation on NSArray { - /// initWithContentsOfURL:error: - NSArray? initWithContentsOfURL(NSURL url) { - final _$$ref = object$.ref; - final _$$ref$1 = url.ref; - objc.checkOsVersionInternal( - 'NSArray.initWithContentsOfURL:error:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1lhpu4m( - _$$ref.retainAndReturnPointer(), - _sel_initWithContentsOfURL_error_, - _$$ref$1.pointer, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSArray.fromPointer($ret, retain: false, release: true); - } finally { - pkg_ffi.calloc.free($err); - } - } - - /// arrayWithContentsOfURL:error: - static NSArray? arrayWithContentsOfURL(NSURL url) { - final _$$ref = url.ref; - objc.checkOsVersionInternal( - 'NSArray.arrayWithContentsOfURL:error:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1lhpu4m( - _class_NSArray, - _sel_arrayWithContentsOfURL_error_, - _$$ref.pointer, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSArray.fromPointer($ret, retain: true, release: true); - } finally { - pkg_ffi.calloc.free($err); - } - } -} - -/// NSArrayDiffing -extension NSArrayDiffing on NSArray { - /// arrayByApplyingDifference: - NSArray? arrayByApplyingDifference(NSOrderedCollectionDifference difference) { - final _$$ref = object$.ref; - final _$$ref$1 = difference.ref; - objc.checkOsVersionInternal( - 'NSArray.arrayByApplyingDifference:', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_arrayByApplyingDifference_, - _$$ref$1.pointer, - ); - return $ret.address == 0 - ? null - : NSArray.fromPointer($ret, retain: true, release: true); - } - - /// differenceFromArray: - NSOrderedCollectionDifference differenceFromArray(NSArray other) { - final _$$ref = object$.ref; - final _$$ref$1 = other.ref; - objc.checkOsVersionInternal( - 'NSArray.differenceFromArray:', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_differenceFromArray_, - _$$ref$1.pointer, - ); - return NSOrderedCollectionDifference.fromPointer( - $ret, - retain: true, - release: true, - ); - } - - /// differenceFromArray:withOptions: - NSOrderedCollectionDifference differenceFromArray$1( - NSArray other, { - required DartNSUInteger withOptions, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = other.ref; - objc.checkOsVersionInternal( - 'NSArray.differenceFromArray:withOptions:', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), - ); - final $ret = _objc_msgSend_1wtpmu7( - _$$ref.pointer, - _sel_differenceFromArray_withOptions_, - _$$ref$1.pointer, - withOptions, - ); - return NSOrderedCollectionDifference.fromPointer( - $ret, - retain: true, - release: true, - ); - } - - /// differenceFromArray:withOptions:usingEquivalenceTest: - NSOrderedCollectionDifference differenceFromArray$2( - NSArray other, { - required DartNSUInteger withOptions, - required objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ) - > - usingEquivalenceTest, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = other.ref; - final _$$ref$2 = usingEquivalenceTest.ref; - objc.checkOsVersionInternal( - 'NSArray.differenceFromArray:withOptions:usingEquivalenceTest:', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), - ); - final $ret = _objc_msgSend_1415lvo( - _$$ref.pointer, - _sel_differenceFromArray_withOptions_usingEquivalenceTest_, - _$$ref$1.pointer, - withOptions, - _$$ref$2.pointer, - ); - return NSOrderedCollectionDifference.fromPointer( - $ret, - retain: true, - release: true, - ); - } -} - -/// NSArrayPathExtensions -extension NSArrayPathExtensions on NSArray { - /// pathsMatchingExtensions: - NSArray pathsMatchingExtensions(NSArray filterTypes) { - final _$$ref = object$.ref; - final _$$ref$1 = filterTypes.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_pathsMatchingExtensions_, - _$$ref$1.pointer, - ); - return NSArray.fromPointer($ret, retain: true, release: true); - } -} - /// NSAttributedString extension type NSAttributedString._(objc.ObjCObject object$) implements @@ -2229,6 +1917,9 @@ extension type NSAttributedString._(objc.ObjCObject object$) } /// localizedAttributedStringWithFormat: + /// + /// iOS: introduced 15.0.0 + /// macOS: introduced 12.0.0 static NSAttributedString localizedAttributedStringWithFormat( NSAttributedString format, ) { @@ -2247,6 +1938,9 @@ extension type NSAttributedString._(objc.ObjCObject object$) } /// localizedAttributedStringWithFormat:context: + /// + /// iOS: introduced 17.0.0 + /// macOS: introduced 14.0.0 static NSAttributedString localizedAttributedStringWithFormat$1( NSAttributedString format, { required NSDictionary context, @@ -2268,6 +1962,9 @@ extension type NSAttributedString._(objc.ObjCObject object$) } /// localizedAttributedStringWithFormat:options: + /// + /// iOS: introduced 15.0.0 + /// macOS: introduced 12.0.0 static NSAttributedString localizedAttributedStringWithFormat$2( NSAttributedString format, { required DartNSUInteger options, @@ -2288,6 +1985,9 @@ extension type NSAttributedString._(objc.ObjCObject object$) } /// localizedAttributedStringWithFormat:options:context: + /// + /// iOS: introduced 17.0.0 + /// macOS: introduced 14.0.0 static NSAttributedString localizedAttributedStringWithFormat$3( NSAttributedString format, { required DartNSUInteger options, @@ -2407,6 +2107,9 @@ extension NSAttributedString$Methods on NSAttributedString { } /// initWithContentsOfMarkdownFileAtURL:options:baseURL:error: + /// + /// iOS: introduced 15.0.0 + /// macOS: introduced 12.0.0 NSAttributedString? initWithContentsOfMarkdownFileAtURL( NSURL markdownFile, { NSAttributedStringMarkdownParsingOptions? options, @@ -2441,6 +2144,9 @@ extension NSAttributedString$Methods on NSAttributedString { } /// initWithFormat:options:locale: + /// + /// iOS: introduced 15.0.0 + /// macOS: introduced 12.0.0 NSAttributedString initWithFormat( NSAttributedString format, { required DartNSUInteger options, @@ -2465,6 +2171,9 @@ extension NSAttributedString$Methods on NSAttributedString { } /// initWithFormat:options:locale:context: + /// + /// iOS: introduced 17.0.0 + /// macOS: introduced 14.0.0 NSAttributedString initWithFormat$1( NSAttributedString format, { required DartNSUInteger options, @@ -2492,6 +2201,9 @@ extension NSAttributedString$Methods on NSAttributedString { } /// initWithMarkdown:options:baseURL:error: + /// + /// iOS: introduced 15.0.0 + /// macOS: introduced 12.0.0 NSAttributedString? initWithMarkdown( NSData markdown, { NSAttributedStringMarkdownParsingOptions? options, @@ -2526,6 +2238,9 @@ extension NSAttributedString$Methods on NSAttributedString { } /// initWithMarkdownString:options:baseURL:error: + /// + /// iOS: introduced 15.0.0 + /// macOS: introduced 12.0.0 NSAttributedString? initWithMarkdownString( NSString markdownString, { NSAttributedStringMarkdownParsingOptions? options, @@ -2611,24 +2326,20 @@ extension NSAttributedString$Methods on NSAttributedString { } } -/// NSAttributedStringCreateFromMarkdown -extension NSAttributedStringCreateFromMarkdown on NSAttributedString {} - sealed class NSAttributedStringEnumerationOptions { static const NSAttributedStringEnumerationReverse = 2; static const NSAttributedStringEnumerationLongestEffectiveRangeNotRequired = 1048576; } -/// NSAttributedStringFormatting -extension NSAttributedStringFormatting on NSAttributedString {} - sealed class NSAttributedStringFormattingOptions { static const NSAttributedStringFormattingInsertArgumentAttributesWithoutMerging = 1; static const NSAttributedStringFormattingApplyReplacementIndexAttribute = 2; } +/// iOS: introduced 15.0.0 +/// macOS: introduced 12.0.0 enum NSAttributedStringMarkdownInterpretedSyntax { NSAttributedStringMarkdownInterpretedSyntaxFull(0), NSAttributedStringMarkdownInterpretedSyntaxInlineOnly(1), @@ -2650,6 +2361,8 @@ enum NSAttributedStringMarkdownInterpretedSyntax { }; } +/// iOS: introduced 15.0.0 +/// macOS: introduced 12.0.0 enum NSAttributedStringMarkdownParsingFailurePolicy { NSAttributedStringMarkdownParsingFailureReturnError(0), NSAttributedStringMarkdownParsingFailureReturnPartiallyParsedIfPossible(1); @@ -2670,6 +2383,9 @@ enum NSAttributedStringMarkdownParsingFailurePolicy { } /// NSAttributedStringMarkdownParsingOptions +/// +/// iOS: introduced 15.0.0 +/// macOS: introduced 12.0.0 extension type NSAttributedStringMarkdownParsingOptions._( objc.ObjCObject object$ ) implements objc.ObjCObject, NSObject, NSCopying { @@ -2755,7 +2471,8 @@ extension type NSAttributedStringMarkdownParsingOptions._( extension NSAttributedStringMarkdownParsingOptions$Methods on NSAttributedStringMarkdownParsingOptions { - /// allowsExtendedAttributes + /// iOS: introduced 15.0.0 + /// macOS: introduced 12.0.0 bool get allowsExtendedAttributes { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -2766,7 +2483,8 @@ extension NSAttributedStringMarkdownParsingOptions$Methods return _objc_msgSend_91o635(_$$ref.pointer, _sel_allowsExtendedAttributes); } - /// appliesSourcePositionAttributes + /// iOS: introduced 16.0.0 + /// macOS: introduced 13.0.0 bool get appliesSourcePositionAttributes { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -2780,7 +2498,8 @@ extension NSAttributedStringMarkdownParsingOptions$Methods ); } - /// failurePolicy + /// iOS: introduced 15.0.0 + /// macOS: introduced 12.0.0 NSAttributedStringMarkdownParsingFailurePolicy get failurePolicy { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -2811,7 +2530,8 @@ extension NSAttributedStringMarkdownParsingOptions$Methods ); } - /// interpretedSyntax + /// iOS: introduced 15.0.0 + /// macOS: introduced 12.0.0 NSAttributedStringMarkdownInterpretedSyntax get interpretedSyntax { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -2823,7 +2543,8 @@ extension NSAttributedStringMarkdownParsingOptions$Methods return NSAttributedStringMarkdownInterpretedSyntax.fromValue($ret); } - /// languageCode + /// iOS: introduced 15.0.0 + /// macOS: introduced 12.0.0 NSString? get languageCode { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -2837,7 +2558,8 @@ extension NSAttributedStringMarkdownParsingOptions$Methods : NSString.fromPointer($ret, retain: true, release: true); } - /// setAllowsExtendedAttributes: + /// iOS: introduced 15.0.0 + /// macOS: introduced 12.0.0 set allowsExtendedAttributes(bool value) { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -2852,7 +2574,8 @@ extension NSAttributedStringMarkdownParsingOptions$Methods ); } - /// setAppliesSourcePositionAttributes: + /// iOS: introduced 16.0.0 + /// macOS: introduced 13.0.0 set appliesSourcePositionAttributes(bool value) { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -2867,7 +2590,8 @@ extension NSAttributedStringMarkdownParsingOptions$Methods ); } - /// setFailurePolicy: + /// iOS: introduced 15.0.0 + /// macOS: introduced 12.0.0 set failurePolicy(NSAttributedStringMarkdownParsingFailurePolicy value) { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -2878,7 +2602,8 @@ extension NSAttributedStringMarkdownParsingOptions$Methods _objc_msgSend_mt0t38(_$$ref.pointer, _sel_setFailurePolicy_, value.value); } - /// setInterpretedSyntax: + /// iOS: introduced 15.0.0 + /// macOS: introduced 12.0.0 set interpretedSyntax(NSAttributedStringMarkdownInterpretedSyntax value) { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -2893,7 +2618,8 @@ extension NSAttributedStringMarkdownParsingOptions$Methods ); } - /// setLanguageCode: + /// iOS: introduced 15.0.0 + /// macOS: introduced 12.0.0 set languageCode(NSString? value) { final _$$ref = object$.ref; final _$$ref$1 = value?.ref; @@ -3539,6 +3265,9 @@ extension NSBundle$Methods on NSBundle { } /// localizedAttributedStringForKey:value:table: + /// + /// iOS: introduced 15.0.0 + /// macOS: introduced 12.0.0 NSAttributedString localizedAttributedStringForKey( NSString key, { NSString? value, @@ -3872,234 +3601,6 @@ extension NSBundle$Methods on NSBundle { } } -/// NSBundleExtensionMethods -extension NSBundleExtensionMethods on NSString { - /// variantFittingPresentationWidth: - NSString variantFittingPresentationWidth(int width) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSString.variantFittingPresentationWidth:', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), - ); - final $ret = _objc_msgSend_qugqlf( - _$$ref.pointer, - _sel_variantFittingPresentationWidth_, - width, - ); - return NSString.fromPointer($ret, retain: true, release: true); - } -} - -/// NSBundleResourceRequestAdditions -extension NSBundleResourceRequestAdditions on NSBundle { - /// preservationPriorityForTag: - double preservationPriorityForTag(NSString tag) { - final _$$ref = object$.ref; - final _$$ref$1 = tag.ref; - objc.checkOsVersionInternal( - 'NSBundle.preservationPriorityForTag:', - iOS: (false, (9, 0, 0)), - macOS: (true, null), - ); - return objc.useMsgSendVariants - ? _objc_msgSend_mabicuFpret( - _$$ref.pointer, - _sel_preservationPriorityForTag_, - _$$ref$1.pointer, - ) - : _objc_msgSend_mabicu( - _$$ref.pointer, - _sel_preservationPriorityForTag_, - _$$ref$1.pointer, - ); - } - - /// setPreservationPriority:forTags: - void setPreservationPriority(double priority, {required NSSet forTags}) { - final _$$ref = object$.ref; - final _$$ref$1 = forTags.ref; - objc.checkOsVersionInternal( - 'NSBundle.setPreservationPriority:forTags:', - iOS: (false, (9, 0, 0)), - macOS: (true, null), - ); - _objc_msgSend_130mcug( - _$$ref.pointer, - _sel_setPreservationPriority_forTags_, - priority, - _$$ref$1.pointer, - ); - } -} - -/// NSCalendarDate -/// -/// NSCalendarDate -@Deprecated('Use NSCalendar and NSDateComponents and NSDateFormatter instead') -extension type NSCalendarDate._(objc.ObjCObject object$) - implements objc.ObjCObject, NSDate { - /// Constructs a [NSCalendarDate] that points to the same underlying object as [other]. - NSCalendarDate.as(objc.ObjCObject other) : object$ = other { - objc.checkOsVersionInternal( - 'NSCalendarDate', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 4, 0)), - ); - } - - /// Constructs a [NSCalendarDate] that wraps the given raw object pointer. - NSCalendarDate.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - objc.checkOsVersionInternal( - 'NSCalendarDate', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 4, 0)), - ); - } -} - -/// NSCalendarDateExtras -extension NSCalendarDateExtras on NSDate { - /// dateWithCalendarFormat:timeZone: - @Deprecated('Deprecated') - NSCalendarDate dateWithCalendarFormat( - NSString? format, { - NSTimeZone? timeZone, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = format?.ref; - final _$$ref$2 = timeZone?.ref; - objc.checkOsVersionInternal( - 'NSDate.dateWithCalendarFormat:timeZone:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 4, 0)), - ); - final $ret = _objc_msgSend_15qeuct( - _$$ref.pointer, - _sel_dateWithCalendarFormat_timeZone_, - _$$ref$1?.pointer ?? ffi.nullptr, - _$$ref$2?.pointer ?? ffi.nullptr, - ); - return NSCalendarDate.fromPointer($ret, retain: true, release: true); - } - - /// descriptionWithCalendarFormat:timeZone:locale: - @Deprecated('Deprecated') - NSString? descriptionWithCalendarFormat( - NSString? format, { - NSTimeZone? timeZone, - objc.ObjCObject? locale, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = format?.ref; - final _$$ref$2 = timeZone?.ref; - final _$$ref$3 = locale?.ref; - objc.checkOsVersionInternal( - 'NSDate.descriptionWithCalendarFormat:timeZone:locale:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 4, 0)), - ); - final $ret = _objc_msgSend_11spmsz( - _$$ref.pointer, - _sel_descriptionWithCalendarFormat_timeZone_locale_, - _$$ref$1?.pointer ?? ffi.nullptr, - _$$ref$2?.pointer ?? ffi.nullptr, - _$$ref$3?.pointer ?? ffi.nullptr, - ); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); - } - - /// initWithString: - @Deprecated('Use NSDateFormatter instead') - objc.ObjCObject? initWithString(NSString description) { - final _$$ref = object$.ref; - final _$$ref$1 = description.ref; - objc.checkOsVersionInternal( - 'NSDate.initWithString:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 4, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.retainAndReturnPointer(), - _sel_initWithString_, - _$$ref$1.pointer, - ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: false, release: true); - } - - /// dateWithNaturalLanguageString: - @Deprecated( - 'Create an NSDateFormatter with `init` and set the dateFormat property instead.', - ) - static objc.ObjCObject? dateWithNaturalLanguageString(NSString string) { - final _$$ref = string.ref; - objc.checkOsVersionInternal( - 'NSDate.dateWithNaturalLanguageString:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 4, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _class_NSDate, - _sel_dateWithNaturalLanguageString_, - _$$ref.pointer, - ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); - } - - /// dateWithNaturalLanguageString:locale: - @Deprecated( - 'Create an NSDateFormatter with `init` and set the dateFormat property instead.', - ) - static objc.ObjCObject? dateWithNaturalLanguageString$1( - NSString string, { - objc.ObjCObject? locale, - }) { - final _$$ref = string.ref; - final _$$ref$1 = locale?.ref; - objc.checkOsVersionInternal( - 'NSDate.dateWithNaturalLanguageString:locale:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 4, 0)), - ); - final $ret = _objc_msgSend_15qeuct( - _class_NSDate, - _sel_dateWithNaturalLanguageString_locale_, - _$$ref.pointer, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); - } - - /// dateWithString: - @Deprecated('Use NSDateFormatter instead') - static objc.ObjCObject dateWithString(NSString aString) { - final _$$ref = aString.ref; - objc.checkOsVersionInternal( - 'NSDate.dateWithString:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 4, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _class_NSDate, - _sel_dateWithString_, - _$$ref.pointer, - ); - return objc.ObjCObject($ret, retain: true, release: true); - } -} - /// NSCharacterSet extension type NSCharacterSet._(objc.ObjCObject object$) implements @@ -4450,98 +3951,6 @@ extension NSCharacterSet$Methods on NSCharacterSet { } } -/// NSClassDescription -/// -/// NSClassDescription -extension type NSClassDescription._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject { - /// Constructs a [NSClassDescription] that points to the same underlying object as [other]. - NSClassDescription.as(objc.ObjCObject other) : object$ = other {} - - /// Constructs a [NSClassDescription] that wraps the given raw object pointer. - NSClassDescription.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) {} -} - -/// NSClassDescriptionPrimitives -extension NSClassDescriptionPrimitives on NSObject { - /// attributeKeys - NSArray get attributeKeys { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSObject.attributeKeys', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_attributeKeys); - return NSArray.fromPointer($ret, retain: true, release: true); - } - - /// classDescription - NSClassDescription get classDescription { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSObject.classDescription', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_classDescription); - return NSClassDescription.fromPointer($ret, retain: true, release: true); - } - - /// inverseForRelationshipKey: - NSString? inverseForRelationshipKey(NSString relationshipKey) { - final _$$ref = object$.ref; - final _$$ref$1 = relationshipKey.ref; - objc.checkOsVersionInternal( - 'NSObject.inverseForRelationshipKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_inverseForRelationshipKey_, - _$$ref$1.pointer, - ); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); - } - - /// toManyRelationshipKeys - NSArray get toManyRelationshipKeys { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSObject.toManyRelationshipKeys', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_toManyRelationshipKeys, - ); - return NSArray.fromPointer($ret, retain: true, release: true); - } - - /// toOneRelationshipKeys - NSArray get toOneRelationshipKeys { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSObject.toOneRelationshipKeys', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_toOneRelationshipKeys, - ); - return NSArray.fromPointer($ret, retain: true, release: true); - } -} - /// NSCoder extension type NSCoder._(objc.ObjCObject object$) implements objc.ObjCObject, NSObject { @@ -4677,79 +4086,6 @@ extension NSCoder$Methods on NSCoder { } } -/// NSCoderMethods -extension NSCoderMethods on NSObject { - /// awakeAfterUsingCoder: - objc.ObjCObject? awakeAfterUsingCoder(NSCoder coder) { - final _$$ref = object$.ref; - final _$$ref$1 = coder.ref; - objc.checkOsVersionInternal( - 'NSObject.awakeAfterUsingCoder:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.retainAndReturnPointer(), - _sel_awakeAfterUsingCoder_, - _$$ref$1.pointer, - ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: false, release: true); - } - - /// classForCoder - objc.ObjCObject get classForCoder { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSObject.classForCoder', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_classForCoder); - return objc.ObjCObject($ret, retain: true, release: true); - } - - /// replacementObjectForCoder: - objc.ObjCObject? replacementObjectForCoder(NSCoder coder) { - final _$$ref = object$.ref; - final _$$ref$1 = coder.ref; - objc.checkOsVersionInternal( - 'NSObject.replacementObjectForCoder:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_replacementObjectForCoder_, - _$$ref$1.pointer, - ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); - } - - /// setVersion: - static void setVersion(int aVersion) { - objc.checkOsVersionInternal( - 'NSObject.setVersion:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_4sp4xj(_class_NSObject, _sel_setVersion_, aVersion); - } - - /// version - static int version() { - objc.checkOsVersionInternal( - 'NSObject.version', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_1hz7y9r(_class_NSObject, _sel_version); - } -} - /// NSCoding extension type NSCoding._(objc.ObjCProtocol object$) implements objc.ObjCProtocol { @@ -4980,6 +4316,8 @@ interface class NSCoding$Builder { ); } +/// iOS: introduced 13.0.0 +/// macOS: introduced 10.15.0 enum NSCollectionChangeType { NSCollectionChangeInsert(0), NSCollectionChangeRemove(1); @@ -4996,153 +4334,6 @@ enum NSCollectionChangeType { }; } -/// NSComparisonMethods -extension NSComparisonMethods on NSObject { - /// doesContain: - bool doesContain(objc.ObjCObject object) { - final _$$ref = object$.ref; - final _$$ref$1 = object.ref; - objc.checkOsVersionInternal( - 'NSObject.doesContain:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_doesContain_, - _$$ref$1.pointer, - ); - } - - /// isCaseInsensitiveLike: - bool isCaseInsensitiveLike(NSString object) { - final _$$ref = object$.ref; - final _$$ref$1 = object.ref; - objc.checkOsVersionInternal( - 'NSObject.isCaseInsensitiveLike:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_isCaseInsensitiveLike_, - _$$ref$1.pointer, - ); - } - - /// isEqualTo: - bool isEqualTo(objc.ObjCObject? object) { - final _$$ref = object$.ref; - final _$$ref$1 = object?.ref; - objc.checkOsVersionInternal( - 'NSObject.isEqualTo:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_isEqualTo_, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - } - - /// isGreaterThan: - bool isGreaterThan(objc.ObjCObject? object) { - final _$$ref = object$.ref; - final _$$ref$1 = object?.ref; - objc.checkOsVersionInternal( - 'NSObject.isGreaterThan:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_isGreaterThan_, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - } - - /// isGreaterThanOrEqualTo: - bool isGreaterThanOrEqualTo(objc.ObjCObject? object) { - final _$$ref = object$.ref; - final _$$ref$1 = object?.ref; - objc.checkOsVersionInternal( - 'NSObject.isGreaterThanOrEqualTo:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_isGreaterThanOrEqualTo_, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - } - - /// isLessThan: - bool isLessThan(objc.ObjCObject? object) { - final _$$ref = object$.ref; - final _$$ref$1 = object?.ref; - objc.checkOsVersionInternal( - 'NSObject.isLessThan:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_isLessThan_, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - } - - /// isLessThanOrEqualTo: - bool isLessThanOrEqualTo(objc.ObjCObject? object) { - final _$$ref = object$.ref; - final _$$ref$1 = object?.ref; - objc.checkOsVersionInternal( - 'NSObject.isLessThanOrEqualTo:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_isLessThanOrEqualTo_, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - } - - /// isLike: - bool isLike(NSString object) { - final _$$ref = object$.ref; - final _$$ref$1 = object.ref; - objc.checkOsVersionInternal( - 'NSObject.isLike:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_isLike_, - _$$ref$1.pointer, - ); - } - - /// isNotEqualTo: - bool isNotEqualTo(objc.ObjCObject? object) { - final _$$ref = object$.ref; - final _$$ref$1 = object?.ref; - objc.checkOsVersionInternal( - 'NSObject.isNotEqualTo:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_isNotEqualTo_, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - } -} - enum NSComparisonResult { NSOrderedAscending(-1), NSOrderedSame(0), @@ -5159,79 +4350,6 @@ enum NSComparisonResult { }; } -/// NSConnection -/// -/// NSConnection -@Deprecated('Use NSXPCConnection instead') -extension type NSConnection._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject { - /// Constructs a [NSConnection] that points to the same underlying object as [other]. - NSConnection.as(objc.ObjCObject other) : object$ = other { - objc.checkOsVersionInternal( - 'NSConnection', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - } - - /// Constructs a [NSConnection] that wraps the given raw object pointer. - NSConnection.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - objc.checkOsVersionInternal( - 'NSConnection', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - } -} - -/// NSCopyLinkMoveHandler -extension NSCopyLinkMoveHandler on NSObject { - /// fileManager:shouldProceedAfterError: - @Deprecated(' Handler API no longer supported') - bool fileManager( - NSFileManager fm, { - required NSDictionary shouldProceedAfterError, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = fm.ref; - final _$$ref$2 = shouldProceedAfterError.ref; - objc.checkOsVersionInternal( - 'NSObject.fileManager:shouldProceedAfterError:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_1lsax7n( - _$$ref.pointer, - _sel_fileManager_shouldProceedAfterError_, - _$$ref$1.pointer, - _$$ref$2.pointer, - ); - } - - /// fileManager:willProcessPath: - @Deprecated('Handler API no longer supported') - void fileManager$1(NSFileManager fm, {required NSString willProcessPath}) { - final _$$ref = object$.ref; - final _$$ref$1 = fm.ref; - final _$$ref$2 = willProcessPath.ref; - objc.checkOsVersionInternal( - 'NSObject.fileManager:willProcessPath:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_pfv6jd( - _$$ref.pointer, - _sel_fileManager_willProcessPath_, - _$$ref$1.pointer, - _$$ref$2.pointer, - ); - } -} - /// NSCopying extension type NSCopying._(objc.ObjCProtocol object$) implements objc.ObjCProtocol { @@ -5524,6 +4642,9 @@ extension NSData$Methods on NSData { } /// compressedDataUsingAlgorithm:error: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 NSData? compressedDataUsingAlgorithm(NSDataCompressionAlgorithm algorithm) { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -5549,6 +4670,9 @@ extension NSData$Methods on NSData { } /// decompressedDataUsingAlgorithm:error: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 NSData? decompressedDataUsingAlgorithm(NSDataCompressionAlgorithm algorithm) { final _$$ref = object$.ref; objc.checkOsVersionInternal( @@ -5821,41 +4945,6 @@ sealed class NSDataBase64DecodingOptions { static const NSDataBase64DecodingIgnoreUnknownCharacters = 1; } -/// NSDataBase64Encoding -extension NSDataBase64Encoding on NSData { - /// base64EncodedDataWithOptions: - NSData base64EncodedDataWithOptions(DartNSUInteger options) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSData.base64EncodedDataWithOptions:', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - final $ret = _objc_msgSend_ylninc( - _$$ref.pointer, - _sel_base64EncodedDataWithOptions_, - options, - ); - return NSData.fromPointer($ret, retain: true, release: true); - } - - /// base64EncodedStringWithOptions: - NSString base64EncodedStringWithOptions(DartNSUInteger options) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSData.base64EncodedStringWithOptions:', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - final $ret = _objc_msgSend_ylninc( - _$$ref.pointer, - _sel_base64EncodedStringWithOptions_, - options, - ); - return NSString.fromPointer($ret, retain: true, release: true); - } -} - sealed class NSDataBase64EncodingOptions { static const NSDataBase64Encoding64CharacterLineLength = 1; static const NSDataBase64Encoding76CharacterLineLength = 2; @@ -5863,9 +4952,8 @@ sealed class NSDataBase64EncodingOptions { static const NSDataBase64EncodingEndLineWithLineFeed = 32; } -/// NSDataCompression -extension NSDataCompression on NSData {} - +/// iOS: introduced 13.0.0 +/// macOS: introduced 10.15.0 enum NSDataCompressionAlgorithm { NSDataCompressionAlgorithmLZFSE(0), NSDataCompressionAlgorithmLZ4(1), @@ -6145,35 +5233,6 @@ extension NSDate$Methods on NSDate { } } -/// NSDateCreation -extension NSDateCreation on NSDate { - /// distantFuture - static NSDate getDistantFuture() { - final $ret = _objc_msgSend_151sglz(_class_NSDate, _sel_distantFuture); - return NSDate.fromPointer($ret, retain: true, release: true); - } - - /// distantPast - static NSDate getDistantPast() { - final $ret = _objc_msgSend_151sglz(_class_NSDate, _sel_distantPast); - return NSDate.fromPointer($ret, retain: true, release: true); - } - - /// now - static NSDate getNow() { - objc.checkOsVersionInternal( - 'NSDate.now', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), - ); - final $ret = _objc_msgSend_151sglz(_class_NSDate, _sel_now); - return NSDate.fromPointer($ret, retain: true, release: true); - } -} - -/// NSDecimalNumberExtensions -extension NSDecimalNumberExtensions on NSNumber {} - enum NSDecodingFailurePolicy { NSDecodingFailurePolicyRaiseException(0), NSDecodingFailurePolicySetErrorAndReturn(1); @@ -6190,460 +5249,305 @@ enum NSDecodingFailurePolicy { }; } -/// NSDelayedPerforming -extension NSDelayedPerforming on NSObject { - /// performSelector:withObject:afterDelay: - void performSelector$3( - ffi.Pointer aSelector, { - objc.ObjCObject? withObject, - required double afterDelay, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = withObject?.ref; - objc.checkOsVersionInternal( - 'NSObject.performSelector:withObject:afterDelay:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_7ql5kn( - _$$ref.pointer, - _sel_performSelector_withObject_afterDelay_, - aSelector, - _$$ref$1?.pointer ?? ffi.nullptr, - afterDelay, - ); - } +/// NSDictionary +extension type NSDictionary._(objc.ObjCObject object$) + implements + objc.ObjCObject, + NSObject, + NSCopying, + NSMutableCopying, + NSSecureCoding, + NSFastEnumeration { + /// Creates a [NSDictionary] from [other]. + static NSDictionary of(Map other) => + NSMutableDictionary.of(other); - /// performSelector:withObject:afterDelay:inModes: - void performSelector$4( - ffi.Pointer aSelector, { - objc.ObjCObject? withObject, - required double afterDelay, - required NSArray inModes, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = withObject?.ref; - final _$$ref$2 = inModes.ref; - objc.checkOsVersionInternal( - 'NSObject.performSelector:withObject:afterDelay:inModes:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_t8ajot( - _$$ref.pointer, - _sel_performSelector_withObject_afterDelay_inModes_, - aSelector, - _$$ref$1?.pointer ?? ffi.nullptr, - afterDelay, - _$$ref$2.pointer, - ); + /// Creates a [NSDictionary] from [entries]. + static NSDictionary fromEntries( + Iterable> entries, + ) => NSMutableDictionary.fromEntries(entries); + + /// Constructs a [NSDictionary] that points to the same underlying object as [other]. + NSDictionary.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); } - /// cancelPreviousPerformRequestsWithTarget: - static void cancelPreviousPerformRequestsWithTarget(objc.ObjCObject aTarget) { - final _$$ref = aTarget.ref; - objc.checkOsVersionInternal( - 'NSObject.cancelPreviousPerformRequestsWithTarget:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_xtuoz7( - _class_NSObject, - _sel_cancelPreviousPerformRequestsWithTarget_, - _$$ref.pointer, - ); + /// Constructs a [NSDictionary] that wraps the given raw object pointer. + NSDictionary.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + assert(isA(object$)); } - /// cancelPreviousPerformRequestsWithTarget:selector:object: - static void cancelPreviousPerformRequestsWithTarget$1( - objc.ObjCObject aTarget, { - required ffi.Pointer selector, - objc.ObjCObject? object, - }) { - final _$$ref = aTarget.ref; - final _$$ref$1 = object?.ref; - objc.checkOsVersionInternal( - 'NSObject.cancelPreviousPerformRequestsWithTarget:selector:object:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_1ygbbzi( - _class_NSObject, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - _$$ref.pointer, - selector, - _$$ref$1?.pointer ?? ffi.nullptr, - ); + /// Returns whether [obj] is an instance of [NSDictionary]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSDictionary, + ); + + /// alloc + static NSDictionary alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSDictionary, _sel_alloc); + return NSDictionary.fromPointer($ret, retain: false, release: true); } -} -/// NSDeprecated -extension NSDeprecated on NSDictionary { - /// getObjects:andKeys: - @Deprecated('Use -getObjects:andKeys:count: instead') - void getObjects( - ffi.Pointer> objects, { - required ffi.Pointer> andKeys, - }) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSDictionary.getObjects:andKeys:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_hefmm1( - _$$ref.pointer, - _sel_getObjects_andKeys_, - objects, - andKeys, + /// allocWithZone: + static NSDictionary allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSDictionary, + _sel_allocWithZone_, + zone, ); + return NSDictionary.fromPointer($ret, retain: false, release: true); } - /// initWithContentsOfFile: - @Deprecated('Deprecated') - NSDictionary? initWithContentsOfFile(NSString path) { - final _$$ref = object$.ref; - final _$$ref$1 = path.ref; - objc.checkOsVersionInternal( - 'NSDictionary.initWithContentsOfFile:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.retainAndReturnPointer(), - _sel_initWithContentsOfFile_, - _$$ref$1.pointer, - ); - return $ret.address == 0 - ? null - : NSDictionary.fromPointer($ret, retain: false, release: true); + /// dictionary + static NSDictionary dictionary() { + final $ret = _objc_msgSend_151sglz(_class_NSDictionary, _sel_dictionary); + return NSDictionary.fromPointer($ret, retain: true, release: true); } - /// initWithContentsOfURL: - @Deprecated('Deprecated') - NSDictionary? initWithContentsOfURL(NSURL url) { - final _$$ref = object$.ref; - final _$$ref$1 = url.ref; - objc.checkOsVersionInternal( - 'NSDictionary.initWithContentsOfURL:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); + /// dictionaryWithDictionary: + static NSDictionary dictionaryWithDictionary(NSDictionary dict) { + final _$$ref = dict.ref; final $ret = _objc_msgSend_1sotr3r( - _$$ref.retainAndReturnPointer(), - _sel_initWithContentsOfURL_, - _$$ref$1.pointer, + _class_NSDictionary, + _sel_dictionaryWithDictionary_, + _$$ref.pointer, ); - return $ret.address == 0 - ? null - : NSDictionary.fromPointer($ret, retain: false, release: true); + return NSDictionary.fromPointer($ret, retain: true, release: true); } - /// writeToFile:atomically: - @Deprecated('Deprecated') - bool writeToFile(NSString path, {required bool atomically}) { - final _$$ref = object$.ref; - final _$$ref$1 = path.ref; - objc.checkOsVersionInternal( - 'NSDictionary.writeToFile:atomically:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_1iyq28l( + /// dictionaryWithObject:forKey: + static NSDictionary dictionaryWithObject( + objc.ObjCObject object, { + required NSCopying forKey, + }) { + final _$$ref = object.ref; + final _$$ref$1 = forKey.ref; + final $ret = _objc_msgSend_15qeuct( + _class_NSDictionary, + _sel_dictionaryWithObject_forKey_, _$$ref.pointer, - _sel_writeToFile_atomically_, _$$ref$1.pointer, - atomically, ); + return NSDictionary.fromPointer($ret, retain: true, release: true); } - /// writeToURL:atomically: - @Deprecated('Deprecated') - bool writeToURL(NSURL url, {required bool atomically}) { - final _$$ref = object$.ref; - final _$$ref$1 = url.ref; - objc.checkOsVersionInternal( - 'NSDictionary.writeToURL:atomically:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_1iyq28l( + /// dictionaryWithObjects:forKeys: + static NSDictionary dictionaryWithObjects( + NSArray objects, { + required NSArray forKeys, + }) { + final _$$ref = objects.ref; + final _$$ref$1 = forKeys.ref; + final $ret = _objc_msgSend_15qeuct( + _class_NSDictionary, + _sel_dictionaryWithObjects_forKeys_, _$$ref.pointer, - _sel_writeToURL_atomically_, _$$ref$1.pointer, - atomically, ); + return NSDictionary.fromPointer($ret, retain: true, release: true); } - /// dictionaryWithContentsOfFile: - @Deprecated('Deprecated') - static NSDictionary? dictionaryWithContentsOfFile(NSString path) { - final _$$ref = path.ref; - objc.checkOsVersionInternal( - 'NSDictionary.dictionaryWithContentsOfFile:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( + /// dictionaryWithObjects:forKeys:count: + static NSDictionary dictionaryWithObjects$1( + ffi.Pointer> objects, { + required ffi.Pointer> forKeys, + required DartNSUInteger count, + }) { + final $ret = _objc_msgSend_1dydpdi( _class_NSDictionary, - _sel_dictionaryWithContentsOfFile_, - _$$ref.pointer, + _sel_dictionaryWithObjects_forKeys_count_, + objects, + forKeys, + count, ); - return $ret.address == 0 - ? null - : NSDictionary.fromPointer($ret, retain: true, release: true); + return NSDictionary.fromPointer($ret, retain: true, release: true); } - /// dictionaryWithContentsOfURL: - @Deprecated('Deprecated') - static NSDictionary? dictionaryWithContentsOfURL(NSURL url) { - final _$$ref = url.ref; - objc.checkOsVersionInternal( - 'NSDictionary.dictionaryWithContentsOfURL:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); + /// dictionaryWithObjectsAndKeys: + static NSDictionary dictionaryWithObjectsAndKeys( + objc.ObjCObject firstObject, + ) { + final _$$ref = firstObject.ref; final $ret = _objc_msgSend_1sotr3r( _class_NSDictionary, - _sel_dictionaryWithContentsOfURL_, + _sel_dictionaryWithObjectsAndKeys_, _$$ref.pointer, ); - return $ret.address == 0 - ? null - : NSDictionary.fromPointer($ret, retain: true, release: true); + return NSDictionary.fromPointer($ret, retain: true, release: true); } -} -/// NSDeprecated -extension NSDeprecated$1 on NSValue { - /// getValue: - @Deprecated('Deprecated') - void getValue$1(ffi.Pointer value) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSValue.getValue:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_ovsamd(_$$ref.pointer, _sel_getValue_, value); + /// new + static NSDictionary new$() { + final $ret = _objc_msgSend_151sglz(_class_NSDictionary, _sel_new); + return NSDictionary.fromPointer($ret, retain: false, release: true); } -} -/// NSDeprecated -extension NSDeprecated$2 on NSArray { - /// getObjects: - @Deprecated('Use -getObjects:range: instead') - void getObjects(ffi.Pointer> objects) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSArray.getObjects:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_1dau4w(_$$ref.pointer, _sel_getObjects_, objects); + /// supportsSecureCoding + static bool getSupportsSecureCoding() { + return _objc_msgSend_91o635(_class_NSDictionary, _sel_supportsSecureCoding); } - /// initWithContentsOfFile: - @Deprecated('Deprecated') - NSArray? initWithContentsOfFile(NSString path) { + /// Returns a new instance of NSDictionary constructed with the default `new` method. + NSDictionary() : this.as(new$().object$); +} + +extension NSDictionary$Methods on NSDictionary { + /// count + DartNSUInteger get count { final _$$ref = object$.ref; - final _$$ref$1 = path.ref; - objc.checkOsVersionInternal( - 'NSArray.initWithContentsOfFile:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.retainAndReturnPointer(), - _sel_initWithContentsOfFile_, - _$$ref$1.pointer, - ); - return $ret.address == 0 - ? null - : NSArray.fromPointer($ret, retain: false, release: true); + return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_count); } - /// initWithContentsOfURL: - @Deprecated('Deprecated') - NSArray? initWithContentsOfURL(NSURL url) { - final _$$ref = object$.ref; - final _$$ref$1 = url.ref; - objc.checkOsVersionInternal( - 'NSArray.initWithContentsOfURL:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.retainAndReturnPointer(), - _sel_initWithContentsOfURL_, + /// countByEnumeratingWithState:objects:count: + DartNSUInteger countByEnumeratingWithState( + ffi.Pointer state, { + required ffi.Pointer> objects, + required DartNSUInteger count, + }) { + final _$$ref$1 = object$.ref; + return _objc_msgSend_1b5ysjl( _$$ref$1.pointer, + _sel_countByEnumeratingWithState_objects_count_, + state, + objects, + count, ); - return $ret.address == 0 - ? null - : NSArray.fromPointer($ret, retain: false, release: true); } - /// writeToFile:atomically: - @Deprecated('Deprecated') - bool writeToFile(NSString path, {required bool atomically}) { - final _$$ref = object$.ref; - final _$$ref$1 = path.ref; - objc.checkOsVersionInternal( - 'NSArray.writeToFile:atomically:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_1iyq28l( - _$$ref.pointer, - _sel_writeToFile_atomically_, - _$$ref$1.pointer, - atomically, + /// encodeWithCoder: + void encodeWithCoder(NSCoder coder) { + final _$$ref$12 = object$.ref; + final _$$ref$13 = coder.ref; + _objc_msgSend_xtuoz7( + _$$ref$12.pointer, + _sel_encodeWithCoder_, + _$$ref$13.pointer, ); } - /// writeToURL:atomically: - @Deprecated('Deprecated') - bool writeToURL(NSURL url, {required bool atomically}) { - final _$$ref = object$.ref; - final _$$ref$1 = url.ref; + /// init + NSDictionary init() { + final _$$ref$13 = object$.ref; objc.checkOsVersionInternal( - 'NSArray.writeToURL:atomically:', + 'NSDictionary.init', iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); - return _objc_msgSend_1iyq28l( - _$$ref.pointer, - _sel_writeToURL_atomically_, - _$$ref$1.pointer, - atomically, + final $ret = _objc_msgSend_151sglz( + _$$ref$13.retainAndReturnPointer(), + _sel_init, ); + return NSDictionary.fromPointer($ret, retain: false, release: true); } - /// arrayWithContentsOfFile: - @Deprecated('Deprecated') - static NSArray? arrayWithContentsOfFile(NSString path) { - final _$$ref = path.ref; - objc.checkOsVersionInternal( - 'NSArray.arrayWithContentsOfFile:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); + /// initWithCoder: + NSDictionary? initWithCoder(NSCoder coder) { + final _$$ref$12 = object$.ref; + final _$$ref$13 = coder.ref; final $ret = _objc_msgSend_1sotr3r( - _class_NSArray, - _sel_arrayWithContentsOfFile_, - _$$ref.pointer, + _$$ref$12.retainAndReturnPointer(), + _sel_initWithCoder_, + _$$ref$13.pointer, ); return $ret.address == 0 ? null - : NSArray.fromPointer($ret, retain: true, release: true); + : NSDictionary.fromPointer($ret, retain: false, release: true); } - /// arrayWithContentsOfURL: - @Deprecated('Deprecated') - static NSArray? arrayWithContentsOfURL(NSURL url) { - final _$$ref = url.ref; - objc.checkOsVersionInternal( - 'NSArray.arrayWithContentsOfURL:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); + /// initWithDictionary: + NSDictionary initWithDictionary(NSDictionary otherDictionary) { + final _$$ref = object$.ref; + final _$$ref$1 = otherDictionary.ref; final $ret = _objc_msgSend_1sotr3r( - _class_NSArray, - _sel_arrayWithContentsOfURL_, - _$$ref.pointer, + _$$ref.retainAndReturnPointer(), + _sel_initWithDictionary_, + _$$ref$1.pointer, ); - return $ret.address == 0 - ? null - : NSArray.fromPointer($ret, retain: true, release: true); + return NSDictionary.fromPointer($ret, retain: false, release: true); } -} -/// NSDeprecated -extension NSDeprecated$3 on NSData { - /// base64Encoding - @Deprecated('Use base64EncodedStringWithOptions: instead') - NSString base64Encoding() { + /// initWithDictionary:copyItems: + NSDictionary initWithDictionary$1( + NSDictionary otherDictionary, { + required bool copyItems, + }) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSData.base64Encoding', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + final _$$ref$1 = otherDictionary.ref; + final $ret = _objc_msgSend_17amj0z( + _$$ref.retainAndReturnPointer(), + _sel_initWithDictionary_copyItems_, + _$$ref$1.pointer, + copyItems, ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_base64Encoding); - return NSString.fromPointer($ret, retain: true, release: true); + return NSDictionary.fromPointer($ret, retain: false, release: true); } - /// getBytes: - @Deprecated( - 'This method is unsafe because it could potentially cause buffer overruns. Use -getBytes:length: instead.', - ) - void getBytes(ffi.Pointer buffer) { + /// initWithObjects:forKeys: + NSDictionary initWithObjects(NSArray objects, {required NSArray forKeys}) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSData.getBytes:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + final _$$ref$1 = objects.ref; + final _$$ref$2 = forKeys.ref; + final $ret = _objc_msgSend_15qeuct( + _$$ref.retainAndReturnPointer(), + _sel_initWithObjects_forKeys_, + _$$ref$1.pointer, + _$$ref$2.pointer, ); - _objc_msgSend_ovsamd(_$$ref.pointer, _sel_getBytes_, buffer); + return NSDictionary.fromPointer($ret, retain: false, release: true); } - /// initWithBase64Encoding: - @Deprecated('Use initWithBase64EncodedString:options: instead') - objc.ObjCObject? initWithBase64Encoding(NSString base64String) { + /// initWithObjects:forKeys:count: + NSDictionary initWithObjects$1( + ffi.Pointer> objects, { + required ffi.Pointer> forKeys, + required DartNSUInteger count, + }) { final _$$ref = object$.ref; - final _$$ref$1 = base64String.ref; - objc.checkOsVersionInternal( - 'NSData.initWithBase64Encoding:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( + final $ret = _objc_msgSend_1dydpdi( _$$ref.retainAndReturnPointer(), - _sel_initWithBase64Encoding_, - _$$ref$1.pointer, + _sel_initWithObjects_forKeys_count_, + objects, + forKeys, + count, ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: false, release: true); + return NSDictionary.fromPointer($ret, retain: false, release: true); } - /// initWithContentsOfMappedFile: - @Deprecated( - 'Use -initWithContentsOfURL:options:error: and NSDataReadingMappedIfSafe or NSDataReadingMappedAlways instead.', - ) - objc.ObjCObject? initWithContentsOfMappedFile(NSString path) { + /// initWithObjectsAndKeys: + NSDictionary initWithObjectsAndKeys(objc.ObjCObject firstObject) { final _$$ref = object$.ref; - final _$$ref$1 = path.ref; - objc.checkOsVersionInternal( - 'NSData.initWithContentsOfMappedFile:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); + final _$$ref$1 = firstObject.ref; final $ret = _objc_msgSend_1sotr3r( _$$ref.retainAndReturnPointer(), - _sel_initWithContentsOfMappedFile_, + _sel_initWithObjectsAndKeys_, _$$ref$1.pointer, ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: false, release: true); + return NSDictionary.fromPointer($ret, retain: false, release: true); } - /// dataWithContentsOfMappedFile: - @Deprecated( - 'Use +dataWithContentsOfURL:options:error: and NSDataReadingMappedIfSafe or NSDataReadingMappedAlways instead.', - ) - static objc.ObjCObject? dataWithContentsOfMappedFile(NSString path) { - final _$$ref = path.ref; - objc.checkOsVersionInternal( - 'NSData.dataWithContentsOfMappedFile:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); + /// keyEnumerator + NSEnumerator keyEnumerator() { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_keyEnumerator); + return NSEnumerator.fromPointer($ret, retain: true, release: true); + } + + /// objectForKey: + objc.ObjCObject? objectForKey(objc.ObjCObject aKey) { + final _$$ref = object$.ref; + final _$$ref$1 = aKey.ref; final $ret = _objc_msgSend_1sotr3r( - _class_NSData, - _sel_dataWithContentsOfMappedFile_, _$$ref.pointer, + _sel_objectForKey_, + _$$ref$1.pointer, ); return $ret.address == 0 ? null @@ -6651,266 +5555,141 @@ extension NSDeprecated$3 on NSData { } } -/// NSDeprecated -extension NSDeprecated$4 on NSCoder { - /// decodeValueOfObjCType:at: - @Deprecated('Deprecated') - void decodeValueOfObjCType$1( - ffi.Pointer type, { - required ffi.Pointer at, - }) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSCoder.decodeValueOfObjCType:at:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_1flkydz( - _$$ref.pointer, - _sel_decodeValueOfObjCType_at_, - type, - at, - ); - } -} - -/// NSDeprecatedKeyValueCoding -extension NSDeprecatedKeyValueCoding on NSObject { - /// handleQueryWithUnboundKey: - @Deprecated('Legacy KVC API') - objc.ObjCObject? handleQueryWithUnboundKey(NSString key) { - final _$$ref = object$.ref; - final _$$ref$1 = key.ref; - objc.checkOsVersionInternal( - 'NSObject.handleQueryWithUnboundKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_handleQueryWithUnboundKey_, - _$$ref$1.pointer, - ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); - } +final class NSEdgeInsets extends ffi.Struct { + @ffi.Double() + external double top; - /// handleTakeValue:forUnboundKey: - @Deprecated('Legacy KVC API') - void handleTakeValue( - objc.ObjCObject? value, { - required NSString forUnboundKey, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; - final _$$ref$2 = forUnboundKey.ref; - objc.checkOsVersionInternal( - 'NSObject.handleTakeValue:forUnboundKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_pfv6jd( - _$$ref.pointer, - _sel_handleTakeValue_forUnboundKey_, - _$$ref$1?.pointer ?? ffi.nullptr, - _$$ref$2.pointer, - ); - } + @ffi.Double() + external double left; - /// storedValueForKey: - @Deprecated('Legacy KVC API') - objc.ObjCObject? storedValueForKey(NSString key) { - final _$$ref = object$.ref; - final _$$ref$1 = key.ref; - objc.checkOsVersionInternal( - 'NSObject.storedValueForKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_storedValueForKey_, - _$$ref$1.pointer, - ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); - } + @ffi.Double() + external double bottom; - /// takeStoredValue:forKey: - @Deprecated('Legacy KVC API') - void takeStoredValue(objc.ObjCObject? value, {required NSString forKey}) { - final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; - final _$$ref$2 = forKey.ref; - objc.checkOsVersionInternal( - 'NSObject.takeStoredValue:forKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_pfv6jd( - _$$ref.pointer, - _sel_takeStoredValue_forKey_, - _$$ref$1?.pointer ?? ffi.nullptr, - _$$ref$2.pointer, - ); - } + @ffi.Double() + external double right; - /// takeValue:forKey: - @Deprecated('Legacy KVC API') - void takeValue(objc.ObjCObject? value, {required NSString forKey}) { - final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; - final _$$ref$2 = forKey.ref; - objc.checkOsVersionInternal( - 'NSObject.takeValue:forKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_pfv6jd( - _$$ref.pointer, - _sel_takeValue_forKey_, - _$$ref$1?.pointer ?? ffi.nullptr, - _$$ref$2.pointer, - ); - } + static ffi.Pointer $allocate( + ffi.Allocator $allocator, { + required double top, + required double left, + required double bottom, + required double right, + }) => $allocator() + ..ref.top = top + ..ref.left = left + ..ref.bottom = bottom + ..ref.right = right; +} - /// takeValue:forKeyPath: - @Deprecated('Legacy KVC API') - void takeValue$1(objc.ObjCObject? value, {required NSString forKeyPath}) { - final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; - final _$$ref$2 = forKeyPath.ref; - objc.checkOsVersionInternal( - 'NSObject.takeValue:forKeyPath:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_pfv6jd( - _$$ref.pointer, - _sel_takeValue_forKeyPath_, - _$$ref$1?.pointer ?? ffi.nullptr, - _$$ref$2.pointer, - ); +sealed class NSEnumerationOptions { + static const NSEnumerationConcurrent = 1; + static const NSEnumerationReverse = 2; +} + +/// NSEnumerator +extension type NSEnumerator._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject, NSFastEnumeration { + /// Constructs a [NSEnumerator] that points to the same underlying object as [other]. + NSEnumerator.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); } - /// takeValuesFromDictionary: - @Deprecated('Legacy KVC API') - void takeValuesFromDictionary(NSDictionary properties) { - final _$$ref = object$.ref; - final _$$ref$1 = properties.ref; - objc.checkOsVersionInternal( - 'NSObject.takeValuesFromDictionary:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_takeValuesFromDictionary_, - _$$ref$1.pointer, - ); + /// Constructs a [NSEnumerator] that wraps the given raw object pointer. + NSEnumerator.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + assert(isA(object$)); } - /// unableToSetNilForKey: - @Deprecated('Legacy KVC API') - void unableToSetNilForKey(NSString key) { - final _$$ref = object$.ref; - final _$$ref$1 = key.ref; - objc.checkOsVersionInternal( - 'NSObject.unableToSetNilForKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_unableToSetNilForKey_, - _$$ref$1.pointer, - ); + /// Returns whether [obj] is an instance of [NSEnumerator]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSEnumerator, + ); + + /// alloc + static NSEnumerator alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSEnumerator, _sel_alloc); + return NSEnumerator.fromPointer($ret, retain: false, release: true); } - /// valuesForKeys: - @Deprecated('Legacy KVC API') - NSDictionary valuesForKeys(NSArray keys) { - final _$$ref = object$.ref; - final _$$ref$1 = keys.ref; - objc.checkOsVersionInternal( - 'NSObject.valuesForKeys:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_valuesForKeys_, - _$$ref$1.pointer, + /// allocWithZone: + static NSEnumerator allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSEnumerator, + _sel_allocWithZone_, + zone, ); - return NSDictionary.fromPointer($ret, retain: true, release: true); + return NSEnumerator.fromPointer($ret, retain: false, release: true); } - /// useStoredAccessor - @Deprecated('Legacy KVC API') - static bool useStoredAccessor() { - objc.checkOsVersionInternal( - 'NSObject.useStoredAccessor', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_91o635(_class_NSObject, _sel_useStoredAccessor); + /// new + static NSEnumerator new$() { + final $ret = _objc_msgSend_151sglz(_class_NSEnumerator, _sel_new); + return NSEnumerator.fromPointer($ret, retain: false, release: true); } + + /// Returns a new instance of NSEnumerator constructed with the default `new` method. + NSEnumerator() : this.as(new$().object$); } -/// NSDeprecatedKeyValueObservingCustomization -extension NSDeprecatedKeyValueObservingCustomization on NSObject { - /// setKeys:triggerChangeNotificationsForDependentKey: - @Deprecated('Use +keyPathsForValuesAffectingValueForKey instead') - static void setKeys( - NSArray keys, { - required NSString triggerChangeNotificationsForDependentKey, +extension NSEnumerator$Methods on NSEnumerator { + /// countByEnumeratingWithState:objects:count: + DartNSUInteger countByEnumeratingWithState( + ffi.Pointer state, { + required ffi.Pointer> objects, + required DartNSUInteger count, }) { - final _$$ref = keys.ref; - final _$$ref$1 = triggerChangeNotificationsForDependentKey.ref; + final _$$ref$2 = object$.ref; + return _objc_msgSend_1b5ysjl( + _$$ref$2.pointer, + _sel_countByEnumeratingWithState_objects_count_, + state, + objects, + count, + ); + } + + /// init + NSEnumerator init() { + final _$$ref$14 = object$.ref; objc.checkOsVersionInternal( - 'NSObject.setKeys:triggerChangeNotificationsForDependentKey:', + 'NSEnumerator.init', iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); - _objc_msgSend_pfv6jd( - _class_NSObject, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - _$$ref.pointer, - _$$ref$1.pointer, + final $ret = _objc_msgSend_151sglz( + _$$ref$14.retainAndReturnPointer(), + _sel_init, ); + return NSEnumerator.fromPointer($ret, retain: false, release: true); } -} - -/// NSDeprecatedMethods -extension NSDeprecatedMethods on NSObject {} - -/// NSDictionary -extension type NSDictionary._(objc.ObjCObject object$) - implements - objc.ObjCObject, - NSObject, - NSCopying, - NSMutableCopying, - NSSecureCoding, - NSFastEnumeration { - /// Creates a [NSDictionary] from [other]. - static NSDictionary of(Map other) => - NSMutableDictionary.of(other); - /// Creates a [NSDictionary] from [entries]. - static NSDictionary fromEntries( - Iterable> entries, - ) => NSMutableDictionary.fromEntries(entries); + /// nextObject + objc.ObjCObject? nextObject() { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_nextObject); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } +} - /// Constructs a [NSDictionary] that points to the same underlying object as [other]. - NSDictionary.as(objc.ObjCObject other) : object$ = other { +/// NSError +extension type NSError._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject, NSCopying, NSSecureCoding { + /// Constructs a [NSError] that points to the same underlying object as [other]. + NSError.as(objc.ObjCObject other) : object$ = other { assert(isA(object$)); } - /// Constructs a [NSDictionary] that wraps the given raw object pointer. - NSDictionary.fromPointer( + /// Constructs a [NSError] that wraps the given raw object pointer. + NSError.fromPointer( ffi.Pointer other, { bool retain = false, bool release = false, @@ -6918,1113 +5697,540 @@ extension type NSDictionary._(objc.ObjCObject object$) assert(isA(object$)); } - /// Returns whether [obj] is an instance of [NSDictionary]. + /// Returns whether [obj] is an instance of [NSError]. static bool isA(objc.ObjCObject? obj) => obj == null ? false : _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, - _class_NSDictionary, + _class_NSError, ); /// alloc - static NSDictionary alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSDictionary, _sel_alloc); - return NSDictionary.fromPointer($ret, retain: false, release: true); + static NSError alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSError, _sel_alloc); + return NSError.fromPointer($ret, retain: false, release: true); } /// allocWithZone: - static NSDictionary allocWithZone(ffi.Pointer zone) { + static NSError allocWithZone(ffi.Pointer zone) { final $ret = _objc_msgSend_1cwp428( - _class_NSDictionary, + _class_NSError, _sel_allocWithZone_, zone, ); - return NSDictionary.fromPointer($ret, retain: false, release: true); - } - - /// dictionary - static NSDictionary dictionary() { - final $ret = _objc_msgSend_151sglz(_class_NSDictionary, _sel_dictionary); - return NSDictionary.fromPointer($ret, retain: true, release: true); - } - - /// dictionaryWithDictionary: - static NSDictionary dictionaryWithDictionary(NSDictionary dict) { - final _$$ref = dict.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSDictionary, - _sel_dictionaryWithDictionary_, - _$$ref.pointer, - ); - return NSDictionary.fromPointer($ret, retain: true, release: true); + return NSError.fromPointer($ret, retain: false, release: true); } - /// dictionaryWithObject:forKey: - static NSDictionary dictionaryWithObject( - objc.ObjCObject object, { - required NSCopying forKey, + /// errorWithDomain:code:userInfo: + static NSError errorWithDomain( + NSString domain, { + required int code, + NSDictionary? userInfo, }) { - final _$$ref = object.ref; - final _$$ref$1 = forKey.ref; - final $ret = _objc_msgSend_15qeuct( - _class_NSDictionary, - _sel_dictionaryWithObject_forKey_, + final _$$ref = domain.ref; + final _$$ref$1 = userInfo?.ref; + final $ret = _objc_msgSend_rc4ypv( + _class_NSError, + _sel_errorWithDomain_code_userInfo_, _$$ref.pointer, - _$$ref$1.pointer, + code, + _$$ref$1?.pointer ?? ffi.nullptr, ); - return NSDictionary.fromPointer($ret, retain: true, release: true); + return NSError.fromPointer($ret, retain: true, release: true); } - /// dictionaryWithObjects:forKeys: - static NSDictionary dictionaryWithObjects( - NSArray objects, { - required NSArray forKeys, - }) { - final _$$ref = objects.ref; - final _$$ref$1 = forKeys.ref; - final $ret = _objc_msgSend_15qeuct( - _class_NSDictionary, - _sel_dictionaryWithObjects_forKeys_, - _$$ref.pointer, - _$$ref$1.pointer, - ); - return NSDictionary.fromPointer($ret, retain: true, release: true); + /// new + static NSError new$() { + final $ret = _objc_msgSend_151sglz(_class_NSError, _sel_new); + return NSError.fromPointer($ret, retain: false, release: true); } - /// dictionaryWithObjects:forKeys:count: - static NSDictionary dictionaryWithObjects$1( - ffi.Pointer> objects, { - required ffi.Pointer> forKeys, - required DartNSUInteger count, + /// setUserInfoValueProviderForDomain:provider: + static void setUserInfoValueProviderForDomain( + NSString errorDomain, { + objc.ObjCBlock< + ffi.Pointer? Function(NSError, NSString) + >? + provider, }) { - final $ret = _objc_msgSend_1dydpdi( - _class_NSDictionary, - _sel_dictionaryWithObjects_forKeys_count_, - objects, - forKeys, - count, + final _$$ref = errorDomain.ref; + final _$$ref$1 = provider?.ref; + objc.checkOsVersionInternal( + 'NSError.setUserInfoValueProviderForDomain:provider:', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), ); - return NSDictionary.fromPointer($ret, retain: true, release: true); - } - - /// dictionaryWithObjectsAndKeys: - static NSDictionary dictionaryWithObjectsAndKeys( - objc.ObjCObject firstObject, - ) { - final _$$ref = firstObject.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSDictionary, - _sel_dictionaryWithObjectsAndKeys_, + _objc_msgSend_o762yo( + _class_NSError, + _sel_setUserInfoValueProviderForDomain_provider_, _$$ref.pointer, + _$$ref$1?.pointer ?? ffi.nullptr, ); - return NSDictionary.fromPointer($ret, retain: true, release: true); - } - - /// new - static NSDictionary new$() { - final $ret = _objc_msgSend_151sglz(_class_NSDictionary, _sel_new); - return NSDictionary.fromPointer($ret, retain: false, release: true); } /// supportsSecureCoding static bool getSupportsSecureCoding() { - return _objc_msgSend_91o635(_class_NSDictionary, _sel_supportsSecureCoding); + return _objc_msgSend_91o635(_class_NSError, _sel_supportsSecureCoding); } - /// Returns a new instance of NSDictionary constructed with the default `new` method. - NSDictionary() : this.as(new$().object$); + /// userInfoValueProviderForDomain: + static objc.ObjCBlock< + ffi.Pointer? Function(NSError, NSString) + >? + userInfoValueProviderForDomain_( + NSError err, { + required NSString userInfoKey, + required NSString errorDomain, + }) { + final _$$ref = err.ref; + final _$$ref$1 = userInfoKey.ref; + final _$$ref$2 = errorDomain.ref; + objc.checkOsVersionInternal( + 'NSError.userInfoValueProviderForDomain:', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), + ); + final $ret = _objc_msgSend_cnxxyq( + _class_NSError, + _sel_userInfoValueProviderForDomain_, + _$$ref.pointer, + _$$ref$1.pointer, + _$$ref$2.pointer, + ); + return $ret.address == 0 + ? null + : ObjCBlock_objcObjCObjectImpl_NSError_NSErrorUserInfoKey.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// Returns a new instance of NSError constructed with the default `new` method. + NSError() : this.as(new$().object$); } -extension NSDictionary$Methods on NSDictionary { - /// count - DartNSUInteger get count { +extension NSError$Methods on NSError { + /// code + int get code { final _$$ref = object$.ref; - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_count); + return _objc_msgSend_1hz7y9r(_$$ref.pointer, _sel_code); } - /// countByEnumeratingWithState:objects:count: - DartNSUInteger countByEnumeratingWithState( - ffi.Pointer state, { - required ffi.Pointer> objects, - required DartNSUInteger count, - }) { - final _$$ref$1 = object$.ref; - return _objc_msgSend_1b5ysjl( - _$$ref$1.pointer, - _sel_countByEnumeratingWithState_objects_count_, - state, - objects, - count, - ); + /// domain + NSString get domain { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_domain); + return NSString.fromPointer($ret, retain: true, release: true); } /// encodeWithCoder: void encodeWithCoder(NSCoder coder) { - final _$$ref$12 = object$.ref; - final _$$ref$13 = coder.ref; + final _$$ref$14 = object$.ref; + final _$$ref$15 = coder.ref; _objc_msgSend_xtuoz7( - _$$ref$12.pointer, + _$$ref$14.pointer, _sel_encodeWithCoder_, - _$$ref$13.pointer, + _$$ref$15.pointer, ); } + /// helpAnchor + NSString? get helpAnchor { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_helpAnchor); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); + } + /// init - NSDictionary init() { - final _$$ref$13 = object$.ref; + NSError init() { + final _$$ref$15 = object$.ref; objc.checkOsVersionInternal( - 'NSDictionary.init', + 'NSError.init', iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); final $ret = _objc_msgSend_151sglz( - _$$ref$13.retainAndReturnPointer(), + _$$ref$15.retainAndReturnPointer(), _sel_init, ); - return NSDictionary.fromPointer($ret, retain: false, release: true); + return NSError.fromPointer($ret, retain: false, release: true); } /// initWithCoder: - NSDictionary? initWithCoder(NSCoder coder) { - final _$$ref$12 = object$.ref; - final _$$ref$13 = coder.ref; + NSError? initWithCoder(NSCoder coder) { + final _$$ref$14 = object$.ref; + final _$$ref$15 = coder.ref; final $ret = _objc_msgSend_1sotr3r( - _$$ref$12.retainAndReturnPointer(), + _$$ref$14.retainAndReturnPointer(), _sel_initWithCoder_, - _$$ref$13.pointer, + _$$ref$15.pointer, ); return $ret.address == 0 ? null - : NSDictionary.fromPointer($ret, retain: false, release: true); + : NSError.fromPointer($ret, retain: false, release: true); } - /// initWithDictionary: - NSDictionary initWithDictionary(NSDictionary otherDictionary) { + /// initWithDomain:code:userInfo: + NSError initWithDomain( + NSString domain, { + required int code, + NSDictionary? userInfo, + }) { final _$$ref = object$.ref; - final _$$ref$1 = otherDictionary.ref; - final $ret = _objc_msgSend_1sotr3r( + final _$$ref$1 = domain.ref; + final _$$ref$2 = userInfo?.ref; + final $ret = _objc_msgSend_rc4ypv( _$$ref.retainAndReturnPointer(), - _sel_initWithDictionary_, + _sel_initWithDomain_code_userInfo_, _$$ref$1.pointer, + code, + _$$ref$2?.pointer ?? ffi.nullptr, ); - return NSDictionary.fromPointer($ret, retain: false, release: true); + return NSError.fromPointer($ret, retain: false, release: true); } - /// initWithDictionary:copyItems: - NSDictionary initWithDictionary$1( - NSDictionary otherDictionary, { - required bool copyItems, - }) { + /// localizedDescription + NSString get localizedDescription { final _$$ref = object$.ref; - final _$$ref$1 = otherDictionary.ref; - final $ret = _objc_msgSend_17amj0z( - _$$ref.retainAndReturnPointer(), - _sel_initWithDictionary_copyItems_, - _$$ref$1.pointer, - copyItems, + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_localizedDescription, ); - return NSDictionary.fromPointer($ret, retain: false, release: true); + return NSString.fromPointer($ret, retain: true, release: true); } - /// initWithObjects:forKeys: - NSDictionary initWithObjects(NSArray objects, {required NSArray forKeys}) { + /// localizedFailureReason + NSString? get localizedFailureReason { final _$$ref = object$.ref; - final _$$ref$1 = objects.ref; - final _$$ref$2 = forKeys.ref; - final $ret = _objc_msgSend_15qeuct( - _$$ref.retainAndReturnPointer(), - _sel_initWithObjects_forKeys_, - _$$ref$1.pointer, - _$$ref$2.pointer, + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_localizedFailureReason, ); - return NSDictionary.fromPointer($ret, retain: false, release: true); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); } - /// initWithObjects:forKeys:count: - NSDictionary initWithObjects$1( - ffi.Pointer> objects, { - required ffi.Pointer> forKeys, - required DartNSUInteger count, - }) { + /// localizedRecoveryOptions + NSArray? get localizedRecoveryOptions { final _$$ref = object$.ref; - final $ret = _objc_msgSend_1dydpdi( - _$$ref.retainAndReturnPointer(), - _sel_initWithObjects_forKeys_count_, - objects, - forKeys, - count, + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_localizedRecoveryOptions, ); - return NSDictionary.fromPointer($ret, retain: false, release: true); + return $ret.address == 0 + ? null + : NSArray.fromPointer($ret, retain: true, release: true); } - /// initWithObjectsAndKeys: - NSDictionary initWithObjectsAndKeys(objc.ObjCObject firstObject) { + /// localizedRecoverySuggestion + NSString? get localizedRecoverySuggestion { final _$$ref = object$.ref; - final _$$ref$1 = firstObject.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref.retainAndReturnPointer(), - _sel_initWithObjectsAndKeys_, - _$$ref$1.pointer, + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_localizedRecoverySuggestion, ); - return NSDictionary.fromPointer($ret, retain: false, release: true); - } - - /// keyEnumerator - NSEnumerator keyEnumerator() { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_keyEnumerator); - return NSEnumerator.fromPointer($ret, retain: true, release: true); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); } - /// objectForKey: - objc.ObjCObject? objectForKey(objc.ObjCObject aKey) { + /// recoveryAttempter + objc.ObjCObject? get recoveryAttempter { final _$$ref = object$.ref; - final _$$ref$1 = aKey.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_objectForKey_, - _$$ref$1.pointer, - ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_recoveryAttempter); return $ret.address == 0 ? null : objc.ObjCObject($ret, retain: true, release: true); } -} -/// NSDictionaryCreation -extension NSDictionaryCreation on NSDictionary { - /// initWithContentsOfURL:error: - NSDictionary? initWithContentsOfURL(NSURL url) { + /// iOS: introduced 14.5.0 + /// macOS: introduced 11.3.0 + NSArray get underlyingErrors { final _$$ref = object$.ref; - final _$$ref$1 = url.ref; objc.checkOsVersionInternal( - 'NSDictionary.initWithContentsOfURL:error:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + 'NSError.underlyingErrors', + iOS: (false, (14, 5, 0)), + macOS: (false, (11, 3, 0)), ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1lhpu4m( - _$$ref.retainAndReturnPointer(), - _sel_initWithContentsOfURL_error_, - _$$ref$1.pointer, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSDictionary.fromPointer($ret, retain: false, release: true); - } finally { - pkg_ffi.calloc.free($err); - } + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_underlyingErrors); + return NSArray.fromPointer($ret, retain: true, release: true); } - /// dictionaryWithContentsOfURL:error: - static NSDictionary? dictionaryWithContentsOfURL(NSURL url) { - final _$$ref = url.ref; - objc.checkOsVersionInternal( - 'NSDictionary.dictionaryWithContentsOfURL:error:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1lhpu4m( - _class_NSDictionary, - _sel_dictionaryWithContentsOfURL_error_, - _$$ref.pointer, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSDictionary.fromPointer($ret, retain: true, release: true); - } finally { - pkg_ffi.calloc.free($err); - } + /// userInfo + NSDictionary get userInfo { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_userInfo); + return NSDictionary.fromPointer($ret, retain: true, release: true); } } -/// NSDiscardableContentProxy -extension NSDiscardableContentProxy on NSObject { - /// autoContentAccessingProxy - objc.ObjCObject get autoContentAccessingProxy { +/// NSExtendedArray +extension NSExtendedArray on NSArray { + /// arrayByAddingObject: + NSArray arrayByAddingObject(objc.ObjCObject anObject) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSObject.autoContentAccessingProxy', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_151sglz( + final _$$ref$1 = anObject.ref; + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_autoContentAccessingProxy, + _sel_arrayByAddingObject_, + _$$ref$1.pointer, ); - return objc.ObjCObject($ret, retain: true, release: true); + return NSArray.fromPointer($ret, retain: true, release: true); } -} -/// NSDistributedObjects -extension NSDistributedObjects on NSObject { - /// classForPortCoder - @Deprecated('Use NSXPCConnection instead') - objc.ObjCObject get classForPortCoder { + /// arrayByAddingObjectsFromArray: + NSArray arrayByAddingObjectsFromArray(NSArray otherArray) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSObject.classForPortCoder', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + final _$$ref$1 = otherArray.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_arrayByAddingObjectsFromArray_, + _$$ref$1.pointer, ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_classForPortCoder); - return objc.ObjCObject($ret, retain: true, release: true); + return NSArray.fromPointer($ret, retain: true, release: true); } - /// replacementObjectForPortCoder: - @Deprecated('Use NSXPCConnection instead') - objc.ObjCObject? replacementObjectForPortCoder(NSPortCoder coder) { + /// componentsJoinedByString: + NSString componentsJoinedByString(NSString separator) { final _$$ref = object$.ref; - final _$$ref$1 = coder.ref; - objc.checkOsVersionInternal( - 'NSObject.replacementObjectForPortCoder:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); + final _$$ref$1 = separator.ref; final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_replacementObjectForPortCoder_, + _sel_componentsJoinedByString_, _$$ref$1.pointer, ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); - } -} - -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; - - static ffi.Pointer $allocate( - ffi.Allocator $allocator, { - required double top, - required double left, - required double bottom, - required double right, - }) => $allocator() - ..ref.top = top - ..ref.left = left - ..ref.bottom = bottom - ..ref.right = right; -} - -sealed class NSEnumerationOptions { - static const NSEnumerationConcurrent = 1; - static const NSEnumerationReverse = 2; -} - -/// NSEnumerator -extension type NSEnumerator._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject, NSFastEnumeration { - /// Constructs a [NSEnumerator] that points to the same underlying object as [other]. - NSEnumerator.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); + return NSString.fromPointer($ret, retain: true, release: true); } - /// Constructs a [NSEnumerator] that wraps the given raw object pointer. - NSEnumerator.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); + /// containsObject: + bool containsObject(objc.ObjCObject anObject) { + final _$$ref = object$.ref; + final _$$ref$1 = anObject.ref; + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_containsObject_, + _$$ref$1.pointer, + ); } - /// Returns whether [obj] is an instance of [NSEnumerator]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSEnumerator, - ); - - /// alloc - static NSEnumerator alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSEnumerator, _sel_alloc); - return NSEnumerator.fromPointer($ret, retain: false, release: true); + /// description + NSString get description$1 { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_description); + return NSString.fromPointer($ret, retain: true, release: true); } - /// allocWithZone: - static NSEnumerator allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSEnumerator, - _sel_allocWithZone_, - zone, + /// descriptionWithLocale: + NSString descriptionWithLocale(objc.ObjCObject? locale) { + final _$$ref = object$.ref; + final _$$ref$1 = locale?.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_descriptionWithLocale_, + _$$ref$1?.pointer ?? ffi.nullptr, ); - return NSEnumerator.fromPointer($ret, retain: false, release: true); + return NSString.fromPointer($ret, retain: true, release: true); } - /// new - static NSEnumerator new$() { - final $ret = _objc_msgSend_151sglz(_class_NSEnumerator, _sel_new); - return NSEnumerator.fromPointer($ret, retain: false, release: true); + /// descriptionWithLocale:indent: + NSString descriptionWithLocale$1( + objc.ObjCObject? locale, { + required DartNSUInteger indent, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = locale?.ref; + final $ret = _objc_msgSend_1k4kd9s( + _$$ref.pointer, + _sel_descriptionWithLocale_indent_, + _$$ref$1?.pointer ?? ffi.nullptr, + indent, + ); + return NSString.fromPointer($ret, retain: true, release: true); } - /// Returns a new instance of NSEnumerator constructed with the default `new` method. - NSEnumerator() : this.as(new$().object$); -} - -extension NSEnumerator$Methods on NSEnumerator { - /// countByEnumeratingWithState:objects:count: - DartNSUInteger countByEnumeratingWithState( - ffi.Pointer state, { - required ffi.Pointer> objects, - required DartNSUInteger count, + /// enumerateObjectsAtIndexes:options:usingBlock: + void enumerateObjectsAtIndexes( + NSIndexSet s, { + required DartNSUInteger options, + required objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) + > + usingBlock, }) { - final _$$ref$2 = object$.ref; - return _objc_msgSend_1b5ysjl( + final _$$ref = object$.ref; + final _$$ref$1 = s.ref; + final _$$ref$2 = usingBlock.ref; + objc.checkOsVersionInternal( + 'NSArray.enumerateObjectsAtIndexes:options:usingBlock:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + _objc_msgSend_a3wp08( + _$$ref.pointer, + _sel_enumerateObjectsAtIndexes_options_usingBlock_, + _$$ref$1.pointer, + options, _$$ref$2.pointer, - _sel_countByEnumeratingWithState_objects_count_, - state, - objects, - count, ); } - /// init - NSEnumerator init() { - final _$$ref$14 = object$.ref; + /// enumerateObjectsUsingBlock: + void enumerateObjectsUsingBlock( + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) + > + block, + ) { + final _$$ref = object$.ref; + final _$$ref$1 = block.ref; objc.checkOsVersionInternal( - 'NSEnumerator.init', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSArray.enumerateObjectsUsingBlock:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - final $ret = _objc_msgSend_151sglz( - _$$ref$14.retainAndReturnPointer(), - _sel_init, + _objc_msgSend_f167m6( + _$$ref.pointer, + _sel_enumerateObjectsUsingBlock_, + _$$ref$1.pointer, ); - return NSEnumerator.fromPointer($ret, retain: false, release: true); } - /// nextObject - objc.ObjCObject? nextObject() { + /// enumerateObjectsWithOptions:usingBlock: + void enumerateObjectsWithOptions( + DartNSUInteger opts, { + required objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) + > + usingBlock, + }) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_nextObject); + final _$$ref$1 = usingBlock.ref; + objc.checkOsVersionInternal( + 'NSArray.enumerateObjectsWithOptions:usingBlock:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + _objc_msgSend_yx8yc6( + _$$ref.pointer, + _sel_enumerateObjectsWithOptions_usingBlock_, + opts, + _$$ref$1.pointer, + ); + } + + /// firstObject + objc.ObjCObject? get firstObject { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSArray.firstObject', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_firstObject); return $ret.address == 0 ? null : objc.ObjCObject($ret, retain: true, release: true); } -} - -/// NSError -extension type NSError._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject, NSCopying, NSSecureCoding { - /// Constructs a [NSError] that points to the same underlying object as [other]. - NSError.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); - } - /// Constructs a [NSError] that wraps the given raw object pointer. - NSError.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); + /// firstObjectCommonWithArray: + objc.ObjCObject? firstObjectCommonWithArray(NSArray otherArray) { + final _$$ref = object$.ref; + final _$$ref$1 = otherArray.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_firstObjectCommonWithArray_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSError]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSError, - ); - - /// alloc - static NSError alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSError, _sel_alloc); - return NSError.fromPointer($ret, retain: false, release: true); + /// getObjects:range: + void getObjects( + ffi.Pointer> objects, { + required NSRange range, + }) { + final _$$ref = object$.ref; + _objc_msgSend_o16d3k( + _$$ref.pointer, + _sel_getObjects_range_, + objects, + range, + ); } - /// allocWithZone: - static NSError allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSError, - _sel_allocWithZone_, - zone, + /// indexOfObject: + DartNSUInteger indexOfObject(objc.ObjCObject anObject) { + final _$$ref = object$.ref; + final _$$ref$1 = anObject.ref; + return _objc_msgSend_1vd1c5m( + _$$ref.pointer, + _sel_indexOfObject_, + _$$ref$1.pointer, ); - return NSError.fromPointer($ret, retain: false, release: true); } - /// errorWithDomain:code:userInfo: - static NSError errorWithDomain( - NSString domain, { - required int code, - NSDictionary? userInfo, + /// indexOfObject:inRange: + DartNSUInteger indexOfObject$1( + objc.ObjCObject anObject, { + required NSRange inRange, }) { - final _$$ref = domain.ref; - final _$$ref$1 = userInfo?.ref; - final $ret = _objc_msgSend_rc4ypv( - _class_NSError, - _sel_errorWithDomain_code_userInfo_, + final _$$ref = object$.ref; + final _$$ref$1 = anObject.ref; + return _objc_msgSend_zug4wi( _$$ref.pointer, - code, - _$$ref$1?.pointer ?? ffi.nullptr, + _sel_indexOfObject_inRange_, + _$$ref$1.pointer, + inRange, ); - return NSError.fromPointer($ret, retain: true, release: true); - } - - /// new - static NSError new$() { - final $ret = _objc_msgSend_151sglz(_class_NSError, _sel_new); - return NSError.fromPointer($ret, retain: false, release: true); } - /// setUserInfoValueProviderForDomain:provider: - static void setUserInfoValueProviderForDomain( - NSString errorDomain, { - objc.ObjCBlock< - ffi.Pointer? Function(NSError, NSString) - >? - provider, + /// indexOfObject:inSortedRange:options:usingComparator: + DartNSUInteger indexOfObject$2( + objc.ObjCObject obj, { + required NSRange inSortedRange, + required DartNSUInteger options, + required objc.ObjCBlock< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ) + > + usingComparator, }) { - final _$$ref = errorDomain.ref; - final _$$ref$1 = provider?.ref; + final _$$ref = object$.ref; + final _$$ref$1 = obj.ref; + final _$$ref$2 = usingComparator.ref; objc.checkOsVersionInternal( - 'NSError.setUserInfoValueProviderForDomain:provider:', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), + 'NSArray.indexOfObject:inSortedRange:options:usingComparator:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - _objc_msgSend_o762yo( - _class_NSError, - _sel_setUserInfoValueProviderForDomain_provider_, + return _objc_msgSend_kshx9d( _$$ref.pointer, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - } - - /// supportsSecureCoding - static bool getSupportsSecureCoding() { - return _objc_msgSend_91o635(_class_NSError, _sel_supportsSecureCoding); - } - - /// userInfoValueProviderForDomain: - static objc.ObjCBlock< - ffi.Pointer? Function(NSError, NSString) - >? - userInfoValueProviderForDomain_( - NSError err, { - required NSString userInfoKey, - required NSString errorDomain, - }) { - final _$$ref = err.ref; - final _$$ref$1 = userInfoKey.ref; - final _$$ref$2 = errorDomain.ref; - objc.checkOsVersionInternal( - 'NSError.userInfoValueProviderForDomain:', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), - ); - final $ret = _objc_msgSend_cnxxyq( - _class_NSError, - _sel_userInfoValueProviderForDomain_, - _$$ref.pointer, - _$$ref$1.pointer, - _$$ref$2.pointer, - ); - return $ret.address == 0 - ? null - : ObjCBlock_objcObjCObjectImpl_NSError_NSErrorUserInfoKey.fromPointer( - $ret, - retain: true, - release: true, - ); - } - - /// Returns a new instance of NSError constructed with the default `new` method. - NSError() : this.as(new$().object$); -} - -extension NSError$Methods on NSError { - /// code - int get code { - final _$$ref = object$.ref; - return _objc_msgSend_1hz7y9r(_$$ref.pointer, _sel_code); - } - - /// domain - NSString get domain { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_domain); - return NSString.fromPointer($ret, retain: true, release: true); - } - - /// encodeWithCoder: - void encodeWithCoder(NSCoder coder) { - final _$$ref$14 = object$.ref; - final _$$ref$15 = coder.ref; - _objc_msgSend_xtuoz7( - _$$ref$14.pointer, - _sel_encodeWithCoder_, - _$$ref$15.pointer, - ); - } - - /// helpAnchor - NSString? get helpAnchor { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_helpAnchor); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); - } - - /// init - NSError init() { - final _$$ref$15 = object$.ref; - objc.checkOsVersionInternal( - 'NSError.init', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref$15.retainAndReturnPointer(), - _sel_init, - ); - return NSError.fromPointer($ret, retain: false, release: true); - } - - /// initWithCoder: - NSError? initWithCoder(NSCoder coder) { - final _$$ref$14 = object$.ref; - final _$$ref$15 = coder.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref$14.retainAndReturnPointer(), - _sel_initWithCoder_, - _$$ref$15.pointer, - ); - return $ret.address == 0 - ? null - : NSError.fromPointer($ret, retain: false, release: true); - } - - /// initWithDomain:code:userInfo: - NSError initWithDomain( - NSString domain, { - required int code, - NSDictionary? userInfo, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = domain.ref; - final _$$ref$2 = userInfo?.ref; - final $ret = _objc_msgSend_rc4ypv( - _$$ref.retainAndReturnPointer(), - _sel_initWithDomain_code_userInfo_, - _$$ref$1.pointer, - code, - _$$ref$2?.pointer ?? ffi.nullptr, - ); - return NSError.fromPointer($ret, retain: false, release: true); - } - - /// localizedDescription - NSString get localizedDescription { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_localizedDescription, - ); - return NSString.fromPointer($ret, retain: true, release: true); - } - - /// localizedFailureReason - NSString? get localizedFailureReason { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_localizedFailureReason, - ); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); - } - - /// localizedRecoveryOptions - NSArray? get localizedRecoveryOptions { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_localizedRecoveryOptions, - ); - return $ret.address == 0 - ? null - : NSArray.fromPointer($ret, retain: true, release: true); - } - - /// localizedRecoverySuggestion - NSString? get localizedRecoverySuggestion { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_localizedRecoverySuggestion, - ); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); - } - - /// recoveryAttempter - objc.ObjCObject? get recoveryAttempter { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_recoveryAttempter); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); - } - - /// underlyingErrors - NSArray get underlyingErrors { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSError.underlyingErrors', - iOS: (false, (14, 5, 0)), - macOS: (false, (11, 3, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_underlyingErrors); - return NSArray.fromPointer($ret, retain: true, release: true); - } - - /// userInfo - NSDictionary get userInfo { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_userInfo); - return NSDictionary.fromPointer($ret, retain: true, release: true); - } -} - -/// NSErrorRecoveryAttempting -extension NSErrorRecoveryAttempting on NSObject { - /// attemptRecoveryFromError:optionIndex: - bool attemptRecoveryFromError( - NSError error, { - required DartNSUInteger optionIndex, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = error.ref; - objc.checkOsVersionInternal( - 'NSObject.attemptRecoveryFromError:optionIndex:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_z7gxsm( - _$$ref.pointer, - _sel_attemptRecoveryFromError_optionIndex_, - _$$ref$1.pointer, - optionIndex, - ); - } - - /// attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo: - void attemptRecoveryFromError$1( - NSError error, { - required DartNSUInteger optionIndex, - objc.ObjCObject? delegate, - required ffi.Pointer didRecoverSelector, - required ffi.Pointer contextInfo, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = error.ref; - final _$$ref$2 = delegate?.ref; - objc.checkOsVersionInternal( - 'NSObject.attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_10txwc9( - _$$ref.pointer, - _sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_, - _$$ref$1.pointer, - optionIndex, - _$$ref$2?.pointer ?? ffi.nullptr, - didRecoverSelector, - contextInfo, - ); - } -} - -/// NSExtendedArray -extension NSExtendedArray on NSArray { - /// arrayByAddingObject: - NSArray arrayByAddingObject(objc.ObjCObject anObject) { - final _$$ref = object$.ref; - final _$$ref$1 = anObject.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_arrayByAddingObject_, - _$$ref$1.pointer, - ); - return NSArray.fromPointer($ret, retain: true, release: true); - } - - /// arrayByAddingObjectsFromArray: - NSArray arrayByAddingObjectsFromArray(NSArray otherArray) { - final _$$ref = object$.ref; - final _$$ref$1 = otherArray.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_arrayByAddingObjectsFromArray_, - _$$ref$1.pointer, - ); - return NSArray.fromPointer($ret, retain: true, release: true); - } - - /// componentsJoinedByString: - NSString componentsJoinedByString(NSString separator) { - final _$$ref = object$.ref; - final _$$ref$1 = separator.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_componentsJoinedByString_, - _$$ref$1.pointer, - ); - return NSString.fromPointer($ret, retain: true, release: true); - } - - /// containsObject: - bool containsObject(objc.ObjCObject anObject) { - final _$$ref = object$.ref; - final _$$ref$1 = anObject.ref; - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_containsObject_, - _$$ref$1.pointer, - ); - } - - /// description - NSString get description$1 { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_description); - return NSString.fromPointer($ret, retain: true, release: true); - } - - /// descriptionWithLocale: - NSString descriptionWithLocale(objc.ObjCObject? locale) { - final _$$ref = object$.ref; - final _$$ref$1 = locale?.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_descriptionWithLocale_, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - return NSString.fromPointer($ret, retain: true, release: true); - } - - /// descriptionWithLocale:indent: - NSString descriptionWithLocale$1( - objc.ObjCObject? locale, { - required DartNSUInteger indent, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = locale?.ref; - final $ret = _objc_msgSend_1k4kd9s( - _$$ref.pointer, - _sel_descriptionWithLocale_indent_, - _$$ref$1?.pointer ?? ffi.nullptr, - indent, - ); - return NSString.fromPointer($ret, retain: true, release: true); - } - - /// enumerateObjectsAtIndexes:options:usingBlock: - void enumerateObjectsAtIndexes( - NSIndexSet s, { - required DartNSUInteger options, - required objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - > - usingBlock, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = s.ref; - final _$$ref$2 = usingBlock.ref; - objc.checkOsVersionInternal( - 'NSArray.enumerateObjectsAtIndexes:options:usingBlock:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - _objc_msgSend_a3wp08( - _$$ref.pointer, - _sel_enumerateObjectsAtIndexes_options_usingBlock_, - _$$ref$1.pointer, - options, - _$$ref$2.pointer, - ); - } - - /// enumerateObjectsUsingBlock: - void enumerateObjectsUsingBlock( - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - > - block, - ) { - final _$$ref = object$.ref; - final _$$ref$1 = block.ref; - objc.checkOsVersionInternal( - 'NSArray.enumerateObjectsUsingBlock:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - _objc_msgSend_f167m6( - _$$ref.pointer, - _sel_enumerateObjectsUsingBlock_, - _$$ref$1.pointer, - ); - } - - /// enumerateObjectsWithOptions:usingBlock: - void enumerateObjectsWithOptions( - DartNSUInteger opts, { - required objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - > - usingBlock, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = usingBlock.ref; - objc.checkOsVersionInternal( - 'NSArray.enumerateObjectsWithOptions:usingBlock:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - _objc_msgSend_yx8yc6( - _$$ref.pointer, - _sel_enumerateObjectsWithOptions_usingBlock_, - opts, - _$$ref$1.pointer, - ); - } - - /// firstObject - objc.ObjCObject? get firstObject { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSArray.firstObject', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_firstObject); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); - } - - /// firstObjectCommonWithArray: - objc.ObjCObject? firstObjectCommonWithArray(NSArray otherArray) { - final _$$ref = object$.ref; - final _$$ref$1 = otherArray.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_firstObjectCommonWithArray_, - _$$ref$1.pointer, - ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); - } - - /// getObjects:range: - void getObjects( - ffi.Pointer> objects, { - required NSRange range, - }) { - final _$$ref = object$.ref; - _objc_msgSend_o16d3k( - _$$ref.pointer, - _sel_getObjects_range_, - objects, - range, - ); - } - - /// indexOfObject: - DartNSUInteger indexOfObject(objc.ObjCObject anObject) { - final _$$ref = object$.ref; - final _$$ref$1 = anObject.ref; - return _objc_msgSend_1vd1c5m( - _$$ref.pointer, - _sel_indexOfObject_, - _$$ref$1.pointer, - ); - } - - /// indexOfObject:inRange: - DartNSUInteger indexOfObject$1( - objc.ObjCObject anObject, { - required NSRange inRange, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = anObject.ref; - return _objc_msgSend_zug4wi( - _$$ref.pointer, - _sel_indexOfObject_inRange_, - _$$ref$1.pointer, - inRange, - ); - } - - /// indexOfObject:inSortedRange:options:usingComparator: - DartNSUInteger indexOfObject$2( - objc.ObjCObject obj, { - required NSRange inSortedRange, - required DartNSUInteger options, - required objc.ObjCBlock< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ) - > - usingComparator, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = obj.ref; - final _$$ref$2 = usingComparator.ref; - objc.checkOsVersionInternal( - 'NSArray.indexOfObject:inSortedRange:options:usingComparator:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - return _objc_msgSend_kshx9d( - _$$ref.pointer, - _sel_indexOfObject_inSortedRange_options_usingComparator_, - _$$ref$1.pointer, - inSortedRange, - options, - _$$ref$2.pointer, + _sel_indexOfObject_inSortedRange_options_usingComparator_, + _$$ref$1.pointer, + inSortedRange, + options, + _$$ref$2.pointer, ); } @@ -8468,1523 +6674,1381 @@ extension NSExtendedArray on NSArray { } } -/// NSExtendedAttributedString -extension NSExtendedAttributedString on NSAttributedString { - /// attribute:atIndex:effectiveRange: - objc.ObjCObject? attribute( - NSString attrName, { - required DartNSUInteger atIndex, - required ffi.Pointer effectiveRange, - }) { +/// NSExtendedData +extension NSExtendedData on NSData { + /// description + NSString get description$1 { final _$$ref = object$.ref; - final _$$ref$1 = attrName.ref; - objc.checkOsVersionInternal( - 'NSAttributedString.attribute:atIndex:effectiveRange:', - iOS: (false, (3, 2, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_7km9vu( - _$$ref.pointer, - _sel_attribute_atIndex_effectiveRange_, - _$$ref$1.pointer, - atIndex, - effectiveRange, - ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_description); + return NSString.fromPointer($ret, retain: true, release: true); } - /// attribute:atIndex:longestEffectiveRange:inRange: - objc.ObjCObject? attribute$1( - NSString attrName, { - required DartNSUInteger atIndex, - required ffi.Pointer longestEffectiveRange, - required NSRange inRange, - }) { + /// enumerateByteRangesUsingBlock: + void enumerateByteRangesUsingBlock( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + > + block, + ) { final _$$ref = object$.ref; - final _$$ref$1 = attrName.ref; + final _$$ref$1 = block.ref; objc.checkOsVersionInternal( - 'NSAttributedString.attribute:atIndex:longestEffectiveRange:inRange:', - iOS: (false, (3, 2, 0)), - macOS: (false, (10, 0, 0)), + 'NSData.enumerateByteRangesUsingBlock:', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - final $ret = _objc_msgSend_1k1akuq( + _objc_msgSend_f167m6( _$$ref.pointer, - _sel_attribute_atIndex_longestEffectiveRange_inRange_, + _sel_enumerateByteRangesUsingBlock_, _$$ref$1.pointer, - atIndex, - longestEffectiveRange, - inRange, ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); } - /// attributedSubstringFromRange: - NSAttributedString attributedSubstringFromRange(NSRange range) { + /// getBytes:length: + void getBytes( + ffi.Pointer buffer, { + required DartNSUInteger length, + }) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSAttributedString.attributedSubstringFromRange:', - iOS: (false, (3, 2, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_1k1o1s7( - _$$ref.pointer, - _sel_attributedSubstringFromRange_, - range, - ); - return NSAttributedString.fromPointer($ret, retain: true, release: true); + _objc_msgSend_zuf90e(_$$ref.pointer, _sel_getBytes_length_, buffer, length); } - /// attributesAtIndex:longestEffectiveRange:inRange: - NSDictionary attributesAtIndex$1( - DartNSUInteger location, { - required ffi.Pointer longestEffectiveRange, - required NSRange inRange, - }) { + /// getBytes:range: + void getBytes$1(ffi.Pointer buffer, {required NSRange range}) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSAttributedString.attributesAtIndex:longestEffectiveRange:inRange:', - iOS: (false, (3, 2, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_1pp2gs8( - _$$ref.pointer, - _sel_attributesAtIndex_longestEffectiveRange_inRange_, - location, - longestEffectiveRange, - inRange, - ); - return NSDictionary.fromPointer($ret, retain: true, release: true); + _objc_msgSend_xpqfd7(_$$ref.pointer, _sel_getBytes_range_, buffer, range); } - /// enumerateAttribute:inRange:options:usingBlock: - void enumerateAttribute( - NSString attrName, { - required NSRange inRange, - required DartNSUInteger options, - required objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer?, - NSRange, - ffi.Pointer, - ) - > - usingBlock, - }) { + /// isEqualToData: + bool isEqualToData(NSData other) { final _$$ref = object$.ref; - final _$$ref$1 = attrName.ref; - final _$$ref$2 = usingBlock.ref; - objc.checkOsVersionInternal( - 'NSAttributedString.enumerateAttribute:inRange:options:usingBlock:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - _objc_msgSend_ipgwfh( + final _$$ref$1 = other.ref; + return _objc_msgSend_19nvye5( _$$ref.pointer, - _sel_enumerateAttribute_inRange_options_usingBlock_, + _sel_isEqualToData_, _$$ref$1.pointer, - inRange, - options, - _$$ref$2.pointer, ); } - /// enumerateAttributesInRange:options:usingBlock: - void enumerateAttributesInRange( - NSRange enumerationRange, { + /// rangeOfData:options:range: + NSRange rangeOfData( + NSData dataToFind, { required DartNSUInteger options, - required objc.ObjCBlock< - ffi.Void Function(NSDictionary, NSRange, ffi.Pointer) - > - usingBlock, + required NSRange range, }) { final _$$ref = object$.ref; - final _$$ref$1 = usingBlock.ref; + final _$$ref$1 = dataToFind.ref; objc.checkOsVersionInternal( - 'NSAttributedString.enumerateAttributesInRange:options:usingBlock:', + 'NSData.rangeOfData:options:range:', iOS: (false, (4, 0, 0)), macOS: (false, (10, 6, 0)), ); - _objc_msgSend_1kok4b( - _$$ref.pointer, - _sel_enumerateAttributesInRange_options_usingBlock_, - enumerationRange, - options, - _$$ref$1.pointer, + final $ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_1d8s65wStret( + $ptr, + _$$ref.pointer, + _sel_rangeOfData_options_range_, + _$$ref$1.pointer, + options, + range, + ) + : $ptr.ref = _objc_msgSend_1d8s65w( + _$$ref.pointer, + _sel_rangeOfData_options_range_, + _$$ref$1.pointer, + options, + range, + ); + final $finalizable = $ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree, ); + return ffi.Struct.create($finalizable); } - /// isEqualToAttributedString: - bool isEqualToAttributedString(NSAttributedString other) { + /// subdataWithRange: + NSData subdataWithRange(NSRange range) { final _$$ref = object$.ref; - final _$$ref$1 = other.ref; - objc.checkOsVersionInternal( - 'NSAttributedString.isEqualToAttributedString:', - iOS: (false, (3, 2, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_19nvye5( + final $ret = _objc_msgSend_1k1o1s7( _$$ref.pointer, - _sel_isEqualToAttributedString_, - _$$ref$1.pointer, - ); - } - - /// length - DartNSUInteger get length { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSAttributedString.length', - iOS: (false, (3, 2, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_length); - } -} - -/// NSExtendedCoder -extension NSExtendedCoder on NSCoder { - /// allowedClasses - NSSet? get allowedClasses { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSCoder.allowedClasses', - iOS: (false, (6, 0, 0)), - macOS: (false, (10, 8, 0)), + _sel_subdataWithRange_, + range, ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_allowedClasses); - return $ret.address == 0 - ? null - : NSSet.fromPointer($ret, retain: true, release: true); - } - - /// allowsKeyedCoding - bool get allowsKeyedCoding { - final _$$ref = object$.ref; - return _objc_msgSend_91o635(_$$ref.pointer, _sel_allowsKeyedCoding); + return NSData.fromPointer($ret, retain: true, release: true); } - /// containsValueForKey: - bool containsValueForKey(NSString key) { + /// writeToFile:atomically: + bool writeToFile(NSString path, {required bool atomically}) { final _$$ref = object$.ref; - final _$$ref$1 = key.ref; - return _objc_msgSend_19nvye5( + final _$$ref$1 = path.ref; + return _objc_msgSend_1iyq28l( _$$ref.pointer, - _sel_containsValueForKey_, + _sel_writeToFile_atomically_, _$$ref$1.pointer, + atomically, ); } - /// decodeArrayOfObjCType:count:at: - void decodeArrayOfObjCType( - ffi.Pointer itemType, { - required DartNSUInteger count, - required ffi.Pointer at, + /// writeToFile:options:error: + bool writeToFile$1( + NSString path, { + required DartNSUInteger options, + required ffi.Pointer> error, }) { final _$$ref = object$.ref; - _objc_msgSend_1lwwnes( + final _$$ref$1 = path.ref; + return _objc_msgSend_1xi08ar( _$$ref.pointer, - _sel_decodeArrayOfObjCType_count_at_, - itemType, - count, - at, + _sel_writeToFile_options_error_, + _$$ref$1.pointer, + options, + error, ); } - /// decodeArrayOfObjectsOfClass:forKey: - NSArray? decodeArrayOfObjectsOfClass( - objc.ObjCObject cls, { - required NSString forKey, - }) { + /// writeToURL:atomically: + bool writeToURL(NSURL url, {required bool atomically}) { final _$$ref = object$.ref; - final _$$ref$1 = cls.ref; - final _$$ref$2 = forKey.ref; - objc.checkOsVersionInternal( - 'NSCoder.decodeArrayOfObjectsOfClass:forKey:', - iOS: (false, (14, 0, 0)), - macOS: (false, (11, 0, 0)), - ); - final $ret = _objc_msgSend_15qeuct( + final _$$ref$1 = url.ref; + return _objc_msgSend_1iyq28l( _$$ref.pointer, - _sel_decodeArrayOfObjectsOfClass_forKey_, + _sel_writeToURL_atomically_, _$$ref$1.pointer, - _$$ref$2.pointer, + atomically, ); - return $ret.address == 0 - ? null - : NSArray.fromPointer($ret, retain: true, release: true); } - /// decodeArrayOfObjectsOfClasses:forKey: - NSArray? decodeArrayOfObjectsOfClasses( - NSSet classes, { - required NSString forKey, + /// writeToURL:options:error: + bool writeToURL$1( + NSURL url, { + required DartNSUInteger options, + required ffi.Pointer> error, }) { final _$$ref = object$.ref; - final _$$ref$1 = classes.ref; - final _$$ref$2 = forKey.ref; - objc.checkOsVersionInternal( - 'NSCoder.decodeArrayOfObjectsOfClasses:forKey:', - iOS: (false, (14, 0, 0)), - macOS: (false, (11, 0, 0)), - ); - final $ret = _objc_msgSend_15qeuct( + final _$$ref$1 = url.ref; + return _objc_msgSend_1xi08ar( _$$ref.pointer, - _sel_decodeArrayOfObjectsOfClasses_forKey_, + _sel_writeToURL_options_error_, _$$ref$1.pointer, - _$$ref$2.pointer, + options, + error, ); - return $ret.address == 0 - ? null - : NSArray.fromPointer($ret, retain: true, release: true); } +} - /// decodeBoolForKey: - bool decodeBoolForKey(NSString key) { +/// NSExtendedDate +extension NSExtendedDate on NSDate { + /// compare: + NSComparisonResult compare(NSDate other) { final _$$ref = object$.ref; - final _$$ref$1 = key.ref; - return _objc_msgSend_19nvye5( + final _$$ref$1 = other.ref; + final $ret = _objc_msgSend_1ym6zyw( _$$ref.pointer, - _sel_decodeBoolForKey_, + _sel_compare_, _$$ref$1.pointer, ); + return NSComparisonResult.fromValue($ret); } - /// decodeBytesForKey:minimumLength: - ffi.Pointer decodeBytesForKey( - NSString key, { - required DartNSUInteger minimumLength, - }) { + /// description + NSString get description$1 { final _$$ref = object$.ref; - final _$$ref$1 = key.ref; - objc.checkOsVersionInternal( - 'NSCoder.decodeBytesForKey:minimumLength:', - iOS: (false, (18, 4, 0)), - macOS: (false, (15, 4, 0)), - ); - return _objc_msgSend_nk32k5( - _$$ref.pointer, - _sel_decodeBytesForKey_minimumLength_, - _$$ref$1.pointer, - minimumLength, - ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_description); + return NSString.fromPointer($ret, retain: true, release: true); } - /// decodeBytesForKey:returnedLength: - ffi.Pointer decodeBytesForKey$1( - NSString key, { - required ffi.Pointer returnedLength, - }) { + /// descriptionWithLocale: + NSString descriptionWithLocale(objc.ObjCObject? locale) { final _$$ref = object$.ref; - final _$$ref$1 = key.ref; - return _objc_msgSend_1pvm3yv( + final _$$ref$1 = locale?.ref; + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_decodeBytesForKey_returnedLength_, - _$$ref$1.pointer, - returnedLength, + _sel_descriptionWithLocale_, + _$$ref$1?.pointer ?? ffi.nullptr, ); + return NSString.fromPointer($ret, retain: true, release: true); } - /// decodeBytesWithMinimumLength: - ffi.Pointer decodeBytesWithMinimumLength(DartNSUInteger length) { + /// earlierDate: + NSDate earlierDate(NSDate anotherDate) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSCoder.decodeBytesWithMinimumLength:', - iOS: (false, (18, 4, 0)), - macOS: (false, (15, 4, 0)), - ); - return _objc_msgSend_16bn854( + final _$$ref$1 = anotherDate.ref; + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_decodeBytesWithMinimumLength_, - length, + _sel_earlierDate_, + _$$ref$1.pointer, ); + return NSDate.fromPointer($ret, retain: true, release: true); } - /// decodeBytesWithReturnedLength: - ffi.Pointer decodeBytesWithReturnedLength( - ffi.Pointer lengthp, - ) { + /// isEqualToDate: + bool isEqualToDate(NSDate otherDate) { final _$$ref = object$.ref; - return _objc_msgSend_2p9qiq( + final _$$ref$1 = otherDate.ref; + return _objc_msgSend_19nvye5( _$$ref.pointer, - _sel_decodeBytesWithReturnedLength_, - lengthp, + _sel_isEqualToDate_, + _$$ref$1.pointer, ); } - /// decodeDictionaryWithKeysOfClass:objectsOfClass:forKey: - NSDictionary? decodeDictionaryWithKeysOfClass( - objc.ObjCObject keyCls, { - required objc.ObjCObject objectsOfClass, - required NSString forKey, - }) { + /// laterDate: + NSDate laterDate(NSDate anotherDate) { final _$$ref = object$.ref; - final _$$ref$1 = keyCls.ref; - final _$$ref$2 = objectsOfClass.ref; - final _$$ref$3 = forKey.ref; - objc.checkOsVersionInternal( - 'NSCoder.decodeDictionaryWithKeysOfClass:objectsOfClass:forKey:', - iOS: (false, (14, 0, 0)), - macOS: (false, (11, 0, 0)), - ); - final $ret = _objc_msgSend_11spmsz( + final _$$ref$1 = anotherDate.ref; + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_decodeDictionaryWithKeysOfClass_objectsOfClass_forKey_, + _sel_laterDate_, _$$ref$1.pointer, - _$$ref$2.pointer, - _$$ref$3.pointer, ); - return $ret.address == 0 - ? null - : NSDictionary.fromPointer($ret, retain: true, release: true); + return NSDate.fromPointer($ret, retain: true, release: true); } - /// decodeDictionaryWithKeysOfClasses:objectsOfClasses:forKey: - NSDictionary? decodeDictionaryWithKeysOfClasses( - NSSet keyClasses, { - required NSSet objectsOfClasses, - required NSString forKey, - }) { + /// timeIntervalSince1970 + double get timeIntervalSince1970 { final _$$ref = object$.ref; - final _$$ref$1 = keyClasses.ref; - final _$$ref$2 = objectsOfClasses.ref; - final _$$ref$3 = forKey.ref; - objc.checkOsVersionInternal( - 'NSCoder.decodeDictionaryWithKeysOfClasses:objectsOfClasses:forKey:', - iOS: (false, (14, 0, 0)), - macOS: (false, (11, 0, 0)), - ); - final $ret = _objc_msgSend_11spmsz( - _$$ref.pointer, - _sel_decodeDictionaryWithKeysOfClasses_objectsOfClasses_forKey_, - _$$ref$1.pointer, - _$$ref$2.pointer, - _$$ref$3.pointer, - ); - return $ret.address == 0 - ? null - : NSDictionary.fromPointer($ret, retain: true, release: true); + return objc.useMsgSendVariants + ? _objc_msgSend_1ukqyt8Fpret(_$$ref.pointer, _sel_timeIntervalSince1970) + : _objc_msgSend_1ukqyt8(_$$ref.pointer, _sel_timeIntervalSince1970); } - /// decodeDoubleForKey: - double decodeDoubleForKey(NSString key) { + /// timeIntervalSinceDate: + double timeIntervalSinceDate(NSDate anotherDate) { final _$$ref = object$.ref; - final _$$ref$1 = key.ref; + final _$$ref$1 = anotherDate.ref; return objc.useMsgSendVariants ? _objc_msgSend_mabicuFpret( _$$ref.pointer, - _sel_decodeDoubleForKey_, + _sel_timeIntervalSinceDate_, _$$ref$1.pointer, ) : _objc_msgSend_mabicu( _$$ref.pointer, - _sel_decodeDoubleForKey_, + _sel_timeIntervalSinceDate_, _$$ref$1.pointer, ); } - /// decodeFloatForKey: - double decodeFloatForKey(NSString key) { + /// timeIntervalSinceNow + double get timeIntervalSinceNow { final _$$ref = object$.ref; - final _$$ref$1 = key.ref; return objc.useMsgSendVariants - ? _objc_msgSend_g4ia9xFpret( - _$$ref.pointer, - _sel_decodeFloatForKey_, - _$$ref$1.pointer, + ? _objc_msgSend_1ukqyt8Fpret(_$$ref.pointer, _sel_timeIntervalSinceNow) + : _objc_msgSend_1ukqyt8(_$$ref.pointer, _sel_timeIntervalSinceNow); + } + + /// timeIntervalSinceReferenceDate + static double getTimeIntervalSinceReferenceDate$1() { + return objc.useMsgSendVariants + ? _objc_msgSend_1ukqyt8Fpret( + _class_NSDate, + _sel_timeIntervalSinceReferenceDate, ) - : _objc_msgSend_g4ia9x( - _$$ref.pointer, - _sel_decodeFloatForKey_, - _$$ref$1.pointer, + : _objc_msgSend_1ukqyt8( + _class_NSDate, + _sel_timeIntervalSinceReferenceDate, ); } +} + +/// NSExtendedDictionary +extension NSExtendedDictionary on NSDictionary { + /// allKeys + NSArray get allKeys { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_allKeys); + return NSArray.fromPointer($ret, retain: true, release: true); + } - /// decodeInt32ForKey: - int decodeInt32ForKey(NSString key) { + /// allKeysForObject: + NSArray allKeysForObject(objc.ObjCObject anObject) { final _$$ref = object$.ref; - final _$$ref$1 = key.ref; - return _objc_msgSend_fd28sq( + final _$$ref$1 = anObject.ref; + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_decodeInt32ForKey_, + _sel_allKeysForObject_, _$$ref$1.pointer, ); + return NSArray.fromPointer($ret, retain: true, release: true); } - /// decodeInt64ForKey: - int decodeInt64ForKey(NSString key) { + /// allValues + NSArray get allValues { final _$$ref = object$.ref; - final _$$ref$1 = key.ref; - return _objc_msgSend_1oj5o8z( - _$$ref.pointer, - _sel_decodeInt64ForKey_, - _$$ref$1.pointer, - ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_allValues); + return NSArray.fromPointer($ret, retain: true, release: true); } - /// decodeIntForKey: - int decodeIntForKey(NSString key) { + /// description + NSString get description$1 { final _$$ref = object$.ref; - final _$$ref$1 = key.ref; - return _objc_msgSend_hws22w( + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_description); + return NSString.fromPointer($ret, retain: true, release: true); + } + + /// descriptionInStringsFileFormat + NSString get descriptionInStringsFileFormat { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz( _$$ref.pointer, - _sel_decodeIntForKey_, - _$$ref$1.pointer, + _sel_descriptionInStringsFileFormat, ); + return NSString.fromPointer($ret, retain: true, release: true); } - /// decodeIntegerForKey: - int decodeIntegerForKey(NSString key) { + /// descriptionWithLocale: + NSString descriptionWithLocale(objc.ObjCObject? locale) { final _$$ref = object$.ref; - final _$$ref$1 = key.ref; - objc.checkOsVersionInternal( - 'NSCoder.decodeIntegerForKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - return _objc_msgSend_1r6ymhb( + final _$$ref$1 = locale?.ref; + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_decodeIntegerForKey_, - _$$ref$1.pointer, + _sel_descriptionWithLocale_, + _$$ref$1?.pointer ?? ffi.nullptr, ); + return NSString.fromPointer($ret, retain: true, release: true); } - /// decodeObject - objc.ObjCObject? decodeObject() { + /// descriptionWithLocale:indent: + NSString descriptionWithLocale$1( + objc.ObjCObject? locale, { + required DartNSUInteger indent, + }) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_decodeObject); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); + final _$$ref$1 = locale?.ref; + final $ret = _objc_msgSend_1k4kd9s( + _$$ref.pointer, + _sel_descriptionWithLocale_indent_, + _$$ref$1?.pointer ?? ffi.nullptr, + indent, + ); + return NSString.fromPointer($ret, retain: true, release: true); } - /// decodeObjectForKey: - objc.ObjCObject? decodeObjectForKey(NSString key) { + /// enumerateKeysAndObjectsUsingBlock: + void enumerateKeysAndObjectsUsingBlock( + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + block, + ) { final _$$ref = object$.ref; - final _$$ref$1 = key.ref; - final $ret = _objc_msgSend_1sotr3r( + final _$$ref$1 = block.ref; + objc.checkOsVersionInternal( + 'NSDictionary.enumerateKeysAndObjectsUsingBlock:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + _objc_msgSend_f167m6( _$$ref.pointer, - _sel_decodeObjectForKey_, + _sel_enumerateKeysAndObjectsUsingBlock_, _$$ref$1.pointer, ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); } - /// decodeObjectOfClass:forKey: - objc.ObjCObject? decodeObjectOfClass( - objc.ObjCObject aClass, { - required NSString forKey, + /// enumerateKeysAndObjectsWithOptions:usingBlock: + void enumerateKeysAndObjectsWithOptions( + DartNSUInteger opts, { + required objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + usingBlock, }) { final _$$ref = object$.ref; - final _$$ref$1 = aClass.ref; - final _$$ref$2 = forKey.ref; + final _$$ref$1 = usingBlock.ref; objc.checkOsVersionInternal( - 'NSCoder.decodeObjectOfClass:forKey:', - iOS: (false, (6, 0, 0)), - macOS: (false, (10, 8, 0)), + 'NSDictionary.enumerateKeysAndObjectsWithOptions:usingBlock:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - final $ret = _objc_msgSend_15qeuct( + _objc_msgSend_yx8yc6( _$$ref.pointer, - _sel_decodeObjectOfClass_forKey_, + _sel_enumerateKeysAndObjectsWithOptions_usingBlock_, + opts, _$$ref$1.pointer, - _$$ref$2.pointer, ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); } - /// decodeObjectOfClasses:forKey: - objc.ObjCObject? decodeObjectOfClasses( - NSSet? classes, { - required NSString forKey, + /// getObjects:andKeys:count: + void getObjects( + ffi.Pointer> objects, { + required ffi.Pointer> andKeys, + required DartNSUInteger count, }) { final _$$ref = object$.ref; - final _$$ref$1 = classes?.ref; - final _$$ref$2 = forKey.ref; objc.checkOsVersionInternal( - 'NSCoder.decodeObjectOfClasses:forKey:', - iOS: (false, (6, 0, 0)), - macOS: (false, (10, 8, 0)), + 'NSDictionary.getObjects:andKeys:count:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_15qeuct( + _objc_msgSend_n2svg2( _$$ref.pointer, - _sel_decodeObjectOfClasses_forKey_, - _$$ref$1?.pointer ?? ffi.nullptr, - _$$ref$2.pointer, + _sel_getObjects_andKeys_count_, + objects, + andKeys, + count, ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); } - /// decodePropertyList - objc.ObjCObject? decodePropertyList() { + /// isEqualToDictionary: + bool isEqualToDictionary(NSDictionary otherDictionary) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_decodePropertyList); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); + final _$$ref$1 = otherDictionary.ref; + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_isEqualToDictionary_, + _$$ref$1.pointer, + ); } - /// decodePropertyListForKey: - objc.ObjCObject? decodePropertyListForKey(NSString key) { + /// keysOfEntriesPassingTest: + NSSet keysOfEntriesPassingTest( + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + predicate, + ) { final _$$ref = object$.ref; - final _$$ref$1 = key.ref; + final _$$ref$1 = predicate.ref; objc.checkOsVersionInternal( - 'NSCoder.decodePropertyListForKey:', - iOS: (false, (6, 0, 0)), - macOS: (false, (10, 8, 0)), + 'NSDictionary.keysOfEntriesPassingTest:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - final $ret = _objc_msgSend_1sotr3r( + final $ret = _objc_msgSend_nnxkei( _$$ref.pointer, - _sel_decodePropertyListForKey_, + _sel_keysOfEntriesPassingTest_, _$$ref$1.pointer, ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); + return NSSet.fromPointer($ret, retain: true, release: true); } - /// decodeTopLevelObjectAndReturnError: - objc.ObjCObject? decodeTopLevelObjectAndReturnError() { + /// keysOfEntriesWithOptions:passingTest: + NSSet keysOfEntriesWithOptions( + DartNSUInteger opts, { + required objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + passingTest, + }) { final _$$ref = object$.ref; + final _$$ref$1 = passingTest.ref; objc.checkOsVersionInternal( - 'NSCoder.decodeTopLevelObjectAndReturnError:', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), - ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1w05pgk( - _$$ref.pointer, - _sel_decodeTopLevelObjectAndReturnError_, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); - } finally { - pkg_ffi.calloc.free($err); - } + 'NSDictionary.keysOfEntriesWithOptions:passingTest:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_13x5boi( + _$$ref.pointer, + _sel_keysOfEntriesWithOptions_passingTest_, + opts, + _$$ref$1.pointer, + ); + return NSSet.fromPointer($ret, retain: true, release: true); } - /// decodeTopLevelObjectForKey:error: - objc.ObjCObject? decodeTopLevelObjectForKey(NSString key) { + /// keysSortedByValueUsingComparator: + NSArray keysSortedByValueUsingComparator( + objc.ObjCBlock< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ) + > + cmptr, + ) { final _$$ref = object$.ref; - final _$$ref$1 = key.ref; + final _$$ref$1 = cmptr.ref; objc.checkOsVersionInternal( - 'NSCoder.decodeTopLevelObjectForKey:error:', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), + 'NSDictionary.keysSortedByValueUsingComparator:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1lhpu4m( - _$$ref.pointer, - _sel_decodeTopLevelObjectForKey_error_, - _$$ref$1.pointer, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); - } finally { - pkg_ffi.calloc.free($err); - } + final $ret = _objc_msgSend_nnxkei( + _$$ref.pointer, + _sel_keysSortedByValueUsingComparator_, + _$$ref$1.pointer, + ); + return NSArray.fromPointer($ret, retain: true, release: true); } - /// decodeTopLevelObjectOfClass:forKey:error: - objc.ObjCObject? decodeTopLevelObjectOfClass( - objc.ObjCObject aClass, { - required NSString forKey, + /// keysSortedByValueUsingSelector: + NSArray keysSortedByValueUsingSelector( + ffi.Pointer comparator, + ) { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_3ctkt6( + _$$ref.pointer, + _sel_keysSortedByValueUsingSelector_, + comparator, + ); + return NSArray.fromPointer($ret, retain: true, release: true); + } + + /// keysSortedByValueWithOptions:usingComparator: + NSArray keysSortedByValueWithOptions( + DartNSUInteger opts, { + required objc.ObjCBlock< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ) + > + usingComparator, }) { final _$$ref = object$.ref; - final _$$ref$1 = aClass.ref; - final _$$ref$2 = forKey.ref; + final _$$ref$1 = usingComparator.ref; objc.checkOsVersionInternal( - 'NSCoder.decodeTopLevelObjectOfClass:forKey:error:', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), + 'NSDictionary.keysSortedByValueWithOptions:usingComparator:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1pnyuds( - _$$ref.pointer, - _sel_decodeTopLevelObjectOfClass_forKey_error_, - _$$ref$1.pointer, - _$$ref$2.pointer, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); - } finally { - pkg_ffi.calloc.free($err); - } + final $ret = _objc_msgSend_1x5ew3h( + _$$ref.pointer, + _sel_keysSortedByValueWithOptions_usingComparator_, + opts, + _$$ref$1.pointer, + ); + return NSArray.fromPointer($ret, retain: true, release: true); } - /// decodeTopLevelObjectOfClasses:forKey:error: - objc.ObjCObject? decodeTopLevelObjectOfClasses( - NSSet? classes, { - required NSString forKey, + /// objectEnumerator + NSEnumerator objectEnumerator() { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_objectEnumerator); + return NSEnumerator.fromPointer($ret, retain: true, release: true); + } + + /// objectForKeyedSubscript: + objc.ObjCObject? objectForKeyedSubscript(objc.ObjCObject key) { + final _$$ref = object$.ref; + final _$$ref$1 = key.ref; + objc.checkOsVersionInternal( + 'NSDictionary.objectForKeyedSubscript:', + iOS: (false, (6, 0, 0)), + macOS: (false, (10, 8, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_objectForKeyedSubscript_, + _$$ref$1.pointer, + ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } + + /// objectsForKeys:notFoundMarker: + NSArray objectsForKeys( + NSArray keys, { + required objc.ObjCObject notFoundMarker, }) { final _$$ref = object$.ref; - final _$$ref$1 = classes?.ref; - final _$$ref$2 = forKey.ref; + final _$$ref$1 = keys.ref; + final _$$ref$2 = notFoundMarker.ref; + final $ret = _objc_msgSend_15qeuct( + _$$ref.pointer, + _sel_objectsForKeys_notFoundMarker_, + _$$ref$1.pointer, + _$$ref$2.pointer, + ); + return NSArray.fromPointer($ret, retain: true, release: true); + } + + /// writeToURL:error: + bool writeToURL(NSURL url) { + final _$$ref = object$.ref; + final _$$ref$1 = url.ref; objc.checkOsVersionInternal( - 'NSCoder.decodeTopLevelObjectOfClasses:forKey:error:', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), + 'NSDictionary.writeToURL:error:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), ); final $err = pkg_ffi.calloc>(); try { - final $ret = _objc_msgSend_1pnyuds( + final $ret = _objc_msgSend_l9p60w( _$$ref.pointer, - _sel_decodeTopLevelObjectOfClasses_forKey_error_, - _$$ref$1?.pointer ?? ffi.nullptr, - _$$ref$2.pointer, + _sel_writeToURL_error_, + _$$ref$1.pointer, $err, ); objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); + return $ret; } finally { pkg_ffi.calloc.free($err); } } +} - /// decodeValuesOfObjCTypes: - void decodeValuesOfObjCTypes(ffi.Pointer types) { +/// NSExtendedEnumerator +extension NSExtendedEnumerator on NSEnumerator { + /// allObjects + NSArray get allObjects { final _$$ref = object$.ref; - _objc_msgSend_1r7ue5f(_$$ref.pointer, _sel_decodeValuesOfObjCTypes_, types); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_allObjects); + return NSArray.fromPointer($ret, retain: true, release: true); } +} - /// decodingFailurePolicy - NSDecodingFailurePolicy get decodingFailurePolicy { +/// NSExtendedMutableArray +extension NSExtendedMutableArray on NSMutableArray { + /// addObjectsFromArray: + void addObjectsFromArray(NSArray otherArray) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSCoder.decodingFailurePolicy', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), - ); - final $ret = _objc_msgSend_dgx62p( + final _$$ref$1 = otherArray.ref; + _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_decodingFailurePolicy, + _sel_addObjectsFromArray_, + _$$ref$1.pointer, ); - return NSDecodingFailurePolicy.fromValue($ret); } - /// encodeArrayOfObjCType:count:at: - void encodeArrayOfObjCType( - ffi.Pointer type, { - required DartNSUInteger count, - required ffi.Pointer at, + /// exchangeObjectAtIndex:withObjectAtIndex: + void exchangeObjectAtIndex( + DartNSUInteger idx1, { + required DartNSUInteger withObjectAtIndex, }) { final _$$ref = object$.ref; - _objc_msgSend_1lwwnes( + _objc_msgSend_bfp043( _$$ref.pointer, - _sel_encodeArrayOfObjCType_count_at_, - type, - count, - at, + _sel_exchangeObjectAtIndex_withObjectAtIndex_, + idx1, + withObjectAtIndex, ); } - /// encodeBool:forKey: - void encodeBool(bool value, {required NSString forKey}) { + /// insertObjects:atIndexes: + void insertObjects(NSArray objects, {required NSIndexSet atIndexes}) { final _$$ref = object$.ref; - final _$$ref$1 = forKey.ref; - _objc_msgSend_hk7n97( + final _$$ref$1 = objects.ref; + final _$$ref$2 = atIndexes.ref; + _objc_msgSend_pfv6jd( _$$ref.pointer, - _sel_encodeBool_forKey_, - value, + _sel_insertObjects_atIndexes_, _$$ref$1.pointer, + _$$ref$2.pointer, ); } - /// encodeBycopyObject: - void encodeBycopyObject(objc.ObjCObject? anObject) { + /// removeAllObjects + void removeAllObjects() { + final _$$ref = object$.ref; + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_removeAllObjects); + } + + /// removeObject: + void removeObject(objc.ObjCObject anObject) { final _$$ref = object$.ref; - final _$$ref$1 = anObject?.ref; - _objc_msgSend_xtuoz7( + final _$$ref$1 = anObject.ref; + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_removeObject_, _$$ref$1.pointer); + } + + /// removeObject:inRange: + void removeObject$1(objc.ObjCObject anObject, {required NSRange inRange}) { + final _$$ref = object$.ref; + final _$$ref$1 = anObject.ref; + _objc_msgSend_1oteutl( _$$ref.pointer, - _sel_encodeBycopyObject_, - _$$ref$1?.pointer ?? ffi.nullptr, + _sel_removeObject_inRange_, + _$$ref$1.pointer, + inRange, ); } - /// encodeByrefObject: - void encodeByrefObject(objc.ObjCObject? anObject) { + /// removeObjectIdenticalTo: + void removeObjectIdenticalTo(objc.ObjCObject anObject) { final _$$ref = object$.ref; - final _$$ref$1 = anObject?.ref; + final _$$ref$1 = anObject.ref; _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_encodeByrefObject_, - _$$ref$1?.pointer ?? ffi.nullptr, + _sel_removeObjectIdenticalTo_, + _$$ref$1.pointer, ); } - /// encodeBytes:length: - void encodeBytes( - ffi.Pointer byteaddr, { - required DartNSUInteger length, + /// removeObjectIdenticalTo:inRange: + void removeObjectIdenticalTo$1( + objc.ObjCObject anObject, { + required NSRange inRange, }) { final _$$ref = object$.ref; - _objc_msgSend_zuf90e( + final _$$ref$1 = anObject.ref; + _objc_msgSend_1oteutl( _$$ref.pointer, - _sel_encodeBytes_length_, - byteaddr, - length, + _sel_removeObjectIdenticalTo_inRange_, + _$$ref$1.pointer, + inRange, ); } - /// encodeBytes:length:forKey: - void encodeBytes$1( - ffi.Pointer bytes, { - required DartNSUInteger length, - required NSString forKey, - }) { + /// removeObjectsAtIndexes: + void removeObjectsAtIndexes(NSIndexSet indexes) { final _$$ref = object$.ref; - final _$$ref$1 = forKey.ref; - _objc_msgSend_18flwjr( + final _$$ref$1 = indexes.ref; + _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_encodeBytes_length_forKey_, - bytes, - length, + _sel_removeObjectsAtIndexes_, _$$ref$1.pointer, ); } - /// encodeConditionalObject: - void encodeConditionalObject(objc.ObjCObject? object) { + /// removeObjectsInArray: + void removeObjectsInArray(NSArray otherArray) { final _$$ref = object$.ref; - final _$$ref$1 = object?.ref; + final _$$ref$1 = otherArray.ref; _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_encodeConditionalObject_, - _$$ref$1?.pointer ?? ffi.nullptr, + _sel_removeObjectsInArray_, + _$$ref$1.pointer, ); } - /// encodeConditionalObject:forKey: - void encodeConditionalObject$1( - objc.ObjCObject? object, { - required NSString forKey, + /// removeObjectsInRange: + void removeObjectsInRange(NSRange range) { + final _$$ref = object$.ref; + _objc_msgSend_1e3pm0z(_$$ref.pointer, _sel_removeObjectsInRange_, range); + } + + /// replaceObjectsAtIndexes:withObjects: + void replaceObjectsAtIndexes( + NSIndexSet indexes, { + required NSArray withObjects, }) { final _$$ref = object$.ref; - final _$$ref$1 = object?.ref; - final _$$ref$2 = forKey.ref; + final _$$ref$1 = indexes.ref; + final _$$ref$2 = withObjects.ref; _objc_msgSend_pfv6jd( _$$ref.pointer, - _sel_encodeConditionalObject_forKey_, - _$$ref$1?.pointer ?? ffi.nullptr, + _sel_replaceObjectsAtIndexes_withObjects_, + _$$ref$1.pointer, _$$ref$2.pointer, ); } - /// encodeDouble:forKey: - void encodeDouble(double value, {required NSString forKey}) { + /// replaceObjectsInRange:withObjectsFromArray: + void replaceObjectsInRange( + NSRange range, { + required NSArray withObjectsFromArray, + }) { final _$$ref = object$.ref; - final _$$ref$1 = forKey.ref; - _objc_msgSend_130mcug( + final _$$ref$1 = withObjectsFromArray.ref; + _objc_msgSend_1tv4uax( _$$ref.pointer, - _sel_encodeDouble_forKey_, - value, + _sel_replaceObjectsInRange_withObjectsFromArray_, + range, _$$ref$1.pointer, ); } - /// encodeFloat:forKey: - void encodeFloat(double value, {required NSString forKey}) { + /// replaceObjectsInRange:withObjectsFromArray:range: + void replaceObjectsInRange$1( + NSRange range, { + required NSArray withObjectsFromArray, + required NSRange range$1, + }) { final _$$ref = object$.ref; - final _$$ref$1 = forKey.ref; - _objc_msgSend_quo6mj( + final _$$ref$1 = withObjectsFromArray.ref; + _objc_msgSend_15bolr3( _$$ref.pointer, - _sel_encodeFloat_forKey_, - value, + _sel_replaceObjectsInRange_withObjectsFromArray_range_, + range, _$$ref$1.pointer, + range$1, ); } - /// encodeInt32:forKey: - void encodeInt32(int value, {required NSString forKey}) { + /// setArray: + void setArray(NSArray otherArray) { final _$$ref = object$.ref; - final _$$ref$1 = forKey.ref; - _objc_msgSend_lof6g0( + final _$$ref$1 = otherArray.ref; + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_setArray_, _$$ref$1.pointer); + } + + /// setObject:atIndexedSubscript: + void setObject( + objc.ObjCObject obj, { + required DartNSUInteger atIndexedSubscript, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = obj.ref; + objc.checkOsVersionInternal( + 'NSMutableArray.setObject:atIndexedSubscript:', + iOS: (false, (6, 0, 0)), + macOS: (false, (10, 8, 0)), + ); + _objc_msgSend_djsa9o( _$$ref.pointer, - _sel_encodeInt32_forKey_, - value, + _sel_setObject_atIndexedSubscript_, _$$ref$1.pointer, + atIndexedSubscript, ); } - /// encodeInt64:forKey: - void encodeInt64(int value, {required NSString forKey}) { + /// sortUsingComparator: + void sortUsingComparator( + objc.ObjCBlock< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ) + > + cmptr, + ) { final _$$ref = object$.ref; - final _$$ref$1 = forKey.ref; - _objc_msgSend_mpxix1( + final _$$ref$1 = cmptr.ref; + objc.checkOsVersionInternal( + 'NSMutableArray.sortUsingComparator:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + _objc_msgSend_f167m6( _$$ref.pointer, - _sel_encodeInt64_forKey_, - value, + _sel_sortUsingComparator_, _$$ref$1.pointer, ); } - /// encodeInt:forKey: - void encodeInt(int value, {required NSString forKey}) { + /// sortUsingFunction:context: + void sortUsingFunction( + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + > + compare, { + required ffi.Pointer context, + }) { final _$$ref = object$.ref; - final _$$ref$1 = forKey.ref; - _objc_msgSend_d8c3m2( + _objc_msgSend_1bvics1( _$$ref.pointer, - _sel_encodeInt_forKey_, - value, - _$$ref$1.pointer, + _sel_sortUsingFunction_context_, + compare, + context, ); } - /// encodeInteger:forKey: - void encodeInteger(int value, {required NSString forKey}) { + /// sortUsingSelector: + void sortUsingSelector(ffi.Pointer comparator) { final _$$ref = object$.ref; - final _$$ref$1 = forKey.ref; + _objc_msgSend_1d9e4oe(_$$ref.pointer, _sel_sortUsingSelector_, comparator); + } + + /// sortWithOptions:usingComparator: + void sortWithOptions( + DartNSUInteger opts, { + required objc.ObjCBlock< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ) + > + usingComparator, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = usingComparator.ref; objc.checkOsVersionInternal( - 'NSCoder.encodeInteger:forKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), + 'NSMutableArray.sortWithOptions:usingComparator:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - _objc_msgSend_1kva9v1( + _objc_msgSend_jjgvjt( _$$ref.pointer, - _sel_encodeInteger_forKey_, - value, + _sel_sortWithOptions_usingComparator_, + opts, _$$ref$1.pointer, ); } +} - /// encodeObject: - void encodeObject(objc.ObjCObject? object) { +/// NSExtendedMutableData +extension NSExtendedMutableData on NSMutableData { + /// appendBytes:length: + void appendBytes( + ffi.Pointer bytes, { + required DartNSUInteger length, + }) { final _$$ref = object$.ref; - final _$$ref$1 = object?.ref; - _objc_msgSend_xtuoz7( + _objc_msgSend_zuf90e( _$$ref.pointer, - _sel_encodeObject_, - _$$ref$1?.pointer ?? ffi.nullptr, + _sel_appendBytes_length_, + bytes, + length, ); } - /// encodeObject:forKey: - void encodeObject$1(objc.ObjCObject? object, {required NSString forKey}) { + /// appendData: + void appendData(NSData other) { final _$$ref = object$.ref; - final _$$ref$1 = object?.ref; - final _$$ref$2 = forKey.ref; - _objc_msgSend_pfv6jd( - _$$ref.pointer, - _sel_encodeObject_forKey_, - _$$ref$1?.pointer ?? ffi.nullptr, - _$$ref$2.pointer, - ); + final _$$ref$1 = other.ref; + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_appendData_, _$$ref$1.pointer); } - /// encodePropertyList: - void encodePropertyList(objc.ObjCObject aPropertyList) { + /// increaseLengthBy: + void increaseLengthBy(DartNSUInteger extraLength) { final _$$ref = object$.ref; - final _$$ref$1 = aPropertyList.ref; - _objc_msgSend_xtuoz7( + _objc_msgSend_1i9r4xy(_$$ref.pointer, _sel_increaseLengthBy_, extraLength); + } + + /// replaceBytesInRange:withBytes: + void replaceBytesInRange( + NSRange range, { + required ffi.Pointer withBytes, + }) { + final _$$ref = object$.ref; + _objc_msgSend_eh32gn( _$$ref.pointer, - _sel_encodePropertyList_, - _$$ref$1.pointer, + _sel_replaceBytesInRange_withBytes_, + range, + withBytes, ); } - /// encodeRootObject: - void encodeRootObject(objc.ObjCObject rootObject) { + /// replaceBytesInRange:withBytes:length: + void replaceBytesInRange$1( + NSRange range, { + required ffi.Pointer withBytes, + required DartNSUInteger length, + }) { final _$$ref = object$.ref; - final _$$ref$1 = rootObject.ref; - _objc_msgSend_xtuoz7( + _objc_msgSend_c0vg4w( _$$ref.pointer, - _sel_encodeRootObject_, - _$$ref$1.pointer, + _sel_replaceBytesInRange_withBytes_length_, + range, + withBytes, + length, ); } - /// encodeValuesOfObjCTypes: - void encodeValuesOfObjCTypes(ffi.Pointer types) { + /// resetBytesInRange: + void resetBytesInRange(NSRange range) { final _$$ref = object$.ref; - _objc_msgSend_1r7ue5f(_$$ref.pointer, _sel_encodeValuesOfObjCTypes_, types); + _objc_msgSend_1e3pm0z(_$$ref.pointer, _sel_resetBytesInRange_, range); } - /// error - NSError? get error { + /// setData: + void setData(NSData data) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSCoder.error', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_error); - return $ret.address == 0 - ? null - : NSError.fromPointer($ret, retain: true, release: true); + final _$$ref$1 = data.ref; + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_setData_, _$$ref$1.pointer); } +} - /// failWithError: - void failWithError(NSError error) { +/// NSExtendedMutableDictionary +extension NSExtendedMutableDictionary on NSMutableDictionary { + /// addEntriesFromDictionary: + void addEntriesFromDictionary(NSDictionary otherDictionary) { final _$$ref = object$.ref; - final _$$ref$1 = error.ref; - objc.checkOsVersionInternal( - 'NSCoder.failWithError:', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), + final _$$ref$1 = otherDictionary.ref; + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_addEntriesFromDictionary_, + _$$ref$1.pointer, ); - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_failWithError_, _$$ref$1.pointer); } - /// objectZone - ffi.Pointer objectZone() { + /// removeAllObjects + void removeAllObjects() { final _$$ref = object$.ref; - return _objc_msgSend_sz90oi(_$$ref.pointer, _sel_objectZone); + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_removeAllObjects); } - /// requiresSecureCoding - bool get requiresSecureCoding { + /// removeObjectsForKeys: + void removeObjectsForKeys(NSArray keyArray) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSCoder.requiresSecureCoding', - iOS: (false, (6, 0, 0)), - macOS: (false, (10, 8, 0)), + final _$$ref$1 = keyArray.ref; + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_removeObjectsForKeys_, + _$$ref$1.pointer, ); - return _objc_msgSend_91o635(_$$ref.pointer, _sel_requiresSecureCoding); } - /// setObjectZone: - void setObjectZone(ffi.Pointer zone) { + /// setDictionary: + void setDictionary(NSDictionary otherDictionary) { final _$$ref = object$.ref; - _objc_msgSend_1lonves(_$$ref.pointer, _sel_setObjectZone_, zone); + final _$$ref$1 = otherDictionary.ref; + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_setDictionary_, _$$ref$1.pointer); } - /// systemVersion - int get systemVersion { - final _$$ref = object$.ref; - return _objc_msgSend_3pyzne(_$$ref.pointer, _sel_systemVersion); - } -} - -/// NSExtendedData -extension NSExtendedData on NSData { - /// description - NSString get description$1 { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_description); - return NSString.fromPointer($ret, retain: true, release: true); - } - - /// enumerateByteRangesUsingBlock: - void enumerateByteRangesUsingBlock( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) - > - block, - ) { + /// setObject:forKeyedSubscript: + void setObject$1( + objc.ObjCObject? obj, { + required NSCopying forKeyedSubscript, + }) { final _$$ref = object$.ref; - final _$$ref$1 = block.ref; + final _$$ref$1 = obj?.ref; + final _$$ref$2 = forKeyedSubscript.ref; objc.checkOsVersionInternal( - 'NSData.enumerateByteRangesUsingBlock:', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), + 'NSMutableDictionary.setObject:forKeyedSubscript:', + iOS: (false, (6, 0, 0)), + macOS: (false, (10, 8, 0)), ); - _objc_msgSend_f167m6( + _objc_msgSend_pfv6jd( _$$ref.pointer, - _sel_enumerateByteRangesUsingBlock_, - _$$ref$1.pointer, + _sel_setObject_forKeyedSubscript_, + _$$ref$1?.pointer ?? ffi.nullptr, + _$$ref$2.pointer, ); } +} - /// getBytes:length: - void getBytes( - ffi.Pointer buffer, { - required DartNSUInteger length, - }) { - final _$$ref = object$.ref; - _objc_msgSend_zuf90e(_$$ref.pointer, _sel_getBytes_length_, buffer, length); - } - - /// getBytes:range: - void getBytes$1(ffi.Pointer buffer, {required NSRange range}) { - final _$$ref = object$.ref; - _objc_msgSend_xpqfd7(_$$ref.pointer, _sel_getBytes_range_, buffer, range); - } - - /// isEqualToData: - bool isEqualToData(NSData other) { +/// NSExtendedMutableOrderedSet +extension NSExtendedMutableOrderedSet on NSMutableOrderedSet { + /// addObject: + void addObject(objc.ObjCObject object) { final _$$ref = object$.ref; - final _$$ref$1 = other.ref; - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_isEqualToData_, - _$$ref$1.pointer, + final _$$ref$1 = object.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.addObject:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_addObject_, _$$ref$1.pointer); } - /// rangeOfData:options:range: - NSRange rangeOfData( - NSData dataToFind, { - required DartNSUInteger options, - required NSRange range, + /// addObjects:count: + void addObjects( + ffi.Pointer> objects, { + required DartNSUInteger count, }) { final _$$ref = object$.ref; - final _$$ref$1 = dataToFind.ref; objc.checkOsVersionInternal( - 'NSData.rangeOfData:options:range:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants - ? _objc_msgSend_1d8s65wStret( - $ptr, - _$$ref.pointer, - _sel_rangeOfData_options_range_, - _$$ref$1.pointer, - options, - range, - ) - : $ptr.ref = _objc_msgSend_1d8s65w( - _$$ref.pointer, - _sel_rangeOfData_options_range_, - _$$ref$1.pointer, - options, - range, - ); - final $finalizable = $ptr.cast().asTypedList( - ffi.sizeOf(), - finalizer: pkg_ffi.calloc.nativeFree, + 'NSMutableOrderedSet.addObjects:count:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - return ffi.Struct.create($finalizable); - } - - /// subdataWithRange: - NSData subdataWithRange(NSRange range) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_1k1o1s7( + _objc_msgSend_gcjqkl( _$$ref.pointer, - _sel_subdataWithRange_, - range, + _sel_addObjects_count_, + objects, + count, ); - return NSData.fromPointer($ret, retain: true, release: true); } - /// writeToFile:atomically: - bool writeToFile(NSString path, {required bool atomically}) { + /// addObjectsFromArray: + void addObjectsFromArray(NSArray array) { final _$$ref = object$.ref; - final _$$ref$1 = path.ref; - return _objc_msgSend_1iyq28l( + final _$$ref$1 = array.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.addObjectsFromArray:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_writeToFile_atomically_, + _sel_addObjectsFromArray_, _$$ref$1.pointer, - atomically, ); } - /// writeToFile:options:error: - bool writeToFile$1( - NSString path, { - required DartNSUInteger options, - required ffi.Pointer> error, + /// exchangeObjectAtIndex:withObjectAtIndex: + void exchangeObjectAtIndex( + DartNSUInteger idx1, { + required DartNSUInteger withObjectAtIndex, }) { final _$$ref = object$.ref; - final _$$ref$1 = path.ref; - return _objc_msgSend_1xi08ar( + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.exchangeObjectAtIndex:withObjectAtIndex:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_bfp043( _$$ref.pointer, - _sel_writeToFile_options_error_, - _$$ref$1.pointer, - options, - error, + _sel_exchangeObjectAtIndex_withObjectAtIndex_, + idx1, + withObjectAtIndex, ); } - /// writeToURL:atomically: - bool writeToURL(NSURL url, {required bool atomically}) { + /// insertObjects:atIndexes: + void insertObjects(NSArray objects, {required NSIndexSet atIndexes}) { final _$$ref = object$.ref; - final _$$ref$1 = url.ref; - return _objc_msgSend_1iyq28l( + final _$$ref$1 = objects.ref; + final _$$ref$2 = atIndexes.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.insertObjects:atIndexes:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_pfv6jd( _$$ref.pointer, - _sel_writeToURL_atomically_, + _sel_insertObjects_atIndexes_, _$$ref$1.pointer, - atomically, + _$$ref$2.pointer, ); } - /// writeToURL:options:error: - bool writeToURL$1( - NSURL url, { - required DartNSUInteger options, - required ffi.Pointer> error, - }) { + /// intersectOrderedSet: + void intersectOrderedSet(NSOrderedSet other) { final _$$ref = object$.ref; - final _$$ref$1 = url.ref; - return _objc_msgSend_1xi08ar( + final _$$ref$1 = other.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.intersectOrderedSet:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_writeToURL_options_error_, + _sel_intersectOrderedSet_, _$$ref$1.pointer, - options, - error, ); } -} -/// NSExtendedDate -extension NSExtendedDate on NSDate { - /// addTimeInterval: - @Deprecated('Use dateByAddingTimeInterval instead') - objc.ObjCObject addTimeInterval(double seconds) { + /// intersectSet: + void intersectSet(NSSet other) { final _$$ref = object$.ref; + final _$$ref$1 = other.ref; objc.checkOsVersionInternal( - 'NSDate.addTimeInterval:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_oa8mke( - _$$ref.pointer, - _sel_addTimeInterval_, - seconds, + 'NSMutableOrderedSet.intersectSet:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - return objc.ObjCObject($ret, retain: true, release: true); + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_intersectSet_, _$$ref$1.pointer); } - /// compare: - NSComparisonResult compare(NSDate other) { + /// minusOrderedSet: + void minusOrderedSet(NSOrderedSet other) { final _$$ref = object$.ref; final _$$ref$1 = other.ref; - final $ret = _objc_msgSend_1ym6zyw( + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.minusOrderedSet:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_compare_, + _sel_minusOrderedSet_, _$$ref$1.pointer, ); - return NSComparisonResult.fromValue($ret); } - /// description - NSString get description$1 { + /// minusSet: + void minusSet(NSSet other) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_description); - return NSString.fromPointer($ret, retain: true, release: true); + final _$$ref$1 = other.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.minusSet:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_minusSet_, _$$ref$1.pointer); } - /// descriptionWithLocale: - NSString descriptionWithLocale(objc.ObjCObject? locale) { + /// moveObjectsAtIndexes:toIndex: + void moveObjectsAtIndexes( + NSIndexSet indexes, { + required DartNSUInteger toIndex, + }) { final _$$ref = object$.ref; - final _$$ref$1 = locale?.ref; - final $ret = _objc_msgSend_1sotr3r( + final _$$ref$1 = indexes.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.moveObjectsAtIndexes:toIndex:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_djsa9o( _$$ref.pointer, - _sel_descriptionWithLocale_, - _$$ref$1?.pointer ?? ffi.nullptr, + _sel_moveObjectsAtIndexes_toIndex_, + _$$ref$1.pointer, + toIndex, ); - return NSString.fromPointer($ret, retain: true, release: true); } - /// earlierDate: - NSDate earlierDate(NSDate anotherDate) { + /// removeAllObjects + void removeAllObjects() { final _$$ref = object$.ref; - final _$$ref$1 = anotherDate.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_earlierDate_, - _$$ref$1.pointer, + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.removeAllObjects', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - return NSDate.fromPointer($ret, retain: true, release: true); + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_removeAllObjects); } - /// isEqualToDate: - bool isEqualToDate(NSDate otherDate) { + /// removeObject: + void removeObject(objc.ObjCObject object) { final _$$ref = object$.ref; - final _$$ref$1 = otherDate.ref; - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_isEqualToDate_, - _$$ref$1.pointer, + final _$$ref$1 = object.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.removeObject:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_removeObject_, _$$ref$1.pointer); } - /// laterDate: - NSDate laterDate(NSDate anotherDate) { + /// removeObjectsAtIndexes: + void removeObjectsAtIndexes(NSIndexSet indexes) { final _$$ref = object$.ref; - final _$$ref$1 = anotherDate.ref; - final $ret = _objc_msgSend_1sotr3r( + final _$$ref$1 = indexes.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.removeObjectsAtIndexes:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_laterDate_, + _sel_removeObjectsAtIndexes_, _$$ref$1.pointer, ); - return NSDate.fromPointer($ret, retain: true, release: true); - } - - /// timeIntervalSince1970 - double get timeIntervalSince1970 { - final _$$ref = object$.ref; - return objc.useMsgSendVariants - ? _objc_msgSend_1ukqyt8Fpret(_$$ref.pointer, _sel_timeIntervalSince1970) - : _objc_msgSend_1ukqyt8(_$$ref.pointer, _sel_timeIntervalSince1970); } - /// timeIntervalSinceDate: - double timeIntervalSinceDate(NSDate anotherDate) { - final _$$ref = object$.ref; - final _$$ref$1 = anotherDate.ref; - return objc.useMsgSendVariants - ? _objc_msgSend_mabicuFpret( - _$$ref.pointer, - _sel_timeIntervalSinceDate_, - _$$ref$1.pointer, - ) - : _objc_msgSend_mabicu( - _$$ref.pointer, - _sel_timeIntervalSinceDate_, - _$$ref$1.pointer, - ); - } - - /// timeIntervalSinceNow - double get timeIntervalSinceNow { - final _$$ref = object$.ref; - return objc.useMsgSendVariants - ? _objc_msgSend_1ukqyt8Fpret(_$$ref.pointer, _sel_timeIntervalSinceNow) - : _objc_msgSend_1ukqyt8(_$$ref.pointer, _sel_timeIntervalSinceNow); - } - - /// timeIntervalSinceReferenceDate - static double getTimeIntervalSinceReferenceDate$1() { - return objc.useMsgSendVariants - ? _objc_msgSend_1ukqyt8Fpret( - _class_NSDate, - _sel_timeIntervalSinceReferenceDate, - ) - : _objc_msgSend_1ukqyt8( - _class_NSDate, - _sel_timeIntervalSinceReferenceDate, - ); - } -} - -/// NSExtendedDictionary -extension NSExtendedDictionary on NSDictionary { - /// allKeys - NSArray get allKeys { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_allKeys); - return NSArray.fromPointer($ret, retain: true, release: true); - } - - /// allKeysForObject: - NSArray allKeysForObject(objc.ObjCObject anObject) { + /// removeObjectsInArray: + void removeObjectsInArray(NSArray array) { final _$$ref = object$.ref; - final _$$ref$1 = anObject.ref; - final $ret = _objc_msgSend_1sotr3r( + final _$$ref$1 = array.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.removeObjectsInArray:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_allKeysForObject_, + _sel_removeObjectsInArray_, _$$ref$1.pointer, ); - return NSArray.fromPointer($ret, retain: true, release: true); } - /// allValues - NSArray get allValues { + /// removeObjectsInRange: + void removeObjectsInRange(NSRange range) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_allValues); - return NSArray.fromPointer($ret, retain: true, release: true); + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.removeObjectsInRange:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_1e3pm0z(_$$ref.pointer, _sel_removeObjectsInRange_, range); } - /// description - NSString get description$1 { + /// replaceObjectsAtIndexes:withObjects: + void replaceObjectsAtIndexes( + NSIndexSet indexes, { + required NSArray withObjects, + }) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_description); - return NSString.fromPointer($ret, retain: true, release: true); + final _$$ref$1 = indexes.ref; + final _$$ref$2 = withObjects.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.replaceObjectsAtIndexes:withObjects:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_pfv6jd( + _$$ref.pointer, + _sel_replaceObjectsAtIndexes_withObjects_, + _$$ref$1.pointer, + _$$ref$2.pointer, + ); } - /// descriptionInStringsFileFormat - NSString get descriptionInStringsFileFormat { + /// replaceObjectsInRange:withObjects:count: + void replaceObjectsInRange( + NSRange range, { + required ffi.Pointer> withObjects, + required DartNSUInteger count, + }) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz( + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.replaceObjectsInRange:withObjects:count:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_122v0cv( _$$ref.pointer, - _sel_descriptionInStringsFileFormat, + _sel_replaceObjectsInRange_withObjects_count_, + range, + withObjects, + count, ); - return NSString.fromPointer($ret, retain: true, release: true); } - /// descriptionWithLocale: - NSString descriptionWithLocale(objc.ObjCObject? locale) { + /// setObject:atIndex: + void setObject(objc.ObjCObject obj, {required DartNSUInteger atIndex}) { final _$$ref = object$.ref; - final _$$ref$1 = locale?.ref; - final $ret = _objc_msgSend_1sotr3r( + final _$$ref$1 = obj.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.setObject:atIndex:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + _objc_msgSend_djsa9o( _$$ref.pointer, - _sel_descriptionWithLocale_, - _$$ref$1?.pointer ?? ffi.nullptr, + _sel_setObject_atIndex_, + _$$ref$1.pointer, + atIndex, ); - return NSString.fromPointer($ret, retain: true, release: true); } - /// descriptionWithLocale:indent: - NSString descriptionWithLocale$1( - objc.ObjCObject? locale, { - required DartNSUInteger indent, + /// setObject:atIndexedSubscript: + void setObject$1( + objc.ObjCObject obj, { + required DartNSUInteger atIndexedSubscript, }) { final _$$ref = object$.ref; - final _$$ref$1 = locale?.ref; - final $ret = _objc_msgSend_1k4kd9s( + final _$$ref$1 = obj.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.setObject:atIndexedSubscript:', + iOS: (false, (6, 0, 0)), + macOS: (false, (10, 8, 0)), + ); + _objc_msgSend_djsa9o( _$$ref.pointer, - _sel_descriptionWithLocale_indent_, - _$$ref$1?.pointer ?? ffi.nullptr, - indent, + _sel_setObject_atIndexedSubscript_, + _$$ref$1.pointer, + atIndexedSubscript, ); - return NSString.fromPointer($ret, retain: true, release: true); } - /// enumerateKeysAndObjectsUsingBlock: - void enumerateKeysAndObjectsUsingBlock( - objc.ObjCBlock< - ffi.Void Function( + /// sortRange:options:usingComparator: + void sortRange( + NSRange range, { + required DartNSUInteger options, + required objc.ObjCBlock< + ffi.Long Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, ) > - block, - ) { + usingComparator, + }) { final _$$ref = object$.ref; - final _$$ref$1 = block.ref; + final _$$ref$1 = usingComparator.ref; objc.checkOsVersionInternal( - 'NSDictionary.enumerateKeysAndObjectsUsingBlock:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSMutableOrderedSet.sortRange:options:usingComparator:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - _objc_msgSend_f167m6( + _objc_msgSend_arew0j( _$$ref.pointer, - _sel_enumerateKeysAndObjectsUsingBlock_, + _sel_sortRange_options_usingComparator_, + range, + options, _$$ref$1.pointer, ); } - /// enumerateKeysAndObjectsWithOptions:usingBlock: - void enumerateKeysAndObjectsWithOptions( - DartNSUInteger opts, { - required objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - usingBlock, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = usingBlock.ref; - objc.checkOsVersionInternal( - 'NSDictionary.enumerateKeysAndObjectsWithOptions:usingBlock:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - _objc_msgSend_yx8yc6( - _$$ref.pointer, - _sel_enumerateKeysAndObjectsWithOptions_usingBlock_, - opts, - _$$ref$1.pointer, - ); - } - - /// getObjects:andKeys:count: - void getObjects( - ffi.Pointer> objects, { - required ffi.Pointer> andKeys, - required DartNSUInteger count, - }) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSDictionary.getObjects:andKeys:count:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_n2svg2( - _$$ref.pointer, - _sel_getObjects_andKeys_count_, - objects, - andKeys, - count, - ); - } - - /// isEqualToDictionary: - bool isEqualToDictionary(NSDictionary otherDictionary) { - final _$$ref = object$.ref; - final _$$ref$1 = otherDictionary.ref; - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_isEqualToDictionary_, - _$$ref$1.pointer, - ); - } - - /// keysOfEntriesPassingTest: - NSSet keysOfEntriesPassingTest( - objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - predicate, - ) { - final _$$ref = object$.ref; - final _$$ref$1 = predicate.ref; - objc.checkOsVersionInternal( - 'NSDictionary.keysOfEntriesPassingTest:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_nnxkei( - _$$ref.pointer, - _sel_keysOfEntriesPassingTest_, - _$$ref$1.pointer, - ); - return NSSet.fromPointer($ret, retain: true, release: true); - } - - /// keysOfEntriesWithOptions:passingTest: - NSSet keysOfEntriesWithOptions( - DartNSUInteger opts, { - required objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - passingTest, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = passingTest.ref; - objc.checkOsVersionInternal( - 'NSDictionary.keysOfEntriesWithOptions:passingTest:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_13x5boi( - _$$ref.pointer, - _sel_keysOfEntriesWithOptions_passingTest_, - opts, - _$$ref$1.pointer, - ); - return NSSet.fromPointer($ret, retain: true, release: true); - } - - /// keysSortedByValueUsingComparator: - NSArray keysSortedByValueUsingComparator( + /// sortUsingComparator: + void sortUsingComparator( objc.ObjCBlock< ffi.Long Function( ffi.Pointer, @@ -9996,33 +8060,19 @@ extension NSExtendedDictionary on NSDictionary { final _$$ref = object$.ref; final _$$ref$1 = cmptr.ref; objc.checkOsVersionInternal( - 'NSDictionary.keysSortedByValueUsingComparator:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSMutableOrderedSet.sortUsingComparator:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_nnxkei( + _objc_msgSend_f167m6( _$$ref.pointer, - _sel_keysSortedByValueUsingComparator_, + _sel_sortUsingComparator_, _$$ref$1.pointer, ); - return NSArray.fromPointer($ret, retain: true, release: true); - } - - /// keysSortedByValueUsingSelector: - NSArray keysSortedByValueUsingSelector( - ffi.Pointer comparator, - ) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_3ctkt6( - _$$ref.pointer, - _sel_keysSortedByValueUsingSelector_, - comparator, - ); - return NSArray.fromPointer($ret, retain: true, release: true); } - /// keysSortedByValueWithOptions:usingComparator: - NSArray keysSortedByValueWithOptions( + /// sortWithOptions:usingComparator: + void sortWithOptions( DartNSUInteger opts, { required objc.ObjCBlock< ffi.Long Function( @@ -10035,752 +8085,663 @@ extension NSExtendedDictionary on NSDictionary { final _$$ref = object$.ref; final _$$ref$1 = usingComparator.ref; objc.checkOsVersionInternal( - 'NSDictionary.keysSortedByValueWithOptions:usingComparator:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSMutableOrderedSet.sortWithOptions:usingComparator:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_1x5ew3h( + _objc_msgSend_jjgvjt( _$$ref.pointer, - _sel_keysSortedByValueWithOptions_usingComparator_, + _sel_sortWithOptions_usingComparator_, opts, _$$ref$1.pointer, ); - return NSArray.fromPointer($ret, retain: true, release: true); - } - - /// objectEnumerator - NSEnumerator objectEnumerator() { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_objectEnumerator); - return NSEnumerator.fromPointer($ret, retain: true, release: true); } - /// objectForKeyedSubscript: - objc.ObjCObject? objectForKeyedSubscript(objc.ObjCObject key) { + /// unionOrderedSet: + void unionOrderedSet(NSOrderedSet other) { final _$$ref = object$.ref; - final _$$ref$1 = key.ref; + final _$$ref$1 = other.ref; objc.checkOsVersionInternal( - 'NSDictionary.objectForKeyedSubscript:', - iOS: (false, (6, 0, 0)), - macOS: (false, (10, 8, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_objectForKeyedSubscript_, - _$$ref$1.pointer, + 'NSMutableOrderedSet.unionOrderedSet:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); - } - - /// objectsForKeys:notFoundMarker: - NSArray objectsForKeys( - NSArray keys, { - required objc.ObjCObject notFoundMarker, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = keys.ref; - final _$$ref$2 = notFoundMarker.ref; - final $ret = _objc_msgSend_15qeuct( + _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_objectsForKeys_notFoundMarker_, + _sel_unionOrderedSet_, _$$ref$1.pointer, - _$$ref$2.pointer, ); - return NSArray.fromPointer($ret, retain: true, release: true); } - /// writeToURL:error: - bool writeToURL(NSURL url) { + /// unionSet: + void unionSet(NSSet other) { final _$$ref = object$.ref; - final _$$ref$1 = url.ref; + final _$$ref$1 = other.ref; objc.checkOsVersionInternal( - 'NSDictionary.writeToURL:error:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + 'NSMutableOrderedSet.unionSet:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_l9p60w( - _$$ref.pointer, - _sel_writeToURL_error_, - _$$ref$1.pointer, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret; - } finally { - pkg_ffi.calloc.free($err); - } - } -} - -/// NSExtendedEnumerator -extension NSExtendedEnumerator on NSEnumerator { - /// allObjects - NSArray get allObjects { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_allObjects); - return NSArray.fromPointer($ret, retain: true, release: true); + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_unionSet_, _$$ref$1.pointer); } } -/// NSExtendedLocale -extension NSExtendedLocale on NSLocale { - /// alternateQuotationBeginDelimiter - NSString get alternateQuotationBeginDelimiter { +/// NSExtendedMutableSet +extension NSExtendedMutableSet on NSMutableSet { + /// addObjectsFromArray: + void addObjectsFromArray(NSArray array) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSLocale.alternateQuotationBeginDelimiter', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), - ); - final $ret = _objc_msgSend_151sglz( + final _$$ref$1 = array.ref; + _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_alternateQuotationBeginDelimiter, + _sel_addObjectsFromArray_, + _$$ref$1.pointer, ); - return NSString.fromPointer($ret, retain: true, release: true); } - /// alternateQuotationEndDelimiter - NSString get alternateQuotationEndDelimiter { + /// intersectSet: + void intersectSet(NSSet otherSet) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSLocale.alternateQuotationEndDelimiter', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_alternateQuotationEndDelimiter, - ); - return NSString.fromPointer($ret, retain: true, release: true); + final _$$ref$1 = otherSet.ref; + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_intersectSet_, _$$ref$1.pointer); } - /// calendarIdentifier - NSString get calendarIdentifier { + /// minusSet: + void minusSet(NSSet otherSet) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSLocale.calendarIdentifier', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_calendarIdentifier); - return NSString.fromPointer($ret, retain: true, release: true); + final _$$ref$1 = otherSet.ref; + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_minusSet_, _$$ref$1.pointer); } - /// collationIdentifier - NSString? get collationIdentifier { + /// removeAllObjects + void removeAllObjects() { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSLocale.collationIdentifier', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_collationIdentifier, - ); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_removeAllObjects); } - /// collatorIdentifier - NSString get collatorIdentifier { + /// setSet: + void setSet(NSSet otherSet) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSLocale.collatorIdentifier', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_collatorIdentifier); - return NSString.fromPointer($ret, retain: true, release: true); + final _$$ref$1 = otherSet.ref; + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_setSet_, _$$ref$1.pointer); } - /// countryCode - @Deprecated('Deprecated') - NSString? get countryCode { + /// unionSet: + void unionSet(NSSet otherSet) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSLocale.countryCode', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_countryCode); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); + final _$$ref$1 = otherSet.ref; + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_unionSet_, _$$ref$1.pointer); } +} - /// currencyCode - NSString? get currencyCode { +/// NSExtendedOrderedSet +extension NSExtendedOrderedSet on NSOrderedSet { + /// array + NSArray get array { final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSLocale.currencyCode', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), + 'NSOrderedSet.array', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_currencyCode); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_array); + return NSArray.fromPointer($ret, retain: true, release: true); } - /// currencySymbol - NSString get currencySymbol { + /// containsObject: + bool containsObject(objc.ObjCObject object) { final _$$ref = object$.ref; + final _$$ref$1 = object.ref; objc.checkOsVersionInternal( - 'NSLocale.currencySymbol', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), + 'NSOrderedSet.containsObject:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_containsObject_, + _$$ref$1.pointer, ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_currencySymbol); - return NSString.fromPointer($ret, retain: true, release: true); } - /// decimalSeparator - NSString get decimalSeparator { + /// description + NSString get description$1 { final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSLocale.decimalSeparator', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), + 'NSOrderedSet.description', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_decimalSeparator); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_description); return NSString.fromPointer($ret, retain: true, release: true); } - /// exemplarCharacterSet - NSCharacterSet get exemplarCharacterSet { + /// descriptionWithLocale: + NSString descriptionWithLocale(objc.ObjCObject? locale) { final _$$ref = object$.ref; + final _$$ref$1 = locale?.ref; objc.checkOsVersionInternal( - 'NSLocale.exemplarCharacterSet', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), + 'NSOrderedSet.descriptionWithLocale:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_151sglz( + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_exemplarCharacterSet, - ); - return NSCharacterSet.fromPointer($ret, retain: true, release: true); - } - - /// groupingSeparator - NSString get groupingSeparator { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSLocale.groupingSeparator', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), + _sel_descriptionWithLocale_, + _$$ref$1?.pointer ?? ffi.nullptr, ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_groupingSeparator); return NSString.fromPointer($ret, retain: true, release: true); } - /// languageCode - NSString get languageCode { + /// descriptionWithLocale:indent: + NSString descriptionWithLocale$1( + objc.ObjCObject? locale, { + required DartNSUInteger indent, + }) { final _$$ref = object$.ref; + final _$$ref$1 = locale?.ref; objc.checkOsVersionInternal( - 'NSLocale.languageCode', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), + 'NSOrderedSet.descriptionWithLocale:indent:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_languageCode); - return NSString.fromPointer($ret, retain: true, release: true); - } - - /// languageIdentifier - NSString get languageIdentifier { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSLocale.languageIdentifier', - iOS: (false, (17, 0, 0)), - macOS: (false, (14, 0, 0)), + final $ret = _objc_msgSend_1k4kd9s( + _$$ref.pointer, + _sel_descriptionWithLocale_indent_, + _$$ref$1?.pointer ?? ffi.nullptr, + indent, ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_languageIdentifier); - return NSString.fromPointer($ret, retain: true, release: true); - } - - /// localeIdentifier - NSString get localeIdentifier { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_localeIdentifier); return NSString.fromPointer($ret, retain: true, release: true); } - /// localizedStringForCalendarIdentifier: - NSString? localizedStringForCalendarIdentifier(NSString calendarIdentifier) { + /// enumerateObjectsAtIndexes:options:usingBlock: + void enumerateObjectsAtIndexes( + NSIndexSet s, { + required DartNSUInteger options, + required objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) + > + usingBlock, + }) { final _$$ref = object$.ref; - final _$$ref$1 = calendarIdentifier.ref; + final _$$ref$1 = s.ref; + final _$$ref$2 = usingBlock.ref; objc.checkOsVersionInternal( - 'NSLocale.localizedStringForCalendarIdentifier:', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), + 'NSOrderedSet.enumerateObjectsAtIndexes:options:usingBlock:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_1sotr3r( + _objc_msgSend_a3wp08( _$$ref.pointer, - _sel_localizedStringForCalendarIdentifier_, + _sel_enumerateObjectsAtIndexes_options_usingBlock_, _$$ref$1.pointer, + options, + _$$ref$2.pointer, ); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); } - /// localizedStringForCollationIdentifier: - NSString? localizedStringForCollationIdentifier( - NSString collationIdentifier, + /// enumerateObjectsUsingBlock: + void enumerateObjectsUsingBlock( + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) + > + block, ) { final _$$ref = object$.ref; - final _$$ref$1 = collationIdentifier.ref; + final _$$ref$1 = block.ref; objc.checkOsVersionInternal( - 'NSLocale.localizedStringForCollationIdentifier:', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), + 'NSOrderedSet.enumerateObjectsUsingBlock:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_1sotr3r( + _objc_msgSend_f167m6( _$$ref.pointer, - _sel_localizedStringForCollationIdentifier_, + _sel_enumerateObjectsUsingBlock_, _$$ref$1.pointer, ); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); } - /// localizedStringForCollatorIdentifier: - NSString? localizedStringForCollatorIdentifier(NSString collatorIdentifier) { + /// enumerateObjectsWithOptions:usingBlock: + void enumerateObjectsWithOptions( + DartNSUInteger opts, { + required objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) + > + usingBlock, + }) { final _$$ref = object$.ref; - final _$$ref$1 = collatorIdentifier.ref; + final _$$ref$1 = usingBlock.ref; objc.checkOsVersionInternal( - 'NSLocale.localizedStringForCollatorIdentifier:', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), + 'NSOrderedSet.enumerateObjectsWithOptions:usingBlock:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_1sotr3r( + _objc_msgSend_yx8yc6( _$$ref.pointer, - _sel_localizedStringForCollatorIdentifier_, + _sel_enumerateObjectsWithOptions_usingBlock_, + opts, _$$ref$1.pointer, ); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); } - /// localizedStringForCountryCode: - NSString? localizedStringForCountryCode(NSString countryCode) { + /// firstObject + objc.ObjCObject? get firstObject { final _$$ref = object$.ref; - final _$$ref$1 = countryCode.ref; objc.checkOsVersionInternal( - 'NSLocale.localizedStringForCountryCode:', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_localizedStringForCountryCode_, - _$$ref$1.pointer, + 'NSOrderedSet.firstObject', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_firstObject); return $ret.address == 0 ? null - : NSString.fromPointer($ret, retain: true, release: true); + : objc.ObjCObject($ret, retain: true, release: true); } - /// localizedStringForCurrencyCode: - NSString? localizedStringForCurrencyCode(NSString currencyCode) { + /// getObjects:range: + void getObjects( + ffi.Pointer> objects, { + required NSRange range, + }) { final _$$ref = object$.ref; - final _$$ref$1 = currencyCode.ref; - objc.checkOsVersionInternal( - 'NSLocale.localizedStringForCurrencyCode:', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( + _objc_msgSend_o16d3k( _$$ref.pointer, - _sel_localizedStringForCurrencyCode_, - _$$ref$1.pointer, + _sel_getObjects_range_, + objects, + range, ); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); } - /// localizedStringForLanguageCode: - NSString? localizedStringForLanguageCode(NSString languageCode) { + /// indexOfObject:inSortedRange:options:usingComparator: + DartNSUInteger indexOfObject$1( + objc.ObjCObject object, { + required NSRange inSortedRange, + required DartNSUInteger options, + required objc.ObjCBlock< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ) + > + usingComparator, + }) { final _$$ref = object$.ref; - final _$$ref$1 = languageCode.ref; + final _$$ref$1 = object.ref; + final _$$ref$2 = usingComparator.ref; objc.checkOsVersionInternal( - 'NSLocale.localizedStringForLanguageCode:', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( + 'NSOrderedSet.indexOfObject:inSortedRange:options:usingComparator:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + return _objc_msgSend_kshx9d( _$$ref.pointer, - _sel_localizedStringForLanguageCode_, + _sel_indexOfObject_inSortedRange_options_usingComparator_, _$$ref$1.pointer, + inSortedRange, + options, + _$$ref$2.pointer, ); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); } - /// localizedStringForLocaleIdentifier: - NSString localizedStringForLocaleIdentifier(NSString localeIdentifier) { + /// indexOfObjectAtIndexes:options:passingTest: + DartNSUInteger indexOfObjectAtIndexes( + NSIndexSet s, { + required DartNSUInteger options, + required objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) + > + passingTest, + }) { final _$$ref = object$.ref; - final _$$ref$1 = localeIdentifier.ref; + final _$$ref$1 = s.ref; + final _$$ref$2 = passingTest.ref; objc.checkOsVersionInternal( - 'NSLocale.localizedStringForLocaleIdentifier:', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), + 'NSOrderedSet.indexOfObjectAtIndexes:options:passingTest:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_1sotr3r( + return _objc_msgSend_k1x6mt( _$$ref.pointer, - _sel_localizedStringForLocaleIdentifier_, + _sel_indexOfObjectAtIndexes_options_passingTest_, _$$ref$1.pointer, + options, + _$$ref$2.pointer, ); - return NSString.fromPointer($ret, retain: true, release: true); } - /// localizedStringForScriptCode: - NSString? localizedStringForScriptCode(NSString scriptCode) { + /// indexOfObjectPassingTest: + DartNSUInteger indexOfObjectPassingTest( + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) + > + predicate, + ) { final _$$ref = object$.ref; - final _$$ref$1 = scriptCode.ref; + final _$$ref$1 = predicate.ref; objc.checkOsVersionInternal( - 'NSLocale.localizedStringForScriptCode:', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), + 'NSOrderedSet.indexOfObjectPassingTest:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_1sotr3r( + return _objc_msgSend_10mlopr( _$$ref.pointer, - _sel_localizedStringForScriptCode_, + _sel_indexOfObjectPassingTest_, _$$ref$1.pointer, ); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); } - /// localizedStringForVariantCode: - NSString? localizedStringForVariantCode(NSString variantCode) { + /// indexOfObjectWithOptions:passingTest: + DartNSUInteger indexOfObjectWithOptions( + DartNSUInteger opts, { + required objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) + > + passingTest, + }) { final _$$ref = object$.ref; - final _$$ref$1 = variantCode.ref; + final _$$ref$1 = passingTest.ref; objc.checkOsVersionInternal( - 'NSLocale.localizedStringForVariantCode:', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), + 'NSOrderedSet.indexOfObjectWithOptions:passingTest:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_1sotr3r( + return _objc_msgSend_1698hqz( _$$ref.pointer, - _sel_localizedStringForVariantCode_, + _sel_indexOfObjectWithOptions_passingTest_, + opts, _$$ref$1.pointer, ); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); } - /// quotationBeginDelimiter - NSString get quotationBeginDelimiter { + /// indexesOfObjectsAtIndexes:options:passingTest: + NSIndexSet indexesOfObjectsAtIndexes( + NSIndexSet s, { + required DartNSUInteger options, + required objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) + > + passingTest, + }) { final _$$ref = object$.ref; + final _$$ref$1 = s.ref; + final _$$ref$2 = passingTest.ref; objc.checkOsVersionInternal( - 'NSLocale.quotationBeginDelimiter', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), + 'NSOrderedSet.indexesOfObjectsAtIndexes:options:passingTest:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_151sglz( + final $ret = _objc_msgSend_1i9v144( _$$ref.pointer, - _sel_quotationBeginDelimiter, + _sel_indexesOfObjectsAtIndexes_options_passingTest_, + _$$ref$1.pointer, + options, + _$$ref$2.pointer, ); - return NSString.fromPointer($ret, retain: true, release: true); + return NSIndexSet.fromPointer($ret, retain: true, release: true); } - /// quotationEndDelimiter - NSString get quotationEndDelimiter { + /// indexesOfObjectsPassingTest: + NSIndexSet indexesOfObjectsPassingTest( + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) + > + predicate, + ) { final _$$ref = object$.ref; + final _$$ref$1 = predicate.ref; objc.checkOsVersionInternal( - 'NSLocale.quotationEndDelimiter', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), + 'NSOrderedSet.indexesOfObjectsPassingTest:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_151sglz( + final $ret = _objc_msgSend_nnxkei( _$$ref.pointer, - _sel_quotationEndDelimiter, - ); - return NSString.fromPointer($ret, retain: true, release: true); - } - - /// regionCode - NSString? get regionCode { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSLocale.regionCode', - iOS: (false, (17, 0, 0)), - macOS: (false, (14, 0, 0)), + _sel_indexesOfObjectsPassingTest_, + _$$ref$1.pointer, ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_regionCode); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); + return NSIndexSet.fromPointer($ret, retain: true, release: true); } - /// scriptCode - NSString? get scriptCode { + /// indexesOfObjectsWithOptions:passingTest: + NSIndexSet indexesOfObjectsWithOptions( + DartNSUInteger opts, { + required objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) + > + passingTest, + }) { final _$$ref = object$.ref; + final _$$ref$1 = passingTest.ref; objc.checkOsVersionInternal( - 'NSLocale.scriptCode', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), + 'NSOrderedSet.indexesOfObjectsWithOptions:passingTest:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_scriptCode); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); - } - - /// usesMetricSystem - bool get usesMetricSystem { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSLocale.usesMetricSystem', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), + final $ret = _objc_msgSend_13x5boi( + _$$ref.pointer, + _sel_indexesOfObjectsWithOptions_passingTest_, + opts, + _$$ref$1.pointer, ); - return _objc_msgSend_91o635(_$$ref.pointer, _sel_usesMetricSystem); + return NSIndexSet.fromPointer($ret, retain: true, release: true); } - /// variantCode - NSString? get variantCode { + /// intersectsOrderedSet: + bool intersectsOrderedSet(NSOrderedSet other) { final _$$ref = object$.ref; + final _$$ref$1 = other.ref; objc.checkOsVersionInternal( - 'NSLocale.variantCode', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), + 'NSOrderedSet.intersectsOrderedSet:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_variantCode); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); - } -} - -/// NSExtendedMutableArray -extension NSExtendedMutableArray on NSMutableArray { - /// addObjectsFromArray: - void addObjectsFromArray(NSArray otherArray) { - final _$$ref = object$.ref; - final _$$ref$1 = otherArray.ref; - _objc_msgSend_xtuoz7( + return _objc_msgSend_19nvye5( _$$ref.pointer, - _sel_addObjectsFromArray_, + _sel_intersectsOrderedSet_, _$$ref$1.pointer, ); } - /// exchangeObjectAtIndex:withObjectAtIndex: - void exchangeObjectAtIndex( - DartNSUInteger idx1, { - required DartNSUInteger withObjectAtIndex, - }) { + /// intersectsSet: + bool intersectsSet(NSSet set) { final _$$ref = object$.ref; - _objc_msgSend_bfp043( - _$$ref.pointer, - _sel_exchangeObjectAtIndex_withObjectAtIndex_, - idx1, - withObjectAtIndex, + final _$$ref$1 = set.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.intersectsSet:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - } - - /// insertObjects:atIndexes: - void insertObjects(NSArray objects, {required NSIndexSet atIndexes}) { - final _$$ref = object$.ref; - final _$$ref$1 = objects.ref; - final _$$ref$2 = atIndexes.ref; - _objc_msgSend_pfv6jd( + return _objc_msgSend_19nvye5( _$$ref.pointer, - _sel_insertObjects_atIndexes_, + _sel_intersectsSet_, _$$ref$1.pointer, - _$$ref$2.pointer, ); } - /// removeAllObjects - void removeAllObjects() { - final _$$ref = object$.ref; - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_removeAllObjects); - } - - /// removeObject: - void removeObject(objc.ObjCObject anObject) { - final _$$ref = object$.ref; - final _$$ref$1 = anObject.ref; - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_removeObject_, _$$ref$1.pointer); - } - - /// removeObject:inRange: - void removeObject$1(objc.ObjCObject anObject, {required NSRange inRange}) { + /// isEqualToOrderedSet: + bool isEqualToOrderedSet(NSOrderedSet other) { final _$$ref = object$.ref; - final _$$ref$1 = anObject.ref; - _objc_msgSend_1oteutl( + final _$$ref$1 = other.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.isEqualToOrderedSet:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + return _objc_msgSend_19nvye5( _$$ref.pointer, - _sel_removeObject_inRange_, + _sel_isEqualToOrderedSet_, _$$ref$1.pointer, - inRange, ); } - /// removeObjectIdenticalTo: - void removeObjectIdenticalTo(objc.ObjCObject anObject) { + /// isSubsetOfOrderedSet: + bool isSubsetOfOrderedSet(NSOrderedSet other) { final _$$ref = object$.ref; - final _$$ref$1 = anObject.ref; - _objc_msgSend_xtuoz7( + final _$$ref$1 = other.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.isSubsetOfOrderedSet:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + return _objc_msgSend_19nvye5( _$$ref.pointer, - _sel_removeObjectIdenticalTo_, + _sel_isSubsetOfOrderedSet_, _$$ref$1.pointer, ); } - /// removeObjectIdenticalTo:inRange: - void removeObjectIdenticalTo$1( - objc.ObjCObject anObject, { - required NSRange inRange, - }) { + /// isSubsetOfSet: + bool isSubsetOfSet(NSSet set) { final _$$ref = object$.ref; - final _$$ref$1 = anObject.ref; - _objc_msgSend_1oteutl( + final _$$ref$1 = set.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.isSubsetOfSet:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + return _objc_msgSend_19nvye5( _$$ref.pointer, - _sel_removeObjectIdenticalTo_inRange_, + _sel_isSubsetOfSet_, _$$ref$1.pointer, - inRange, ); } - /// removeObjectsAtIndexes: - void removeObjectsAtIndexes(NSIndexSet indexes) { + /// lastObject + objc.ObjCObject? get lastObject { final _$$ref = object$.ref; - final _$$ref$1 = indexes.ref; - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_removeObjectsAtIndexes_, - _$$ref$1.pointer, + objc.checkOsVersionInternal( + 'NSOrderedSet.lastObject', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_lastObject); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); } - /// removeObjectsFromIndices:numIndices: - @Deprecated('Not supported') - void removeObjectsFromIndices( - ffi.Pointer indices, { - required DartNSUInteger numIndices, - }) { + /// objectAtIndexedSubscript: + objc.ObjCObject objectAtIndexedSubscript(DartNSUInteger idx) { final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSMutableArray.removeObjectsFromIndices:numIndices:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSOrderedSet.objectAtIndexedSubscript:', + iOS: (false, (6, 0, 0)), + macOS: (false, (10, 8, 0)), ); - _objc_msgSend_swohtd( + final $ret = _objc_msgSend_14hpxwa( _$$ref.pointer, - _sel_removeObjectsFromIndices_numIndices_, - indices, - numIndices, + _sel_objectAtIndexedSubscript_, + idx, ); + return objc.ObjCObject($ret, retain: true, release: true); } - /// removeObjectsInArray: - void removeObjectsInArray(NSArray otherArray) { + /// objectEnumerator + NSEnumerator objectEnumerator() { final _$$ref = object$.ref; - final _$$ref$1 = otherArray.ref; - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_removeObjectsInArray_, - _$$ref$1.pointer, + objc.checkOsVersionInternal( + 'NSOrderedSet.objectEnumerator', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_objectEnumerator); + return NSEnumerator.fromPointer($ret, retain: true, release: true); } - /// removeObjectsInRange: - void removeObjectsInRange(NSRange range) { - final _$$ref = object$.ref; - _objc_msgSend_1e3pm0z(_$$ref.pointer, _sel_removeObjectsInRange_, range); - } - - /// replaceObjectsAtIndexes:withObjects: - void replaceObjectsAtIndexes( - NSIndexSet indexes, { - required NSArray withObjects, - }) { + /// objectsAtIndexes: + NSArray objectsAtIndexes(NSIndexSet indexes) { final _$$ref = object$.ref; final _$$ref$1 = indexes.ref; - final _$$ref$2 = withObjects.ref; - _objc_msgSend_pfv6jd( - _$$ref.pointer, - _sel_replaceObjectsAtIndexes_withObjects_, - _$$ref$1.pointer, - _$$ref$2.pointer, + objc.checkOsVersionInternal( + 'NSOrderedSet.objectsAtIndexes:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - } - - /// replaceObjectsInRange:withObjectsFromArray: - void replaceObjectsInRange( - NSRange range, { - required NSArray withObjectsFromArray, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = withObjectsFromArray.ref; - _objc_msgSend_1tv4uax( + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_replaceObjectsInRange_withObjectsFromArray_, - range, + _sel_objectsAtIndexes_, _$$ref$1.pointer, ); + return NSArray.fromPointer($ret, retain: true, release: true); } - /// replaceObjectsInRange:withObjectsFromArray:range: - void replaceObjectsInRange$1( - NSRange range, { - required NSArray withObjectsFromArray, - required NSRange range$1, - }) { + /// reverseObjectEnumerator + NSEnumerator reverseObjectEnumerator() { final _$$ref = object$.ref; - final _$$ref$1 = withObjectsFromArray.ref; - _objc_msgSend_15bolr3( + objc.checkOsVersionInternal( + 'NSOrderedSet.reverseObjectEnumerator', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + final $ret = _objc_msgSend_151sglz( _$$ref.pointer, - _sel_replaceObjectsInRange_withObjectsFromArray_range_, - range, - _$$ref$1.pointer, - range$1, + _sel_reverseObjectEnumerator, ); + return NSEnumerator.fromPointer($ret, retain: true, release: true); } - /// setArray: - void setArray(NSArray otherArray) { + /// reversedOrderedSet + NSOrderedSet get reversedOrderedSet { final _$$ref = object$.ref; - final _$$ref$1 = otherArray.ref; - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_setArray_, _$$ref$1.pointer); + objc.checkOsVersionInternal( + 'NSOrderedSet.reversedOrderedSet', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_reversedOrderedSet); + return NSOrderedSet.fromPointer($ret, retain: true, release: true); } - /// setObject:atIndexedSubscript: - void setObject( - objc.ObjCObject obj, { - required DartNSUInteger atIndexedSubscript, - }) { + /// set + NSSet get set { final _$$ref = object$.ref; - final _$$ref$1 = obj.ref; objc.checkOsVersionInternal( - 'NSMutableArray.setObject:atIndexedSubscript:', - iOS: (false, (6, 0, 0)), - macOS: (false, (10, 8, 0)), - ); - _objc_msgSend_djsa9o( - _$$ref.pointer, - _sel_setObject_atIndexedSubscript_, - _$$ref$1.pointer, - atIndexedSubscript, + 'NSOrderedSet.set', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_set); + return NSSet.fromPointer($ret, retain: true, release: true); } - /// sortUsingComparator: - void sortUsingComparator( + /// sortedArrayUsingComparator: + NSArray sortedArrayUsingComparator( objc.ObjCBlock< ffi.Long Function( ffi.Pointer, @@ -10792,48 +8753,20 @@ extension NSExtendedMutableArray on NSMutableArray { final _$$ref = object$.ref; final _$$ref$1 = cmptr.ref; objc.checkOsVersionInternal( - 'NSMutableArray.sortUsingComparator:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSOrderedSet.sortedArrayUsingComparator:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - _objc_msgSend_f167m6( + final $ret = _objc_msgSend_nnxkei( _$$ref.pointer, - _sel_sortUsingComparator_, + _sel_sortedArrayUsingComparator_, _$$ref$1.pointer, ); + return NSArray.fromPointer($ret, retain: true, release: true); } - /// sortUsingFunction:context: - void sortUsingFunction( - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - > - compare, { - required ffi.Pointer context, - }) { - final _$$ref = object$.ref; - _objc_msgSend_1bvics1( - _$$ref.pointer, - _sel_sortUsingFunction_context_, - compare, - context, - ); - } - - /// sortUsingSelector: - void sortUsingSelector(ffi.Pointer comparator) { - final _$$ref = object$.ref; - _objc_msgSend_1d9e4oe(_$$ref.pointer, _sel_sortUsingSelector_, comparator); - } - - /// sortWithOptions:usingComparator: - void sortWithOptions( + /// sortedArrayWithOptions:usingComparator: + NSArray sortedArrayWithOptions( DartNSUInteger opts, { required objc.ObjCBlock< ffi.Long Function( @@ -10846,2022 +8779,2299 @@ extension NSExtendedMutableArray on NSMutableArray { final _$$ref = object$.ref; final _$$ref$1 = usingComparator.ref; objc.checkOsVersionInternal( - 'NSMutableArray.sortWithOptions:usingComparator:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSOrderedSet.sortedArrayWithOptions:usingComparator:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - _objc_msgSend_jjgvjt( + final $ret = _objc_msgSend_1x5ew3h( _$$ref.pointer, - _sel_sortWithOptions_usingComparator_, + _sel_sortedArrayWithOptions_usingComparator_, opts, _$$ref$1.pointer, ); + return NSArray.fromPointer($ret, retain: true, release: true); } } -/// NSExtendedMutableData -extension NSExtendedMutableData on NSMutableData { - /// appendBytes:length: - void appendBytes( - ffi.Pointer bytes, { - required DartNSUInteger length, - }) { +/// NSExtendedSet +extension NSExtendedSet on NSSet { + /// allObjects + NSArray get allObjects { final _$$ref = object$.ref; - _objc_msgSend_zuf90e( - _$$ref.pointer, - _sel_appendBytes_length_, - bytes, - length, - ); - } - - /// appendData: - void appendData(NSData other) { - final _$$ref = object$.ref; - final _$$ref$1 = other.ref; - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_appendData_, _$$ref$1.pointer); - } - - /// increaseLengthBy: - void increaseLengthBy(DartNSUInteger extraLength) { - final _$$ref = object$.ref; - _objc_msgSend_1i9r4xy(_$$ref.pointer, _sel_increaseLengthBy_, extraLength); - } - - /// replaceBytesInRange:withBytes: - void replaceBytesInRange( - NSRange range, { - required ffi.Pointer withBytes, - }) { - final _$$ref = object$.ref; - _objc_msgSend_eh32gn( - _$$ref.pointer, - _sel_replaceBytesInRange_withBytes_, - range, - withBytes, - ); - } - - /// replaceBytesInRange:withBytes:length: - void replaceBytesInRange$1( - NSRange range, { - required ffi.Pointer withBytes, - required DartNSUInteger length, - }) { - final _$$ref = object$.ref; - _objc_msgSend_c0vg4w( - _$$ref.pointer, - _sel_replaceBytesInRange_withBytes_length_, - range, - withBytes, - length, - ); - } - - /// resetBytesInRange: - void resetBytesInRange(NSRange range) { - final _$$ref = object$.ref; - _objc_msgSend_1e3pm0z(_$$ref.pointer, _sel_resetBytesInRange_, range); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_allObjects); + return NSArray.fromPointer($ret, retain: true, release: true); } - /// setData: - void setData(NSData data) { + /// anyObject + objc.ObjCObject? anyObject() { final _$$ref = object$.ref; - final _$$ref$1 = data.ref; - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_setData_, _$$ref$1.pointer); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_anyObject); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); } -} -/// NSExtendedMutableDictionary -extension NSExtendedMutableDictionary on NSMutableDictionary { - /// addEntriesFromDictionary: - void addEntriesFromDictionary(NSDictionary otherDictionary) { + /// containsObject: + bool containsObject(objc.ObjCObject anObject) { final _$$ref = object$.ref; - final _$$ref$1 = otherDictionary.ref; - _objc_msgSend_xtuoz7( + final _$$ref$1 = anObject.ref; + return _objc_msgSend_19nvye5( _$$ref.pointer, - _sel_addEntriesFromDictionary_, + _sel_containsObject_, _$$ref$1.pointer, ); } - /// removeAllObjects - void removeAllObjects() { + /// description + NSString get description$1 { final _$$ref = object$.ref; - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_removeAllObjects); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_description); + return NSString.fromPointer($ret, retain: true, release: true); } - /// removeObjectsForKeys: - void removeObjectsForKeys(NSArray keyArray) { + /// descriptionWithLocale: + NSString descriptionWithLocale(objc.ObjCObject? locale) { final _$$ref = object$.ref; - final _$$ref$1 = keyArray.ref; - _objc_msgSend_xtuoz7( + final _$$ref$1 = locale?.ref; + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_removeObjectsForKeys_, - _$$ref$1.pointer, + _sel_descriptionWithLocale_, + _$$ref$1?.pointer ?? ffi.nullptr, ); + return NSString.fromPointer($ret, retain: true, release: true); } - /// setDictionary: - void setDictionary(NSDictionary otherDictionary) { - final _$$ref = object$.ref; - final _$$ref$1 = otherDictionary.ref; - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_setDictionary_, _$$ref$1.pointer); - } - - /// setObject:forKeyedSubscript: - void setObject$1( - objc.ObjCObject? obj, { - required NSCopying forKeyedSubscript, - }) { + /// enumerateObjectsUsingBlock: + void enumerateObjectsUsingBlock( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, ffi.Pointer) + > + block, + ) { final _$$ref = object$.ref; - final _$$ref$1 = obj?.ref; - final _$$ref$2 = forKeyedSubscript.ref; + final _$$ref$1 = block.ref; objc.checkOsVersionInternal( - 'NSMutableDictionary.setObject:forKeyedSubscript:', - iOS: (false, (6, 0, 0)), - macOS: (false, (10, 8, 0)), + 'NSSet.enumerateObjectsUsingBlock:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - _objc_msgSend_pfv6jd( + _objc_msgSend_f167m6( _$$ref.pointer, - _sel_setObject_forKeyedSubscript_, - _$$ref$1?.pointer ?? ffi.nullptr, - _$$ref$2.pointer, - ); - } -} - -/// NSExtendedMutableOrderedSet -extension NSExtendedMutableOrderedSet on NSMutableOrderedSet { - /// addObject: - void addObject(objc.ObjCObject object) { - final _$$ref = object$.ref; - final _$$ref$1 = object.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.addObject:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + _sel_enumerateObjectsUsingBlock_, + _$$ref$1.pointer, ); - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_addObject_, _$$ref$1.pointer); } - /// addObjects:count: - void addObjects( - ffi.Pointer> objects, { - required DartNSUInteger count, + /// enumerateObjectsWithOptions:usingBlock: + void enumerateObjectsWithOptions( + DartNSUInteger opts, { + required objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, ffi.Pointer) + > + usingBlock, }) { final _$$ref = object$.ref; + final _$$ref$1 = usingBlock.ref; objc.checkOsVersionInternal( - 'NSMutableOrderedSet.addObjects:count:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSSet.enumerateObjectsWithOptions:usingBlock:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - _objc_msgSend_gcjqkl( + _objc_msgSend_yx8yc6( _$$ref.pointer, - _sel_addObjects_count_, - objects, - count, + _sel_enumerateObjectsWithOptions_usingBlock_, + opts, + _$$ref$1.pointer, ); } - /// addObjectsFromArray: - void addObjectsFromArray(NSArray array) { + /// intersectsSet: + bool intersectsSet(NSSet otherSet) { final _$$ref = object$.ref; - final _$$ref$1 = array.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.addObjectsFromArray:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_xtuoz7( + final _$$ref$1 = otherSet.ref; + return _objc_msgSend_19nvye5( _$$ref.pointer, - _sel_addObjectsFromArray_, + _sel_intersectsSet_, _$$ref$1.pointer, ); } - /// exchangeObjectAtIndex:withObjectAtIndex: - void exchangeObjectAtIndex( - DartNSUInteger idx1, { - required DartNSUInteger withObjectAtIndex, - }) { + /// isEqualToSet: + bool isEqualToSet(NSSet otherSet) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.exchangeObjectAtIndex:withObjectAtIndex:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_bfp043( + final _$$ref$1 = otherSet.ref; + return _objc_msgSend_19nvye5( _$$ref.pointer, - _sel_exchangeObjectAtIndex_withObjectAtIndex_, - idx1, - withObjectAtIndex, + _sel_isEqualToSet_, + _$$ref$1.pointer, ); } - /// insertObjects:atIndexes: - void insertObjects(NSArray objects, {required NSIndexSet atIndexes}) { + /// isSubsetOfSet: + bool isSubsetOfSet(NSSet otherSet) { final _$$ref = object$.ref; - final _$$ref$1 = objects.ref; - final _$$ref$2 = atIndexes.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.insertObjects:atIndexes:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_pfv6jd( + final _$$ref$1 = otherSet.ref; + return _objc_msgSend_19nvye5( _$$ref.pointer, - _sel_insertObjects_atIndexes_, + _sel_isSubsetOfSet_, _$$ref$1.pointer, - _$$ref$2.pointer, ); } - /// intersectOrderedSet: - void intersectOrderedSet(NSOrderedSet other) { + /// makeObjectsPerformSelector: + void makeObjectsPerformSelector(ffi.Pointer aSelector) { final _$$ref = object$.ref; - final _$$ref$1 = other.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.intersectOrderedSet:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_xtuoz7( + _objc_msgSend_1d9e4oe( _$$ref.pointer, - _sel_intersectOrderedSet_, - _$$ref$1.pointer, + _sel_makeObjectsPerformSelector_, + aSelector, ); } - /// intersectSet: - void intersectSet(NSSet other) { + /// makeObjectsPerformSelector:withObject: + void makeObjectsPerformSelector$1( + ffi.Pointer aSelector, { + objc.ObjCObject? withObject, + }) { final _$$ref = object$.ref; - final _$$ref$1 = other.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.intersectSet:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + final _$$ref$1 = withObject?.ref; + _objc_msgSend_1qv0eq4( + _$$ref.pointer, + _sel_makeObjectsPerformSelector_withObject_, + aSelector, + _$$ref$1?.pointer ?? ffi.nullptr, ); - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_intersectSet_, _$$ref$1.pointer); } - /// minusOrderedSet: - void minusOrderedSet(NSOrderedSet other) { + /// objectsPassingTest: + NSSet objectsPassingTest( + objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, ffi.Pointer) + > + predicate, + ) { final _$$ref = object$.ref; - final _$$ref$1 = other.ref; + final _$$ref$1 = predicate.ref; objc.checkOsVersionInternal( - 'NSMutableOrderedSet.minusOrderedSet:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSSet.objectsPassingTest:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - _objc_msgSend_xtuoz7( + final $ret = _objc_msgSend_nnxkei( _$$ref.pointer, - _sel_minusOrderedSet_, + _sel_objectsPassingTest_, _$$ref$1.pointer, ); + return NSSet.fromPointer($ret, retain: true, release: true); } - /// minusSet: - void minusSet(NSSet other) { - final _$$ref = object$.ref; - final _$$ref$1 = other.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.minusSet:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_minusSet_, _$$ref$1.pointer); - } - - /// moveObjectsAtIndexes:toIndex: - void moveObjectsAtIndexes( - NSIndexSet indexes, { - required DartNSUInteger toIndex, + /// objectsWithOptions:passingTest: + NSSet objectsWithOptions( + DartNSUInteger opts, { + required objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, ffi.Pointer) + > + passingTest, }) { final _$$ref = object$.ref; - final _$$ref$1 = indexes.ref; + final _$$ref$1 = passingTest.ref; objc.checkOsVersionInternal( - 'NSMutableOrderedSet.moveObjectsAtIndexes:toIndex:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSSet.objectsWithOptions:passingTest:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - _objc_msgSend_djsa9o( + final $ret = _objc_msgSend_13x5boi( _$$ref.pointer, - _sel_moveObjectsAtIndexes_toIndex_, + _sel_objectsWithOptions_passingTest_, + opts, _$$ref$1.pointer, - toIndex, ); + return NSSet.fromPointer($ret, retain: true, release: true); } - /// removeAllObjects - void removeAllObjects() { + /// setByAddingObject: + NSSet setByAddingObject(objc.ObjCObject anObject) { final _$$ref = object$.ref; + final _$$ref$1 = anObject.ref; objc.checkOsVersionInternal( - 'NSMutableOrderedSet.removeAllObjects', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSSet.setByAddingObject:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), ); - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_removeAllObjects); - } - - /// removeObject: - void removeObject(objc.ObjCObject object) { - final _$$ref = object$.ref; - final _$$ref$1 = object.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.removeObject:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_setByAddingObject_, + _$$ref$1.pointer, ); - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_removeObject_, _$$ref$1.pointer); + return NSSet.fromPointer($ret, retain: true, release: true); } - /// removeObjectsAtIndexes: - void removeObjectsAtIndexes(NSIndexSet indexes) { + /// setByAddingObjectsFromArray: + NSSet setByAddingObjectsFromArray(NSArray other) { final _$$ref = object$.ref; - final _$$ref$1 = indexes.ref; + final _$$ref$1 = other.ref; objc.checkOsVersionInternal( - 'NSMutableOrderedSet.removeObjectsAtIndexes:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSSet.setByAddingObjectsFromArray:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), ); - _objc_msgSend_xtuoz7( + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_removeObjectsAtIndexes_, + _sel_setByAddingObjectsFromArray_, _$$ref$1.pointer, ); + return NSSet.fromPointer($ret, retain: true, release: true); } - /// removeObjectsInArray: - void removeObjectsInArray(NSArray array) { + /// setByAddingObjectsFromSet: + NSSet setByAddingObjectsFromSet(NSSet other) { final _$$ref = object$.ref; - final _$$ref$1 = array.ref; + final _$$ref$1 = other.ref; objc.checkOsVersionInternal( - 'NSMutableOrderedSet.removeObjectsInArray:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSSet.setByAddingObjectsFromSet:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), ); - _objc_msgSend_xtuoz7( + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_removeObjectsInArray_, + _sel_setByAddingObjectsFromSet_, _$$ref$1.pointer, ); + return NSSet.fromPointer($ret, retain: true, release: true); } +} - /// removeObjectsInRange: - void removeObjectsInRange(NSRange range) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.removeObjectsInRange:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_1e3pm0z(_$$ref.pointer, _sel_removeObjectsInRange_, range); - } +/// NSFastEnumeration +extension type NSFastEnumeration._(objc.ObjCProtocol object$) + implements objc.ObjCProtocol { + /// Constructs a [NSFastEnumeration] that points to the same underlying object as [other]. + NSFastEnumeration.as(objc.ObjCObject other) : object$ = other; - /// replaceObjectsAtIndexes:withObjects: - void replaceObjectsAtIndexes( - NSIndexSet indexes, { - required NSArray withObjects, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = indexes.ref; - final _$$ref$2 = withObjects.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.replaceObjectsAtIndexes:withObjects:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_pfv6jd( - _$$ref.pointer, - _sel_replaceObjectsAtIndexes_withObjects_, - _$$ref$1.pointer, - _$$ref$2.pointer, + /// Constructs a [NSFastEnumeration] that wraps the given raw object pointer. + NSFastEnumeration.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSFastEnumeration]. + static bool conformsTo(objc.ObjCObject obj) { + return _objc_msgSend_e3qsqz( + obj.ref.pointer, + _sel_conformsToProtocol_, + _protocol_NSFastEnumeration, ); } +} - /// replaceObjectsInRange:withObjects:count: - void replaceObjectsInRange( - NSRange range, { - required ffi.Pointer> withObjects, +extension NSFastEnumeration$Methods on NSFastEnumeration { + /// countByEnumeratingWithState:objects:count: + DartNSUInteger countByEnumeratingWithState( + ffi.Pointer state, { + required ffi.Pointer> objects, required DartNSUInteger count, }) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.replaceObjectsInRange:withObjects:count:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_122v0cv( - _$$ref.pointer, - _sel_replaceObjectsInRange_withObjects_count_, - range, - withObjects, + final _$$ref$3 = object$.ref; + return _objc_msgSend_1b5ysjl( + _$$ref$3.pointer, + _sel_countByEnumeratingWithState_objects_count_, + state, + objects, count, ); } +} - /// setObject:atIndex: - void setObject(objc.ObjCObject obj, {required DartNSUInteger atIndex}) { - final _$$ref = object$.ref; - final _$$ref$1 = obj.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.setObject:atIndex:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_djsa9o( - _$$ref.pointer, - _sel_setObject_atIndex_, - _$$ref$1.pointer, - atIndex, - ); - } +interface class NSFastEnumeration$Builder { + /// Returns the [objc.Protocol] object for this protocol. + static objc.Protocol get $protocol => + objc.Protocol.fromPointer(_protocol_NSFastEnumeration.cast()); - /// setObject:atIndexedSubscript: - void setObject$1( - objc.ObjCObject obj, { - required DartNSUInteger atIndexedSubscript, + /// Builds an object that implements the NSFastEnumeration protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + /// + /// If `$keepIsolateAlive` is true, this protocol will keep this isolate + /// alive until it is garbage collected by both Dart and ObjC. + static NSFastEnumeration implement({ + required DartNSUInteger Function( + ffi.Pointer, + ffi.Pointer>, + DartNSUInteger, + ) + countByEnumeratingWithState_objects_count_, + bool $keepIsolateAlive = true, }) { - final _$$ref = object$.ref; - final _$$ref$1 = obj.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.setObject:atIndexedSubscript:', - iOS: (false, (6, 0, 0)), - macOS: (false, (10, 8, 0)), - ); - _objc_msgSend_djsa9o( - _$$ref.pointer, - _sel_setObject_atIndexedSubscript_, - _$$ref$1.pointer, - atIndexedSubscript, + final builder = objc.ObjCProtocolBuilder(debugName: 'NSFastEnumeration'); + NSFastEnumeration$Builder.countByEnumeratingWithState_objects_count_ + .implement(builder, countByEnumeratingWithState_objects_count_); + builder.addProtocol($protocol); + return NSFastEnumeration.as( + builder.build(keepIsolateAlive: $keepIsolateAlive), ); } - /// sortRange:options:usingComparator: - void sortRange( - NSRange range, { - required DartNSUInteger options, - required objc.ObjCBlock< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ) - > - usingComparator, + /// Adds the implementation of the NSFastEnumeration protocol to an existing + /// [objc.ObjCProtocolBuilder]. + /// + /// Note: You cannot call this method after you have called `builder.build`. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, { + required DartNSUInteger Function( + ffi.Pointer, + ffi.Pointer>, + DartNSUInteger, + ) + countByEnumeratingWithState_objects_count_, + bool $keepIsolateAlive = true, }) { - final _$$ref = object$.ref; - final _$$ref$1 = usingComparator.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.sortRange:options:usingComparator:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_arew0j( - _$$ref.pointer, - _sel_sortRange_options_usingComparator_, - range, - options, - _$$ref$1.pointer, - ); + NSFastEnumeration$Builder.countByEnumeratingWithState_objects_count_ + .implement(builder, countByEnumeratingWithState_objects_count_); + builder.addProtocol($protocol); } - /// sortUsingComparator: - void sortUsingComparator( - objc.ObjCBlock< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ) - > - cmptr, - ) { - final _$$ref = object$.ref; - final _$$ref$1 = cmptr.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.sortUsingComparator:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_f167m6( - _$$ref.pointer, - _sel_sortUsingComparator_, - _$$ref$1.pointer, - ); - } + /// countByEnumeratingWithState:objects:count: + static final countByEnumeratingWithState_objects_count_ = + objc.ObjCProtocolMethod< + DartNSUInteger Function( + ffi.Pointer, + ffi.Pointer>, + DartNSUInteger, + ) + >( + _protocol_NSFastEnumeration, + _sel_countByEnumeratingWithState_objects_count_, + ffi.Native.addressOf< + ffi.NativeFunction< + NSUInteger Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + NSUInteger, + ) + > + >(_1wx624s_protocolTrampoline_17ap02x) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSFastEnumeration, + _sel_countByEnumeratingWithState_objects_count_, + isRequired: true, + isInstanceMethod: true, + ), + ( + DartNSUInteger Function( + ffi.Pointer, + ffi.Pointer>, + DartNSUInteger, + ) + func, + ) => + ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObjectImpl_NSUInteger.fromFunction( + ( + ffi.Pointer _, + ffi.Pointer arg1, + ffi.Pointer> arg2, + DartNSUInteger arg3, + ) => func(arg1, arg2, arg3), + ), + ); +} - /// sortWithOptions:usingComparator: - void sortWithOptions( - DartNSUInteger opts, { - required objc.ObjCBlock< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ) - > - usingComparator, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = usingComparator.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.sortWithOptions:usingComparator:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_jjgvjt( - _$$ref.pointer, - _sel_sortWithOptions_usingComparator_, - opts, - _$$ref$1.pointer, - ); +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; +} + +/// NSIndexSet +extension type NSIndexSet._(objc.ObjCObject object$) + implements + objc.ObjCObject, + NSObject, + NSCopying, + NSMutableCopying, + NSSecureCoding { + /// Constructs a [NSIndexSet] that points to the same underlying object as [other]. + NSIndexSet.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); } - /// unionOrderedSet: - void unionOrderedSet(NSOrderedSet other) { - final _$$ref = object$.ref; - final _$$ref$1 = other.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.unionOrderedSet:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_unionOrderedSet_, - _$$ref$1.pointer, - ); + /// Constructs a [NSIndexSet] that wraps the given raw object pointer. + NSIndexSet.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + assert(isA(object$)); } - /// unionSet: - void unionSet(NSSet other) { - final _$$ref = object$.ref; - final _$$ref$1 = other.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.unionSet:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_unionSet_, _$$ref$1.pointer); + /// Returns whether [obj] is an instance of [NSIndexSet]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSIndexSet, + ); + + /// alloc + static NSIndexSet alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSIndexSet, _sel_alloc); + return NSIndexSet.fromPointer($ret, retain: false, release: true); } -} -/// NSExtendedMutableSet -extension NSExtendedMutableSet on NSMutableSet { - /// addObjectsFromArray: - void addObjectsFromArray(NSArray array) { - final _$$ref = object$.ref; - final _$$ref$1 = array.ref; - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_addObjectsFromArray_, - _$$ref$1.pointer, + /// allocWithZone: + static NSIndexSet allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSIndexSet, + _sel_allocWithZone_, + zone, ); + return NSIndexSet.fromPointer($ret, retain: false, release: true); } - /// intersectSet: - void intersectSet(NSSet otherSet) { - final _$$ref = object$.ref; - final _$$ref$1 = otherSet.ref; - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_intersectSet_, _$$ref$1.pointer); + /// indexSet + static NSIndexSet indexSet() { + final $ret = _objc_msgSend_151sglz(_class_NSIndexSet, _sel_indexSet); + return NSIndexSet.fromPointer($ret, retain: true, release: true); } - /// minusSet: - void minusSet(NSSet otherSet) { - final _$$ref = object$.ref; - final _$$ref$1 = otherSet.ref; - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_minusSet_, _$$ref$1.pointer); + /// indexSetWithIndex: + static NSIndexSet indexSetWithIndex(DartNSUInteger value) { + final $ret = _objc_msgSend_14hpxwa( + _class_NSIndexSet, + _sel_indexSetWithIndex_, + value, + ); + return NSIndexSet.fromPointer($ret, retain: true, release: true); } - /// removeAllObjects - void removeAllObjects() { - final _$$ref = object$.ref; - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_removeAllObjects); + /// indexSetWithIndexesInRange: + static NSIndexSet indexSetWithIndexesInRange(NSRange range) { + final $ret = _objc_msgSend_1k1o1s7( + _class_NSIndexSet, + _sel_indexSetWithIndexesInRange_, + range, + ); + return NSIndexSet.fromPointer($ret, retain: true, release: true); } - /// setSet: - void setSet(NSSet otherSet) { - final _$$ref = object$.ref; - final _$$ref$1 = otherSet.ref; - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_setSet_, _$$ref$1.pointer); + /// new + static NSIndexSet new$() { + final $ret = _objc_msgSend_151sglz(_class_NSIndexSet, _sel_new); + return NSIndexSet.fromPointer($ret, retain: false, release: true); } - /// unionSet: - void unionSet(NSSet otherSet) { - final _$$ref = object$.ref; - final _$$ref$1 = otherSet.ref; - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_unionSet_, _$$ref$1.pointer); + /// supportsSecureCoding + static bool getSupportsSecureCoding() { + return _objc_msgSend_91o635(_class_NSIndexSet, _sel_supportsSecureCoding); } + + /// Returns a new instance of NSIndexSet constructed with the default `new` method. + NSIndexSet() : this.as(new$().object$); } -/// NSExtendedOrderedSet -extension NSExtendedOrderedSet on NSOrderedSet { - /// array - NSArray get array { +extension NSIndexSet$Methods on NSIndexSet { + /// containsIndex: + bool containsIndex(DartNSUInteger value) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.array', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_array); - return NSArray.fromPointer($ret, retain: true, release: true); + return _objc_msgSend_6peh6o(_$$ref.pointer, _sel_containsIndex_, value); } - /// containsObject: - bool containsObject(objc.ObjCObject object) { + /// containsIndexes: + bool containsIndexes(NSIndexSet indexSet) { final _$$ref = object$.ref; - final _$$ref$1 = object.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.containsObject:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); + final _$$ref$1 = indexSet.ref; return _objc_msgSend_19nvye5( _$$ref.pointer, - _sel_containsObject_, + _sel_containsIndexes_, _$$ref$1.pointer, ); } - /// description - NSString get description$1 { + /// containsIndexesInRange: + bool containsIndexesInRange(NSRange range) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.description', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + return _objc_msgSend_p4nurx( + _$$ref.pointer, + _sel_containsIndexesInRange_, + range, ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_description); - return NSString.fromPointer($ret, retain: true, release: true); } - /// descriptionWithLocale: - NSString descriptionWithLocale(objc.ObjCObject? locale) { + /// count + DartNSUInteger get count { final _$$ref = object$.ref; - final _$$ref$1 = locale?.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.descriptionWithLocale:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_descriptionWithLocale_, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - return NSString.fromPointer($ret, retain: true, release: true); + return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_count); } - /// descriptionWithLocale:indent: - NSString descriptionWithLocale$1( - objc.ObjCObject? locale, { - required DartNSUInteger indent, - }) { + /// countOfIndexesInRange: + DartNSUInteger countOfIndexesInRange(NSRange range) { final _$$ref = object$.ref; - final _$$ref$1 = locale?.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.descriptionWithLocale:indent:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSIndexSet.countOfIndexesInRange:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), ); - final $ret = _objc_msgSend_1k4kd9s( + return _objc_msgSend_qm9f5w( _$$ref.pointer, - _sel_descriptionWithLocale_indent_, - _$$ref$1?.pointer ?? ffi.nullptr, - indent, + _sel_countOfIndexesInRange_, + range, ); - return NSString.fromPointer($ret, retain: true, release: true); } - /// enumerateObjectsAtIndexes:options:usingBlock: - void enumerateObjectsAtIndexes( - NSIndexSet s, { + /// encodeWithCoder: + void encodeWithCoder(NSCoder coder) { + final _$$ref$16 = object$.ref; + final _$$ref$17 = coder.ref; + _objc_msgSend_xtuoz7( + _$$ref$16.pointer, + _sel_encodeWithCoder_, + _$$ref$17.pointer, + ); + } + + /// enumerateIndexesInRange:options:usingBlock: + void enumerateIndexesInRange( + NSRange range, { required DartNSUInteger options, required objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) + ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) > usingBlock, }) { final _$$ref = object$.ref; - final _$$ref$1 = s.ref; - final _$$ref$2 = usingBlock.ref; + final _$$ref$1 = usingBlock.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.enumerateObjectsAtIndexes:options:usingBlock:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSIndexSet.enumerateIndexesInRange:options:usingBlock:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - _objc_msgSend_a3wp08( + _objc_msgSend_177cajs( _$$ref.pointer, - _sel_enumerateObjectsAtIndexes_options_usingBlock_, - _$$ref$1.pointer, + _sel_enumerateIndexesInRange_options_usingBlock_, + range, options, - _$$ref$2.pointer, + _$$ref$1.pointer, ); } - /// enumerateObjectsUsingBlock: - void enumerateObjectsUsingBlock( - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - > + /// enumerateIndexesUsingBlock: + void enumerateIndexesUsingBlock( + objc.ObjCBlock)> block, ) { final _$$ref = object$.ref; final _$$ref$1 = block.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.enumerateObjectsUsingBlock:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSIndexSet.enumerateIndexesUsingBlock:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); _objc_msgSend_f167m6( _$$ref.pointer, - _sel_enumerateObjectsUsingBlock_, + _sel_enumerateIndexesUsingBlock_, _$$ref$1.pointer, ); } - /// enumerateObjectsWithOptions:usingBlock: - void enumerateObjectsWithOptions( + /// enumerateIndexesWithOptions:usingBlock: + void enumerateIndexesWithOptions( DartNSUInteger opts, { required objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) + ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) > usingBlock, }) { final _$$ref = object$.ref; final _$$ref$1 = usingBlock.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.enumerateObjectsWithOptions:usingBlock:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSIndexSet.enumerateIndexesWithOptions:usingBlock:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); _objc_msgSend_yx8yc6( _$$ref.pointer, - _sel_enumerateObjectsWithOptions_usingBlock_, + _sel_enumerateIndexesWithOptions_usingBlock_, opts, _$$ref$1.pointer, ); } - /// firstObject - objc.ObjCObject? get firstObject { + /// enumerateRangesInRange:options:usingBlock: + void enumerateRangesInRange( + NSRange range, { + required DartNSUInteger options, + required objc.ObjCBlock)> + usingBlock, + }) { final _$$ref = object$.ref; + final _$$ref$1 = usingBlock.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.firstObject', + 'NSIndexSet.enumerateRangesInRange:options:usingBlock:', iOS: (false, (5, 0, 0)), macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_firstObject); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); - } - - /// getObjects:range: - void getObjects( - ffi.Pointer> objects, { - required NSRange range, - }) { - final _$$ref = object$.ref; - _objc_msgSend_o16d3k( + _objc_msgSend_177cajs( _$$ref.pointer, - _sel_getObjects_range_, - objects, + _sel_enumerateRangesInRange_options_usingBlock_, range, + options, + _$$ref$1.pointer, ); } - /// indexOfObject:inSortedRange:options:usingComparator: - DartNSUInteger indexOfObject$1( - objc.ObjCObject object, { - required NSRange inSortedRange, - required DartNSUInteger options, - required objc.ObjCBlock< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ) - > - usingComparator, - }) { + /// enumerateRangesUsingBlock: + void enumerateRangesUsingBlock( + objc.ObjCBlock)> block, + ) { final _$$ref = object$.ref; - final _$$ref$1 = object.ref; - final _$$ref$2 = usingComparator.ref; + final _$$ref$1 = block.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.indexOfObject:inSortedRange:options:usingComparator:', + 'NSIndexSet.enumerateRangesUsingBlock:', iOS: (false, (5, 0, 0)), macOS: (false, (10, 7, 0)), ); - return _objc_msgSend_kshx9d( + _objc_msgSend_f167m6( _$$ref.pointer, - _sel_indexOfObject_inSortedRange_options_usingComparator_, + _sel_enumerateRangesUsingBlock_, _$$ref$1.pointer, - inSortedRange, - options, - _$$ref$2.pointer, ); } - /// indexOfObjectAtIndexes:options:passingTest: - DartNSUInteger indexOfObjectAtIndexes( - NSIndexSet s, { - required DartNSUInteger options, - required objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - > - passingTest, + /// enumerateRangesWithOptions:usingBlock: + void enumerateRangesWithOptions( + DartNSUInteger opts, { + required objc.ObjCBlock)> + usingBlock, }) { final _$$ref = object$.ref; - final _$$ref$1 = s.ref; - final _$$ref$2 = passingTest.ref; + final _$$ref$1 = usingBlock.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.indexOfObjectAtIndexes:options:passingTest:', + 'NSIndexSet.enumerateRangesWithOptions:usingBlock:', iOS: (false, (5, 0, 0)), macOS: (false, (10, 7, 0)), ); - return _objc_msgSend_k1x6mt( + _objc_msgSend_yx8yc6( _$$ref.pointer, - _sel_indexOfObjectAtIndexes_options_passingTest_, + _sel_enumerateRangesWithOptions_usingBlock_, + opts, _$$ref$1.pointer, - options, - _$$ref$2.pointer, ); } - /// indexOfObjectPassingTest: - DartNSUInteger indexOfObjectPassingTest( - objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) + /// firstIndex + DartNSUInteger get firstIndex { + final _$$ref = object$.ref; + return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_firstIndex); + } + + /// getIndexes:maxCount:inIndexRange: + DartNSUInteger getIndexes( + ffi.Pointer indexBuffer, { + required DartNSUInteger maxCount, + required ffi.Pointer inIndexRange, + }) { + final _$$ref = object$.ref; + return _objc_msgSend_89xgla( + _$$ref.pointer, + _sel_getIndexes_maxCount_inIndexRange_, + indexBuffer, + maxCount, + inIndexRange, + ); + } + + /// indexGreaterThanIndex: + DartNSUInteger indexGreaterThanIndex(DartNSUInteger value) { + final _$$ref = object$.ref; + return _objc_msgSend_12py2ux( + _$$ref.pointer, + _sel_indexGreaterThanIndex_, + value, + ); + } + + /// indexGreaterThanOrEqualToIndex: + DartNSUInteger indexGreaterThanOrEqualToIndex(DartNSUInteger value) { + final _$$ref = object$.ref; + return _objc_msgSend_12py2ux( + _$$ref.pointer, + _sel_indexGreaterThanOrEqualToIndex_, + value, + ); + } + + /// indexInRange:options:passingTest: + DartNSUInteger indexInRange( + NSRange range, { + required DartNSUInteger options, + required objc.ObjCBlock< + ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) > + passingTest, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = passingTest.ref; + objc.checkOsVersionInternal( + 'NSIndexSet.indexInRange:options:passingTest:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + return _objc_msgSend_6jmuyz( + _$$ref.pointer, + _sel_indexInRange_options_passingTest_, + range, + options, + _$$ref$1.pointer, + ); + } + + /// indexLessThanIndex: + DartNSUInteger indexLessThanIndex(DartNSUInteger value) { + final _$$ref = object$.ref; + return _objc_msgSend_12py2ux( + _$$ref.pointer, + _sel_indexLessThanIndex_, + value, + ); + } + + /// indexLessThanOrEqualToIndex: + DartNSUInteger indexLessThanOrEqualToIndex(DartNSUInteger value) { + final _$$ref = object$.ref; + return _objc_msgSend_12py2ux( + _$$ref.pointer, + _sel_indexLessThanOrEqualToIndex_, + value, + ); + } + + /// indexPassingTest: + DartNSUInteger indexPassingTest( + objc.ObjCBlock)> predicate, ) { final _$$ref = object$.ref; final _$$ref$1 = predicate.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.indexOfObjectPassingTest:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSIndexSet.indexPassingTest:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); return _objc_msgSend_10mlopr( _$$ref.pointer, - _sel_indexOfObjectPassingTest_, + _sel_indexPassingTest_, _$$ref$1.pointer, ); } - /// indexOfObjectWithOptions:passingTest: - DartNSUInteger indexOfObjectWithOptions( + /// indexWithOptions:passingTest: + DartNSUInteger indexWithOptions( DartNSUInteger opts, { required objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) + ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) > passingTest, }) { final _$$ref = object$.ref; final _$$ref$1 = passingTest.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.indexOfObjectWithOptions:passingTest:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSIndexSet.indexWithOptions:passingTest:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); return _objc_msgSend_1698hqz( _$$ref.pointer, - _sel_indexOfObjectWithOptions_passingTest_, + _sel_indexWithOptions_passingTest_, opts, _$$ref$1.pointer, ); } - /// indexesOfObjectsAtIndexes:options:passingTest: - NSIndexSet indexesOfObjectsAtIndexes( - NSIndexSet s, { + /// indexesInRange:options:passingTest: + NSIndexSet indexesInRange( + NSRange range, { required DartNSUInteger options, required objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) + ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) > passingTest, }) { final _$$ref = object$.ref; - final _$$ref$1 = s.ref; - final _$$ref$2 = passingTest.ref; + final _$$ref$1 = passingTest.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.indexesOfObjectsAtIndexes:options:passingTest:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSIndexSet.indexesInRange:options:passingTest:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - final $ret = _objc_msgSend_1i9v144( + final $ret = _objc_msgSend_1q30cs4( _$$ref.pointer, - _sel_indexesOfObjectsAtIndexes_options_passingTest_, - _$$ref$1.pointer, + _sel_indexesInRange_options_passingTest_, + range, options, - _$$ref$2.pointer, + _$$ref$1.pointer, ); return NSIndexSet.fromPointer($ret, retain: true, release: true); } - /// indexesOfObjectsPassingTest: - NSIndexSet indexesOfObjectsPassingTest( - objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - > + /// indexesPassingTest: + NSIndexSet indexesPassingTest( + objc.ObjCBlock)> predicate, ) { final _$$ref = object$.ref; final _$$ref$1 = predicate.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.indexesOfObjectsPassingTest:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSIndexSet.indexesPassingTest:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); final $ret = _objc_msgSend_nnxkei( _$$ref.pointer, - _sel_indexesOfObjectsPassingTest_, + _sel_indexesPassingTest_, _$$ref$1.pointer, ); return NSIndexSet.fromPointer($ret, retain: true, release: true); } - /// indexesOfObjectsWithOptions:passingTest: - NSIndexSet indexesOfObjectsWithOptions( + /// indexesWithOptions:passingTest: + NSIndexSet indexesWithOptions( DartNSUInteger opts, { required objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) + ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) > passingTest, }) { final _$$ref = object$.ref; final _$$ref$1 = passingTest.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.indexesOfObjectsWithOptions:passingTest:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSIndexSet.indexesWithOptions:passingTest:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); final $ret = _objc_msgSend_13x5boi( _$$ref.pointer, - _sel_indexesOfObjectsWithOptions_passingTest_, + _sel_indexesWithOptions_passingTest_, opts, _$$ref$1.pointer, ); return NSIndexSet.fromPointer($ret, retain: true, release: true); } - /// intersectsOrderedSet: - bool intersectsOrderedSet(NSOrderedSet other) { - final _$$ref = object$.ref; - final _$$ref$1 = other.ref; + /// init + NSIndexSet init() { + final _$$ref$16 = object$.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.intersectsOrderedSet:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSIndexSet.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_intersectsOrderedSet_, - _$$ref$1.pointer, + final $ret = _objc_msgSend_151sglz( + _$$ref$16.retainAndReturnPointer(), + _sel_init, ); + return NSIndexSet.fromPointer($ret, retain: false, release: true); } - /// intersectsSet: - bool intersectsSet(NSSet set) { + /// initWithCoder: + NSIndexSet? initWithCoder(NSCoder coder) { + final _$$ref$16 = object$.ref; + final _$$ref$17 = coder.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref$16.retainAndReturnPointer(), + _sel_initWithCoder_, + _$$ref$17.pointer, + ); + return $ret.address == 0 + ? null + : NSIndexSet.fromPointer($ret, retain: false, release: true); + } + + /// initWithIndex: + NSIndexSet initWithIndex(DartNSUInteger value) { final _$$ref = object$.ref; - final _$$ref$1 = set.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.intersectsSet:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + final $ret = _objc_msgSend_14hpxwa( + _$$ref.retainAndReturnPointer(), + _sel_initWithIndex_, + value, ); - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_intersectsSet_, + return NSIndexSet.fromPointer($ret, retain: false, release: true); + } + + /// initWithIndexSet: + NSIndexSet initWithIndexSet(NSIndexSet indexSet) { + final _$$ref = object$.ref; + final _$$ref$1 = indexSet.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.retainAndReturnPointer(), + _sel_initWithIndexSet_, _$$ref$1.pointer, ); + return NSIndexSet.fromPointer($ret, retain: false, release: true); } - /// isEqualToOrderedSet: - bool isEqualToOrderedSet(NSOrderedSet other) { + /// initWithIndexesInRange: + NSIndexSet initWithIndexesInRange(NSRange range) { final _$$ref = object$.ref; - final _$$ref$1 = other.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.isEqualToOrderedSet:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + final $ret = _objc_msgSend_1k1o1s7( + _$$ref.retainAndReturnPointer(), + _sel_initWithIndexesInRange_, + range, ); - return _objc_msgSend_19nvye5( + return NSIndexSet.fromPointer($ret, retain: false, release: true); + } + + /// intersectsIndexesInRange: + bool intersectsIndexesInRange(NSRange range) { + final _$$ref = object$.ref; + return _objc_msgSend_p4nurx( _$$ref.pointer, - _sel_isEqualToOrderedSet_, - _$$ref$1.pointer, + _sel_intersectsIndexesInRange_, + range, ); } - /// isSubsetOfOrderedSet: - bool isSubsetOfOrderedSet(NSOrderedSet other) { + /// isEqualToIndexSet: + bool isEqualToIndexSet(NSIndexSet indexSet) { final _$$ref = object$.ref; - final _$$ref$1 = other.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.isSubsetOfOrderedSet:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); + final _$$ref$1 = indexSet.ref; return _objc_msgSend_19nvye5( _$$ref.pointer, - _sel_isSubsetOfOrderedSet_, + _sel_isEqualToIndexSet_, _$$ref$1.pointer, ); } - /// isSubsetOfSet: - bool isSubsetOfSet(NSSet set) { + /// lastIndex + DartNSUInteger get lastIndex { final _$$ref = object$.ref; - final _$$ref$1 = set.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.isSubsetOfSet:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_lastIndex); + } +} + +/// NSInputStream +extension type NSInputStream._(objc.ObjCObject object$) + implements objc.ObjCObject, NSStream { + /// Constructs a [NSInputStream] that points to the same underlying object as [other]. + NSInputStream.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NSInputStream] that wraps the given raw object pointer. + NSInputStream.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + assert(isA(object$)); + } + + /// Returns whether [obj] is an instance of [NSInputStream]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSInputStream, + ); + + /// alloc + static NSInputStream alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSInputStream, _sel_alloc); + return NSInputStream.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NSInputStream allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSInputStream, + _sel_allocWithZone_, + zone, ); - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_isSubsetOfSet_, + return NSInputStream.fromPointer($ret, retain: false, release: true); + } + + /// inputStreamWithData: + static NSInputStream? inputStreamWithData(NSData data) { + final _$$ref$1 = data.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSInputStream, + _sel_inputStreamWithData_, _$$ref$1.pointer, ); + return $ret.address == 0 + ? null + : NSInputStream.fromPointer($ret, retain: true, release: true); } - /// lastObject - objc.ObjCObject? get lastObject { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.lastObject', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + /// inputStreamWithFileAtPath: + static NSInputStream? inputStreamWithFileAtPath(NSString path) { + final _$$ref$1 = path.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSInputStream, + _sel_inputStreamWithFileAtPath_, + _$$ref$1.pointer, ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_lastObject); return $ret.address == 0 ? null - : objc.ObjCObject($ret, retain: true, release: true); + : NSInputStream.fromPointer($ret, retain: true, release: true); } - /// objectAtIndexedSubscript: - objc.ObjCObject objectAtIndexedSubscript(DartNSUInteger idx) { - final _$$ref = object$.ref; + /// inputStreamWithURL: + static NSInputStream? inputStreamWithURL(NSURL url) { + final _$$ref$1 = url.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.objectAtIndexedSubscript:', - iOS: (false, (6, 0, 0)), - macOS: (false, (10, 8, 0)), + 'NSInputStream.inputStreamWithURL:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - final $ret = _objc_msgSend_14hpxwa( - _$$ref.pointer, - _sel_objectAtIndexedSubscript_, - idx, + final $ret = _objc_msgSend_1sotr3r( + _class_NSInputStream, + _sel_inputStreamWithURL_, + _$$ref$1.pointer, ); - return objc.ObjCObject($ret, retain: true, release: true); + return $ret.address == 0 + ? null + : NSInputStream.fromPointer($ret, retain: true, release: true); } - /// objectEnumerator - NSEnumerator objectEnumerator() { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.objectEnumerator', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_objectEnumerator); - return NSEnumerator.fromPointer($ret, retain: true, release: true); + /// new + static NSInputStream new$() { + final $ret = _objc_msgSend_151sglz(_class_NSInputStream, _sel_new); + return NSInputStream.fromPointer($ret, retain: false, release: true); } - /// objectsAtIndexes: - NSArray objectsAtIndexes(NSIndexSet indexes) { + /// Returns a new instance of NSInputStream constructed with the default `new` method. + NSInputStream() : this.as(new$().object$); +} + +extension NSInputStream$Methods on NSInputStream { + /// getBuffer:length: + bool getBuffer( + ffi.Pointer> buffer, { + required ffi.Pointer length, + }) { final _$$ref = object$.ref; - final _$$ref$1 = indexes.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.objectsAtIndexes:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( + return _objc_msgSend_19lrthf( _$$ref.pointer, - _sel_objectsAtIndexes_, - _$$ref$1.pointer, + _sel_getBuffer_length_, + buffer, + length, ); - return NSArray.fromPointer($ret, retain: true, release: true); } - /// reverseObjectEnumerator - NSEnumerator reverseObjectEnumerator() { + /// hasBytesAvailable + bool get hasBytesAvailable { final _$$ref = object$.ref; + return _objc_msgSend_91o635(_$$ref.pointer, _sel_hasBytesAvailable); + } + + /// init + NSInputStream init() { + final _$$ref$17 = object$.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.reverseObjectEnumerator', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSInputStream.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_reverseObjectEnumerator, + _$$ref$17.retainAndReturnPointer(), + _sel_init, ); - return NSEnumerator.fromPointer($ret, retain: true, release: true); + return NSInputStream.fromPointer($ret, retain: false, release: true); } - /// reversedOrderedSet - NSOrderedSet get reversedOrderedSet { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.reversedOrderedSet', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + /// initWithData: + NSInputStream initWithData(NSData data) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = data.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithData_, + _$$ref$3.pointer, ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_reversedOrderedSet); - return NSOrderedSet.fromPointer($ret, retain: true, release: true); + return NSInputStream.fromPointer($ret, retain: false, release: true); } - /// set - NSSet get set { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.set', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + /// initWithFileAtPath: + NSInputStream? initWithFileAtPath(NSString path) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = path.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithFileAtPath_, + _$$ref$3.pointer, ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_set); - return NSSet.fromPointer($ret, retain: true, release: true); + return $ret.address == 0 + ? null + : NSInputStream.fromPointer($ret, retain: false, release: true); } - /// sortedArrayUsingComparator: - NSArray sortedArrayUsingComparator( - objc.ObjCBlock< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ) - > - cmptr, - ) { - final _$$ref = object$.ref; - final _$$ref$1 = cmptr.ref; + /// initWithURL: + NSInputStream? initWithURL(NSURL url) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = url.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.sortedArrayUsingComparator:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSInputStream.initWithURL:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - final $ret = _objc_msgSend_nnxkei( - _$$ref.pointer, - _sel_sortedArrayUsingComparator_, - _$$ref$1.pointer, + final $ret = _objc_msgSend_1sotr3r( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithURL_, + _$$ref$3.pointer, ); - return NSArray.fromPointer($ret, retain: true, release: true); + return $ret.address == 0 + ? null + : NSInputStream.fromPointer($ret, retain: false, release: true); } - /// sortedArrayWithOptions:usingComparator: - NSArray sortedArrayWithOptions( - DartNSUInteger opts, { - required objc.ObjCBlock< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ) - > - usingComparator, - }) { + /// read:maxLength: + int read(ffi.Pointer buffer, {required DartNSUInteger maxLength}) { final _$$ref = object$.ref; - final _$$ref$1 = usingComparator.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.sortedArrayWithOptions:usingComparator:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_1x5ew3h( + return _objc_msgSend_11e9f5x( _$$ref.pointer, - _sel_sortedArrayWithOptions_usingComparator_, - opts, - _$$ref$1.pointer, + _sel_read_maxLength_, + buffer, + maxLength, ); - return NSArray.fromPointer($ret, retain: true, release: true); } } -/// NSExtendedSet -extension NSExtendedSet on NSSet { - /// allObjects - NSArray get allObjects { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_allObjects); - return NSArray.fromPointer($ret, retain: true, release: true); +/// NSInvocation +extension type NSInvocation._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject { + /// Constructs a [NSInvocation] that points to the same underlying object as [other]. + NSInvocation.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); } - /// anyObject - objc.ObjCObject? anyObject() { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_anyObject); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); + /// Constructs a [NSInvocation] that wraps the given raw object pointer. + NSInvocation.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + assert(isA(object$)); } - /// containsObject: - bool containsObject(objc.ObjCObject anObject) { - final _$$ref = object$.ref; - final _$$ref$1 = anObject.ref; - return _objc_msgSend_19nvye5( + /// Returns whether [obj] is an instance of [NSInvocation]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSInvocation, + ); + + /// alloc + static NSInvocation alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSInvocation, _sel_alloc); + return NSInvocation.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NSInvocation allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSInvocation, + _sel_allocWithZone_, + zone, + ); + return NSInvocation.fromPointer($ret, retain: false, release: true); + } + + /// invocationWithMethodSignature: + static NSInvocation invocationWithMethodSignature(NSMethodSignature sig) { + final _$$ref = sig.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSInvocation, + _sel_invocationWithMethodSignature_, _$$ref.pointer, - _sel_containsObject_, - _$$ref$1.pointer, ); + return NSInvocation.fromPointer($ret, retain: true, release: true); } - /// description - NSString get description$1 { + /// new + static NSInvocation new$() { + final $ret = _objc_msgSend_151sglz(_class_NSInvocation, _sel_new); + return NSInvocation.fromPointer($ret, retain: false, release: true); + } + + /// Returns a new instance of NSInvocation constructed with the default `new` method. + NSInvocation() : this.as(new$().object$); +} + +extension NSInvocation$Methods on NSInvocation { + /// argumentsRetained + bool get argumentsRetained { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_description); - return NSString.fromPointer($ret, retain: true, release: true); + return _objc_msgSend_91o635(_$$ref.pointer, _sel_argumentsRetained); } - /// descriptionWithLocale: - NSString descriptionWithLocale(objc.ObjCObject? locale) { + /// getArgument:atIndex: + void getArgument( + ffi.Pointer argumentLocation, { + required int atIndex, + }) { final _$$ref = object$.ref; - final _$$ref$1 = locale?.ref; - final $ret = _objc_msgSend_1sotr3r( + _objc_msgSend_unr2j3( _$$ref.pointer, - _sel_descriptionWithLocale_, - _$$ref$1?.pointer ?? ffi.nullptr, + _sel_getArgument_atIndex_, + argumentLocation, + atIndex, ); - return NSString.fromPointer($ret, retain: true, release: true); } - /// enumerateObjectsUsingBlock: - void enumerateObjectsUsingBlock( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.Pointer) - > - block, - ) { + /// getReturnValue: + void getReturnValue(ffi.Pointer retLoc) { final _$$ref = object$.ref; - final _$$ref$1 = block.ref; + _objc_msgSend_ovsamd(_$$ref.pointer, _sel_getReturnValue_, retLoc); + } + + /// init + NSInvocation init() { + final _$$ref$18 = object$.ref; objc.checkOsVersionInternal( - 'NSSet.enumerateObjectsUsingBlock:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSInvocation.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - _objc_msgSend_f167m6( - _$$ref.pointer, - _sel_enumerateObjectsUsingBlock_, - _$$ref$1.pointer, + final $ret = _objc_msgSend_151sglz( + _$$ref$18.retainAndReturnPointer(), + _sel_init, ); + return NSInvocation.fromPointer($ret, retain: false, release: true); } - /// enumerateObjectsWithOptions:usingBlock: - void enumerateObjectsWithOptions( - DartNSUInteger opts, { - required objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.Pointer) - > - usingBlock, - }) { + /// invoke + void invoke() { final _$$ref = object$.ref; - final _$$ref$1 = usingBlock.ref; - objc.checkOsVersionInternal( - 'NSSet.enumerateObjectsWithOptions:usingBlock:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - _objc_msgSend_yx8yc6( - _$$ref.pointer, - _sel_enumerateObjectsWithOptions_usingBlock_, - opts, - _$$ref$1.pointer, - ); + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_invoke); } - /// intersectsSet: - bool intersectsSet(NSSet otherSet) { + /// invokeUsingIMP: + void invokeUsingIMP( + ffi.Pointer> imp, + ) { final _$$ref = object$.ref; - final _$$ref$1 = otherSet.ref; - return _objc_msgSend_19nvye5( + _objc_msgSend_agmudd(_$$ref.pointer, _sel_invokeUsingIMP_, imp); + } + + /// invokeWithTarget: + void invokeWithTarget(objc.ObjCObject target) { + final _$$ref = object$.ref; + final _$$ref$1 = target.ref; + _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_intersectsSet_, + _sel_invokeWithTarget_, _$$ref$1.pointer, ); } - /// isEqualToSet: - bool isEqualToSet(NSSet otherSet) { + /// methodSignature + NSMethodSignature get methodSignature { final _$$ref = object$.ref; - final _$$ref$1 = otherSet.ref; - return _objc_msgSend_19nvye5( + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_methodSignature); + return NSMethodSignature.fromPointer($ret, retain: true, release: true); + } + + /// retainArguments + void retainArguments() { + final _$$ref = object$.ref; + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_retainArguments); + } + + /// selector + ffi.Pointer get selector { + final _$$ref = object$.ref; + return _objc_msgSend_1ovaulg(_$$ref.pointer, _sel_selector); + } + + /// setArgument:atIndex: + void setArgument( + ffi.Pointer argumentLocation, { + required int atIndex, + }) { + final _$$ref = object$.ref; + _objc_msgSend_unr2j3( _$$ref.pointer, - _sel_isEqualToSet_, - _$$ref$1.pointer, + _sel_setArgument_atIndex_, + argumentLocation, + atIndex, ); } - /// isSubsetOfSet: - bool isSubsetOfSet(NSSet otherSet) { + /// setReturnValue: + void setReturnValue(ffi.Pointer retLoc) { final _$$ref = object$.ref; - final _$$ref$1 = otherSet.ref; - return _objc_msgSend_19nvye5( + _objc_msgSend_ovsamd(_$$ref.pointer, _sel_setReturnValue_, retLoc); + } + + /// setSelector: + set selector(ffi.Pointer value) { + final _$$ref = object$.ref; + _objc_msgSend_1d9e4oe(_$$ref.pointer, _sel_setSelector_, value); + } + + /// setTarget: + set target(objc.ObjCObject? value) { + final _$$ref = object$.ref; + final _$$ref$1 = value?.ref; + _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_isSubsetOfSet_, - _$$ref$1.pointer, + _sel_setTarget_, + _$$ref$1?.pointer ?? ffi.nullptr, ); } - /// makeObjectsPerformSelector: - void makeObjectsPerformSelector(ffi.Pointer aSelector) { + /// target + objc.ObjCObject? get target { final _$$ref = object$.ref; - _objc_msgSend_1d9e4oe( - _$$ref.pointer, - _sel_makeObjectsPerformSelector_, - aSelector, + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_target); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); + } +} + +/// NSItemProvider +extension type NSItemProvider._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject, NSCopying { + /// Constructs a [NSItemProvider] that points to the same underlying object as [other]. + NSItemProvider.as(objc.ObjCObject other) : object$ = other { + objc.checkOsVersionInternal( + 'NSItemProvider', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), ); + assert(isA(object$)); } - /// makeObjectsPerformSelector:withObject: - void makeObjectsPerformSelector$1( - ffi.Pointer aSelector, { - objc.ObjCObject? withObject, - }) { + /// Constructs a [NSItemProvider] that wraps the given raw object pointer. + NSItemProvider.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + objc.checkOsVersionInternal( + 'NSItemProvider', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + assert(isA(object$)); + } + + /// Returns whether [obj] is an instance of [NSItemProvider]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSItemProvider, + ); + + /// alloc + static NSItemProvider alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSItemProvider, _sel_alloc); + return NSItemProvider.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NSItemProvider allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSItemProvider, + _sel_allocWithZone_, + zone, + ); + return NSItemProvider.fromPointer($ret, retain: false, release: true); + } + + /// new + static NSItemProvider new$() { + final $ret = _objc_msgSend_151sglz(_class_NSItemProvider, _sel_new); + return NSItemProvider.fromPointer($ret, retain: false, release: true); + } + + /// Returns a new instance of NSItemProvider constructed with the default `new` method. + NSItemProvider() : this.as(new$().object$); +} + +extension NSItemProvider$Methods on NSItemProvider { + /// canLoadObjectOfClass: + bool canLoadObjectOfClass(NSItemProviderReading aClass) { final _$$ref = object$.ref; - final _$$ref$1 = withObject?.ref; - _objc_msgSend_1qv0eq4( + final _$$ref$1 = aClass.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.canLoadObjectOfClass:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + return _objc_msgSend_19nvye5( _$$ref.pointer, - _sel_makeObjectsPerformSelector_withObject_, - aSelector, - _$$ref$1?.pointer ?? ffi.nullptr, + _sel_canLoadObjectOfClass_, + _$$ref$1.pointer, ); } - /// objectsPassingTest: - NSSet objectsPassingTest( - objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, ffi.Pointer) - > - predicate, - ) { + /// hasItemConformingToTypeIdentifier: + bool hasItemConformingToTypeIdentifier(NSString typeIdentifier) { final _$$ref = object$.ref; - final _$$ref$1 = predicate.ref; + final _$$ref$1 = typeIdentifier.ref; objc.checkOsVersionInternal( - 'NSSet.objectsPassingTest:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSItemProvider.hasItemConformingToTypeIdentifier:', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), ); - final $ret = _objc_msgSend_nnxkei( + return _objc_msgSend_19nvye5( _$$ref.pointer, - _sel_objectsPassingTest_, + _sel_hasItemConformingToTypeIdentifier_, _$$ref$1.pointer, ); - return NSSet.fromPointer($ret, retain: true, release: true); } - /// objectsWithOptions:passingTest: - NSSet objectsWithOptions( - DartNSUInteger opts, { - required objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, ffi.Pointer) - > - passingTest, + /// hasRepresentationConformingToTypeIdentifier:fileOptions: + bool hasRepresentationConformingToTypeIdentifier( + NSString typeIdentifier, { + required int fileOptions, }) { final _$$ref = object$.ref; - final _$$ref$1 = passingTest.ref; + final _$$ref$1 = typeIdentifier.ref; objc.checkOsVersionInternal( - 'NSSet.objectsWithOptions:passingTest:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSItemProvider.hasRepresentationConformingToTypeIdentifier:fileOptions:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), ); - final $ret = _objc_msgSend_13x5boi( + return _objc_msgSend_1wdb8ji( _$$ref.pointer, - _sel_objectsWithOptions_passingTest_, - opts, + _sel_hasRepresentationConformingToTypeIdentifier_fileOptions_, _$$ref$1.pointer, + fileOptions, ); - return NSSet.fromPointer($ret, retain: true, release: true); } - /// setByAddingObject: - NSSet setByAddingObject(objc.ObjCObject anObject) { - final _$$ref = object$.ref; - final _$$ref$1 = anObject.ref; + /// init + NSItemProvider init() { + final _$$ref$19 = object$.ref; objc.checkOsVersionInternal( - 'NSSet.setByAddingObject:', + 'NSItemProvider.init', iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), + macOS: (false, (10, 0, 0)), ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_setByAddingObject_, - _$$ref$1.pointer, + final $ret = _objc_msgSend_151sglz( + _$$ref$19.retainAndReturnPointer(), + _sel_init, ); - return NSSet.fromPointer($ret, retain: true, release: true); + return NSItemProvider.fromPointer($ret, retain: false, release: true); } - /// setByAddingObjectsFromArray: - NSSet setByAddingObjectsFromArray(NSArray other) { + /// initWithContentsOfURL: + NSItemProvider? initWithContentsOfURL(NSURL fileURL) { final _$$ref = object$.ref; - final _$$ref$1 = other.ref; + final _$$ref$1 = fileURL.ref; objc.checkOsVersionInternal( - 'NSSet.setByAddingObjectsFromArray:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), + 'NSItemProvider.initWithContentsOfURL:', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), ); final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_setByAddingObjectsFromArray_, + _$$ref.retainAndReturnPointer(), + _sel_initWithContentsOfURL_, _$$ref$1.pointer, ); - return NSSet.fromPointer($ret, retain: true, release: true); + return $ret.address == 0 + ? null + : NSItemProvider.fromPointer($ret, retain: false, release: true); } - /// setByAddingObjectsFromSet: - NSSet setByAddingObjectsFromSet(NSSet other) { + /// initWithItem:typeIdentifier: + NSItemProvider initWithItem( + NSSecureCoding? item, { + NSString? typeIdentifier, + }) { final _$$ref = object$.ref; - final _$$ref$1 = other.ref; + final _$$ref$1 = item?.ref; + final _$$ref$2 = typeIdentifier?.ref; objc.checkOsVersionInternal( - 'NSSet.setByAddingObjectsFromSet:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), + 'NSItemProvider.initWithItem:typeIdentifier:', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_setByAddingObjectsFromSet_, - _$$ref$1.pointer, + final $ret = _objc_msgSend_15qeuct( + _$$ref.retainAndReturnPointer(), + _sel_initWithItem_typeIdentifier_, + _$$ref$1?.pointer ?? ffi.nullptr, + _$$ref$2?.pointer ?? ffi.nullptr, ); - return NSSet.fromPointer($ret, retain: true, release: true); + return NSItemProvider.fromPointer($ret, retain: false, release: true); } -} -/// NSExtendedStringPropertyListParsing -extension NSExtendedStringPropertyListParsing on NSString { - /// propertyList - objc.ObjCObject propertyList() { + /// initWithObject: + NSItemProvider initWithObject(NSItemProviderWriting object) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_propertyList); - return objc.ObjCObject($ret, retain: true, release: true); + final _$$ref$1 = object.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.initWithObject:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.retainAndReturnPointer(), + _sel_initWithObject_, + _$$ref$1.pointer, + ); + return NSItemProvider.fromPointer($ret, retain: false, release: true); } - /// propertyListFromStringsFileFormat - NSDictionary? propertyListFromStringsFileFormat() { + /// loadDataRepresentationForTypeIdentifier:completionHandler: + NSProgress loadDataRepresentationForTypeIdentifier( + NSString typeIdentifier, { + required objc.ObjCBlock + completionHandler, + }) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz( + final _$$ref$1 = typeIdentifier.ref; + final _$$ref$2 = completionHandler.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.loadDataRepresentationForTypeIdentifier:completionHandler:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + final $ret = _objc_msgSend_r0bo0s( _$$ref.pointer, - _sel_propertyListFromStringsFileFormat, + _sel_loadDataRepresentationForTypeIdentifier_completionHandler_, + _$$ref$1.pointer, + _$$ref$2.pointer, ); - return $ret.address == 0 - ? null - : NSDictionary.fromPointer($ret, retain: true, release: true); + return NSProgress.fromPointer($ret, retain: true, release: true); } -} -/// NSFastEnumeration -extension type NSFastEnumeration._(objc.ObjCProtocol object$) - implements objc.ObjCProtocol { - /// Constructs a [NSFastEnumeration] that points to the same underlying object as [other]. - NSFastEnumeration.as(objc.ObjCObject other) : object$ = other; - - /// Constructs a [NSFastEnumeration] that wraps the given raw object pointer. - NSFastEnumeration.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); - - /// Returns whether [obj] is an instance of [NSFastEnumeration]. - static bool conformsTo(objc.ObjCObject obj) { - return _objc_msgSend_e3qsqz( - obj.ref.pointer, - _sel_conformsToProtocol_, - _protocol_NSFastEnumeration, - ); - } -} - -extension NSFastEnumeration$Methods on NSFastEnumeration { - /// countByEnumeratingWithState:objects:count: - DartNSUInteger countByEnumeratingWithState( - ffi.Pointer state, { - required ffi.Pointer> objects, - required DartNSUInteger count, + /// loadFileRepresentationForTypeIdentifier:completionHandler: + NSProgress loadFileRepresentationForTypeIdentifier( + NSString typeIdentifier, { + required objc.ObjCBlock + completionHandler, }) { - final _$$ref$3 = object$.ref; - return _objc_msgSend_1b5ysjl( - _$$ref$3.pointer, - _sel_countByEnumeratingWithState_objects_count_, - state, - objects, - count, + final _$$ref = object$.ref; + final _$$ref$1 = typeIdentifier.ref; + final _$$ref$2 = completionHandler.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.loadFileRepresentationForTypeIdentifier:completionHandler:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), ); - } -} - -interface class NSFastEnumeration$Builder { - /// Returns the [objc.Protocol] object for this protocol. - static objc.Protocol get $protocol => - objc.Protocol.fromPointer(_protocol_NSFastEnumeration.cast()); - - /// Builds an object that implements the NSFastEnumeration protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - /// - /// If `$keepIsolateAlive` is true, this protocol will keep this isolate - /// alive until it is garbage collected by both Dart and ObjC. - static NSFastEnumeration implement({ - required DartNSUInteger Function( - ffi.Pointer, - ffi.Pointer>, - DartNSUInteger, - ) - countByEnumeratingWithState_objects_count_, - bool $keepIsolateAlive = true, - }) { - final builder = objc.ObjCProtocolBuilder(debugName: 'NSFastEnumeration'); - NSFastEnumeration$Builder.countByEnumeratingWithState_objects_count_ - .implement(builder, countByEnumeratingWithState_objects_count_); - builder.addProtocol($protocol); - return NSFastEnumeration.as( - builder.build(keepIsolateAlive: $keepIsolateAlive), + final $ret = _objc_msgSend_r0bo0s( + _$$ref.pointer, + _sel_loadFileRepresentationForTypeIdentifier_completionHandler_, + _$$ref$1.pointer, + _$$ref$2.pointer, ); + return NSProgress.fromPointer($ret, retain: true, release: true); } - /// Adds the implementation of the NSFastEnumeration protocol to an existing - /// [objc.ObjCProtocolBuilder]. - /// - /// Note: You cannot call this method after you have called `builder.build`. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, { - required DartNSUInteger Function( - ffi.Pointer, - ffi.Pointer>, - DartNSUInteger, - ) - countByEnumeratingWithState_objects_count_, - bool $keepIsolateAlive = true, + /// loadInPlaceFileRepresentationForTypeIdentifier:completionHandler: + NSProgress loadInPlaceFileRepresentationForTypeIdentifier( + NSString typeIdentifier, { + required objc.ObjCBlock + completionHandler, }) { - NSFastEnumeration$Builder.countByEnumeratingWithState_objects_count_ - .implement(builder, countByEnumeratingWithState_objects_count_); - builder.addProtocol($protocol); - } - - /// countByEnumeratingWithState:objects:count: - static final countByEnumeratingWithState_objects_count_ = - objc.ObjCProtocolMethod< - DartNSUInteger Function( - ffi.Pointer, - ffi.Pointer>, - DartNSUInteger, - ) - >( - _protocol_NSFastEnumeration, - _sel_countByEnumeratingWithState_objects_count_, - ffi.Native.addressOf< - ffi.NativeFunction< - NSUInteger Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - NSUInteger, - ) - > - >(_1wx624s_protocolTrampoline_17ap02x) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSFastEnumeration, - _sel_countByEnumeratingWithState_objects_count_, - isRequired: true, - isInstanceMethod: true, - ), - ( - DartNSUInteger Function( - ffi.Pointer, - ffi.Pointer>, - DartNSUInteger, - ) - func, - ) => - ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObjectImpl_NSUInteger.fromFunction( - ( - ffi.Pointer _, - ffi.Pointer arg1, - ffi.Pointer> arg2, - DartNSUInteger arg3, - ) => func(arg1, arg2, arg3), - ), - ); -} - -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; -} - -/// NSFileAttributes -extension NSFileAttributes on NSDictionary { - /// fileCreationDate - NSDate? fileCreationDate() { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_fileCreationDate); - return $ret.address == 0 - ? null - : NSDate.fromPointer($ret, retain: true, release: true); - } - - /// fileExtensionHidden - bool fileExtensionHidden() { - final _$$ref = object$.ref; - return _objc_msgSend_91o635(_$$ref.pointer, _sel_fileExtensionHidden); - } - - /// fileGroupOwnerAccountID - NSNumber? fileGroupOwnerAccountID() { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz( + final _$$ref$1 = typeIdentifier.ref; + final _$$ref$2 = completionHandler.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + final $ret = _objc_msgSend_r0bo0s( _$$ref.pointer, - _sel_fileGroupOwnerAccountID, + _sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_, + _$$ref$1.pointer, + _$$ref$2.pointer, ); - return $ret.address == 0 - ? null - : NSNumber.fromPointer($ret, retain: true, release: true); + return NSProgress.fromPointer($ret, retain: true, release: true); } - /// fileGroupOwnerAccountName - NSString? fileGroupOwnerAccountName() { + /// loadItemForTypeIdentifier:options:completionHandler: + void loadItemForTypeIdentifier( + NSString typeIdentifier, { + NSDictionary? options, + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >? + completionHandler, + }) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz( + final _$$ref$1 = typeIdentifier.ref; + final _$$ref$2 = options?.ref; + final _$$ref$3 = completionHandler?.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.loadItemForTypeIdentifier:options:completionHandler:', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + _objc_msgSend_18qun1e( _$$ref.pointer, - _sel_fileGroupOwnerAccountName, + _sel_loadItemForTypeIdentifier_options_completionHandler_, + _$$ref$1.pointer, + _$$ref$2?.pointer ?? ffi.nullptr, + _$$ref$3?.pointer ?? ffi.nullptr, ); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); } - /// fileHFSCreatorCode - int fileHFSCreatorCode() { + /// loadObjectOfClass:completionHandler: + NSProgress loadObjectOfClass( + NSItemProviderReading aClass, { + required objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError?) + > + completionHandler, + }) { final _$$ref = object$.ref; - return _objc_msgSend_3pyzne(_$$ref.pointer, _sel_fileHFSCreatorCode); + final _$$ref$1 = aClass.ref; + final _$$ref$2 = completionHandler.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.loadObjectOfClass:completionHandler:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + final $ret = _objc_msgSend_r0bo0s( + _$$ref.pointer, + _sel_loadObjectOfClass_completionHandler_, + _$$ref$1.pointer, + _$$ref$2.pointer, + ); + return NSProgress.fromPointer($ret, retain: true, release: true); } - /// fileHFSTypeCode - int fileHFSTypeCode() { + /// registerDataRepresentationForTypeIdentifier:visibility:loadHandler: + void registerDataRepresentationForTypeIdentifier( + NSString typeIdentifier, { + required NSItemProviderRepresentationVisibility visibility, + required objc.ObjCBlock< + NSProgress? Function(objc.ObjCBlock) + > + loadHandler, + }) { final _$$ref = object$.ref; - return _objc_msgSend_3pyzne(_$$ref.pointer, _sel_fileHFSTypeCode); + final _$$ref$1 = typeIdentifier.ref; + final _$$ref$2 = loadHandler.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.registerDataRepresentationForTypeIdentifier:visibility:loadHandler:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + _objc_msgSend_1pl40xc( + _$$ref.pointer, + _sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_, + _$$ref$1.pointer, + visibility.value, + _$$ref$2.pointer, + ); } - /// fileIsAppendOnly - bool fileIsAppendOnly() { + /// registerFileRepresentationForTypeIdentifier:fileOptions:visibility:loadHandler: + void registerFileRepresentationForTypeIdentifier( + NSString typeIdentifier, { + required int fileOptions, + required NSItemProviderRepresentationVisibility visibility, + required objc.ObjCBlock< + NSProgress? Function( + objc.ObjCBlock, + ) + > + loadHandler, + }) { final _$$ref = object$.ref; - return _objc_msgSend_91o635(_$$ref.pointer, _sel_fileIsAppendOnly); + final _$$ref$1 = typeIdentifier.ref; + final _$$ref$2 = loadHandler.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.registerFileRepresentationForTypeIdentifier:fileOptions:visibility:loadHandler:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + _objc_msgSend_t7arir( + _$$ref.pointer, + _sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_, + _$$ref$1.pointer, + fileOptions, + visibility.value, + _$$ref$2.pointer, + ); } - /// fileIsImmutable - bool fileIsImmutable() { + /// registerItemForTypeIdentifier:loadHandler: + void registerItemForTypeIdentifier( + NSString typeIdentifier, { + required objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + ffi.Pointer, + NSDictionary, + ) + > + loadHandler, + }) { final _$$ref = object$.ref; - return _objc_msgSend_91o635(_$$ref.pointer, _sel_fileIsImmutable); + final _$$ref$1 = typeIdentifier.ref; + final _$$ref$2 = loadHandler.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.registerItemForTypeIdentifier:loadHandler:', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + _objc_msgSend_o762yo( + _$$ref.pointer, + _sel_registerItemForTypeIdentifier_loadHandler_, + _$$ref$1.pointer, + _$$ref$2.pointer, + ); } - /// fileModificationDate - NSDate? fileModificationDate() { + /// registerObject:visibility: + void registerObject( + NSItemProviderWriting object, { + required NSItemProviderRepresentationVisibility visibility, + }) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz( + final _$$ref$1 = object.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.registerObject:visibility:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + _objc_msgSend_1k745tv( _$$ref.pointer, - _sel_fileModificationDate, + _sel_registerObject_visibility_, + _$$ref$1.pointer, + visibility.value, ); - return $ret.address == 0 - ? null - : NSDate.fromPointer($ret, retain: true, release: true); } - /// fileOwnerAccountID - NSNumber? fileOwnerAccountID() { + /// registerObjectOfClass:visibility:loadHandler: + void registerObjectOfClass( + NSItemProviderWriting aClass, { + required NSItemProviderRepresentationVisibility visibility, + required objc.ObjCBlock< + NSProgress? Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError?) + >, + ) + > + loadHandler, + }) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_fileOwnerAccountID); - return $ret.address == 0 - ? null - : NSNumber.fromPointer($ret, retain: true, release: true); + final _$$ref$1 = aClass.ref; + final _$$ref$2 = loadHandler.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.registerObjectOfClass:visibility:loadHandler:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + _objc_msgSend_1pl40xc( + _$$ref.pointer, + _sel_registerObjectOfClass_visibility_loadHandler_, + _$$ref$1.pointer, + visibility.value, + _$$ref$2.pointer, + ); } - /// fileOwnerAccountName - NSString? fileOwnerAccountName() { + /// registeredTypeIdentifiers + NSArray get registeredTypeIdentifiers { final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.registeredTypeIdentifiers', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); final $ret = _objc_msgSend_151sglz( _$$ref.pointer, - _sel_fileOwnerAccountName, + _sel_registeredTypeIdentifiers, ); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); - } - - /// filePosixPermissions - DartNSUInteger filePosixPermissions() { - final _$$ref = object$.ref; - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_filePosixPermissions); - } - - /// fileSize - int fileSize() { - final _$$ref = object$.ref; - return _objc_msgSend_1p4gbjy(_$$ref.pointer, _sel_fileSize); + return NSArray.fromPointer($ret, retain: true, release: true); } - /// fileSystemFileNumber - DartNSUInteger fileSystemFileNumber() { + /// registeredTypeIdentifiersWithFileOptions: + NSArray registeredTypeIdentifiersWithFileOptions(int fileOptions) { final _$$ref = object$.ref; - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_fileSystemFileNumber); + objc.checkOsVersionInternal( + 'NSItemProvider.registeredTypeIdentifiersWithFileOptions:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + final $ret = _objc_msgSend_7g3u2y( + _$$ref.pointer, + _sel_registeredTypeIdentifiersWithFileOptions_, + fileOptions, + ); + return NSArray.fromPointer($ret, retain: true, release: true); } - /// fileSystemNumber - int fileSystemNumber() { + /// setSuggestedName: + set suggestedName(NSString? value) { final _$$ref = object$.ref; - return _objc_msgSend_1hz7y9r(_$$ref.pointer, _sel_fileSystemNumber); + final _$$ref$1 = value?.ref; + objc.checkOsVersionInternal( + 'NSItemProvider.setSuggestedName:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 14, 0)), + ); + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_setSuggestedName_, + _$$ref$1?.pointer ?? ffi.nullptr, + ); } - /// fileType - NSString? fileType() { + /// suggestedName + NSString? get suggestedName { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_fileType); + objc.checkOsVersionInternal( + 'NSItemProvider.suggestedName', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 14, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_suggestedName); return $ret.address == 0 ? null : NSString.fromPointer($ret, retain: true, release: true); } } -/// NSFileManager -/// -/// NSFileManager -extension type NSFileManager._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject { - /// Constructs a [NSFileManager] that points to the same underlying object as [other]. - NSFileManager.as(objc.ObjCObject other) : object$ = other {} +sealed class NSItemProviderFileOptions { + static const NSItemProviderFileOptionOpenInPlace = 1; +} + +/// NSItemProviderReading +extension type NSItemProviderReading._(objc.ObjCProtocol object$) + implements objc.ObjCProtocol, NSObjectProtocol { + /// Constructs a [NSItemProviderReading] that points to the same underlying object as [other]. + NSItemProviderReading.as(objc.ObjCObject other) : object$ = other; - /// Constructs a [NSFileManager] that wraps the given raw object pointer. - NSFileManager.fromPointer( + /// Constructs a [NSItemProviderReading] that wraps the given raw object pointer. + NSItemProviderReading.fromPointer( ffi.Pointer other, { bool retain = false, bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) {} -} + }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); -/// NSGenericFastEnumeration -extension NSGenericFastEnumeration on NSDictionary { - /// countByEnumeratingWithState:objects:count: - DartNSUInteger countByEnumeratingWithState( - ffi.Pointer state, { - required ffi.Pointer> objects, - required DartNSUInteger count, - }) { - final _$$ref$4 = object$.ref; - return _objc_msgSend_1b5ysjl( - _$$ref$4.pointer, - _sel_countByEnumeratingWithState_objects_count_, - state, - objects, - count, + /// Returns whether [obj] is an instance of [NSItemProviderReading]. + static bool conformsTo(objc.ObjCObject obj) { + return _objc_msgSend_e3qsqz( + obj.ref.pointer, + _sel_conformsToProtocol_, + _protocol_NSItemProviderReading, ); } } -/// NSGeometryCoding -extension NSGeometryCoding on NSCoder { - /// decodePoint - CGPoint decodePoint() { - final _$$ref = object$.ref; - final $ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants - ? _objc_msgSend_1uwdhlkStret($ptr, _$$ref.pointer, _sel_decodePoint) - : $ptr.ref = _objc_msgSend_1uwdhlk(_$$ref.pointer, _sel_decodePoint); - final $finalizable = $ptr.cast().asTypedList( - ffi.sizeOf(), - finalizer: pkg_ffi.calloc.nativeFree, - ); - return ffi.Struct.create($finalizable); - } +extension NSItemProviderReading$Methods on NSItemProviderReading {} - /// decodeRect - CGRect decodeRect() { - final _$$ref = object$.ref; - final $ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants - ? _objc_msgSend_bu1hbwStret($ptr, _$$ref.pointer, _sel_decodeRect) - : $ptr.ref = _objc_msgSend_bu1hbw(_$$ref.pointer, _sel_decodeRect); - final $finalizable = $ptr.cast().asTypedList( - ffi.sizeOf(), - finalizer: pkg_ffi.calloc.nativeFree, +interface class NSItemProviderReading$Builder { + /// Returns the [objc.Protocol] object for this protocol. + static objc.Protocol get $protocol => + objc.Protocol.fromPointer(_protocol_NSItemProviderReading.cast()); + + /// Builds an object that implements the NSItemProviderReading protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + /// + /// If `$keepIsolateAlive` is true, this protocol will keep this isolate + /// alive until it is garbage collected by both Dart and ObjC. + static NSItemProviderReading implement({bool $keepIsolateAlive = true}) { + final builder = objc.ObjCProtocolBuilder( + debugName: 'NSItemProviderReading', ); - return ffi.Struct.create($finalizable); - } - /// decodeSize - CGSize decodeSize() { - final _$$ref = object$.ref; - final $ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants - ? _objc_msgSend_1vdfkenStret($ptr, _$$ref.pointer, _sel_decodeSize) - : $ptr.ref = _objc_msgSend_1vdfken(_$$ref.pointer, _sel_decodeSize); - final $finalizable = $ptr.cast().asTypedList( - ffi.sizeOf(), - finalizer: pkg_ffi.calloc.nativeFree, + builder.addProtocol($protocol); + return NSItemProviderReading.as( + builder.build(keepIsolateAlive: $keepIsolateAlive), ); - return ffi.Struct.create($finalizable); } - /// encodePoint: - void encodePoint(CGPoint point) { - final _$$ref = object$.ref; - _objc_msgSend_iy8iz6(_$$ref.pointer, _sel_encodePoint_, point); + /// Adds the implementation of the NSItemProviderReading protocol to an existing + /// [objc.ObjCProtocolBuilder]. + /// + /// Note: You cannot call this method after you have called `builder.build`. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, { + bool $keepIsolateAlive = true, + }) { + builder.addProtocol($protocol); } +} - /// encodeRect: - void encodeRect(CGRect rect) { - final _$$ref = object$.ref; - _objc_msgSend_1okkq16(_$$ref.pointer, _sel_encodeRect_, rect); - } +enum NSItemProviderRepresentationVisibility { + NSItemProviderRepresentationVisibilityAll(0), + NSItemProviderRepresentationVisibilityTeam(1), + NSItemProviderRepresentationVisibilityGroup(2), + NSItemProviderRepresentationVisibilityOwnProcess(3); - /// encodeSize: - void encodeSize(CGSize size) { - final _$$ref = object$.ref; - _objc_msgSend_13lgpwz(_$$ref.pointer, _sel_encodeSize_, size); - } -} + final int value; + const NSItemProviderRepresentationVisibility(this.value); -/// NSGeometryKeyedCoding -extension NSGeometryKeyedCoding on NSCoder { - /// decodePointForKey: - CGPoint decodePointForKey(NSString key) { - final _$$ref = object$.ref; - final _$$ref$1 = key.ref; - final $ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants - ? _objc_msgSend_1mpyy6yStret( - $ptr, - _$$ref.pointer, - _sel_decodePointForKey_, - _$$ref$1.pointer, - ) - : $ptr.ref = _objc_msgSend_1mpyy6y( - _$$ref.pointer, - _sel_decodePointForKey_, - _$$ref$1.pointer, - ); - final $finalizable = $ptr.cast().asTypedList( - ffi.sizeOf(), - finalizer: pkg_ffi.calloc.nativeFree, - ); - return ffi.Struct.create($finalizable); - } + static NSItemProviderRepresentationVisibility fromValue(int value) => + switch (value) { + 0 => NSItemProviderRepresentationVisibilityAll, + 1 => NSItemProviderRepresentationVisibilityTeam, + 2 => NSItemProviderRepresentationVisibilityGroup, + 3 => NSItemProviderRepresentationVisibilityOwnProcess, + _ => throw ArgumentError( + 'Unknown value for NSItemProviderRepresentationVisibility: $value', + ), + }; +} - /// decodeRectForKey: - CGRect decodeRectForKey(NSString key) { - final _$$ref = object$.ref; - final _$$ref$1 = key.ref; - final $ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants - ? _objc_msgSend_qrtfceStret( - $ptr, - _$$ref.pointer, - _sel_decodeRectForKey_, - _$$ref$1.pointer, - ) - : $ptr.ref = _objc_msgSend_qrtfce( - _$$ref.pointer, - _sel_decodeRectForKey_, - _$$ref$1.pointer, - ); - final $finalizable = $ptr.cast().asTypedList( - ffi.sizeOf(), - finalizer: pkg_ffi.calloc.nativeFree, - ); - return ffi.Struct.create($finalizable); - } +/// NSItemProviderWriting +extension type NSItemProviderWriting._(objc.ObjCProtocol object$) + implements objc.ObjCProtocol, NSObjectProtocol { + /// Constructs a [NSItemProviderWriting] that points to the same underlying object as [other]. + NSItemProviderWriting.as(objc.ObjCObject other) : object$ = other; - /// decodeSizeForKey: - CGSize decodeSizeForKey(NSString key) { - final _$$ref = object$.ref; - final _$$ref$1 = key.ref; - final $ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants - ? _objc_msgSend_18r320vStret( - $ptr, - _$$ref.pointer, - _sel_decodeSizeForKey_, - _$$ref$1.pointer, - ) - : $ptr.ref = _objc_msgSend_18r320v( - _$$ref.pointer, - _sel_decodeSizeForKey_, - _$$ref$1.pointer, - ); - final $finalizable = $ptr.cast().asTypedList( - ffi.sizeOf(), - finalizer: pkg_ffi.calloc.nativeFree, + /// Constructs a [NSItemProviderWriting] that wraps the given raw object pointer. + NSItemProviderWriting.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSItemProviderWriting]. + static bool conformsTo(objc.ObjCObject obj) { + return _objc_msgSend_e3qsqz( + obj.ref.pointer, + _sel_conformsToProtocol_, + _protocol_NSItemProviderWriting, ); - return ffi.Struct.create($finalizable); } +} - /// encodePoint:forKey: - void encodePoint(CGPoint point, {required NSString forKey}) { +extension NSItemProviderWriting$Methods on NSItemProviderWriting { + /// itemProviderVisibilityForRepresentationWithTypeIdentifier: + NSItemProviderRepresentationVisibility + itemProviderVisibilityForRepresentationWithTypeIdentifier( + NSString typeIdentifier, + ) { final _$$ref = object$.ref; - final _$$ref$1 = forKey.ref; - _objc_msgSend_bkebbk( + final _$$ref$1 = typeIdentifier.ref; + objc.checkOsVersionInternal( + 'NSItemProviderWriting.itemProviderVisibilityForRepresentationWithTypeIdentifier:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + if (!objc.respondsToSelector( + _$$ref.pointer, + _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, + )) { + throw objc.UnimplementedOptionalMethodException( + 'NSItemProviderWriting', + 'itemProviderVisibilityForRepresentationWithTypeIdentifier:', + ); + } + final $ret = _objc_msgSend_16fy0up( _$$ref.pointer, - _sel_encodePoint_forKey_, - point, + _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, _$$ref$1.pointer, ); + return NSItemProviderRepresentationVisibility.fromValue($ret); } - /// encodeRect:forKey: - void encodeRect(CGRect rect, {required NSString forKey}) { + /// loadDataWithTypeIdentifier:forItemProviderCompletionHandler: + NSProgress? loadDataWithTypeIdentifier( + NSString typeIdentifier, { + required objc.ObjCBlock + forItemProviderCompletionHandler, + }) { final _$$ref = object$.ref; - final _$$ref$1 = forKey.ref; - _objc_msgSend_f227js( + final _$$ref$1 = typeIdentifier.ref; + final _$$ref$2 = forItemProviderCompletionHandler.ref; + objc.checkOsVersionInternal( + 'NSItemProviderWriting.loadDataWithTypeIdentifier:forItemProviderCompletionHandler:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + final $ret = _objc_msgSend_r0bo0s( _$$ref.pointer, - _sel_encodeRect_forKey_, - rect, + _sel_loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, _$$ref$1.pointer, + _$$ref$2.pointer, ); + return $ret.address == 0 + ? null + : NSProgress.fromPointer($ret, retain: true, release: true); } - /// encodeSize:forKey: - void encodeSize(CGSize size, {required NSString forKey}) { + /// writableTypeIdentifiersForItemProvider + NSArray get writableTypeIdentifiersForItemProvider { final _$$ref = object$.ref; - final _$$ref$1 = forKey.ref; - _objc_msgSend_11tcc61( + objc.checkOsVersionInternal( + 'NSItemProviderWriting.writableTypeIdentifiersForItemProvider', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + if (!objc.respondsToSelector( _$$ref.pointer, - _sel_encodeSize_forKey_, - size, - _$$ref$1.pointer, + _sel_writableTypeIdentifiersForItemProvider, + )) { + throw objc.UnimplementedOptionalMethodException( + 'NSItemProviderWriting', + 'writableTypeIdentifiersForItemProvider', + ); + } + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_writableTypeIdentifiersForItemProvider, ); + return NSArray.fromPointer($ret, retain: true, release: true); } } -/// NSHost -/// -/// NSHost -extension type NSHost._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject { - /// Constructs a [NSHost] that points to the same underlying object as [other]. - NSHost.as(objc.ObjCObject other) : object$ = other {} +interface class NSItemProviderWriting$Builder { + /// Returns the [objc.Protocol] object for this protocol. + static objc.Protocol get $protocol => + objc.Protocol.fromPointer(_protocol_NSItemProviderWriting.cast()); - /// Constructs a [NSHost] that wraps the given raw object pointer. - NSHost.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) {} + /// Builds an object that implements the NSItemProviderWriting protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + /// + /// If `$keepIsolateAlive` is true, this protocol will keep this isolate + /// alive until it is garbage collected by both Dart and ObjC. + static NSItemProviderWriting implement({ + NSItemProviderRepresentationVisibility Function(NSString)? + itemProviderVisibilityForRepresentationWithTypeIdentifier_, + required NSProgress? Function( + NSString, + objc.ObjCBlock, + ) + loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, + NSArray Function()? writableTypeIdentifiersForItemProvider, + bool $keepIsolateAlive = true, + }) { + final builder = objc.ObjCProtocolBuilder( + debugName: 'NSItemProviderWriting', + ); + NSItemProviderWriting$Builder + .itemProviderVisibilityForRepresentationWithTypeIdentifier_ + .implement( + builder, + itemProviderVisibilityForRepresentationWithTypeIdentifier_, + ); + NSItemProviderWriting$Builder + .loadDataWithTypeIdentifier_forItemProviderCompletionHandler_ + .implement( + builder, + loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, + ); + NSItemProviderWriting$Builder.writableTypeIdentifiersForItemProvider + .implement(builder, writableTypeIdentifiersForItemProvider); + builder.addProtocol($protocol); + return NSItemProviderWriting.as( + builder.build(keepIsolateAlive: $keepIsolateAlive), + ); + } + + /// Adds the implementation of the NSItemProviderWriting protocol to an existing + /// [objc.ObjCProtocolBuilder]. + /// + /// Note: You cannot call this method after you have called `builder.build`. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, { + NSItemProviderRepresentationVisibility Function(NSString)? + itemProviderVisibilityForRepresentationWithTypeIdentifier_, + required NSProgress? Function( + NSString, + objc.ObjCBlock, + ) + loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, + NSArray Function()? writableTypeIdentifiersForItemProvider, + bool $keepIsolateAlive = true, + }) { + NSItemProviderWriting$Builder + .itemProviderVisibilityForRepresentationWithTypeIdentifier_ + .implement( + builder, + itemProviderVisibilityForRepresentationWithTypeIdentifier_, + ); + NSItemProviderWriting$Builder + .loadDataWithTypeIdentifier_forItemProviderCompletionHandler_ + .implement( + builder, + loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, + ); + NSItemProviderWriting$Builder.writableTypeIdentifiersForItemProvider + .implement(builder, writableTypeIdentifiersForItemProvider); + builder.addProtocol($protocol); + } + + /// itemProviderVisibilityForRepresentationWithTypeIdentifier: + static final itemProviderVisibilityForRepresentationWithTypeIdentifier_ = + objc.ObjCProtocolMethod< + NSItemProviderRepresentationVisibility Function(NSString) + >( + _protocol_NSItemProviderWriting, + _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_1ldqghh) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSItemProviderWriting, + _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, + isRequired: false, + isInstanceMethod: true, + ), + (NSItemProviderRepresentationVisibility Function(NSString) func) => + ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString.fromFunction( + (ffi.Pointer _, NSString arg1) => func(arg1), + ), + ); + + /// loadDataWithTypeIdentifier:forItemProviderCompletionHandler: + static final loadDataWithTypeIdentifier_forItemProviderCompletionHandler_ = + objc.ObjCProtocolMethod< + NSProgress? Function( + NSString, + objc.ObjCBlock, + ) + >( + _protocol_NSItemProviderWriting, + _sel_loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_1q0i84) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSItemProviderWriting, + _sel_loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + NSProgress? Function( + NSString, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError.fromFunction( + ( + ffi.Pointer _, + NSString arg1, + objc.ObjCBlock arg2, + ) => func(arg1, arg2), + ), + ); + + /// writableTypeIdentifiersForItemProvider + static final writableTypeIdentifiersForItemProvider = + objc.ObjCProtocolMethod( + _protocol_NSItemProviderWriting, + _sel_writableTypeIdentifiersForItemProvider, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_1mbt9g9) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSItemProviderWriting, + _sel_writableTypeIdentifiersForItemProvider, + isRequired: false, + isInstanceMethod: true, + ), + (NSArray Function() func) => ObjCBlock_NSArray_ffiVoid.fromFunction( + (ffi.Pointer _) => func(), + ), + ); } -/// NSIndexSet -extension type NSIndexSet._(objc.ObjCObject object$) - implements - objc.ObjCObject, - NSObject, - NSCopying, - NSMutableCopying, - NSSecureCoding { - /// Constructs a [NSIndexSet] that points to the same underlying object as [other]. - NSIndexSet.as(objc.ObjCObject other) : object$ = other { +enum NSKeyValueChange { + NSKeyValueChangeSetting(1), + NSKeyValueChangeInsertion(2), + NSKeyValueChangeRemoval(3), + NSKeyValueChangeReplacement(4); + + final int value; + const NSKeyValueChange(this.value); + + static NSKeyValueChange fromValue(int value) => switch (value) { + 1 => NSKeyValueChangeSetting, + 2 => NSKeyValueChangeInsertion, + 3 => NSKeyValueChangeRemoval, + 4 => NSKeyValueChangeReplacement, + _ => throw ArgumentError('Unknown value for NSKeyValueChange: $value'), + }; +} + +sealed class NSKeyValueObservingOptions { + static const NSKeyValueObservingOptionNew = 1; + static const NSKeyValueObservingOptionOld = 2; + static const NSKeyValueObservingOptionInitial = 4; + static const NSKeyValueObservingOptionPrior = 8; +} + +enum NSKeyValueSetMutationKind { + NSKeyValueUnionSetMutation(1), + NSKeyValueMinusSetMutation(2), + NSKeyValueIntersectSetMutation(3), + NSKeyValueSetSetMutation(4); + + final int value; + const NSKeyValueSetMutationKind(this.value); + + static NSKeyValueSetMutationKind fromValue(int value) => switch (value) { + 1 => NSKeyValueUnionSetMutation, + 2 => NSKeyValueMinusSetMutation, + 3 => NSKeyValueIntersectSetMutation, + 4 => NSKeyValueSetSetMutation, + _ => throw ArgumentError( + 'Unknown value for NSKeyValueSetMutationKind: $value', + ), + }; +} + +sealed class NSLinguisticTaggerOptions { + static const NSLinguisticTaggerOmitWords = 1; + static const NSLinguisticTaggerOmitPunctuation = 2; + static const NSLinguisticTaggerOmitWhitespace = 4; + static const NSLinguisticTaggerOmitOther = 8; + static const NSLinguisticTaggerJoinNames = 16; +} + +/// NSLocale +extension type NSLocale._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject, NSCopying, NSSecureCoding { + /// Constructs a [NSLocale] that points to the same underlying object as [other]. + NSLocale.as(objc.ObjCObject other) : object$ = other { assert(isA(object$)); } - /// Constructs a [NSIndexSet] that wraps the given raw object pointer. - NSIndexSet.fromPointer( + /// Constructs a [NSLocale] that wraps the given raw object pointer. + NSLocale.fromPointer( ffi.Pointer other, { bool retain = false, bool release = false, @@ -12869,561 +11079,318 @@ extension type NSIndexSet._(objc.ObjCObject object$) assert(isA(object$)); } - /// Returns whether [obj] is an instance of [NSIndexSet]. + /// Returns whether [obj] is an instance of [NSLocale]. static bool isA(objc.ObjCObject? obj) => obj == null ? false : _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, - _class_NSIndexSet, + _class_NSLocale, ); /// alloc - static NSIndexSet alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSIndexSet, _sel_alloc); - return NSIndexSet.fromPointer($ret, retain: false, release: true); + static NSLocale alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSLocale, _sel_alloc); + return NSLocale.fromPointer($ret, retain: false, release: true); } /// allocWithZone: - static NSIndexSet allocWithZone(ffi.Pointer zone) { + static NSLocale allocWithZone(ffi.Pointer zone) { final $ret = _objc_msgSend_1cwp428( - _class_NSIndexSet, + _class_NSLocale, _sel_allocWithZone_, zone, ); - return NSIndexSet.fromPointer($ret, retain: false, release: true); - } - - /// indexSet - static NSIndexSet indexSet() { - final $ret = _objc_msgSend_151sglz(_class_NSIndexSet, _sel_indexSet); - return NSIndexSet.fromPointer($ret, retain: true, release: true); + return NSLocale.fromPointer($ret, retain: false, release: true); } - /// indexSetWithIndex: - static NSIndexSet indexSetWithIndex(DartNSUInteger value) { - final $ret = _objc_msgSend_14hpxwa( - _class_NSIndexSet, - _sel_indexSetWithIndex_, - value, + /// localeWithLocaleIdentifier: + static NSLocale localeWithLocaleIdentifier(NSString ident) { + final _$$ref = ident.ref; + objc.checkOsVersionInternal( + 'NSLocale.localeWithLocaleIdentifier:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - return NSIndexSet.fromPointer($ret, retain: true, release: true); - } - - /// indexSetWithIndexesInRange: - static NSIndexSet indexSetWithIndexesInRange(NSRange range) { - final $ret = _objc_msgSend_1k1o1s7( - _class_NSIndexSet, - _sel_indexSetWithIndexesInRange_, - range, + final $ret = _objc_msgSend_1sotr3r( + _class_NSLocale, + _sel_localeWithLocaleIdentifier_, + _$$ref.pointer, ); - return NSIndexSet.fromPointer($ret, retain: true, release: true); + return NSLocale.fromPointer($ret, retain: true, release: true); } /// new - static NSIndexSet new$() { - final $ret = _objc_msgSend_151sglz(_class_NSIndexSet, _sel_new); - return NSIndexSet.fromPointer($ret, retain: false, release: true); + static NSLocale new$() { + final $ret = _objc_msgSend_151sglz(_class_NSLocale, _sel_new); + return NSLocale.fromPointer($ret, retain: false, release: true); } /// supportsSecureCoding static bool getSupportsSecureCoding() { - return _objc_msgSend_91o635(_class_NSIndexSet, _sel_supportsSecureCoding); + return _objc_msgSend_91o635(_class_NSLocale, _sel_supportsSecureCoding); } - /// Returns a new instance of NSIndexSet constructed with the default `new` method. - NSIndexSet() : this.as(new$().object$); + /// Returns a new instance of NSLocale constructed with the default `new` method. + NSLocale() : this.as(new$().object$); } -extension NSIndexSet$Methods on NSIndexSet { - /// containsIndex: - bool containsIndex(DartNSUInteger value) { - final _$$ref = object$.ref; - return _objc_msgSend_6peh6o(_$$ref.pointer, _sel_containsIndex_, value); - } - - /// containsIndexes: - bool containsIndexes(NSIndexSet indexSet) { +extension NSLocale$Methods on NSLocale { + /// displayNameForKey:value: + NSString? displayNameForKey(NSString key, {required objc.ObjCObject value}) { final _$$ref = object$.ref; - final _$$ref$1 = indexSet.ref; - return _objc_msgSend_19nvye5( + final _$$ref$1 = key.ref; + final _$$ref$2 = value.ref; + final $ret = _objc_msgSend_15qeuct( _$$ref.pointer, - _sel_containsIndexes_, + _sel_displayNameForKey_value_, _$$ref$1.pointer, + _$$ref$2.pointer, ); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); } - /// containsIndexesInRange: - bool containsIndexesInRange(NSRange range) { - final _$$ref = object$.ref; - return _objc_msgSend_p4nurx( - _$$ref.pointer, - _sel_containsIndexesInRange_, - range, + /// encodeWithCoder: + void encodeWithCoder(NSCoder coder) { + final _$$ref$18 = object$.ref; + final _$$ref$19 = coder.ref; + _objc_msgSend_xtuoz7( + _$$ref$18.pointer, + _sel_encodeWithCoder_, + _$$ref$19.pointer, ); } - /// count - DartNSUInteger get count { - final _$$ref = object$.ref; - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_count); - } - - /// countOfIndexesInRange: - DartNSUInteger countOfIndexesInRange(NSRange range) { - final _$$ref = object$.ref; + /// init + NSLocale init() { + final _$$ref$20 = object$.ref; objc.checkOsVersionInternal( - 'NSIndexSet.countOfIndexesInRange:', + 'NSLocale.init', iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - return _objc_msgSend_qm9f5w( - _$$ref.pointer, - _sel_countOfIndexesInRange_, - range, + macOS: (false, (10, 0, 0)), ); - } - - /// encodeWithCoder: - void encodeWithCoder(NSCoder coder) { - final _$$ref$16 = object$.ref; - final _$$ref$17 = coder.ref; - _objc_msgSend_xtuoz7( - _$$ref$16.pointer, - _sel_encodeWithCoder_, - _$$ref$17.pointer, + final $ret = _objc_msgSend_151sglz( + _$$ref$20.retainAndReturnPointer(), + _sel_init, ); + return NSLocale.fromPointer($ret, retain: false, release: true); } - /// enumerateIndexesInRange:options:usingBlock: - void enumerateIndexesInRange( - NSRange range, { - required DartNSUInteger options, - required objc.ObjCBlock< - ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) - > - usingBlock, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = usingBlock.ref; - objc.checkOsVersionInternal( - 'NSIndexSet.enumerateIndexesInRange:options:usingBlock:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - _objc_msgSend_177cajs( - _$$ref.pointer, - _sel_enumerateIndexesInRange_options_usingBlock_, - range, - options, - _$$ref$1.pointer, - ); - } - - /// enumerateIndexesUsingBlock: - void enumerateIndexesUsingBlock( - objc.ObjCBlock)> - block, - ) { - final _$$ref = object$.ref; - final _$$ref$1 = block.ref; - objc.checkOsVersionInternal( - 'NSIndexSet.enumerateIndexesUsingBlock:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - _objc_msgSend_f167m6( - _$$ref.pointer, - _sel_enumerateIndexesUsingBlock_, - _$$ref$1.pointer, + /// initWithCoder: + NSLocale? initWithCoder(NSCoder coder) { + final _$$ref$18 = object$.ref; + final _$$ref$19 = coder.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref$18.retainAndReturnPointer(), + _sel_initWithCoder_, + _$$ref$19.pointer, ); + return $ret.address == 0 + ? null + : NSLocale.fromPointer($ret, retain: false, release: true); } - /// enumerateIndexesWithOptions:usingBlock: - void enumerateIndexesWithOptions( - DartNSUInteger opts, { - required objc.ObjCBlock< - ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) - > - usingBlock, - }) { + /// initWithLocaleIdentifier: + NSLocale initWithLocaleIdentifier(NSString string) { final _$$ref = object$.ref; - final _$$ref$1 = usingBlock.ref; - objc.checkOsVersionInternal( - 'NSIndexSet.enumerateIndexesWithOptions:usingBlock:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - _objc_msgSend_yx8yc6( - _$$ref.pointer, - _sel_enumerateIndexesWithOptions_usingBlock_, - opts, + final _$$ref$1 = string.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.retainAndReturnPointer(), + _sel_initWithLocaleIdentifier_, _$$ref$1.pointer, ); + return NSLocale.fromPointer($ret, retain: false, release: true); } - /// enumerateRangesInRange:options:usingBlock: - void enumerateRangesInRange( - NSRange range, { - required DartNSUInteger options, - required objc.ObjCBlock)> - usingBlock, - }) { + /// objectForKey: + objc.ObjCObject? objectForKey(NSString key) { final _$$ref = object$.ref; - final _$$ref$1 = usingBlock.ref; - objc.checkOsVersionInternal( - 'NSIndexSet.enumerateRangesInRange:options:usingBlock:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_177cajs( + final _$$ref$1 = key.ref; + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_enumerateRangesInRange_options_usingBlock_, - range, - options, + _sel_objectForKey_, _$$ref$1.pointer, ); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); } +} - /// enumerateRangesUsingBlock: - void enumerateRangesUsingBlock( - objc.ObjCBlock)> block, - ) { - final _$$ref = object$.ref; - final _$$ref$1 = block.ref; - objc.checkOsVersionInternal( - 'NSIndexSet.enumerateRangesUsingBlock:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_f167m6( - _$$ref.pointer, - _sel_enumerateRangesUsingBlock_, - _$$ref$1.pointer, - ); - } +enum NSLocaleLanguageDirection { + NSLocaleLanguageDirectionUnknown(0), + NSLocaleLanguageDirectionLeftToRight(1), + NSLocaleLanguageDirectionRightToLeft(2), + NSLocaleLanguageDirectionTopToBottom(3), + NSLocaleLanguageDirectionBottomToTop(4); - /// enumerateRangesWithOptions:usingBlock: - void enumerateRangesWithOptions( - DartNSUInteger opts, { - required objc.ObjCBlock)> - usingBlock, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = usingBlock.ref; - objc.checkOsVersionInternal( - 'NSIndexSet.enumerateRangesWithOptions:usingBlock:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_yx8yc6( - _$$ref.pointer, - _sel_enumerateRangesWithOptions_usingBlock_, - opts, - _$$ref$1.pointer, - ); - } + final int value; + const NSLocaleLanguageDirection(this.value); - /// firstIndex - DartNSUInteger get firstIndex { - final _$$ref = object$.ref; - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_firstIndex); - } + static NSLocaleLanguageDirection fromValue(int value) => switch (value) { + 0 => NSLocaleLanguageDirectionUnknown, + 1 => NSLocaleLanguageDirectionLeftToRight, + 2 => NSLocaleLanguageDirectionRightToLeft, + 3 => NSLocaleLanguageDirectionTopToBottom, + 4 => NSLocaleLanguageDirectionBottomToTop, + _ => throw ArgumentError( + 'Unknown value for NSLocaleLanguageDirection: $value', + ), + }; +} - /// getIndexes:maxCount:inIndexRange: - DartNSUInteger getIndexes( - ffi.Pointer indexBuffer, { - required DartNSUInteger maxCount, - required ffi.Pointer inIndexRange, - }) { - final _$$ref = object$.ref; - return _objc_msgSend_89xgla( - _$$ref.pointer, - _sel_getIndexes_maxCount_inIndexRange_, - indexBuffer, - maxCount, - inIndexRange, - ); +/// NSMethodSignature +extension type NSMethodSignature._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject { + /// Constructs a [NSMethodSignature] that points to the same underlying object as [other]. + NSMethodSignature.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); } - /// indexGreaterThanIndex: - DartNSUInteger indexGreaterThanIndex(DartNSUInteger value) { - final _$$ref = object$.ref; - return _objc_msgSend_12py2ux( - _$$ref.pointer, - _sel_indexGreaterThanIndex_, - value, - ); + /// Constructs a [NSMethodSignature] that wraps the given raw object pointer. + NSMethodSignature.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + assert(isA(object$)); } - /// indexGreaterThanOrEqualToIndex: - DartNSUInteger indexGreaterThanOrEqualToIndex(DartNSUInteger value) { - final _$$ref = object$.ref; - return _objc_msgSend_12py2ux( - _$$ref.pointer, - _sel_indexGreaterThanOrEqualToIndex_, - value, - ); - } + /// Returns whether [obj] is an instance of [NSMethodSignature]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSMethodSignature, + ); - /// indexInRange:options:passingTest: - DartNSUInteger indexInRange( - NSRange range, { - required DartNSUInteger options, - required objc.ObjCBlock< - ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) - > - passingTest, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = passingTest.ref; - objc.checkOsVersionInternal( - 'NSIndexSet.indexInRange:options:passingTest:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - return _objc_msgSend_6jmuyz( - _$$ref.pointer, - _sel_indexInRange_options_passingTest_, - range, - options, - _$$ref$1.pointer, - ); + /// alloc + static NSMethodSignature alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSMethodSignature, _sel_alloc); + return NSMethodSignature.fromPointer($ret, retain: false, release: true); } - /// indexLessThanIndex: - DartNSUInteger indexLessThanIndex(DartNSUInteger value) { - final _$$ref = object$.ref; - return _objc_msgSend_12py2ux( - _$$ref.pointer, - _sel_indexLessThanIndex_, - value, + /// allocWithZone: + static NSMethodSignature allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSMethodSignature, + _sel_allocWithZone_, + zone, ); + return NSMethodSignature.fromPointer($ret, retain: false, release: true); } - /// indexLessThanOrEqualToIndex: - DartNSUInteger indexLessThanOrEqualToIndex(DartNSUInteger value) { - final _$$ref = object$.ref; - return _objc_msgSend_12py2ux( - _$$ref.pointer, - _sel_indexLessThanOrEqualToIndex_, - value, - ); + /// new + static NSMethodSignature new$() { + final $ret = _objc_msgSend_151sglz(_class_NSMethodSignature, _sel_new); + return NSMethodSignature.fromPointer($ret, retain: false, release: true); } - /// indexPassingTest: - DartNSUInteger indexPassingTest( - objc.ObjCBlock)> - predicate, + /// signatureWithObjCTypes: + static NSMethodSignature? signatureWithObjCTypes( + ffi.Pointer types, ) { - final _$$ref = object$.ref; - final _$$ref$1 = predicate.ref; - objc.checkOsVersionInternal( - 'NSIndexSet.indexPassingTest:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - return _objc_msgSend_10mlopr( - _$$ref.pointer, - _sel_indexPassingTest_, - _$$ref$1.pointer, - ); - } - - /// indexWithOptions:passingTest: - DartNSUInteger indexWithOptions( - DartNSUInteger opts, { - required objc.ObjCBlock< - ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) - > - passingTest, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = passingTest.ref; - objc.checkOsVersionInternal( - 'NSIndexSet.indexWithOptions:passingTest:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - return _objc_msgSend_1698hqz( - _$$ref.pointer, - _sel_indexWithOptions_passingTest_, - opts, - _$$ref$1.pointer, + final $ret = _objc_msgSend_56zxyn( + _class_NSMethodSignature, + _sel_signatureWithObjCTypes_, + types, ); + return $ret.address == 0 + ? null + : NSMethodSignature.fromPointer($ret, retain: true, release: true); } - /// indexesInRange:options:passingTest: - NSIndexSet indexesInRange( - NSRange range, { - required DartNSUInteger options, - required objc.ObjCBlock< - ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) - > - passingTest, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = passingTest.ref; - objc.checkOsVersionInternal( - 'NSIndexSet.indexesInRange:options:passingTest:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_1q30cs4( - _$$ref.pointer, - _sel_indexesInRange_options_passingTest_, - range, - options, - _$$ref$1.pointer, - ); - return NSIndexSet.fromPointer($ret, retain: true, release: true); - } + /// Returns a new instance of NSMethodSignature constructed with the default `new` method. + NSMethodSignature() : this.as(new$().object$); +} - /// indexesPassingTest: - NSIndexSet indexesPassingTest( - objc.ObjCBlock)> - predicate, - ) { +extension NSMethodSignature$Methods on NSMethodSignature { + /// frameLength + DartNSUInteger get frameLength { final _$$ref = object$.ref; - final _$$ref$1 = predicate.ref; - objc.checkOsVersionInternal( - 'NSIndexSet.indexesPassingTest:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_nnxkei( - _$$ref.pointer, - _sel_indexesPassingTest_, - _$$ref$1.pointer, - ); - return NSIndexSet.fromPointer($ret, retain: true, release: true); + return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_frameLength); } - /// indexesWithOptions:passingTest: - NSIndexSet indexesWithOptions( - DartNSUInteger opts, { - required objc.ObjCBlock< - ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) - > - passingTest, - }) { + /// getArgumentTypeAtIndex: + ffi.Pointer getArgumentTypeAtIndex(DartNSUInteger idx) { final _$$ref = object$.ref; - final _$$ref$1 = passingTest.ref; - objc.checkOsVersionInternal( - 'NSIndexSet.indexesWithOptions:passingTest:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_13x5boi( + return _objc_msgSend_1jtxufi( _$$ref.pointer, - _sel_indexesWithOptions_passingTest_, - opts, - _$$ref$1.pointer, + _sel_getArgumentTypeAtIndex_, + idx, ); - return NSIndexSet.fromPointer($ret, retain: true, release: true); } /// init - NSIndexSet init() { - final _$$ref$16 = object$.ref; + NSMethodSignature init() { + final _$$ref$21 = object$.ref; objc.checkOsVersionInternal( - 'NSIndexSet.init', + 'NSMethodSignature.init', iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); final $ret = _objc_msgSend_151sglz( - _$$ref$16.retainAndReturnPointer(), + _$$ref$21.retainAndReturnPointer(), _sel_init, ); - return NSIndexSet.fromPointer($ret, retain: false, release: true); - } - - /// initWithCoder: - NSIndexSet? initWithCoder(NSCoder coder) { - final _$$ref$16 = object$.ref; - final _$$ref$17 = coder.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref$16.retainAndReturnPointer(), - _sel_initWithCoder_, - _$$ref$17.pointer, - ); - return $ret.address == 0 - ? null - : NSIndexSet.fromPointer($ret, retain: false, release: true); + return NSMethodSignature.fromPointer($ret, retain: false, release: true); } - /// initWithIndex: - NSIndexSet initWithIndex(DartNSUInteger value) { + /// isOneway + bool isOneway() { final _$$ref = object$.ref; - final $ret = _objc_msgSend_14hpxwa( - _$$ref.retainAndReturnPointer(), - _sel_initWithIndex_, - value, - ); - return NSIndexSet.fromPointer($ret, retain: false, release: true); + return _objc_msgSend_91o635(_$$ref.pointer, _sel_isOneway); } - /// initWithIndexSet: - NSIndexSet initWithIndexSet(NSIndexSet indexSet) { + /// methodReturnLength + DartNSUInteger get methodReturnLength { final _$$ref = object$.ref; - final _$$ref$1 = indexSet.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref.retainAndReturnPointer(), - _sel_initWithIndexSet_, - _$$ref$1.pointer, - ); - return NSIndexSet.fromPointer($ret, retain: false, release: true); + return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_methodReturnLength); } - /// initWithIndexesInRange: - NSIndexSet initWithIndexesInRange(NSRange range) { + /// methodReturnType + ffi.Pointer get methodReturnType { final _$$ref = object$.ref; - final $ret = _objc_msgSend_1k1o1s7( - _$$ref.retainAndReturnPointer(), - _sel_initWithIndexesInRange_, - range, - ); - return NSIndexSet.fromPointer($ret, retain: false, release: true); + return _objc_msgSend_1fuqfwb(_$$ref.pointer, _sel_methodReturnType); } - /// intersectsIndexesInRange: - bool intersectsIndexesInRange(NSRange range) { + /// numberOfArguments + DartNSUInteger get numberOfArguments { final _$$ref = object$.ref; - return _objc_msgSend_p4nurx( - _$$ref.pointer, - _sel_intersectsIndexesInRange_, - range, - ); + return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_numberOfArguments); } +} - /// isEqualToIndexSet: - bool isEqualToIndexSet(NSIndexSet indexSet) { - final _$$ref = object$.ref; - final _$$ref$1 = indexSet.ref; - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_isEqualToIndexSet_, - _$$ref$1.pointer, - ); +/// NSMutableArray +extension type NSMutableArray._(objc.ObjCObject object$) + implements objc.ObjCObject, NSArray { + /// Creates a [NSMutableArray] of the given length with [fill] at each + /// position. + /// + /// The [length] must be a non-negative integer. + static NSMutableArray filled(int length, objc.ObjCObject fill) { + final a = arrayWithCapacity(length); + for (var i = 0; i < length; ++i) a.addObject(fill); + return a; } - /// lastIndex - DartNSUInteger get lastIndex { - final _$$ref = object$.ref; - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_lastIndex); + /// Creates a [NSMutableArray] from [elements]. + static NSMutableArray of(Iterable elements) { + final a = arrayWithCapacity(elements.length); + for (final e in elements) a.addObject(e); + return a; } -} -/// NSInputStream -extension type NSInputStream._(objc.ObjCObject object$) - implements objc.ObjCObject, NSStream { - /// Constructs a [NSInputStream] that points to the same underlying object as [other]. - NSInputStream.as(objc.ObjCObject other) : object$ = other { + /// Constructs a [NSMutableArray] that points to the same underlying object as [other]. + NSMutableArray.as(objc.ObjCObject other) : object$ = other { assert(isA(object$)); } - /// Constructs a [NSInputStream] that wraps the given raw object pointer. - NSInputStream.fromPointer( + /// Constructs a [NSMutableArray] that wraps the given raw object pointer. + NSMutableArray.fromPointer( ffi.Pointer other, { bool retain = false, bool release = false, @@ -13431,191 +11398,370 @@ extension type NSInputStream._(objc.ObjCObject object$) assert(isA(object$)); } - /// Returns whether [obj] is an instance of [NSInputStream]. + /// Returns whether [obj] is an instance of [NSMutableArray]. static bool isA(objc.ObjCObject? obj) => obj == null ? false : _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, - _class_NSInputStream, + _class_NSMutableArray, ); /// alloc - static NSInputStream alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSInputStream, _sel_alloc); - return NSInputStream.fromPointer($ret, retain: false, release: true); + static NSMutableArray alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSMutableArray, _sel_alloc); + return NSMutableArray.fromPointer($ret, retain: false, release: true); } /// allocWithZone: - static NSInputStream allocWithZone(ffi.Pointer zone) { + static NSMutableArray allocWithZone(ffi.Pointer zone) { final $ret = _objc_msgSend_1cwp428( - _class_NSInputStream, + _class_NSMutableArray, _sel_allocWithZone_, zone, ); - return NSInputStream.fromPointer($ret, retain: false, release: true); + return NSMutableArray.fromPointer($ret, retain: false, release: true); } - /// inputStreamWithData: - static NSInputStream? inputStreamWithData(NSData data) { - final _$$ref$1 = data.ref; + /// array + static NSMutableArray array() { + final $ret = _objc_msgSend_151sglz(_class_NSMutableArray, _sel_array); + return NSMutableArray.fromPointer($ret, retain: true, release: true); + } + + /// arrayWithArray: + static NSMutableArray arrayWithArray(NSArray array) { + final _$$ref$1 = array.ref; final $ret = _objc_msgSend_1sotr3r( - _class_NSInputStream, - _sel_inputStreamWithData_, + _class_NSMutableArray, + _sel_arrayWithArray_, _$$ref$1.pointer, ); - return $ret.address == 0 - ? null - : NSInputStream.fromPointer($ret, retain: true, release: true); + return NSMutableArray.fromPointer($ret, retain: true, release: true); } - /// inputStreamWithFileAtPath: - static NSInputStream? inputStreamWithFileAtPath(NSString path) { - final _$$ref$1 = path.ref; + /// arrayWithCapacity: + static NSMutableArray arrayWithCapacity(DartNSUInteger numItems) { + final $ret = _objc_msgSend_14hpxwa( + _class_NSMutableArray, + _sel_arrayWithCapacity_, + numItems, + ); + return NSMutableArray.fromPointer($ret, retain: true, release: true); + } + + /// arrayWithObject: + static NSMutableArray arrayWithObject(objc.ObjCObject anObject) { + final _$$ref$1 = anObject.ref; final $ret = _objc_msgSend_1sotr3r( - _class_NSInputStream, - _sel_inputStreamWithFileAtPath_, + _class_NSMutableArray, + _sel_arrayWithObject_, _$$ref$1.pointer, ); - return $ret.address == 0 - ? null - : NSInputStream.fromPointer($ret, retain: true, release: true); + return NSMutableArray.fromPointer($ret, retain: true, release: true); } - /// inputStreamWithURL: - static NSInputStream? inputStreamWithURL(NSURL url) { - final _$$ref$1 = url.ref; - objc.checkOsVersionInternal( - 'NSInputStream.inputStreamWithURL:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); + /// arrayWithObjects: + static NSMutableArray arrayWithObjects(objc.ObjCObject firstObj) { + final _$$ref$1 = firstObj.ref; final $ret = _objc_msgSend_1sotr3r( - _class_NSInputStream, - _sel_inputStreamWithURL_, + _class_NSMutableArray, + _sel_arrayWithObjects_, _$$ref$1.pointer, ); - return $ret.address == 0 - ? null - : NSInputStream.fromPointer($ret, retain: true, release: true); + return NSMutableArray.fromPointer($ret, retain: true, release: true); } - /// new - static NSInputStream new$() { - final $ret = _objc_msgSend_151sglz(_class_NSInputStream, _sel_new); - return NSInputStream.fromPointer($ret, retain: false, release: true); + /// arrayWithObjects:count: + static NSMutableArray arrayWithObjects$1( + ffi.Pointer> objects, { + required DartNSUInteger count, + }) { + final $ret = _objc_msgSend_zmbtbd( + _class_NSMutableArray, + _sel_arrayWithObjects_count_, + objects, + count, + ); + return NSMutableArray.fromPointer($ret, retain: true, release: true); } - /// Returns a new instance of NSInputStream constructed with the default `new` method. - NSInputStream() : this.as(new$().object$); -} + /// new + static NSMutableArray new$() { + final $ret = _objc_msgSend_151sglz(_class_NSMutableArray, _sel_new); + return NSMutableArray.fromPointer($ret, retain: false, release: true); + } -extension NSInputStream$Methods on NSInputStream { - /// getBuffer:length: - bool getBuffer( - ffi.Pointer> buffer, { - required ffi.Pointer length, - }) { - final _$$ref = object$.ref; - return _objc_msgSend_19lrthf( - _$$ref.pointer, - _sel_getBuffer_length_, - buffer, - length, + /// supportsSecureCoding + static bool getSupportsSecureCoding() { + return _objc_msgSend_91o635( + _class_NSMutableArray, + _sel_supportsSecureCoding, ); } - /// hasBytesAvailable - bool get hasBytesAvailable { + /// Returns a new instance of NSMutableArray constructed with the default `new` method. + NSMutableArray() : this.as(new$().object$); +} + +extension NSMutableArray$Methods on NSMutableArray { + /// addObject: + void addObject(objc.ObjCObject anObject) { final _$$ref = object$.ref; - return _objc_msgSend_91o635(_$$ref.pointer, _sel_hasBytesAvailable); + final _$$ref$1 = anObject.ref; + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_addObject_, _$$ref$1.pointer); } /// init - NSInputStream init() { - final _$$ref$17 = object$.ref; + NSMutableArray init() { + final _$$ref$22 = object$.ref; objc.checkOsVersionInternal( - 'NSInputStream.init', + 'NSMutableArray.init', iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); final $ret = _objc_msgSend_151sglz( - _$$ref$17.retainAndReturnPointer(), + _$$ref$22.retainAndReturnPointer(), _sel_init, ); - return NSInputStream.fromPointer($ret, retain: false, release: true); + return NSMutableArray.fromPointer($ret, retain: false, release: true); } - /// initWithData: - NSInputStream initWithData(NSData data) { + /// initWithArray: + NSMutableArray initWithArray(NSArray array) { final _$$ref$2 = object$.ref; - final _$$ref$3 = data.ref; + final _$$ref$3 = array.ref; final $ret = _objc_msgSend_1sotr3r( _$$ref$2.retainAndReturnPointer(), - _sel_initWithData_, + _sel_initWithArray_, _$$ref$3.pointer, ); - return NSInputStream.fromPointer($ret, retain: false, release: true); + return NSMutableArray.fromPointer($ret, retain: false, release: true); } - /// initWithFileAtPath: - NSInputStream? initWithFileAtPath(NSString path) { + /// initWithArray:copyItems: + NSMutableArray initWithArray$1(NSArray array, {required bool copyItems}) { final _$$ref$2 = object$.ref; - final _$$ref$3 = path.ref; - final $ret = _objc_msgSend_1sotr3r( + final _$$ref$3 = array.ref; + final $ret = _objc_msgSend_17amj0z( _$$ref$2.retainAndReturnPointer(), - _sel_initWithFileAtPath_, + _sel_initWithArray_copyItems_, _$$ref$3.pointer, + copyItems, + ); + return NSMutableArray.fromPointer($ret, retain: false, release: true); + } + + /// initWithCapacity: + NSMutableArray initWithCapacity(DartNSUInteger numItems) { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_14hpxwa( + _$$ref.retainAndReturnPointer(), + _sel_initWithCapacity_, + numItems, + ); + return NSMutableArray.fromPointer($ret, retain: false, release: true); + } + + /// initWithCoder: + NSMutableArray? initWithCoder(NSCoder coder) { + final _$$ref$20 = object$.ref; + final _$$ref$21 = coder.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref$20.retainAndReturnPointer(), + _sel_initWithCoder_, + _$$ref$21.pointer, ); return $ret.address == 0 ? null - : NSInputStream.fromPointer($ret, retain: false, release: true); + : NSMutableArray.fromPointer($ret, retain: false, release: true); } - /// initWithURL: - NSInputStream? initWithURL(NSURL url) { + /// initWithObjects: + NSMutableArray initWithObjects(objc.ObjCObject firstObj) { final _$$ref$2 = object$.ref; - final _$$ref$3 = url.ref; - objc.checkOsVersionInternal( - 'NSInputStream.initWithURL:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); + final _$$ref$3 = firstObj.ref; final $ret = _objc_msgSend_1sotr3r( _$$ref$2.retainAndReturnPointer(), - _sel_initWithURL_, + _sel_initWithObjects_, _$$ref$3.pointer, ); - return $ret.address == 0 - ? null - : NSInputStream.fromPointer($ret, retain: false, release: true); + return NSMutableArray.fromPointer($ret, retain: false, release: true); } - /// read:maxLength: - int read(ffi.Pointer buffer, {required DartNSUInteger maxLength}) { + /// initWithObjects:count: + NSMutableArray initWithObjects$1( + ffi.Pointer> objects, { + required DartNSUInteger count, + }) { + final _$$ref$1 = object$.ref; + final $ret = _objc_msgSend_zmbtbd( + _$$ref$1.retainAndReturnPointer(), + _sel_initWithObjects_count_, + objects, + count, + ); + return NSMutableArray.fromPointer($ret, retain: false, release: true); + } + + /// insertObject:atIndex: + void insertObject( + objc.ObjCObject anObject, { + required DartNSUInteger atIndex, + }) { final _$$ref = object$.ref; - return _objc_msgSend_11e9f5x( + final _$$ref$1 = anObject.ref; + _objc_msgSend_djsa9o( _$$ref.pointer, - _sel_read_maxLength_, - buffer, - maxLength, + _sel_insertObject_atIndex_, + _$$ref$1.pointer, + atIndex, + ); + } + + /// removeLastObject + void removeLastObject() { + final _$$ref = object$.ref; + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_removeLastObject); + } + + /// removeObjectAtIndex: + void removeObjectAtIndex(DartNSUInteger index) { + final _$$ref = object$.ref; + _objc_msgSend_1i9r4xy(_$$ref.pointer, _sel_removeObjectAtIndex_, index); + } + + /// replaceObjectAtIndex:withObject: + void replaceObjectAtIndex( + DartNSUInteger index, { + required objc.ObjCObject withObject, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = withObject.ref; + _objc_msgSend_1gypgok( + _$$ref.pointer, + _sel_replaceObjectAtIndex_withObject_, + index, + _$$ref$1.pointer, + ); + } +} + +/// NSMutableCopying +extension type NSMutableCopying._(objc.ObjCProtocol object$) + implements objc.ObjCProtocol { + /// Constructs a [NSMutableCopying] that points to the same underlying object as [other]. + NSMutableCopying.as(objc.ObjCObject other) : object$ = other; + + /// Constructs a [NSMutableCopying] that wraps the given raw object pointer. + NSMutableCopying.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSMutableCopying]. + static bool conformsTo(objc.ObjCObject obj) { + return _objc_msgSend_e3qsqz( + obj.ref.pointer, + _sel_conformsToProtocol_, + _protocol_NSMutableCopying, ); } } -/// NSInputStreamExtensions -extension NSInputStreamExtensions on NSInputStream {} +extension NSMutableCopying$Methods on NSMutableCopying { + /// mutableCopyWithZone: + objc.ObjCObject mutableCopyWithZone(ffi.Pointer zone) { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_1cwp428( + _$$ref.pointer, + _sel_mutableCopyWithZone_, + zone, + ); + return objc.ObjCObject($ret, retain: false, release: true); + } +} -/// NSInvocation -extension type NSInvocation._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject { - /// Constructs a [NSInvocation] that points to the same underlying object as [other]. - NSInvocation.as(objc.ObjCObject other) : object$ = other { +interface class NSMutableCopying$Builder { + /// Returns the [objc.Protocol] object for this protocol. + static objc.Protocol get $protocol => + objc.Protocol.fromPointer(_protocol_NSMutableCopying.cast()); + + /// Builds an object that implements the NSMutableCopying protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + /// + /// If `$keepIsolateAlive` is true, this protocol will keep this isolate + /// alive until it is garbage collected by both Dart and ObjC. + static NSMutableCopying implement({ + required objc.ObjCObject Function(ffi.Pointer) mutableCopyWithZone_, + bool $keepIsolateAlive = true, + }) { + final builder = objc.ObjCProtocolBuilder(debugName: 'NSMutableCopying'); + NSMutableCopying$Builder.mutableCopyWithZone_.implement( + builder, + mutableCopyWithZone_, + ); + builder.addProtocol($protocol); + return NSMutableCopying.as( + builder.build(keepIsolateAlive: $keepIsolateAlive), + ); + } + + /// Adds the implementation of the NSMutableCopying protocol to an existing + /// [objc.ObjCProtocolBuilder]. + /// + /// Note: You cannot call this method after you have called `builder.build`. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, { + required objc.ObjCObject Function(ffi.Pointer) mutableCopyWithZone_, + bool $keepIsolateAlive = true, + }) { + NSMutableCopying$Builder.mutableCopyWithZone_.implement( + builder, + mutableCopyWithZone_, + ); + builder.addProtocol($protocol); + } + + /// mutableCopyWithZone: + static final mutableCopyWithZone_ = + objc.ObjCProtocolMethod)>( + _protocol_NSMutableCopying, + _sel_mutableCopyWithZone_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_18nsem0) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSMutableCopying, + _sel_mutableCopyWithZone_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.ObjCObject Function(ffi.Pointer) func) => + ObjCBlock_objcObjCObjectImpl_ffiVoid_NSZone_retained.fromFunction( + (ffi.Pointer _, ffi.Pointer arg1) => func(arg1), + ), + ); +} + +/// NSMutableData +extension type NSMutableData._(objc.ObjCObject object$) + implements objc.ObjCObject, NSData { + /// Constructs a [NSMutableData] that points to the same underlying object as [other]. + NSMutableData.as(objc.ObjCObject other) : object$ = other { assert(isA(object$)); } - /// Constructs a [NSInvocation] that wraps the given raw object pointer. - NSInvocation.fromPointer( + /// Constructs a [NSMutableData] that wraps the given raw object pointer. + NSMutableData.fromPointer( ffi.Pointer other, { bool retain = false, bool release = false, @@ -13623,2628 +11769,2592 @@ extension type NSInvocation._(objc.ObjCObject object$) assert(isA(object$)); } - /// Returns whether [obj] is an instance of [NSInvocation]. + /// Returns whether [obj] is an instance of [NSMutableData]. static bool isA(objc.ObjCObject? obj) => obj == null ? false : _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, - _class_NSInvocation, + _class_NSMutableData, ); /// alloc - static NSInvocation alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSInvocation, _sel_alloc); - return NSInvocation.fromPointer($ret, retain: false, release: true); + static NSMutableData alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSMutableData, _sel_alloc); + return NSMutableData.fromPointer($ret, retain: false, release: true); } /// allocWithZone: - static NSInvocation allocWithZone(ffi.Pointer zone) { + static NSMutableData allocWithZone(ffi.Pointer zone) { final $ret = _objc_msgSend_1cwp428( - _class_NSInvocation, + _class_NSMutableData, _sel_allocWithZone_, zone, ); - return NSInvocation.fromPointer($ret, retain: false, release: true); + return NSMutableData.fromPointer($ret, retain: false, release: true); } - /// invocationWithMethodSignature: - static NSInvocation invocationWithMethodSignature(NSMethodSignature sig) { - final _$$ref = sig.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSInvocation, - _sel_invocationWithMethodSignature_, - _$$ref.pointer, - ); - return NSInvocation.fromPointer($ret, retain: true, release: true); + /// data + static NSMutableData data() { + final $ret = _objc_msgSend_151sglz(_class_NSMutableData, _sel_data); + return NSMutableData.fromPointer($ret, retain: true, release: true); } - /// new - static NSInvocation new$() { - final $ret = _objc_msgSend_151sglz(_class_NSInvocation, _sel_new); - return NSInvocation.fromPointer($ret, retain: false, release: true); + /// dataWithBytes:length: + static NSMutableData dataWithBytes( + ffi.Pointer bytes, { + required DartNSUInteger length, + }) { + final $ret = _objc_msgSend_3nbx5e( + _class_NSMutableData, + _sel_dataWithBytes_length_, + bytes, + length, + ); + return NSMutableData.fromPointer($ret, retain: true, release: true); } - /// Returns a new instance of NSInvocation constructed with the default `new` method. - NSInvocation() : this.as(new$().object$); -} - -extension NSInvocation$Methods on NSInvocation { - /// argumentsRetained - bool get argumentsRetained { - final _$$ref = object$.ref; - return _objc_msgSend_91o635(_$$ref.pointer, _sel_argumentsRetained); + /// dataWithBytesNoCopy:length: + static NSMutableData dataWithBytesNoCopy( + ffi.Pointer bytes, { + required DartNSUInteger length, + }) { + final $ret = _objc_msgSend_3nbx5e( + _class_NSMutableData, + _sel_dataWithBytesNoCopy_length_, + bytes, + length, + ); + return NSMutableData.fromPointer($ret, retain: true, release: true); } - /// getArgument:atIndex: - void getArgument( - ffi.Pointer argumentLocation, { - required int atIndex, + /// dataWithBytesNoCopy:length:freeWhenDone: + static NSMutableData dataWithBytesNoCopy$1( + ffi.Pointer bytes, { + required DartNSUInteger length, + required bool freeWhenDone, }) { - final _$$ref = object$.ref; - _objc_msgSend_unr2j3( - _$$ref.pointer, - _sel_getArgument_atIndex_, - argumentLocation, - atIndex, + final $ret = _objc_msgSend_161ne8y( + _class_NSMutableData, + _sel_dataWithBytesNoCopy_length_freeWhenDone_, + bytes, + length, + freeWhenDone, ); + return NSMutableData.fromPointer($ret, retain: true, release: true); } - /// getReturnValue: - void getReturnValue(ffi.Pointer retLoc) { - final _$$ref = object$.ref; - _objc_msgSend_ovsamd(_$$ref.pointer, _sel_getReturnValue_, retLoc); + /// dataWithCapacity: + static NSMutableData? dataWithCapacity(DartNSUInteger aNumItems) { + final $ret = _objc_msgSend_14hpxwa( + _class_NSMutableData, + _sel_dataWithCapacity_, + aNumItems, + ); + return $ret.address == 0 + ? null + : NSMutableData.fromPointer($ret, retain: true, release: true); } - /// init - NSInvocation init() { - final _$$ref$18 = object$.ref; - objc.checkOsVersionInternal( - 'NSInvocation.init', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + /// dataWithContentsOfFile: + static NSMutableData? dataWithContentsOfFile(NSString path) { + final _$$ref$1 = path.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSMutableData, + _sel_dataWithContentsOfFile_, + _$$ref$1.pointer, ); - final $ret = _objc_msgSend_151sglz( - _$$ref$18.retainAndReturnPointer(), - _sel_init, + return $ret.address == 0 + ? null + : NSMutableData.fromPointer($ret, retain: true, release: true); + } + + /// dataWithContentsOfFile:options:error: + static NSMutableData? dataWithContentsOfFile$1( + NSString path, { + required DartNSUInteger options, + required ffi.Pointer> error, + }) { + final _$$ref$1 = path.ref; + final $ret = _objc_msgSend_8321cp( + _class_NSMutableData, + _sel_dataWithContentsOfFile_options_error_, + _$$ref$1.pointer, + options, + error, ); - return NSInvocation.fromPointer($ret, retain: false, release: true); + return $ret.address == 0 + ? null + : NSMutableData.fromPointer($ret, retain: true, release: true); } - /// invoke - void invoke() { - final _$$ref = object$.ref; - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_invoke); - } - - /// invokeUsingIMP: - void invokeUsingIMP( - ffi.Pointer> imp, - ) { - final _$$ref = object$.ref; - _objc_msgSend_agmudd(_$$ref.pointer, _sel_invokeUsingIMP_, imp); - } - - /// invokeWithTarget: - void invokeWithTarget(objc.ObjCObject target) { - final _$$ref = object$.ref; - final _$$ref$1 = target.ref; - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_invokeWithTarget_, + /// dataWithContentsOfURL: + static NSMutableData? dataWithContentsOfURL(NSURL url) { + final _$$ref$1 = url.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSMutableData, + _sel_dataWithContentsOfURL_, _$$ref$1.pointer, ); + return $ret.address == 0 + ? null + : NSMutableData.fromPointer($ret, retain: true, release: true); } - /// methodSignature - NSMethodSignature get methodSignature { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_methodSignature); - return NSMethodSignature.fromPointer($ret, retain: true, release: true); - } - - /// retainArguments - void retainArguments() { - final _$$ref = object$.ref; - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_retainArguments); - } - - /// selector - ffi.Pointer get selector { - final _$$ref = object$.ref; - return _objc_msgSend_1ovaulg(_$$ref.pointer, _sel_selector); - } - - /// setArgument:atIndex: - void setArgument( - ffi.Pointer argumentLocation, { - required int atIndex, + /// dataWithContentsOfURL:options:error: + static NSMutableData? dataWithContentsOfURL$1( + NSURL url, { + required DartNSUInteger options, + required ffi.Pointer> error, }) { - final _$$ref = object$.ref; - _objc_msgSend_unr2j3( - _$$ref.pointer, - _sel_setArgument_atIndex_, - argumentLocation, - atIndex, - ); - } - - /// setReturnValue: - void setReturnValue(ffi.Pointer retLoc) { - final _$$ref = object$.ref; - _objc_msgSend_ovsamd(_$$ref.pointer, _sel_setReturnValue_, retLoc); - } - - /// setSelector: - set selector(ffi.Pointer value) { - final _$$ref = object$.ref; - _objc_msgSend_1d9e4oe(_$$ref.pointer, _sel_setSelector_, value); - } - - /// setTarget: - set target(objc.ObjCObject? value) { - final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_setTarget_, - _$$ref$1?.pointer ?? ffi.nullptr, + final _$$ref$1 = url.ref; + final $ret = _objc_msgSend_8321cp( + _class_NSMutableData, + _sel_dataWithContentsOfURL_options_error_, + _$$ref$1.pointer, + options, + error, ); - } - - /// target - objc.ObjCObject? get target { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_target); return $ret.address == 0 ? null - : objc.ObjCObject($ret, retain: true, release: true); + : NSMutableData.fromPointer($ret, retain: true, release: true); } -} -/// NSItemProvider -extension NSItemProvider on NSURL { - /// itemProviderVisibilityForRepresentationWithTypeIdentifier: - NSItemProviderRepresentationVisibility - itemProviderVisibilityForRepresentationWithTypeIdentifier( - NSString typeIdentifier, - ) { - final _$$ref = object$.ref; - final _$$ref$1 = typeIdentifier.ref; - objc.checkOsVersionInternal( - 'NSURL.itemProviderVisibilityForRepresentationWithTypeIdentifier:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - if (!objc.respondsToSelector( - _$$ref.pointer, - _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, - )) { - throw objc.UnimplementedOptionalMethodException( - 'NSURL', - 'itemProviderVisibilityForRepresentationWithTypeIdentifier:', - ); - } - final $ret = _objc_msgSend_16fy0up( - _$$ref.pointer, - _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, + /// dataWithData: + static NSMutableData dataWithData(NSData data) { + final _$$ref$1 = data.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSMutableData, + _sel_dataWithData_, _$$ref$1.pointer, ); - return NSItemProviderRepresentationVisibility.fromValue($ret); + return NSMutableData.fromPointer($ret, retain: true, release: true); } - /// loadDataWithTypeIdentifier:forItemProviderCompletionHandler: - NSProgress? loadDataWithTypeIdentifier( - NSString typeIdentifier, { - required objc.ObjCBlock - forItemProviderCompletionHandler, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = typeIdentifier.ref; - final _$$ref$2 = forItemProviderCompletionHandler.ref; - objc.checkOsVersionInternal( - 'NSURL.loadDataWithTypeIdentifier:forItemProviderCompletionHandler:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - final $ret = _objc_msgSend_r0bo0s( - _$$ref.pointer, - _sel_loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, - _$$ref$1.pointer, - _$$ref$2.pointer, + /// dataWithLength: + static NSMutableData? dataWithLength(DartNSUInteger length) { + final $ret = _objc_msgSend_14hpxwa( + _class_NSMutableData, + _sel_dataWithLength_, + length, ); return $ret.address == 0 ? null - : NSProgress.fromPointer($ret, retain: true, release: true); + : NSMutableData.fromPointer($ret, retain: true, release: true); } - /// writableTypeIdentifiersForItemProvider - NSArray get writableTypeIdentifiersForItemProvider { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.writableTypeIdentifiersForItemProvider', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - if (!objc.respondsToSelector( - _$$ref.pointer, - _sel_writableTypeIdentifiersForItemProvider, - )) { - throw objc.UnimplementedOptionalMethodException( - 'NSURL', - 'writableTypeIdentifiersForItemProvider', - ); - } - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_writableTypeIdentifiersForItemProvider, + /// new + static NSMutableData new$() { + final $ret = _objc_msgSend_151sglz(_class_NSMutableData, _sel_new); + return NSMutableData.fromPointer($ret, retain: false, release: true); + } + + /// supportsSecureCoding + static bool getSupportsSecureCoding() { + return _objc_msgSend_91o635( + _class_NSMutableData, + _sel_supportsSecureCoding, ); - return NSArray.fromPointer($ret, retain: true, release: true); } - /// itemProviderVisibilityForRepresentationWithTypeIdentifier: - static NSItemProviderRepresentationVisibility - itemProviderVisibilityForRepresentationWithTypeIdentifier$1( - NSString typeIdentifier, + /// Returns a new instance of NSMutableData constructed with the default `new` method. + NSMutableData() : this.as(new$().object$); +} + +extension NSMutableData$Methods on NSMutableData { + /// compressedDataUsingAlgorithm:error: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NSMutableData? compressedDataUsingAlgorithm( + NSDataCompressionAlgorithm algorithm, ) { - final _$$ref = typeIdentifier.ref; + final _$$ref$1 = object$.ref; objc.checkOsVersionInternal( - 'NSURL.itemProviderVisibilityForRepresentationWithTypeIdentifier:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + 'NSMutableData.compressedDataUsingAlgorithm:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), ); - if (!objc.respondsToSelector( - _class_NSURL, - _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, - )) { - throw objc.UnimplementedOptionalMethodException( - 'NSURL', - 'itemProviderVisibilityForRepresentationWithTypeIdentifier:', + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1vnlaqg( + _$$ref$1.pointer, + _sel_compressedDataUsingAlgorithm_error_, + algorithm.value, + $err, ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSMutableData.fromPointer($ret, retain: true, release: true); + } finally { + pkg_ffi.calloc.free($err); } - final $ret = _objc_msgSend_16fy0up( - _class_NSURL, - _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, - _$$ref.pointer, - ); - return NSItemProviderRepresentationVisibility.fromValue($ret); } - /// readableTypeIdentifiersForItemProvider - static NSArray getReadableTypeIdentifiersForItemProvider() { + /// decompressedDataUsingAlgorithm:error: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NSMutableData? decompressedDataUsingAlgorithm( + NSDataCompressionAlgorithm algorithm, + ) { + final _$$ref$1 = object$.ref; objc.checkOsVersionInternal( - 'NSURL.readableTypeIdentifiersForItemProvider', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _class_NSURL, - _sel_readableTypeIdentifiersForItemProvider, + 'NSMutableData.decompressedDataUsingAlgorithm:error:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), ); - return NSArray.fromPointer($ret, retain: true, release: true); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1vnlaqg( + _$$ref$1.pointer, + _sel_decompressedDataUsingAlgorithm_error_, + algorithm.value, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSMutableData.fromPointer($ret, retain: true, release: true); + } finally { + pkg_ffi.calloc.free($err); + } } - /// writableTypeIdentifiersForItemProvider - static NSArray getWritableTypeIdentifiersForItemProvider$1() { + /// init + NSMutableData init() { + final _$$ref$23 = object$.ref; objc.checkOsVersionInternal( - 'NSURL.writableTypeIdentifiersForItemProvider', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + 'NSMutableData.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); final $ret = _objc_msgSend_151sglz( - _class_NSURL, - _sel_writableTypeIdentifiersForItemProvider, + _$$ref$23.retainAndReturnPointer(), + _sel_init, ); - return NSArray.fromPointer($ret, retain: true, release: true); + return NSMutableData.fromPointer($ret, retain: false, release: true); } -} -/// NSItemProvider -extension NSItemProvider$1 on NSString { - /// itemProviderVisibilityForRepresentationWithTypeIdentifier: - NSItemProviderRepresentationVisibility - itemProviderVisibilityForRepresentationWithTypeIdentifier( - NSString typeIdentifier, - ) { + /// initWithBase64EncodedData:options: + NSMutableData? initWithBase64EncodedData( + NSData base64Data, { + required DartNSUInteger options, + }) { final _$$ref$2 = object$.ref; - final _$$ref$3 = typeIdentifier.ref; + final _$$ref$3 = base64Data.ref; objc.checkOsVersionInternal( - 'NSString.itemProviderVisibilityForRepresentationWithTypeIdentifier:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + 'NSMutableData.initWithBase64EncodedData:options:', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - if (!objc.respondsToSelector( - _$$ref$2.pointer, - _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, - )) { - throw objc.UnimplementedOptionalMethodException( - 'NSString', - 'itemProviderVisibilityForRepresentationWithTypeIdentifier:', - ); - } - final $ret = _objc_msgSend_16fy0up( - _$$ref$2.pointer, - _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, + final $ret = _objc_msgSend_7kpg7m( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithBase64EncodedData_options_, _$$ref$3.pointer, + options, ); - return NSItemProviderRepresentationVisibility.fromValue($ret); + return $ret.address == 0 + ? null + : NSMutableData.fromPointer($ret, retain: false, release: true); } - /// loadDataWithTypeIdentifier:forItemProviderCompletionHandler: - NSProgress? loadDataWithTypeIdentifier( - NSString typeIdentifier, { - required objc.ObjCBlock - forItemProviderCompletionHandler, + /// initWithBase64EncodedString:options: + NSMutableData? initWithBase64EncodedString( + NSString base64String, { + required DartNSUInteger options, }) { - final _$$ref$3 = object$.ref; - final _$$ref$4 = typeIdentifier.ref; - final _$$ref$5 = forItemProviderCompletionHandler.ref; + final _$$ref$2 = object$.ref; + final _$$ref$3 = base64String.ref; objc.checkOsVersionInternal( - 'NSString.loadDataWithTypeIdentifier:forItemProviderCompletionHandler:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + 'NSMutableData.initWithBase64EncodedString:options:', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - final $ret = _objc_msgSend_r0bo0s( + final $ret = _objc_msgSend_7kpg7m( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithBase64EncodedString_options_, _$$ref$3.pointer, - _sel_loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, - _$$ref$4.pointer, - _$$ref$5.pointer, + options, ); return $ret.address == 0 ? null - : NSProgress.fromPointer($ret, retain: true, release: true); + : NSMutableData.fromPointer($ret, retain: false, release: true); } - /// writableTypeIdentifiersForItemProvider - NSArray get writableTypeIdentifiersForItemProvider { + /// initWithBytes:length: + NSMutableData initWithBytes( + ffi.Pointer bytes, { + required DartNSUInteger length, + }) { final _$$ref$1 = object$.ref; - objc.checkOsVersionInternal( - 'NSString.writableTypeIdentifiersForItemProvider', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - if (!objc.respondsToSelector( - _$$ref$1.pointer, - _sel_writableTypeIdentifiersForItemProvider, - )) { - throw objc.UnimplementedOptionalMethodException( - 'NSString', - 'writableTypeIdentifiersForItemProvider', - ); - } - final $ret = _objc_msgSend_151sglz( - _$$ref$1.pointer, - _sel_writableTypeIdentifiersForItemProvider, + final $ret = _objc_msgSend_3nbx5e( + _$$ref$1.retainAndReturnPointer(), + _sel_initWithBytes_length_, + bytes, + length, ); - return NSArray.fromPointer($ret, retain: true, release: true); + return NSMutableData.fromPointer($ret, retain: false, release: true); } - /// itemProviderVisibilityForRepresentationWithTypeIdentifier: - static NSItemProviderRepresentationVisibility - itemProviderVisibilityForRepresentationWithTypeIdentifier$1( - NSString typeIdentifier, - ) { - final _$$ref$1 = typeIdentifier.ref; - objc.checkOsVersionInternal( - 'NSString.itemProviderVisibilityForRepresentationWithTypeIdentifier:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - if (!objc.respondsToSelector( - _class_NSString, - _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, - )) { - throw objc.UnimplementedOptionalMethodException( - 'NSString', - 'itemProviderVisibilityForRepresentationWithTypeIdentifier:', - ); - } - final $ret = _objc_msgSend_16fy0up( - _class_NSString, - _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, - _$$ref$1.pointer, + /// initWithBytesNoCopy:length: + NSMutableData initWithBytesNoCopy( + ffi.Pointer bytes, { + required DartNSUInteger length, + }) { + final _$$ref$1 = object$.ref; + final $ret = _objc_msgSend_3nbx5e( + _$$ref$1.retainAndReturnPointer(), + _sel_initWithBytesNoCopy_length_, + bytes, + length, ); - return NSItemProviderRepresentationVisibility.fromValue($ret); + return NSMutableData.fromPointer($ret, retain: false, release: true); } - /// readableTypeIdentifiersForItemProvider - static NSArray getReadableTypeIdentifiersForItemProvider() { + /// initWithBytesNoCopy:length:deallocator: + NSMutableData initWithBytesNoCopy$1( + ffi.Pointer bytes, { + required DartNSUInteger length, + objc.ObjCBlock, ffi.UnsignedLong)>? + deallocator, + }) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = deallocator?.ref; objc.checkOsVersionInternal( - 'NSString.readableTypeIdentifiersForItemProvider', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + 'NSMutableData.initWithBytesNoCopy:length:deallocator:', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - final $ret = _objc_msgSend_151sglz( - _class_NSString, - _sel_readableTypeIdentifiersForItemProvider, + final $ret = _objc_msgSend_134vhyh( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithBytesNoCopy_length_deallocator_, + bytes, + length, + _$$ref$3?.pointer ?? ffi.nullptr, ); - return NSArray.fromPointer($ret, retain: true, release: true); + return NSMutableData.fromPointer($ret, retain: false, release: true); } - /// writableTypeIdentifiersForItemProvider - static NSArray getWritableTypeIdentifiersForItemProvider$1() { - objc.checkOsVersionInternal( - 'NSString.writableTypeIdentifiersForItemProvider', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _class_NSString, - _sel_writableTypeIdentifiersForItemProvider, + /// initWithBytesNoCopy:length:freeWhenDone: + NSMutableData initWithBytesNoCopy$2( + ffi.Pointer bytes, { + required DartNSUInteger length, + required bool freeWhenDone, + }) { + final _$$ref$1 = object$.ref; + final $ret = _objc_msgSend_161ne8y( + _$$ref$1.retainAndReturnPointer(), + _sel_initWithBytesNoCopy_length_freeWhenDone_, + bytes, + length, + freeWhenDone, ); - return NSArray.fromPointer($ret, retain: true, release: true); + return NSMutableData.fromPointer($ret, retain: false, release: true); } -} -/// NSItemProvider -extension type NSItemProvider$2._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject, NSCopying { - /// Constructs a [NSItemProvider$2] that points to the same underlying object as [other]. - NSItemProvider$2.as(objc.ObjCObject other) : object$ = other { - objc.checkOsVersionInternal( - 'NSItemProvider', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), + /// initWithCapacity: + NSMutableData? initWithCapacity(DartNSUInteger capacity) { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_14hpxwa( + _$$ref.retainAndReturnPointer(), + _sel_initWithCapacity_, + capacity, ); - assert(isA(object$)); + return $ret.address == 0 + ? null + : NSMutableData.fromPointer($ret, retain: false, release: true); } - /// Constructs a [NSItemProvider$2] that wraps the given raw object pointer. - NSItemProvider$2.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - objc.checkOsVersionInternal( - 'NSItemProvider', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), + /// initWithCoder: + NSMutableData? initWithCoder(NSCoder coder) { + final _$$ref$22 = object$.ref; + final _$$ref$23 = coder.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref$22.retainAndReturnPointer(), + _sel_initWithCoder_, + _$$ref$23.pointer, ); - assert(isA(object$)); + return $ret.address == 0 + ? null + : NSMutableData.fromPointer($ret, retain: false, release: true); } - /// Returns whether [obj] is an instance of [NSItemProvider$2]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSItemProvider, - ); - - /// alloc - static NSItemProvider$2 alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSItemProvider, _sel_alloc); - return NSItemProvider$2.fromPointer($ret, retain: false, release: true); + /// initWithContentsOfFile: + NSMutableData? initWithContentsOfFile(NSString path) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = path.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithContentsOfFile_, + _$$ref$3.pointer, + ); + return $ret.address == 0 + ? null + : NSMutableData.fromPointer($ret, retain: false, release: true); } - /// allocWithZone: - static NSItemProvider$2 allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSItemProvider, - _sel_allocWithZone_, - zone, + /// initWithContentsOfFile:options:error: + NSMutableData? initWithContentsOfFile$1( + NSString path, { + required DartNSUInteger options, + required ffi.Pointer> error, + }) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = path.ref; + final $ret = _objc_msgSend_8321cp( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithContentsOfFile_options_error_, + _$$ref$3.pointer, + options, + error, ); - return NSItemProvider$2.fromPointer($ret, retain: false, release: true); + return $ret.address == 0 + ? null + : NSMutableData.fromPointer($ret, retain: false, release: true); } - /// new - static NSItemProvider$2 new$() { - final $ret = _objc_msgSend_151sglz(_class_NSItemProvider, _sel_new); - return NSItemProvider$2.fromPointer($ret, retain: false, release: true); + /// initWithContentsOfURL: + NSMutableData? initWithContentsOfURL(NSURL url) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = url.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithContentsOfURL_, + _$$ref$3.pointer, + ); + return $ret.address == 0 + ? null + : NSMutableData.fromPointer($ret, retain: false, release: true); } - /// Returns a new instance of NSItemProvider$2 constructed with the default `new` method. - NSItemProvider$2() : this.as(new$().object$); -} + /// initWithContentsOfURL:options:error: + NSMutableData? initWithContentsOfURL$1( + NSURL url, { + required DartNSUInteger options, + required ffi.Pointer> error, + }) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = url.ref; + final $ret = _objc_msgSend_8321cp( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithContentsOfURL_options_error_, + _$$ref$3.pointer, + options, + error, + ); + return $ret.address == 0 + ? null + : NSMutableData.fromPointer($ret, retain: false, release: true); + } -extension NSItemProvider$2$Methods on NSItemProvider$2 { - /// canLoadObjectOfClass: - bool canLoadObjectOfClass(NSItemProviderReading aClass) { - final _$$ref = object$.ref; - final _$$ref$1 = aClass.ref; - objc.checkOsVersionInternal( - 'NSItemProvider.canLoadObjectOfClass:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + /// initWithData: + NSMutableData initWithData(NSData data) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = data.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithData_, + _$$ref$3.pointer, ); - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_canLoadObjectOfClass_, - _$$ref$1.pointer, + return NSMutableData.fromPointer($ret, retain: false, release: true); + } + + /// initWithLength: + NSMutableData? initWithLength(DartNSUInteger length) { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_14hpxwa( + _$$ref.retainAndReturnPointer(), + _sel_initWithLength_, + length, ); + return $ret.address == 0 + ? null + : NSMutableData.fromPointer($ret, retain: false, release: true); } - /// hasItemConformingToTypeIdentifier: - bool hasItemConformingToTypeIdentifier(NSString typeIdentifier) { + /// length + DartNSUInteger get length { final _$$ref = object$.ref; - final _$$ref$1 = typeIdentifier.ref; - objc.checkOsVersionInternal( - 'NSItemProvider.hasItemConformingToTypeIdentifier:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), + return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_length); + } + + /// mutableBytes + ffi.Pointer get mutableBytes { + final _$$ref = object$.ref; + return _objc_msgSend_6ex6p5(_$$ref.pointer, _sel_mutableBytes); + } + + /// setLength: + set length$1(DartNSUInteger value) { + final _$$ref = object$.ref; + _objc_msgSend_1i9r4xy(_$$ref.pointer, _sel_setLength_, value); + } +} + +/// NSMutableDictionary +extension type NSMutableDictionary._(objc.ObjCObject object$) + implements objc.ObjCObject, NSDictionary { + /// Creates a [NSMutableDictionary] from [other]. + static NSMutableDictionary of(Map other) => + NSMutableDictionary.fromEntries(other.entries); + + /// Creates a [NSMutableDictionary] from [entries]. + static NSMutableDictionary fromEntries( + Iterable> entries, + ) { + final dict = dictionaryWithCapacity(entries.length); + for (final MapEntry(:key, :value) in entries) { + dict.setObject(value, forKey: NSCopying.as(key)); + } + return dict; + } + + /// Constructs a [NSMutableDictionary] that points to the same underlying object as [other]. + NSMutableDictionary.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NSMutableDictionary] that wraps the given raw object pointer. + NSMutableDictionary.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + assert(isA(object$)); + } + + /// Returns whether [obj] is an instance of [NSMutableDictionary]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSMutableDictionary, + ); + + /// alloc + static NSMutableDictionary alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSMutableDictionary, _sel_alloc); + return NSMutableDictionary.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NSMutableDictionary allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSMutableDictionary, + _sel_allocWithZone_, + zone, ); - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_hasItemConformingToTypeIdentifier_, + return NSMutableDictionary.fromPointer($ret, retain: false, release: true); + } + + /// dictionary + static NSMutableDictionary dictionary() { + final $ret = _objc_msgSend_151sglz( + _class_NSMutableDictionary, + _sel_dictionary, + ); + return NSMutableDictionary.fromPointer($ret, retain: true, release: true); + } + + /// dictionaryWithCapacity: + static NSMutableDictionary dictionaryWithCapacity(DartNSUInteger numItems) { + final $ret = _objc_msgSend_14hpxwa( + _class_NSMutableDictionary, + _sel_dictionaryWithCapacity_, + numItems, + ); + return NSMutableDictionary.fromPointer($ret, retain: true, release: true); + } + + /// dictionaryWithDictionary: + static NSMutableDictionary dictionaryWithDictionary(NSDictionary dict) { + final _$$ref$1 = dict.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSMutableDictionary, + _sel_dictionaryWithDictionary_, _$$ref$1.pointer, ); + return NSMutableDictionary.fromPointer($ret, retain: true, release: true); } - /// hasRepresentationConformingToTypeIdentifier:fileOptions: - bool hasRepresentationConformingToTypeIdentifier( - NSString typeIdentifier, { - required int fileOptions, + /// dictionaryWithObject:forKey: + static NSMutableDictionary dictionaryWithObject( + objc.ObjCObject object, { + required NSCopying forKey, }) { - final _$$ref = object$.ref; - final _$$ref$1 = typeIdentifier.ref; - objc.checkOsVersionInternal( - 'NSItemProvider.hasRepresentationConformingToTypeIdentifier:fileOptions:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + final _$$ref$2 = object.ref; + final _$$ref$3 = forKey.ref; + final $ret = _objc_msgSend_15qeuct( + _class_NSMutableDictionary, + _sel_dictionaryWithObject_forKey_, + _$$ref$2.pointer, + _$$ref$3.pointer, ); - return _objc_msgSend_1wdb8ji( - _$$ref.pointer, - _sel_hasRepresentationConformingToTypeIdentifier_fileOptions_, + return NSMutableDictionary.fromPointer($ret, retain: true, release: true); + } + + /// dictionaryWithObjects:forKeys: + static NSMutableDictionary dictionaryWithObjects( + NSArray objects, { + required NSArray forKeys, + }) { + final _$$ref$2 = objects.ref; + final _$$ref$3 = forKeys.ref; + final $ret = _objc_msgSend_15qeuct( + _class_NSMutableDictionary, + _sel_dictionaryWithObjects_forKeys_, + _$$ref$2.pointer, + _$$ref$3.pointer, + ); + return NSMutableDictionary.fromPointer($ret, retain: true, release: true); + } + + /// dictionaryWithObjects:forKeys:count: + static NSMutableDictionary dictionaryWithObjects$1( + ffi.Pointer> objects, { + required ffi.Pointer> forKeys, + required DartNSUInteger count, + }) { + final $ret = _objc_msgSend_1dydpdi( + _class_NSMutableDictionary, + _sel_dictionaryWithObjects_forKeys_count_, + objects, + forKeys, + count, + ); + return NSMutableDictionary.fromPointer($ret, retain: true, release: true); + } + + /// dictionaryWithObjectsAndKeys: + static NSMutableDictionary dictionaryWithObjectsAndKeys( + objc.ObjCObject firstObject, + ) { + final _$$ref$1 = firstObject.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSMutableDictionary, + _sel_dictionaryWithObjectsAndKeys_, _$$ref$1.pointer, - fileOptions, + ); + return NSMutableDictionary.fromPointer($ret, retain: true, release: true); + } + + /// new + static NSMutableDictionary new$() { + final $ret = _objc_msgSend_151sglz(_class_NSMutableDictionary, _sel_new); + return NSMutableDictionary.fromPointer($ret, retain: false, release: true); + } + + /// supportsSecureCoding + static bool getSupportsSecureCoding() { + return _objc_msgSend_91o635( + _class_NSMutableDictionary, + _sel_supportsSecureCoding, ); } + /// Returns a new instance of NSMutableDictionary constructed with the default `new` method. + NSMutableDictionary() : this.as(new$().object$); +} + +extension NSMutableDictionary$Methods on NSMutableDictionary { /// init - NSItemProvider$2 init() { - final _$$ref$19 = object$.ref; + NSMutableDictionary init() { + final _$$ref$24 = object$.ref; objc.checkOsVersionInternal( - 'NSItemProvider.init', + 'NSMutableDictionary.init', iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); final $ret = _objc_msgSend_151sglz( - _$$ref$19.retainAndReturnPointer(), + _$$ref$24.retainAndReturnPointer(), _sel_init, ); - return NSItemProvider$2.fromPointer($ret, retain: false, release: true); + return NSMutableDictionary.fromPointer($ret, retain: false, release: true); } - /// initWithContentsOfURL: - NSItemProvider$2? initWithContentsOfURL(NSURL fileURL) { + /// initWithCapacity: + NSMutableDictionary initWithCapacity(DartNSUInteger numItems) { final _$$ref = object$.ref; - final _$$ref$1 = fileURL.ref; - objc.checkOsVersionInternal( - 'NSItemProvider.initWithContentsOfURL:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( + final $ret = _objc_msgSend_14hpxwa( _$$ref.retainAndReturnPointer(), - _sel_initWithContentsOfURL_, - _$$ref$1.pointer, + _sel_initWithCapacity_, + numItems, ); - return $ret.address == 0 - ? null - : NSItemProvider$2.fromPointer($ret, retain: false, release: true); + return NSMutableDictionary.fromPointer($ret, retain: false, release: true); } - /// initWithItem:typeIdentifier: - NSItemProvider$2 initWithItem( - NSSecureCoding? item, { - NSString? typeIdentifier, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = item?.ref; - final _$$ref$2 = typeIdentifier?.ref; - objc.checkOsVersionInternal( - 'NSItemProvider.initWithItem:typeIdentifier:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), - ); - final $ret = _objc_msgSend_15qeuct( - _$$ref.retainAndReturnPointer(), - _sel_initWithItem_typeIdentifier_, - _$$ref$1?.pointer ?? ffi.nullptr, - _$$ref$2?.pointer ?? ffi.nullptr, + /// initWithCoder: + NSMutableDictionary? initWithCoder(NSCoder coder) { + final _$$ref$24 = object$.ref; + final _$$ref$25 = coder.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref$24.retainAndReturnPointer(), + _sel_initWithCoder_, + _$$ref$25.pointer, ); - return NSItemProvider$2.fromPointer($ret, retain: false, release: true); + return $ret.address == 0 + ? null + : NSMutableDictionary.fromPointer($ret, retain: false, release: true); } - /// initWithObject: - NSItemProvider$2 initWithObject(NSItemProviderWriting object) { - final _$$ref = object$.ref; - final _$$ref$1 = object.ref; - objc.checkOsVersionInternal( - 'NSItemProvider.initWithObject:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); + /// initWithDictionary: + NSMutableDictionary initWithDictionary(NSDictionary otherDictionary) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = otherDictionary.ref; final $ret = _objc_msgSend_1sotr3r( - _$$ref.retainAndReturnPointer(), - _sel_initWithObject_, - _$$ref$1.pointer, + _$$ref$2.retainAndReturnPointer(), + _sel_initWithDictionary_, + _$$ref$3.pointer, ); - return NSItemProvider$2.fromPointer($ret, retain: false, release: true); + return NSMutableDictionary.fromPointer($ret, retain: false, release: true); } - /// loadDataRepresentationForTypeIdentifier:completionHandler: - NSProgress loadDataRepresentationForTypeIdentifier( - NSString typeIdentifier, { - required objc.ObjCBlock - completionHandler, + /// initWithDictionary:copyItems: + NSMutableDictionary initWithDictionary$1( + NSDictionary otherDictionary, { + required bool copyItems, }) { - final _$$ref = object$.ref; - final _$$ref$1 = typeIdentifier.ref; - final _$$ref$2 = completionHandler.ref; - objc.checkOsVersionInternal( - 'NSItemProvider.loadDataRepresentationForTypeIdentifier:completionHandler:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - final $ret = _objc_msgSend_r0bo0s( - _$$ref.pointer, - _sel_loadDataRepresentationForTypeIdentifier_completionHandler_, - _$$ref$1.pointer, - _$$ref$2.pointer, + final _$$ref$2 = object$.ref; + final _$$ref$3 = otherDictionary.ref; + final $ret = _objc_msgSend_17amj0z( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithDictionary_copyItems_, + _$$ref$3.pointer, + copyItems, ); - return NSProgress.fromPointer($ret, retain: true, release: true); + return NSMutableDictionary.fromPointer($ret, retain: false, release: true); } - /// loadFileRepresentationForTypeIdentifier:completionHandler: - NSProgress loadFileRepresentationForTypeIdentifier( - NSString typeIdentifier, { - required objc.ObjCBlock - completionHandler, + /// initWithObjects:forKeys: + NSMutableDictionary initWithObjects( + NSArray objects, { + required NSArray forKeys, }) { - final _$$ref = object$.ref; - final _$$ref$1 = typeIdentifier.ref; - final _$$ref$2 = completionHandler.ref; - objc.checkOsVersionInternal( - 'NSItemProvider.loadFileRepresentationForTypeIdentifier:completionHandler:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - final $ret = _objc_msgSend_r0bo0s( - _$$ref.pointer, - _sel_loadFileRepresentationForTypeIdentifier_completionHandler_, - _$$ref$1.pointer, - _$$ref$2.pointer, + final _$$ref$3 = object$.ref; + final _$$ref$4 = objects.ref; + final _$$ref$5 = forKeys.ref; + final $ret = _objc_msgSend_15qeuct( + _$$ref$3.retainAndReturnPointer(), + _sel_initWithObjects_forKeys_, + _$$ref$4.pointer, + _$$ref$5.pointer, ); - return NSProgress.fromPointer($ret, retain: true, release: true); + return NSMutableDictionary.fromPointer($ret, retain: false, release: true); } - /// loadInPlaceFileRepresentationForTypeIdentifier:completionHandler: - NSProgress loadInPlaceFileRepresentationForTypeIdentifier( - NSString typeIdentifier, { - required objc.ObjCBlock - completionHandler, + /// initWithObjects:forKeys:count: + NSMutableDictionary initWithObjects$1( + ffi.Pointer> objects, { + required ffi.Pointer> forKeys, + required DartNSUInteger count, }) { - final _$$ref = object$.ref; - final _$$ref$1 = typeIdentifier.ref; - final _$$ref$2 = completionHandler.ref; - objc.checkOsVersionInternal( - 'NSItemProvider.loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + final _$$ref$1 = object$.ref; + final $ret = _objc_msgSend_1dydpdi( + _$$ref$1.retainAndReturnPointer(), + _sel_initWithObjects_forKeys_count_, + objects, + forKeys, + count, ); - final $ret = _objc_msgSend_r0bo0s( - _$$ref.pointer, - _sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_, - _$$ref$1.pointer, - _$$ref$2.pointer, + return NSMutableDictionary.fromPointer($ret, retain: false, release: true); + } + + /// initWithObjectsAndKeys: + NSMutableDictionary initWithObjectsAndKeys(objc.ObjCObject firstObject) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = firstObject.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithObjectsAndKeys_, + _$$ref$3.pointer, ); - return NSProgress.fromPointer($ret, retain: true, release: true); + return NSMutableDictionary.fromPointer($ret, retain: false, release: true); } - /// loadItemForTypeIdentifier:options:completionHandler: - void loadItemForTypeIdentifier( - NSString typeIdentifier, { - NSDictionary? options, - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >? - completionHandler, - }) { + /// removeObjectForKey: + void removeObjectForKey(objc.ObjCObject aKey) { final _$$ref = object$.ref; - final _$$ref$1 = typeIdentifier.ref; - final _$$ref$2 = options?.ref; - final _$$ref$3 = completionHandler?.ref; - objc.checkOsVersionInternal( - 'NSItemProvider.loadItemForTypeIdentifier:options:completionHandler:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), - ); - _objc_msgSend_18qun1e( + final _$$ref$1 = aKey.ref; + _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_loadItemForTypeIdentifier_options_completionHandler_, + _sel_removeObjectForKey_, _$$ref$1.pointer, - _$$ref$2?.pointer ?? ffi.nullptr, - _$$ref$3?.pointer ?? ffi.nullptr, ); } - /// loadObjectOfClass:completionHandler: - NSProgress loadObjectOfClass( - NSItemProviderReading aClass, { - required objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) - > - completionHandler, - }) { + /// setObject:forKey: + void setObject(objc.ObjCObject anObject, {required NSCopying forKey}) { final _$$ref = object$.ref; - final _$$ref$1 = aClass.ref; - final _$$ref$2 = completionHandler.ref; - objc.checkOsVersionInternal( - 'NSItemProvider.loadObjectOfClass:completionHandler:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - final $ret = _objc_msgSend_r0bo0s( + final _$$ref$1 = anObject.ref; + final _$$ref$2 = forKey.ref; + _objc_msgSend_pfv6jd( _$$ref.pointer, - _sel_loadObjectOfClass_completionHandler_, + _sel_setObject_forKey_, _$$ref$1.pointer, _$$ref$2.pointer, ); - return NSProgress.fromPointer($ret, retain: true, release: true); } +} - /// registerDataRepresentationForTypeIdentifier:visibility:loadHandler: - void registerDataRepresentationForTypeIdentifier( - NSString typeIdentifier, { - required NSItemProviderRepresentationVisibility visibility, - required objc.ObjCBlock< - NSProgress? Function(objc.ObjCBlock) - > - loadHandler, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = typeIdentifier.ref; - final _$$ref$2 = loadHandler.ref; - objc.checkOsVersionInternal( - 'NSItemProvider.registerDataRepresentationForTypeIdentifier:visibility:loadHandler:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - _objc_msgSend_1pl40xc( - _$$ref.pointer, - _sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_, - _$$ref$1.pointer, - visibility.value, - _$$ref$2.pointer, - ); +/// NSMutableIndexSet +extension type NSMutableIndexSet._(objc.ObjCObject object$) + implements objc.ObjCObject, NSIndexSet { + /// Constructs a [NSMutableIndexSet] that points to the same underlying object as [other]. + NSMutableIndexSet.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); } - /// registerFileRepresentationForTypeIdentifier:fileOptions:visibility:loadHandler: - void registerFileRepresentationForTypeIdentifier( - NSString typeIdentifier, { - required int fileOptions, - required NSItemProviderRepresentationVisibility visibility, - required objc.ObjCBlock< - NSProgress? Function( - objc.ObjCBlock, - ) - > - loadHandler, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = typeIdentifier.ref; - final _$$ref$2 = loadHandler.ref; - objc.checkOsVersionInternal( - 'NSItemProvider.registerFileRepresentationForTypeIdentifier:fileOptions:visibility:loadHandler:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - _objc_msgSend_t7arir( - _$$ref.pointer, - _sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_, - _$$ref$1.pointer, - fileOptions, - visibility.value, - _$$ref$2.pointer, - ); + /// Constructs a [NSMutableIndexSet] that wraps the given raw object pointer. + NSMutableIndexSet.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + assert(isA(object$)); } - /// registerItemForTypeIdentifier:loadHandler: - void registerItemForTypeIdentifier( - NSString typeIdentifier, { - required objc.ObjCBlock< - ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, - ffi.Pointer, - NSDictionary, - ) - > - loadHandler, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = typeIdentifier.ref; - final _$$ref$2 = loadHandler.ref; - objc.checkOsVersionInternal( - 'NSItemProvider.registerItemForTypeIdentifier:loadHandler:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), - ); - _objc_msgSend_o762yo( - _$$ref.pointer, - _sel_registerItemForTypeIdentifier_loadHandler_, - _$$ref$1.pointer, - _$$ref$2.pointer, - ); + /// Returns whether [obj] is an instance of [NSMutableIndexSet]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSMutableIndexSet, + ); + + /// alloc + static NSMutableIndexSet alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSMutableIndexSet, _sel_alloc); + return NSMutableIndexSet.fromPointer($ret, retain: false, release: true); } - /// registerObject:visibility: - void registerObject( - NSItemProviderWriting object, { - required NSItemProviderRepresentationVisibility visibility, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = object.ref; - objc.checkOsVersionInternal( - 'NSItemProvider.registerObject:visibility:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + /// allocWithZone: + static NSMutableIndexSet allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSMutableIndexSet, + _sel_allocWithZone_, + zone, ); - _objc_msgSend_1k745tv( - _$$ref.pointer, - _sel_registerObject_visibility_, - _$$ref$1.pointer, - visibility.value, + return NSMutableIndexSet.fromPointer($ret, retain: false, release: true); + } + + /// indexSet + static NSMutableIndexSet indexSet() { + final $ret = _objc_msgSend_151sglz(_class_NSMutableIndexSet, _sel_indexSet); + return NSMutableIndexSet.fromPointer($ret, retain: true, release: true); + } + + /// indexSetWithIndex: + static NSMutableIndexSet indexSetWithIndex(DartNSUInteger value) { + final $ret = _objc_msgSend_14hpxwa( + _class_NSMutableIndexSet, + _sel_indexSetWithIndex_, + value, ); + return NSMutableIndexSet.fromPointer($ret, retain: true, release: true); } - /// registerObjectOfClass:visibility:loadHandler: - void registerObjectOfClass( - NSItemProviderWriting aClass, { - required NSItemProviderRepresentationVisibility visibility, - required objc.ObjCBlock< - NSProgress? Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) - >, - ) - > - loadHandler, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = aClass.ref; - final _$$ref$2 = loadHandler.ref; - objc.checkOsVersionInternal( - 'NSItemProvider.registerObjectOfClass:visibility:loadHandler:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + /// indexSetWithIndexesInRange: + static NSMutableIndexSet indexSetWithIndexesInRange(NSRange range) { + final $ret = _objc_msgSend_1k1o1s7( + _class_NSMutableIndexSet, + _sel_indexSetWithIndexesInRange_, + range, ); - _objc_msgSend_1pl40xc( - _$$ref.pointer, - _sel_registerObjectOfClass_visibility_loadHandler_, - _$$ref$1.pointer, - visibility.value, - _$$ref$2.pointer, + return NSMutableIndexSet.fromPointer($ret, retain: true, release: true); + } + + /// new + static NSMutableIndexSet new$() { + final $ret = _objc_msgSend_151sglz(_class_NSMutableIndexSet, _sel_new); + return NSMutableIndexSet.fromPointer($ret, retain: false, release: true); + } + + /// supportsSecureCoding + static bool getSupportsSecureCoding() { + return _objc_msgSend_91o635( + _class_NSMutableIndexSet, + _sel_supportsSecureCoding, ); } - /// registeredTypeIdentifiers - NSArray get registeredTypeIdentifiers { + /// Returns a new instance of NSMutableIndexSet constructed with the default `new` method. + NSMutableIndexSet() : this.as(new$().object$); +} + +extension NSMutableIndexSet$Methods on NSMutableIndexSet { + /// addIndex: + void addIndex(DartNSUInteger value) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSItemProvider.registeredTypeIdentifiers', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_registeredTypeIdentifiers, - ); - return NSArray.fromPointer($ret, retain: true, release: true); + _objc_msgSend_1i9r4xy(_$$ref.pointer, _sel_addIndex_, value); } - /// registeredTypeIdentifiersWithFileOptions: - NSArray registeredTypeIdentifiersWithFileOptions(int fileOptions) { + /// addIndexes: + void addIndexes(NSIndexSet indexSet) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSItemProvider.registeredTypeIdentifiersWithFileOptions:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - final $ret = _objc_msgSend_7g3u2y( - _$$ref.pointer, - _sel_registeredTypeIdentifiersWithFileOptions_, - fileOptions, - ); - return NSArray.fromPointer($ret, retain: true, release: true); + final _$$ref$1 = indexSet.ref; + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_addIndexes_, _$$ref$1.pointer); } - /// setSuggestedName: - set suggestedName(NSString? value) { + /// addIndexesInRange: + void addIndexesInRange(NSRange range) { final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; + _objc_msgSend_1e3pm0z(_$$ref.pointer, _sel_addIndexesInRange_, range); + } + + /// init + NSMutableIndexSet init() { + final _$$ref$25 = object$.ref; objc.checkOsVersionInternal( - 'NSItemProvider.setSuggestedName:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 14, 0)), + 'NSMutableIndexSet.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_setSuggestedName_, - _$$ref$1?.pointer ?? ffi.nullptr, + final $ret = _objc_msgSend_151sglz( + _$$ref$25.retainAndReturnPointer(), + _sel_init, ); + return NSMutableIndexSet.fromPointer($ret, retain: false, release: true); } - /// suggestedName - NSString? get suggestedName { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSItemProvider.suggestedName', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 14, 0)), + /// initWithCoder: + NSMutableIndexSet? initWithCoder(NSCoder coder) { + final _$$ref$26 = object$.ref; + final _$$ref$27 = coder.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref$26.retainAndReturnPointer(), + _sel_initWithCoder_, + _$$ref$27.pointer, ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_suggestedName); return $ret.address == 0 ? null - : NSString.fromPointer($ret, retain: true, release: true); + : NSMutableIndexSet.fromPointer($ret, retain: false, release: true); } -} - -sealed class NSItemProviderFileOptions { - static const NSItemProviderFileOptionOpenInPlace = 1; -} - -/// NSItemProviderReading -extension type NSItemProviderReading._(objc.ObjCProtocol object$) - implements objc.ObjCProtocol, NSObjectProtocol { - /// Constructs a [NSItemProviderReading] that points to the same underlying object as [other]. - NSItemProviderReading.as(objc.ObjCObject other) : object$ = other; - - /// Constructs a [NSItemProviderReading] that wraps the given raw object pointer. - NSItemProviderReading.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSItemProviderReading]. - static bool conformsTo(objc.ObjCObject obj) { - return _objc_msgSend_e3qsqz( - obj.ref.pointer, - _sel_conformsToProtocol_, - _protocol_NSItemProviderReading, + /// initWithIndex: + NSMutableIndexSet initWithIndex(DartNSUInteger value) { + final _$$ref$1 = object$.ref; + final $ret = _objc_msgSend_14hpxwa( + _$$ref$1.retainAndReturnPointer(), + _sel_initWithIndex_, + value, ); + return NSMutableIndexSet.fromPointer($ret, retain: false, release: true); } -} - -extension NSItemProviderReading$Methods on NSItemProviderReading {} - -interface class NSItemProviderReading$Builder { - /// Returns the [objc.Protocol] object for this protocol. - static objc.Protocol get $protocol => - objc.Protocol.fromPointer(_protocol_NSItemProviderReading.cast()); - /// Builds an object that implements the NSItemProviderReading protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - /// - /// If `$keepIsolateAlive` is true, this protocol will keep this isolate - /// alive until it is garbage collected by both Dart and ObjC. - static NSItemProviderReading implement({bool $keepIsolateAlive = true}) { - final builder = objc.ObjCProtocolBuilder( - debugName: 'NSItemProviderReading', + /// initWithIndexSet: + NSMutableIndexSet initWithIndexSet(NSIndexSet indexSet) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = indexSet.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithIndexSet_, + _$$ref$3.pointer, ); + return NSMutableIndexSet.fromPointer($ret, retain: false, release: true); + } - builder.addProtocol($protocol); - return NSItemProviderReading.as( - builder.build(keepIsolateAlive: $keepIsolateAlive), + /// initWithIndexesInRange: + NSMutableIndexSet initWithIndexesInRange(NSRange range) { + final _$$ref$1 = object$.ref; + final $ret = _objc_msgSend_1k1o1s7( + _$$ref$1.retainAndReturnPointer(), + _sel_initWithIndexesInRange_, + range, ); + return NSMutableIndexSet.fromPointer($ret, retain: false, release: true); } - /// Adds the implementation of the NSItemProviderReading protocol to an existing - /// [objc.ObjCProtocolBuilder]. - /// - /// Note: You cannot call this method after you have called `builder.build`. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, { - bool $keepIsolateAlive = true, - }) { - builder.addProtocol($protocol); + /// removeAllIndexes + void removeAllIndexes() { + final _$$ref = object$.ref; + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_removeAllIndexes); } -} -enum NSItemProviderRepresentationVisibility { - NSItemProviderRepresentationVisibilityAll(0), - NSItemProviderRepresentationVisibilityTeam(1), - NSItemProviderRepresentationVisibilityGroup(2), - NSItemProviderRepresentationVisibilityOwnProcess(3); + /// removeIndex: + void removeIndex(DartNSUInteger value) { + final _$$ref = object$.ref; + _objc_msgSend_1i9r4xy(_$$ref.pointer, _sel_removeIndex_, value); + } - final int value; - const NSItemProviderRepresentationVisibility(this.value); + /// removeIndexes: + void removeIndexes(NSIndexSet indexSet) { + final _$$ref = object$.ref; + final _$$ref$1 = indexSet.ref; + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_removeIndexes_, _$$ref$1.pointer); + } - static NSItemProviderRepresentationVisibility fromValue(int value) => - switch (value) { - 0 => NSItemProviderRepresentationVisibilityAll, - 1 => NSItemProviderRepresentationVisibilityTeam, - 2 => NSItemProviderRepresentationVisibilityGroup, - 3 => NSItemProviderRepresentationVisibilityOwnProcess, - _ => throw ArgumentError( - 'Unknown value for NSItemProviderRepresentationVisibility: $value', - ), - }; + /// removeIndexesInRange: + void removeIndexesInRange(NSRange range) { + final _$$ref = object$.ref; + _objc_msgSend_1e3pm0z(_$$ref.pointer, _sel_removeIndexesInRange_, range); + } + + /// shiftIndexesStartingAtIndex:by: + void shiftIndexesStartingAtIndex(DartNSUInteger index, {required int by}) { + final _$$ref = object$.ref; + _objc_msgSend_otx1t4( + _$$ref.pointer, + _sel_shiftIndexesStartingAtIndex_by_, + index, + by, + ); + } } -/// NSItemProviderWriting -extension type NSItemProviderWriting._(objc.ObjCProtocol object$) - implements objc.ObjCProtocol, NSObjectProtocol { - /// Constructs a [NSItemProviderWriting] that points to the same underlying object as [other]. - NSItemProviderWriting.as(objc.ObjCObject other) : object$ = other; +/// NSMutableOrderedSet +extension type NSMutableOrderedSet._(objc.ObjCObject object$) + implements objc.ObjCObject, NSOrderedSet { + /// Constructs a [NSMutableOrderedSet] that points to the same underlying object as [other]. + NSMutableOrderedSet.as(objc.ObjCObject other) : object$ = other { + objc.checkOsVersionInternal( + 'NSMutableOrderedSet', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + assert(isA(object$)); + } - /// Constructs a [NSItemProviderWriting] that wraps the given raw object pointer. - NSItemProviderWriting.fromPointer( + /// Constructs a [NSMutableOrderedSet] that wraps the given raw object pointer. + NSMutableOrderedSet.fromPointer( ffi.Pointer other, { bool retain = false, bool release = false, - }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + objc.checkOsVersionInternal( + 'NSMutableOrderedSet', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + assert(isA(object$)); + } - /// Returns whether [obj] is an instance of [NSItemProviderWriting]. - static bool conformsTo(objc.ObjCObject obj) { - return _objc_msgSend_e3qsqz( - obj.ref.pointer, - _sel_conformsToProtocol_, - _protocol_NSItemProviderWriting, + /// Returns whether [obj] is an instance of [NSMutableOrderedSet]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSMutableOrderedSet, + ); + + /// alloc + static NSMutableOrderedSet alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSMutableOrderedSet, _sel_alloc); + return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NSMutableOrderedSet allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSMutableOrderedSet, + _sel_allocWithZone_, + zone, ); + return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); } -} -extension NSItemProviderWriting$Methods on NSItemProviderWriting { - /// itemProviderVisibilityForRepresentationWithTypeIdentifier: - NSItemProviderRepresentationVisibility - itemProviderVisibilityForRepresentationWithTypeIdentifier( - NSString typeIdentifier, - ) { - final _$$ref$4 = object$.ref; - final _$$ref$5 = typeIdentifier.ref; + /// new + static NSMutableOrderedSet new$() { + final $ret = _objc_msgSend_151sglz(_class_NSMutableOrderedSet, _sel_new); + return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); + } + + /// orderedSet + static NSMutableOrderedSet orderedSet() { objc.checkOsVersionInternal( - 'NSItemProviderWriting.itemProviderVisibilityForRepresentationWithTypeIdentifier:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + 'NSMutableOrderedSet.orderedSet', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - if (!objc.respondsToSelector( - _$$ref$4.pointer, - _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, - )) { - throw objc.UnimplementedOptionalMethodException( - 'NSItemProviderWriting', - 'itemProviderVisibilityForRepresentationWithTypeIdentifier:', - ); - } - final $ret = _objc_msgSend_16fy0up( - _$$ref$4.pointer, - _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, - _$$ref$5.pointer, + final $ret = _objc_msgSend_151sglz( + _class_NSMutableOrderedSet, + _sel_orderedSet, ); - return NSItemProviderRepresentationVisibility.fromValue($ret); + return NSMutableOrderedSet.fromPointer($ret, retain: true, release: true); } - /// loadDataWithTypeIdentifier:forItemProviderCompletionHandler: - NSProgress? loadDataWithTypeIdentifier( - NSString typeIdentifier, { - required objc.ObjCBlock - forItemProviderCompletionHandler, - }) { - final _$$ref$6 = object$.ref; - final _$$ref$7 = typeIdentifier.ref; - final _$$ref$8 = forItemProviderCompletionHandler.ref; + /// orderedSetWithArray: + static NSMutableOrderedSet orderedSetWithArray(NSArray array) { + final _$$ref = array.ref; objc.checkOsVersionInternal( - 'NSItemProviderWriting.loadDataWithTypeIdentifier:forItemProviderCompletionHandler:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + 'NSMutableOrderedSet.orderedSetWithArray:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_r0bo0s( - _$$ref$6.pointer, - _sel_loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, - _$$ref$7.pointer, - _$$ref$8.pointer, + final $ret = _objc_msgSend_1sotr3r( + _class_NSMutableOrderedSet, + _sel_orderedSetWithArray_, + _$$ref.pointer, ); - return $ret.address == 0 - ? null - : NSProgress.fromPointer($ret, retain: true, release: true); + return NSMutableOrderedSet.fromPointer($ret, retain: true, release: true); } - /// writableTypeIdentifiersForItemProvider - NSArray get writableTypeIdentifiersForItemProvider { - final _$$ref$2 = object$.ref; + /// orderedSetWithArray:range:copyItems: + static NSMutableOrderedSet orderedSetWithArray$1( + NSArray array, { + required NSRange range, + required bool copyItems, + }) { + final _$$ref = array.ref; objc.checkOsVersionInternal( - 'NSItemProviderWriting.writableTypeIdentifiersForItemProvider', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + 'NSMutableOrderedSet.orderedSetWithArray:range:copyItems:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - if (!objc.respondsToSelector( - _$$ref$2.pointer, - _sel_writableTypeIdentifiersForItemProvider, - )) { - throw objc.UnimplementedOptionalMethodException( - 'NSItemProviderWriting', - 'writableTypeIdentifiersForItemProvider', - ); - } - final $ret = _objc_msgSend_151sglz( - _$$ref$2.pointer, - _sel_writableTypeIdentifiersForItemProvider, + final $ret = _objc_msgSend_w9bq5x( + _class_NSMutableOrderedSet, + _sel_orderedSetWithArray_range_copyItems_, + _$$ref.pointer, + range, + copyItems, ); - return NSArray.fromPointer($ret, retain: true, release: true); + return NSMutableOrderedSet.fromPointer($ret, retain: true, release: true); } -} - -interface class NSItemProviderWriting$Builder { - /// Returns the [objc.Protocol] object for this protocol. - static objc.Protocol get $protocol => - objc.Protocol.fromPointer(_protocol_NSItemProviderWriting.cast()); - /// Builds an object that implements the NSItemProviderWriting protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - /// - /// If `$keepIsolateAlive` is true, this protocol will keep this isolate - /// alive until it is garbage collected by both Dart and ObjC. - static NSItemProviderWriting implement({ - NSItemProviderRepresentationVisibility Function(NSString)? - itemProviderVisibilityForRepresentationWithTypeIdentifier_, - required NSProgress? Function( - NSString, - objc.ObjCBlock, - ) - loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, - NSArray Function()? writableTypeIdentifiersForItemProvider, - bool $keepIsolateAlive = true, - }) { - final builder = objc.ObjCProtocolBuilder( - debugName: 'NSItemProviderWriting', + /// orderedSetWithCapacity: + static NSMutableOrderedSet orderedSetWithCapacity(DartNSUInteger numItems) { + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.orderedSetWithCapacity:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - NSItemProviderWriting$Builder - .itemProviderVisibilityForRepresentationWithTypeIdentifier_ - .implement( - builder, - itemProviderVisibilityForRepresentationWithTypeIdentifier_, - ); - NSItemProviderWriting$Builder - .loadDataWithTypeIdentifier_forItemProviderCompletionHandler_ - .implement( - builder, - loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, - ); - NSItemProviderWriting$Builder.writableTypeIdentifiersForItemProvider - .implement(builder, writableTypeIdentifiersForItemProvider); - builder.addProtocol($protocol); - return NSItemProviderWriting.as( - builder.build(keepIsolateAlive: $keepIsolateAlive), + final $ret = _objc_msgSend_14hpxwa( + _class_NSMutableOrderedSet, + _sel_orderedSetWithCapacity_, + numItems, ); + return NSMutableOrderedSet.fromPointer($ret, retain: true, release: true); } - /// Adds the implementation of the NSItemProviderWriting protocol to an existing - /// [objc.ObjCProtocolBuilder]. - /// - /// Note: You cannot call this method after you have called `builder.build`. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, { - NSItemProviderRepresentationVisibility Function(NSString)? - itemProviderVisibilityForRepresentationWithTypeIdentifier_, - required NSProgress? Function( - NSString, - objc.ObjCBlock, - ) - loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, - NSArray Function()? writableTypeIdentifiersForItemProvider, - bool $keepIsolateAlive = true, - }) { - NSItemProviderWriting$Builder - .itemProviderVisibilityForRepresentationWithTypeIdentifier_ - .implement( - builder, - itemProviderVisibilityForRepresentationWithTypeIdentifier_, - ); - NSItemProviderWriting$Builder - .loadDataWithTypeIdentifier_forItemProviderCompletionHandler_ - .implement( - builder, - loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, - ); - NSItemProviderWriting$Builder.writableTypeIdentifiersForItemProvider - .implement(builder, writableTypeIdentifiersForItemProvider); - builder.addProtocol($protocol); - } - - /// itemProviderVisibilityForRepresentationWithTypeIdentifier: - static final itemProviderVisibilityForRepresentationWithTypeIdentifier_ = - objc.ObjCProtocolMethod< - NSItemProviderRepresentationVisibility Function(NSString) - >( - _protocol_NSItemProviderWriting, - _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_1ldqghh) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSItemProviderWriting, - _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, - isRequired: false, - isInstanceMethod: true, - ), - (NSItemProviderRepresentationVisibility Function(NSString) func) => - ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString.fromFunction( - (ffi.Pointer _, NSString arg1) => func(arg1), - ), - ); - - /// loadDataWithTypeIdentifier:forItemProviderCompletionHandler: - static final loadDataWithTypeIdentifier_forItemProviderCompletionHandler_ = - objc.ObjCProtocolMethod< - NSProgress? Function( - NSString, - objc.ObjCBlock, - ) - >( - _protocol_NSItemProviderWriting, - _sel_loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_1q0i84) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSItemProviderWriting, - _sel_loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, - isRequired: true, - isInstanceMethod: true, - ), - ( - NSProgress? Function( - NSString, - objc.ObjCBlock, - ) - func, - ) => - ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError.fromFunction( - ( - ffi.Pointer _, - NSString arg1, - objc.ObjCBlock arg2, - ) => func(arg1, arg2), - ), - ); - - /// writableTypeIdentifiersForItemProvider - static final writableTypeIdentifiersForItemProvider = - objc.ObjCProtocolMethod( - _protocol_NSItemProviderWriting, - _sel_writableTypeIdentifiersForItemProvider, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_1mbt9g9) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSItemProviderWriting, - _sel_writableTypeIdentifiersForItemProvider, - isRequired: false, - isInstanceMethod: true, - ), - (NSArray Function() func) => ObjCBlock_NSArray_ffiVoid.fromFunction( - (ffi.Pointer _) => func(), - ), - ); -} - -enum NSKeyValueChange { - NSKeyValueChangeSetting(1), - NSKeyValueChangeInsertion(2), - NSKeyValueChangeRemoval(3), - NSKeyValueChangeReplacement(4); - - final int value; - const NSKeyValueChange(this.value); - - static NSKeyValueChange fromValue(int value) => switch (value) { - 1 => NSKeyValueChangeSetting, - 2 => NSKeyValueChangeInsertion, - 3 => NSKeyValueChangeRemoval, - 4 => NSKeyValueChangeReplacement, - _ => throw ArgumentError('Unknown value for NSKeyValueChange: $value'), - }; -} - -/// NSKeyValueCoding -extension NSKeyValueCoding on NSSet { - /// setValue:forKey: - void setValue(objc.ObjCObject? value, {required NSString forKey}) { - final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; - final _$$ref$2 = forKey.ref; - _objc_msgSend_pfv6jd( - _$$ref.pointer, - _sel_setValue_forKey_, - _$$ref$1?.pointer ?? ffi.nullptr, - _$$ref$2.pointer, + /// orderedSetWithObject: + static NSMutableOrderedSet orderedSetWithObject(objc.ObjCObject object) { + final _$$ref = object.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.orderedSetWithObject:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - } - - /// valueForKey: - objc.ObjCObject valueForKey(NSString key) { - final _$$ref = object$.ref; - final _$$ref$1 = key.ref; final $ret = _objc_msgSend_1sotr3r( + _class_NSMutableOrderedSet, + _sel_orderedSetWithObject_, _$$ref.pointer, - _sel_valueForKey_, - _$$ref$1.pointer, ); - return objc.ObjCObject($ret, retain: true, release: true); + return NSMutableOrderedSet.fromPointer($ret, retain: true, release: true); } -} -/// NSKeyValueCoding -extension NSKeyValueCoding$1 on NSDictionary { - /// valueForKey: - objc.ObjCObject? valueForKey(NSString key) { - final _$$ref = object$.ref; - final _$$ref$1 = key.ref; + /// orderedSetWithObjects: + static NSMutableOrderedSet orderedSetWithObjects(objc.ObjCObject firstObj) { + final _$$ref = firstObj.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.orderedSetWithObjects:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); final $ret = _objc_msgSend_1sotr3r( + _class_NSMutableOrderedSet, + _sel_orderedSetWithObjects_, _$$ref.pointer, - _sel_valueForKey_, - _$$ref$1.pointer, ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); + return NSMutableOrderedSet.fromPointer($ret, retain: true, release: true); } -} -/// NSKeyValueCoding -extension NSKeyValueCoding$2 on NSObject { - /// dictionaryWithValuesForKeys: - NSDictionary dictionaryWithValuesForKeys(NSArray keys) { - final _$$ref = object$.ref; - final _$$ref$1 = keys.ref; + /// orderedSetWithObjects:count: + static NSMutableOrderedSet orderedSetWithObjects$1( + ffi.Pointer> objects, { + required DartNSUInteger count, + }) { objc.checkOsVersionInternal( - 'NSObject.dictionaryWithValuesForKeys:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSMutableOrderedSet.orderedSetWithObjects:count:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_dictionaryWithValuesForKeys_, - _$$ref$1.pointer, + final $ret = _objc_msgSend_zmbtbd( + _class_NSMutableOrderedSet, + _sel_orderedSetWithObjects_count_, + objects, + count, ); - return NSDictionary.fromPointer($ret, retain: true, release: true); + return NSMutableOrderedSet.fromPointer($ret, retain: true, release: true); } - /// mutableArrayValueForKey: - NSMutableArray mutableArrayValueForKey(NSString key) { - final _$$ref = object$.ref; - final _$$ref$1 = key.ref; + /// orderedSetWithOrderedSet: + static NSMutableOrderedSet orderedSetWithOrderedSet(NSOrderedSet set) { + final _$$ref = set.ref; objc.checkOsVersionInternal( - 'NSObject.mutableArrayValueForKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSMutableOrderedSet.orderedSetWithOrderedSet:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); final $ret = _objc_msgSend_1sotr3r( + _class_NSMutableOrderedSet, + _sel_orderedSetWithOrderedSet_, _$$ref.pointer, - _sel_mutableArrayValueForKey_, - _$$ref$1.pointer, ); - return NSMutableArray.fromPointer($ret, retain: true, release: true); + return NSMutableOrderedSet.fromPointer($ret, retain: true, release: true); } - /// mutableArrayValueForKeyPath: - NSMutableArray mutableArrayValueForKeyPath(NSString keyPath) { - final _$$ref = object$.ref; - final _$$ref$1 = keyPath.ref; + /// orderedSetWithOrderedSet:range:copyItems: + static NSMutableOrderedSet orderedSetWithOrderedSet$1( + NSOrderedSet set, { + required NSRange range, + required bool copyItems, + }) { + final _$$ref = set.ref; objc.checkOsVersionInternal( - 'NSObject.mutableArrayValueForKeyPath:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSMutableOrderedSet.orderedSetWithOrderedSet:range:copyItems:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_1sotr3r( + final $ret = _objc_msgSend_w9bq5x( + _class_NSMutableOrderedSet, + _sel_orderedSetWithOrderedSet_range_copyItems_, _$$ref.pointer, - _sel_mutableArrayValueForKeyPath_, - _$$ref$1.pointer, + range, + copyItems, ); - return NSMutableArray.fromPointer($ret, retain: true, release: true); + return NSMutableOrderedSet.fromPointer($ret, retain: true, release: true); } - /// mutableOrderedSetValueForKey: - NSMutableOrderedSet mutableOrderedSetValueForKey(NSString key) { - final _$$ref = object$.ref; - final _$$ref$1 = key.ref; + /// orderedSetWithSet: + static NSMutableOrderedSet orderedSetWithSet(NSSet set) { + final _$$ref = set.ref; objc.checkOsVersionInternal( - 'NSObject.mutableOrderedSetValueForKey:', + 'NSMutableOrderedSet.orderedSetWithSet:', iOS: (false, (5, 0, 0)), macOS: (false, (10, 7, 0)), ); final $ret = _objc_msgSend_1sotr3r( + _class_NSMutableOrderedSet, + _sel_orderedSetWithSet_, _$$ref.pointer, - _sel_mutableOrderedSetValueForKey_, - _$$ref$1.pointer, ); return NSMutableOrderedSet.fromPointer($ret, retain: true, release: true); } - /// mutableOrderedSetValueForKeyPath: - NSMutableOrderedSet mutableOrderedSetValueForKeyPath(NSString keyPath) { - final _$$ref = object$.ref; - final _$$ref$1 = keyPath.ref; + /// orderedSetWithSet:copyItems: + static NSMutableOrderedSet orderedSetWithSet$1( + NSSet set, { + required bool copyItems, + }) { + final _$$ref = set.ref; objc.checkOsVersionInternal( - 'NSObject.mutableOrderedSetValueForKeyPath:', + 'NSMutableOrderedSet.orderedSetWithSet:copyItems:', iOS: (false, (5, 0, 0)), macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_1sotr3r( + final $ret = _objc_msgSend_17amj0z( + _class_NSMutableOrderedSet, + _sel_orderedSetWithSet_copyItems_, _$$ref.pointer, - _sel_mutableOrderedSetValueForKeyPath_, - _$$ref$1.pointer, + copyItems, ); return NSMutableOrderedSet.fromPointer($ret, retain: true, release: true); } - /// mutableSetValueForKey: - NSMutableSet mutableSetValueForKey(NSString key) { - final _$$ref = object$.ref; - final _$$ref$1 = key.ref; + /// supportsSecureCoding + static bool getSupportsSecureCoding() { + return _objc_msgSend_91o635( + _class_NSMutableOrderedSet, + _sel_supportsSecureCoding, + ); + } + + /// Returns a new instance of NSMutableOrderedSet constructed with the default `new` method. + NSMutableOrderedSet() : this.as(new$().object$); +} + +extension NSMutableOrderedSet$Methods on NSMutableOrderedSet { + /// init + NSMutableOrderedSet init() { + final _$$ref$26 = object$.ref; objc.checkOsVersionInternal( - 'NSObject.mutableSetValueForKey:', + 'NSMutableOrderedSet.init', iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_mutableSetValueForKey_, - _$$ref$1.pointer, + final $ret = _objc_msgSend_151sglz( + _$$ref$26.retainAndReturnPointer(), + _sel_init, ); - return NSMutableSet.fromPointer($ret, retain: true, release: true); + return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); } - /// mutableSetValueForKeyPath: - NSMutableSet mutableSetValueForKeyPath(NSString keyPath) { + /// initWithArray: + NSMutableOrderedSet initWithArray(NSArray array) { final _$$ref = object$.ref; - final _$$ref$1 = keyPath.ref; + final _$$ref$1 = array.ref; objc.checkOsVersionInternal( - 'NSObject.mutableSetValueForKeyPath:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSMutableOrderedSet.initWithArray:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_mutableSetValueForKeyPath_, + _$$ref.retainAndReturnPointer(), + _sel_initWithArray_, _$$ref$1.pointer, ); - return NSMutableSet.fromPointer($ret, retain: true, release: true); + return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); } - /// setNilValueForKey: - void setNilValueForKey(NSString key) { + /// initWithArray:copyItems: + NSMutableOrderedSet initWithArray$1(NSArray set, {required bool copyItems}) { final _$$ref = object$.ref; - final _$$ref$1 = key.ref; + final _$$ref$1 = set.ref; objc.checkOsVersionInternal( - 'NSObject.setNilValueForKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSMutableOrderedSet.initWithArray:copyItems:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_setNilValueForKey_, + final $ret = _objc_msgSend_17amj0z( + _$$ref.retainAndReturnPointer(), + _sel_initWithArray_copyItems_, _$$ref$1.pointer, + copyItems, ); + return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); } - /// setValue:forKey: - void setValue(objc.ObjCObject? value, {required NSString forKey}) { + /// initWithArray:range:copyItems: + NSMutableOrderedSet initWithArray$2( + NSArray set, { + required NSRange range, + required bool copyItems, + }) { final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; - final _$$ref$2 = forKey.ref; + final _$$ref$1 = set.ref; objc.checkOsVersionInternal( - 'NSObject.setValue:forKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSMutableOrderedSet.initWithArray:range:copyItems:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - _objc_msgSend_pfv6jd( - _$$ref.pointer, - _sel_setValue_forKey_, - _$$ref$1?.pointer ?? ffi.nullptr, - _$$ref$2.pointer, + final $ret = _objc_msgSend_w9bq5x( + _$$ref.retainAndReturnPointer(), + _sel_initWithArray_range_copyItems_, + _$$ref$1.pointer, + range, + copyItems, ); + return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); } - /// setValue:forKeyPath: - void setValue$1(objc.ObjCObject? value, {required NSString forKeyPath}) { + /// initWithCapacity: + NSMutableOrderedSet initWithCapacity(DartNSUInteger numItems) { final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; - final _$$ref$2 = forKeyPath.ref; objc.checkOsVersionInternal( - 'NSObject.setValue:forKeyPath:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSMutableOrderedSet.initWithCapacity:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - _objc_msgSend_pfv6jd( - _$$ref.pointer, - _sel_setValue_forKeyPath_, - _$$ref$1?.pointer ?? ffi.nullptr, - _$$ref$2.pointer, + final $ret = _objc_msgSend_14hpxwa( + _$$ref.retainAndReturnPointer(), + _sel_initWithCapacity_, + numItems, ); + return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); } - /// setValue:forUndefinedKey: - void setValue$2(objc.ObjCObject? value, {required NSString forUndefinedKey}) { - final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; - final _$$ref$2 = forUndefinedKey.ref; - objc.checkOsVersionInternal( - 'NSObject.setValue:forUndefinedKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_pfv6jd( - _$$ref.pointer, - _sel_setValue_forUndefinedKey_, - _$$ref$1?.pointer ?? ffi.nullptr, - _$$ref$2.pointer, + /// initWithCoder: + NSMutableOrderedSet? initWithCoder(NSCoder coder) { + final _$$ref$28 = object$.ref; + final _$$ref$29 = coder.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref$28.retainAndReturnPointer(), + _sel_initWithCoder_, + _$$ref$29.pointer, ); + return $ret.address == 0 + ? null + : NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); } - /// setValuesForKeysWithDictionary: - void setValuesForKeysWithDictionary(NSDictionary keyedValues) { + /// initWithObject: + NSMutableOrderedSet initWithObject(objc.ObjCObject object) { final _$$ref = object$.ref; - final _$$ref$1 = keyedValues.ref; + final _$$ref$1 = object.ref; objc.checkOsVersionInternal( - 'NSObject.setValuesForKeysWithDictionary:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSMutableOrderedSet.initWithObject:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_setValuesForKeysWithDictionary_, + final $ret = _objc_msgSend_1sotr3r( + _$$ref.retainAndReturnPointer(), + _sel_initWithObject_, _$$ref$1.pointer, ); + return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); } - /// validateValue:forKey:error: - bool validateValue( - ffi.Pointer> ioValue, { - required NSString forKey, - }) { + /// initWithObjects: + NSMutableOrderedSet initWithObjects(objc.ObjCObject firstObj) { final _$$ref = object$.ref; - final _$$ref$1 = forKey.ref; + final _$$ref$1 = firstObj.ref; objc.checkOsVersionInternal( - 'NSObject.validateValue:forKey:error:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSMutableOrderedSet.initWithObjects:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1j9bhml( - _$$ref.pointer, - _sel_validateValue_forKey_error_, - ioValue, - _$$ref$1.pointer, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret; - } finally { - pkg_ffi.calloc.free($err); - } + final $ret = _objc_msgSend_1sotr3r( + _$$ref.retainAndReturnPointer(), + _sel_initWithObjects_, + _$$ref$1.pointer, + ); + return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); } - /// validateValue:forKeyPath:error: - bool validateValue$1( - ffi.Pointer> ioValue, { - required NSString forKeyPath, + /// initWithObjects:count: + NSMutableOrderedSet initWithObjects$1( + ffi.Pointer> objects, { + required DartNSUInteger count, }) { final _$$ref = object$.ref; - final _$$ref$1 = forKeyPath.ref; objc.checkOsVersionInternal( - 'NSObject.validateValue:forKeyPath:error:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSMutableOrderedSet.initWithObjects:count:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1j9bhml( - _$$ref.pointer, - _sel_validateValue_forKeyPath_error_, - ioValue, - _$$ref$1.pointer, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret; - } finally { - pkg_ffi.calloc.free($err); - } + final $ret = _objc_msgSend_zmbtbd( + _$$ref.retainAndReturnPointer(), + _sel_initWithObjects_count_, + objects, + count, + ); + return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); } - /// valueForKey: - objc.ObjCObject? valueForKey(NSString key) { + /// initWithOrderedSet: + NSMutableOrderedSet initWithOrderedSet(NSOrderedSet set) { final _$$ref = object$.ref; - final _$$ref$1 = key.ref; + final _$$ref$1 = set.ref; objc.checkOsVersionInternal( - 'NSObject.valueForKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSMutableOrderedSet.initWithOrderedSet:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_valueForKey_, + _$$ref.retainAndReturnPointer(), + _sel_initWithOrderedSet_, _$$ref$1.pointer, ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); + return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); } - /// valueForKeyPath: - objc.ObjCObject? valueForKeyPath(NSString keyPath) { + /// initWithOrderedSet:copyItems: + NSMutableOrderedSet initWithOrderedSet$1( + NSOrderedSet set, { + required bool copyItems, + }) { final _$$ref = object$.ref; - final _$$ref$1 = keyPath.ref; + final _$$ref$1 = set.ref; objc.checkOsVersionInternal( - 'NSObject.valueForKeyPath:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSMutableOrderedSet.initWithOrderedSet:copyItems:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_valueForKeyPath_, + final $ret = _objc_msgSend_17amj0z( + _$$ref.retainAndReturnPointer(), + _sel_initWithOrderedSet_copyItems_, _$$ref$1.pointer, + copyItems, ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); + return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); } - /// valueForUndefinedKey: - objc.ObjCObject? valueForUndefinedKey(NSString key) { + /// initWithOrderedSet:range:copyItems: + NSMutableOrderedSet initWithOrderedSet$2( + NSOrderedSet set, { + required NSRange range, + required bool copyItems, + }) { final _$$ref = object$.ref; - final _$$ref$1 = key.ref; + final _$$ref$1 = set.ref; objc.checkOsVersionInternal( - 'NSObject.valueForUndefinedKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSMutableOrderedSet.initWithOrderedSet:range:copyItems:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_valueForUndefinedKey_, + final $ret = _objc_msgSend_w9bq5x( + _$$ref.retainAndReturnPointer(), + _sel_initWithOrderedSet_range_copyItems_, _$$ref$1.pointer, + range, + copyItems, ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); + return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); } - /// accessInstanceVariablesDirectly - static bool getAccessInstanceVariablesDirectly() { + /// initWithSet: + NSMutableOrderedSet initWithSet(NSSet set) { + final _$$ref = object$.ref; + final _$$ref$1 = set.ref; objc.checkOsVersionInternal( - 'NSObject.accessInstanceVariablesDirectly', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSMutableOrderedSet.initWithSet:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - return _objc_msgSend_91o635( - _class_NSObject, - _sel_accessInstanceVariablesDirectly, + final $ret = _objc_msgSend_1sotr3r( + _$$ref.retainAndReturnPointer(), + _sel_initWithSet_, + _$$ref$1.pointer, ); + return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); } -} -/// NSKeyValueCoding -extension NSKeyValueCoding$3 on NSOrderedSet { - /// setValue:forKey: - void setValue(objc.ObjCObject? value, {required NSString forKey}) { + /// initWithSet:copyItems: + NSMutableOrderedSet initWithSet$1(NSSet set, {required bool copyItems}) { final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; - final _$$ref$2 = forKey.ref; + final _$$ref$1 = set.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.setValue:forKey:', + 'NSMutableOrderedSet.initWithSet:copyItems:', iOS: (false, (5, 0, 0)), macOS: (false, (10, 7, 0)), ); - _objc_msgSend_pfv6jd( - _$$ref.pointer, - _sel_setValue_forKey_, - _$$ref$1?.pointer ?? ffi.nullptr, - _$$ref$2.pointer, + final $ret = _objc_msgSend_17amj0z( + _$$ref.retainAndReturnPointer(), + _sel_initWithSet_copyItems_, + _$$ref$1.pointer, + copyItems, ); + return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); } - /// valueForKey: - objc.ObjCObject valueForKey(NSString key) { + /// insertObject:atIndex: + void insertObject(objc.ObjCObject object, {required DartNSUInteger atIndex}) { final _$$ref = object$.ref; - final _$$ref$1 = key.ref; + final _$$ref$1 = object.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.valueForKey:', + 'NSMutableOrderedSet.insertObject:atIndex:', iOS: (false, (5, 0, 0)), macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_1sotr3r( + _objc_msgSend_djsa9o( _$$ref.pointer, - _sel_valueForKey_, + _sel_insertObject_atIndex_, _$$ref$1.pointer, + atIndex, ); - return objc.ObjCObject($ret, retain: true, release: true); } -} -/// NSKeyValueCoding -extension NSKeyValueCoding$4 on NSMutableDictionary { - /// setValue:forKey: - void setValue(objc.ObjCObject? value, {required NSString forKey}) { + /// removeObjectAtIndex: + void removeObjectAtIndex(DartNSUInteger idx) { final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; - final _$$ref$2 = forKey.ref; - _objc_msgSend_pfv6jd( - _$$ref.pointer, - _sel_setValue_forKey_, - _$$ref$1?.pointer ?? ffi.nullptr, - _$$ref$2.pointer, + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.removeObjectAtIndex:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); + _objc_msgSend_1i9r4xy(_$$ref.pointer, _sel_removeObjectAtIndex_, idx); } -} -/// NSKeyValueCoding -extension NSKeyValueCoding$5 on NSArray { - /// setValue:forKey: - void setValue(objc.ObjCObject? value, {required NSString forKey}) { + /// replaceObjectAtIndex:withObject: + void replaceObjectAtIndex( + DartNSUInteger idx, { + required objc.ObjCObject withObject, + }) { final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; - final _$$ref$2 = forKey.ref; - _objc_msgSend_pfv6jd( - _$$ref.pointer, - _sel_setValue_forKey_, - _$$ref$1?.pointer ?? ffi.nullptr, - _$$ref$2.pointer, + final _$$ref$1 = withObject.ref; + objc.checkOsVersionInternal( + 'NSMutableOrderedSet.replaceObjectAtIndex:withObject:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), ); - } - - /// valueForKey: - objc.ObjCObject valueForKey(NSString key) { - final _$$ref = object$.ref; - final _$$ref$1 = key.ref; - final $ret = _objc_msgSend_1sotr3r( + _objc_msgSend_1gypgok( _$$ref.pointer, - _sel_valueForKey_, + _sel_replaceObjectAtIndex_withObject_, + idx, _$$ref$1.pointer, ); - return objc.ObjCObject($ret, retain: true, release: true); } } -/// NSKeyValueObserverNotification -extension NSKeyValueObserverNotification on NSObject { - /// didChange:valuesAtIndexes:forKey: - void didChange( - NSKeyValueChange changeKind, { - required NSIndexSet valuesAtIndexes, - required NSString forKey, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = valuesAtIndexes.ref; - final _$$ref$2 = forKey.ref; - objc.checkOsVersionInternal( - 'NSObject.didChange:valuesAtIndexes:forKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), +/// NSMutableSet +extension type NSMutableSet._(objc.ObjCObject object$) + implements objc.ObjCObject, NSSet { + /// Creates a [NSMutableSet] from [elements]. + static NSMutableSet of(Iterable elements) { + final set = setWithCapacity(elements.length); + for (final e in elements) set.addObject(e); + return set; + } + + /// Constructs a [NSMutableSet] that points to the same underlying object as [other]. + NSMutableSet.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NSMutableSet] that wraps the given raw object pointer. + NSMutableSet.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + assert(isA(object$)); + } + + /// Returns whether [obj] is an instance of [NSMutableSet]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSMutableSet, + ); + + /// alloc + static NSMutableSet alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSMutableSet, _sel_alloc); + return NSMutableSet.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NSMutableSet allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSMutableSet, + _sel_allocWithZone_, + zone, ); - _objc_msgSend_1diehjo( + return NSMutableSet.fromPointer($ret, retain: false, release: true); + } + + /// new + static NSMutableSet new$() { + final $ret = _objc_msgSend_151sglz(_class_NSMutableSet, _sel_new); + return NSMutableSet.fromPointer($ret, retain: false, release: true); + } + + /// set + static NSMutableSet set() { + final $ret = _objc_msgSend_151sglz(_class_NSMutableSet, _sel_set); + return NSMutableSet.fromPointer($ret, retain: true, release: true); + } + + /// setWithArray: + static NSMutableSet setWithArray(NSArray array) { + final _$$ref = array.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSMutableSet, + _sel_setWithArray_, _$$ref.pointer, - _sel_didChange_valuesAtIndexes_forKey_, - changeKind.value, - _$$ref$1.pointer, - _$$ref$2.pointer, ); + return NSMutableSet.fromPointer($ret, retain: true, release: true); } - /// didChangeValueForKey: - void didChangeValueForKey(NSString key) { - final _$$ref = object$.ref; - final _$$ref$1 = key.ref; - objc.checkOsVersionInternal( - 'NSObject.didChangeValueForKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + /// setWithCapacity: + static NSMutableSet setWithCapacity(DartNSUInteger numItems) { + final $ret = _objc_msgSend_14hpxwa( + _class_NSMutableSet, + _sel_setWithCapacity_, + numItems, ); - _objc_msgSend_xtuoz7( + return NSMutableSet.fromPointer($ret, retain: true, release: true); + } + + /// setWithObject: + static NSMutableSet setWithObject(objc.ObjCObject object) { + final _$$ref = object.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSMutableSet, + _sel_setWithObject_, _$$ref.pointer, - _sel_didChangeValueForKey_, - _$$ref$1.pointer, ); + return NSMutableSet.fromPointer($ret, retain: true, release: true); } - /// didChangeValueForKey:withSetMutation:usingObjects: - void didChangeValueForKey$1( - NSString key, { - required NSKeyValueSetMutationKind withSetMutation, - required NSSet usingObjects, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = key.ref; - final _$$ref$2 = usingObjects.ref; - objc.checkOsVersionInternal( - 'NSObject.didChangeValueForKey:withSetMutation:usingObjects:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_7w1jp7( + /// setWithObjects: + static NSMutableSet setWithObjects(objc.ObjCObject firstObj) { + final _$$ref = firstObj.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSMutableSet, + _sel_setWithObjects_, _$$ref.pointer, - _sel_didChangeValueForKey_withSetMutation_usingObjects_, - _$$ref$1.pointer, - withSetMutation.value, - _$$ref$2.pointer, ); + return NSMutableSet.fromPointer($ret, retain: true, release: true); } - /// willChange:valuesAtIndexes:forKey: - void willChange( - NSKeyValueChange changeKind, { - required NSIndexSet valuesAtIndexes, - required NSString forKey, + /// setWithObjects:count: + static NSMutableSet setWithObjects$1( + ffi.Pointer> objects, { + required DartNSUInteger count, }) { - final _$$ref = object$.ref; - final _$$ref$1 = valuesAtIndexes.ref; - final _$$ref$2 = forKey.ref; - objc.checkOsVersionInternal( - 'NSObject.willChange:valuesAtIndexes:forKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + final $ret = _objc_msgSend_zmbtbd( + _class_NSMutableSet, + _sel_setWithObjects_count_, + objects, + count, ); - _objc_msgSend_1diehjo( + return NSMutableSet.fromPointer($ret, retain: true, release: true); + } + + /// setWithSet: + static NSMutableSet setWithSet(NSSet set) { + final _$$ref = set.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSMutableSet, + _sel_setWithSet_, _$$ref.pointer, - _sel_willChange_valuesAtIndexes_forKey_, - changeKind.value, - _$$ref$1.pointer, - _$$ref$2.pointer, ); + return NSMutableSet.fromPointer($ret, retain: true, release: true); + } + + /// supportsSecureCoding + static bool getSupportsSecureCoding() { + return _objc_msgSend_91o635(_class_NSMutableSet, _sel_supportsSecureCoding); } - /// willChangeValueForKey: - void willChangeValueForKey(NSString key) { + /// Returns a new instance of NSMutableSet constructed with the default `new` method. + NSMutableSet() : this.as(new$().object$); +} + +extension NSMutableSet$Methods on NSMutableSet { + /// addObject: + void addObject(objc.ObjCObject object) { final _$$ref = object$.ref; - final _$$ref$1 = key.ref; + final _$$ref$1 = object.ref; + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_addObject_, _$$ref$1.pointer); + } + + /// init + NSMutableSet init() { + final _$$ref$27 = object$.ref; objc.checkOsVersionInternal( - 'NSObject.willChangeValueForKey:', + 'NSMutableSet.init', iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_willChangeValueForKey_, - _$$ref$1.pointer, + final $ret = _objc_msgSend_151sglz( + _$$ref$27.retainAndReturnPointer(), + _sel_init, ); + return NSMutableSet.fromPointer($ret, retain: false, release: true); } - /// willChangeValueForKey:withSetMutation:usingObjects: - void willChangeValueForKey$1( - NSString key, { - required NSKeyValueSetMutationKind withSetMutation, - required NSSet usingObjects, - }) { + /// initWithArray: + NSMutableSet initWithArray(NSArray array) { final _$$ref = object$.ref; - final _$$ref$1 = key.ref; - final _$$ref$2 = usingObjects.ref; - objc.checkOsVersionInternal( - 'NSObject.willChangeValueForKey:withSetMutation:usingObjects:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_7w1jp7( - _$$ref.pointer, - _sel_willChangeValueForKey_withSetMutation_usingObjects_, + final _$$ref$1 = array.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.retainAndReturnPointer(), + _sel_initWithArray_, _$$ref$1.pointer, - withSetMutation.value, - _$$ref$2.pointer, ); + return NSMutableSet.fromPointer($ret, retain: false, release: true); } -} -/// NSKeyValueObserverRegistration -extension NSKeyValueObserverRegistration on NSSet { - /// addObserver:forKeyPath:options:context: - void addObserver( - NSObject observer, { - required NSString forKeyPath, - required DartNSUInteger options, - required ffi.Pointer context, - }) { + /// initWithCapacity: + NSMutableSet initWithCapacity(DartNSUInteger numItems) { final _$$ref = object$.ref; - final _$$ref$1 = observer.ref; - final _$$ref$2 = forKeyPath.ref; - _objc_msgSend_akk2cd( - _$$ref.pointer, - _sel_addObserver_forKeyPath_options_context_, - _$$ref$1.pointer, - _$$ref$2.pointer, - options, - context, + final $ret = _objc_msgSend_14hpxwa( + _$$ref.retainAndReturnPointer(), + _sel_initWithCapacity_, + numItems, ); + return NSMutableSet.fromPointer($ret, retain: false, release: true); } - /// removeObserver:forKeyPath: - void removeObserver(NSObject observer, {required NSString forKeyPath}) { - final _$$ref = object$.ref; - final _$$ref$1 = observer.ref; - final _$$ref$2 = forKeyPath.ref; - _objc_msgSend_pfv6jd( - _$$ref.pointer, - _sel_removeObserver_forKeyPath_, - _$$ref$1.pointer, - _$$ref$2.pointer, + /// initWithCoder: + NSMutableSet? initWithCoder(NSCoder coder) { + final _$$ref$30 = object$.ref; + final _$$ref$31 = coder.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref$30.retainAndReturnPointer(), + _sel_initWithCoder_, + _$$ref$31.pointer, ); + return $ret.address == 0 + ? null + : NSMutableSet.fromPointer($ret, retain: false, release: true); } - /// removeObserver:forKeyPath:context: - void removeObserver$1( - NSObject observer, { - required NSString forKeyPath, - required ffi.Pointer context, - }) { + /// initWithObjects: + NSMutableSet initWithObjects(objc.ObjCObject firstObj) { final _$$ref = object$.ref; - final _$$ref$1 = observer.ref; - final _$$ref$2 = forKeyPath.ref; - objc.checkOsVersionInternal( - 'NSSet.removeObserver:forKeyPath:context:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_1jed5jl( - _$$ref.pointer, - _sel_removeObserver_forKeyPath_context_, + final _$$ref$1 = firstObj.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.retainAndReturnPointer(), + _sel_initWithObjects_, _$$ref$1.pointer, - _$$ref$2.pointer, - context, ); + return NSMutableSet.fromPointer($ret, retain: false, release: true); } -} -/// NSKeyValueObserverRegistration -extension NSKeyValueObserverRegistration$1 on NSObject { - /// addObserver:forKeyPath:options:context: - void addObserver( - NSObject observer, { - required NSString forKeyPath, - required DartNSUInteger options, - required ffi.Pointer context, + /// initWithObjects:count: + NSMutableSet initWithObjects$1( + ffi.Pointer> objects, { + required DartNSUInteger count, }) { final _$$ref = object$.ref; - final _$$ref$1 = observer.ref; - final _$$ref$2 = forKeyPath.ref; - objc.checkOsVersionInternal( - 'NSObject.addObserver:forKeyPath:options:context:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_akk2cd( - _$$ref.pointer, - _sel_addObserver_forKeyPath_options_context_, - _$$ref$1.pointer, - _$$ref$2.pointer, - options, - context, + final $ret = _objc_msgSend_zmbtbd( + _$$ref.retainAndReturnPointer(), + _sel_initWithObjects_count_, + objects, + count, ); + return NSMutableSet.fromPointer($ret, retain: false, release: true); } - /// removeObserver:forKeyPath: - void removeObserver(NSObject observer, {required NSString forKeyPath}) { + /// initWithSet: + NSMutableSet initWithSet(NSSet set) { final _$$ref = object$.ref; - final _$$ref$1 = observer.ref; - final _$$ref$2 = forKeyPath.ref; - objc.checkOsVersionInternal( - 'NSObject.removeObserver:forKeyPath:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_pfv6jd( - _$$ref.pointer, - _sel_removeObserver_forKeyPath_, + final _$$ref$1 = set.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.retainAndReturnPointer(), + _sel_initWithSet_, _$$ref$1.pointer, - _$$ref$2.pointer, ); + return NSMutableSet.fromPointer($ret, retain: false, release: true); } - /// removeObserver:forKeyPath:context: - void removeObserver$1( - NSObject observer, { - required NSString forKeyPath, - required ffi.Pointer context, - }) { + /// initWithSet:copyItems: + NSMutableSet initWithSet$1(NSSet set, {required bool copyItems}) { final _$$ref = object$.ref; - final _$$ref$1 = observer.ref; - final _$$ref$2 = forKeyPath.ref; - objc.checkOsVersionInternal( - 'NSObject.removeObserver:forKeyPath:context:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_1jed5jl( - _$$ref.pointer, - _sel_removeObserver_forKeyPath_context_, + final _$$ref$1 = set.ref; + final $ret = _objc_msgSend_17amj0z( + _$$ref.retainAndReturnPointer(), + _sel_initWithSet_copyItems_, _$$ref$1.pointer, - _$$ref$2.pointer, - context, + copyItems, ); + return NSMutableSet.fromPointer($ret, retain: false, release: true); } -} -/// NSKeyValueObserverRegistration -extension NSKeyValueObserverRegistration$2 on NSOrderedSet { - /// addObserver:forKeyPath:options:context: - void addObserver( - NSObject observer, { - required NSString forKeyPath, - required DartNSUInteger options, - required ffi.Pointer context, - }) { + /// removeObject: + void removeObject(objc.ObjCObject object) { final _$$ref = object$.ref; - final _$$ref$1 = observer.ref; - final _$$ref$2 = forKeyPath.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.addObserver:forKeyPath:options:context:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_akk2cd( - _$$ref.pointer, - _sel_addObserver_forKeyPath_options_context_, - _$$ref$1.pointer, - _$$ref$2.pointer, - options, - context, - ); + final _$$ref$1 = object.ref; + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_removeObject_, _$$ref$1.pointer); } +} - /// removeObserver:forKeyPath: - void removeObserver(NSObject observer, {required NSString forKeyPath}) { - final _$$ref = object$.ref; - final _$$ref$1 = observer.ref; - final _$$ref$2 = forKeyPath.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.removeObserver:forKeyPath:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_pfv6jd( - _$$ref.pointer, - _sel_removeObserver_forKeyPath_, - _$$ref$1.pointer, - _$$ref$2.pointer, - ); +/// NSMutableString +extension type NSMutableString._(objc.ObjCObject object$) + implements objc.ObjCObject, NSString { + /// Constructs a [NSMutableString] that points to the same underlying object as [other]. + NSMutableString.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); } - /// removeObserver:forKeyPath:context: - void removeObserver$1( - NSObject observer, { - required NSString forKeyPath, - required ffi.Pointer context, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = observer.ref; - final _$$ref$2 = forKeyPath.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.removeObserver:forKeyPath:context:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_1jed5jl( - _$$ref.pointer, - _sel_removeObserver_forKeyPath_context_, - _$$ref$1.pointer, - _$$ref$2.pointer, - context, - ); + /// Constructs a [NSMutableString] that wraps the given raw object pointer. + NSMutableString.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + assert(isA(object$)); } -} -/// NSKeyValueObserverRegistration -extension NSKeyValueObserverRegistration$3 on NSArray { - /// addObserver:forKeyPath:options:context: - void addObserver( - NSObject observer, { - required NSString forKeyPath, - required DartNSUInteger options, - required ffi.Pointer context, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = observer.ref; - final _$$ref$2 = forKeyPath.ref; - _objc_msgSend_akk2cd( - _$$ref.pointer, - _sel_addObserver_forKeyPath_options_context_, - _$$ref$1.pointer, - _$$ref$2.pointer, - options, - context, - ); + /// Returns whether [obj] is an instance of [NSMutableString]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSMutableString, + ); + + /// alloc + static NSMutableString alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSMutableString, _sel_alloc); + return NSMutableString.fromPointer($ret, retain: false, release: true); } - /// addObserver:toObjectsAtIndexes:forKeyPath:options:context: - void addObserver$1( - NSObject observer, { - required NSIndexSet toObjectsAtIndexes, - required NSString forKeyPath, - required DartNSUInteger options, - required ffi.Pointer context, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = observer.ref; - final _$$ref$2 = toObjectsAtIndexes.ref; - final _$$ref$3 = forKeyPath.ref; - _objc_msgSend_1vfgg7v( - _$$ref.pointer, - _sel_addObserver_toObjectsAtIndexes_forKeyPath_options_context_, - _$$ref$1.pointer, - _$$ref$2.pointer, - _$$ref$3.pointer, - options, - context, + /// allocWithZone: + static NSMutableString allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSMutableString, + _sel_allocWithZone_, + zone, ); + return NSMutableString.fromPointer($ret, retain: false, release: true); } - /// removeObserver:forKeyPath: - void removeObserver(NSObject observer, {required NSString forKeyPath}) { - final _$$ref = object$.ref; - final _$$ref$1 = observer.ref; - final _$$ref$2 = forKeyPath.ref; - _objc_msgSend_pfv6jd( + /// localizedStringWithFormat: + static NSMutableString localizedStringWithFormat(NSString format) { + final _$$ref = format.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSMutableString, + _sel_localizedStringWithFormat_, _$$ref.pointer, - _sel_removeObserver_forKeyPath_, - _$$ref$1.pointer, - _$$ref$2.pointer, ); + return NSMutableString.fromPointer($ret, retain: true, release: true); } - /// removeObserver:forKeyPath:context: - void removeObserver$1( - NSObject observer, { - required NSString forKeyPath, - required ffi.Pointer context, + /// localizedStringWithValidatedFormat:validFormatSpecifiers:error: + static NSMutableString? localizedStringWithValidatedFormat( + NSString format, { + required NSString validFormatSpecifiers, }) { - final _$$ref = object$.ref; - final _$$ref$1 = observer.ref; - final _$$ref$2 = forKeyPath.ref; + final _$$ref = format.ref; + final _$$ref$1 = validFormatSpecifiers.ref; objc.checkOsVersionInternal( - 'NSArray.removeObserver:forKeyPath:context:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_1jed5jl( - _$$ref.pointer, - _sel_removeObserver_forKeyPath_context_, - _$$ref$1.pointer, - _$$ref$2.pointer, - context, + 'NSMutableString.localizedStringWithValidatedFormat:validFormatSpecifiers:error:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), ); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1pnyuds( + _class_NSMutableString, + _sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_, + _$$ref.pointer, + _$$ref$1.pointer, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSMutableString.fromPointer($ret, retain: true, release: true); + } finally { + pkg_ffi.calloc.free($err); + } + } + + /// new + static NSMutableString new$() { + final $ret = _objc_msgSend_151sglz(_class_NSMutableString, _sel_new); + return NSMutableString.fromPointer($ret, retain: false, release: true); + } + + /// string + static NSMutableString string() { + final $ret = _objc_msgSend_151sglz(_class_NSMutableString, _sel_string); + return NSMutableString.fromPointer($ret, retain: true, release: true); } - /// removeObserver:fromObjectsAtIndexes:forKeyPath: - void removeObserver$2( - NSObject observer, { - required NSIndexSet fromObjectsAtIndexes, - required NSString forKeyPath, + /// stringWithCString:encoding: + static NSMutableString? stringWithCString( + ffi.Pointer cString, { + required DartNSUInteger encoding, }) { - final _$$ref = object$.ref; - final _$$ref$1 = observer.ref; - final _$$ref$2 = fromObjectsAtIndexes.ref; - final _$$ref$3 = forKeyPath.ref; - _objc_msgSend_r8gdi7( - _$$ref.pointer, - _sel_removeObserver_fromObjectsAtIndexes_forKeyPath_, - _$$ref$1.pointer, - _$$ref$2.pointer, - _$$ref$3.pointer, + final $ret = _objc_msgSend_erqryg( + _class_NSMutableString, + _sel_stringWithCString_encoding_, + cString, + encoding, ); + return $ret.address == 0 + ? null + : NSMutableString.fromPointer($ret, retain: true, release: true); } - /// removeObserver:fromObjectsAtIndexes:forKeyPath:context: - void removeObserver$3( - NSObject observer, { - required NSIndexSet fromObjectsAtIndexes, - required NSString forKeyPath, - required ffi.Pointer context, + /// stringWithCharacters:length: + static NSMutableString stringWithCharacters( + ffi.Pointer characters, { + required DartNSUInteger length, }) { - final _$$ref = object$.ref; - final _$$ref$1 = observer.ref; - final _$$ref$2 = fromObjectsAtIndexes.ref; - final _$$ref$3 = forKeyPath.ref; - objc.checkOsVersionInternal( - 'NSArray.removeObserver:fromObjectsAtIndexes:forKeyPath:context:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_1pl4k3n( - _$$ref.pointer, - _sel_removeObserver_fromObjectsAtIndexes_forKeyPath_context_, - _$$ref$1.pointer, - _$$ref$2.pointer, - _$$ref$3.pointer, - context, + final $ret = _objc_msgSend_9x4k8x( + _class_NSMutableString, + _sel_stringWithCharacters_length_, + characters, + length, ); + return NSMutableString.fromPointer($ret, retain: true, release: true); } -} -/// NSKeyValueObserving -extension NSKeyValueObserving on NSObject { - /// observeValueForKeyPath:ofObject:change:context: - void observeValueForKeyPath( - NSString? keyPath, { - objc.ObjCObject? ofObject, - NSDictionary? change, - required ffi.Pointer context, + /// stringWithContentsOfFile:encoding:error: + static NSMutableString? stringWithContentsOfFile( + NSString path, { + required DartNSUInteger encoding, }) { - final _$$ref = object$.ref; - final _$$ref$1 = keyPath?.ref; - final _$$ref$2 = ofObject?.ref; - final _$$ref$3 = change?.ref; - objc.checkOsVersionInternal( - 'NSObject.observeValueForKeyPath:ofObject:change:context:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_1pl4k3n( - _$$ref.pointer, - _sel_observeValueForKeyPath_ofObject_change_context_, - _$$ref$1?.pointer ?? ffi.nullptr, - _$$ref$2?.pointer ?? ffi.nullptr, - _$$ref$3?.pointer ?? ffi.nullptr, - context, - ); + final _$$ref = path.ref; + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1nomli1( + _class_NSMutableString, + _sel_stringWithContentsOfFile_encoding_error_, + _$$ref.pointer, + encoding, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSMutableString.fromPointer($ret, retain: true, release: true); + } finally { + pkg_ffi.calloc.free($err); + } } -} -/// NSKeyValueObservingCustomization -extension NSKeyValueObservingCustomization on NSObject { - /// observationInfo - ffi.Pointer get observationInfo { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSObject.observationInfo', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_6ex6p5(_$$ref.pointer, _sel_observationInfo); + /// stringWithContentsOfFile:usedEncoding:error: + static NSMutableString? stringWithContentsOfFile$1( + NSString path, { + required ffi.Pointer usedEncoding, + }) { + final _$$ref = path.ref; + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1alewu7( + _class_NSMutableString, + _sel_stringWithContentsOfFile_usedEncoding_error_, + _$$ref.pointer, + usedEncoding, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSMutableString.fromPointer($ret, retain: true, release: true); + } finally { + pkg_ffi.calloc.free($err); + } } - /// setObservationInfo: - set observationInfo(ffi.Pointer value) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSObject.setObservationInfo:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_ovsamd(_$$ref.pointer, _sel_setObservationInfo_, value); + /// stringWithContentsOfURL:encoding:error: + static NSMutableString? stringWithContentsOfURL( + NSURL url, { + required DartNSUInteger encoding, + }) { + final _$$ref = url.ref; + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1nomli1( + _class_NSMutableString, + _sel_stringWithContentsOfURL_encoding_error_, + _$$ref.pointer, + encoding, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSMutableString.fromPointer($ret, retain: true, release: true); + } finally { + pkg_ffi.calloc.free($err); + } } - /// automaticallyNotifiesObserversForKey: - static bool automaticallyNotifiesObserversForKey(NSString key) { - final _$$ref = key.ref; - objc.checkOsVersionInternal( - 'NSObject.automaticallyNotifiesObserversForKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_19nvye5( - _class_NSObject, - _sel_automaticallyNotifiesObserversForKey_, - _$$ref.pointer, - ); + /// stringWithContentsOfURL:usedEncoding:error: + static NSMutableString? stringWithContentsOfURL$1( + NSURL url, { + required ffi.Pointer usedEncoding, + }) { + final _$$ref = url.ref; + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1alewu7( + _class_NSMutableString, + _sel_stringWithContentsOfURL_usedEncoding_error_, + _$$ref.pointer, + usedEncoding, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSMutableString.fromPointer($ret, retain: true, release: true); + } finally { + pkg_ffi.calloc.free($err); + } } - /// keyPathsForValuesAffectingValueForKey: - static NSSet keyPathsForValuesAffectingValueForKey(NSString key) { - final _$$ref = key.ref; - objc.checkOsVersionInternal( - 'NSObject.keyPathsForValuesAffectingValueForKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); + /// stringWithFormat: + static NSMutableString stringWithFormat(NSString format) { + final _$$ref = format.ref; final $ret = _objc_msgSend_1sotr3r( - _class_NSObject, - _sel_keyPathsForValuesAffectingValueForKey_, + _class_NSMutableString, + _sel_stringWithFormat_, _$$ref.pointer, ); - return NSSet.fromPointer($ret, retain: true, release: true); + return NSMutableString.fromPointer($ret, retain: true, release: true); } -} - -sealed class NSKeyValueObservingOptions { - static const NSKeyValueObservingOptionNew = 1; - static const NSKeyValueObservingOptionOld = 2; - static const NSKeyValueObservingOptionInitial = 4; - static const NSKeyValueObservingOptionPrior = 8; -} - -enum NSKeyValueSetMutationKind { - NSKeyValueUnionSetMutation(1), - NSKeyValueMinusSetMutation(2), - NSKeyValueIntersectSetMutation(3), - NSKeyValueSetSetMutation(4); - - final int value; - const NSKeyValueSetMutationKind(this.value); - - static NSKeyValueSetMutationKind fromValue(int value) => switch (value) { - 1 => NSKeyValueUnionSetMutation, - 2 => NSKeyValueMinusSetMutation, - 3 => NSKeyValueIntersectSetMutation, - 4 => NSKeyValueSetSetMutation, - _ => throw ArgumentError( - 'Unknown value for NSKeyValueSetMutationKind: $value', - ), - }; -} -/// NSKeyValueSharedObserverRegistration -extension NSKeyValueSharedObserverRegistration on NSObject { - /// setSharedObservers: - void setSharedObservers(NSKeyValueSharedObserversSnapshot? sharedObservers) { - final _$$ref = object$.ref; - final _$$ref$1 = sharedObservers?.ref; - objc.checkOsVersionInternal( - 'NSObject.setSharedObservers:', - iOS: (false, (18, 0, 0)), - macOS: (false, (15, 0, 0)), - ); - _objc_msgSend_xtuoz7( + /// stringWithString: + static NSMutableString stringWithString(NSString string) { + final _$$ref = string.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSMutableString, + _sel_stringWithString_, _$$ref.pointer, - _sel_setSharedObservers_, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - } -} - -/// NSKeyValueSharedObserversSnapshot -/// -/// NSKeyValueSharedObserversSnapshot -extension type NSKeyValueSharedObserversSnapshot._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject { - /// Constructs a [NSKeyValueSharedObserversSnapshot] that points to the same underlying object as [other]. - NSKeyValueSharedObserversSnapshot.as(objc.ObjCObject other) - : object$ = other { - objc.checkOsVersionInternal( - 'NSKeyValueSharedObserversSnapshot', - iOS: (false, (18, 0, 0)), - macOS: (false, (15, 0, 0)), ); + return NSMutableString.fromPointer($ret, retain: true, release: true); } - /// Constructs a [NSKeyValueSharedObserversSnapshot] that wraps the given raw object pointer. - NSKeyValueSharedObserversSnapshot.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - objc.checkOsVersionInternal( - 'NSKeyValueSharedObserversSnapshot', - iOS: (false, (18, 0, 0)), - macOS: (false, (15, 0, 0)), + /// stringWithUTF8String: + static NSMutableString? stringWithUTF8String( + ffi.Pointer nullTerminatedCString, + ) { + final $ret = _objc_msgSend_56zxyn( + _class_NSMutableString, + _sel_stringWithUTF8String_, + nullTerminatedCString, ); + return $ret.address == 0 + ? null + : NSMutableString.fromPointer($ret, retain: true, release: true); } -} -/// NSKeyValueSorting -extension NSKeyValueSorting on NSOrderedSet { - /// sortedArrayUsingDescriptors: - NSArray sortedArrayUsingDescriptors(NSArray sortDescriptors) { - final _$$ref = object$.ref; - final _$$ref$1 = sortDescriptors.ref; + /// stringWithValidatedFormat:validFormatSpecifiers:error: + static NSMutableString? stringWithValidatedFormat( + NSString format, { + required NSString validFormatSpecifiers, + }) { + final _$$ref = format.ref; + final _$$ref$1 = validFormatSpecifiers.ref; objc.checkOsVersionInternal( - 'NSOrderedSet.sortedArrayUsingDescriptors:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_sortedArrayUsingDescriptors_, - _$$ref$1.pointer, + 'NSMutableString.stringWithValidatedFormat:validFormatSpecifiers:error:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), ); - return NSArray.fromPointer($ret, retain: true, release: true); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1pnyuds( + _class_NSMutableString, + _sel_stringWithValidatedFormat_validFormatSpecifiers_error_, + _$$ref.pointer, + _$$ref$1.pointer, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSMutableString.fromPointer($ret, retain: true, release: true); + } finally { + pkg_ffi.calloc.free($err); + } } -} -/// NSKeyValueSorting -extension NSKeyValueSorting$1 on NSMutableOrderedSet { - /// sortUsingDescriptors: - void sortUsingDescriptors(NSArray sortDescriptors) { - final _$$ref = object$.ref; - final _$$ref$1 = sortDescriptors.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.sortUsingDescriptors:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_sortUsingDescriptors_, - _$$ref$1.pointer, + /// supportsSecureCoding + static bool getSupportsSecureCoding() { + return _objc_msgSend_91o635( + _class_NSMutableString, + _sel_supportsSecureCoding, ); } -} -/// NSKeyedArchiver -/// -/// NSKeyedArchiver -extension type NSKeyedArchiver._(objc.ObjCObject object$) - implements objc.ObjCObject, NSCoder { - /// Constructs a [NSKeyedArchiver] that points to the same underlying object as [other]. - NSKeyedArchiver.as(objc.ObjCObject other) : object$ = other {} - - /// Constructs a [NSKeyedArchiver] that wraps the given raw object pointer. - NSKeyedArchiver.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) {} + /// Returns a new instance of NSMutableString constructed with the default `new` method. + NSMutableString() : this.as(new$().object$); } -/// NSKeyedArchiverObjectSubstitution -extension NSKeyedArchiverObjectSubstitution on NSObject { - /// classForKeyedArchiver - objc.ObjCObject? get classForKeyedArchiver { - final _$$ref = object$.ref; +extension NSMutableString$Methods on NSMutableString { + /// init + NSMutableString init() { + final _$$ref$28 = object$.ref; objc.checkOsVersionInternal( - 'NSObject.classForKeyedArchiver', + 'NSMutableString.init', iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_classForKeyedArchiver, + _$$ref$28.retainAndReturnPointer(), + _sel_init, ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); + return NSMutableString.fromPointer($ret, retain: false, release: true); } - /// replacementObjectForKeyedArchiver: - objc.ObjCObject? replacementObjectForKeyedArchiver(NSKeyedArchiver archiver) { + /// initWithBytes:length:encoding: + NSMutableString? initWithBytes( + ffi.Pointer bytes, { + required DartNSUInteger length, + required DartNSUInteger encoding, + }) { final _$$ref = object$.ref; - final _$$ref$1 = archiver.ref; - objc.checkOsVersionInternal( - 'NSObject.replacementObjectForKeyedArchiver:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_replacementObjectForKeyedArchiver_, - _$$ref$1.pointer, + final $ret = _objc_msgSend_9b3h4v( + _$$ref.retainAndReturnPointer(), + _sel_initWithBytes_length_encoding_, + bytes, + length, + encoding, ); return $ret.address == 0 ? null - : objc.ObjCObject($ret, retain: true, release: true); + : NSMutableString.fromPointer($ret, retain: false, release: true); } - /// classFallbacksForKeyedArchiver - static NSArray classFallbacksForKeyedArchiver() { - objc.checkOsVersionInternal( - 'NSObject.classFallbacksForKeyedArchiver', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _class_NSObject, - _sel_classFallbacksForKeyedArchiver, + /// initWithBytesNoCopy:length:encoding:deallocator: + NSMutableString? initWithBytesNoCopy( + ffi.Pointer bytes, { + required DartNSUInteger length, + required DartNSUInteger encoding, + objc.ObjCBlock, ffi.UnsignedLong)>? + deallocator, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = deallocator?.ref; + final $ret = _objc_msgSend_1lbgrac( + _$$ref.retainAndReturnPointer(), + _sel_initWithBytesNoCopy_length_encoding_deallocator_, + bytes, + length, + encoding, + _$$ref$1?.pointer ?? ffi.nullptr, ); - return NSArray.fromPointer($ret, retain: true, release: true); + return $ret.address == 0 + ? null + : NSMutableString.fromPointer($ret, retain: false, release: true); } -} -/// NSKeyedUnarchiverObjectSubstitution -extension NSKeyedUnarchiverObjectSubstitution on NSObject { - /// classForKeyedUnarchiver - static objc.ObjCObject classForKeyedUnarchiver() { - objc.checkOsVersionInternal( - 'NSObject.classForKeyedUnarchiver', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _class_NSObject, - _sel_classForKeyedUnarchiver, + /// initWithBytesNoCopy:length:encoding:freeWhenDone: + NSMutableString? initWithBytesNoCopy$1( + ffi.Pointer bytes, { + required DartNSUInteger length, + required DartNSUInteger encoding, + required bool freeWhenDone, + }) { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_k4j8m3( + _$$ref.retainAndReturnPointer(), + _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_, + bytes, + length, + encoding, + freeWhenDone, ); - return objc.ObjCObject($ret, retain: true, release: true); + return $ret.address == 0 + ? null + : NSMutableString.fromPointer($ret, retain: false, release: true); } -} -/// NSLinguisticAnalysis -extension NSLinguisticAnalysis on NSString { - /// enumerateLinguisticTagsInRange:scheme:options:orthography:usingBlock: - @Deprecated( - 'All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API', - ) - void enumerateLinguisticTagsInRange( - NSRange range, { - required NSString scheme, - required DartNSUInteger options, - NSOrthography? orthography, - required objc.ObjCBlock< - ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) - > - usingBlock, + /// initWithCString:encoding: + NSMutableString? initWithCString( + ffi.Pointer nullTerminatedCString, { + required DartNSUInteger encoding, }) { final _$$ref = object$.ref; - final _$$ref$1 = scheme.ref; - final _$$ref$2 = orthography?.ref; - final _$$ref$3 = usingBlock.ref; - objc.checkOsVersionInternal( - 'NSString.enumerateLinguisticTagsInRange:scheme:options:orthography:usingBlock:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + final $ret = _objc_msgSend_erqryg( + _$$ref.retainAndReturnPointer(), + _sel_initWithCString_encoding_, + nullTerminatedCString, + encoding, ); - _objc_msgSend_vij4rw( - _$$ref.pointer, - _sel_enumerateLinguisticTagsInRange_scheme_options_orthography_usingBlock_, - range, + return $ret.address == 0 + ? null + : NSMutableString.fromPointer($ret, retain: false, release: true); + } + + /// initWithCharacters:length: + NSMutableString initWithCharacters( + ffi.Pointer characters, { + required DartNSUInteger length, + }) { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_9x4k8x( + _$$ref.retainAndReturnPointer(), + _sel_initWithCharacters_length_, + characters, + length, + ); + return NSMutableString.fromPointer($ret, retain: false, release: true); + } + + /// initWithCharactersNoCopy:length:deallocator: + NSMutableString initWithCharactersNoCopy( + ffi.Pointer chars, { + required DartNSUInteger length, + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) + >? + deallocator, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = deallocator?.ref; + final $ret = _objc_msgSend_talwei( + _$$ref.retainAndReturnPointer(), + _sel_initWithCharactersNoCopy_length_deallocator_, + chars, + length, + _$$ref$1?.pointer ?? ffi.nullptr, + ); + return NSMutableString.fromPointer($ret, retain: false, release: true); + } + + /// initWithCharactersNoCopy:length:freeWhenDone: + NSMutableString initWithCharactersNoCopy$1( + ffi.Pointer characters, { + required DartNSUInteger length, + required bool freeWhenDone, + }) { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_lh0jh5( + _$$ref.retainAndReturnPointer(), + _sel_initWithCharactersNoCopy_length_freeWhenDone_, + characters, + length, + freeWhenDone, + ); + return NSMutableString.fromPointer($ret, retain: false, release: true); + } + + /// initWithCoder: + NSMutableString? initWithCoder(NSCoder coder) { + final _$$ref$32 = object$.ref; + final _$$ref$33 = coder.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref$32.retainAndReturnPointer(), + _sel_initWithCoder_, + _$$ref$33.pointer, + ); + return $ret.address == 0 + ? null + : NSMutableString.fromPointer($ret, retain: false, release: true); + } + + /// initWithContentsOfFile:encoding:error: + NSMutableString? initWithContentsOfFile( + NSString path, { + required DartNSUInteger encoding, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = path.ref; + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1nomli1( + _$$ref.retainAndReturnPointer(), + _sel_initWithContentsOfFile_encoding_error_, + _$$ref$1.pointer, + encoding, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSMutableString.fromPointer($ret, retain: false, release: true); + } finally { + pkg_ffi.calloc.free($err); + } + } + + /// initWithContentsOfFile:usedEncoding:error: + NSMutableString? initWithContentsOfFile$1( + NSString path, { + required ffi.Pointer usedEncoding, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = path.ref; + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1alewu7( + _$$ref.retainAndReturnPointer(), + _sel_initWithContentsOfFile_usedEncoding_error_, + _$$ref$1.pointer, + usedEncoding, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSMutableString.fromPointer($ret, retain: false, release: true); + } finally { + pkg_ffi.calloc.free($err); + } + } + + /// initWithContentsOfURL:encoding:error: + NSMutableString? initWithContentsOfURL( + NSURL url, { + required DartNSUInteger encoding, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = url.ref; + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1nomli1( + _$$ref.retainAndReturnPointer(), + _sel_initWithContentsOfURL_encoding_error_, + _$$ref$1.pointer, + encoding, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSMutableString.fromPointer($ret, retain: false, release: true); + } finally { + pkg_ffi.calloc.free($err); + } + } + + /// initWithContentsOfURL:usedEncoding:error: + NSMutableString? initWithContentsOfURL$1( + NSURL url, { + required ffi.Pointer usedEncoding, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = url.ref; + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1alewu7( + _$$ref.retainAndReturnPointer(), + _sel_initWithContentsOfURL_usedEncoding_error_, + _$$ref$1.pointer, + usedEncoding, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSMutableString.fromPointer($ret, retain: false, release: true); + } finally { + pkg_ffi.calloc.free($err); + } + } + + /// initWithData:encoding: + NSMutableString? initWithData( + NSData data, { + required DartNSUInteger encoding, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = data.ref; + final $ret = _objc_msgSend_1k4kd9s( + _$$ref.retainAndReturnPointer(), + _sel_initWithData_encoding_, + _$$ref$1.pointer, + encoding, + ); + return $ret.address == 0 + ? null + : NSMutableString.fromPointer($ret, retain: false, release: true); + } + + /// initWithFormat: + NSMutableString initWithFormat(NSString format) { + final _$$ref = object$.ref; + final _$$ref$1 = format.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.retainAndReturnPointer(), + _sel_initWithFormat_, + _$$ref$1.pointer, + ); + return NSMutableString.fromPointer($ret, retain: false, release: true); + } + + /// initWithFormat:locale: + NSMutableString initWithFormat$1(NSString format, {objc.ObjCObject? locale}) { + final _$$ref = object$.ref; + final _$$ref$1 = format.ref; + final _$$ref$2 = locale?.ref; + final $ret = _objc_msgSend_15qeuct( + _$$ref.retainAndReturnPointer(), + _sel_initWithFormat_locale_, _$$ref$1.pointer, - options, _$$ref$2?.pointer ?? ffi.nullptr, - _$$ref$3.pointer, ); + return NSMutableString.fromPointer($ret, retain: false, release: true); } - /// linguisticTagsInRange:scheme:options:orthography:tokenRanges: - @Deprecated( - 'All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API', - ) - NSArray linguisticTagsInRange( - NSRange range, { - required NSString scheme, - required DartNSUInteger options, - NSOrthography? orthography, - required ffi.Pointer> tokenRanges, + /// initWithString: + NSMutableString initWithString(NSString aString) { + final _$$ref = object$.ref; + final _$$ref$1 = aString.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.retainAndReturnPointer(), + _sel_initWithString_, + _$$ref$1.pointer, + ); + return NSMutableString.fromPointer($ret, retain: false, release: true); + } + + /// initWithUTF8String: + NSMutableString? initWithUTF8String( + ffi.Pointer nullTerminatedCString, + ) { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_56zxyn( + _$$ref.retainAndReturnPointer(), + _sel_initWithUTF8String_, + nullTerminatedCString, + ); + return $ret.address == 0 + ? null + : NSMutableString.fromPointer($ret, retain: false, release: true); + } + + /// initWithValidatedFormat:validFormatSpecifiers:error: + /// + /// iOS: introduced 16.0.0 + /// macOS: introduced 13.0.0 + NSMutableString? initWithValidatedFormat( + NSString format, { + required NSString validFormatSpecifiers, }) { final _$$ref = object$.ref; - final _$$ref$1 = scheme.ref; - final _$$ref$2 = orthography?.ref; + final _$$ref$1 = format.ref; + final _$$ref$2 = validFormatSpecifiers.ref; objc.checkOsVersionInternal( - 'NSString.linguisticTagsInRange:scheme:options:orthography:tokenRanges:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSMutableString.initWithValidatedFormat:validFormatSpecifiers:error:', + iOS: (false, (16, 0, 0)), + macOS: (false, (13, 0, 0)), + ); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1pnyuds( + _$$ref.retainAndReturnPointer(), + _sel_initWithValidatedFormat_validFormatSpecifiers_error_, + _$$ref$1.pointer, + _$$ref$2.pointer, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSMutableString.fromPointer($ret, retain: false, release: true); + } finally { + pkg_ffi.calloc.free($err); + } + } + + /// initWithValidatedFormat:validFormatSpecifiers:locale:error: + /// + /// iOS: introduced 16.0.0 + /// macOS: introduced 13.0.0 + NSMutableString? initWithValidatedFormat$1( + NSString format, { + required NSString validFormatSpecifiers, + objc.ObjCObject? locale, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = format.ref; + final _$$ref$2 = validFormatSpecifiers.ref; + final _$$ref$3 = locale?.ref; + objc.checkOsVersionInternal( + 'NSMutableString.initWithValidatedFormat:validFormatSpecifiers:locale:error:', + iOS: (false, (16, 0, 0)), + macOS: (false, (13, 0, 0)), ); - final $ret = _objc_msgSend_1l09uru( + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1k0ezzm( + _$$ref.retainAndReturnPointer(), + _sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_, + _$$ref$1.pointer, + _$$ref$2.pointer, + _$$ref$3?.pointer ?? ffi.nullptr, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSMutableString.fromPointer($ret, retain: false, release: true); + } finally { + pkg_ffi.calloc.free($err); + } + } + + /// replaceCharactersInRange:withString: + void replaceCharactersInRange(NSRange range, {required NSString withString}) { + final _$$ref = object$.ref; + final _$$ref$1 = withString.ref; + _objc_msgSend_1tv4uax( _$$ref.pointer, - _sel_linguisticTagsInRange_scheme_options_orthography_tokenRanges_, + _sel_replaceCharactersInRange_withString_, range, _$$ref$1.pointer, - options, - _$$ref$2?.pointer ?? ffi.nullptr, - tokenRanges, ); - return NSArray.fromPointer($ret, retain: true, release: true); } } -sealed class NSLinguisticTaggerOptions { - static const NSLinguisticTaggerOmitWords = 1; - static const NSLinguisticTaggerOmitPunctuation = 2; - static const NSLinguisticTaggerOmitWhitespace = 4; - static const NSLinguisticTaggerOmitOther = 8; - static const NSLinguisticTaggerJoinNames = 16; -} - -/// NSLocale -extension type NSLocale._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject, NSCopying, NSSecureCoding { - /// Constructs a [NSLocale] that points to the same underlying object as [other]. - NSLocale.as(objc.ObjCObject other) : object$ = other { +/// NSNotification +extension type NSNotification._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject, NSCopying, NSCoding { + /// Constructs a [NSNotification] that points to the same underlying object as [other]. + NSNotification.as(objc.ObjCObject other) : object$ = other { assert(isA(object$)); } - /// Constructs a [NSLocale] that wraps the given raw object pointer. - NSLocale.fromPointer( + /// Constructs a [NSNotification] that wraps the given raw object pointer. + NSNotification.fromPointer( ffi.Pointer other, { bool retain = false, bool release = false, @@ -16252,377 +14362,173 @@ extension type NSLocale._(objc.ObjCObject object$) assert(isA(object$)); } - /// Returns whether [obj] is an instance of [NSLocale]. + /// Returns whether [obj] is an instance of [NSNotification]. static bool isA(objc.ObjCObject? obj) => obj == null ? false : _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, - _class_NSLocale, + _class_NSNotification, ); /// alloc - static NSLocale alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSLocale, _sel_alloc); - return NSLocale.fromPointer($ret, retain: false, release: true); + static NSNotification alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSNotification, _sel_alloc); + return NSNotification.fromPointer($ret, retain: false, release: true); } /// allocWithZone: - static NSLocale allocWithZone(ffi.Pointer zone) { + static NSNotification allocWithZone(ffi.Pointer zone) { final $ret = _objc_msgSend_1cwp428( - _class_NSLocale, + _class_NSNotification, _sel_allocWithZone_, zone, ); - return NSLocale.fromPointer($ret, retain: false, release: true); - } - - /// localeWithLocaleIdentifier: - static NSLocale localeWithLocaleIdentifier(NSString ident) { - final _$$ref = ident.ref; - objc.checkOsVersionInternal( - 'NSLocale.localeWithLocaleIdentifier:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _class_NSLocale, - _sel_localeWithLocaleIdentifier_, - _$$ref.pointer, - ); - return NSLocale.fromPointer($ret, retain: true, release: true); + return NSNotification.fromPointer($ret, retain: false, release: true); } /// new - static NSLocale new$() { - final $ret = _objc_msgSend_151sglz(_class_NSLocale, _sel_new); - return NSLocale.fromPointer($ret, retain: false, release: true); + static NSNotification new$() { + final $ret = _objc_msgSend_151sglz(_class_NSNotification, _sel_new); + return NSNotification.fromPointer($ret, retain: false, release: true); } - /// supportsSecureCoding - static bool getSupportsSecureCoding() { - return _objc_msgSend_91o635(_class_NSLocale, _sel_supportsSecureCoding); + /// notificationWithName:object: + static NSNotification notificationWithName( + NSString aName, { + objc.ObjCObject? object, + }) { + final _$$ref = aName.ref; + final _$$ref$1 = object?.ref; + final $ret = _objc_msgSend_15qeuct( + _class_NSNotification, + _sel_notificationWithName_object_, + _$$ref.pointer, + _$$ref$1?.pointer ?? ffi.nullptr, + ); + return NSNotification.fromPointer($ret, retain: true, release: true); } - /// Returns a new instance of NSLocale constructed with the default `new` method. - NSLocale() : this.as(new$().object$); -} - -extension NSLocale$Methods on NSLocale { - /// displayNameForKey:value: - NSString? displayNameForKey(NSString key, {required objc.ObjCObject value}) { - final _$$ref = object$.ref; - final _$$ref$1 = key.ref; - final _$$ref$2 = value.ref; - final $ret = _objc_msgSend_15qeuct( + /// notificationWithName:object:userInfo: + static NSNotification notificationWithName$1( + NSString aName, { + objc.ObjCObject? object, + NSDictionary? userInfo, + }) { + final _$$ref = aName.ref; + final _$$ref$1 = object?.ref; + final _$$ref$2 = userInfo?.ref; + final $ret = _objc_msgSend_11spmsz( + _class_NSNotification, + _sel_notificationWithName_object_userInfo_, _$$ref.pointer, - _sel_displayNameForKey_value_, - _$$ref$1.pointer, - _$$ref$2.pointer, + _$$ref$1?.pointer ?? ffi.nullptr, + _$$ref$2?.pointer ?? ffi.nullptr, ); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); + return NSNotification.fromPointer($ret, retain: true, release: true); } + /// Returns a new instance of NSNotification constructed with the default `new` method. + NSNotification() : this.as(new$().object$); +} + +extension NSNotification$Methods on NSNotification { /// encodeWithCoder: void encodeWithCoder(NSCoder coder) { - final _$$ref$18 = object$.ref; - final _$$ref$19 = coder.ref; + final _$$ref$20 = object$.ref; + final _$$ref$21 = coder.ref; _objc_msgSend_xtuoz7( - _$$ref$18.pointer, + _$$ref$20.pointer, _sel_encodeWithCoder_, - _$$ref$19.pointer, + _$$ref$21.pointer, ); } /// init - NSLocale init() { - final _$$ref$20 = object$.ref; - objc.checkOsVersionInternal( - 'NSLocale.init', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); + NSNotification init() { + final _$$ref = object$.ref; final $ret = _objc_msgSend_151sglz( - _$$ref$20.retainAndReturnPointer(), + _$$ref.retainAndReturnPointer(), _sel_init, ); - return NSLocale.fromPointer($ret, retain: false, release: true); + return NSNotification.fromPointer($ret, retain: false, release: true); } /// initWithCoder: - NSLocale? initWithCoder(NSCoder coder) { - final _$$ref$18 = object$.ref; - final _$$ref$19 = coder.ref; + NSNotification? initWithCoder(NSCoder coder) { + final _$$ref$34 = object$.ref; + final _$$ref$35 = coder.ref; final $ret = _objc_msgSend_1sotr3r( - _$$ref$18.retainAndReturnPointer(), + _$$ref$34.retainAndReturnPointer(), _sel_initWithCoder_, - _$$ref$19.pointer, + _$$ref$35.pointer, ); return $ret.address == 0 ? null - : NSLocale.fromPointer($ret, retain: false, release: true); + : NSNotification.fromPointer($ret, retain: false, release: true); } - /// initWithLocaleIdentifier: - NSLocale initWithLocaleIdentifier(NSString string) { + /// initWithName:object:userInfo: + NSNotification initWithName( + NSString name, { + objc.ObjCObject? object, + NSDictionary? userInfo, + }) { final _$$ref = object$.ref; - final _$$ref$1 = string.ref; - final $ret = _objc_msgSend_1sotr3r( + final _$$ref$1 = name.ref; + final _$$ref$2 = object?.ref; + final _$$ref$3 = userInfo?.ref; + objc.checkOsVersionInternal( + 'NSNotification.initWithName:object:userInfo:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_11spmsz( _$$ref.retainAndReturnPointer(), - _sel_initWithLocaleIdentifier_, + _sel_initWithName_object_userInfo_, _$$ref$1.pointer, + _$$ref$2?.pointer ?? ffi.nullptr, + _$$ref$3?.pointer ?? ffi.nullptr, ); - return NSLocale.fromPointer($ret, retain: false, release: true); + return NSNotification.fromPointer($ret, retain: false, release: true); } - /// objectForKey: - objc.ObjCObject? objectForKey(NSString key) { + /// name + NSString get name { final _$$ref = object$.ref; - final _$$ref$1 = key.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_objectForKey_, - _$$ref$1.pointer, - ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); - } -} - -/// NSLocaleCreation -extension NSLocaleCreation on NSLocale { - /// autoupdatingCurrentLocale - static NSLocale getAutoupdatingCurrentLocale() { - objc.checkOsVersionInternal( - 'NSLocale.autoupdatingCurrentLocale', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _class_NSLocale, - _sel_autoupdatingCurrentLocale, - ); - return NSLocale.fromPointer($ret, retain: true, release: true); - } - - /// currentLocale - static NSLocale getCurrentLocale() { - final $ret = _objc_msgSend_151sglz(_class_NSLocale, _sel_currentLocale); - return NSLocale.fromPointer($ret, retain: true, release: true); - } - - /// systemLocale - static NSLocale getSystemLocale() { - final $ret = _objc_msgSend_151sglz(_class_NSLocale, _sel_systemLocale); - return NSLocale.fromPointer($ret, retain: true, release: true); - } -} - -/// NSLocaleGeneralInfo -extension NSLocaleGeneralInfo on NSLocale { - /// ISOCountryCodes - static NSArray getISOCountryCodes() { - final $ret = _objc_msgSend_151sglz(_class_NSLocale, _sel_ISOCountryCodes); - return NSArray.fromPointer($ret, retain: true, release: true); - } - - /// ISOCurrencyCodes - static NSArray getISOCurrencyCodes() { - final $ret = _objc_msgSend_151sglz(_class_NSLocale, _sel_ISOCurrencyCodes); - return NSArray.fromPointer($ret, retain: true, release: true); - } - - /// ISOLanguageCodes - static NSArray getISOLanguageCodes() { - final $ret = _objc_msgSend_151sglz(_class_NSLocale, _sel_ISOLanguageCodes); - return NSArray.fromPointer($ret, retain: true, release: true); - } - - /// availableLocaleIdentifiers - static NSArray getAvailableLocaleIdentifiers() { - final $ret = _objc_msgSend_151sglz( - _class_NSLocale, - _sel_availableLocaleIdentifiers, - ); - return NSArray.fromPointer($ret, retain: true, release: true); - } - - /// canonicalLanguageIdentifierFromString: - static NSString canonicalLanguageIdentifierFromString(NSString string) { - final _$$ref = string.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSLocale, - _sel_canonicalLanguageIdentifierFromString_, - _$$ref.pointer, - ); - return NSString.fromPointer($ret, retain: true, release: true); - } - - /// canonicalLocaleIdentifierFromString: - static NSString canonicalLocaleIdentifierFromString(NSString string) { - final _$$ref = string.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSLocale, - _sel_canonicalLocaleIdentifierFromString_, - _$$ref.pointer, - ); - return NSString.fromPointer($ret, retain: true, release: true); - } - - /// characterDirectionForLanguage: - static NSLocaleLanguageDirection characterDirectionForLanguage( - NSString isoLangCode, - ) { - final _$$ref = isoLangCode.ref; - objc.checkOsVersionInternal( - 'NSLocale.characterDirectionForLanguage:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_1kn7frf( - _class_NSLocale, - _sel_characterDirectionForLanguage_, - _$$ref.pointer, - ); - return NSLocaleLanguageDirection.fromValue($ret); - } - - /// commonISOCurrencyCodes - static NSArray getCommonISOCurrencyCodes() { - objc.checkOsVersionInternal( - 'NSLocale.commonISOCurrencyCodes', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _class_NSLocale, - _sel_commonISOCurrencyCodes, - ); - return NSArray.fromPointer($ret, retain: true, release: true); - } - - /// componentsFromLocaleIdentifier: - static NSDictionary componentsFromLocaleIdentifier(NSString string) { - final _$$ref = string.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSLocale, - _sel_componentsFromLocaleIdentifier_, - _$$ref.pointer, - ); - return NSDictionary.fromPointer($ret, retain: true, release: true); - } - - /// lineDirectionForLanguage: - static NSLocaleLanguageDirection lineDirectionForLanguage( - NSString isoLangCode, - ) { - final _$$ref = isoLangCode.ref; - objc.checkOsVersionInternal( - 'NSLocale.lineDirectionForLanguage:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_1kn7frf( - _class_NSLocale, - _sel_lineDirectionForLanguage_, - _$$ref.pointer, - ); - return NSLocaleLanguageDirection.fromValue($ret); - } - - /// localeIdentifierFromComponents: - static NSString localeIdentifierFromComponents(NSDictionary dict) { - final _$$ref = dict.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSLocale, - _sel_localeIdentifierFromComponents_, - _$$ref.pointer, - ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_name); return NSString.fromPointer($ret, retain: true, release: true); } - /// localeIdentifierFromWindowsLocaleCode: - static NSString? localeIdentifierFromWindowsLocaleCode(int lcid) { - objc.checkOsVersionInternal( - 'NSLocale.localeIdentifierFromWindowsLocaleCode:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_lx7wnn( - _class_NSLocale, - _sel_localeIdentifierFromWindowsLocaleCode_, - lcid, - ); + /// object + objc.ObjCObject? get object { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_object); return $ret.address == 0 ? null - : NSString.fromPointer($ret, retain: true, release: true); - } - - /// preferredLanguages - static NSArray getPreferredLanguages() { - objc.checkOsVersionInternal( - 'NSLocale.preferredLanguages', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _class_NSLocale, - _sel_preferredLanguages, - ); - return NSArray.fromPointer($ret, retain: true, release: true); + : objc.ObjCObject($ret, retain: true, release: true); } - /// windowsLocaleCodeFromLocaleIdentifier: - static int windowsLocaleCodeFromLocaleIdentifier(NSString localeIdentifier) { - final _$$ref = localeIdentifier.ref; - objc.checkOsVersionInternal( - 'NSLocale.windowsLocaleCodeFromLocaleIdentifier:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - return _objc_msgSend_1nwix4r( - _class_NSLocale, - _sel_windowsLocaleCodeFromLocaleIdentifier_, - _$$ref.pointer, - ); + /// userInfo + NSDictionary? get userInfo { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_userInfo); + return $ret.address == 0 + ? null + : NSDictionary.fromPointer($ret, retain: true, release: true); } } -enum NSLocaleLanguageDirection { - NSLocaleLanguageDirectionUnknown(0), - NSLocaleLanguageDirectionLeftToRight(1), - NSLocaleLanguageDirectionRightToLeft(2), - NSLocaleLanguageDirectionTopToBottom(3), - NSLocaleLanguageDirectionBottomToTop(4); - - final int value; - const NSLocaleLanguageDirection(this.value); - - static NSLocaleLanguageDirection fromValue(int value) => switch (value) { - 0 => NSLocaleLanguageDirectionUnknown, - 1 => NSLocaleLanguageDirectionLeftToRight, - 2 => NSLocaleLanguageDirectionRightToLeft, - 3 => NSLocaleLanguageDirectionTopToBottom, - 4 => NSLocaleLanguageDirectionBottomToTop, - _ => throw ArgumentError( - 'Unknown value for NSLocaleLanguageDirection: $value', - ), - }; -} - -/// NSMethodSignature -extension type NSMethodSignature._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject { - /// Constructs a [NSMethodSignature] that points to the same underlying object as [other]. - NSMethodSignature.as(objc.ObjCObject other) : object$ = other { +/// NSNull +extension type NSNull._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject, NSCopying, NSSecureCoding { + /// Constructs a [NSNull] that points to the same underlying object as [other]. + NSNull.as(objc.ObjCObject other) : object$ = other { assert(isA(object$)); } - /// Constructs a [NSMethodSignature] that wraps the given raw object pointer. - NSMethodSignature.fromPointer( + /// Constructs a [NSNull] that wraps the given raw object pointer. + NSNull.fromPointer( ffi.Pointer other, { bool retain = false, bool release = false, @@ -16630,157 +14536,104 @@ extension type NSMethodSignature._(objc.ObjCObject object$) assert(isA(object$)); } - /// Returns whether [obj] is an instance of [NSMethodSignature]. + /// Returns whether [obj] is an instance of [NSNull]. static bool isA(objc.ObjCObject? obj) => obj == null ? false : _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, - _class_NSMethodSignature, + _class_NSNull, ); /// alloc - static NSMethodSignature alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSMethodSignature, _sel_alloc); - return NSMethodSignature.fromPointer($ret, retain: false, release: true); + static NSNull alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSNull, _sel_alloc); + return NSNull.fromPointer($ret, retain: false, release: true); } /// allocWithZone: - static NSMethodSignature allocWithZone(ffi.Pointer zone) { + static NSNull allocWithZone(ffi.Pointer zone) { final $ret = _objc_msgSend_1cwp428( - _class_NSMethodSignature, + _class_NSNull, _sel_allocWithZone_, zone, ); - return NSMethodSignature.fromPointer($ret, retain: false, release: true); + return NSNull.fromPointer($ret, retain: false, release: true); } /// new - static NSMethodSignature new$() { - final $ret = _objc_msgSend_151sglz(_class_NSMethodSignature, _sel_new); - return NSMethodSignature.fromPointer($ret, retain: false, release: true); + static NSNull new$() { + final $ret = _objc_msgSend_151sglz(_class_NSNull, _sel_new); + return NSNull.fromPointer($ret, retain: false, release: true); } - /// signatureWithObjCTypes: - static NSMethodSignature? signatureWithObjCTypes( - ffi.Pointer types, - ) { - final $ret = _objc_msgSend_56zxyn( - _class_NSMethodSignature, - _sel_signatureWithObjCTypes_, - types, - ); - return $ret.address == 0 - ? null - : NSMethodSignature.fromPointer($ret, retain: true, release: true); + /// null + static NSNull null$() { + final $ret = _objc_msgSend_151sglz(_class_NSNull, _sel_null); + return NSNull.fromPointer($ret, retain: true, release: true); } - /// Returns a new instance of NSMethodSignature constructed with the default `new` method. - NSMethodSignature() : this.as(new$().object$); -} - -extension NSMethodSignature$Methods on NSMethodSignature { - /// frameLength - DartNSUInteger get frameLength { - final _$$ref = object$.ref; - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_frameLength); + /// supportsSecureCoding + static bool getSupportsSecureCoding() { + return _objc_msgSend_91o635(_class_NSNull, _sel_supportsSecureCoding); } - /// getArgumentTypeAtIndex: - ffi.Pointer getArgumentTypeAtIndex(DartNSUInteger idx) { - final _$$ref = object$.ref; - return _objc_msgSend_1jtxufi( - _$$ref.pointer, - _sel_getArgumentTypeAtIndex_, - idx, + /// Returns a new instance of NSNull constructed with the default `new` method. + NSNull() : this.as(new$().object$); +} + +extension NSNull$Methods on NSNull { + /// encodeWithCoder: + void encodeWithCoder(NSCoder coder) { + final _$$ref$22 = object$.ref; + final _$$ref$23 = coder.ref; + _objc_msgSend_xtuoz7( + _$$ref$22.pointer, + _sel_encodeWithCoder_, + _$$ref$23.pointer, ); } /// init - NSMethodSignature init() { - final _$$ref$21 = object$.ref; + NSNull init() { + final _$$ref$29 = object$.ref; objc.checkOsVersionInternal( - 'NSMethodSignature.init', + 'NSNull.init', iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); final $ret = _objc_msgSend_151sglz( - _$$ref$21.retainAndReturnPointer(), + _$$ref$29.retainAndReturnPointer(), _sel_init, ); - return NSMethodSignature.fromPointer($ret, retain: false, release: true); - } - - /// isOneway - bool isOneway() { - final _$$ref = object$.ref; - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isOneway); - } - - /// methodReturnLength - DartNSUInteger get methodReturnLength { - final _$$ref = object$.ref; - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_methodReturnLength); - } - - /// methodReturnType - ffi.Pointer get methodReturnType { - final _$$ref = object$.ref; - return _objc_msgSend_1fuqfwb(_$$ref.pointer, _sel_methodReturnType); - } - - /// numberOfArguments - DartNSUInteger get numberOfArguments { - final _$$ref = object$.ref; - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_numberOfArguments); + return NSNull.fromPointer($ret, retain: false, release: true); } -} -/// NSMorphology -extension NSMorphology on NSAttributedString { - /// attributedStringByInflectingString - NSAttributedString attributedStringByInflectingString() { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSAttributedString.attributedStringByInflectingString', - iOS: (false, (15, 0, 0)), - macOS: (false, (12, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_attributedStringByInflectingString, + /// initWithCoder: + NSNull? initWithCoder(NSCoder coder) { + final _$$ref$36 = object$.ref; + final _$$ref$37 = coder.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref$36.retainAndReturnPointer(), + _sel_initWithCoder_, + _$$ref$37.pointer, ); - return NSAttributedString.fromPointer($ret, retain: true, release: true); + return $ret.address == 0 + ? null + : NSNull.fromPointer($ret, retain: false, release: true); } } -/// NSMutableArray -extension type NSMutableArray._(objc.ObjCObject object$) - implements objc.ObjCObject, NSArray { - /// Creates a [NSMutableArray] of the given length with [fill] at each - /// position. - /// - /// The [length] must be a non-negative integer. - static NSMutableArray filled(int length, objc.ObjCObject fill) { - final a = arrayWithCapacity(length); - for (var i = 0; i < length; ++i) a.addObject(fill); - return a; - } - - /// Creates a [NSMutableArray] from [elements]. - static NSMutableArray of(Iterable elements) { - final a = arrayWithCapacity(elements.length); - for (final e in elements) a.addObject(e); - return a; - } - - /// Constructs a [NSMutableArray] that points to the same underlying object as [other]. - NSMutableArray.as(objc.ObjCObject other) : object$ = other { +/// NSNumber +extension type NSNumber._(objc.ObjCObject object$) + implements objc.ObjCObject, NSValue { + /// Constructs a [NSNumber] that points to the same underlying object as [other]. + NSNumber.as(objc.ObjCObject other) : object$ = other { assert(isA(object$)); } - /// Constructs a [NSMutableArray] that wraps the given raw object pointer. - NSMutableArray.fromPointer( + /// Constructs a [NSNumber] that wraps the given raw object pointer. + NSNumber.fromPointer( ffi.Pointer other, { bool retain = false, bool release = false, @@ -16788,10233 +14641,2922 @@ extension type NSMutableArray._(objc.ObjCObject object$) assert(isA(object$)); } - /// Returns whether [obj] is an instance of [NSMutableArray]. + /// Returns whether [obj] is an instance of [NSNumber]. static bool isA(objc.ObjCObject? obj) => obj == null ? false : _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, - _class_NSMutableArray, + _class_NSNumber, ); /// alloc - static NSMutableArray alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSMutableArray, _sel_alloc); - return NSMutableArray.fromPointer($ret, retain: false, release: true); + static NSNumber alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSNumber, _sel_alloc); + return NSNumber.fromPointer($ret, retain: false, release: true); } /// allocWithZone: - static NSMutableArray allocWithZone(ffi.Pointer zone) { + static NSNumber allocWithZone(ffi.Pointer zone) { final $ret = _objc_msgSend_1cwp428( - _class_NSMutableArray, + _class_NSNumber, _sel_allocWithZone_, zone, ); - return NSMutableArray.fromPointer($ret, retain: false, release: true); + return NSNumber.fromPointer($ret, retain: false, release: true); } - /// array - static NSMutableArray array() { - final $ret = _objc_msgSend_151sglz(_class_NSMutableArray, _sel_array); - return NSMutableArray.fromPointer($ret, retain: true, release: true); + /// new + static NSNumber new$() { + final $ret = _objc_msgSend_151sglz(_class_NSNumber, _sel_new); + return NSNumber.fromPointer($ret, retain: false, release: true); } - /// arrayWithArray: - static NSMutableArray arrayWithArray(NSArray array) { - final _$$ref$1 = array.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSMutableArray, - _sel_arrayWithArray_, - _$$ref$1.pointer, - ); - return NSMutableArray.fromPointer($ret, retain: true, release: true); + /// supportsSecureCoding + static bool getSupportsSecureCoding() { + return _objc_msgSend_91o635(_class_NSNumber, _sel_supportsSecureCoding); } - /// arrayWithCapacity: - static NSMutableArray arrayWithCapacity(DartNSUInteger numItems) { - final $ret = _objc_msgSend_14hpxwa( - _class_NSMutableArray, - _sel_arrayWithCapacity_, - numItems, - ); - return NSMutableArray.fromPointer($ret, retain: true, release: true); + /// Returns a new instance of NSNumber constructed with the default `new` method. + NSNumber() : this.as(new$().object$); +} + +extension NSNumber$Methods on NSNumber { + /// boolValue + bool get boolValue { + final _$$ref = object$.ref; + return _objc_msgSend_91o635(_$$ref.pointer, _sel_boolValue); } - /// arrayWithObject: - static NSMutableArray arrayWithObject(objc.ObjCObject anObject) { - final _$$ref$1 = anObject.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSMutableArray, - _sel_arrayWithObject_, - _$$ref$1.pointer, - ); - return NSMutableArray.fromPointer($ret, retain: true, release: true); + /// charValue + int get charValue { + final _$$ref = object$.ref; + return _objc_msgSend_xmlz1t(_$$ref.pointer, _sel_charValue); } - /// arrayWithObjects: - static NSMutableArray arrayWithObjects(objc.ObjCObject firstObj) { - final _$$ref$1 = firstObj.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSMutableArray, - _sel_arrayWithObjects_, + /// compare: + NSComparisonResult compare(NSNumber otherNumber) { + final _$$ref = object$.ref; + final _$$ref$1 = otherNumber.ref; + final $ret = _objc_msgSend_1ym6zyw( + _$$ref.pointer, + _sel_compare_, _$$ref$1.pointer, ); - return NSMutableArray.fromPointer($ret, retain: true, release: true); + return NSComparisonResult.fromValue($ret); } - /// arrayWithObjects:count: - static NSMutableArray arrayWithObjects$1( - ffi.Pointer> objects, { - required DartNSUInteger count, - }) { - final $ret = _objc_msgSend_zmbtbd( - _class_NSMutableArray, - _sel_arrayWithObjects_count_, - objects, - count, + /// descriptionWithLocale: + NSString descriptionWithLocale(objc.ObjCObject? locale) { + final _$$ref = object$.ref; + final _$$ref$1 = locale?.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_descriptionWithLocale_, + _$$ref$1?.pointer ?? ffi.nullptr, ); - return NSMutableArray.fromPointer($ret, retain: true, release: true); - } - - /// new - static NSMutableArray new$() { - final $ret = _objc_msgSend_151sglz(_class_NSMutableArray, _sel_new); - return NSMutableArray.fromPointer($ret, retain: false, release: true); + return NSString.fromPointer($ret, retain: true, release: true); } - /// supportsSecureCoding - static bool getSupportsSecureCoding() { - return _objc_msgSend_91o635( - _class_NSMutableArray, - _sel_supportsSecureCoding, - ); + /// doubleValue + double get doubleValue { + final _$$ref = object$.ref; + return objc.useMsgSendVariants + ? _objc_msgSend_1ukqyt8Fpret(_$$ref.pointer, _sel_doubleValue) + : _objc_msgSend_1ukqyt8(_$$ref.pointer, _sel_doubleValue); } - /// Returns a new instance of NSMutableArray constructed with the default `new` method. - NSMutableArray() : this.as(new$().object$); -} - -extension NSMutableArray$Methods on NSMutableArray { - /// addObject: - void addObject(objc.ObjCObject anObject) { + /// floatValue + double get floatValue { final _$$ref = object$.ref; - final _$$ref$1 = anObject.ref; - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_addObject_, _$$ref$1.pointer); + return objc.useMsgSendVariants + ? _objc_msgSend_2cgrxlFpret(_$$ref.pointer, _sel_floatValue) + : _objc_msgSend_2cgrxl(_$$ref.pointer, _sel_floatValue); } /// init - NSMutableArray init() { - final _$$ref$22 = object$.ref; + NSNumber init() { + final _$$ref$30 = object$.ref; objc.checkOsVersionInternal( - 'NSMutableArray.init', + 'NSNumber.init', iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); final $ret = _objc_msgSend_151sglz( - _$$ref$22.retainAndReturnPointer(), + _$$ref$30.retainAndReturnPointer(), _sel_init, ); - return NSMutableArray.fromPointer($ret, retain: false, release: true); - } - - /// initWithArray: - NSMutableArray initWithArray(NSArray array) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = array.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithArray_, - _$$ref$3.pointer, - ); - return NSMutableArray.fromPointer($ret, retain: false, release: true); - } - - /// initWithArray:copyItems: - NSMutableArray initWithArray$1(NSArray array, {required bool copyItems}) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = array.ref; - final $ret = _objc_msgSend_17amj0z( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithArray_copyItems_, - _$$ref$3.pointer, - copyItems, - ); - return NSMutableArray.fromPointer($ret, retain: false, release: true); + return NSNumber.fromPointer($ret, retain: false, release: true); } - /// initWithCapacity: - NSMutableArray initWithCapacity(DartNSUInteger numItems) { + /// initWithBool: + NSNumber initWithBool(bool value) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_14hpxwa( + final $ret = _objc_msgSend_1t6aok9( _$$ref.retainAndReturnPointer(), - _sel_initWithCapacity_, - numItems, + _sel_initWithBool_, + value, ); - return NSMutableArray.fromPointer($ret, retain: false, release: true); + return NSNumber.fromPointer($ret, retain: false, release: true); + } + + /// initWithBytes:objCType: + NSNumber initWithBytes( + ffi.Pointer value, { + required ffi.Pointer objCType, + }) { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_e9mncn( + _$$ref.retainAndReturnPointer(), + _sel_initWithBytes_objCType_, + value, + objCType, + ); + return NSNumber.fromPointer($ret, retain: false, release: true); + } + + /// initWithChar: + NSNumber initWithChar(int value) { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_13mclwd( + _$$ref.retainAndReturnPointer(), + _sel_initWithChar_, + value, + ); + return NSNumber.fromPointer($ret, retain: false, release: true); } /// initWithCoder: - NSMutableArray? initWithCoder(NSCoder coder) { - final _$$ref$20 = object$.ref; - final _$$ref$21 = coder.ref; + NSNumber? initWithCoder(NSCoder coder) { + final _$$ref$38 = object$.ref; + final _$$ref$39 = coder.ref; final $ret = _objc_msgSend_1sotr3r( - _$$ref$20.retainAndReturnPointer(), + _$$ref$38.retainAndReturnPointer(), _sel_initWithCoder_, - _$$ref$21.pointer, + _$$ref$39.pointer, ); return $ret.address == 0 ? null - : NSMutableArray.fromPointer($ret, retain: false, release: true); - } - - /// initWithObjects: - NSMutableArray initWithObjects(objc.ObjCObject firstObj) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = firstObj.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithObjects_, - _$$ref$3.pointer, - ); - return NSMutableArray.fromPointer($ret, retain: false, release: true); + : NSNumber.fromPointer($ret, retain: false, release: true); } - /// initWithObjects:count: - NSMutableArray initWithObjects$1( - ffi.Pointer> objects, { - required DartNSUInteger count, - }) { - final _$$ref$1 = object$.ref; - final $ret = _objc_msgSend_zmbtbd( - _$$ref$1.retainAndReturnPointer(), - _sel_initWithObjects_count_, - objects, - count, + /// initWithDouble: + NSNumber initWithDouble(double value) { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_oa8mke( + _$$ref.retainAndReturnPointer(), + _sel_initWithDouble_, + value, ); - return NSMutableArray.fromPointer($ret, retain: false, release: true); + return NSNumber.fromPointer($ret, retain: false, release: true); } - /// insertObject:atIndex: - void insertObject( - objc.ObjCObject anObject, { - required DartNSUInteger atIndex, - }) { + /// initWithFloat: + NSNumber initWithFloat(double value) { final _$$ref = object$.ref; - final _$$ref$1 = anObject.ref; - _objc_msgSend_djsa9o( - _$$ref.pointer, - _sel_insertObject_atIndex_, - _$$ref$1.pointer, - atIndex, + final $ret = _objc_msgSend_et8cuh( + _$$ref.retainAndReturnPointer(), + _sel_initWithFloat_, + value, ); + return NSNumber.fromPointer($ret, retain: false, release: true); } - /// removeLastObject - void removeLastObject() { + /// initWithInt: + NSNumber initWithInt(int value) { final _$$ref = object$.ref; - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_removeLastObject); + final $ret = _objc_msgSend_14hvw5k( + _$$ref.retainAndReturnPointer(), + _sel_initWithInt_, + value, + ); + return NSNumber.fromPointer($ret, retain: false, release: true); } - /// removeObjectAtIndex: - void removeObjectAtIndex(DartNSUInteger index) { + /// initWithInteger: + NSNumber initWithInteger(int value) { final _$$ref = object$.ref; - _objc_msgSend_1i9r4xy(_$$ref.pointer, _sel_removeObjectAtIndex_, index); + objc.checkOsVersionInternal( + 'NSNumber.initWithInteger:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + final $ret = _objc_msgSend_qugqlf( + _$$ref.retainAndReturnPointer(), + _sel_initWithInteger_, + value, + ); + return NSNumber.fromPointer($ret, retain: false, release: true); } - /// replaceObjectAtIndex:withObject: - void replaceObjectAtIndex( - DartNSUInteger index, { - required objc.ObjCObject withObject, - }) { + /// initWithLong: + NSNumber initWithLong(int value) { final _$$ref = object$.ref; - final _$$ref$1 = withObject.ref; - _objc_msgSend_1gypgok( - _$$ref.pointer, - _sel_replaceObjectAtIndex_withObject_, - index, - _$$ref$1.pointer, + final $ret = _objc_msgSend_qugqlf( + _$$ref.retainAndReturnPointer(), + _sel_initWithLong_, + value, ); + return NSNumber.fromPointer($ret, retain: false, release: true); } -} -/// NSMutableArrayCreation -extension NSMutableArrayCreation on NSMutableArray { - /// initWithContentsOfFile: - NSMutableArray? initWithContentsOfFile(NSString path) { + /// initWithLongLong: + NSNumber initWithLongLong(int value) { final _$$ref = object$.ref; - final _$$ref$1 = path.ref; - final $ret = _objc_msgSend_1sotr3r( + final $ret = _objc_msgSend_16f0drb( _$$ref.retainAndReturnPointer(), - _sel_initWithContentsOfFile_, - _$$ref$1.pointer, + _sel_initWithLongLong_, + value, ); - return $ret.address == 0 - ? null - : NSMutableArray.fromPointer($ret, retain: false, release: true); + return NSNumber.fromPointer($ret, retain: false, release: true); } - /// initWithContentsOfURL: - NSMutableArray? initWithContentsOfURL(NSURL url) { + /// initWithShort: + NSNumber initWithShort(int value) { final _$$ref = object$.ref; - final _$$ref$1 = url.ref; - final $ret = _objc_msgSend_1sotr3r( + final $ret = _objc_msgSend_68x6r1( _$$ref.retainAndReturnPointer(), - _sel_initWithContentsOfURL_, - _$$ref$1.pointer, + _sel_initWithShort_, + value, ); - return $ret.address == 0 - ? null - : NSMutableArray.fromPointer($ret, retain: false, release: true); + return NSNumber.fromPointer($ret, retain: false, release: true); } - /// arrayWithContentsOfFile: - static NSMutableArray? arrayWithContentsOfFile(NSString path) { - final _$$ref = path.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSMutableArray, - _sel_arrayWithContentsOfFile_, - _$$ref.pointer, + /// initWithUnsignedChar: + NSNumber initWithUnsignedChar(int value) { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_7uautw( + _$$ref.retainAndReturnPointer(), + _sel_initWithUnsignedChar_, + value, ); - return $ret.address == 0 - ? null - : NSMutableArray.fromPointer($ret, retain: true, release: true); + return NSNumber.fromPointer($ret, retain: false, release: true); } - /// arrayWithContentsOfURL: - static NSMutableArray? arrayWithContentsOfURL(NSURL url) { - final _$$ref = url.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSMutableArray, - _sel_arrayWithContentsOfURL_, - _$$ref.pointer, + /// initWithUnsignedInt: + NSNumber initWithUnsignedInt(int value) { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_degb40( + _$$ref.retainAndReturnPointer(), + _sel_initWithUnsignedInt_, + value, ); - return $ret.address == 0 - ? null - : NSMutableArray.fromPointer($ret, retain: true, release: true); + return NSNumber.fromPointer($ret, retain: false, release: true); } -} -/// NSMutableArrayDiffing -extension NSMutableArrayDiffing on NSMutableArray { - /// applyDifference: - void applyDifference(NSOrderedCollectionDifference difference) { + /// initWithUnsignedInteger: + NSNumber initWithUnsignedInteger(DartNSUInteger value) { final _$$ref = object$.ref; - final _$$ref$1 = difference.ref; objc.checkOsVersionInternal( - 'NSMutableArray.applyDifference:', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), + 'NSNumber.initWithUnsignedInteger:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_applyDifference_, - _$$ref$1.pointer, + final $ret = _objc_msgSend_14hpxwa( + _$$ref.retainAndReturnPointer(), + _sel_initWithUnsignedInteger_, + value, ); + return NSNumber.fromPointer($ret, retain: false, release: true); } -} -/// NSMutableCopying -extension type NSMutableCopying._(objc.ObjCProtocol object$) - implements objc.ObjCProtocol { - /// Constructs a [NSMutableCopying] that points to the same underlying object as [other]. - NSMutableCopying.as(objc.ObjCObject other) : object$ = other; - - /// Constructs a [NSMutableCopying] that wraps the given raw object pointer. - NSMutableCopying.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); + /// initWithUnsignedLong: + NSNumber initWithUnsignedLong(int value) { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_14hpxwa( + _$$ref.retainAndReturnPointer(), + _sel_initWithUnsignedLong_, + value, + ); + return NSNumber.fromPointer($ret, retain: false, release: true); + } - /// Returns whether [obj] is an instance of [NSMutableCopying]. - static bool conformsTo(objc.ObjCObject obj) { - return _objc_msgSend_e3qsqz( - obj.ref.pointer, - _sel_conformsToProtocol_, - _protocol_NSMutableCopying, + /// initWithUnsignedLongLong: + NSNumber initWithUnsignedLongLong(int value) { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_1x2hskc( + _$$ref.retainAndReturnPointer(), + _sel_initWithUnsignedLongLong_, + value, ); + return NSNumber.fromPointer($ret, retain: false, release: true); } -} -extension NSMutableCopying$Methods on NSMutableCopying { - /// mutableCopyWithZone: - objc.ObjCObject mutableCopyWithZone(ffi.Pointer zone) { + /// initWithUnsignedShort: + NSNumber initWithUnsignedShort(int value) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_1cwp428( - _$$ref.pointer, - _sel_mutableCopyWithZone_, - zone, + final $ret = _objc_msgSend_1njucl2( + _$$ref.retainAndReturnPointer(), + _sel_initWithUnsignedShort_, + value, ); - return objc.ObjCObject($ret, retain: false, release: true); + return NSNumber.fromPointer($ret, retain: false, release: true); } -} -interface class NSMutableCopying$Builder { - /// Returns the [objc.Protocol] object for this protocol. - static objc.Protocol get $protocol => - objc.Protocol.fromPointer(_protocol_NSMutableCopying.cast()); + /// intValue + int get intValue { + final _$$ref = object$.ref; + return _objc_msgSend_13yqbb6(_$$ref.pointer, _sel_intValue); + } - /// Builds an object that implements the NSMutableCopying protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - /// - /// If `$keepIsolateAlive` is true, this protocol will keep this isolate - /// alive until it is garbage collected by both Dart and ObjC. - static NSMutableCopying implement({ - required objc.ObjCObject Function(ffi.Pointer) mutableCopyWithZone_, - bool $keepIsolateAlive = true, - }) { - final builder = objc.ObjCProtocolBuilder(debugName: 'NSMutableCopying'); - NSMutableCopying$Builder.mutableCopyWithZone_.implement( - builder, - mutableCopyWithZone_, - ); - builder.addProtocol($protocol); - return NSMutableCopying.as( - builder.build(keepIsolateAlive: $keepIsolateAlive), + /// integerValue + int get integerValue { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSNumber.integerValue', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), ); + return _objc_msgSend_1hz7y9r(_$$ref.pointer, _sel_integerValue); } - /// Adds the implementation of the NSMutableCopying protocol to an existing - /// [objc.ObjCProtocolBuilder]. - /// - /// Note: You cannot call this method after you have called `builder.build`. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, { - required objc.ObjCObject Function(ffi.Pointer) mutableCopyWithZone_, - bool $keepIsolateAlive = true, - }) { - NSMutableCopying$Builder.mutableCopyWithZone_.implement( - builder, - mutableCopyWithZone_, + /// isEqualToNumber: + bool isEqualToNumber(NSNumber number) { + final _$$ref = object$.ref; + final _$$ref$1 = number.ref; + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_isEqualToNumber_, + _$$ref$1.pointer, ); - builder.addProtocol($protocol); } - /// mutableCopyWithZone: - static final mutableCopyWithZone_ = - objc.ObjCProtocolMethod)>( - _protocol_NSMutableCopying, - _sel_mutableCopyWithZone_, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_18nsem0) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSMutableCopying, - _sel_mutableCopyWithZone_, - isRequired: true, - isInstanceMethod: true, - ), - (objc.ObjCObject Function(ffi.Pointer) func) => - ObjCBlock_objcObjCObjectImpl_ffiVoid_NSZone_retained.fromFunction( - (ffi.Pointer _, ffi.Pointer arg1) => func(arg1), - ), - ); -} + /// longLongValue + int get longLongValue { + final _$$ref = object$.ref; + return _objc_msgSend_1k101e3(_$$ref.pointer, _sel_longLongValue); + } -/// NSMutableData -extension type NSMutableData._(objc.ObjCObject object$) - implements objc.ObjCObject, NSData { - /// Constructs a [NSMutableData] that points to the same underlying object as [other]. - NSMutableData.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); + /// longValue + int get longValue { + final _$$ref = object$.ref; + return _objc_msgSend_1hz7y9r(_$$ref.pointer, _sel_longValue); } - /// Constructs a [NSMutableData] that wraps the given raw object pointer. - NSMutableData.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); + /// shortValue + int get shortValue { + final _$$ref = object$.ref; + return _objc_msgSend_1jwityx(_$$ref.pointer, _sel_shortValue); } - /// Returns whether [obj] is an instance of [NSMutableData]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSMutableData, - ); + /// stringValue + NSString get stringValue { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_stringValue); + return NSString.fromPointer($ret, retain: true, release: true); + } - /// alloc - static NSMutableData alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSMutableData, _sel_alloc); - return NSMutableData.fromPointer($ret, retain: false, release: true); + /// unsignedCharValue + int get unsignedCharValue { + final _$$ref = object$.ref; + return _objc_msgSend_1ko4qka(_$$ref.pointer, _sel_unsignedCharValue); } - /// allocWithZone: - static NSMutableData allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSMutableData, - _sel_allocWithZone_, - zone, + /// unsignedIntValue + int get unsignedIntValue { + final _$$ref = object$.ref; + return _objc_msgSend_3pyzne(_$$ref.pointer, _sel_unsignedIntValue); + } + + /// unsignedIntegerValue + DartNSUInteger get unsignedIntegerValue { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSNumber.unsignedIntegerValue', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), ); - return NSMutableData.fromPointer($ret, retain: false, release: true); + return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_unsignedIntegerValue); } - /// data - static NSMutableData data() { - final $ret = _objc_msgSend_151sglz(_class_NSMutableData, _sel_data); - return NSMutableData.fromPointer($ret, retain: true, release: true); + /// unsignedLongLongValue + int get unsignedLongLongValue { + final _$$ref = object$.ref; + return _objc_msgSend_1p4gbjy(_$$ref.pointer, _sel_unsignedLongLongValue); } - /// dataWithBytes:length: - static NSMutableData dataWithBytes( - ffi.Pointer bytes, { - required DartNSUInteger length, - }) { - final $ret = _objc_msgSend_3nbx5e( - _class_NSMutableData, - _sel_dataWithBytes_length_, - bytes, - length, - ); - return NSMutableData.fromPointer($ret, retain: true, release: true); + /// unsignedLongValue + int get unsignedLongValue { + final _$$ref = object$.ref; + return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_unsignedLongValue); } - /// dataWithBytesNoCopy:length: - static NSMutableData dataWithBytesNoCopy( - ffi.Pointer bytes, { - required DartNSUInteger length, - }) { - final $ret = _objc_msgSend_3nbx5e( - _class_NSMutableData, - _sel_dataWithBytesNoCopy_length_, - bytes, - length, - ); - return NSMutableData.fromPointer($ret, retain: true, release: true); + /// unsignedShortValue + int get unsignedShortValue { + final _$$ref = object$.ref; + return _objc_msgSend_ud8gg(_$$ref.pointer, _sel_unsignedShortValue); } +} - /// dataWithBytesNoCopy:length:freeWhenDone: - static NSMutableData dataWithBytesNoCopy$1( - ffi.Pointer bytes, { - required DartNSUInteger length, - required bool freeWhenDone, - }) { - final $ret = _objc_msgSend_161ne8y( - _class_NSMutableData, - _sel_dataWithBytesNoCopy_length_freeWhenDone_, - bytes, - length, - freeWhenDone, +/// NSNumberCreation +extension NSNumberCreation on NSNumber { + /// numberWithBool: + static NSNumber numberWithBool(bool value) { + final $ret = _objc_msgSend_1t6aok9( + _class_NSNumber, + _sel_numberWithBool_, + value, ); - return NSMutableData.fromPointer($ret, retain: true, release: true); + return NSNumber.fromPointer($ret, retain: true, release: true); } - /// dataWithCapacity: - static NSMutableData? dataWithCapacity(DartNSUInteger aNumItems) { - final $ret = _objc_msgSend_14hpxwa( - _class_NSMutableData, - _sel_dataWithCapacity_, - aNumItems, + /// numberWithChar: + static NSNumber numberWithChar(int value) { + final $ret = _objc_msgSend_13mclwd( + _class_NSNumber, + _sel_numberWithChar_, + value, ); - return $ret.address == 0 - ? null - : NSMutableData.fromPointer($ret, retain: true, release: true); + return NSNumber.fromPointer($ret, retain: true, release: true); } - /// dataWithContentsOfFile: - static NSMutableData? dataWithContentsOfFile(NSString path) { - final _$$ref$1 = path.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSMutableData, - _sel_dataWithContentsOfFile_, - _$$ref$1.pointer, + /// numberWithDouble: + static NSNumber numberWithDouble(double value) { + final $ret = _objc_msgSend_oa8mke( + _class_NSNumber, + _sel_numberWithDouble_, + value, ); - return $ret.address == 0 - ? null - : NSMutableData.fromPointer($ret, retain: true, release: true); + return NSNumber.fromPointer($ret, retain: true, release: true); } - /// dataWithContentsOfFile:options:error: - static NSMutableData? dataWithContentsOfFile$1( - NSString path, { - required DartNSUInteger options, - required ffi.Pointer> error, - }) { - final _$$ref$1 = path.ref; - final $ret = _objc_msgSend_8321cp( - _class_NSMutableData, - _sel_dataWithContentsOfFile_options_error_, - _$$ref$1.pointer, - options, - error, + /// numberWithFloat: + static NSNumber numberWithFloat(double value) { + final $ret = _objc_msgSend_et8cuh( + _class_NSNumber, + _sel_numberWithFloat_, + value, ); - return $ret.address == 0 - ? null - : NSMutableData.fromPointer($ret, retain: true, release: true); + return NSNumber.fromPointer($ret, retain: true, release: true); } - /// dataWithContentsOfURL: - static NSMutableData? dataWithContentsOfURL(NSURL url) { - final _$$ref$1 = url.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSMutableData, - _sel_dataWithContentsOfURL_, - _$$ref$1.pointer, + /// numberWithInt: + static NSNumber numberWithInt(int value) { + final $ret = _objc_msgSend_14hvw5k( + _class_NSNumber, + _sel_numberWithInt_, + value, ); - return $ret.address == 0 - ? null - : NSMutableData.fromPointer($ret, retain: true, release: true); + return NSNumber.fromPointer($ret, retain: true, release: true); } - /// dataWithContentsOfURL:options:error: - static NSMutableData? dataWithContentsOfURL$1( - NSURL url, { - required DartNSUInteger options, - required ffi.Pointer> error, - }) { - final _$$ref$1 = url.ref; - final $ret = _objc_msgSend_8321cp( - _class_NSMutableData, - _sel_dataWithContentsOfURL_options_error_, - _$$ref$1.pointer, - options, - error, + /// numberWithInteger: + static NSNumber numberWithInteger(int value) { + objc.checkOsVersionInternal( + 'NSNumber.numberWithInteger:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), ); - return $ret.address == 0 - ? null - : NSMutableData.fromPointer($ret, retain: true, release: true); + final $ret = _objc_msgSend_qugqlf( + _class_NSNumber, + _sel_numberWithInteger_, + value, + ); + return NSNumber.fromPointer($ret, retain: true, release: true); } - /// dataWithData: - static NSMutableData dataWithData(NSData data) { - final _$$ref$1 = data.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSMutableData, - _sel_dataWithData_, - _$$ref$1.pointer, + /// numberWithLong: + static NSNumber numberWithLong(int value) { + final $ret = _objc_msgSend_qugqlf( + _class_NSNumber, + _sel_numberWithLong_, + value, ); - return NSMutableData.fromPointer($ret, retain: true, release: true); + return NSNumber.fromPointer($ret, retain: true, release: true); } - /// dataWithLength: - static NSMutableData? dataWithLength(DartNSUInteger length) { - final $ret = _objc_msgSend_14hpxwa( - _class_NSMutableData, - _sel_dataWithLength_, - length, + /// numberWithLongLong: + static NSNumber numberWithLongLong(int value) { + final $ret = _objc_msgSend_16f0drb( + _class_NSNumber, + _sel_numberWithLongLong_, + value, ); - return $ret.address == 0 - ? null - : NSMutableData.fromPointer($ret, retain: true, release: true); + return NSNumber.fromPointer($ret, retain: true, release: true); } - /// new - static NSMutableData new$() { - final $ret = _objc_msgSend_151sglz(_class_NSMutableData, _sel_new); - return NSMutableData.fromPointer($ret, retain: false, release: true); + /// numberWithShort: + static NSNumber numberWithShort(int value) { + final $ret = _objc_msgSend_68x6r1( + _class_NSNumber, + _sel_numberWithShort_, + value, + ); + return NSNumber.fromPointer($ret, retain: true, release: true); } - /// supportsSecureCoding - static bool getSupportsSecureCoding() { - return _objc_msgSend_91o635( - _class_NSMutableData, - _sel_supportsSecureCoding, + /// numberWithUnsignedChar: + static NSNumber numberWithUnsignedChar(int value) { + final $ret = _objc_msgSend_7uautw( + _class_NSNumber, + _sel_numberWithUnsignedChar_, + value, ); + return NSNumber.fromPointer($ret, retain: true, release: true); } - /// Returns a new instance of NSMutableData constructed with the default `new` method. - NSMutableData() : this.as(new$().object$); -} + /// numberWithUnsignedInt: + static NSNumber numberWithUnsignedInt(int value) { + final $ret = _objc_msgSend_degb40( + _class_NSNumber, + _sel_numberWithUnsignedInt_, + value, + ); + return NSNumber.fromPointer($ret, retain: true, release: true); + } -extension NSMutableData$Methods on NSMutableData { - /// compressedDataUsingAlgorithm:error: - NSMutableData? compressedDataUsingAlgorithm( - NSDataCompressionAlgorithm algorithm, - ) { - final _$$ref$1 = object$.ref; + /// numberWithUnsignedInteger: + static NSNumber numberWithUnsignedInteger(DartNSUInteger value) { objc.checkOsVersionInternal( - 'NSMutableData.compressedDataUsingAlgorithm:error:', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), + 'NSNumber.numberWithUnsignedInteger:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1vnlaqg( - _$$ref$1.pointer, - _sel_compressedDataUsingAlgorithm_error_, - algorithm.value, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSMutableData.fromPointer($ret, retain: true, release: true); - } finally { - pkg_ffi.calloc.free($err); - } + final $ret = _objc_msgSend_14hpxwa( + _class_NSNumber, + _sel_numberWithUnsignedInteger_, + value, + ); + return NSNumber.fromPointer($ret, retain: true, release: true); } - /// decompressedDataUsingAlgorithm:error: - NSMutableData? decompressedDataUsingAlgorithm( - NSDataCompressionAlgorithm algorithm, - ) { - final _$$ref$1 = object$.ref; - objc.checkOsVersionInternal( - 'NSMutableData.decompressedDataUsingAlgorithm:error:', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), + /// numberWithUnsignedLong: + static NSNumber numberWithUnsignedLong(int value) { + final $ret = _objc_msgSend_14hpxwa( + _class_NSNumber, + _sel_numberWithUnsignedLong_, + value, ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1vnlaqg( - _$$ref$1.pointer, - _sel_decompressedDataUsingAlgorithm_error_, - algorithm.value, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSMutableData.fromPointer($ret, retain: true, release: true); - } finally { - pkg_ffi.calloc.free($err); - } + return NSNumber.fromPointer($ret, retain: true, release: true); } - /// init - NSMutableData init() { - final _$$ref$23 = object$.ref; - objc.checkOsVersionInternal( - 'NSMutableData.init', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + /// numberWithUnsignedLongLong: + static NSNumber numberWithUnsignedLongLong(int value) { + final $ret = _objc_msgSend_1x2hskc( + _class_NSNumber, + _sel_numberWithUnsignedLongLong_, + value, ); - final $ret = _objc_msgSend_151sglz( - _$$ref$23.retainAndReturnPointer(), - _sel_init, + return NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// numberWithUnsignedShort: + static NSNumber numberWithUnsignedShort(int value) { + final $ret = _objc_msgSend_1njucl2( + _class_NSNumber, + _sel_numberWithUnsignedShort_, + value, ); - return NSMutableData.fromPointer($ret, retain: false, release: true); + return NSNumber.fromPointer($ret, retain: true, release: true); } +} - /// initWithBase64EncodedData:options: - NSMutableData? initWithBase64EncodedData( - NSData base64Data, { - required DartNSUInteger options, - }) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = base64Data.ref; +/// NSNumberIsBool +extension NSNumberIsBool on NSNumber { + /// isBool + bool get isBool { + final _$$ref = object$.ref; + return _objc_msgSend_91o635(_$$ref.pointer, _sel_isBool); + } +} + +/// NSNumberIsFloat +extension NSNumberIsFloat on NSNumber { + /// isFloat + bool get isFloat { + final _$$ref = object$.ref; + return _objc_msgSend_91o635(_$$ref.pointer, _sel_isFloat); + } +} + +/// NSObject +extension type NSObject._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObjectProtocol { + /// Constructs a [NSObject] that points to the same underlying object as [other]. + NSObject.as(objc.ObjCObject other) : object$ = other { objc.checkOsVersionInternal( - 'NSMutableData.initWithBase64EncodedData:options:', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - final $ret = _objc_msgSend_7kpg7m( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithBase64EncodedData_options_, - _$$ref$3.pointer, - options, + 'NSObject', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - return $ret.address == 0 - ? null - : NSMutableData.fromPointer($ret, retain: false, release: true); + assert(isA(object$)); } - /// initWithBase64EncodedString:options: - NSMutableData? initWithBase64EncodedString( - NSString base64String, { - required DartNSUInteger options, - }) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = base64String.ref; + /// Constructs a [NSObject] that wraps the given raw object pointer. + NSObject.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { objc.checkOsVersionInternal( - 'NSMutableData.initWithBase64EncodedString:options:', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - final $ret = _objc_msgSend_7kpg7m( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithBase64EncodedString_options_, - _$$ref$3.pointer, - options, + 'NSObject', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - return $ret.address == 0 - ? null - : NSMutableData.fromPointer($ret, retain: false, release: true); + assert(isA(object$)); } - /// initWithBytes:length: - NSMutableData initWithBytes( - ffi.Pointer bytes, { - required DartNSUInteger length, - }) { - final _$$ref$1 = object$.ref; - final $ret = _objc_msgSend_3nbx5e( - _$$ref$1.retainAndReturnPointer(), - _sel_initWithBytes_length_, - bytes, - length, - ); - return NSMutableData.fromPointer($ret, retain: false, release: true); + /// Returns whether [obj] is an instance of [NSObject]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSObject, + ); + + /// alloc + static NSObject alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSObject, _sel_alloc); + return NSObject.fromPointer($ret, retain: false, release: true); } - /// initWithBytesNoCopy:length: - NSMutableData initWithBytesNoCopy( - ffi.Pointer bytes, { - required DartNSUInteger length, - }) { - final _$$ref$1 = object$.ref; - final $ret = _objc_msgSend_3nbx5e( - _$$ref$1.retainAndReturnPointer(), - _sel_initWithBytesNoCopy_length_, - bytes, - length, + /// allocWithZone: + static NSObject allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSObject, + _sel_allocWithZone_, + zone, ); - return NSMutableData.fromPointer($ret, retain: false, release: true); + return NSObject.fromPointer($ret, retain: false, release: true); } - /// initWithBytesNoCopy:length:deallocator: - NSMutableData initWithBytesNoCopy$1( - ffi.Pointer bytes, { - required DartNSUInteger length, - objc.ObjCBlock, ffi.UnsignedLong)>? - deallocator, - }) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = deallocator?.ref; + /// class + static objc.ObjCObject class$() { + final $ret = _objc_msgSend_151sglz(_class_NSObject, _sel_class); + return objc.ObjCObject($ret, retain: true, release: true); + } + + /// conformsToProtocol: + static bool conformsToProtocol(Protocol protocol) { + final _$$ref = protocol.ref; objc.checkOsVersionInternal( - 'NSMutableData.initWithBytesNoCopy:length:deallocator:', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), + 'NSObject.conformsToProtocol:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - final $ret = _objc_msgSend_134vhyh( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithBytesNoCopy_length_deallocator_, - bytes, - length, - _$$ref$3?.pointer ?? ffi.nullptr, + return _objc_msgSend_19nvye5( + _class_NSObject, + _sel_conformsToProtocol_, + _$$ref.pointer, ); - return NSMutableData.fromPointer($ret, retain: false, release: true); } - /// initWithBytesNoCopy:length:freeWhenDone: - NSMutableData initWithBytesNoCopy$2( - ffi.Pointer bytes, { - required DartNSUInteger length, - required bool freeWhenDone, - }) { - final _$$ref$1 = object$.ref; - final $ret = _objc_msgSend_161ne8y( - _$$ref$1.retainAndReturnPointer(), - _sel_initWithBytesNoCopy_length_freeWhenDone_, - bytes, - length, - freeWhenDone, + /// copyWithZone: + static objc.ObjCObject copyWithZone(ffi.Pointer zone) { + objc.checkOsVersionInternal( + 'NSObject.copyWithZone:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - return NSMutableData.fromPointer($ret, retain: false, release: true); + final $ret = _objc_msgSend_1cwp428( + _class_NSObject, + _sel_copyWithZone_, + zone, + ); + return objc.ObjCObject($ret, retain: false, release: true); } - /// initWithCapacity: - NSMutableData? initWithCapacity(DartNSUInteger capacity) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_14hpxwa( - _$$ref.retainAndReturnPointer(), - _sel_initWithCapacity_, - capacity, + /// debugDescription + static NSString debugDescription() { + objc.checkOsVersionInternal( + 'NSObject.debugDescription', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - return $ret.address == 0 - ? null - : NSMutableData.fromPointer($ret, retain: false, release: true); + final $ret = _objc_msgSend_151sglz(_class_NSObject, _sel_debugDescription); + return NSString.fromPointer($ret, retain: true, release: true); } - /// initWithCoder: - NSMutableData? initWithCoder(NSCoder coder) { - final _$$ref$22 = object$.ref; - final _$$ref$23 = coder.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref$22.retainAndReturnPointer(), - _sel_initWithCoder_, - _$$ref$23.pointer, + /// description + static NSString description() { + objc.checkOsVersionInternal( + 'NSObject.description', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - return $ret.address == 0 - ? null - : NSMutableData.fromPointer($ret, retain: false, release: true); + final $ret = _objc_msgSend_151sglz(_class_NSObject, _sel_description); + return NSString.fromPointer($ret, retain: true, release: true); } - /// initWithContentsOfFile: - NSMutableData? initWithContentsOfFile(NSString path) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = path.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithContentsOfFile_, - _$$ref$3.pointer, + /// hash + static DartNSUInteger hash() { + objc.checkOsVersionInternal( + 'NSObject.hash', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - return $ret.address == 0 - ? null - : NSMutableData.fromPointer($ret, retain: false, release: true); + return _objc_msgSend_xw2lbc(_class_NSObject, _sel_hash); } - /// initWithContentsOfFile:options:error: - NSMutableData? initWithContentsOfFile$1( - NSString path, { - required DartNSUInteger options, - required ffi.Pointer> error, - }) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = path.ref; - final $ret = _objc_msgSend_8321cp( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithContentsOfFile_options_error_, - _$$ref$3.pointer, - options, - error, + /// initialize + static void initialize() { + objc.checkOsVersionInternal( + 'NSObject.initialize', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - return $ret.address == 0 - ? null - : NSMutableData.fromPointer($ret, retain: false, release: true); + _objc_msgSend_1pl9qdv(_class_NSObject, _sel_initialize); } - /// initWithContentsOfURL: - NSMutableData? initWithContentsOfURL(NSURL url) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = url.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithContentsOfURL_, - _$$ref$3.pointer, + /// instanceMethodForSelector: + static ffi.Pointer> + instanceMethodForSelector(ffi.Pointer aSelector) { + objc.checkOsVersionInternal( + 'NSObject.instanceMethodForSelector:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_13lsk7w( + _class_NSObject, + _sel_instanceMethodForSelector_, + aSelector, ); - return $ret.address == 0 - ? null - : NSMutableData.fromPointer($ret, retain: false, release: true); } - /// initWithContentsOfURL:options:error: - NSMutableData? initWithContentsOfURL$1( - NSURL url, { - required DartNSUInteger options, - required ffi.Pointer> error, - }) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = url.ref; - final $ret = _objc_msgSend_8321cp( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithContentsOfURL_options_error_, - _$$ref$3.pointer, - options, - error, + /// instanceMethodSignatureForSelector: + static NSMethodSignature instanceMethodSignatureForSelector( + ffi.Pointer aSelector, + ) { + final $ret = _objc_msgSend_3ctkt6( + _class_NSObject, + _sel_instanceMethodSignatureForSelector_, + aSelector, ); - return $ret.address == 0 - ? null - : NSMutableData.fromPointer($ret, retain: false, release: true); + return NSMethodSignature.fromPointer($ret, retain: true, release: true); } - /// initWithData: - NSMutableData initWithData(NSData data) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = data.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithData_, - _$$ref$3.pointer, + /// instancesRespondToSelector: + static bool instancesRespondToSelector( + ffi.Pointer aSelector, + ) { + objc.checkOsVersionInternal( + 'NSObject.instancesRespondToSelector:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_1srf6wk( + _class_NSObject, + _sel_instancesRespondToSelector_, + aSelector, ); - return NSMutableData.fromPointer($ret, retain: false, release: true); } - /// initWithLength: - NSMutableData? initWithLength(DartNSUInteger length) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_14hpxwa( - _$$ref.retainAndReturnPointer(), - _sel_initWithLength_, - length, + /// isSubclassOfClass: + static bool isSubclassOfClass(objc.ObjCObject aClass) { + final _$$ref = aClass.ref; + objc.checkOsVersionInternal( + 'NSObject.isSubclassOfClass:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + return _objc_msgSend_19nvye5( + _class_NSObject, + _sel_isSubclassOfClass_, + _$$ref.pointer, ); - return $ret.address == 0 - ? null - : NSMutableData.fromPointer($ret, retain: false, release: true); } - /// length - DartNSUInteger get length { - final _$$ref = object$.ref; - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_length); + /// load + static void load() { + objc.checkOsVersionInternal( + 'NSObject.load', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_1pl9qdv(_class_NSObject, _sel_load); } - /// mutableBytes - ffi.Pointer get mutableBytes { - final _$$ref = object$.ref; - return _objc_msgSend_6ex6p5(_$$ref.pointer, _sel_mutableBytes); + /// mutableCopyWithZone: + static objc.ObjCObject mutableCopyWithZone(ffi.Pointer zone) { + objc.checkOsVersionInternal( + 'NSObject.mutableCopyWithZone:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_1cwp428( + _class_NSObject, + _sel_mutableCopyWithZone_, + zone, + ); + return objc.ObjCObject($ret, retain: false, release: true); } - /// setLength: - set length$1(DartNSUInteger value) { - final _$$ref = object$.ref; - _objc_msgSend_1i9r4xy(_$$ref.pointer, _sel_setLength_, value); + /// new + static NSObject new$() { + final $ret = _objc_msgSend_151sglz(_class_NSObject, _sel_new); + return NSObject.fromPointer($ret, retain: false, release: true); } -} -/// NSMutableDataCompression -extension NSMutableDataCompression on NSMutableData { - /// compressUsingAlgorithm:error: - bool compressUsingAlgorithm(NSDataCompressionAlgorithm algorithm) { - final _$$ref = object$.ref; + /// resolveClassMethod: + static bool resolveClassMethod(ffi.Pointer sel) { objc.checkOsVersionInternal( - 'NSMutableData.compressUsingAlgorithm:error:', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), + 'NSObject.resolveClassMethod:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + return _objc_msgSend_1srf6wk( + _class_NSObject, + _sel_resolveClassMethod_, + sel, ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_15v716q( - _$$ref.pointer, - _sel_compressUsingAlgorithm_error_, - algorithm.value, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret; - } finally { - pkg_ffi.calloc.free($err); - } } - /// decompressUsingAlgorithm:error: - bool decompressUsingAlgorithm(NSDataCompressionAlgorithm algorithm) { - final _$$ref = object$.ref; + /// resolveInstanceMethod: + static bool resolveInstanceMethod(ffi.Pointer sel) { objc.checkOsVersionInternal( - 'NSMutableData.decompressUsingAlgorithm:error:', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), + 'NSObject.resolveInstanceMethod:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + return _objc_msgSend_1srf6wk( + _class_NSObject, + _sel_resolveInstanceMethod_, + sel, ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_15v716q( - _$$ref.pointer, - _sel_decompressUsingAlgorithm_error_, - algorithm.value, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret; - } finally { - pkg_ffi.calloc.free($err); - } - } -} - -/// NSMutableDataCreation -extension NSMutableDataCreation on NSMutableData {} - -/// NSMutableDictionary -extension type NSMutableDictionary._(objc.ObjCObject object$) - implements objc.ObjCObject, NSDictionary { - /// Creates a [NSMutableDictionary] from [other]. - static NSMutableDictionary of(Map other) => - NSMutableDictionary.fromEntries(other.entries); - - /// Creates a [NSMutableDictionary] from [entries]. - static NSMutableDictionary fromEntries( - Iterable> entries, - ) { - final dict = dictionaryWithCapacity(entries.length); - for (final MapEntry(:key, :value) in entries) { - dict.setObject(value, forKey: NSCopying.as(key)); - } - return dict; - } - - /// Constructs a [NSMutableDictionary] that points to the same underlying object as [other]. - NSMutableDictionary.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); } - /// Constructs a [NSMutableDictionary] that wraps the given raw object pointer. - NSMutableDictionary.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); + /// superclass + static objc.ObjCObject superclass() { + objc.checkOsVersionInternal( + 'NSObject.superclass', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz(_class_NSObject, _sel_superclass); + return objc.ObjCObject($ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSMutableDictionary]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSMutableDictionary, - ); - - /// alloc - static NSMutableDictionary alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSMutableDictionary, _sel_alloc); - return NSMutableDictionary.fromPointer($ret, retain: false, release: true); - } + /// Returns a new instance of NSObject constructed with the default `new` method. + NSObject() : this.as(new$().object$); +} - /// allocWithZone: - static NSMutableDictionary allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSMutableDictionary, - _sel_allocWithZone_, - zone, +extension NSObject$Methods on NSObject { + /// copy + objc.ObjCObject copy() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSObject.copy', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - return NSMutableDictionary.fromPointer($ret, retain: false, release: true); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_copy); + return objc.ObjCObject($ret, retain: false, release: true); } - /// dictionary - static NSMutableDictionary dictionary() { - final $ret = _objc_msgSend_151sglz( - _class_NSMutableDictionary, - _sel_dictionary, - ); - return NSMutableDictionary.fromPointer($ret, retain: true, release: true); + /// dealloc + void dealloc() { + final _$$ref = object$.ref; + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_dealloc); } - /// dictionaryWithCapacity: - static NSMutableDictionary dictionaryWithCapacity(DartNSUInteger numItems) { - final $ret = _objc_msgSend_14hpxwa( - _class_NSMutableDictionary, - _sel_dictionaryWithCapacity_, - numItems, + /// doesNotRecognizeSelector: + void doesNotRecognizeSelector(ffi.Pointer aSelector) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSObject.doesNotRecognizeSelector:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + _objc_msgSend_1d9e4oe( + _$$ref.pointer, + _sel_doesNotRecognizeSelector_, + aSelector, ); - return NSMutableDictionary.fromPointer($ret, retain: true, release: true); } - /// dictionaryWithDictionary: - static NSMutableDictionary dictionaryWithDictionary(NSDictionary dict) { - final _$$ref$1 = dict.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSMutableDictionary, - _sel_dictionaryWithDictionary_, + /// forwardInvocation: + void forwardInvocation(NSInvocation anInvocation) { + final _$$ref = object$.ref; + final _$$ref$1 = anInvocation.ref; + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_forwardInvocation_, _$$ref$1.pointer, ); - return NSMutableDictionary.fromPointer($ret, retain: true, release: true); } - /// dictionaryWithObject:forKey: - static NSMutableDictionary dictionaryWithObject( - objc.ObjCObject object, { - required NSCopying forKey, - }) { - final _$$ref$2 = object.ref; - final _$$ref$3 = forKey.ref; - final $ret = _objc_msgSend_15qeuct( - _class_NSMutableDictionary, - _sel_dictionaryWithObject_forKey_, - _$$ref$2.pointer, - _$$ref$3.pointer, + /// forwardingTargetForSelector: + objc.ObjCObject forwardingTargetForSelector( + ffi.Pointer aSelector, + ) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSObject.forwardingTargetForSelector:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), ); - return NSMutableDictionary.fromPointer($ret, retain: true, release: true); - } - - /// dictionaryWithObjects:forKeys: - static NSMutableDictionary dictionaryWithObjects( - NSArray objects, { - required NSArray forKeys, - }) { - final _$$ref$2 = objects.ref; - final _$$ref$3 = forKeys.ref; - final $ret = _objc_msgSend_15qeuct( - _class_NSMutableDictionary, - _sel_dictionaryWithObjects_forKeys_, - _$$ref$2.pointer, - _$$ref$3.pointer, + final $ret = _objc_msgSend_3ctkt6( + _$$ref.pointer, + _sel_forwardingTargetForSelector_, + aSelector, ); - return NSMutableDictionary.fromPointer($ret, retain: true, release: true); + return objc.ObjCObject($ret, retain: true, release: true); } - /// dictionaryWithObjects:forKeys:count: - static NSMutableDictionary dictionaryWithObjects$1( - ffi.Pointer> objects, { - required ffi.Pointer> forKeys, - required DartNSUInteger count, - }) { - final $ret = _objc_msgSend_1dydpdi( - _class_NSMutableDictionary, - _sel_dictionaryWithObjects_forKeys_count_, - objects, - forKeys, - count, + /// init + NSObject init() { + final _$$ref$31 = object$.ref; + objc.checkOsVersionInternal( + 'NSObject.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - return NSMutableDictionary.fromPointer($ret, retain: true, release: true); + final $ret = _objc_msgSend_151sglz( + _$$ref$31.retainAndReturnPointer(), + _sel_init, + ); + return NSObject.fromPointer($ret, retain: false, release: true); } - /// dictionaryWithObjectsAndKeys: - static NSMutableDictionary dictionaryWithObjectsAndKeys( - objc.ObjCObject firstObject, - ) { - final _$$ref$1 = firstObject.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSMutableDictionary, - _sel_dictionaryWithObjectsAndKeys_, + /// isEqual: + bool isEqual(objc.ObjCObject object) { + final _$$ref = object$.ref; + final _$$ref$1 = object.ref; + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_isEqual_, _$$ref$1.pointer, ); - return NSMutableDictionary.fromPointer($ret, retain: true, release: true); } - /// new - static NSMutableDictionary new$() { - final $ret = _objc_msgSend_151sglz(_class_NSMutableDictionary, _sel_new); - return NSMutableDictionary.fromPointer($ret, retain: false, release: true); + /// isKindOfClass: + bool isKindOfClass(objc.ObjCObject aClass) { + final _$$ref = object$.ref; + final _$$ref$1 = aClass.ref; + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_isKindOfClass_, + _$$ref$1.pointer, + ); } - /// supportsSecureCoding - static bool getSupportsSecureCoding() { - return _objc_msgSend_91o635( - _class_NSMutableDictionary, - _sel_supportsSecureCoding, + /// isMemberOfClass: + bool isMemberOfClass(objc.ObjCObject aClass) { + final _$$ref = object$.ref; + final _$$ref$1 = aClass.ref; + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_isMemberOfClass_, + _$$ref$1.pointer, ); } - /// Returns a new instance of NSMutableDictionary constructed with the default `new` method. - NSMutableDictionary() : this.as(new$().object$); -} + /// isProxy + bool get isProxy { + final _$$ref = object$.ref; + return _objc_msgSend_91o635(_$$ref.pointer, _sel_isProxy); + } -extension NSMutableDictionary$Methods on NSMutableDictionary { - /// init - NSMutableDictionary init() { - final _$$ref$24 = object$.ref; + /// methodForSelector: + ffi.Pointer> methodForSelector( + ffi.Pointer aSelector, + ) { + final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSMutableDictionary.init', + 'NSObject.methodForSelector:', iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); - final $ret = _objc_msgSend_151sglz( - _$$ref$24.retainAndReturnPointer(), - _sel_init, + return _objc_msgSend_13lsk7w( + _$$ref.pointer, + _sel_methodForSelector_, + aSelector, ); - return NSMutableDictionary.fromPointer($ret, retain: false, release: true); } - /// initWithCapacity: - NSMutableDictionary initWithCapacity(DartNSUInteger numItems) { + /// methodSignatureForSelector: + NSMethodSignature methodSignatureForSelector( + ffi.Pointer aSelector, + ) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_14hpxwa( - _$$ref.retainAndReturnPointer(), - _sel_initWithCapacity_, - numItems, + final $ret = _objc_msgSend_3ctkt6( + _$$ref.pointer, + _sel_methodSignatureForSelector_, + aSelector, ); - return NSMutableDictionary.fromPointer($ret, retain: false, release: true); + return NSMethodSignature.fromPointer($ret, retain: true, release: true); } - /// initWithCoder: - NSMutableDictionary? initWithCoder(NSCoder coder) { - final _$$ref$24 = object$.ref; - final _$$ref$25 = coder.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref$24.retainAndReturnPointer(), - _sel_initWithCoder_, - _$$ref$25.pointer, + /// mutableCopy + objc.ObjCObject mutableCopy() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSObject.mutableCopy', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - return $ret.address == 0 - ? null - : NSMutableDictionary.fromPointer($ret, retain: false, release: true); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_mutableCopy); + return objc.ObjCObject($ret, retain: false, release: true); } - /// initWithDictionary: - NSMutableDictionary initWithDictionary(NSDictionary otherDictionary) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = otherDictionary.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithDictionary_, - _$$ref$3.pointer, + /// performSelector: + objc.ObjCObject performSelector(ffi.Pointer aSelector) { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_3ctkt6( + _$$ref.pointer, + _sel_performSelector_, + aSelector, ); - return NSMutableDictionary.fromPointer($ret, retain: false, release: true); + return objc.ObjCObject($ret, retain: true, release: true); } - /// initWithDictionary:copyItems: - NSMutableDictionary initWithDictionary$1( - NSDictionary otherDictionary, { - required bool copyItems, + /// performSelector:withObject: + objc.ObjCObject performSelector$1( + ffi.Pointer aSelector, { + required objc.ObjCObject withObject, }) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = otherDictionary.ref; - final $ret = _objc_msgSend_17amj0z( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithDictionary_copyItems_, - _$$ref$3.pointer, - copyItems, + final _$$ref = object$.ref; + final _$$ref$1 = withObject.ref; + final $ret = _objc_msgSend_gx50so( + _$$ref.pointer, + _sel_performSelector_withObject_, + aSelector, + _$$ref$1.pointer, ); - return NSMutableDictionary.fromPointer($ret, retain: false, release: true); + return objc.ObjCObject($ret, retain: true, release: true); } - /// initWithObjects:forKeys: - NSMutableDictionary initWithObjects( - NSArray objects, { - required NSArray forKeys, + /// performSelector:withObject:withObject: + objc.ObjCObject performSelector$2( + ffi.Pointer aSelector, { + required objc.ObjCObject withObject, + required objc.ObjCObject withObject$1, }) { - final _$$ref$3 = object$.ref; - final _$$ref$4 = objects.ref; - final _$$ref$5 = forKeys.ref; - final $ret = _objc_msgSend_15qeuct( - _$$ref$3.retainAndReturnPointer(), - _sel_initWithObjects_forKeys_, - _$$ref$4.pointer, - _$$ref$5.pointer, + final _$$ref = object$.ref; + final _$$ref$1 = withObject.ref; + final _$$ref$2 = withObject$1.ref; + final $ret = _objc_msgSend_cfx8ce( + _$$ref.pointer, + _sel_performSelector_withObject_withObject_, + aSelector, + _$$ref$1.pointer, + _$$ref$2.pointer, ); - return NSMutableDictionary.fromPointer($ret, retain: false, release: true); + return objc.ObjCObject($ret, retain: true, release: true); } - /// initWithObjects:forKeys:count: - NSMutableDictionary initWithObjects$1( - ffi.Pointer> objects, { - required ffi.Pointer> forKeys, - required DartNSUInteger count, - }) { - final _$$ref$1 = object$.ref; - final $ret = _objc_msgSend_1dydpdi( - _$$ref$1.retainAndReturnPointer(), - _sel_initWithObjects_forKeys_count_, - objects, - forKeys, - count, - ); - return NSMutableDictionary.fromPointer($ret, retain: false, release: true); - } - - /// initWithObjectsAndKeys: - NSMutableDictionary initWithObjectsAndKeys(objc.ObjCObject firstObject) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = firstObject.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithObjectsAndKeys_, - _$$ref$3.pointer, - ); - return NSMutableDictionary.fromPointer($ret, retain: false, release: true); - } - - /// removeObjectForKey: - void removeObjectForKey(objc.ObjCObject aKey) { - final _$$ref = object$.ref; - final _$$ref$1 = aKey.ref; - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_removeObjectForKey_, - _$$ref$1.pointer, - ); - } - - /// setObject:forKey: - void setObject(objc.ObjCObject anObject, {required NSCopying forKey}) { - final _$$ref = object$.ref; - final _$$ref$1 = anObject.ref; - final _$$ref$2 = forKey.ref; - _objc_msgSend_pfv6jd( - _$$ref.pointer, - _sel_setObject_forKey_, - _$$ref$1.pointer, - _$$ref$2.pointer, - ); - } -} - -/// NSMutableDictionaryCreation -extension NSMutableDictionaryCreation on NSMutableDictionary { - /// initWithContentsOfFile: - NSMutableDictionary? initWithContentsOfFile(NSString path) { - final _$$ref = object$.ref; - final _$$ref$1 = path.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref.retainAndReturnPointer(), - _sel_initWithContentsOfFile_, - _$$ref$1.pointer, - ); - return $ret.address == 0 - ? null - : NSMutableDictionary.fromPointer($ret, retain: false, release: true); - } - - /// initWithContentsOfURL: - NSMutableDictionary? initWithContentsOfURL(NSURL url) { + /// zone + ffi.Pointer zone() { final _$$ref = object$.ref; - final _$$ref$1 = url.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref.retainAndReturnPointer(), - _sel_initWithContentsOfURL_, - _$$ref$1.pointer, - ); - return $ret.address == 0 - ? null - : NSMutableDictionary.fromPointer($ret, retain: false, release: true); - } - - /// dictionaryWithContentsOfFile: - static NSMutableDictionary? dictionaryWithContentsOfFile(NSString path) { - final _$$ref = path.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSMutableDictionary, - _sel_dictionaryWithContentsOfFile_, - _$$ref.pointer, - ); - return $ret.address == 0 - ? null - : NSMutableDictionary.fromPointer($ret, retain: true, release: true); - } - - /// dictionaryWithContentsOfURL: - static NSMutableDictionary? dictionaryWithContentsOfURL(NSURL url) { - final _$$ref = url.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSMutableDictionary, - _sel_dictionaryWithContentsOfURL_, - _$$ref.pointer, - ); - return $ret.address == 0 - ? null - : NSMutableDictionary.fromPointer($ret, retain: true, release: true); + return _objc_msgSend_sz90oi(_$$ref.pointer, _sel_zone); } } -/// NSMutableIndexSet -extension type NSMutableIndexSet._(objc.ObjCObject object$) - implements objc.ObjCObject, NSIndexSet { - /// Constructs a [NSMutableIndexSet] that points to the same underlying object as [other]. - NSMutableIndexSet.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); - } +/// NSObject +extension type NSObjectProtocol._(objc.ObjCProtocol object$) + implements objc.ObjCProtocol { + /// Constructs a [NSObjectProtocol] that points to the same underlying object as [other]. + NSObjectProtocol.as(objc.ObjCObject other) : object$ = other; - /// Constructs a [NSMutableIndexSet] that wraps the given raw object pointer. - NSMutableIndexSet.fromPointer( + /// Constructs a [NSObjectProtocol] that wraps the given raw object pointer. + NSObjectProtocol.fromPointer( ffi.Pointer other, { bool retain = false, bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); - } - - /// Returns whether [obj] is an instance of [NSMutableIndexSet]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSMutableIndexSet, - ); - - /// alloc - static NSMutableIndexSet alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSMutableIndexSet, _sel_alloc); - return NSMutableIndexSet.fromPointer($ret, retain: false, release: true); - } - - /// allocWithZone: - static NSMutableIndexSet allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSMutableIndexSet, - _sel_allocWithZone_, - zone, - ); - return NSMutableIndexSet.fromPointer($ret, retain: false, release: true); - } - - /// indexSet - static NSMutableIndexSet indexSet() { - final $ret = _objc_msgSend_151sglz(_class_NSMutableIndexSet, _sel_indexSet); - return NSMutableIndexSet.fromPointer($ret, retain: true, release: true); - } + }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); - /// indexSetWithIndex: - static NSMutableIndexSet indexSetWithIndex(DartNSUInteger value) { - final $ret = _objc_msgSend_14hpxwa( - _class_NSMutableIndexSet, - _sel_indexSetWithIndex_, - value, + /// Returns whether [obj] is an instance of [NSObjectProtocol]. + static bool conformsTo(objc.ObjCObject obj) { + return _objc_msgSend_e3qsqz( + obj.ref.pointer, + _sel_conformsToProtocol_, + _protocol_NSObject, ); - return NSMutableIndexSet.fromPointer($ret, retain: true, release: true); } +} - /// indexSetWithIndexesInRange: - static NSMutableIndexSet indexSetWithIndexesInRange(NSRange range) { - final $ret = _objc_msgSend_1k1o1s7( - _class_NSMutableIndexSet, - _sel_indexSetWithIndexesInRange_, - range, - ); - return NSMutableIndexSet.fromPointer($ret, retain: true, release: true); +extension NSObjectProtocol$Methods on NSObjectProtocol { + /// autorelease + NSObjectProtocol autorelease() { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_autorelease); + return NSObjectProtocol.fromPointer($ret, retain: true, release: true); } - /// new - static NSMutableIndexSet new$() { - final $ret = _objc_msgSend_151sglz(_class_NSMutableIndexSet, _sel_new); - return NSMutableIndexSet.fromPointer($ret, retain: false, release: true); + /// class + objc.ObjCObject class$() { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_class); + return objc.ObjCObject($ret, retain: true, release: true); } - /// supportsSecureCoding - static bool getSupportsSecureCoding() { - return _objc_msgSend_91o635( - _class_NSMutableIndexSet, - _sel_supportsSecureCoding, + /// conformsToProtocol: + bool conformsToProtocol(Protocol aProtocol) { + final _$$ref = object$.ref; + final _$$ref$1 = aProtocol.ref; + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_conformsToProtocol_, + _$$ref$1.pointer, ); } - /// Returns a new instance of NSMutableIndexSet constructed with the default `new` method. - NSMutableIndexSet() : this.as(new$().object$); -} - -extension NSMutableIndexSet$Methods on NSMutableIndexSet { - /// addIndex: - void addIndex(DartNSUInteger value) { + /// debugDescription + NSString get debugDescription { final _$$ref = object$.ref; - _objc_msgSend_1i9r4xy(_$$ref.pointer, _sel_addIndex_, value); + if (!objc.respondsToSelector(_$$ref.pointer, _sel_debugDescription)) { + throw objc.UnimplementedOptionalMethodException( + 'NSObject', + 'debugDescription', + ); + } + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_debugDescription); + return NSString.fromPointer($ret, retain: true, release: true); } - /// addIndexes: - void addIndexes(NSIndexSet indexSet) { + /// description + NSString get description { final _$$ref = object$.ref; - final _$$ref$1 = indexSet.ref; - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_addIndexes_, _$$ref$1.pointer); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_description); + return NSString.fromPointer($ret, retain: true, release: true); } - /// addIndexesInRange: - void addIndexesInRange(NSRange range) { + /// hash + DartNSUInteger get hash { final _$$ref = object$.ref; - _objc_msgSend_1e3pm0z(_$$ref.pointer, _sel_addIndexesInRange_, range); + return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_hash); } - /// init - NSMutableIndexSet init() { - final _$$ref$25 = object$.ref; - objc.checkOsVersionInternal( - 'NSMutableIndexSet.init', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + /// isEqual: + bool isEqual(objc.ObjCObject object) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = object.ref; + return _objc_msgSend_19nvye5( + _$$ref$2.pointer, + _sel_isEqual_, + _$$ref$3.pointer, ); - final $ret = _objc_msgSend_151sglz( - _$$ref$25.retainAndReturnPointer(), - _sel_init, + } + + /// isKindOfClass: + bool isKindOfClass(objc.ObjCObject aClass) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = aClass.ref; + return _objc_msgSend_19nvye5( + _$$ref$2.pointer, + _sel_isKindOfClass_, + _$$ref$3.pointer, ); - return NSMutableIndexSet.fromPointer($ret, retain: false, release: true); } - /// initWithCoder: - NSMutableIndexSet? initWithCoder(NSCoder coder) { - final _$$ref$26 = object$.ref; - final _$$ref$27 = coder.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref$26.retainAndReturnPointer(), - _sel_initWithCoder_, - _$$ref$27.pointer, + /// isMemberOfClass: + bool isMemberOfClass(objc.ObjCObject aClass) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = aClass.ref; + return _objc_msgSend_19nvye5( + _$$ref$2.pointer, + _sel_isMemberOfClass_, + _$$ref$3.pointer, ); - return $ret.address == 0 - ? null - : NSMutableIndexSet.fromPointer($ret, retain: false, release: true); } - /// initWithIndex: - NSMutableIndexSet initWithIndex(DartNSUInteger value) { + /// isProxy + bool get isProxy { final _$$ref$1 = object$.ref; - final $ret = _objc_msgSend_14hpxwa( - _$$ref$1.retainAndReturnPointer(), - _sel_initWithIndex_, - value, + return _objc_msgSend_91o635(_$$ref$1.pointer, _sel_isProxy); + } + + /// performSelector: + objc.ObjCObject performSelector(ffi.Pointer aSelector) { + final _$$ref$1 = object$.ref; + final $ret = _objc_msgSend_3ctkt6( + _$$ref$1.pointer, + _sel_performSelector_, + aSelector, ); - return NSMutableIndexSet.fromPointer($ret, retain: false, release: true); + return objc.ObjCObject($ret, retain: true, release: true); } - /// initWithIndexSet: - NSMutableIndexSet initWithIndexSet(NSIndexSet indexSet) { + /// performSelector:withObject: + objc.ObjCObject performSelector$1( + ffi.Pointer aSelector, { + required objc.ObjCObject withObject, + }) { final _$$ref$2 = object$.ref; - final _$$ref$3 = indexSet.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithIndexSet_, + final _$$ref$3 = withObject.ref; + final $ret = _objc_msgSend_gx50so( + _$$ref$2.pointer, + _sel_performSelector_withObject_, + aSelector, _$$ref$3.pointer, ); - return NSMutableIndexSet.fromPointer($ret, retain: false, release: true); + return objc.ObjCObject($ret, retain: true, release: true); } - /// initWithIndexesInRange: - NSMutableIndexSet initWithIndexesInRange(NSRange range) { - final _$$ref$1 = object$.ref; - final $ret = _objc_msgSend_1k1o1s7( - _$$ref$1.retainAndReturnPointer(), - _sel_initWithIndexesInRange_, - range, + /// performSelector:withObject:withObject: + objc.ObjCObject performSelector$2( + ffi.Pointer aSelector, { + required objc.ObjCObject withObject, + required objc.ObjCObject withObject$1, + }) { + final _$$ref$3 = object$.ref; + final _$$ref$4 = withObject.ref; + final _$$ref$5 = withObject$1.ref; + final $ret = _objc_msgSend_cfx8ce( + _$$ref$3.pointer, + _sel_performSelector_withObject_withObject_, + aSelector, + _$$ref$4.pointer, + _$$ref$5.pointer, ); - return NSMutableIndexSet.fromPointer($ret, retain: false, release: true); + return objc.ObjCObject($ret, retain: true, release: true); } - /// removeAllIndexes - void removeAllIndexes() { + /// release + void release() { final _$$ref = object$.ref; - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_removeAllIndexes); + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_release); } - /// removeIndex: - void removeIndex(DartNSUInteger value) { + /// respondsToSelector: + bool respondsToSelector(ffi.Pointer aSelector) { final _$$ref = object$.ref; - _objc_msgSend_1i9r4xy(_$$ref.pointer, _sel_removeIndex_, value); + return _objc_msgSend_1srf6wk( + _$$ref.pointer, + _sel_respondsToSelector_, + aSelector, + ); } - /// removeIndexes: - void removeIndexes(NSIndexSet indexSet) { + /// retain + NSObjectProtocol retain() { final _$$ref = object$.ref; - final _$$ref$1 = indexSet.ref; - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_removeIndexes_, _$$ref$1.pointer); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_retain); + return NSObjectProtocol.fromPointer($ret, retain: true, release: true); } - /// removeIndexesInRange: - void removeIndexesInRange(NSRange range) { + /// retainCount + DartNSUInteger retainCount() { final _$$ref = object$.ref; - _objc_msgSend_1e3pm0z(_$$ref.pointer, _sel_removeIndexesInRange_, range); + return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_retainCount); } - /// shiftIndexesStartingAtIndex:by: - void shiftIndexesStartingAtIndex(DartNSUInteger index, {required int by}) { + /// self + NSObjectProtocol self() { final _$$ref = object$.ref; - _objc_msgSend_otx1t4( - _$$ref.pointer, - _sel_shiftIndexesStartingAtIndex_by_, - index, - by, - ); - } -} - -/// NSMutableOrderedSet -extension type NSMutableOrderedSet._(objc.ObjCObject object$) - implements objc.ObjCObject, NSOrderedSet { - /// Constructs a [NSMutableOrderedSet] that points to the same underlying object as [other]. - NSMutableOrderedSet.as(objc.ObjCObject other) : object$ = other { - objc.checkOsVersionInternal( - 'NSMutableOrderedSet', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - assert(isA(object$)); - } - - /// Constructs a [NSMutableOrderedSet] that wraps the given raw object pointer. - NSMutableOrderedSet.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - objc.checkOsVersionInternal( - 'NSMutableOrderedSet', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - assert(isA(object$)); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_self); + return NSObjectProtocol.fromPointer($ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSMutableOrderedSet]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSMutableOrderedSet, - ); - - /// alloc - static NSMutableOrderedSet alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSMutableOrderedSet, _sel_alloc); - return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); + /// superclass + objc.ObjCObject get superclass { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_superclass); + return objc.ObjCObject($ret, retain: true, release: true); } - /// allocWithZone: - static NSMutableOrderedSet allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSMutableOrderedSet, - _sel_allocWithZone_, - zone, - ); - return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); + /// zone + ffi.Pointer zone() { + final _$$ref$1 = object$.ref; + return _objc_msgSend_sz90oi(_$$ref$1.pointer, _sel_zone); } +} - /// new - static NSMutableOrderedSet new$() { - final $ret = _objc_msgSend_151sglz(_class_NSMutableOrderedSet, _sel_new); - return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); - } +interface class NSObjectProtocol$Builder { + /// Returns the [objc.Protocol] object for this protocol. + static objc.Protocol get $protocol => + objc.Protocol.fromPointer(_protocol_NSObject.cast()); - /// orderedSet - static NSMutableOrderedSet orderedSet() { - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.orderedSet', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + /// Builds an object that implements the NSObject protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + /// + /// If `$keepIsolateAlive` is true, this protocol will keep this isolate + /// alive until it is garbage collected by both Dart and ObjC. + static NSObjectProtocol implement({ + required objc.ObjCObject Function() autorelease, + required objc.ObjCObject Function() class$, + required bool Function(Protocol) conformsToProtocol_, + NSString Function()? debugDescription, + required NSString Function() description, + required DartNSUInteger Function() hash, + required bool Function(objc.ObjCObject) isEqual_, + required bool Function(objc.ObjCObject) isKindOfClass_, + required bool Function(objc.ObjCObject) isMemberOfClass_, + required bool Function() isProxy, + required objc.ObjCObject Function(ffi.Pointer) + performSelector_, + required objc.ObjCObject Function( + ffi.Pointer, + objc.ObjCObject, + ) + performSelector_withObject_, + required objc.ObjCObject Function( + ffi.Pointer, + objc.ObjCObject, + objc.ObjCObject, + ) + performSelector_withObject_withObject_, + required void Function() release, + required bool Function(ffi.Pointer) respondsToSelector_, + required objc.ObjCObject Function() retain, + required DartNSUInteger Function() retainCount, + required objc.ObjCObject Function() self, + required objc.ObjCObject Function() superclass, + required ffi.Pointer Function() zone, + bool $keepIsolateAlive = true, + }) { + final builder = objc.ObjCProtocolBuilder(debugName: 'NSObject'); + NSObjectProtocol$Builder.autorelease.implement(builder, autorelease); + NSObjectProtocol$Builder.class$.implement(builder, class$); + NSObjectProtocol$Builder.conformsToProtocol_.implement( + builder, + conformsToProtocol_, ); - final $ret = _objc_msgSend_151sglz( - _class_NSMutableOrderedSet, - _sel_orderedSet, + NSObjectProtocol$Builder.debugDescription.implement( + builder, + debugDescription, ); - return NSMutableOrderedSet.fromPointer($ret, retain: true, release: true); - } - - /// orderedSetWithArray: - static NSMutableOrderedSet orderedSetWithArray(NSArray array) { - final _$$ref = array.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.orderedSetWithArray:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _class_NSMutableOrderedSet, - _sel_orderedSetWithArray_, - _$$ref.pointer, - ); - return NSMutableOrderedSet.fromPointer($ret, retain: true, release: true); - } - - /// orderedSetWithArray:range:copyItems: - static NSMutableOrderedSet orderedSetWithArray$1( - NSArray array, { - required NSRange range, - required bool copyItems, - }) { - final _$$ref = array.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.orderedSetWithArray:range:copyItems:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_w9bq5x( - _class_NSMutableOrderedSet, - _sel_orderedSetWithArray_range_copyItems_, - _$$ref.pointer, - range, - copyItems, - ); - return NSMutableOrderedSet.fromPointer($ret, retain: true, release: true); - } - - /// orderedSetWithCapacity: - static NSMutableOrderedSet orderedSetWithCapacity(DartNSUInteger numItems) { - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.orderedSetWithCapacity:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + NSObjectProtocol$Builder.description.implement(builder, description); + NSObjectProtocol$Builder.hash.implement(builder, hash); + NSObjectProtocol$Builder.isEqual_.implement(builder, isEqual_); + NSObjectProtocol$Builder.isKindOfClass_.implement(builder, isKindOfClass_); + NSObjectProtocol$Builder.isMemberOfClass_.implement( + builder, + isMemberOfClass_, ); - final $ret = _objc_msgSend_14hpxwa( - _class_NSMutableOrderedSet, - _sel_orderedSetWithCapacity_, - numItems, + NSObjectProtocol$Builder.isProxy.implement(builder, isProxy); + NSObjectProtocol$Builder.performSelector_.implement( + builder, + performSelector_, ); - return NSMutableOrderedSet.fromPointer($ret, retain: true, release: true); - } - - /// orderedSetWithObject: - static NSMutableOrderedSet orderedSetWithObject(objc.ObjCObject object) { - final _$$ref = object.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.orderedSetWithObject:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + NSObjectProtocol$Builder.performSelector_withObject_.implement( + builder, + performSelector_withObject_, ); - final $ret = _objc_msgSend_1sotr3r( - _class_NSMutableOrderedSet, - _sel_orderedSetWithObject_, - _$$ref.pointer, + NSObjectProtocol$Builder.performSelector_withObject_withObject_.implement( + builder, + performSelector_withObject_withObject_, ); - return NSMutableOrderedSet.fromPointer($ret, retain: true, release: true); - } - - /// orderedSetWithObjects: - static NSMutableOrderedSet orderedSetWithObjects(objc.ObjCObject firstObj) { - final _$$ref = firstObj.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.orderedSetWithObjects:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + NSObjectProtocol$Builder.release.implement(builder, release); + NSObjectProtocol$Builder.respondsToSelector_.implement( + builder, + respondsToSelector_, ); - final $ret = _objc_msgSend_1sotr3r( - _class_NSMutableOrderedSet, - _sel_orderedSetWithObjects_, - _$$ref.pointer, + NSObjectProtocol$Builder.retain.implement(builder, retain); + NSObjectProtocol$Builder.retainCount.implement(builder, retainCount); + NSObjectProtocol$Builder.self.implement(builder, self); + NSObjectProtocol$Builder.superclass.implement(builder, superclass); + NSObjectProtocol$Builder.zone.implement(builder, zone); + builder.addProtocol($protocol); + return NSObjectProtocol.as( + builder.build(keepIsolateAlive: $keepIsolateAlive), ); - return NSMutableOrderedSet.fromPointer($ret, retain: true, release: true); } - /// orderedSetWithObjects:count: - static NSMutableOrderedSet orderedSetWithObjects$1( - ffi.Pointer> objects, { - required DartNSUInteger count, + /// Adds the implementation of the NSObject protocol to an existing + /// [objc.ObjCProtocolBuilder]. + /// + /// Note: You cannot call this method after you have called `builder.build`. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, { + required objc.ObjCObject Function() autorelease, + required objc.ObjCObject Function() class$, + required bool Function(Protocol) conformsToProtocol_, + NSString Function()? debugDescription, + required NSString Function() description, + required DartNSUInteger Function() hash, + required bool Function(objc.ObjCObject) isEqual_, + required bool Function(objc.ObjCObject) isKindOfClass_, + required bool Function(objc.ObjCObject) isMemberOfClass_, + required bool Function() isProxy, + required objc.ObjCObject Function(ffi.Pointer) + performSelector_, + required objc.ObjCObject Function( + ffi.Pointer, + objc.ObjCObject, + ) + performSelector_withObject_, + required objc.ObjCObject Function( + ffi.Pointer, + objc.ObjCObject, + objc.ObjCObject, + ) + performSelector_withObject_withObject_, + required void Function() release, + required bool Function(ffi.Pointer) respondsToSelector_, + required objc.ObjCObject Function() retain, + required DartNSUInteger Function() retainCount, + required objc.ObjCObject Function() self, + required objc.ObjCObject Function() superclass, + required ffi.Pointer Function() zone, + bool $keepIsolateAlive = true, }) { - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.orderedSetWithObjects:count:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_zmbtbd( - _class_NSMutableOrderedSet, - _sel_orderedSetWithObjects_count_, - objects, - count, + NSObjectProtocol$Builder.autorelease.implement(builder, autorelease); + NSObjectProtocol$Builder.class$.implement(builder, class$); + NSObjectProtocol$Builder.conformsToProtocol_.implement( + builder, + conformsToProtocol_, ); - return NSMutableOrderedSet.fromPointer($ret, retain: true, release: true); - } - - /// orderedSetWithOrderedSet: - static NSMutableOrderedSet orderedSetWithOrderedSet(NSOrderedSet set) { - final _$$ref = set.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.orderedSetWithOrderedSet:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + NSObjectProtocol$Builder.debugDescription.implement( + builder, + debugDescription, ); - final $ret = _objc_msgSend_1sotr3r( - _class_NSMutableOrderedSet, - _sel_orderedSetWithOrderedSet_, - _$$ref.pointer, + NSObjectProtocol$Builder.description.implement(builder, description); + NSObjectProtocol$Builder.hash.implement(builder, hash); + NSObjectProtocol$Builder.isEqual_.implement(builder, isEqual_); + NSObjectProtocol$Builder.isKindOfClass_.implement(builder, isKindOfClass_); + NSObjectProtocol$Builder.isMemberOfClass_.implement( + builder, + isMemberOfClass_, ); - return NSMutableOrderedSet.fromPointer($ret, retain: true, release: true); - } - - /// orderedSetWithOrderedSet:range:copyItems: - static NSMutableOrderedSet orderedSetWithOrderedSet$1( - NSOrderedSet set, { - required NSRange range, - required bool copyItems, - }) { - final _$$ref = set.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.orderedSetWithOrderedSet:range:copyItems:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + NSObjectProtocol$Builder.isProxy.implement(builder, isProxy); + NSObjectProtocol$Builder.performSelector_.implement( + builder, + performSelector_, ); - final $ret = _objc_msgSend_w9bq5x( - _class_NSMutableOrderedSet, - _sel_orderedSetWithOrderedSet_range_copyItems_, - _$$ref.pointer, - range, - copyItems, + NSObjectProtocol$Builder.performSelector_withObject_.implement( + builder, + performSelector_withObject_, ); - return NSMutableOrderedSet.fromPointer($ret, retain: true, release: true); - } - - /// orderedSetWithSet: - static NSMutableOrderedSet orderedSetWithSet(NSSet set) { - final _$$ref = set.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.orderedSetWithSet:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + NSObjectProtocol$Builder.performSelector_withObject_withObject_.implement( + builder, + performSelector_withObject_withObject_, ); - final $ret = _objc_msgSend_1sotr3r( - _class_NSMutableOrderedSet, - _sel_orderedSetWithSet_, - _$$ref.pointer, + NSObjectProtocol$Builder.release.implement(builder, release); + NSObjectProtocol$Builder.respondsToSelector_.implement( + builder, + respondsToSelector_, ); - return NSMutableOrderedSet.fromPointer($ret, retain: true, release: true); + NSObjectProtocol$Builder.retain.implement(builder, retain); + NSObjectProtocol$Builder.retainCount.implement(builder, retainCount); + NSObjectProtocol$Builder.self.implement(builder, self); + NSObjectProtocol$Builder.superclass.implement(builder, superclass); + NSObjectProtocol$Builder.zone.implement(builder, zone); + builder.addProtocol($protocol); } - /// orderedSetWithSet:copyItems: - static NSMutableOrderedSet orderedSetWithSet$1( - NSSet set, { - required bool copyItems, + /// Builds an object that implements the NSObject protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All + /// methods that can be implemented as listeners will be. + /// + /// If `$keepIsolateAlive` is true, this protocol will keep this isolate + /// alive until it is garbage collected by both Dart and ObjC. + static NSObjectProtocol implementAsListener({ + required objc.ObjCObject Function() autorelease, + required objc.ObjCObject Function() class$, + required bool Function(Protocol) conformsToProtocol_, + NSString Function()? debugDescription, + required NSString Function() description, + required DartNSUInteger Function() hash, + required bool Function(objc.ObjCObject) isEqual_, + required bool Function(objc.ObjCObject) isKindOfClass_, + required bool Function(objc.ObjCObject) isMemberOfClass_, + required bool Function() isProxy, + required objc.ObjCObject Function(ffi.Pointer) + performSelector_, + required objc.ObjCObject Function( + ffi.Pointer, + objc.ObjCObject, + ) + performSelector_withObject_, + required objc.ObjCObject Function( + ffi.Pointer, + objc.ObjCObject, + objc.ObjCObject, + ) + performSelector_withObject_withObject_, + required void Function() release, + required bool Function(ffi.Pointer) respondsToSelector_, + required objc.ObjCObject Function() retain, + required DartNSUInteger Function() retainCount, + required objc.ObjCObject Function() self, + required objc.ObjCObject Function() superclass, + required ffi.Pointer Function() zone, + bool $keepIsolateAlive = true, }) { - final _$$ref = set.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.orderedSetWithSet:copyItems:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_17amj0z( - _class_NSMutableOrderedSet, - _sel_orderedSetWithSet_copyItems_, - _$$ref.pointer, - copyItems, + final builder = objc.ObjCProtocolBuilder(debugName: 'NSObject'); + NSObjectProtocol$Builder.autorelease.implement(builder, autorelease); + NSObjectProtocol$Builder.class$.implement(builder, class$); + NSObjectProtocol$Builder.conformsToProtocol_.implement( + builder, + conformsToProtocol_, ); - return NSMutableOrderedSet.fromPointer($ret, retain: true, release: true); - } - - /// supportsSecureCoding - static bool getSupportsSecureCoding() { - return _objc_msgSend_91o635( - _class_NSMutableOrderedSet, - _sel_supportsSecureCoding, + NSObjectProtocol$Builder.debugDescription.implement( + builder, + debugDescription, ); - } - - /// Returns a new instance of NSMutableOrderedSet constructed with the default `new` method. - NSMutableOrderedSet() : this.as(new$().object$); -} - -extension NSMutableOrderedSet$Methods on NSMutableOrderedSet { - /// init - NSMutableOrderedSet init() { - final _$$ref$26 = object$.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.init', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + NSObjectProtocol$Builder.description.implement(builder, description); + NSObjectProtocol$Builder.hash.implement(builder, hash); + NSObjectProtocol$Builder.isEqual_.implement(builder, isEqual_); + NSObjectProtocol$Builder.isKindOfClass_.implement(builder, isKindOfClass_); + NSObjectProtocol$Builder.isMemberOfClass_.implement( + builder, + isMemberOfClass_, ); - final $ret = _objc_msgSend_151sglz( - _$$ref$26.retainAndReturnPointer(), - _sel_init, + NSObjectProtocol$Builder.isProxy.implement(builder, isProxy); + NSObjectProtocol$Builder.performSelector_.implement( + builder, + performSelector_, ); - return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); - } - - /// initWithArray: - NSMutableOrderedSet initWithArray(NSArray array) { - final _$$ref = object$.ref; - final _$$ref$1 = array.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.initWithArray:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + NSObjectProtocol$Builder.performSelector_withObject_.implement( + builder, + performSelector_withObject_, ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.retainAndReturnPointer(), - _sel_initWithArray_, - _$$ref$1.pointer, + NSObjectProtocol$Builder.performSelector_withObject_withObject_.implement( + builder, + performSelector_withObject_withObject_, ); - return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); - } - - /// initWithArray:copyItems: - NSMutableOrderedSet initWithArray$1(NSArray set, {required bool copyItems}) { - final _$$ref = object$.ref; - final _$$ref$1 = set.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.initWithArray:copyItems:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + NSObjectProtocol$Builder.release.implementAsListener(builder, release); + NSObjectProtocol$Builder.respondsToSelector_.implement( + builder, + respondsToSelector_, ); - final $ret = _objc_msgSend_17amj0z( - _$$ref.retainAndReturnPointer(), - _sel_initWithArray_copyItems_, - _$$ref$1.pointer, - copyItems, + NSObjectProtocol$Builder.retain.implement(builder, retain); + NSObjectProtocol$Builder.retainCount.implement(builder, retainCount); + NSObjectProtocol$Builder.self.implement(builder, self); + NSObjectProtocol$Builder.superclass.implement(builder, superclass); + NSObjectProtocol$Builder.zone.implement(builder, zone); + builder.addProtocol($protocol); + return NSObjectProtocol.as( + builder.build(keepIsolateAlive: $keepIsolateAlive), ); - return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); } - /// initWithArray:range:copyItems: - NSMutableOrderedSet initWithArray$2( - NSArray set, { - required NSRange range, - required bool copyItems, + /// Adds the implementation of the NSObject protocol to an existing + /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will + /// be. + /// + /// Note: You cannot call this method after you have called `builder.build`. + static void addToBuilderAsListener( + objc.ObjCProtocolBuilder builder, { + required objc.ObjCObject Function() autorelease, + required objc.ObjCObject Function() class$, + required bool Function(Protocol) conformsToProtocol_, + NSString Function()? debugDescription, + required NSString Function() description, + required DartNSUInteger Function() hash, + required bool Function(objc.ObjCObject) isEqual_, + required bool Function(objc.ObjCObject) isKindOfClass_, + required bool Function(objc.ObjCObject) isMemberOfClass_, + required bool Function() isProxy, + required objc.ObjCObject Function(ffi.Pointer) + performSelector_, + required objc.ObjCObject Function( + ffi.Pointer, + objc.ObjCObject, + ) + performSelector_withObject_, + required objc.ObjCObject Function( + ffi.Pointer, + objc.ObjCObject, + objc.ObjCObject, + ) + performSelector_withObject_withObject_, + required void Function() release, + required bool Function(ffi.Pointer) respondsToSelector_, + required objc.ObjCObject Function() retain, + required DartNSUInteger Function() retainCount, + required objc.ObjCObject Function() self, + required objc.ObjCObject Function() superclass, + required ffi.Pointer Function() zone, + bool $keepIsolateAlive = true, }) { - final _$$ref = object$.ref; - final _$$ref$1 = set.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.initWithArray:range:copyItems:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + NSObjectProtocol$Builder.autorelease.implement(builder, autorelease); + NSObjectProtocol$Builder.class$.implement(builder, class$); + NSObjectProtocol$Builder.conformsToProtocol_.implement( + builder, + conformsToProtocol_, ); - final $ret = _objc_msgSend_w9bq5x( - _$$ref.retainAndReturnPointer(), - _sel_initWithArray_range_copyItems_, - _$$ref$1.pointer, - range, - copyItems, + NSObjectProtocol$Builder.debugDescription.implement( + builder, + debugDescription, ); - return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); - } - - /// initWithCapacity: - NSMutableOrderedSet initWithCapacity(DartNSUInteger numItems) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.initWithCapacity:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + NSObjectProtocol$Builder.description.implement(builder, description); + NSObjectProtocol$Builder.hash.implement(builder, hash); + NSObjectProtocol$Builder.isEqual_.implement(builder, isEqual_); + NSObjectProtocol$Builder.isKindOfClass_.implement(builder, isKindOfClass_); + NSObjectProtocol$Builder.isMemberOfClass_.implement( + builder, + isMemberOfClass_, ); - final $ret = _objc_msgSend_14hpxwa( - _$$ref.retainAndReturnPointer(), - _sel_initWithCapacity_, - numItems, + NSObjectProtocol$Builder.isProxy.implement(builder, isProxy); + NSObjectProtocol$Builder.performSelector_.implement( + builder, + performSelector_, ); - return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); - } - - /// initWithCoder: - NSMutableOrderedSet? initWithCoder(NSCoder coder) { - final _$$ref$28 = object$.ref; - final _$$ref$29 = coder.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref$28.retainAndReturnPointer(), - _sel_initWithCoder_, - _$$ref$29.pointer, + NSObjectProtocol$Builder.performSelector_withObject_.implement( + builder, + performSelector_withObject_, ); - return $ret.address == 0 - ? null - : NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); + NSObjectProtocol$Builder.performSelector_withObject_withObject_.implement( + builder, + performSelector_withObject_withObject_, + ); + NSObjectProtocol$Builder.release.implementAsListener(builder, release); + NSObjectProtocol$Builder.respondsToSelector_.implement( + builder, + respondsToSelector_, + ); + NSObjectProtocol$Builder.retain.implement(builder, retain); + NSObjectProtocol$Builder.retainCount.implement(builder, retainCount); + NSObjectProtocol$Builder.self.implement(builder, self); + NSObjectProtocol$Builder.superclass.implement(builder, superclass); + NSObjectProtocol$Builder.zone.implement(builder, zone); + builder.addProtocol($protocol); } - /// initWithObject: - NSMutableOrderedSet initWithObject(objc.ObjCObject object) { - final _$$ref = object$.ref; - final _$$ref$1 = object.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.initWithObject:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.retainAndReturnPointer(), - _sel_initWithObject_, - _$$ref$1.pointer, - ); - return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); - } - - /// initWithObjects: - NSMutableOrderedSet initWithObjects(objc.ObjCObject firstObj) { - final _$$ref = object$.ref; - final _$$ref$1 = firstObj.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.initWithObjects:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.retainAndReturnPointer(), - _sel_initWithObjects_, - _$$ref$1.pointer, - ); - return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); - } - - /// initWithObjects:count: - NSMutableOrderedSet initWithObjects$1( - ffi.Pointer> objects, { - required DartNSUInteger count, + /// Builds an object that implements the NSObject protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All + /// methods that can be implemented as blocking listeners will be. + /// + /// If `$keepIsolateAlive` is true, this protocol will keep this isolate + /// alive until it is garbage collected by both Dart and ObjC. + static NSObjectProtocol implementAsBlocking({ + required objc.ObjCObject Function() autorelease, + required objc.ObjCObject Function() class$, + required bool Function(Protocol) conformsToProtocol_, + NSString Function()? debugDescription, + required NSString Function() description, + required DartNSUInteger Function() hash, + required bool Function(objc.ObjCObject) isEqual_, + required bool Function(objc.ObjCObject) isKindOfClass_, + required bool Function(objc.ObjCObject) isMemberOfClass_, + required bool Function() isProxy, + required objc.ObjCObject Function(ffi.Pointer) + performSelector_, + required objc.ObjCObject Function( + ffi.Pointer, + objc.ObjCObject, + ) + performSelector_withObject_, + required objc.ObjCObject Function( + ffi.Pointer, + objc.ObjCObject, + objc.ObjCObject, + ) + performSelector_withObject_withObject_, + required void Function() release, + required bool Function(ffi.Pointer) respondsToSelector_, + required objc.ObjCObject Function() retain, + required DartNSUInteger Function() retainCount, + required objc.ObjCObject Function() self, + required objc.ObjCObject Function() superclass, + required ffi.Pointer Function() zone, + bool $keepIsolateAlive = true, }) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.initWithObjects:count:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_zmbtbd( - _$$ref.retainAndReturnPointer(), - _sel_initWithObjects_count_, - objects, - count, - ); - return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); - } - - /// initWithOrderedSet: - NSMutableOrderedSet initWithOrderedSet(NSOrderedSet set) { - final _$$ref = object$.ref; - final _$$ref$1 = set.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.initWithOrderedSet:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + final builder = objc.ObjCProtocolBuilder(debugName: 'NSObject'); + NSObjectProtocol$Builder.autorelease.implement(builder, autorelease); + NSObjectProtocol$Builder.class$.implement(builder, class$); + NSObjectProtocol$Builder.conformsToProtocol_.implement( + builder, + conformsToProtocol_, ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.retainAndReturnPointer(), - _sel_initWithOrderedSet_, - _$$ref$1.pointer, + NSObjectProtocol$Builder.debugDescription.implement( + builder, + debugDescription, ); - return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); - } - - /// initWithOrderedSet:copyItems: - NSMutableOrderedSet initWithOrderedSet$1( - NSOrderedSet set, { - required bool copyItems, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = set.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.initWithOrderedSet:copyItems:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + NSObjectProtocol$Builder.description.implement(builder, description); + NSObjectProtocol$Builder.hash.implement(builder, hash); + NSObjectProtocol$Builder.isEqual_.implement(builder, isEqual_); + NSObjectProtocol$Builder.isKindOfClass_.implement(builder, isKindOfClass_); + NSObjectProtocol$Builder.isMemberOfClass_.implement( + builder, + isMemberOfClass_, ); - final $ret = _objc_msgSend_17amj0z( - _$$ref.retainAndReturnPointer(), - _sel_initWithOrderedSet_copyItems_, - _$$ref$1.pointer, - copyItems, + NSObjectProtocol$Builder.isProxy.implement(builder, isProxy); + NSObjectProtocol$Builder.performSelector_.implement( + builder, + performSelector_, ); - return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); - } - - /// initWithOrderedSet:range:copyItems: - NSMutableOrderedSet initWithOrderedSet$2( - NSOrderedSet set, { - required NSRange range, - required bool copyItems, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = set.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.initWithOrderedSet:range:copyItems:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + NSObjectProtocol$Builder.performSelector_withObject_.implement( + builder, + performSelector_withObject_, ); - final $ret = _objc_msgSend_w9bq5x( - _$$ref.retainAndReturnPointer(), - _sel_initWithOrderedSet_range_copyItems_, - _$$ref$1.pointer, - range, - copyItems, + NSObjectProtocol$Builder.performSelector_withObject_withObject_.implement( + builder, + performSelector_withObject_withObject_, ); - return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); - } - - /// initWithSet: - NSMutableOrderedSet initWithSet(NSSet set) { - final _$$ref = object$.ref; - final _$$ref$1 = set.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.initWithSet:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + NSObjectProtocol$Builder.release.implementAsBlocking(builder, release); + NSObjectProtocol$Builder.respondsToSelector_.implement( + builder, + respondsToSelector_, ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.retainAndReturnPointer(), - _sel_initWithSet_, - _$$ref$1.pointer, + NSObjectProtocol$Builder.retain.implement(builder, retain); + NSObjectProtocol$Builder.retainCount.implement(builder, retainCount); + NSObjectProtocol$Builder.self.implement(builder, self); + NSObjectProtocol$Builder.superclass.implement(builder, superclass); + NSObjectProtocol$Builder.zone.implement(builder, zone); + builder.addProtocol($protocol); + return NSObjectProtocol.as( + builder.build(keepIsolateAlive: $keepIsolateAlive), ); - return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); } - /// initWithSet:copyItems: - NSMutableOrderedSet initWithSet$1(NSSet set, {required bool copyItems}) { - final _$$ref = object$.ref; - final _$$ref$1 = set.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.initWithSet:copyItems:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + /// Adds the implementation of the NSObject protocol to an existing + /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as blocking + /// listeners will be. + /// + /// Note: You cannot call this method after you have called `builder.build`. + static void addToBuilderAsBlocking( + objc.ObjCProtocolBuilder builder, { + required objc.ObjCObject Function() autorelease, + required objc.ObjCObject Function() class$, + required bool Function(Protocol) conformsToProtocol_, + NSString Function()? debugDescription, + required NSString Function() description, + required DartNSUInteger Function() hash, + required bool Function(objc.ObjCObject) isEqual_, + required bool Function(objc.ObjCObject) isKindOfClass_, + required bool Function(objc.ObjCObject) isMemberOfClass_, + required bool Function() isProxy, + required objc.ObjCObject Function(ffi.Pointer) + performSelector_, + required objc.ObjCObject Function( + ffi.Pointer, + objc.ObjCObject, + ) + performSelector_withObject_, + required objc.ObjCObject Function( + ffi.Pointer, + objc.ObjCObject, + objc.ObjCObject, + ) + performSelector_withObject_withObject_, + required void Function() release, + required bool Function(ffi.Pointer) respondsToSelector_, + required objc.ObjCObject Function() retain, + required DartNSUInteger Function() retainCount, + required objc.ObjCObject Function() self, + required objc.ObjCObject Function() superclass, + required ffi.Pointer Function() zone, + bool $keepIsolateAlive = true, + }) { + NSObjectProtocol$Builder.autorelease.implement(builder, autorelease); + NSObjectProtocol$Builder.class$.implement(builder, class$); + NSObjectProtocol$Builder.conformsToProtocol_.implement( + builder, + conformsToProtocol_, ); - final $ret = _objc_msgSend_17amj0z( - _$$ref.retainAndReturnPointer(), - _sel_initWithSet_copyItems_, - _$$ref$1.pointer, - copyItems, + NSObjectProtocol$Builder.debugDescription.implement( + builder, + debugDescription, ); - return NSMutableOrderedSet.fromPointer($ret, retain: false, release: true); - } - - /// insertObject:atIndex: - void insertObject(objc.ObjCObject object, {required DartNSUInteger atIndex}) { - final _$$ref = object$.ref; - final _$$ref$1 = object.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.insertObject:atIndex:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + NSObjectProtocol$Builder.description.implement(builder, description); + NSObjectProtocol$Builder.hash.implement(builder, hash); + NSObjectProtocol$Builder.isEqual_.implement(builder, isEqual_); + NSObjectProtocol$Builder.isKindOfClass_.implement(builder, isKindOfClass_); + NSObjectProtocol$Builder.isMemberOfClass_.implement( + builder, + isMemberOfClass_, ); - _objc_msgSend_djsa9o( - _$$ref.pointer, - _sel_insertObject_atIndex_, - _$$ref$1.pointer, - atIndex, + NSObjectProtocol$Builder.isProxy.implement(builder, isProxy); + NSObjectProtocol$Builder.performSelector_.implement( + builder, + performSelector_, ); - } - - /// removeObjectAtIndex: - void removeObjectAtIndex(DartNSUInteger idx) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.removeObjectAtIndex:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + NSObjectProtocol$Builder.performSelector_withObject_.implement( + builder, + performSelector_withObject_, ); - _objc_msgSend_1i9r4xy(_$$ref.pointer, _sel_removeObjectAtIndex_, idx); - } - - /// replaceObjectAtIndex:withObject: - void replaceObjectAtIndex( - DartNSUInteger idx, { - required objc.ObjCObject withObject, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = withObject.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.replaceObjectAtIndex:withObject:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), + NSObjectProtocol$Builder.performSelector_withObject_withObject_.implement( + builder, + performSelector_withObject_withObject_, ); - _objc_msgSend_1gypgok( - _$$ref.pointer, - _sel_replaceObjectAtIndex_withObject_, - idx, - _$$ref$1.pointer, + NSObjectProtocol$Builder.release.implementAsBlocking(builder, release); + NSObjectProtocol$Builder.respondsToSelector_.implement( + builder, + respondsToSelector_, ); + NSObjectProtocol$Builder.retain.implement(builder, retain); + NSObjectProtocol$Builder.retainCount.implement(builder, retainCount); + NSObjectProtocol$Builder.self.implement(builder, self); + NSObjectProtocol$Builder.superclass.implement(builder, superclass); + NSObjectProtocol$Builder.zone.implement(builder, zone); + builder.addProtocol($protocol); } -} -/// NSMutableOrderedSetCreation -extension NSMutableOrderedSetCreation on NSMutableOrderedSet {} + /// autorelease + static final autorelease = + objc.ObjCProtocolMethod( + _protocol_NSObject, + _sel_autorelease, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_1mbt9g9) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_autorelease, + isRequired: true, + isInstanceMethod: true, + ), + (objc.ObjCObject Function() func) => + ObjCBlock_objcObjCObjectImpl_ffiVoid.fromFunction( + (ffi.Pointer _) => func(), + ), + ); -/// NSMutableOrderedSetDiffing -extension NSMutableOrderedSetDiffing on NSMutableOrderedSet { - /// applyDifference: - void applyDifference(NSOrderedCollectionDifference difference) { - final _$$ref = object$.ref; - final _$$ref$1 = difference.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.applyDifference:', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), - ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_applyDifference_, - _$$ref$1.pointer, - ); - } -} + /// class + static final class$ = objc.ObjCProtocolMethod( + _protocol_NSObject, + _sel_class, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_1mbt9g9) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_class, + isRequired: true, + isInstanceMethod: true, + ), + (objc.ObjCObject Function() func) => + ObjCBlock_objcObjCObjectImpl_ffiVoid.fromFunction( + (ffi.Pointer _) => func(), + ), + ); -/// NSMutableSet -extension type NSMutableSet._(objc.ObjCObject object$) - implements objc.ObjCObject, NSSet { - /// Creates a [NSMutableSet] from [elements]. - static NSMutableSet of(Iterable elements) { - final set = setWithCapacity(elements.length); - for (final e in elements) set.addObject(e); - return set; - } + /// conformsToProtocol: + static final conformsToProtocol_ = + objc.ObjCProtocolMethod( + _protocol_NSObject, + _sel_conformsToProtocol_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_3su7tt) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_conformsToProtocol_, + isRequired: true, + isInstanceMethod: true, + ), + (bool Function(Protocol) func) => + ObjCBlock_bool_ffiVoid_Protocol.fromFunction( + (ffi.Pointer _, Protocol arg1) => func(arg1), + ), + ); - /// Constructs a [NSMutableSet] that points to the same underlying object as [other]. - NSMutableSet.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); - } + /// debugDescription + static final debugDescription = objc.ObjCProtocolMethod( + _protocol_NSObject, + _sel_debugDescription, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_1mbt9g9) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_debugDescription, + isRequired: false, + isInstanceMethod: true, + ), + (NSString Function() func) => ObjCBlock_NSString_ffiVoid.fromFunction( + (ffi.Pointer _) => func(), + ), + ); - /// Constructs a [NSMutableSet] that wraps the given raw object pointer. - NSMutableSet.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); - } + /// description + static final description = objc.ObjCProtocolMethod( + _protocol_NSObject, + _sel_description, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_1mbt9g9) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_description, + isRequired: true, + isInstanceMethod: true, + ), + (NSString Function() func) => ObjCBlock_NSString_ffiVoid.fromFunction( + (ffi.Pointer _) => func(), + ), + ); - /// Returns whether [obj] is an instance of [NSMutableSet]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSMutableSet, - ); + /// hash + static final hash = objc.ObjCProtocolMethod( + _protocol_NSObject, + _sel_hash, + ffi.Native.addressOf< + ffi.NativeFunction< + NSUInteger Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_1ckyi24) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_hash, + isRequired: true, + isInstanceMethod: true, + ), + (DartNSUInteger Function() func) => + ObjCBlock_NSUInteger_ffiVoid.fromFunction( + (ffi.Pointer _) => func(), + ), + ); - /// alloc - static NSMutableSet alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSMutableSet, _sel_alloc); - return NSMutableSet.fromPointer($ret, retain: false, release: true); - } - - /// allocWithZone: - static NSMutableSet allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSMutableSet, - _sel_allocWithZone_, - zone, - ); - return NSMutableSet.fromPointer($ret, retain: false, release: true); - } - - /// new - static NSMutableSet new$() { - final $ret = _objc_msgSend_151sglz(_class_NSMutableSet, _sel_new); - return NSMutableSet.fromPointer($ret, retain: false, release: true); - } - - /// set - static NSMutableSet set() { - final $ret = _objc_msgSend_151sglz(_class_NSMutableSet, _sel_set); - return NSMutableSet.fromPointer($ret, retain: true, release: true); - } - - /// setWithArray: - static NSMutableSet setWithArray(NSArray array) { - final _$$ref = array.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSMutableSet, - _sel_setWithArray_, - _$$ref.pointer, - ); - return NSMutableSet.fromPointer($ret, retain: true, release: true); - } - - /// setWithCapacity: - static NSMutableSet setWithCapacity(DartNSUInteger numItems) { - final $ret = _objc_msgSend_14hpxwa( - _class_NSMutableSet, - _sel_setWithCapacity_, - numItems, - ); - return NSMutableSet.fromPointer($ret, retain: true, release: true); - } - - /// setWithObject: - static NSMutableSet setWithObject(objc.ObjCObject object) { - final _$$ref = object.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSMutableSet, - _sel_setWithObject_, - _$$ref.pointer, - ); - return NSMutableSet.fromPointer($ret, retain: true, release: true); - } - - /// setWithObjects: - static NSMutableSet setWithObjects(objc.ObjCObject firstObj) { - final _$$ref = firstObj.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSMutableSet, - _sel_setWithObjects_, - _$$ref.pointer, - ); - return NSMutableSet.fromPointer($ret, retain: true, release: true); - } - - /// setWithObjects:count: - static NSMutableSet setWithObjects$1( - ffi.Pointer> objects, { - required DartNSUInteger count, - }) { - final $ret = _objc_msgSend_zmbtbd( - _class_NSMutableSet, - _sel_setWithObjects_count_, - objects, - count, - ); - return NSMutableSet.fromPointer($ret, retain: true, release: true); - } - - /// setWithSet: - static NSMutableSet setWithSet(NSSet set) { - final _$$ref = set.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSMutableSet, - _sel_setWithSet_, - _$$ref.pointer, - ); - return NSMutableSet.fromPointer($ret, retain: true, release: true); - } - - /// supportsSecureCoding - static bool getSupportsSecureCoding() { - return _objc_msgSend_91o635(_class_NSMutableSet, _sel_supportsSecureCoding); - } - - /// Returns a new instance of NSMutableSet constructed with the default `new` method. - NSMutableSet() : this.as(new$().object$); -} - -extension NSMutableSet$Methods on NSMutableSet { - /// addObject: - void addObject(objc.ObjCObject object) { - final _$$ref = object$.ref; - final _$$ref$1 = object.ref; - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_addObject_, _$$ref$1.pointer); - } - - /// init - NSMutableSet init() { - final _$$ref$27 = object$.ref; - objc.checkOsVersionInternal( - 'NSMutableSet.init', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref$27.retainAndReturnPointer(), - _sel_init, - ); - return NSMutableSet.fromPointer($ret, retain: false, release: true); - } - - /// initWithArray: - NSMutableSet initWithArray(NSArray array) { - final _$$ref = object$.ref; - final _$$ref$1 = array.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref.retainAndReturnPointer(), - _sel_initWithArray_, - _$$ref$1.pointer, - ); - return NSMutableSet.fromPointer($ret, retain: false, release: true); - } - - /// initWithCapacity: - NSMutableSet initWithCapacity(DartNSUInteger numItems) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_14hpxwa( - _$$ref.retainAndReturnPointer(), - _sel_initWithCapacity_, - numItems, - ); - return NSMutableSet.fromPointer($ret, retain: false, release: true); - } - - /// initWithCoder: - NSMutableSet? initWithCoder(NSCoder coder) { - final _$$ref$30 = object$.ref; - final _$$ref$31 = coder.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref$30.retainAndReturnPointer(), - _sel_initWithCoder_, - _$$ref$31.pointer, - ); - return $ret.address == 0 - ? null - : NSMutableSet.fromPointer($ret, retain: false, release: true); - } - - /// initWithObjects: - NSMutableSet initWithObjects(objc.ObjCObject firstObj) { - final _$$ref = object$.ref; - final _$$ref$1 = firstObj.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref.retainAndReturnPointer(), - _sel_initWithObjects_, - _$$ref$1.pointer, - ); - return NSMutableSet.fromPointer($ret, retain: false, release: true); - } - - /// initWithObjects:count: - NSMutableSet initWithObjects$1( - ffi.Pointer> objects, { - required DartNSUInteger count, - }) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_zmbtbd( - _$$ref.retainAndReturnPointer(), - _sel_initWithObjects_count_, - objects, - count, - ); - return NSMutableSet.fromPointer($ret, retain: false, release: true); - } - - /// initWithSet: - NSMutableSet initWithSet(NSSet set) { - final _$$ref = object$.ref; - final _$$ref$1 = set.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref.retainAndReturnPointer(), - _sel_initWithSet_, - _$$ref$1.pointer, - ); - return NSMutableSet.fromPointer($ret, retain: false, release: true); - } - - /// initWithSet:copyItems: - NSMutableSet initWithSet$1(NSSet set, {required bool copyItems}) { - final _$$ref = object$.ref; - final _$$ref$1 = set.ref; - final $ret = _objc_msgSend_17amj0z( - _$$ref.retainAndReturnPointer(), - _sel_initWithSet_copyItems_, - _$$ref$1.pointer, - copyItems, - ); - return NSMutableSet.fromPointer($ret, retain: false, release: true); - } - - /// removeObject: - void removeObject(objc.ObjCObject object) { - final _$$ref = object$.ref; - final _$$ref$1 = object.ref; - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_removeObject_, _$$ref$1.pointer); - } -} - -/// NSMutableSetCreation -extension NSMutableSetCreation on NSMutableSet {} - -/// NSMutableString -extension type NSMutableString._(objc.ObjCObject object$) - implements objc.ObjCObject, NSString { - /// Constructs a [NSMutableString] that points to the same underlying object as [other]. - NSMutableString.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); - } - - /// Constructs a [NSMutableString] that wraps the given raw object pointer. - NSMutableString.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); - } - - /// Returns whether [obj] is an instance of [NSMutableString]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSMutableString, - ); - - /// alloc - static NSMutableString alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSMutableString, _sel_alloc); - return NSMutableString.fromPointer($ret, retain: false, release: true); - } - - /// allocWithZone: - static NSMutableString allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSMutableString, - _sel_allocWithZone_, - zone, - ); - return NSMutableString.fromPointer($ret, retain: false, release: true); - } - - /// localizedStringWithFormat: - static NSMutableString localizedStringWithFormat(NSString format) { - final _$$ref = format.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSMutableString, - _sel_localizedStringWithFormat_, - _$$ref.pointer, - ); - return NSMutableString.fromPointer($ret, retain: true, release: true); - } - - /// localizedStringWithValidatedFormat:validFormatSpecifiers:error: - static NSMutableString? localizedStringWithValidatedFormat( - NSString format, { - required NSString validFormatSpecifiers, - }) { - final _$$ref = format.ref; - final _$$ref$1 = validFormatSpecifiers.ref; - objc.checkOsVersionInternal( - 'NSMutableString.localizedStringWithValidatedFormat:validFormatSpecifiers:error:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1pnyuds( - _class_NSMutableString, - _sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_, - _$$ref.pointer, - _$$ref$1.pointer, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSMutableString.fromPointer($ret, retain: true, release: true); - } finally { - pkg_ffi.calloc.free($err); - } - } - - /// new - static NSMutableString new$() { - final $ret = _objc_msgSend_151sglz(_class_NSMutableString, _sel_new); - return NSMutableString.fromPointer($ret, retain: false, release: true); - } - - /// string - static NSMutableString string() { - final $ret = _objc_msgSend_151sglz(_class_NSMutableString, _sel_string); - return NSMutableString.fromPointer($ret, retain: true, release: true); - } - - /// stringWithCString:encoding: - static NSMutableString? stringWithCString( - ffi.Pointer cString, { - required DartNSUInteger encoding, - }) { - final $ret = _objc_msgSend_erqryg( - _class_NSMutableString, - _sel_stringWithCString_encoding_, - cString, - encoding, - ); - return $ret.address == 0 - ? null - : NSMutableString.fromPointer($ret, retain: true, release: true); - } - - /// stringWithCharacters:length: - static NSMutableString stringWithCharacters( - ffi.Pointer characters, { - required DartNSUInteger length, - }) { - final $ret = _objc_msgSend_9x4k8x( - _class_NSMutableString, - _sel_stringWithCharacters_length_, - characters, - length, - ); - return NSMutableString.fromPointer($ret, retain: true, release: true); - } - - /// stringWithContentsOfFile:encoding:error: - static NSMutableString? stringWithContentsOfFile( - NSString path, { - required DartNSUInteger encoding, - }) { - final _$$ref = path.ref; - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1nomli1( - _class_NSMutableString, - _sel_stringWithContentsOfFile_encoding_error_, - _$$ref.pointer, - encoding, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSMutableString.fromPointer($ret, retain: true, release: true); - } finally { - pkg_ffi.calloc.free($err); - } - } - - /// stringWithContentsOfFile:usedEncoding:error: - static NSMutableString? stringWithContentsOfFile$1( - NSString path, { - required ffi.Pointer usedEncoding, - }) { - final _$$ref = path.ref; - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1alewu7( - _class_NSMutableString, - _sel_stringWithContentsOfFile_usedEncoding_error_, - _$$ref.pointer, - usedEncoding, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSMutableString.fromPointer($ret, retain: true, release: true); - } finally { - pkg_ffi.calloc.free($err); - } - } - - /// stringWithContentsOfURL:encoding:error: - static NSMutableString? stringWithContentsOfURL( - NSURL url, { - required DartNSUInteger encoding, - }) { - final _$$ref = url.ref; - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1nomli1( - _class_NSMutableString, - _sel_stringWithContentsOfURL_encoding_error_, - _$$ref.pointer, - encoding, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSMutableString.fromPointer($ret, retain: true, release: true); - } finally { - pkg_ffi.calloc.free($err); - } - } - - /// stringWithContentsOfURL:usedEncoding:error: - static NSMutableString? stringWithContentsOfURL$1( - NSURL url, { - required ffi.Pointer usedEncoding, - }) { - final _$$ref = url.ref; - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1alewu7( - _class_NSMutableString, - _sel_stringWithContentsOfURL_usedEncoding_error_, - _$$ref.pointer, - usedEncoding, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSMutableString.fromPointer($ret, retain: true, release: true); - } finally { - pkg_ffi.calloc.free($err); - } - } - - /// stringWithFormat: - static NSMutableString stringWithFormat(NSString format) { - final _$$ref = format.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSMutableString, - _sel_stringWithFormat_, - _$$ref.pointer, - ); - return NSMutableString.fromPointer($ret, retain: true, release: true); - } - - /// stringWithString: - static NSMutableString stringWithString(NSString string) { - final _$$ref = string.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSMutableString, - _sel_stringWithString_, - _$$ref.pointer, - ); - return NSMutableString.fromPointer($ret, retain: true, release: true); - } - - /// stringWithUTF8String: - static NSMutableString? stringWithUTF8String( - ffi.Pointer nullTerminatedCString, - ) { - final $ret = _objc_msgSend_56zxyn( - _class_NSMutableString, - _sel_stringWithUTF8String_, - nullTerminatedCString, - ); - return $ret.address == 0 - ? null - : NSMutableString.fromPointer($ret, retain: true, release: true); - } - - /// stringWithValidatedFormat:validFormatSpecifiers:error: - static NSMutableString? stringWithValidatedFormat( - NSString format, { - required NSString validFormatSpecifiers, - }) { - final _$$ref = format.ref; - final _$$ref$1 = validFormatSpecifiers.ref; - objc.checkOsVersionInternal( - 'NSMutableString.stringWithValidatedFormat:validFormatSpecifiers:error:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1pnyuds( - _class_NSMutableString, - _sel_stringWithValidatedFormat_validFormatSpecifiers_error_, - _$$ref.pointer, - _$$ref$1.pointer, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSMutableString.fromPointer($ret, retain: true, release: true); - } finally { - pkg_ffi.calloc.free($err); - } - } - - /// supportsSecureCoding - static bool getSupportsSecureCoding() { - return _objc_msgSend_91o635( - _class_NSMutableString, - _sel_supportsSecureCoding, - ); - } - - /// Returns a new instance of NSMutableString constructed with the default `new` method. - NSMutableString() : this.as(new$().object$); -} - -extension NSMutableString$Methods on NSMutableString { - /// init - NSMutableString init() { - final _$$ref$28 = object$.ref; - objc.checkOsVersionInternal( - 'NSMutableString.init', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref$28.retainAndReturnPointer(), - _sel_init, - ); - return NSMutableString.fromPointer($ret, retain: false, release: true); - } - - /// initWithBytes:length:encoding: - NSMutableString? initWithBytes( - ffi.Pointer bytes, { - required DartNSUInteger length, - required DartNSUInteger encoding, - }) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_9b3h4v( - _$$ref.retainAndReturnPointer(), - _sel_initWithBytes_length_encoding_, - bytes, - length, - encoding, - ); - return $ret.address == 0 - ? null - : NSMutableString.fromPointer($ret, retain: false, release: true); - } - - /// initWithBytesNoCopy:length:encoding:deallocator: - NSMutableString? initWithBytesNoCopy( - ffi.Pointer bytes, { - required DartNSUInteger length, - required DartNSUInteger encoding, - objc.ObjCBlock, ffi.UnsignedLong)>? - deallocator, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = deallocator?.ref; - final $ret = _objc_msgSend_1lbgrac( - _$$ref.retainAndReturnPointer(), - _sel_initWithBytesNoCopy_length_encoding_deallocator_, - bytes, - length, - encoding, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - return $ret.address == 0 - ? null - : NSMutableString.fromPointer($ret, retain: false, release: true); - } - - /// initWithBytesNoCopy:length:encoding:freeWhenDone: - NSMutableString? initWithBytesNoCopy$1( - ffi.Pointer bytes, { - required DartNSUInteger length, - required DartNSUInteger encoding, - required bool freeWhenDone, - }) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_k4j8m3( - _$$ref.retainAndReturnPointer(), - _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_, - bytes, - length, - encoding, - freeWhenDone, - ); - return $ret.address == 0 - ? null - : NSMutableString.fromPointer($ret, retain: false, release: true); - } - - /// initWithCString:encoding: - NSMutableString? initWithCString( - ffi.Pointer nullTerminatedCString, { - required DartNSUInteger encoding, - }) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_erqryg( - _$$ref.retainAndReturnPointer(), - _sel_initWithCString_encoding_, - nullTerminatedCString, - encoding, - ); - return $ret.address == 0 - ? null - : NSMutableString.fromPointer($ret, retain: false, release: true); - } - - /// initWithCharacters:length: - NSMutableString initWithCharacters( - ffi.Pointer characters, { - required DartNSUInteger length, - }) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_9x4k8x( - _$$ref.retainAndReturnPointer(), - _sel_initWithCharacters_length_, - characters, - length, - ); - return NSMutableString.fromPointer($ret, retain: false, release: true); - } - - /// initWithCharactersNoCopy:length:deallocator: - NSMutableString initWithCharactersNoCopy( - ffi.Pointer chars, { - required DartNSUInteger length, - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) - >? - deallocator, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = deallocator?.ref; - final $ret = _objc_msgSend_talwei( - _$$ref.retainAndReturnPointer(), - _sel_initWithCharactersNoCopy_length_deallocator_, - chars, - length, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - return NSMutableString.fromPointer($ret, retain: false, release: true); - } - - /// initWithCharactersNoCopy:length:freeWhenDone: - NSMutableString initWithCharactersNoCopy$1( - ffi.Pointer characters, { - required DartNSUInteger length, - required bool freeWhenDone, - }) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_lh0jh5( - _$$ref.retainAndReturnPointer(), - _sel_initWithCharactersNoCopy_length_freeWhenDone_, - characters, - length, - freeWhenDone, - ); - return NSMutableString.fromPointer($ret, retain: false, release: true); - } - - /// initWithCoder: - NSMutableString? initWithCoder(NSCoder coder) { - final _$$ref$32 = object$.ref; - final _$$ref$33 = coder.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref$32.retainAndReturnPointer(), - _sel_initWithCoder_, - _$$ref$33.pointer, - ); - return $ret.address == 0 - ? null - : NSMutableString.fromPointer($ret, retain: false, release: true); - } - - /// initWithContentsOfFile:encoding:error: - NSMutableString? initWithContentsOfFile( - NSString path, { - required DartNSUInteger encoding, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = path.ref; - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1nomli1( - _$$ref.retainAndReturnPointer(), - _sel_initWithContentsOfFile_encoding_error_, - _$$ref$1.pointer, - encoding, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSMutableString.fromPointer($ret, retain: false, release: true); - } finally { - pkg_ffi.calloc.free($err); - } - } - - /// initWithContentsOfFile:usedEncoding:error: - NSMutableString? initWithContentsOfFile$1( - NSString path, { - required ffi.Pointer usedEncoding, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = path.ref; - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1alewu7( - _$$ref.retainAndReturnPointer(), - _sel_initWithContentsOfFile_usedEncoding_error_, - _$$ref$1.pointer, - usedEncoding, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSMutableString.fromPointer($ret, retain: false, release: true); - } finally { - pkg_ffi.calloc.free($err); - } - } - - /// initWithContentsOfURL:encoding:error: - NSMutableString? initWithContentsOfURL( - NSURL url, { - required DartNSUInteger encoding, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = url.ref; - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1nomli1( - _$$ref.retainAndReturnPointer(), - _sel_initWithContentsOfURL_encoding_error_, - _$$ref$1.pointer, - encoding, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSMutableString.fromPointer($ret, retain: false, release: true); - } finally { - pkg_ffi.calloc.free($err); - } - } - - /// initWithContentsOfURL:usedEncoding:error: - NSMutableString? initWithContentsOfURL$1( - NSURL url, { - required ffi.Pointer usedEncoding, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = url.ref; - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1alewu7( - _$$ref.retainAndReturnPointer(), - _sel_initWithContentsOfURL_usedEncoding_error_, - _$$ref$1.pointer, - usedEncoding, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSMutableString.fromPointer($ret, retain: false, release: true); - } finally { - pkg_ffi.calloc.free($err); - } - } - - /// initWithData:encoding: - NSMutableString? initWithData( - NSData data, { - required DartNSUInteger encoding, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = data.ref; - final $ret = _objc_msgSend_1k4kd9s( - _$$ref.retainAndReturnPointer(), - _sel_initWithData_encoding_, - _$$ref$1.pointer, - encoding, - ); - return $ret.address == 0 - ? null - : NSMutableString.fromPointer($ret, retain: false, release: true); - } - - /// initWithFormat: - NSMutableString initWithFormat(NSString format) { - final _$$ref = object$.ref; - final _$$ref$1 = format.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref.retainAndReturnPointer(), - _sel_initWithFormat_, - _$$ref$1.pointer, - ); - return NSMutableString.fromPointer($ret, retain: false, release: true); - } - - /// initWithFormat:locale: - NSMutableString initWithFormat$1(NSString format, {objc.ObjCObject? locale}) { - final _$$ref = object$.ref; - final _$$ref$1 = format.ref; - final _$$ref$2 = locale?.ref; - final $ret = _objc_msgSend_15qeuct( - _$$ref.retainAndReturnPointer(), - _sel_initWithFormat_locale_, - _$$ref$1.pointer, - _$$ref$2?.pointer ?? ffi.nullptr, - ); - return NSMutableString.fromPointer($ret, retain: false, release: true); - } - - /// initWithString: - NSMutableString initWithString(NSString aString) { - final _$$ref = object$.ref; - final _$$ref$1 = aString.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref.retainAndReturnPointer(), - _sel_initWithString_, - _$$ref$1.pointer, - ); - return NSMutableString.fromPointer($ret, retain: false, release: true); - } - - /// initWithUTF8String: - NSMutableString? initWithUTF8String( - ffi.Pointer nullTerminatedCString, - ) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_56zxyn( - _$$ref.retainAndReturnPointer(), - _sel_initWithUTF8String_, - nullTerminatedCString, - ); - return $ret.address == 0 - ? null - : NSMutableString.fromPointer($ret, retain: false, release: true); - } - - /// initWithValidatedFormat:validFormatSpecifiers:error: - NSMutableString? initWithValidatedFormat( - NSString format, { - required NSString validFormatSpecifiers, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = format.ref; - final _$$ref$2 = validFormatSpecifiers.ref; - objc.checkOsVersionInternal( - 'NSMutableString.initWithValidatedFormat:validFormatSpecifiers:error:', - iOS: (false, (16, 0, 0)), - macOS: (false, (13, 0, 0)), - ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1pnyuds( - _$$ref.retainAndReturnPointer(), - _sel_initWithValidatedFormat_validFormatSpecifiers_error_, - _$$ref$1.pointer, - _$$ref$2.pointer, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSMutableString.fromPointer($ret, retain: false, release: true); - } finally { - pkg_ffi.calloc.free($err); - } - } - - /// initWithValidatedFormat:validFormatSpecifiers:locale:error: - NSMutableString? initWithValidatedFormat$1( - NSString format, { - required NSString validFormatSpecifiers, - objc.ObjCObject? locale, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = format.ref; - final _$$ref$2 = validFormatSpecifiers.ref; - final _$$ref$3 = locale?.ref; - objc.checkOsVersionInternal( - 'NSMutableString.initWithValidatedFormat:validFormatSpecifiers:locale:error:', - iOS: (false, (16, 0, 0)), - macOS: (false, (13, 0, 0)), - ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1k0ezzm( - _$$ref.retainAndReturnPointer(), - _sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_, - _$$ref$1.pointer, - _$$ref$2.pointer, - _$$ref$3?.pointer ?? ffi.nullptr, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSMutableString.fromPointer($ret, retain: false, release: true); - } finally { - pkg_ffi.calloc.free($err); - } - } - - /// replaceCharactersInRange:withString: - void replaceCharactersInRange(NSRange range, {required NSString withString}) { - final _$$ref = object$.ref; - final _$$ref$1 = withString.ref; - _objc_msgSend_1tv4uax( - _$$ref.pointer, - _sel_replaceCharactersInRange_withString_, - range, - _$$ref$1.pointer, - ); - } -} - -/// NSMutableStringExtensionMethods -extension NSMutableStringExtensionMethods on NSMutableString { - /// appendFormat: - void appendFormat(NSString format) { - final _$$ref = object$.ref; - final _$$ref$1 = format.ref; - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_appendFormat_, _$$ref$1.pointer); - } - - /// appendString: - void appendString(NSString aString) { - final _$$ref = object$.ref; - final _$$ref$1 = aString.ref; - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_appendString_, _$$ref$1.pointer); - } - - /// applyTransform:reverse:range:updatedRange: - bool applyTransform( - NSString transform, { - required bool reverse, - required NSRange range, - required ffi.Pointer updatedRange, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = transform.ref; - objc.checkOsVersionInternal( - 'NSMutableString.applyTransform:reverse:range:updatedRange:', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), - ); - return _objc_msgSend_zy00wz( - _$$ref.pointer, - _sel_applyTransform_reverse_range_updatedRange_, - _$$ref$1.pointer, - reverse, - range, - updatedRange, - ); - } - - /// deleteCharactersInRange: - void deleteCharactersInRange(NSRange range) { - final _$$ref = object$.ref; - _objc_msgSend_1e3pm0z(_$$ref.pointer, _sel_deleteCharactersInRange_, range); - } - - /// initWithCapacity: - NSMutableString initWithCapacity(DartNSUInteger capacity) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_14hpxwa( - _$$ref.retainAndReturnPointer(), - _sel_initWithCapacity_, - capacity, - ); - return NSMutableString.fromPointer($ret, retain: false, release: true); - } - - /// insertString:atIndex: - void insertString(NSString aString, {required DartNSUInteger atIndex}) { - final _$$ref = object$.ref; - final _$$ref$1 = aString.ref; - _objc_msgSend_djsa9o( - _$$ref.pointer, - _sel_insertString_atIndex_, - _$$ref$1.pointer, - atIndex, - ); - } - - /// replaceOccurrencesOfString:withString:options:range: - DartNSUInteger replaceOccurrencesOfString( - NSString target, { - required NSString withString, - required DartNSUInteger options, - required NSRange range, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = target.ref; - final _$$ref$2 = withString.ref; - return _objc_msgSend_1upeo1d( - _$$ref.pointer, - _sel_replaceOccurrencesOfString_withString_options_range_, - _$$ref$1.pointer, - _$$ref$2.pointer, - options, - range, - ); - } - - /// setString: - void setString(NSString aString) { - final _$$ref = object$.ref; - final _$$ref$1 = aString.ref; - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_setString_, _$$ref$1.pointer); - } - - /// stringWithCapacity: - static NSMutableString stringWithCapacity(DartNSUInteger capacity) { - final $ret = _objc_msgSend_14hpxwa( - _class_NSMutableString, - _sel_stringWithCapacity_, - capacity, - ); - return NSMutableString.fromPointer($ret, retain: true, release: true); - } -} - -/// NSNotification -extension type NSNotification._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject, NSCopying, NSCoding { - /// Constructs a [NSNotification] that points to the same underlying object as [other]. - NSNotification.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); - } - - /// Constructs a [NSNotification] that wraps the given raw object pointer. - NSNotification.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); - } - - /// Returns whether [obj] is an instance of [NSNotification]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSNotification, - ); - - /// alloc - static NSNotification alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSNotification, _sel_alloc); - return NSNotification.fromPointer($ret, retain: false, release: true); - } - - /// allocWithZone: - static NSNotification allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSNotification, - _sel_allocWithZone_, - zone, - ); - return NSNotification.fromPointer($ret, retain: false, release: true); - } - - /// new - static NSNotification new$() { - final $ret = _objc_msgSend_151sglz(_class_NSNotification, _sel_new); - return NSNotification.fromPointer($ret, retain: false, release: true); - } - - /// notificationWithName:object: - static NSNotification notificationWithName( - NSString aName, { - objc.ObjCObject? object, - }) { - final _$$ref = aName.ref; - final _$$ref$1 = object?.ref; - final $ret = _objc_msgSend_15qeuct( - _class_NSNotification, - _sel_notificationWithName_object_, - _$$ref.pointer, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - return NSNotification.fromPointer($ret, retain: true, release: true); - } - - /// notificationWithName:object:userInfo: - static NSNotification notificationWithName$1( - NSString aName, { - objc.ObjCObject? object, - NSDictionary? userInfo, - }) { - final _$$ref = aName.ref; - final _$$ref$1 = object?.ref; - final _$$ref$2 = userInfo?.ref; - final $ret = _objc_msgSend_11spmsz( - _class_NSNotification, - _sel_notificationWithName_object_userInfo_, - _$$ref.pointer, - _$$ref$1?.pointer ?? ffi.nullptr, - _$$ref$2?.pointer ?? ffi.nullptr, - ); - return NSNotification.fromPointer($ret, retain: true, release: true); - } - - /// Returns a new instance of NSNotification constructed with the default `new` method. - NSNotification() : this.as(new$().object$); -} - -extension NSNotification$Methods on NSNotification { - /// encodeWithCoder: - void encodeWithCoder(NSCoder coder) { - final _$$ref$20 = object$.ref; - final _$$ref$21 = coder.ref; - _objc_msgSend_xtuoz7( - _$$ref$20.pointer, - _sel_encodeWithCoder_, - _$$ref$21.pointer, - ); - } - - /// init - NSNotification init() { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz( - _$$ref.retainAndReturnPointer(), - _sel_init, - ); - return NSNotification.fromPointer($ret, retain: false, release: true); - } - - /// initWithCoder: - NSNotification? initWithCoder(NSCoder coder) { - final _$$ref$34 = object$.ref; - final _$$ref$35 = coder.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref$34.retainAndReturnPointer(), - _sel_initWithCoder_, - _$$ref$35.pointer, - ); - return $ret.address == 0 - ? null - : NSNotification.fromPointer($ret, retain: false, release: true); - } - - /// initWithName:object:userInfo: - NSNotification initWithName( - NSString name, { - objc.ObjCObject? object, - NSDictionary? userInfo, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = name.ref; - final _$$ref$2 = object?.ref; - final _$$ref$3 = userInfo?.ref; - objc.checkOsVersionInternal( - 'NSNotification.initWithName:object:userInfo:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_11spmsz( - _$$ref.retainAndReturnPointer(), - _sel_initWithName_object_userInfo_, - _$$ref$1.pointer, - _$$ref$2?.pointer ?? ffi.nullptr, - _$$ref$3?.pointer ?? ffi.nullptr, - ); - return NSNotification.fromPointer($ret, retain: false, release: true); - } - - /// name - NSString get name { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_name); - return NSString.fromPointer($ret, retain: true, release: true); - } - - /// object - objc.ObjCObject? get object { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_object); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); - } - - /// userInfo - NSDictionary? get userInfo { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_userInfo); - return $ret.address == 0 - ? null - : NSDictionary.fromPointer($ret, retain: true, release: true); - } -} - -/// NSNotificationCreation -extension NSNotificationCreation on NSNotification {} - -/// NSNull -extension type NSNull._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject, NSCopying, NSSecureCoding { - /// Constructs a [NSNull] that points to the same underlying object as [other]. - NSNull.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); - } - - /// Constructs a [NSNull] that wraps the given raw object pointer. - NSNull.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); - } - - /// Returns whether [obj] is an instance of [NSNull]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSNull, - ); - - /// alloc - static NSNull alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSNull, _sel_alloc); - return NSNull.fromPointer($ret, retain: false, release: true); - } - - /// allocWithZone: - static NSNull allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSNull, - _sel_allocWithZone_, - zone, - ); - return NSNull.fromPointer($ret, retain: false, release: true); - } - - /// new - static NSNull new$() { - final $ret = _objc_msgSend_151sglz(_class_NSNull, _sel_new); - return NSNull.fromPointer($ret, retain: false, release: true); - } - - /// null - static NSNull null$() { - final $ret = _objc_msgSend_151sglz(_class_NSNull, _sel_null); - return NSNull.fromPointer($ret, retain: true, release: true); - } - - /// supportsSecureCoding - static bool getSupportsSecureCoding() { - return _objc_msgSend_91o635(_class_NSNull, _sel_supportsSecureCoding); - } - - /// Returns a new instance of NSNull constructed with the default `new` method. - NSNull() : this.as(new$().object$); -} - -extension NSNull$Methods on NSNull { - /// encodeWithCoder: - void encodeWithCoder(NSCoder coder) { - final _$$ref$22 = object$.ref; - final _$$ref$23 = coder.ref; - _objc_msgSend_xtuoz7( - _$$ref$22.pointer, - _sel_encodeWithCoder_, - _$$ref$23.pointer, - ); - } - - /// init - NSNull init() { - final _$$ref$29 = object$.ref; - objc.checkOsVersionInternal( - 'NSNull.init', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref$29.retainAndReturnPointer(), - _sel_init, - ); - return NSNull.fromPointer($ret, retain: false, release: true); - } - - /// initWithCoder: - NSNull? initWithCoder(NSCoder coder) { - final _$$ref$36 = object$.ref; - final _$$ref$37 = coder.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref$36.retainAndReturnPointer(), - _sel_initWithCoder_, - _$$ref$37.pointer, - ); - return $ret.address == 0 - ? null - : NSNull.fromPointer($ret, retain: false, release: true); - } -} - -/// NSNumber -extension type NSNumber._(objc.ObjCObject object$) - implements objc.ObjCObject, NSValue { - /// Constructs a [NSNumber] that points to the same underlying object as [other]. - NSNumber.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); - } - - /// Constructs a [NSNumber] that wraps the given raw object pointer. - NSNumber.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); - } - - /// Returns whether [obj] is an instance of [NSNumber]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSNumber, - ); - - /// alloc - static NSNumber alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSNumber, _sel_alloc); - return NSNumber.fromPointer($ret, retain: false, release: true); - } - - /// allocWithZone: - static NSNumber allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSNumber, - _sel_allocWithZone_, - zone, - ); - return NSNumber.fromPointer($ret, retain: false, release: true); - } - - /// new - static NSNumber new$() { - final $ret = _objc_msgSend_151sglz(_class_NSNumber, _sel_new); - return NSNumber.fromPointer($ret, retain: false, release: true); - } - - /// supportsSecureCoding - static bool getSupportsSecureCoding() { - return _objc_msgSend_91o635(_class_NSNumber, _sel_supportsSecureCoding); - } - - /// Returns a new instance of NSNumber constructed with the default `new` method. - NSNumber() : this.as(new$().object$); -} - -extension NSNumber$Methods on NSNumber { - /// boolValue - bool get boolValue { - final _$$ref = object$.ref; - return _objc_msgSend_91o635(_$$ref.pointer, _sel_boolValue); - } - - /// charValue - int get charValue { - final _$$ref = object$.ref; - return _objc_msgSend_xmlz1t(_$$ref.pointer, _sel_charValue); - } - - /// compare: - NSComparisonResult compare(NSNumber otherNumber) { - final _$$ref = object$.ref; - final _$$ref$1 = otherNumber.ref; - final $ret = _objc_msgSend_1ym6zyw( - _$$ref.pointer, - _sel_compare_, - _$$ref$1.pointer, - ); - return NSComparisonResult.fromValue($ret); - } - - /// descriptionWithLocale: - NSString descriptionWithLocale(objc.ObjCObject? locale) { - final _$$ref = object$.ref; - final _$$ref$1 = locale?.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_descriptionWithLocale_, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - return NSString.fromPointer($ret, retain: true, release: true); - } - - /// doubleValue - double get doubleValue { - final _$$ref = object$.ref; - return objc.useMsgSendVariants - ? _objc_msgSend_1ukqyt8Fpret(_$$ref.pointer, _sel_doubleValue) - : _objc_msgSend_1ukqyt8(_$$ref.pointer, _sel_doubleValue); - } - - /// floatValue - double get floatValue { - final _$$ref = object$.ref; - return objc.useMsgSendVariants - ? _objc_msgSend_2cgrxlFpret(_$$ref.pointer, _sel_floatValue) - : _objc_msgSend_2cgrxl(_$$ref.pointer, _sel_floatValue); - } - - /// init - NSNumber init() { - final _$$ref$30 = object$.ref; - objc.checkOsVersionInternal( - 'NSNumber.init', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref$30.retainAndReturnPointer(), - _sel_init, - ); - return NSNumber.fromPointer($ret, retain: false, release: true); - } - - /// initWithBool: - NSNumber initWithBool(bool value) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_1t6aok9( - _$$ref.retainAndReturnPointer(), - _sel_initWithBool_, - value, - ); - return NSNumber.fromPointer($ret, retain: false, release: true); - } - - /// initWithBytes:objCType: - NSNumber initWithBytes( - ffi.Pointer value, { - required ffi.Pointer objCType, - }) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_e9mncn( - _$$ref.retainAndReturnPointer(), - _sel_initWithBytes_objCType_, - value, - objCType, - ); - return NSNumber.fromPointer($ret, retain: false, release: true); - } - - /// initWithChar: - NSNumber initWithChar(int value) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_13mclwd( - _$$ref.retainAndReturnPointer(), - _sel_initWithChar_, - value, - ); - return NSNumber.fromPointer($ret, retain: false, release: true); - } - - /// initWithCoder: - NSNumber? initWithCoder(NSCoder coder) { - final _$$ref$38 = object$.ref; - final _$$ref$39 = coder.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref$38.retainAndReturnPointer(), - _sel_initWithCoder_, - _$$ref$39.pointer, - ); - return $ret.address == 0 - ? null - : NSNumber.fromPointer($ret, retain: false, release: true); - } - - /// initWithDouble: - NSNumber initWithDouble(double value) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_oa8mke( - _$$ref.retainAndReturnPointer(), - _sel_initWithDouble_, - value, - ); - return NSNumber.fromPointer($ret, retain: false, release: true); - } - - /// initWithFloat: - NSNumber initWithFloat(double value) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_et8cuh( - _$$ref.retainAndReturnPointer(), - _sel_initWithFloat_, - value, - ); - return NSNumber.fromPointer($ret, retain: false, release: true); - } - - /// initWithInt: - NSNumber initWithInt(int value) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_14hvw5k( - _$$ref.retainAndReturnPointer(), - _sel_initWithInt_, - value, - ); - return NSNumber.fromPointer($ret, retain: false, release: true); - } - - /// initWithInteger: - NSNumber initWithInteger(int value) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSNumber.initWithInteger:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - final $ret = _objc_msgSend_qugqlf( - _$$ref.retainAndReturnPointer(), - _sel_initWithInteger_, - value, - ); - return NSNumber.fromPointer($ret, retain: false, release: true); - } - - /// initWithLong: - NSNumber initWithLong(int value) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_qugqlf( - _$$ref.retainAndReturnPointer(), - _sel_initWithLong_, - value, - ); - return NSNumber.fromPointer($ret, retain: false, release: true); - } - - /// initWithLongLong: - NSNumber initWithLongLong(int value) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_16f0drb( - _$$ref.retainAndReturnPointer(), - _sel_initWithLongLong_, - value, - ); - return NSNumber.fromPointer($ret, retain: false, release: true); - } - - /// initWithShort: - NSNumber initWithShort(int value) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_68x6r1( - _$$ref.retainAndReturnPointer(), - _sel_initWithShort_, - value, - ); - return NSNumber.fromPointer($ret, retain: false, release: true); - } - - /// initWithUnsignedChar: - NSNumber initWithUnsignedChar(int value) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_7uautw( - _$$ref.retainAndReturnPointer(), - _sel_initWithUnsignedChar_, - value, - ); - return NSNumber.fromPointer($ret, retain: false, release: true); - } - - /// initWithUnsignedInt: - NSNumber initWithUnsignedInt(int value) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_degb40( - _$$ref.retainAndReturnPointer(), - _sel_initWithUnsignedInt_, - value, - ); - return NSNumber.fromPointer($ret, retain: false, release: true); - } - - /// initWithUnsignedInteger: - NSNumber initWithUnsignedInteger(DartNSUInteger value) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSNumber.initWithUnsignedInteger:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - final $ret = _objc_msgSend_14hpxwa( - _$$ref.retainAndReturnPointer(), - _sel_initWithUnsignedInteger_, - value, - ); - return NSNumber.fromPointer($ret, retain: false, release: true); - } - - /// initWithUnsignedLong: - NSNumber initWithUnsignedLong(int value) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_14hpxwa( - _$$ref.retainAndReturnPointer(), - _sel_initWithUnsignedLong_, - value, - ); - return NSNumber.fromPointer($ret, retain: false, release: true); - } - - /// initWithUnsignedLongLong: - NSNumber initWithUnsignedLongLong(int value) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_1x2hskc( - _$$ref.retainAndReturnPointer(), - _sel_initWithUnsignedLongLong_, - value, - ); - return NSNumber.fromPointer($ret, retain: false, release: true); - } - - /// initWithUnsignedShort: - NSNumber initWithUnsignedShort(int value) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_1njucl2( - _$$ref.retainAndReturnPointer(), - _sel_initWithUnsignedShort_, - value, - ); - return NSNumber.fromPointer($ret, retain: false, release: true); - } - - /// intValue - int get intValue { - final _$$ref = object$.ref; - return _objc_msgSend_13yqbb6(_$$ref.pointer, _sel_intValue); - } - - /// integerValue - int get integerValue { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSNumber.integerValue', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - return _objc_msgSend_1hz7y9r(_$$ref.pointer, _sel_integerValue); - } - - /// isEqualToNumber: - bool isEqualToNumber(NSNumber number) { - final _$$ref = object$.ref; - final _$$ref$1 = number.ref; - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_isEqualToNumber_, - _$$ref$1.pointer, - ); - } - - /// longLongValue - int get longLongValue { - final _$$ref = object$.ref; - return _objc_msgSend_1k101e3(_$$ref.pointer, _sel_longLongValue); - } - - /// longValue - int get longValue { - final _$$ref = object$.ref; - return _objc_msgSend_1hz7y9r(_$$ref.pointer, _sel_longValue); - } - - /// shortValue - int get shortValue { - final _$$ref = object$.ref; - return _objc_msgSend_1jwityx(_$$ref.pointer, _sel_shortValue); - } - - /// stringValue - NSString get stringValue { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_stringValue); - return NSString.fromPointer($ret, retain: true, release: true); - } - - /// unsignedCharValue - int get unsignedCharValue { - final _$$ref = object$.ref; - return _objc_msgSend_1ko4qka(_$$ref.pointer, _sel_unsignedCharValue); - } - - /// unsignedIntValue - int get unsignedIntValue { - final _$$ref = object$.ref; - return _objc_msgSend_3pyzne(_$$ref.pointer, _sel_unsignedIntValue); - } - - /// unsignedIntegerValue - DartNSUInteger get unsignedIntegerValue { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSNumber.unsignedIntegerValue', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_unsignedIntegerValue); - } - - /// unsignedLongLongValue - int get unsignedLongLongValue { - final _$$ref = object$.ref; - return _objc_msgSend_1p4gbjy(_$$ref.pointer, _sel_unsignedLongLongValue); - } - - /// unsignedLongValue - int get unsignedLongValue { - final _$$ref = object$.ref; - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_unsignedLongValue); - } - - /// unsignedShortValue - int get unsignedShortValue { - final _$$ref = object$.ref; - return _objc_msgSend_ud8gg(_$$ref.pointer, _sel_unsignedShortValue); - } -} - -/// NSNumberCreation -extension NSNumberCreation on NSNumber { - /// numberWithBool: - static NSNumber numberWithBool(bool value) { - final $ret = _objc_msgSend_1t6aok9( - _class_NSNumber, - _sel_numberWithBool_, - value, - ); - return NSNumber.fromPointer($ret, retain: true, release: true); - } - - /// numberWithChar: - static NSNumber numberWithChar(int value) { - final $ret = _objc_msgSend_13mclwd( - _class_NSNumber, - _sel_numberWithChar_, - value, - ); - return NSNumber.fromPointer($ret, retain: true, release: true); - } - - /// numberWithDouble: - static NSNumber numberWithDouble(double value) { - final $ret = _objc_msgSend_oa8mke( - _class_NSNumber, - _sel_numberWithDouble_, - value, - ); - return NSNumber.fromPointer($ret, retain: true, release: true); - } - - /// numberWithFloat: - static NSNumber numberWithFloat(double value) { - final $ret = _objc_msgSend_et8cuh( - _class_NSNumber, - _sel_numberWithFloat_, - value, - ); - return NSNumber.fromPointer($ret, retain: true, release: true); - } - - /// numberWithInt: - static NSNumber numberWithInt(int value) { - final $ret = _objc_msgSend_14hvw5k( - _class_NSNumber, - _sel_numberWithInt_, - value, - ); - return NSNumber.fromPointer($ret, retain: true, release: true); - } - - /// numberWithInteger: - static NSNumber numberWithInteger(int value) { - objc.checkOsVersionInternal( - 'NSNumber.numberWithInteger:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - final $ret = _objc_msgSend_qugqlf( - _class_NSNumber, - _sel_numberWithInteger_, - value, - ); - return NSNumber.fromPointer($ret, retain: true, release: true); - } - - /// numberWithLong: - static NSNumber numberWithLong(int value) { - final $ret = _objc_msgSend_qugqlf( - _class_NSNumber, - _sel_numberWithLong_, - value, - ); - return NSNumber.fromPointer($ret, retain: true, release: true); - } - - /// numberWithLongLong: - static NSNumber numberWithLongLong(int value) { - final $ret = _objc_msgSend_16f0drb( - _class_NSNumber, - _sel_numberWithLongLong_, - value, - ); - return NSNumber.fromPointer($ret, retain: true, release: true); - } - - /// numberWithShort: - static NSNumber numberWithShort(int value) { - final $ret = _objc_msgSend_68x6r1( - _class_NSNumber, - _sel_numberWithShort_, - value, - ); - return NSNumber.fromPointer($ret, retain: true, release: true); - } - - /// numberWithUnsignedChar: - static NSNumber numberWithUnsignedChar(int value) { - final $ret = _objc_msgSend_7uautw( - _class_NSNumber, - _sel_numberWithUnsignedChar_, - value, - ); - return NSNumber.fromPointer($ret, retain: true, release: true); - } - - /// numberWithUnsignedInt: - static NSNumber numberWithUnsignedInt(int value) { - final $ret = _objc_msgSend_degb40( - _class_NSNumber, - _sel_numberWithUnsignedInt_, - value, - ); - return NSNumber.fromPointer($ret, retain: true, release: true); - } - - /// numberWithUnsignedInteger: - static NSNumber numberWithUnsignedInteger(DartNSUInteger value) { - objc.checkOsVersionInternal( - 'NSNumber.numberWithUnsignedInteger:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - final $ret = _objc_msgSend_14hpxwa( - _class_NSNumber, - _sel_numberWithUnsignedInteger_, - value, - ); - return NSNumber.fromPointer($ret, retain: true, release: true); - } - - /// numberWithUnsignedLong: - static NSNumber numberWithUnsignedLong(int value) { - final $ret = _objc_msgSend_14hpxwa( - _class_NSNumber, - _sel_numberWithUnsignedLong_, - value, - ); - return NSNumber.fromPointer($ret, retain: true, release: true); - } - - /// numberWithUnsignedLongLong: - static NSNumber numberWithUnsignedLongLong(int value) { - final $ret = _objc_msgSend_1x2hskc( - _class_NSNumber, - _sel_numberWithUnsignedLongLong_, - value, - ); - return NSNumber.fromPointer($ret, retain: true, release: true); - } - - /// numberWithUnsignedShort: - static NSNumber numberWithUnsignedShort(int value) { - final $ret = _objc_msgSend_1njucl2( - _class_NSNumber, - _sel_numberWithUnsignedShort_, - value, - ); - return NSNumber.fromPointer($ret, retain: true, release: true); - } -} - -/// NSNumberIsBool -extension NSNumberIsBool on NSNumber { - /// isBool - bool get isBool { - final _$$ref = object$.ref; - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isBool); - } -} - -/// NSNumberIsFloat -extension NSNumberIsFloat on NSNumber { - /// isFloat - bool get isFloat { - final _$$ref = object$.ref; - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isFloat); - } -} - -/// NSObject -extension type NSObject._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObjectProtocol { - /// Constructs a [NSObject] that points to the same underlying object as [other]. - NSObject.as(objc.ObjCObject other) : object$ = other { - objc.checkOsVersionInternal( - 'NSObject', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - assert(isA(object$)); - } - - /// Constructs a [NSObject] that wraps the given raw object pointer. - NSObject.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - objc.checkOsVersionInternal( - 'NSObject', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - assert(isA(object$)); - } - - /// Returns whether [obj] is an instance of [NSObject]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSObject, - ); - - /// alloc - static NSObject alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSObject, _sel_alloc); - return NSObject.fromPointer($ret, retain: false, release: true); - } - - /// allocWithZone: - static NSObject allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSObject, - _sel_allocWithZone_, - zone, - ); - return NSObject.fromPointer($ret, retain: false, release: true); - } - - /// class - static objc.ObjCObject class$() { - final $ret = _objc_msgSend_151sglz(_class_NSObject, _sel_class); - return objc.ObjCObject($ret, retain: true, release: true); - } - - /// conformsToProtocol: - static bool conformsToProtocol(Protocol protocol) { - final _$$ref = protocol.ref; - objc.checkOsVersionInternal( - 'NSObject.conformsToProtocol:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_19nvye5( - _class_NSObject, - _sel_conformsToProtocol_, - _$$ref.pointer, - ); - } - - /// copyWithZone: - static objc.ObjCObject copyWithZone(ffi.Pointer zone) { - objc.checkOsVersionInternal( - 'NSObject.copyWithZone:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_1cwp428( - _class_NSObject, - _sel_copyWithZone_, - zone, - ); - return objc.ObjCObject($ret, retain: false, release: true); - } - - /// debugDescription - static NSString debugDescription() { - objc.checkOsVersionInternal( - 'NSObject.debugDescription', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz(_class_NSObject, _sel_debugDescription); - return NSString.fromPointer($ret, retain: true, release: true); - } - - /// description - static NSString description() { - objc.checkOsVersionInternal( - 'NSObject.description', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz(_class_NSObject, _sel_description); - return NSString.fromPointer($ret, retain: true, release: true); - } - - /// hash - static DartNSUInteger hash() { - objc.checkOsVersionInternal( - 'NSObject.hash', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_xw2lbc(_class_NSObject, _sel_hash); - } - - /// initialize - static void initialize() { - objc.checkOsVersionInternal( - 'NSObject.initialize', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_1pl9qdv(_class_NSObject, _sel_initialize); - } - - /// instanceMethodForSelector: - static ffi.Pointer> - instanceMethodForSelector(ffi.Pointer aSelector) { - objc.checkOsVersionInternal( - 'NSObject.instanceMethodForSelector:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_13lsk7w( - _class_NSObject, - _sel_instanceMethodForSelector_, - aSelector, - ); - } - - /// instanceMethodSignatureForSelector: - static NSMethodSignature instanceMethodSignatureForSelector( - ffi.Pointer aSelector, - ) { - final $ret = _objc_msgSend_3ctkt6( - _class_NSObject, - _sel_instanceMethodSignatureForSelector_, - aSelector, - ); - return NSMethodSignature.fromPointer($ret, retain: true, release: true); - } - - /// instancesRespondToSelector: - static bool instancesRespondToSelector( - ffi.Pointer aSelector, - ) { - objc.checkOsVersionInternal( - 'NSObject.instancesRespondToSelector:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_1srf6wk( - _class_NSObject, - _sel_instancesRespondToSelector_, - aSelector, - ); - } - - /// isSubclassOfClass: - static bool isSubclassOfClass(objc.ObjCObject aClass) { - final _$$ref = aClass.ref; - objc.checkOsVersionInternal( - 'NSObject.isSubclassOfClass:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_19nvye5( - _class_NSObject, - _sel_isSubclassOfClass_, - _$$ref.pointer, - ); - } - - /// load - static void load() { - objc.checkOsVersionInternal( - 'NSObject.load', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_1pl9qdv(_class_NSObject, _sel_load); - } - - /// mutableCopyWithZone: - static objc.ObjCObject mutableCopyWithZone(ffi.Pointer zone) { - objc.checkOsVersionInternal( - 'NSObject.mutableCopyWithZone:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_1cwp428( - _class_NSObject, - _sel_mutableCopyWithZone_, - zone, - ); - return objc.ObjCObject($ret, retain: false, release: true); - } - - /// new - static NSObject new$() { - final $ret = _objc_msgSend_151sglz(_class_NSObject, _sel_new); - return NSObject.fromPointer($ret, retain: false, release: true); - } - - /// resolveClassMethod: - static bool resolveClassMethod(ffi.Pointer sel) { - objc.checkOsVersionInternal( - 'NSObject.resolveClassMethod:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - return _objc_msgSend_1srf6wk( - _class_NSObject, - _sel_resolveClassMethod_, - sel, - ); - } - - /// resolveInstanceMethod: - static bool resolveInstanceMethod(ffi.Pointer sel) { - objc.checkOsVersionInternal( - 'NSObject.resolveInstanceMethod:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - return _objc_msgSend_1srf6wk( - _class_NSObject, - _sel_resolveInstanceMethod_, - sel, - ); - } - - /// superclass - static objc.ObjCObject superclass() { - objc.checkOsVersionInternal( - 'NSObject.superclass', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz(_class_NSObject, _sel_superclass); - return objc.ObjCObject($ret, retain: true, release: true); - } - - /// Returns a new instance of NSObject constructed with the default `new` method. - NSObject() : this.as(new$().object$); -} - -extension NSObject$Methods on NSObject { - /// copy - objc.ObjCObject copy() { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSObject.copy', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_copy); - return objc.ObjCObject($ret, retain: false, release: true); - } - - /// dealloc - void dealloc() { - final _$$ref = object$.ref; - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_dealloc); - } - - /// doesNotRecognizeSelector: - void doesNotRecognizeSelector(ffi.Pointer aSelector) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSObject.doesNotRecognizeSelector:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_1d9e4oe( - _$$ref.pointer, - _sel_doesNotRecognizeSelector_, - aSelector, - ); - } - - /// finalize - @Deprecated('Objective-C garbage collection is no longer supported') - void finalize() { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSObject.finalize', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_finalize); - } - - /// forwardInvocation: - void forwardInvocation(NSInvocation anInvocation) { - final _$$ref = object$.ref; - final _$$ref$1 = anInvocation.ref; - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_forwardInvocation_, - _$$ref$1.pointer, - ); - } - - /// forwardingTargetForSelector: - objc.ObjCObject forwardingTargetForSelector( - ffi.Pointer aSelector, - ) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSObject.forwardingTargetForSelector:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - final $ret = _objc_msgSend_3ctkt6( - _$$ref.pointer, - _sel_forwardingTargetForSelector_, - aSelector, - ); - return objc.ObjCObject($ret, retain: true, release: true); - } - - /// init - NSObject init() { - final _$$ref$31 = object$.ref; - objc.checkOsVersionInternal( - 'NSObject.init', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref$31.retainAndReturnPointer(), - _sel_init, - ); - return NSObject.fromPointer($ret, retain: false, release: true); - } - - /// isEqual: - bool isEqual(objc.ObjCObject object) { - final _$$ref = object$.ref; - final _$$ref$1 = object.ref; - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_isEqual_, - _$$ref$1.pointer, - ); - } - - /// isKindOfClass: - bool isKindOfClass(objc.ObjCObject aClass) { - final _$$ref = object$.ref; - final _$$ref$1 = aClass.ref; - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_isKindOfClass_, - _$$ref$1.pointer, - ); - } - - /// isMemberOfClass: - bool isMemberOfClass(objc.ObjCObject aClass) { - final _$$ref = object$.ref; - final _$$ref$1 = aClass.ref; - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_isMemberOfClass_, - _$$ref$1.pointer, - ); - } - - /// isProxy - bool get isProxy { - final _$$ref = object$.ref; - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isProxy); - } - - /// methodForSelector: - ffi.Pointer> methodForSelector( - ffi.Pointer aSelector, - ) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSObject.methodForSelector:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_13lsk7w( - _$$ref.pointer, - _sel_methodForSelector_, - aSelector, - ); - } - - /// methodSignatureForSelector: - NSMethodSignature methodSignatureForSelector( - ffi.Pointer aSelector, - ) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_3ctkt6( - _$$ref.pointer, - _sel_methodSignatureForSelector_, - aSelector, - ); - return NSMethodSignature.fromPointer($ret, retain: true, release: true); - } - - /// mutableCopy - objc.ObjCObject mutableCopy() { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSObject.mutableCopy', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_mutableCopy); - return objc.ObjCObject($ret, retain: false, release: true); - } - - /// performSelector: - objc.ObjCObject performSelector(ffi.Pointer aSelector) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_3ctkt6( - _$$ref.pointer, - _sel_performSelector_, - aSelector, - ); - return objc.ObjCObject($ret, retain: true, release: true); - } - - /// performSelector:withObject: - objc.ObjCObject performSelector$1( - ffi.Pointer aSelector, { - required objc.ObjCObject withObject, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = withObject.ref; - final $ret = _objc_msgSend_gx50so( - _$$ref.pointer, - _sel_performSelector_withObject_, - aSelector, - _$$ref$1.pointer, - ); - return objc.ObjCObject($ret, retain: true, release: true); - } - - /// performSelector:withObject:withObject: - objc.ObjCObject performSelector$2( - ffi.Pointer aSelector, { - required objc.ObjCObject withObject, - required objc.ObjCObject withObject$1, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = withObject.ref; - final _$$ref$2 = withObject$1.ref; - final $ret = _objc_msgSend_cfx8ce( - _$$ref.pointer, - _sel_performSelector_withObject_withObject_, - aSelector, - _$$ref$1.pointer, - _$$ref$2.pointer, - ); - return objc.ObjCObject($ret, retain: true, release: true); - } - - /// zone - ffi.Pointer zone() { - final _$$ref = object$.ref; - return _objc_msgSend_sz90oi(_$$ref.pointer, _sel_zone); - } -} - -/// NSObject -extension type NSObjectProtocol._(objc.ObjCProtocol object$) - implements objc.ObjCProtocol { - /// Constructs a [NSObjectProtocol] that points to the same underlying object as [other]. - NSObjectProtocol.as(objc.ObjCObject other) : object$ = other; - - /// Constructs a [NSObjectProtocol] that wraps the given raw object pointer. - NSObjectProtocol.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); - - /// Returns whether [obj] is an instance of [NSObjectProtocol]. - static bool conformsTo(objc.ObjCObject obj) { - return _objc_msgSend_e3qsqz( - obj.ref.pointer, - _sel_conformsToProtocol_, - _protocol_NSObject, - ); - } -} - -extension NSObjectProtocol$Methods on NSObjectProtocol { - /// autorelease - NSObjectProtocol autorelease() { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_autorelease); - return NSObjectProtocol.fromPointer($ret, retain: true, release: true); - } - - /// class - objc.ObjCObject class$() { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_class); - return objc.ObjCObject($ret, retain: true, release: true); - } - - /// conformsToProtocol: - bool conformsToProtocol(Protocol aProtocol) { - final _$$ref = object$.ref; - final _$$ref$1 = aProtocol.ref; - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_conformsToProtocol_, - _$$ref$1.pointer, - ); - } - - /// debugDescription - NSString get debugDescription { - final _$$ref = object$.ref; - if (!objc.respondsToSelector(_$$ref.pointer, _sel_debugDescription)) { - throw objc.UnimplementedOptionalMethodException( - 'NSObject', - 'debugDescription', - ); - } - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_debugDescription); - return NSString.fromPointer($ret, retain: true, release: true); - } - - /// description - NSString get description { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_description); - return NSString.fromPointer($ret, retain: true, release: true); - } - - /// hash - DartNSUInteger get hash { - final _$$ref = object$.ref; - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_hash); - } - - /// isEqual: - bool isEqual(objc.ObjCObject object) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = object.ref; - return _objc_msgSend_19nvye5( - _$$ref$2.pointer, - _sel_isEqual_, - _$$ref$3.pointer, - ); - } - - /// isKindOfClass: - bool isKindOfClass(objc.ObjCObject aClass) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = aClass.ref; - return _objc_msgSend_19nvye5( - _$$ref$2.pointer, - _sel_isKindOfClass_, - _$$ref$3.pointer, - ); - } - - /// isMemberOfClass: - bool isMemberOfClass(objc.ObjCObject aClass) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = aClass.ref; - return _objc_msgSend_19nvye5( - _$$ref$2.pointer, - _sel_isMemberOfClass_, - _$$ref$3.pointer, - ); - } - - /// isProxy - bool get isProxy { - final _$$ref$1 = object$.ref; - return _objc_msgSend_91o635(_$$ref$1.pointer, _sel_isProxy); - } - - /// performSelector: - objc.ObjCObject performSelector(ffi.Pointer aSelector) { - final _$$ref$1 = object$.ref; - final $ret = _objc_msgSend_3ctkt6( - _$$ref$1.pointer, - _sel_performSelector_, - aSelector, - ); - return objc.ObjCObject($ret, retain: true, release: true); - } - - /// performSelector:withObject: - objc.ObjCObject performSelector$1( - ffi.Pointer aSelector, { - required objc.ObjCObject withObject, - }) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = withObject.ref; - final $ret = _objc_msgSend_gx50so( - _$$ref$2.pointer, - _sel_performSelector_withObject_, - aSelector, - _$$ref$3.pointer, - ); - return objc.ObjCObject($ret, retain: true, release: true); - } - - /// performSelector:withObject:withObject: - objc.ObjCObject performSelector$2( - ffi.Pointer aSelector, { - required objc.ObjCObject withObject, - required objc.ObjCObject withObject$1, - }) { - final _$$ref$3 = object$.ref; - final _$$ref$4 = withObject.ref; - final _$$ref$5 = withObject$1.ref; - final $ret = _objc_msgSend_cfx8ce( - _$$ref$3.pointer, - _sel_performSelector_withObject_withObject_, - aSelector, - _$$ref$4.pointer, - _$$ref$5.pointer, - ); - return objc.ObjCObject($ret, retain: true, release: true); - } - - /// release - void release() { - final _$$ref = object$.ref; - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_release); - } - - /// respondsToSelector: - bool respondsToSelector(ffi.Pointer aSelector) { - final _$$ref = object$.ref; - return _objc_msgSend_1srf6wk( - _$$ref.pointer, - _sel_respondsToSelector_, - aSelector, - ); - } - - /// retain - NSObjectProtocol retain() { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_retain); - return NSObjectProtocol.fromPointer($ret, retain: true, release: true); - } - - /// retainCount - DartNSUInteger retainCount() { - final _$$ref = object$.ref; - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_retainCount); - } - - /// self - NSObjectProtocol self() { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_self); - return NSObjectProtocol.fromPointer($ret, retain: true, release: true); - } - - /// superclass - objc.ObjCObject get superclass { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_superclass); - return objc.ObjCObject($ret, retain: true, release: true); - } - - /// zone - ffi.Pointer zone() { - final _$$ref$1 = object$.ref; - return _objc_msgSend_sz90oi(_$$ref$1.pointer, _sel_zone); - } -} - -interface class NSObjectProtocol$Builder { - /// Returns the [objc.Protocol] object for this protocol. - static objc.Protocol get $protocol => - objc.Protocol.fromPointer(_protocol_NSObject.cast()); - - /// Builds an object that implements the NSObject protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - /// - /// If `$keepIsolateAlive` is true, this protocol will keep this isolate - /// alive until it is garbage collected by both Dart and ObjC. - static NSObjectProtocol implement({ - required objc.ObjCObject Function() autorelease, - required objc.ObjCObject Function() class$, - required bool Function(Protocol) conformsToProtocol_, - NSString Function()? debugDescription, - required NSString Function() description, - required DartNSUInteger Function() hash, - required bool Function(objc.ObjCObject) isEqual_, - required bool Function(objc.ObjCObject) isKindOfClass_, - required bool Function(objc.ObjCObject) isMemberOfClass_, - required bool Function() isProxy, - required objc.ObjCObject Function(ffi.Pointer) - performSelector_, - required objc.ObjCObject Function( - ffi.Pointer, - objc.ObjCObject, - ) - performSelector_withObject_, - required objc.ObjCObject Function( - ffi.Pointer, - objc.ObjCObject, - objc.ObjCObject, - ) - performSelector_withObject_withObject_, - required void Function() release, - required bool Function(ffi.Pointer) respondsToSelector_, - required objc.ObjCObject Function() retain, - required DartNSUInteger Function() retainCount, - required objc.ObjCObject Function() self, - required objc.ObjCObject Function() superclass, - required ffi.Pointer Function() zone, - bool $keepIsolateAlive = true, - }) { - final builder = objc.ObjCProtocolBuilder(debugName: 'NSObject'); - NSObjectProtocol$Builder.autorelease.implement(builder, autorelease); - NSObjectProtocol$Builder.class$.implement(builder, class$); - NSObjectProtocol$Builder.conformsToProtocol_.implement( - builder, - conformsToProtocol_, - ); - NSObjectProtocol$Builder.debugDescription.implement( - builder, - debugDescription, - ); - NSObjectProtocol$Builder.description.implement(builder, description); - NSObjectProtocol$Builder.hash.implement(builder, hash); - NSObjectProtocol$Builder.isEqual_.implement(builder, isEqual_); - NSObjectProtocol$Builder.isKindOfClass_.implement(builder, isKindOfClass_); - NSObjectProtocol$Builder.isMemberOfClass_.implement( - builder, - isMemberOfClass_, - ); - NSObjectProtocol$Builder.isProxy.implement(builder, isProxy); - NSObjectProtocol$Builder.performSelector_.implement( - builder, - performSelector_, - ); - NSObjectProtocol$Builder.performSelector_withObject_.implement( - builder, - performSelector_withObject_, - ); - NSObjectProtocol$Builder.performSelector_withObject_withObject_.implement( - builder, - performSelector_withObject_withObject_, - ); - NSObjectProtocol$Builder.release.implement(builder, release); - NSObjectProtocol$Builder.respondsToSelector_.implement( - builder, - respondsToSelector_, - ); - NSObjectProtocol$Builder.retain.implement(builder, retain); - NSObjectProtocol$Builder.retainCount.implement(builder, retainCount); - NSObjectProtocol$Builder.self.implement(builder, self); - NSObjectProtocol$Builder.superclass.implement(builder, superclass); - NSObjectProtocol$Builder.zone.implement(builder, zone); - builder.addProtocol($protocol); - return NSObjectProtocol.as( - builder.build(keepIsolateAlive: $keepIsolateAlive), - ); - } - - /// Adds the implementation of the NSObject protocol to an existing - /// [objc.ObjCProtocolBuilder]. - /// - /// Note: You cannot call this method after you have called `builder.build`. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, { - required objc.ObjCObject Function() autorelease, - required objc.ObjCObject Function() class$, - required bool Function(Protocol) conformsToProtocol_, - NSString Function()? debugDescription, - required NSString Function() description, - required DartNSUInteger Function() hash, - required bool Function(objc.ObjCObject) isEqual_, - required bool Function(objc.ObjCObject) isKindOfClass_, - required bool Function(objc.ObjCObject) isMemberOfClass_, - required bool Function() isProxy, - required objc.ObjCObject Function(ffi.Pointer) - performSelector_, - required objc.ObjCObject Function( - ffi.Pointer, - objc.ObjCObject, - ) - performSelector_withObject_, - required objc.ObjCObject Function( - ffi.Pointer, - objc.ObjCObject, - objc.ObjCObject, - ) - performSelector_withObject_withObject_, - required void Function() release, - required bool Function(ffi.Pointer) respondsToSelector_, - required objc.ObjCObject Function() retain, - required DartNSUInteger Function() retainCount, - required objc.ObjCObject Function() self, - required objc.ObjCObject Function() superclass, - required ffi.Pointer Function() zone, - bool $keepIsolateAlive = true, - }) { - NSObjectProtocol$Builder.autorelease.implement(builder, autorelease); - NSObjectProtocol$Builder.class$.implement(builder, class$); - NSObjectProtocol$Builder.conformsToProtocol_.implement( - builder, - conformsToProtocol_, - ); - NSObjectProtocol$Builder.debugDescription.implement( - builder, - debugDescription, - ); - NSObjectProtocol$Builder.description.implement(builder, description); - NSObjectProtocol$Builder.hash.implement(builder, hash); - NSObjectProtocol$Builder.isEqual_.implement(builder, isEqual_); - NSObjectProtocol$Builder.isKindOfClass_.implement(builder, isKindOfClass_); - NSObjectProtocol$Builder.isMemberOfClass_.implement( - builder, - isMemberOfClass_, - ); - NSObjectProtocol$Builder.isProxy.implement(builder, isProxy); - NSObjectProtocol$Builder.performSelector_.implement( - builder, - performSelector_, - ); - NSObjectProtocol$Builder.performSelector_withObject_.implement( - builder, - performSelector_withObject_, - ); - NSObjectProtocol$Builder.performSelector_withObject_withObject_.implement( - builder, - performSelector_withObject_withObject_, - ); - NSObjectProtocol$Builder.release.implement(builder, release); - NSObjectProtocol$Builder.respondsToSelector_.implement( - builder, - respondsToSelector_, - ); - NSObjectProtocol$Builder.retain.implement(builder, retain); - NSObjectProtocol$Builder.retainCount.implement(builder, retainCount); - NSObjectProtocol$Builder.self.implement(builder, self); - NSObjectProtocol$Builder.superclass.implement(builder, superclass); - NSObjectProtocol$Builder.zone.implement(builder, zone); - builder.addProtocol($protocol); - } - - /// Builds an object that implements the NSObject protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All - /// methods that can be implemented as listeners will be. - /// - /// If `$keepIsolateAlive` is true, this protocol will keep this isolate - /// alive until it is garbage collected by both Dart and ObjC. - static NSObjectProtocol implementAsListener({ - required objc.ObjCObject Function() autorelease, - required objc.ObjCObject Function() class$, - required bool Function(Protocol) conformsToProtocol_, - NSString Function()? debugDescription, - required NSString Function() description, - required DartNSUInteger Function() hash, - required bool Function(objc.ObjCObject) isEqual_, - required bool Function(objc.ObjCObject) isKindOfClass_, - required bool Function(objc.ObjCObject) isMemberOfClass_, - required bool Function() isProxy, - required objc.ObjCObject Function(ffi.Pointer) - performSelector_, - required objc.ObjCObject Function( - ffi.Pointer, - objc.ObjCObject, - ) - performSelector_withObject_, - required objc.ObjCObject Function( - ffi.Pointer, - objc.ObjCObject, - objc.ObjCObject, - ) - performSelector_withObject_withObject_, - required void Function() release, - required bool Function(ffi.Pointer) respondsToSelector_, - required objc.ObjCObject Function() retain, - required DartNSUInteger Function() retainCount, - required objc.ObjCObject Function() self, - required objc.ObjCObject Function() superclass, - required ffi.Pointer Function() zone, - bool $keepIsolateAlive = true, - }) { - final builder = objc.ObjCProtocolBuilder(debugName: 'NSObject'); - NSObjectProtocol$Builder.autorelease.implement(builder, autorelease); - NSObjectProtocol$Builder.class$.implement(builder, class$); - NSObjectProtocol$Builder.conformsToProtocol_.implement( - builder, - conformsToProtocol_, - ); - NSObjectProtocol$Builder.debugDescription.implement( - builder, - debugDescription, - ); - NSObjectProtocol$Builder.description.implement(builder, description); - NSObjectProtocol$Builder.hash.implement(builder, hash); - NSObjectProtocol$Builder.isEqual_.implement(builder, isEqual_); - NSObjectProtocol$Builder.isKindOfClass_.implement(builder, isKindOfClass_); - NSObjectProtocol$Builder.isMemberOfClass_.implement( - builder, - isMemberOfClass_, - ); - NSObjectProtocol$Builder.isProxy.implement(builder, isProxy); - NSObjectProtocol$Builder.performSelector_.implement( - builder, - performSelector_, - ); - NSObjectProtocol$Builder.performSelector_withObject_.implement( - builder, - performSelector_withObject_, - ); - NSObjectProtocol$Builder.performSelector_withObject_withObject_.implement( - builder, - performSelector_withObject_withObject_, - ); - NSObjectProtocol$Builder.release.implementAsListener(builder, release); - NSObjectProtocol$Builder.respondsToSelector_.implement( - builder, - respondsToSelector_, - ); - NSObjectProtocol$Builder.retain.implement(builder, retain); - NSObjectProtocol$Builder.retainCount.implement(builder, retainCount); - NSObjectProtocol$Builder.self.implement(builder, self); - NSObjectProtocol$Builder.superclass.implement(builder, superclass); - NSObjectProtocol$Builder.zone.implement(builder, zone); - builder.addProtocol($protocol); - return NSObjectProtocol.as( - builder.build(keepIsolateAlive: $keepIsolateAlive), - ); - } - - /// Adds the implementation of the NSObject protocol to an existing - /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will - /// be. - /// - /// Note: You cannot call this method after you have called `builder.build`. - static void addToBuilderAsListener( - objc.ObjCProtocolBuilder builder, { - required objc.ObjCObject Function() autorelease, - required objc.ObjCObject Function() class$, - required bool Function(Protocol) conformsToProtocol_, - NSString Function()? debugDescription, - required NSString Function() description, - required DartNSUInteger Function() hash, - required bool Function(objc.ObjCObject) isEqual_, - required bool Function(objc.ObjCObject) isKindOfClass_, - required bool Function(objc.ObjCObject) isMemberOfClass_, - required bool Function() isProxy, - required objc.ObjCObject Function(ffi.Pointer) - performSelector_, - required objc.ObjCObject Function( - ffi.Pointer, - objc.ObjCObject, - ) - performSelector_withObject_, - required objc.ObjCObject Function( - ffi.Pointer, - objc.ObjCObject, - objc.ObjCObject, - ) - performSelector_withObject_withObject_, - required void Function() release, - required bool Function(ffi.Pointer) respondsToSelector_, - required objc.ObjCObject Function() retain, - required DartNSUInteger Function() retainCount, - required objc.ObjCObject Function() self, - required objc.ObjCObject Function() superclass, - required ffi.Pointer Function() zone, - bool $keepIsolateAlive = true, - }) { - NSObjectProtocol$Builder.autorelease.implement(builder, autorelease); - NSObjectProtocol$Builder.class$.implement(builder, class$); - NSObjectProtocol$Builder.conformsToProtocol_.implement( - builder, - conformsToProtocol_, - ); - NSObjectProtocol$Builder.debugDescription.implement( - builder, - debugDescription, - ); - NSObjectProtocol$Builder.description.implement(builder, description); - NSObjectProtocol$Builder.hash.implement(builder, hash); - NSObjectProtocol$Builder.isEqual_.implement(builder, isEqual_); - NSObjectProtocol$Builder.isKindOfClass_.implement(builder, isKindOfClass_); - NSObjectProtocol$Builder.isMemberOfClass_.implement( - builder, - isMemberOfClass_, - ); - NSObjectProtocol$Builder.isProxy.implement(builder, isProxy); - NSObjectProtocol$Builder.performSelector_.implement( - builder, - performSelector_, - ); - NSObjectProtocol$Builder.performSelector_withObject_.implement( - builder, - performSelector_withObject_, - ); - NSObjectProtocol$Builder.performSelector_withObject_withObject_.implement( - builder, - performSelector_withObject_withObject_, - ); - NSObjectProtocol$Builder.release.implementAsListener(builder, release); - NSObjectProtocol$Builder.respondsToSelector_.implement( - builder, - respondsToSelector_, - ); - NSObjectProtocol$Builder.retain.implement(builder, retain); - NSObjectProtocol$Builder.retainCount.implement(builder, retainCount); - NSObjectProtocol$Builder.self.implement(builder, self); - NSObjectProtocol$Builder.superclass.implement(builder, superclass); - NSObjectProtocol$Builder.zone.implement(builder, zone); - builder.addProtocol($protocol); - } - - /// Builds an object that implements the NSObject protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All - /// methods that can be implemented as blocking listeners will be. - /// - /// If `$keepIsolateAlive` is true, this protocol will keep this isolate - /// alive until it is garbage collected by both Dart and ObjC. - static NSObjectProtocol implementAsBlocking({ - required objc.ObjCObject Function() autorelease, - required objc.ObjCObject Function() class$, - required bool Function(Protocol) conformsToProtocol_, - NSString Function()? debugDescription, - required NSString Function() description, - required DartNSUInteger Function() hash, - required bool Function(objc.ObjCObject) isEqual_, - required bool Function(objc.ObjCObject) isKindOfClass_, - required bool Function(objc.ObjCObject) isMemberOfClass_, - required bool Function() isProxy, - required objc.ObjCObject Function(ffi.Pointer) - performSelector_, - required objc.ObjCObject Function( - ffi.Pointer, - objc.ObjCObject, - ) - performSelector_withObject_, - required objc.ObjCObject Function( - ffi.Pointer, - objc.ObjCObject, - objc.ObjCObject, - ) - performSelector_withObject_withObject_, - required void Function() release, - required bool Function(ffi.Pointer) respondsToSelector_, - required objc.ObjCObject Function() retain, - required DartNSUInteger Function() retainCount, - required objc.ObjCObject Function() self, - required objc.ObjCObject Function() superclass, - required ffi.Pointer Function() zone, - bool $keepIsolateAlive = true, - }) { - final builder = objc.ObjCProtocolBuilder(debugName: 'NSObject'); - NSObjectProtocol$Builder.autorelease.implement(builder, autorelease); - NSObjectProtocol$Builder.class$.implement(builder, class$); - NSObjectProtocol$Builder.conformsToProtocol_.implement( - builder, - conformsToProtocol_, - ); - NSObjectProtocol$Builder.debugDescription.implement( - builder, - debugDescription, - ); - NSObjectProtocol$Builder.description.implement(builder, description); - NSObjectProtocol$Builder.hash.implement(builder, hash); - NSObjectProtocol$Builder.isEqual_.implement(builder, isEqual_); - NSObjectProtocol$Builder.isKindOfClass_.implement(builder, isKindOfClass_); - NSObjectProtocol$Builder.isMemberOfClass_.implement( - builder, - isMemberOfClass_, - ); - NSObjectProtocol$Builder.isProxy.implement(builder, isProxy); - NSObjectProtocol$Builder.performSelector_.implement( - builder, - performSelector_, - ); - NSObjectProtocol$Builder.performSelector_withObject_.implement( - builder, - performSelector_withObject_, - ); - NSObjectProtocol$Builder.performSelector_withObject_withObject_.implement( - builder, - performSelector_withObject_withObject_, - ); - NSObjectProtocol$Builder.release.implementAsBlocking(builder, release); - NSObjectProtocol$Builder.respondsToSelector_.implement( - builder, - respondsToSelector_, - ); - NSObjectProtocol$Builder.retain.implement(builder, retain); - NSObjectProtocol$Builder.retainCount.implement(builder, retainCount); - NSObjectProtocol$Builder.self.implement(builder, self); - NSObjectProtocol$Builder.superclass.implement(builder, superclass); - NSObjectProtocol$Builder.zone.implement(builder, zone); - builder.addProtocol($protocol); - return NSObjectProtocol.as( - builder.build(keepIsolateAlive: $keepIsolateAlive), - ); - } - - /// Adds the implementation of the NSObject protocol to an existing - /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as blocking - /// listeners will be. - /// - /// Note: You cannot call this method after you have called `builder.build`. - static void addToBuilderAsBlocking( - objc.ObjCProtocolBuilder builder, { - required objc.ObjCObject Function() autorelease, - required objc.ObjCObject Function() class$, - required bool Function(Protocol) conformsToProtocol_, - NSString Function()? debugDescription, - required NSString Function() description, - required DartNSUInteger Function() hash, - required bool Function(objc.ObjCObject) isEqual_, - required bool Function(objc.ObjCObject) isKindOfClass_, - required bool Function(objc.ObjCObject) isMemberOfClass_, - required bool Function() isProxy, - required objc.ObjCObject Function(ffi.Pointer) - performSelector_, - required objc.ObjCObject Function( - ffi.Pointer, - objc.ObjCObject, - ) - performSelector_withObject_, - required objc.ObjCObject Function( - ffi.Pointer, - objc.ObjCObject, - objc.ObjCObject, - ) - performSelector_withObject_withObject_, - required void Function() release, - required bool Function(ffi.Pointer) respondsToSelector_, - required objc.ObjCObject Function() retain, - required DartNSUInteger Function() retainCount, - required objc.ObjCObject Function() self, - required objc.ObjCObject Function() superclass, - required ffi.Pointer Function() zone, - bool $keepIsolateAlive = true, - }) { - NSObjectProtocol$Builder.autorelease.implement(builder, autorelease); - NSObjectProtocol$Builder.class$.implement(builder, class$); - NSObjectProtocol$Builder.conformsToProtocol_.implement( - builder, - conformsToProtocol_, - ); - NSObjectProtocol$Builder.debugDescription.implement( - builder, - debugDescription, - ); - NSObjectProtocol$Builder.description.implement(builder, description); - NSObjectProtocol$Builder.hash.implement(builder, hash); - NSObjectProtocol$Builder.isEqual_.implement(builder, isEqual_); - NSObjectProtocol$Builder.isKindOfClass_.implement(builder, isKindOfClass_); - NSObjectProtocol$Builder.isMemberOfClass_.implement( - builder, - isMemberOfClass_, - ); - NSObjectProtocol$Builder.isProxy.implement(builder, isProxy); - NSObjectProtocol$Builder.performSelector_.implement( - builder, - performSelector_, - ); - NSObjectProtocol$Builder.performSelector_withObject_.implement( - builder, - performSelector_withObject_, - ); - NSObjectProtocol$Builder.performSelector_withObject_withObject_.implement( - builder, - performSelector_withObject_withObject_, - ); - NSObjectProtocol$Builder.release.implementAsBlocking(builder, release); - NSObjectProtocol$Builder.respondsToSelector_.implement( - builder, - respondsToSelector_, - ); - NSObjectProtocol$Builder.retain.implement(builder, retain); - NSObjectProtocol$Builder.retainCount.implement(builder, retainCount); - NSObjectProtocol$Builder.self.implement(builder, self); - NSObjectProtocol$Builder.superclass.implement(builder, superclass); - NSObjectProtocol$Builder.zone.implement(builder, zone); - builder.addProtocol($protocol); - } - - /// autorelease - static final autorelease = - objc.ObjCProtocolMethod( - _protocol_NSObject, - _sel_autorelease, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_1mbt9g9) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_autorelease, - isRequired: true, - isInstanceMethod: true, - ), - (objc.ObjCObject Function() func) => - ObjCBlock_objcObjCObjectImpl_ffiVoid.fromFunction( - (ffi.Pointer _) => func(), - ), - ); - - /// class - static final class$ = objc.ObjCProtocolMethod( - _protocol_NSObject, - _sel_class, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_1mbt9g9) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_class, - isRequired: true, - isInstanceMethod: true, - ), - (objc.ObjCObject Function() func) => - ObjCBlock_objcObjCObjectImpl_ffiVoid.fromFunction( - (ffi.Pointer _) => func(), - ), - ); - - /// conformsToProtocol: - static final conformsToProtocol_ = - objc.ObjCProtocolMethod( - _protocol_NSObject, - _sel_conformsToProtocol_, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_3su7tt) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_conformsToProtocol_, - isRequired: true, - isInstanceMethod: true, - ), - (bool Function(Protocol) func) => - ObjCBlock_bool_ffiVoid_Protocol.fromFunction( - (ffi.Pointer _, Protocol arg1) => func(arg1), - ), - ); - - /// debugDescription - static final debugDescription = objc.ObjCProtocolMethod( - _protocol_NSObject, - _sel_debugDescription, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_1mbt9g9) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_debugDescription, - isRequired: false, - isInstanceMethod: true, - ), - (NSString Function() func) => ObjCBlock_NSString_ffiVoid.fromFunction( - (ffi.Pointer _) => func(), - ), - ); - - /// description - static final description = objc.ObjCProtocolMethod( - _protocol_NSObject, - _sel_description, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_1mbt9g9) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_description, - isRequired: true, - isInstanceMethod: true, - ), - (NSString Function() func) => ObjCBlock_NSString_ffiVoid.fromFunction( - (ffi.Pointer _) => func(), - ), - ); - - /// hash - static final hash = objc.ObjCProtocolMethod( - _protocol_NSObject, - _sel_hash, - ffi.Native.addressOf< - ffi.NativeFunction< - NSUInteger Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_1ckyi24) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_hash, - isRequired: true, - isInstanceMethod: true, - ), - (DartNSUInteger Function() func) => - ObjCBlock_NSUInteger_ffiVoid.fromFunction( - (ffi.Pointer _) => func(), - ), - ); - - /// isEqual: - static final isEqual_ = - objc.ObjCProtocolMethod( - _protocol_NSObject, - _sel_isEqual_, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_3su7tt) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_isEqual_, - isRequired: true, - isInstanceMethod: true, - ), - (bool Function(objc.ObjCObject) func) => - ObjCBlock_bool_ffiVoid_objcObjCObjectImpl.fromFunction( - (ffi.Pointer _, objc.ObjCObject arg1) => func(arg1), - ), - ); - - /// isKindOfClass: - static final isKindOfClass_ = - objc.ObjCProtocolMethod( - _protocol_NSObject, - _sel_isKindOfClass_, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_3su7tt) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_isKindOfClass_, - isRequired: true, - isInstanceMethod: true, - ), - (bool Function(objc.ObjCObject) func) => - ObjCBlock_bool_ffiVoid_objcObjCObjectImpl.fromFunction( - (ffi.Pointer _, objc.ObjCObject arg1) => func(arg1), - ), - ); - - /// isMemberOfClass: - static final isMemberOfClass_ = - objc.ObjCProtocolMethod( - _protocol_NSObject, - _sel_isMemberOfClass_, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_3su7tt) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_isMemberOfClass_, - isRequired: true, - isInstanceMethod: true, - ), - (bool Function(objc.ObjCObject) func) => - ObjCBlock_bool_ffiVoid_objcObjCObjectImpl.fromFunction( - (ffi.Pointer _, objc.ObjCObject arg1) => func(arg1), - ), - ); - - /// isProxy - static final isProxy = objc.ObjCProtocolMethod( - _protocol_NSObject, - _sel_isProxy, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_e3qsqz) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_isProxy, - isRequired: true, - isInstanceMethod: true, - ), - (bool Function() func) => ObjCBlock_bool_ffiVoid.fromFunction( - (ffi.Pointer _) => func(), - ), - ); - - /// performSelector: - static final performSelector_ = - objc.ObjCProtocolMethod< - objc.ObjCObject Function(ffi.Pointer) - >( - _protocol_NSObject, - _sel_performSelector_, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_50as9u) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_performSelector_, - isRequired: true, - isInstanceMethod: true, - ), - (objc.ObjCObject Function(ffi.Pointer) func) => - ObjCBlock_objcObjCObjectImpl_ffiVoid_objcObjCSelector.fromFunction( - (ffi.Pointer _, ffi.Pointer arg1) => - func(arg1), - ), - ); - - /// performSelector:withObject: - static final performSelector_withObject_ = - objc.ObjCProtocolMethod< - objc.ObjCObject Function( - ffi.Pointer, - objc.ObjCObject, - ) - >( - _protocol_NSObject, - _sel_performSelector_withObject_, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_1mllhpc) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_performSelector_withObject_, - isRequired: true, - isInstanceMethod: true, - ), - ( - objc.ObjCObject Function( - ffi.Pointer, - objc.ObjCObject, - ) - func, - ) => - ObjCBlock_objcObjCObjectImpl_ffiVoid_objcObjCSelector_objcObjCObjectImpl.fromFunction( - ( - ffi.Pointer _, - ffi.Pointer arg1, - objc.ObjCObject arg2, - ) => func(arg1, arg2), - ), - ); - - /// performSelector:withObject:withObject: - static final performSelector_withObject_withObject_ = - objc.ObjCProtocolMethod< - objc.ObjCObject Function( - ffi.Pointer, - objc.ObjCObject, - objc.ObjCObject, - ) - >( - _protocol_NSObject, - _sel_performSelector_withObject_withObject_, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_c7gk2u) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_performSelector_withObject_withObject_, - isRequired: true, - isInstanceMethod: true, - ), - ( - objc.ObjCObject Function( - ffi.Pointer, - objc.ObjCObject, - objc.ObjCObject, - ) - func, - ) => - ObjCBlock_objcObjCObjectImpl_ffiVoid_objcObjCSelector_objcObjCObjectImpl_objcObjCObjectImpl.fromFunction( - ( - ffi.Pointer _, - ffi.Pointer arg1, - objc.ObjCObject arg2, - objc.ObjCObject arg3, - ) => func(arg1, arg2, arg3), - ), - ); - - /// release - static final release = objc.ObjCProtocolListenableMethod( - _protocol_NSObject, - _sel_release, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_ovsamd) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_release, - isRequired: true, - isInstanceMethod: true, - ), - (void Function() func) => ObjCBlock_ffiVoid_ffiVoid.fromFunction( - (ffi.Pointer _) => func(), - ), - (void Function() func) => - ObjCBlock_ffiVoid_ffiVoid.listener((ffi.Pointer _) => func()), - (void Function() func) => - ObjCBlock_ffiVoid_ffiVoid.blocking((ffi.Pointer _) => func()), - ); - - /// respondsToSelector: - static final respondsToSelector_ = - objc.ObjCProtocolMethod)>( - _protocol_NSObject, - _sel_respondsToSelector_, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_w1e3k0) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_respondsToSelector_, - isRequired: true, - isInstanceMethod: true, - ), - (bool Function(ffi.Pointer) func) => - ObjCBlock_bool_ffiVoid_objcObjCSelector.fromFunction( - (ffi.Pointer _, ffi.Pointer arg1) => - func(arg1), - ), - ); - - /// retain - static final retain = objc.ObjCProtocolMethod( - _protocol_NSObject, - _sel_retain, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_1mbt9g9) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_retain, - isRequired: true, - isInstanceMethod: true, - ), - (objc.ObjCObject Function() func) => - ObjCBlock_objcObjCObjectImpl_ffiVoid.fromFunction( - (ffi.Pointer _) => func(), - ), - ); - - /// retainCount - static final retainCount = objc.ObjCProtocolMethod( - _protocol_NSObject, - _sel_retainCount, - ffi.Native.addressOf< - ffi.NativeFunction< - NSUInteger Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_1ckyi24) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_retainCount, - isRequired: true, - isInstanceMethod: true, - ), - (DartNSUInteger Function() func) => - ObjCBlock_NSUInteger_ffiVoid.fromFunction( - (ffi.Pointer _) => func(), - ), - ); - - /// self - static final self = objc.ObjCProtocolMethod( - _protocol_NSObject, - _sel_self, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_1mbt9g9) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_self, - isRequired: true, - isInstanceMethod: true, - ), - (objc.ObjCObject Function() func) => - ObjCBlock_objcObjCObjectImpl_ffiVoid.fromFunction( - (ffi.Pointer _) => func(), - ), - ); - - /// superclass - static final superclass = objc.ObjCProtocolMethod( - _protocol_NSObject, - _sel_superclass, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_1mbt9g9) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_superclass, - isRequired: true, - isInstanceMethod: true, - ), - (objc.ObjCObject Function() func) => - ObjCBlock_objcObjCObjectImpl_ffiVoid.fromFunction( - (ffi.Pointer _) => func(), - ), - ); - - /// zone - static final zone = objc.ObjCProtocolMethod Function()>( - _protocol_NSObject, - _sel_zone, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_1a8cl66) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_zone, - isRequired: true, - isInstanceMethod: true, - ), - (ffi.Pointer Function() func) => - ObjCBlock_NSZone_ffiVoid.fromFunction( - (ffi.Pointer _) => func(), - ), - ); -} - -/// NSOrderedCollectionChange -extension type NSOrderedCollectionChange._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject { - /// Constructs a [NSOrderedCollectionChange] that points to the same underlying object as [other]. - NSOrderedCollectionChange.as(objc.ObjCObject other) : object$ = other { - objc.checkOsVersionInternal( - 'NSOrderedCollectionChange', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), - ); - assert(isA(object$)); - } - - /// Constructs a [NSOrderedCollectionChange] that wraps the given raw object pointer. - NSOrderedCollectionChange.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - objc.checkOsVersionInternal( - 'NSOrderedCollectionChange', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), - ); - assert(isA(object$)); - } - - /// Returns whether [obj] is an instance of [NSOrderedCollectionChange]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSOrderedCollectionChange, - ); - - /// alloc - static NSOrderedCollectionChange alloc() { - final $ret = _objc_msgSend_151sglz( - _class_NSOrderedCollectionChange, - _sel_alloc, - ); - return NSOrderedCollectionChange.fromPointer( - $ret, - retain: false, - release: true, - ); - } - - /// allocWithZone: - static NSOrderedCollectionChange allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSOrderedCollectionChange, - _sel_allocWithZone_, - zone, - ); - return NSOrderedCollectionChange.fromPointer( - $ret, - retain: false, - release: true, - ); - } - - /// changeWithObject:type:index: - static NSOrderedCollectionChange changeWithObject( - objc.ObjCObject? anObject, { - required NSCollectionChangeType type, - required DartNSUInteger index, - }) { - final _$$ref = anObject?.ref; - objc.checkOsVersionInternal( - 'NSOrderedCollectionChange.changeWithObject:type:index:', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), - ); - final $ret = _objc_msgSend_vbymrb( - _class_NSOrderedCollectionChange, - _sel_changeWithObject_type_index_, - _$$ref?.pointer ?? ffi.nullptr, - type.value, - index, - ); - return NSOrderedCollectionChange.fromPointer( - $ret, - retain: true, - release: true, - ); - } - - /// changeWithObject:type:index:associatedIndex: - static NSOrderedCollectionChange changeWithObject$1( - objc.ObjCObject? anObject, { - required NSCollectionChangeType type, - required DartNSUInteger index, - required DartNSUInteger associatedIndex, - }) { - final _$$ref = anObject?.ref; - objc.checkOsVersionInternal( - 'NSOrderedCollectionChange.changeWithObject:type:index:associatedIndex:', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), - ); - final $ret = _objc_msgSend_1egc1c( - _class_NSOrderedCollectionChange, - _sel_changeWithObject_type_index_associatedIndex_, - _$$ref?.pointer ?? ffi.nullptr, - type.value, - index, - associatedIndex, - ); - return NSOrderedCollectionChange.fromPointer( - $ret, - retain: true, - release: true, - ); - } - - /// new - static NSOrderedCollectionChange new$() { - final $ret = _objc_msgSend_151sglz( - _class_NSOrderedCollectionChange, - _sel_new, - ); - return NSOrderedCollectionChange.fromPointer( - $ret, - retain: false, - release: true, - ); - } - - /// Returns a new instance of NSOrderedCollectionChange constructed with the default `new` method. - NSOrderedCollectionChange() : this.as(new$().object$); -} - -extension NSOrderedCollectionChange$Methods on NSOrderedCollectionChange { - /// associatedIndex - DartNSUInteger get associatedIndex { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSOrderedCollectionChange.associatedIndex', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), - ); - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_associatedIndex); - } - - /// changeType - NSCollectionChangeType get changeType { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSOrderedCollectionChange.changeType', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), - ); - final $ret = _objc_msgSend_hc8exi(_$$ref.pointer, _sel_changeType); - return NSCollectionChangeType.fromValue($ret); - } - - /// index - DartNSUInteger get index { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSOrderedCollectionChange.index', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), - ); - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_index); - } - - /// initWithObject:type:index: - NSOrderedCollectionChange initWithObject( - objc.ObjCObject? anObject, { - required NSCollectionChangeType type, - required DartNSUInteger index, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = anObject?.ref; - objc.checkOsVersionInternal( - 'NSOrderedCollectionChange.initWithObject:type:index:', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), - ); - final $ret = _objc_msgSend_vbymrb( - _$$ref.retainAndReturnPointer(), - _sel_initWithObject_type_index_, - _$$ref$1?.pointer ?? ffi.nullptr, - type.value, - index, - ); - return NSOrderedCollectionChange.fromPointer( - $ret, - retain: false, - release: true, - ); - } - - /// initWithObject:type:index:associatedIndex: - NSOrderedCollectionChange initWithObject$1( - objc.ObjCObject? anObject, { - required NSCollectionChangeType type, - required DartNSUInteger index, - required DartNSUInteger associatedIndex, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = anObject?.ref; - objc.checkOsVersionInternal( - 'NSOrderedCollectionChange.initWithObject:type:index:associatedIndex:', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), - ); - final $ret = _objc_msgSend_1egc1c( - _$$ref.retainAndReturnPointer(), - _sel_initWithObject_type_index_associatedIndex_, - _$$ref$1?.pointer ?? ffi.nullptr, - type.value, - index, - associatedIndex, - ); - return NSOrderedCollectionChange.fromPointer( - $ret, - retain: false, - release: true, - ); - } - - /// object - objc.ObjCObject? get object { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSOrderedCollectionChange.object', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_object); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); - } -} - -/// NSOrderedCollectionDifference -extension type NSOrderedCollectionDifference._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject, NSFastEnumeration { - /// Constructs a [NSOrderedCollectionDifference] that points to the same underlying object as [other]. - NSOrderedCollectionDifference.as(objc.ObjCObject other) : object$ = other { - objc.checkOsVersionInternal( - 'NSOrderedCollectionDifference', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), - ); - assert(isA(object$)); - } - - /// Constructs a [NSOrderedCollectionDifference] that wraps the given raw object pointer. - NSOrderedCollectionDifference.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - objc.checkOsVersionInternal( - 'NSOrderedCollectionDifference', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), - ); - assert(isA(object$)); - } - - /// Returns whether [obj] is an instance of [NSOrderedCollectionDifference]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSOrderedCollectionDifference, - ); - - /// alloc - static NSOrderedCollectionDifference alloc() { - final $ret = _objc_msgSend_151sglz( - _class_NSOrderedCollectionDifference, - _sel_alloc, - ); - return NSOrderedCollectionDifference.fromPointer( - $ret, - retain: false, - release: true, - ); - } - - /// allocWithZone: - static NSOrderedCollectionDifference allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSOrderedCollectionDifference, - _sel_allocWithZone_, - zone, - ); - return NSOrderedCollectionDifference.fromPointer( - $ret, - retain: false, - release: true, - ); - } - - /// new - static NSOrderedCollectionDifference new$() { - final $ret = _objc_msgSend_151sglz( - _class_NSOrderedCollectionDifference, - _sel_new, - ); - return NSOrderedCollectionDifference.fromPointer( - $ret, - retain: false, - release: true, - ); - } - - /// Returns a new instance of NSOrderedCollectionDifference constructed with the default `new` method. - NSOrderedCollectionDifference() : this.as(new$().object$); -} - -extension NSOrderedCollectionDifference$Methods - on NSOrderedCollectionDifference { - /// countByEnumeratingWithState:objects:count: - DartNSUInteger countByEnumeratingWithState( - ffi.Pointer state, { - required ffi.Pointer> objects, - required DartNSUInteger count, - }) { - final _$$ref$5 = object$.ref; - return _objc_msgSend_1b5ysjl( - _$$ref$5.pointer, - _sel_countByEnumeratingWithState_objects_count_, - state, - objects, - count, - ); - } - - /// differenceByTransformingChangesWithBlock: - NSOrderedCollectionDifference differenceByTransformingChangesWithBlock( - objc.ObjCBlock< - NSOrderedCollectionChange Function(NSOrderedCollectionChange) - > - block, - ) { - final _$$ref = object$.ref; - final _$$ref$1 = block.ref; - objc.checkOsVersionInternal( - 'NSOrderedCollectionDifference.differenceByTransformingChangesWithBlock:', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), - ); - final $ret = _objc_msgSend_nnxkei( - _$$ref.pointer, - _sel_differenceByTransformingChangesWithBlock_, - _$$ref$1.pointer, - ); - return NSOrderedCollectionDifference.fromPointer( - $ret, - retain: true, - release: true, - ); - } - - /// hasChanges - bool get hasChanges { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSOrderedCollectionDifference.hasChanges', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), - ); - return _objc_msgSend_91o635(_$$ref.pointer, _sel_hasChanges); - } - - /// init - NSOrderedCollectionDifference init() { - final _$$ref$32 = object$.ref; - objc.checkOsVersionInternal( - 'NSOrderedCollectionDifference.init', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref$32.retainAndReturnPointer(), - _sel_init, - ); - return NSOrderedCollectionDifference.fromPointer( - $ret, - retain: false, - release: true, - ); - } - - /// initWithChanges: - NSOrderedCollectionDifference initWithChanges(NSArray changes) { - final _$$ref = object$.ref; - final _$$ref$1 = changes.ref; - objc.checkOsVersionInternal( - 'NSOrderedCollectionDifference.initWithChanges:', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.retainAndReturnPointer(), - _sel_initWithChanges_, - _$$ref$1.pointer, - ); - return NSOrderedCollectionDifference.fromPointer( - $ret, - retain: false, - release: true, - ); - } - - /// initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects: - NSOrderedCollectionDifference initWithInsertIndexes( - NSIndexSet inserts, { - NSArray? insertedObjects, - required NSIndexSet removeIndexes, - NSArray? removedObjects, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = inserts.ref; - final _$$ref$2 = insertedObjects?.ref; - final _$$ref$3 = removeIndexes.ref; - final _$$ref$4 = removedObjects?.ref; - objc.checkOsVersionInternal( - 'NSOrderedCollectionDifference.initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), - ); - final $ret = _objc_msgSend_s92gih( - _$$ref.retainAndReturnPointer(), - _sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_, - _$$ref$1.pointer, - _$$ref$2?.pointer ?? ffi.nullptr, - _$$ref$3.pointer, - _$$ref$4?.pointer ?? ffi.nullptr, - ); - return NSOrderedCollectionDifference.fromPointer( - $ret, - retain: false, - release: true, - ); - } - - /// initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:additionalChanges: - NSOrderedCollectionDifference initWithInsertIndexes$1( - NSIndexSet inserts, { - NSArray? insertedObjects, - required NSIndexSet removeIndexes, - NSArray? removedObjects, - required NSArray additionalChanges, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = inserts.ref; - final _$$ref$2 = insertedObjects?.ref; - final _$$ref$3 = removeIndexes.ref; - final _$$ref$4 = removedObjects?.ref; - final _$$ref$5 = additionalChanges.ref; - objc.checkOsVersionInternal( - 'NSOrderedCollectionDifference.initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:additionalChanges:', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), - ); - final $ret = _objc_msgSend_3cbdpb( - _$$ref.retainAndReturnPointer(), - _sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges_, - _$$ref$1.pointer, - _$$ref$2?.pointer ?? ffi.nullptr, - _$$ref$3.pointer, - _$$ref$4?.pointer ?? ffi.nullptr, - _$$ref$5.pointer, - ); - return NSOrderedCollectionDifference.fromPointer( - $ret, - retain: false, - release: true, - ); - } - - /// insertions - NSArray get insertions { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSOrderedCollectionDifference.insertions', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_insertions); - return NSArray.fromPointer($ret, retain: true, release: true); - } - - /// inverseDifference - NSOrderedCollectionDifference inverseDifference() { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSOrderedCollectionDifference.inverseDifference', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_inverseDifference); - return NSOrderedCollectionDifference.fromPointer( - $ret, - retain: true, - release: true, - ); - } - - /// removals - NSArray get removals { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSOrderedCollectionDifference.removals', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_removals); - return NSArray.fromPointer($ret, retain: true, release: true); - } -} - -sealed class NSOrderedCollectionDifferenceCalculationOptions { - static const NSOrderedCollectionDifferenceCalculationOmitInsertedObjects = 1; - static const NSOrderedCollectionDifferenceCalculationOmitRemovedObjects = 2; - static const NSOrderedCollectionDifferenceCalculationInferMoves = 4; -} - -/// NSOrderedPerform -extension NSOrderedPerform on NSRunLoop { - /// cancelPerformSelector:target:argument: - void cancelPerformSelector( - ffi.Pointer aSelector, { - required objc.ObjCObject target, - objc.ObjCObject? argument, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = target.ref; - final _$$ref$2 = argument?.ref; - _objc_msgSend_lzbvjm( - _$$ref.pointer, - _sel_cancelPerformSelector_target_argument_, - aSelector, - _$$ref$1.pointer, - _$$ref$2?.pointer ?? ffi.nullptr, - ); - } - - /// cancelPerformSelectorsWithTarget: - void cancelPerformSelectorsWithTarget(objc.ObjCObject target) { - final _$$ref = object$.ref; - final _$$ref$1 = target.ref; - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_cancelPerformSelectorsWithTarget_, - _$$ref$1.pointer, - ); - } - - /// performSelector:target:argument:order:modes: - void performSelector$3( - ffi.Pointer aSelector, { - required objc.ObjCObject target, - objc.ObjCObject? argument, - required DartNSUInteger order, - required NSArray modes, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = target.ref; - final _$$ref$2 = argument?.ref; - final _$$ref$3 = modes.ref; - _objc_msgSend_11hj8md( - _$$ref.pointer, - _sel_performSelector_target_argument_order_modes_, - aSelector, - _$$ref$1.pointer, - _$$ref$2?.pointer ?? ffi.nullptr, - order, - _$$ref$3.pointer, - ); - } -} - -/// NSOrderedSet -extension type NSOrderedSet._(objc.ObjCObject object$) - implements - objc.ObjCObject, - NSObject, - NSCopying, - NSMutableCopying, - NSSecureCoding, - NSFastEnumeration { - /// Constructs a [NSOrderedSet] that points to the same underlying object as [other]. - NSOrderedSet.as(objc.ObjCObject other) : object$ = other { - objc.checkOsVersionInternal( - 'NSOrderedSet', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - assert(isA(object$)); - } - - /// Constructs a [NSOrderedSet] that wraps the given raw object pointer. - NSOrderedSet.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - objc.checkOsVersionInternal( - 'NSOrderedSet', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - assert(isA(object$)); - } - - /// Returns whether [obj] is an instance of [NSOrderedSet]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSOrderedSet, - ); - - /// alloc - static NSOrderedSet alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSOrderedSet, _sel_alloc); - return NSOrderedSet.fromPointer($ret, retain: false, release: true); - } - - /// allocWithZone: - static NSOrderedSet allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSOrderedSet, - _sel_allocWithZone_, - zone, - ); - return NSOrderedSet.fromPointer($ret, retain: false, release: true); - } - - /// new - static NSOrderedSet new$() { - final $ret = _objc_msgSend_151sglz(_class_NSOrderedSet, _sel_new); - return NSOrderedSet.fromPointer($ret, retain: false, release: true); - } - - /// orderedSet - static NSOrderedSet orderedSet() { - objc.checkOsVersionInternal( - 'NSOrderedSet.orderedSet', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_151sglz(_class_NSOrderedSet, _sel_orderedSet); - return NSOrderedSet.fromPointer($ret, retain: true, release: true); - } - - /// orderedSetWithArray: - static NSOrderedSet orderedSetWithArray(NSArray array) { - final _$$ref$1 = array.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.orderedSetWithArray:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _class_NSOrderedSet, - _sel_orderedSetWithArray_, - _$$ref$1.pointer, - ); - return NSOrderedSet.fromPointer($ret, retain: true, release: true); - } - - /// orderedSetWithArray:range:copyItems: - static NSOrderedSet orderedSetWithArray$1( - NSArray array, { - required NSRange range, - required bool copyItems, - }) { - final _$$ref$1 = array.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.orderedSetWithArray:range:copyItems:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_w9bq5x( - _class_NSOrderedSet, - _sel_orderedSetWithArray_range_copyItems_, - _$$ref$1.pointer, - range, - copyItems, - ); - return NSOrderedSet.fromPointer($ret, retain: true, release: true); - } - - /// orderedSetWithObject: - static NSOrderedSet orderedSetWithObject(objc.ObjCObject object) { - final _$$ref$1 = object.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.orderedSetWithObject:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _class_NSOrderedSet, - _sel_orderedSetWithObject_, - _$$ref$1.pointer, - ); - return NSOrderedSet.fromPointer($ret, retain: true, release: true); - } - - /// orderedSetWithObjects: - static NSOrderedSet orderedSetWithObjects(objc.ObjCObject firstObj) { - final _$$ref$1 = firstObj.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.orderedSetWithObjects:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _class_NSOrderedSet, - _sel_orderedSetWithObjects_, - _$$ref$1.pointer, - ); - return NSOrderedSet.fromPointer($ret, retain: true, release: true); - } - - /// orderedSetWithObjects:count: - static NSOrderedSet orderedSetWithObjects$1( - ffi.Pointer> objects, { - required DartNSUInteger count, - }) { - objc.checkOsVersionInternal( - 'NSOrderedSet.orderedSetWithObjects:count:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_zmbtbd( - _class_NSOrderedSet, - _sel_orderedSetWithObjects_count_, - objects, - count, - ); - return NSOrderedSet.fromPointer($ret, retain: true, release: true); - } - - /// orderedSetWithOrderedSet: - static NSOrderedSet orderedSetWithOrderedSet(NSOrderedSet set) { - final _$$ref$1 = set.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.orderedSetWithOrderedSet:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _class_NSOrderedSet, - _sel_orderedSetWithOrderedSet_, - _$$ref$1.pointer, - ); - return NSOrderedSet.fromPointer($ret, retain: true, release: true); - } - - /// orderedSetWithOrderedSet:range:copyItems: - static NSOrderedSet orderedSetWithOrderedSet$1( - NSOrderedSet set, { - required NSRange range, - required bool copyItems, - }) { - final _$$ref$1 = set.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.orderedSetWithOrderedSet:range:copyItems:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_w9bq5x( - _class_NSOrderedSet, - _sel_orderedSetWithOrderedSet_range_copyItems_, - _$$ref$1.pointer, - range, - copyItems, - ); - return NSOrderedSet.fromPointer($ret, retain: true, release: true); - } - - /// orderedSetWithSet: - static NSOrderedSet orderedSetWithSet(NSSet set) { - final _$$ref$1 = set.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.orderedSetWithSet:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _class_NSOrderedSet, - _sel_orderedSetWithSet_, - _$$ref$1.pointer, - ); - return NSOrderedSet.fromPointer($ret, retain: true, release: true); - } - - /// orderedSetWithSet:copyItems: - static NSOrderedSet orderedSetWithSet$1( - NSSet set, { - required bool copyItems, - }) { - final _$$ref$1 = set.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.orderedSetWithSet:copyItems:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_17amj0z( - _class_NSOrderedSet, - _sel_orderedSetWithSet_copyItems_, - _$$ref$1.pointer, - copyItems, - ); - return NSOrderedSet.fromPointer($ret, retain: true, release: true); - } - - /// supportsSecureCoding - static bool getSupportsSecureCoding() { - return _objc_msgSend_91o635(_class_NSOrderedSet, _sel_supportsSecureCoding); - } - - /// Returns a new instance of NSOrderedSet constructed with the default `new` method. - NSOrderedSet() : this.as(new$().object$); -} - -extension NSOrderedSet$Methods on NSOrderedSet { - /// count - DartNSUInteger get count { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.count', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_count); - } - - /// countByEnumeratingWithState:objects:count: - DartNSUInteger countByEnumeratingWithState( - ffi.Pointer state, { - required ffi.Pointer> objects, - required DartNSUInteger count, - }) { - final _$$ref$6 = object$.ref; - return _objc_msgSend_1b5ysjl( - _$$ref$6.pointer, - _sel_countByEnumeratingWithState_objects_count_, - state, - objects, - count, - ); - } - - /// encodeWithCoder: - void encodeWithCoder(NSCoder coder) { - final _$$ref$24 = object$.ref; - final _$$ref$25 = coder.ref; - _objc_msgSend_xtuoz7( - _$$ref$24.pointer, - _sel_encodeWithCoder_, - _$$ref$25.pointer, - ); - } - - /// indexOfObject: - DartNSUInteger indexOfObject(objc.ObjCObject object) { - final _$$ref = object$.ref; - final _$$ref$1 = object.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.indexOfObject:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - return _objc_msgSend_1vd1c5m( - _$$ref.pointer, - _sel_indexOfObject_, - _$$ref$1.pointer, - ); - } - - /// init - NSOrderedSet init() { - final _$$ref$33 = object$.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.init', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref$33.retainAndReturnPointer(), - _sel_init, - ); - return NSOrderedSet.fromPointer($ret, retain: false, release: true); - } - - /// initWithArray: - NSOrderedSet initWithArray(NSArray array) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = array.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.initWithArray:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithArray_, - _$$ref$3.pointer, - ); - return NSOrderedSet.fromPointer($ret, retain: false, release: true); - } - - /// initWithArray:copyItems: - NSOrderedSet initWithArray$1(NSArray set, {required bool copyItems}) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = set.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.initWithArray:copyItems:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_17amj0z( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithArray_copyItems_, - _$$ref$3.pointer, - copyItems, - ); - return NSOrderedSet.fromPointer($ret, retain: false, release: true); - } - - /// initWithArray:range:copyItems: - NSOrderedSet initWithArray$2( - NSArray set, { - required NSRange range, - required bool copyItems, - }) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = set.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.initWithArray:range:copyItems:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_w9bq5x( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithArray_range_copyItems_, - _$$ref$3.pointer, - range, - copyItems, - ); - return NSOrderedSet.fromPointer($ret, retain: false, release: true); - } - - /// initWithCoder: - NSOrderedSet? initWithCoder(NSCoder coder) { - final _$$ref$40 = object$.ref; - final _$$ref$41 = coder.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref$40.retainAndReturnPointer(), - _sel_initWithCoder_, - _$$ref$41.pointer, - ); - return $ret.address == 0 - ? null - : NSOrderedSet.fromPointer($ret, retain: false, release: true); - } - - /// initWithObject: - NSOrderedSet initWithObject(objc.ObjCObject object) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = object.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.initWithObject:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithObject_, - _$$ref$3.pointer, - ); - return NSOrderedSet.fromPointer($ret, retain: false, release: true); - } - - /// initWithObjects: - NSOrderedSet initWithObjects(objc.ObjCObject firstObj) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = firstObj.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.initWithObjects:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithObjects_, - _$$ref$3.pointer, - ); - return NSOrderedSet.fromPointer($ret, retain: false, release: true); - } - - /// initWithObjects:count: - NSOrderedSet initWithObjects$1( - ffi.Pointer> objects, { - required DartNSUInteger count, - }) { - final _$$ref$1 = object$.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.initWithObjects:count:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_zmbtbd( - _$$ref$1.retainAndReturnPointer(), - _sel_initWithObjects_count_, - objects, - count, - ); - return NSOrderedSet.fromPointer($ret, retain: false, release: true); - } - - /// initWithOrderedSet: - NSOrderedSet initWithOrderedSet(NSOrderedSet set) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = set.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.initWithOrderedSet:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithOrderedSet_, - _$$ref$3.pointer, - ); - return NSOrderedSet.fromPointer($ret, retain: false, release: true); - } - - /// initWithOrderedSet:copyItems: - NSOrderedSet initWithOrderedSet$1( - NSOrderedSet set, { - required bool copyItems, - }) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = set.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.initWithOrderedSet:copyItems:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_17amj0z( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithOrderedSet_copyItems_, - _$$ref$3.pointer, - copyItems, - ); - return NSOrderedSet.fromPointer($ret, retain: false, release: true); - } - - /// initWithOrderedSet:range:copyItems: - NSOrderedSet initWithOrderedSet$2( - NSOrderedSet set, { - required NSRange range, - required bool copyItems, - }) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = set.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.initWithOrderedSet:range:copyItems:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_w9bq5x( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithOrderedSet_range_copyItems_, - _$$ref$3.pointer, - range, - copyItems, - ); - return NSOrderedSet.fromPointer($ret, retain: false, release: true); - } - - /// initWithSet: - NSOrderedSet initWithSet(NSSet set) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = set.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.initWithSet:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithSet_, - _$$ref$3.pointer, - ); - return NSOrderedSet.fromPointer($ret, retain: false, release: true); - } - - /// initWithSet:copyItems: - NSOrderedSet initWithSet$1(NSSet set, {required bool copyItems}) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = set.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.initWithSet:copyItems:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_17amj0z( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithSet_copyItems_, - _$$ref$3.pointer, - copyItems, - ); - return NSOrderedSet.fromPointer($ret, retain: false, release: true); - } - - /// objectAtIndex: - objc.ObjCObject objectAtIndex(DartNSUInteger idx) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.objectAtIndex:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_14hpxwa( - _$$ref.pointer, - _sel_objectAtIndex_, - idx, - ); - return objc.ObjCObject($ret, retain: true, release: true); - } -} - -/// NSOrderedSetCreation -extension NSOrderedSetCreation on NSOrderedSet {} - -/// NSOrderedSetDiffing -extension NSOrderedSetDiffing on NSOrderedSet { - /// differenceFromOrderedSet: - NSOrderedCollectionDifference differenceFromOrderedSet(NSOrderedSet other) { - final _$$ref = object$.ref; - final _$$ref$1 = other.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.differenceFromOrderedSet:', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_differenceFromOrderedSet_, - _$$ref$1.pointer, - ); - return NSOrderedCollectionDifference.fromPointer( - $ret, - retain: true, - release: true, - ); - } - - /// differenceFromOrderedSet:withOptions: - NSOrderedCollectionDifference differenceFromOrderedSet$1( - NSOrderedSet other, { - required DartNSUInteger withOptions, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = other.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.differenceFromOrderedSet:withOptions:', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), - ); - final $ret = _objc_msgSend_1wtpmu7( - _$$ref.pointer, - _sel_differenceFromOrderedSet_withOptions_, - _$$ref$1.pointer, - withOptions, - ); - return NSOrderedCollectionDifference.fromPointer( - $ret, - retain: true, - release: true, - ); - } - - /// differenceFromOrderedSet:withOptions:usingEquivalenceTest: - NSOrderedCollectionDifference differenceFromOrderedSet$2( - NSOrderedSet other, { - required DartNSUInteger withOptions, - required objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ) - > - usingEquivalenceTest, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = other.ref; - final _$$ref$2 = usingEquivalenceTest.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.differenceFromOrderedSet:withOptions:usingEquivalenceTest:', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), - ); - final $ret = _objc_msgSend_1415lvo( - _$$ref.pointer, - _sel_differenceFromOrderedSet_withOptions_usingEquivalenceTest_, - _$$ref$1.pointer, - withOptions, - _$$ref$2.pointer, - ); - return NSOrderedCollectionDifference.fromPointer( - $ret, - retain: true, - release: true, - ); - } - - /// orderedSetByApplyingDifference: - NSOrderedSet? orderedSetByApplyingDifference( - NSOrderedCollectionDifference difference, - ) { - final _$$ref = object$.ref; - final _$$ref$1 = difference.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.orderedSetByApplyingDifference:', - iOS: (false, (13, 0, 0)), - macOS: (false, (10, 15, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_orderedSetByApplyingDifference_, - _$$ref$1.pointer, - ); - return $ret.address == 0 - ? null - : NSOrderedSet.fromPointer($ret, retain: true, release: true); - } -} - -/// NSOrthography -/// -/// NSOrthography -extension type NSOrthography._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject, NSCopying, NSSecureCoding { - /// Constructs a [NSOrthography] that points to the same underlying object as [other]. - NSOrthography.as(objc.ObjCObject other) : object$ = other { - objc.checkOsVersionInternal( - 'NSOrthography', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - } - - /// Constructs a [NSOrthography] that wraps the given raw object pointer. - NSOrthography.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - objc.checkOsVersionInternal( - 'NSOrthography', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - } -} - -/// NSOutputStream -extension type NSOutputStream._(objc.ObjCObject object$) - implements objc.ObjCObject, NSStream { - /// Constructs a [NSOutputStream] that points to the same underlying object as [other]. - NSOutputStream.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); - } - - /// Constructs a [NSOutputStream] that wraps the given raw object pointer. - NSOutputStream.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); - } - - /// Returns whether [obj] is an instance of [NSOutputStream]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSOutputStream, - ); - - /// alloc - static NSOutputStream alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSOutputStream, _sel_alloc); - return NSOutputStream.fromPointer($ret, retain: false, release: true); - } - - /// allocWithZone: - static NSOutputStream allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSOutputStream, - _sel_allocWithZone_, - zone, - ); - return NSOutputStream.fromPointer($ret, retain: false, release: true); - } - - /// new - static NSOutputStream new$() { - final $ret = _objc_msgSend_151sglz(_class_NSOutputStream, _sel_new); - return NSOutputStream.fromPointer($ret, retain: false, release: true); - } - - /// outputStreamToBuffer:capacity: - static NSOutputStream outputStreamToBuffer( - ffi.Pointer buffer, { - required DartNSUInteger capacity, - }) { - final $ret = _objc_msgSend_158ju31( - _class_NSOutputStream, - _sel_outputStreamToBuffer_capacity_, - buffer, - capacity, - ); - return NSOutputStream.fromPointer($ret, retain: true, release: true); - } - - /// outputStreamToFileAtPath:append: - static NSOutputStream outputStreamToFileAtPath( - NSString path, { - required bool append, - }) { - final _$$ref = path.ref; - final $ret = _objc_msgSend_17amj0z( - _class_NSOutputStream, - _sel_outputStreamToFileAtPath_append_, - _$$ref.pointer, - append, - ); - return NSOutputStream.fromPointer($ret, retain: true, release: true); - } - - /// outputStreamToMemory - static NSOutputStream outputStreamToMemory() { - final $ret = _objc_msgSend_151sglz( - _class_NSOutputStream, - _sel_outputStreamToMemory, - ); - return NSOutputStream.fromPointer($ret, retain: true, release: true); - } - - /// outputStreamWithURL:append: - static NSOutputStream? outputStreamWithURL( - NSURL url, { - required bool append, - }) { - final _$$ref = url.ref; - objc.checkOsVersionInternal( - 'NSOutputStream.outputStreamWithURL:append:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_17amj0z( - _class_NSOutputStream, - _sel_outputStreamWithURL_append_, - _$$ref.pointer, - append, - ); - return $ret.address == 0 - ? null - : NSOutputStream.fromPointer($ret, retain: true, release: true); - } - - /// Returns a new instance of NSOutputStream constructed with the default `new` method. - NSOutputStream() : this.as(new$().object$); -} - -extension NSOutputStream$Methods on NSOutputStream { - /// hasSpaceAvailable - bool get hasSpaceAvailable { - final _$$ref = object$.ref; - return _objc_msgSend_91o635(_$$ref.pointer, _sel_hasSpaceAvailable); - } - - /// init - NSOutputStream init() { - final _$$ref$34 = object$.ref; - objc.checkOsVersionInternal( - 'NSOutputStream.init', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref$34.retainAndReturnPointer(), - _sel_init, - ); - return NSOutputStream.fromPointer($ret, retain: false, release: true); - } - - /// initToBuffer:capacity: - NSOutputStream initToBuffer( - ffi.Pointer buffer, { - required DartNSUInteger capacity, - }) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_158ju31( - _$$ref.retainAndReturnPointer(), - _sel_initToBuffer_capacity_, - buffer, - capacity, - ); - return NSOutputStream.fromPointer($ret, retain: false, release: true); - } - - /// initToFileAtPath:append: - NSOutputStream? initToFileAtPath(NSString path, {required bool append}) { - final _$$ref = object$.ref; - final _$$ref$1 = path.ref; - final $ret = _objc_msgSend_17amj0z( - _$$ref.retainAndReturnPointer(), - _sel_initToFileAtPath_append_, - _$$ref$1.pointer, - append, - ); - return $ret.address == 0 - ? null - : NSOutputStream.fromPointer($ret, retain: false, release: true); - } - - /// initToMemory - NSOutputStream initToMemory() { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz( - _$$ref.retainAndReturnPointer(), - _sel_initToMemory, - ); - return NSOutputStream.fromPointer($ret, retain: false, release: true); - } - - /// initWithURL:append: - NSOutputStream? initWithURL(NSURL url, {required bool append}) { - final _$$ref = object$.ref; - final _$$ref$1 = url.ref; - objc.checkOsVersionInternal( - 'NSOutputStream.initWithURL:append:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_17amj0z( - _$$ref.retainAndReturnPointer(), - _sel_initWithURL_append_, - _$$ref$1.pointer, - append, - ); - return $ret.address == 0 - ? null - : NSOutputStream.fromPointer($ret, retain: false, release: true); - } - - /// write:maxLength: - int write( - ffi.Pointer buffer, { - required DartNSUInteger maxLength, - }) { - final _$$ref = object$.ref; - return _objc_msgSend_11e9f5x( - _$$ref.pointer, - _sel_write_maxLength_, - buffer, - maxLength, - ); - } -} - -/// NSOutputStreamExtensions -extension NSOutputStreamExtensions on NSOutputStream {} - -/// NSPort -extension type NSPort._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject, NSCopying, NSCoding { - /// Constructs a [NSPort] that points to the same underlying object as [other]. - NSPort.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); - } - - /// Constructs a [NSPort] that wraps the given raw object pointer. - NSPort.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); - } - - /// Returns whether [obj] is an instance of [NSPort]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSPort, - ); - - /// alloc - static NSPort alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSPort, _sel_alloc); - return NSPort.fromPointer($ret, retain: false, release: true); - } - - /// allocWithZone: - static NSPort allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSPort, - _sel_allocWithZone_, - zone, - ); - return NSPort.fromPointer($ret, retain: false, release: true); - } - - /// new - static NSPort new$() { - final $ret = _objc_msgSend_151sglz(_class_NSPort, _sel_new); - return NSPort.fromPointer($ret, retain: false, release: true); - } - - /// port - static NSPort port() { - final $ret = _objc_msgSend_151sglz(_class_NSPort, _sel_port); - return NSPort.fromPointer($ret, retain: true, release: true); - } - - /// Returns a new instance of NSPort constructed with the default `new` method. - NSPort() : this.as(new$().object$); -} - -extension NSPort$Methods on NSPort { - /// addConnection:toRunLoop:forMode: - @Deprecated('Use NSXPCConnection instead') - void addConnection( - NSConnection conn, { - required NSRunLoop toRunLoop, - required NSString forMode, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = conn.ref; - final _$$ref$2 = toRunLoop.ref; - final _$$ref$3 = forMode.ref; - objc.checkOsVersionInternal( - 'NSPort.addConnection:toRunLoop:forMode:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_r8gdi7( - _$$ref.pointer, - _sel_addConnection_toRunLoop_forMode_, - _$$ref$1.pointer, - _$$ref$2.pointer, - _$$ref$3.pointer, - ); - } - - /// delegate - NSPortDelegate? delegate() { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_delegate); - return $ret.address == 0 - ? null - : NSPortDelegate.fromPointer($ret, retain: true, release: true); - } - - /// encodeWithCoder: - void encodeWithCoder(NSCoder coder) { - final _$$ref$26 = object$.ref; - final _$$ref$27 = coder.ref; - _objc_msgSend_xtuoz7( - _$$ref$26.pointer, - _sel_encodeWithCoder_, - _$$ref$27.pointer, - ); - } - - /// init - NSPort init() { - final _$$ref$35 = object$.ref; - objc.checkOsVersionInternal( - 'NSPort.init', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref$35.retainAndReturnPointer(), - _sel_init, - ); - return NSPort.fromPointer($ret, retain: false, release: true); - } - - /// initWithCoder: - NSPort? initWithCoder(NSCoder coder) { - final _$$ref$42 = object$.ref; - final _$$ref$43 = coder.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref$42.retainAndReturnPointer(), - _sel_initWithCoder_, - _$$ref$43.pointer, - ); - return $ret.address == 0 - ? null - : NSPort.fromPointer($ret, retain: false, release: true); - } - - /// invalidate - void invalidate() { - final _$$ref = object$.ref; - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_invalidate); - } - - /// isValid - bool get isValid { - final _$$ref = object$.ref; - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isValid); - } - - /// removeConnection:fromRunLoop:forMode: - @Deprecated('Use NSXPCConnection instead') - void removeConnection( - NSConnection conn, { - required NSRunLoop fromRunLoop, - required NSString forMode, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = conn.ref; - final _$$ref$2 = fromRunLoop.ref; - final _$$ref$3 = forMode.ref; - objc.checkOsVersionInternal( - 'NSPort.removeConnection:fromRunLoop:forMode:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_r8gdi7( - _$$ref.pointer, - _sel_removeConnection_fromRunLoop_forMode_, - _$$ref$1.pointer, - _$$ref$2.pointer, - _$$ref$3.pointer, - ); - } - - /// removeFromRunLoop:forMode: - void removeFromRunLoop(NSRunLoop runLoop, {required NSString forMode}) { - final _$$ref = object$.ref; - final _$$ref$1 = runLoop.ref; - final _$$ref$2 = forMode.ref; - _objc_msgSend_pfv6jd( - _$$ref.pointer, - _sel_removeFromRunLoop_forMode_, - _$$ref$1.pointer, - _$$ref$2.pointer, - ); - } - - /// reservedSpaceLength - DartNSUInteger get reservedSpaceLength { - final _$$ref = object$.ref; - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_reservedSpaceLength); - } - - /// scheduleInRunLoop:forMode: - void scheduleInRunLoop(NSRunLoop runLoop, {required NSString forMode}) { - final _$$ref = object$.ref; - final _$$ref$1 = runLoop.ref; - final _$$ref$2 = forMode.ref; - _objc_msgSend_pfv6jd( - _$$ref.pointer, - _sel_scheduleInRunLoop_forMode_, - _$$ref$1.pointer, - _$$ref$2.pointer, - ); - } - - /// sendBeforeDate:components:from:reserved: - bool sendBeforeDate( - NSDate limitDate, { - NSMutableArray? components, - NSPort? from, - required DartNSUInteger reserved, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = limitDate.ref; - final _$$ref$2 = components?.ref; - final _$$ref$3 = from?.ref; - return _objc_msgSend_1frfu5e( - _$$ref.pointer, - _sel_sendBeforeDate_components_from_reserved_, - _$$ref$1.pointer, - _$$ref$2?.pointer ?? ffi.nullptr, - _$$ref$3?.pointer ?? ffi.nullptr, - reserved, - ); - } - - /// sendBeforeDate:msgid:components:from:reserved: - bool sendBeforeDate$1( - NSDate limitDate, { - required DartNSUInteger msgid, - NSMutableArray? components, - NSPort? from, - required DartNSUInteger reserved, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = limitDate.ref; - final _$$ref$2 = components?.ref; - final _$$ref$3 = from?.ref; - return _objc_msgSend_gupwtj( - _$$ref.pointer, - _sel_sendBeforeDate_msgid_components_from_reserved_, - _$$ref$1.pointer, - msgid, - _$$ref$2?.pointer ?? ffi.nullptr, - _$$ref$3?.pointer ?? ffi.nullptr, - reserved, - ); - } - - /// setDelegate: - void setDelegate(NSPortDelegate? anObject) { - final _$$ref = object$.ref; - final _$$ref$1 = anObject?.ref; - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_setDelegate_, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - } -} - -/// NSPortCoder -/// -/// NSPortCoder -@Deprecated('Use NSXPCConnection instead') -extension type NSPortCoder._(objc.ObjCObject object$) - implements objc.ObjCObject, NSCoder { - /// Constructs a [NSPortCoder] that points to the same underlying object as [other]. - NSPortCoder.as(objc.ObjCObject other) : object$ = other { - objc.checkOsVersionInternal( - 'NSPortCoder', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - } - - /// Constructs a [NSPortCoder] that wraps the given raw object pointer. - NSPortCoder.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - objc.checkOsVersionInternal( - 'NSPortCoder', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - } -} - -/// NSPortDelegate -extension type NSPortDelegate._(objc.ObjCProtocol object$) - implements objc.ObjCProtocol, NSObjectProtocol { - /// Constructs a [NSPortDelegate] that points to the same underlying object as [other]. - NSPortDelegate.as(objc.ObjCObject other) : object$ = other; - - /// Constructs a [NSPortDelegate] that wraps the given raw object pointer. - NSPortDelegate.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); - - /// Returns whether [obj] is an instance of [NSPortDelegate]. - static bool conformsTo(objc.ObjCObject obj) { - return _objc_msgSend_e3qsqz( - obj.ref.pointer, - _sel_conformsToProtocol_, - _protocol_NSPortDelegate, - ); - } -} - -extension NSPortDelegate$Methods on NSPortDelegate { - /// handlePortMessage: - void handlePortMessage(NSPortMessage message) { - final _$$ref = object$.ref; - final _$$ref$1 = message.ref; - if (!objc.respondsToSelector(_$$ref.pointer, _sel_handlePortMessage_)) { - throw objc.UnimplementedOptionalMethodException( - 'NSPortDelegate', - 'handlePortMessage:', - ); - } - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_handlePortMessage_, - _$$ref$1.pointer, - ); - } -} - -interface class NSPortDelegate$Builder { - /// Returns the [objc.Protocol] object for this protocol. - static objc.Protocol get $protocol => - objc.Protocol.fromPointer(_protocol_NSPortDelegate.cast()); - - /// Builds an object that implements the NSPortDelegate protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - /// - /// If `$keepIsolateAlive` is true, this protocol will keep this isolate - /// alive until it is garbage collected by both Dart and ObjC. - static NSPortDelegate implement({ - void Function(NSPortMessage)? handlePortMessage_, - bool $keepIsolateAlive = true, - }) { - final builder = objc.ObjCProtocolBuilder(debugName: 'NSPortDelegate'); - NSPortDelegate$Builder.handlePortMessage_.implement( - builder, - handlePortMessage_, - ); - builder.addProtocol($protocol); - return NSPortDelegate.as( - builder.build(keepIsolateAlive: $keepIsolateAlive), - ); - } - - /// Adds the implementation of the NSPortDelegate protocol to an existing - /// [objc.ObjCProtocolBuilder]. - /// - /// Note: You cannot call this method after you have called `builder.build`. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, { - void Function(NSPortMessage)? handlePortMessage_, - bool $keepIsolateAlive = true, - }) { - NSPortDelegate$Builder.handlePortMessage_.implement( - builder, - handlePortMessage_, - ); - builder.addProtocol($protocol); - } - - /// Builds an object that implements the NSPortDelegate protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All - /// methods that can be implemented as listeners will be. - /// - /// If `$keepIsolateAlive` is true, this protocol will keep this isolate - /// alive until it is garbage collected by both Dart and ObjC. - static NSPortDelegate implementAsListener({ - void Function(NSPortMessage)? handlePortMessage_, - bool $keepIsolateAlive = true, - }) { - final builder = objc.ObjCProtocolBuilder(debugName: 'NSPortDelegate'); - NSPortDelegate$Builder.handlePortMessage_.implementAsListener( - builder, - handlePortMessage_, - ); - builder.addProtocol($protocol); - return NSPortDelegate.as( - builder.build(keepIsolateAlive: $keepIsolateAlive), - ); - } - - /// Adds the implementation of the NSPortDelegate protocol to an existing - /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will - /// be. - /// - /// Note: You cannot call this method after you have called `builder.build`. - static void addToBuilderAsListener( - objc.ObjCProtocolBuilder builder, { - void Function(NSPortMessage)? handlePortMessage_, - bool $keepIsolateAlive = true, - }) { - NSPortDelegate$Builder.handlePortMessage_.implementAsListener( - builder, - handlePortMessage_, - ); - builder.addProtocol($protocol); - } - - /// Builds an object that implements the NSPortDelegate protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All - /// methods that can be implemented as blocking listeners will be. - /// - /// If `$keepIsolateAlive` is true, this protocol will keep this isolate - /// alive until it is garbage collected by both Dart and ObjC. - static NSPortDelegate implementAsBlocking({ - void Function(NSPortMessage)? handlePortMessage_, - bool $keepIsolateAlive = true, - }) { - final builder = objc.ObjCProtocolBuilder(debugName: 'NSPortDelegate'); - NSPortDelegate$Builder.handlePortMessage_.implementAsBlocking( - builder, - handlePortMessage_, - ); - builder.addProtocol($protocol); - return NSPortDelegate.as( - builder.build(keepIsolateAlive: $keepIsolateAlive), - ); - } - - /// Adds the implementation of the NSPortDelegate protocol to an existing - /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as blocking - /// listeners will be. - /// - /// Note: You cannot call this method after you have called `builder.build`. - static void addToBuilderAsBlocking( - objc.ObjCProtocolBuilder builder, { - void Function(NSPortMessage)? handlePortMessage_, - bool $keepIsolateAlive = true, - }) { - NSPortDelegate$Builder.handlePortMessage_.implementAsBlocking( - builder, - handlePortMessage_, - ); - builder.addProtocol($protocol); - } - - /// handlePortMessage: - static final handlePortMessage_ = - objc.ObjCProtocolListenableMethod( - _protocol_NSPortDelegate, - _sel_handlePortMessage_, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_18v1jvf) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSPortDelegate, - _sel_handlePortMessage_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSPortMessage) func) => - ObjCBlock_ffiVoid_ffiVoid_NSPortMessage.fromFunction( - (ffi.Pointer _, NSPortMessage arg1) => func(arg1), - ), - (void Function(NSPortMessage) func) => - ObjCBlock_ffiVoid_ffiVoid_NSPortMessage.listener( - (ffi.Pointer _, NSPortMessage arg1) => func(arg1), - ), - (void Function(NSPortMessage) func) => - ObjCBlock_ffiVoid_ffiVoid_NSPortMessage.blocking( - (ffi.Pointer _, NSPortMessage arg1) => func(arg1), - ), - ); -} - -/// NSPortMessage -extension type NSPortMessage._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject { - /// Constructs a [NSPortMessage] that points to the same underlying object as [other]. - NSPortMessage.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); - } - - /// Constructs a [NSPortMessage] that wraps the given raw object pointer. - NSPortMessage.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); - } - - /// Returns whether [obj] is an instance of [NSPortMessage]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSPortMessage, - ); - - /// alloc - static NSPortMessage alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSPortMessage, _sel_alloc); - return NSPortMessage.fromPointer($ret, retain: false, release: true); - } - - /// allocWithZone: - static NSPortMessage allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSPortMessage, - _sel_allocWithZone_, - zone, - ); - return NSPortMessage.fromPointer($ret, retain: false, release: true); - } - - /// new - static NSPortMessage new$() { - final $ret = _objc_msgSend_151sglz(_class_NSPortMessage, _sel_new); - return NSPortMessage.fromPointer($ret, retain: false, release: true); - } - - /// Returns a new instance of NSPortMessage constructed with the default `new` method. - NSPortMessage() : this.as(new$().object$); -} - -extension NSPortMessage$Methods on NSPortMessage { - /// components - NSArray? get components { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_components); - return $ret.address == 0 - ? null - : NSArray.fromPointer($ret, retain: true, release: true); - } - - /// init - NSPortMessage init() { - final _$$ref$36 = object$.ref; - objc.checkOsVersionInternal( - 'NSPortMessage.init', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref$36.retainAndReturnPointer(), - _sel_init, - ); - return NSPortMessage.fromPointer($ret, retain: false, release: true); - } - - /// initWithSendPort:receivePort:components: - NSPortMessage initWithSendPort( - NSPort? sendPort, { - NSPort? receivePort, - NSArray? components, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = sendPort?.ref; - final _$$ref$2 = receivePort?.ref; - final _$$ref$3 = components?.ref; - final $ret = _objc_msgSend_11spmsz( - _$$ref.retainAndReturnPointer(), - _sel_initWithSendPort_receivePort_components_, - _$$ref$1?.pointer ?? ffi.nullptr, - _$$ref$2?.pointer ?? ffi.nullptr, - _$$ref$3?.pointer ?? ffi.nullptr, - ); - return NSPortMessage.fromPointer($ret, retain: false, release: true); - } - - /// msgid - int get msgid { - final _$$ref = object$.ref; - return _objc_msgSend_usggvf(_$$ref.pointer, _sel_msgid); - } - - /// receivePort - NSPort? get receivePort { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_receivePort); - return $ret.address == 0 - ? null - : NSPort.fromPointer($ret, retain: true, release: true); - } - - /// sendBeforeDate: - bool sendBeforeDate(NSDate date) { - final _$$ref = object$.ref; - final _$$ref$1 = date.ref; - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_sendBeforeDate_, - _$$ref$1.pointer, - ); - } - - /// sendPort - NSPort? get sendPort { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_sendPort); - return $ret.address == 0 - ? null - : NSPort.fromPointer($ret, retain: true, release: true); - } - - /// setMsgid: - set msgid(int value) { - final _$$ref = object$.ref; - _objc_msgSend_1xpk2hb(_$$ref.pointer, _sel_setMsgid_, value); - } -} - -/// NSPredicate -/// -/// NSPredicate -extension type NSPredicate._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject, NSSecureCoding, NSCopying { - /// Constructs a [NSPredicate] that points to the same underlying object as [other]. - NSPredicate.as(objc.ObjCObject other) : object$ = other { - objc.checkOsVersionInternal( - 'NSPredicate', - iOS: (false, (3, 0, 0)), - macOS: (false, (10, 4, 0)), - ); - } - - /// Constructs a [NSPredicate] that wraps the given raw object pointer. - NSPredicate.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - objc.checkOsVersionInternal( - 'NSPredicate', - iOS: (false, (3, 0, 0)), - macOS: (false, (10, 4, 0)), - ); - } -} - -/// NSPredicateSupport -extension NSPredicateSupport on NSSet { - /// filteredSetUsingPredicate: - NSSet filteredSetUsingPredicate(NSPredicate predicate) { - final _$$ref = object$.ref; - final _$$ref$1 = predicate.ref; - objc.checkOsVersionInternal( - 'NSSet.filteredSetUsingPredicate:', - iOS: (false, (3, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_filteredSetUsingPredicate_, - _$$ref$1.pointer, - ); - return NSSet.fromPointer($ret, retain: true, release: true); - } -} - -/// NSPredicateSupport -extension NSPredicateSupport$1 on NSMutableArray { - /// filterUsingPredicate: - void filterUsingPredicate(NSPredicate predicate) { - final _$$ref = object$.ref; - final _$$ref$1 = predicate.ref; - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_filterUsingPredicate_, - _$$ref$1.pointer, - ); - } -} - -/// NSPredicateSupport -extension NSPredicateSupport$2 on NSOrderedSet { - /// filteredOrderedSetUsingPredicate: - NSOrderedSet filteredOrderedSetUsingPredicate(NSPredicate p) { - final _$$ref = object$.ref; - final _$$ref$1 = p.ref; - objc.checkOsVersionInternal( - 'NSOrderedSet.filteredOrderedSetUsingPredicate:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_filteredOrderedSetUsingPredicate_, - _$$ref$1.pointer, - ); - return NSOrderedSet.fromPointer($ret, retain: true, release: true); - } -} - -/// NSPredicateSupport -extension NSPredicateSupport$3 on NSMutableOrderedSet { - /// filterUsingPredicate: - void filterUsingPredicate(NSPredicate p) { - final _$$ref = object$.ref; - final _$$ref$1 = p.ref; - objc.checkOsVersionInternal( - 'NSMutableOrderedSet.filterUsingPredicate:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_filterUsingPredicate_, - _$$ref$1.pointer, - ); - } -} - -/// NSPredicateSupport -extension NSPredicateSupport$4 on NSMutableSet { - /// filterUsingPredicate: - void filterUsingPredicate(NSPredicate predicate) { - final _$$ref = object$.ref; - final _$$ref$1 = predicate.ref; - objc.checkOsVersionInternal( - 'NSMutableSet.filterUsingPredicate:', - iOS: (false, (3, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_filterUsingPredicate_, - _$$ref$1.pointer, - ); - } -} - -/// NSPredicateSupport -extension NSPredicateSupport$5 on NSArray { - /// filteredArrayUsingPredicate: - NSArray filteredArrayUsingPredicate(NSPredicate predicate) { - final _$$ref = object$.ref; - final _$$ref$1 = predicate.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_filteredArrayUsingPredicate_, - _$$ref$1.pointer, - ); - return NSArray.fromPointer($ret, retain: true, release: true); - } -} - -/// NSPreviewSupport -extension NSPreviewSupport on NSItemProvider$2 { - /// loadPreviewImageWithOptions:completionHandler: - void loadPreviewImageWithOptions( - NSDictionary options, { - required objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - > - completionHandler, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = options.ref; - final _$$ref$2 = completionHandler.ref; - objc.checkOsVersionInternal( - 'NSItemProvider.loadPreviewImageWithOptions:completionHandler:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), - ); - _objc_msgSend_o762yo( - _$$ref.pointer, - _sel_loadPreviewImageWithOptions_completionHandler_, - _$$ref$1.pointer, - _$$ref$2.pointer, - ); - } - - /// previewImageHandler - objc.ObjCBlock< - ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, - ffi.Pointer, - NSDictionary, - ) - >? - get previewImageHandler { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSItemProvider.previewImageHandler', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), - ); - final $ret = _objc_msgSend_uwvaik(_$$ref.pointer, _sel_previewImageHandler); - return $ret.address == 0 - ? null - : ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObjectImpl_NSDictionary.fromPointer( - $ret, - retain: true, - release: true, - ); - } - - /// setPreviewImageHandler: - set previewImageHandler( - objc.ObjCBlock< - ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, - ffi.Pointer, - NSDictionary, - ) - >? - value, - ) { - final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; - objc.checkOsVersionInternal( - 'NSItemProvider.setPreviewImageHandler:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), - ); - _objc_msgSend_f167m6( - _$$ref.pointer, - _sel_setPreviewImageHandler_, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - } -} - -/// NSProgress -extension type NSProgress._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject { - /// Constructs a [NSProgress] that points to the same underlying object as [other]. - NSProgress.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); - } - - /// Constructs a [NSProgress] that wraps the given raw object pointer. - NSProgress.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); - } - - /// Returns whether [obj] is an instance of [NSProgress]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSProgress, - ); - - /// addSubscriberForFileURL:withPublishingHandler: - static objc.ObjCObject addSubscriberForFileURL( - NSURL url, { - required objc.ObjCBlock< - objc.ObjCBlock? Function(NSProgress) - > - withPublishingHandler, - }) { - final _$$ref = url.ref; - final _$$ref$1 = withPublishingHandler.ref; - objc.checkOsVersionInternal( - 'NSProgress.addSubscriberForFileURL:withPublishingHandler:', - iOS: (true, null), - macOS: (false, (10, 9, 0)), - ); - final $ret = _objc_msgSend_r0bo0s( - _class_NSProgress, - _sel_addSubscriberForFileURL_withPublishingHandler_, - _$$ref.pointer, - _$$ref$1.pointer, - ); - return objc.ObjCObject($ret, retain: true, release: true); - } - - /// alloc - static NSProgress alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSProgress, _sel_alloc); - return NSProgress.fromPointer($ret, retain: false, release: true); - } - - /// allocWithZone: - static NSProgress allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSProgress, - _sel_allocWithZone_, - zone, - ); - return NSProgress.fromPointer($ret, retain: false, release: true); - } - - /// currentProgress - static NSProgress? currentProgress() { - objc.checkOsVersionInternal( - 'NSProgress.currentProgress', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - final $ret = _objc_msgSend_151sglz(_class_NSProgress, _sel_currentProgress); - return $ret.address == 0 - ? null - : NSProgress.fromPointer($ret, retain: true, release: true); - } - - /// discreteProgressWithTotalUnitCount: - static NSProgress discreteProgressWithTotalUnitCount(int unitCount) { - objc.checkOsVersionInternal( - 'NSProgress.discreteProgressWithTotalUnitCount:', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), - ); - final $ret = _objc_msgSend_1ya1kjn( - _class_NSProgress, - _sel_discreteProgressWithTotalUnitCount_, - unitCount, - ); - return NSProgress.fromPointer($ret, retain: true, release: true); - } - - /// new - static NSProgress new$() { - final $ret = _objc_msgSend_151sglz(_class_NSProgress, _sel_new); - return NSProgress.fromPointer($ret, retain: false, release: true); - } - - /// progressWithTotalUnitCount: - static NSProgress progressWithTotalUnitCount(int unitCount) { - objc.checkOsVersionInternal( - 'NSProgress.progressWithTotalUnitCount:', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - final $ret = _objc_msgSend_1ya1kjn( - _class_NSProgress, - _sel_progressWithTotalUnitCount_, - unitCount, - ); - return NSProgress.fromPointer($ret, retain: true, release: true); - } - - /// progressWithTotalUnitCount:parent:pendingUnitCount: - static NSProgress progressWithTotalUnitCount$1( - int unitCount, { - required NSProgress parent, - required int pendingUnitCount, - }) { - final _$$ref = parent.ref; - objc.checkOsVersionInternal( - 'NSProgress.progressWithTotalUnitCount:parent:pendingUnitCount:', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), - ); - final $ret = _objc_msgSend_553v( - _class_NSProgress, - _sel_progressWithTotalUnitCount_parent_pendingUnitCount_, - unitCount, - _$$ref.pointer, - pendingUnitCount, - ); - return NSProgress.fromPointer($ret, retain: true, release: true); - } - - /// removeSubscriber: - static void removeSubscriber(objc.ObjCObject subscriber) { - final _$$ref = subscriber.ref; - objc.checkOsVersionInternal( - 'NSProgress.removeSubscriber:', - iOS: (true, null), - macOS: (false, (10, 9, 0)), - ); - _objc_msgSend_xtuoz7( - _class_NSProgress, - _sel_removeSubscriber_, - _$$ref.pointer, - ); - } - - /// Returns a new instance of NSProgress constructed with the default `new` method. - NSProgress() : this.as(new$().object$); -} - -extension NSProgress$Methods on NSProgress { - /// addChild:withPendingUnitCount: - void addChild(NSProgress child, {required int withPendingUnitCount}) { - final _$$ref = object$.ref; - final _$$ref$1 = child.ref; - objc.checkOsVersionInternal( - 'NSProgress.addChild:withPendingUnitCount:', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), - ); - _objc_msgSend_1m7prh1( - _$$ref.pointer, - _sel_addChild_withPendingUnitCount_, - _$$ref$1.pointer, - withPendingUnitCount, - ); - } - - /// becomeCurrentWithPendingUnitCount: - void becomeCurrentWithPendingUnitCount(int unitCount) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.becomeCurrentWithPendingUnitCount:', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - _objc_msgSend_17gvxvj( - _$$ref.pointer, - _sel_becomeCurrentWithPendingUnitCount_, - unitCount, - ); - } - - /// cancel - void cancel() { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.cancel', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_cancel); - } - - /// cancellationHandler - objc.ObjCBlock? get cancellationHandler { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.cancellationHandler', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - final $ret = _objc_msgSend_uwvaik(_$$ref.pointer, _sel_cancellationHandler); - return $ret.address == 0 - ? null - : ObjCBlock_ffiVoid.fromPointer($ret, retain: true, release: true); - } - - /// completedUnitCount - int get completedUnitCount { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.completedUnitCount', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - return _objc_msgSend_pysgoz(_$$ref.pointer, _sel_completedUnitCount); - } - - /// estimatedTimeRemaining - NSNumber? get estimatedTimeRemaining { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.estimatedTimeRemaining', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_estimatedTimeRemaining, - ); - return $ret.address == 0 - ? null - : NSNumber.fromPointer($ret, retain: true, release: true); - } - - /// fileCompletedCount - NSNumber? get fileCompletedCount { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.fileCompletedCount', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_fileCompletedCount); - return $ret.address == 0 - ? null - : NSNumber.fromPointer($ret, retain: true, release: true); - } - - /// fileOperationKind - NSString? get fileOperationKind { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.fileOperationKind', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_fileOperationKind); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); - } - - /// fileTotalCount - NSNumber? get fileTotalCount { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.fileTotalCount', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_fileTotalCount); - return $ret.address == 0 - ? null - : NSNumber.fromPointer($ret, retain: true, release: true); - } - - /// fileURL - NSURL? get fileURL { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.fileURL', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_fileURL); - return $ret.address == 0 - ? null - : NSURL.fromPointer($ret, retain: true, release: true); - } - - /// fractionCompleted - double get fractionCompleted { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.fractionCompleted', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - return objc.useMsgSendVariants - ? _objc_msgSend_1ukqyt8Fpret(_$$ref.pointer, _sel_fractionCompleted) - : _objc_msgSend_1ukqyt8(_$$ref.pointer, _sel_fractionCompleted); - } - - /// init - NSProgress init() { - final _$$ref$37 = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.init', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref$37.retainAndReturnPointer(), - _sel_init, - ); - return NSProgress.fromPointer($ret, retain: false, release: true); - } - - /// initWithParent:userInfo: - NSProgress initWithParent( - NSProgress? parentProgressOrNil, { - NSDictionary? userInfo, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = parentProgressOrNil?.ref; - final _$$ref$2 = userInfo?.ref; - objc.checkOsVersionInternal( - 'NSProgress.initWithParent:userInfo:', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - final $ret = _objc_msgSend_15qeuct( - _$$ref.retainAndReturnPointer(), - _sel_initWithParent_userInfo_, - _$$ref$1?.pointer ?? ffi.nullptr, - _$$ref$2?.pointer ?? ffi.nullptr, - ); - return NSProgress.fromPointer($ret, retain: false, release: true); - } - - /// isCancellable - bool get isCancellable { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.isCancellable', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isCancellable); - } - - /// isCancelled - bool get isCancelled { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.isCancelled', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isCancelled); - } - - /// isFinished - bool get isFinished { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.isFinished', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isFinished); - } - - /// isIndeterminate - bool get isIndeterminate { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.isIndeterminate', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isIndeterminate); - } - - /// isOld - bool get isOld { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.isOld', - iOS: (true, null), - macOS: (false, (10, 9, 0)), - ); - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isOld); - } - - /// isPausable - bool get isPausable { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.isPausable', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isPausable); - } - - /// isPaused - bool get isPaused { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.isPaused', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isPaused); - } - - /// kind - NSString? get kind { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.kind', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_kind); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); - } - - /// localizedAdditionalDescription - NSString get localizedAdditionalDescription { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.localizedAdditionalDescription', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_localizedAdditionalDescription, - ); - return NSString.fromPointer($ret, retain: true, release: true); - } - - /// localizedDescription - NSString get localizedDescription { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.localizedDescription', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_localizedDescription, - ); - return NSString.fromPointer($ret, retain: true, release: true); - } - - /// pause - void pause() { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.pause', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_pause); - } - - /// pausingHandler - objc.ObjCBlock? get pausingHandler { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.pausingHandler', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - final $ret = _objc_msgSend_uwvaik(_$$ref.pointer, _sel_pausingHandler); - return $ret.address == 0 - ? null - : ObjCBlock_ffiVoid.fromPointer($ret, retain: true, release: true); - } - - /// performAsCurrentWithPendingUnitCount:usingBlock: - void performAsCurrentWithPendingUnitCount( - int unitCount, { - required objc.ObjCBlock usingBlock, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = usingBlock.ref; - objc.checkOsVersionInternal( - 'NSProgress.performAsCurrentWithPendingUnitCount:usingBlock:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - _objc_msgSend_1i0cxyc( - _$$ref.pointer, - _sel_performAsCurrentWithPendingUnitCount_usingBlock_, - unitCount, - _$$ref$1.pointer, - ); - } - - /// publish - void publish() { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.publish', - iOS: (true, null), - macOS: (false, (10, 9, 0)), - ); - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_publish); - } - - /// resignCurrent - void resignCurrent() { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.resignCurrent', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_resignCurrent); - } - - /// resume - void resume() { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.resume', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), - ); - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_resume); - } - - /// resumingHandler - objc.ObjCBlock? get resumingHandler { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.resumingHandler', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), - ); - final $ret = _objc_msgSend_uwvaik(_$$ref.pointer, _sel_resumingHandler); - return $ret.address == 0 - ? null - : ObjCBlock_ffiVoid.fromPointer($ret, retain: true, release: true); - } - - /// setCancellable: - set isCancellable(bool value) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.setCancellable:', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - _objc_msgSend_1s56lr9(_$$ref.pointer, _sel_setCancellable_, value); - } - - /// setCancellationHandler: - set cancellationHandler(objc.ObjCBlock? value) { - final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; - objc.checkOsVersionInternal( - 'NSProgress.setCancellationHandler:', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - _objc_msgSend_f167m6( - _$$ref.pointer, - _sel_setCancellationHandler_, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - } - - /// setCompletedUnitCount: - set completedUnitCount(int value) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.setCompletedUnitCount:', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - _objc_msgSend_17gvxvj(_$$ref.pointer, _sel_setCompletedUnitCount_, value); - } - - /// setEstimatedTimeRemaining: - set estimatedTimeRemaining(NSNumber? value) { - final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; - objc.checkOsVersionInternal( - 'NSProgress.setEstimatedTimeRemaining:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_setEstimatedTimeRemaining_, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - } - - /// setFileCompletedCount: - set fileCompletedCount(NSNumber? value) { - final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; - objc.checkOsVersionInternal( - 'NSProgress.setFileCompletedCount:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_setFileCompletedCount_, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - } - - /// setFileOperationKind: - set fileOperationKind(NSString? value) { - final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; - objc.checkOsVersionInternal( - 'NSProgress.setFileOperationKind:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_setFileOperationKind_, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - } - - /// setFileTotalCount: - set fileTotalCount(NSNumber? value) { - final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; - objc.checkOsVersionInternal( - 'NSProgress.setFileTotalCount:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_setFileTotalCount_, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - } - - /// setFileURL: - set fileURL(NSURL? value) { - final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; - objc.checkOsVersionInternal( - 'NSProgress.setFileURL:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_setFileURL_, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - } - - /// setKind: - set kind(NSString? value) { - final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; - objc.checkOsVersionInternal( - 'NSProgress.setKind:', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_setKind_, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - } - - /// setLocalizedAdditionalDescription: - set localizedAdditionalDescription(NSString value) { - final _$$ref = object$.ref; - final _$$ref$1 = value.ref; - objc.checkOsVersionInternal( - 'NSProgress.setLocalizedAdditionalDescription:', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_setLocalizedAdditionalDescription_, - _$$ref$1.pointer, - ); - } - - /// setLocalizedDescription: - set localizedDescription(NSString value) { - final _$$ref = object$.ref; - final _$$ref$1 = value.ref; - objc.checkOsVersionInternal( - 'NSProgress.setLocalizedDescription:', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_setLocalizedDescription_, - _$$ref$1.pointer, - ); - } - - /// setPausable: - set isPausable(bool value) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.setPausable:', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - _objc_msgSend_1s56lr9(_$$ref.pointer, _sel_setPausable_, value); - } - - /// setPausingHandler: - set pausingHandler(objc.ObjCBlock? value) { - final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; - objc.checkOsVersionInternal( - 'NSProgress.setPausingHandler:', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - _objc_msgSend_f167m6( - _$$ref.pointer, - _sel_setPausingHandler_, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - } - - /// setResumingHandler: - set resumingHandler(objc.ObjCBlock? value) { - final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; - objc.checkOsVersionInternal( - 'NSProgress.setResumingHandler:', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), - ); - _objc_msgSend_f167m6( - _$$ref.pointer, - _sel_setResumingHandler_, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - } - - /// setThroughput: - set throughput(NSNumber? value) { - final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; - objc.checkOsVersionInternal( - 'NSProgress.setThroughput:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_setThroughput_, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - } - - /// setTotalUnitCount: - set totalUnitCount(int value) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.setTotalUnitCount:', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - _objc_msgSend_17gvxvj(_$$ref.pointer, _sel_setTotalUnitCount_, value); - } - - /// setUserInfoObject:forKey: - void setUserInfoObject( - objc.ObjCObject? objectOrNil, { - required NSString forKey, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = objectOrNil?.ref; - final _$$ref$2 = forKey.ref; - objc.checkOsVersionInternal( - 'NSProgress.setUserInfoObject:forKey:', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - _objc_msgSend_pfv6jd( - _$$ref.pointer, - _sel_setUserInfoObject_forKey_, - _$$ref$1?.pointer ?? ffi.nullptr, - _$$ref$2.pointer, - ); - } - - /// throughput - NSNumber? get throughput { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.throughput', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_throughput); - return $ret.address == 0 - ? null - : NSNumber.fromPointer($ret, retain: true, release: true); - } - - /// totalUnitCount - int get totalUnitCount { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.totalUnitCount', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - return _objc_msgSend_pysgoz(_$$ref.pointer, _sel_totalUnitCount); - } - - /// unpublish - void unpublish() { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.unpublish', - iOS: (true, null), - macOS: (false, (10, 9, 0)), - ); - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_unpublish); - } - - /// userInfo - NSDictionary get userInfo { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSProgress.userInfo', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_userInfo); - return NSDictionary.fromPointer($ret, retain: true, release: true); - } -} - -/// NSPromisedItems -extension NSPromisedItems on NSURL { - /// checkPromisedItemIsReachableAndReturnError: - bool checkPromisedItemIsReachableAndReturnError() { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.checkPromisedItemIsReachableAndReturnError:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), - ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1dom33q( - _$$ref.pointer, - _sel_checkPromisedItemIsReachableAndReturnError_, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret; - } finally { - pkg_ffi.calloc.free($err); - } - } - - /// getPromisedItemResourceValue:forKey:error: - bool getPromisedItemResourceValue( - ffi.Pointer> value, { - required NSString forKey, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = forKey.ref; - objc.checkOsVersionInternal( - 'NSURL.getPromisedItemResourceValue:forKey:error:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), - ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1j9bhml( - _$$ref.pointer, - _sel_getPromisedItemResourceValue_forKey_error_, - value, - _$$ref$1.pointer, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret; - } finally { - pkg_ffi.calloc.free($err); - } - } - - /// promisedItemResourceValuesForKeys:error: - NSDictionary? promisedItemResourceValuesForKeys(NSArray keys) { - final _$$ref = object$.ref; - final _$$ref$1 = keys.ref; - objc.checkOsVersionInternal( - 'NSURL.promisedItemResourceValuesForKeys:error:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), - ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1lhpu4m( - _$$ref.pointer, - _sel_promisedItemResourceValuesForKeys_error_, - _$$ref$1.pointer, - $err, + /// isEqual: + static final isEqual_ = + objc.ObjCProtocolMethod( + _protocol_NSObject, + _sel_isEqual_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_3su7tt) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_isEqual_, + isRequired: true, + isInstanceMethod: true, + ), + (bool Function(objc.ObjCObject) func) => + ObjCBlock_bool_ffiVoid_objcObjCObjectImpl.fromFunction( + (ffi.Pointer _, objc.ObjCObject arg1) => func(arg1), + ), ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSDictionary.fromPointer($ret, retain: true, release: true); - } finally { - pkg_ffi.calloc.free($err); - } - } -} - -enum NSPropertyListFormat { - NSPropertyListOpenStepFormat(1), - NSPropertyListXMLFormat_v1_0(100), - NSPropertyListBinaryFormat_v1_0(200); - - final int value; - const NSPropertyListFormat(this.value); - - static NSPropertyListFormat fromValue(int value) => switch (value) { - 1 => NSPropertyListOpenStepFormat, - 100 => NSPropertyListXMLFormat_v1_0, - 200 => NSPropertyListBinaryFormat_v1_0, - _ => throw ArgumentError('Unknown value for NSPropertyListFormat: $value'), - }; -} - -enum NSQualityOfService { - NSQualityOfServiceUserInteractive(33), - NSQualityOfServiceUserInitiated(25), - NSQualityOfServiceUtility(17), - NSQualityOfServiceBackground(9), - NSQualityOfServiceDefault(-1); - - final int value; - const NSQualityOfService(this.value); - - static NSQualityOfService fromValue(int value) => switch (value) { - 33 => NSQualityOfServiceUserInteractive, - 25 => NSQualityOfServiceUserInitiated, - 17 => NSQualityOfServiceUtility, - 9 => NSQualityOfServiceBackground, - -1 => NSQualityOfServiceDefault, - _ => throw ArgumentError('Unknown value for NSQualityOfService: $value'), - }; -} - -final class NSRange extends ffi.Struct { - @NSUInteger() - external int location; - - @NSUInteger() - external int length; - - static ffi.Pointer $allocate( - ffi.Allocator $allocator, { - required int location, - required int length, - }) => $allocator() - ..ref.location = location - ..ref.length = length; -} -/// NSRunLoop -extension type NSRunLoop._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject { - /// Constructs a [NSRunLoop] that points to the same underlying object as [other]. - NSRunLoop.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); - } - - /// Constructs a [NSRunLoop] that wraps the given raw object pointer. - NSRunLoop.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); - } - - /// Returns whether [obj] is an instance of [NSRunLoop]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, + /// isKindOfClass: + static final isKindOfClass_ = + objc.ObjCProtocolMethod( + _protocol_NSObject, + _sel_isKindOfClass_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_3su7tt) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSObject, _sel_isKindOfClass_, - _class_NSRunLoop, - ); - - /// alloc - static NSRunLoop alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSRunLoop, _sel_alloc); - return NSRunLoop.fromPointer($ret, retain: false, release: true); - } - - /// allocWithZone: - static NSRunLoop allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSRunLoop, - _sel_allocWithZone_, - zone, - ); - return NSRunLoop.fromPointer($ret, retain: false, release: true); - } - - /// currentRunLoop - static NSRunLoop getCurrentRunLoop() { - final $ret = _objc_msgSend_151sglz(_class_NSRunLoop, _sel_currentRunLoop); - return NSRunLoop.fromPointer($ret, retain: true, release: true); - } - - /// mainRunLoop - static NSRunLoop getMainRunLoop() { - objc.checkOsVersionInternal( - 'NSRunLoop.mainRunLoop', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - final $ret = _objc_msgSend_151sglz(_class_NSRunLoop, _sel_mainRunLoop); - return NSRunLoop.fromPointer($ret, retain: true, release: true); - } - - /// new - static NSRunLoop new$() { - final $ret = _objc_msgSend_151sglz(_class_NSRunLoop, _sel_new); - return NSRunLoop.fromPointer($ret, retain: false, release: true); - } - - /// Returns a new instance of NSRunLoop constructed with the default `new` method. - NSRunLoop() : this.as(new$().object$); -} - -extension NSRunLoop$Methods on NSRunLoop { - /// acceptInputForMode:beforeDate: - void acceptInputForMode(NSString mode, {required NSDate beforeDate}) { - final _$$ref = object$.ref; - final _$$ref$1 = mode.ref; - final _$$ref$2 = beforeDate.ref; - _objc_msgSend_pfv6jd( - _$$ref.pointer, - _sel_acceptInputForMode_beforeDate_, - _$$ref$1.pointer, - _$$ref$2.pointer, - ); - } - - /// addPort:forMode: - void addPort(NSPort aPort, {required NSString forMode}) { - final _$$ref = object$.ref; - final _$$ref$1 = aPort.ref; - final _$$ref$2 = forMode.ref; - _objc_msgSend_pfv6jd( - _$$ref.pointer, - _sel_addPort_forMode_, - _$$ref$1.pointer, - _$$ref$2.pointer, - ); - } - - /// addTimer:forMode: - void addTimer(NSTimer timer, {required NSString forMode}) { - final _$$ref = object$.ref; - final _$$ref$1 = timer.ref; - final _$$ref$2 = forMode.ref; - _objc_msgSend_pfv6jd( - _$$ref.pointer, - _sel_addTimer_forMode_, - _$$ref$1.pointer, - _$$ref$2.pointer, - ); - } + isRequired: true, + isInstanceMethod: true, + ), + (bool Function(objc.ObjCObject) func) => + ObjCBlock_bool_ffiVoid_objcObjCObjectImpl.fromFunction( + (ffi.Pointer _, objc.ObjCObject arg1) => func(arg1), + ), + ); - /// currentMode - NSString? get currentMode { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_currentMode); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); - } + /// isMemberOfClass: + static final isMemberOfClass_ = + objc.ObjCProtocolMethod( + _protocol_NSObject, + _sel_isMemberOfClass_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_3su7tt) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_isMemberOfClass_, + isRequired: true, + isInstanceMethod: true, + ), + (bool Function(objc.ObjCObject) func) => + ObjCBlock_bool_ffiVoid_objcObjCObjectImpl.fromFunction( + (ffi.Pointer _, objc.ObjCObject arg1) => func(arg1), + ), + ); - /// getCFRunLoop - ffi.Pointer getCFRunLoop() { - final _$$ref = object$.ref; - return _objc_msgSend_1bbja28(_$$ref.pointer, _sel_getCFRunLoop); - } + /// isProxy + static final isProxy = objc.ObjCProtocolMethod( + _protocol_NSObject, + _sel_isProxy, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_e3qsqz) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_isProxy, + isRequired: true, + isInstanceMethod: true, + ), + (bool Function() func) => ObjCBlock_bool_ffiVoid.fromFunction( + (ffi.Pointer _) => func(), + ), + ); - /// init - NSRunLoop init() { - final _$$ref$38 = object$.ref; - objc.checkOsVersionInternal( - 'NSRunLoop.init', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref$38.retainAndReturnPointer(), - _sel_init, - ); - return NSRunLoop.fromPointer($ret, retain: false, release: true); - } + /// performSelector: + static final performSelector_ = + objc.ObjCProtocolMethod< + objc.ObjCObject Function(ffi.Pointer) + >( + _protocol_NSObject, + _sel_performSelector_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_50as9u) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_performSelector_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.ObjCObject Function(ffi.Pointer) func) => + ObjCBlock_objcObjCObjectImpl_ffiVoid_objcObjCSelector.fromFunction( + (ffi.Pointer _, ffi.Pointer arg1) => + func(arg1), + ), + ); - /// limitDateForMode: - NSDate? limitDateForMode(NSString mode) { - final _$$ref = object$.ref; - final _$$ref$1 = mode.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_limitDateForMode_, - _$$ref$1.pointer, - ); - return $ret.address == 0 - ? null - : NSDate.fromPointer($ret, retain: true, release: true); - } + /// performSelector:withObject: + static final performSelector_withObject_ = + objc.ObjCProtocolMethod< + objc.ObjCObject Function( + ffi.Pointer, + objc.ObjCObject, + ) + >( + _protocol_NSObject, + _sel_performSelector_withObject_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_1mllhpc) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_performSelector_withObject_, + isRequired: true, + isInstanceMethod: true, + ), + ( + objc.ObjCObject Function( + ffi.Pointer, + objc.ObjCObject, + ) + func, + ) => + ObjCBlock_objcObjCObjectImpl_ffiVoid_objcObjCSelector_objcObjCObjectImpl.fromFunction( + ( + ffi.Pointer _, + ffi.Pointer arg1, + objc.ObjCObject arg2, + ) => func(arg1, arg2), + ), + ); - /// removePort:forMode: - void removePort(NSPort aPort, {required NSString forMode}) { - final _$$ref = object$.ref; - final _$$ref$1 = aPort.ref; - final _$$ref$2 = forMode.ref; - _objc_msgSend_pfv6jd( - _$$ref.pointer, - _sel_removePort_forMode_, - _$$ref$1.pointer, - _$$ref$2.pointer, - ); - } -} + /// performSelector:withObject:withObject: + static final performSelector_withObject_withObject_ = + objc.ObjCProtocolMethod< + objc.ObjCObject Function( + ffi.Pointer, + objc.ObjCObject, + objc.ObjCObject, + ) + >( + _protocol_NSObject, + _sel_performSelector_withObject_withObject_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_c7gk2u) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_performSelector_withObject_withObject_, + isRequired: true, + isInstanceMethod: true, + ), + ( + objc.ObjCObject Function( + ffi.Pointer, + objc.ObjCObject, + objc.ObjCObject, + ) + func, + ) => + ObjCBlock_objcObjCObjectImpl_ffiVoid_objcObjCSelector_objcObjCObjectImpl_objcObjCObjectImpl.fromFunction( + ( + ffi.Pointer _, + ffi.Pointer arg1, + objc.ObjCObject arg2, + objc.ObjCObject arg3, + ) => func(arg1, arg2, arg3), + ), + ); -/// NSRunLoopConveniences -extension NSRunLoopConveniences on NSRunLoop { - /// configureAsServer - @Deprecated('Not supported') - void configureAsServer() { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSRunLoop.configureAsServer', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_configureAsServer); - } + /// release + static final release = objc.ObjCProtocolListenableMethod( + _protocol_NSObject, + _sel_release, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_ovsamd) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_release, + isRequired: true, + isInstanceMethod: true, + ), + (void Function() func) => ObjCBlock_ffiVoid_ffiVoid.fromFunction( + (ffi.Pointer _) => func(), + ), + (void Function() func) => + ObjCBlock_ffiVoid_ffiVoid.listener((ffi.Pointer _) => func()), + (void Function() func) => + ObjCBlock_ffiVoid_ffiVoid.blocking((ffi.Pointer _) => func()), + ); - /// performBlock: - void performBlock(objc.ObjCBlock block) { - final _$$ref = object$.ref; - final _$$ref$1 = block.ref; - objc.checkOsVersionInternal( - 'NSRunLoop.performBlock:', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), - ); - _objc_msgSend_f167m6(_$$ref.pointer, _sel_performBlock_, _$$ref$1.pointer); - } + /// respondsToSelector: + static final respondsToSelector_ = + objc.ObjCProtocolMethod)>( + _protocol_NSObject, + _sel_respondsToSelector_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_w1e3k0) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_respondsToSelector_, + isRequired: true, + isInstanceMethod: true, + ), + (bool Function(ffi.Pointer) func) => + ObjCBlock_bool_ffiVoid_objcObjCSelector.fromFunction( + (ffi.Pointer _, ffi.Pointer arg1) => + func(arg1), + ), + ); - /// performInModes:block: - void performInModes( - NSArray modes, { - required objc.ObjCBlock block, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = modes.ref; - final _$$ref$2 = block.ref; - objc.checkOsVersionInternal( - 'NSRunLoop.performInModes:block:', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), - ); - _objc_msgSend_o762yo( - _$$ref.pointer, - _sel_performInModes_block_, - _$$ref$1.pointer, - _$$ref$2.pointer, - ); - } + /// retain + static final retain = objc.ObjCProtocolMethod( + _protocol_NSObject, + _sel_retain, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_1mbt9g9) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_retain, + isRequired: true, + isInstanceMethod: true, + ), + (objc.ObjCObject Function() func) => + ObjCBlock_objcObjCObjectImpl_ffiVoid.fromFunction( + (ffi.Pointer _) => func(), + ), + ); - /// run - void run() { - final _$$ref = object$.ref; - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_run); - } + /// retainCount + static final retainCount = objc.ObjCProtocolMethod( + _protocol_NSObject, + _sel_retainCount, + ffi.Native.addressOf< + ffi.NativeFunction< + NSUInteger Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_1ckyi24) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_retainCount, + isRequired: true, + isInstanceMethod: true, + ), + (DartNSUInteger Function() func) => + ObjCBlock_NSUInteger_ffiVoid.fromFunction( + (ffi.Pointer _) => func(), + ), + ); - /// runMode:beforeDate: - bool runMode(NSString mode, {required NSDate beforeDate}) { - final _$$ref = object$.ref; - final _$$ref$1 = mode.ref; - final _$$ref$2 = beforeDate.ref; - return _objc_msgSend_1lsax7n( - _$$ref.pointer, - _sel_runMode_beforeDate_, - _$$ref$1.pointer, - _$$ref$2.pointer, - ); - } + /// self + static final self = objc.ObjCProtocolMethod( + _protocol_NSObject, + _sel_self, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_1mbt9g9) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_self, + isRequired: true, + isInstanceMethod: true, + ), + (objc.ObjCObject Function() func) => + ObjCBlock_objcObjCObjectImpl_ffiVoid.fromFunction( + (ffi.Pointer _) => func(), + ), + ); - /// runUntilDate: - void runUntilDate(NSDate limitDate) { - final _$$ref = object$.ref; - final _$$ref$1 = limitDate.ref; - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_runUntilDate_, _$$ref$1.pointer); - } + /// superclass + static final superclass = objc.ObjCProtocolMethod( + _protocol_NSObject, + _sel_superclass, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_1mbt9g9) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_superclass, + isRequired: true, + isInstanceMethod: true, + ), + (objc.ObjCObject Function() func) => + ObjCBlock_objcObjCObjectImpl_ffiVoid.fromFunction( + (ffi.Pointer _) => func(), + ), + ); + + /// zone + static final zone = objc.ObjCProtocolMethod Function()>( + _protocol_NSObject, + _sel_zone, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_1a8cl66) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_zone, + isRequired: true, + isInstanceMethod: true, + ), + (ffi.Pointer Function() func) => + ObjCBlock_NSZone_ffiVoid.fromFunction( + (ffi.Pointer _) => func(), + ), + ); } -/// NSScriptClassDescription -extension NSScriptClassDescription on NSObject { - /// classCode - int get classCode { - final _$$ref = object$.ref; +/// NSOrderedCollectionChange +/// +/// iOS: introduced 13.0.0 +/// macOS: introduced 10.15.0 +extension type NSOrderedCollectionChange._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject { + /// Constructs a [NSOrderedCollectionChange] that points to the same underlying object as [other]. + NSOrderedCollectionChange.as(objc.ObjCObject other) : object$ = other { objc.checkOsVersionInternal( - 'NSObject.classCode', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSOrderedCollectionChange', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), ); - return _objc_msgSend_3pyzne(_$$ref.pointer, _sel_classCode); + assert(isA(object$)); } - /// className - NSString get className { - final _$$ref = object$.ref; + /// Constructs a [NSOrderedCollectionChange] that wraps the given raw object pointer. + NSOrderedCollectionChange.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { objc.checkOsVersionInternal( - 'NSObject.className', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSOrderedCollectionChange', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_className); - return NSString.fromPointer($ret, retain: true, release: true); + assert(isA(object$)); } -} -/// NSScriptKeyValueCoding -extension NSScriptKeyValueCoding on NSObject { - /// coerceValue:forKey: - objc.ObjCObject? coerceValue( - objc.ObjCObject? value, { - required NSString forKey, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; - final _$$ref$2 = forKey.ref; - objc.checkOsVersionInternal( - 'NSObject.coerceValue:forKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_15qeuct( - _$$ref.pointer, - _sel_coerceValue_forKey_, - _$$ref$1?.pointer ?? ffi.nullptr, - _$$ref$2.pointer, - ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); - } + /// Returns whether [obj] is an instance of [NSOrderedCollectionChange]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSOrderedCollectionChange, + ); - /// insertValue:atIndex:inPropertyWithKey: - void insertValue( - objc.ObjCObject value, { - required DartNSUInteger atIndex, - required NSString inPropertyWithKey, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = value.ref; - final _$$ref$2 = inPropertyWithKey.ref; - objc.checkOsVersionInternal( - 'NSObject.insertValue:atIndex:inPropertyWithKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + /// alloc + static NSOrderedCollectionChange alloc() { + final $ret = _objc_msgSend_151sglz( + _class_NSOrderedCollectionChange, + _sel_alloc, ); - _objc_msgSend_10nfbmq( - _$$ref.pointer, - _sel_insertValue_atIndex_inPropertyWithKey_, - _$$ref$1.pointer, - atIndex, - _$$ref$2.pointer, + return NSOrderedCollectionChange.fromPointer( + $ret, + retain: false, + release: true, ); } - /// insertValue:inPropertyWithKey: - void insertValue$1( - objc.ObjCObject value, { - required NSString inPropertyWithKey, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = value.ref; - final _$$ref$2 = inPropertyWithKey.ref; - objc.checkOsVersionInternal( - 'NSObject.insertValue:inPropertyWithKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + /// allocWithZone: + static NSOrderedCollectionChange allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSOrderedCollectionChange, + _sel_allocWithZone_, + zone, ); - _objc_msgSend_pfv6jd( - _$$ref.pointer, - _sel_insertValue_inPropertyWithKey_, - _$$ref$1.pointer, - _$$ref$2.pointer, + return NSOrderedCollectionChange.fromPointer( + $ret, + retain: false, + release: true, ); } - /// removeValueAtIndex:fromPropertyWithKey: - void removeValueAtIndex( - DartNSUInteger index, { - required NSString fromPropertyWithKey, + /// changeWithObject:type:index: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static NSOrderedCollectionChange changeWithObject( + objc.ObjCObject? anObject, { + required NSCollectionChangeType type, + required DartNSUInteger index, }) { - final _$$ref = object$.ref; - final _$$ref$1 = fromPropertyWithKey.ref; + final _$$ref = anObject?.ref; objc.checkOsVersionInternal( - 'NSObject.removeValueAtIndex:fromPropertyWithKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSOrderedCollectionChange.changeWithObject:type:index:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), ); - _objc_msgSend_1gypgok( - _$$ref.pointer, - _sel_removeValueAtIndex_fromPropertyWithKey_, + final $ret = _objc_msgSend_vbymrb( + _class_NSOrderedCollectionChange, + _sel_changeWithObject_type_index_, + _$$ref?.pointer ?? ffi.nullptr, + type.value, index, - _$$ref$1.pointer, - ); - } - - /// replaceValueAtIndex:inPropertyWithKey:withValue: - void replaceValueAtIndex( - DartNSUInteger index, { - required NSString inPropertyWithKey, - required objc.ObjCObject withValue, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = inPropertyWithKey.ref; - final _$$ref$2 = withValue.ref; - objc.checkOsVersionInternal( - 'NSObject.replaceValueAtIndex:inPropertyWithKey:withValue:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), ); - _objc_msgSend_rutu22( - _$$ref.pointer, - _sel_replaceValueAtIndex_inPropertyWithKey_withValue_, - index, - _$$ref$1.pointer, - _$$ref$2.pointer, + return NSOrderedCollectionChange.fromPointer( + $ret, + retain: true, + release: true, ); } - /// valueAtIndex:inPropertyWithKey: - objc.ObjCObject? valueAtIndex( - DartNSUInteger index, { - required NSString inPropertyWithKey, + /// changeWithObject:type:index:associatedIndex: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + static NSOrderedCollectionChange changeWithObject$1( + objc.ObjCObject? anObject, { + required NSCollectionChangeType type, + required DartNSUInteger index, + required DartNSUInteger associatedIndex, }) { - final _$$ref = object$.ref; - final _$$ref$1 = inPropertyWithKey.ref; + final _$$ref = anObject?.ref; objc.checkOsVersionInternal( - 'NSObject.valueAtIndex:inPropertyWithKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSOrderedCollectionChange.changeWithObject:type:index:associatedIndex:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), ); - final $ret = _objc_msgSend_vbc8p4( - _$$ref.pointer, - _sel_valueAtIndex_inPropertyWithKey_, + final $ret = _objc_msgSend_1egc1c( + _class_NSOrderedCollectionChange, + _sel_changeWithObject_type_index_associatedIndex_, + _$$ref?.pointer ?? ffi.nullptr, + type.value, index, - _$$ref$1.pointer, - ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); - } - - /// valueWithName:inPropertyWithKey: - objc.ObjCObject? valueWithName( - NSString name, { - required NSString inPropertyWithKey, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = name.ref; - final _$$ref$2 = inPropertyWithKey.ref; - objc.checkOsVersionInternal( - 'NSObject.valueWithName:inPropertyWithKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + associatedIndex, ); - final $ret = _objc_msgSend_15qeuct( - _$$ref.pointer, - _sel_valueWithName_inPropertyWithKey_, - _$$ref$1.pointer, - _$$ref$2.pointer, + return NSOrderedCollectionChange.fromPointer( + $ret, + retain: true, + release: true, ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); } - /// valueWithUniqueID:inPropertyWithKey: - objc.ObjCObject? valueWithUniqueID( - objc.ObjCObject uniqueID, { - required NSString inPropertyWithKey, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = uniqueID.ref; - final _$$ref$2 = inPropertyWithKey.ref; - objc.checkOsVersionInternal( - 'NSObject.valueWithUniqueID:inPropertyWithKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + /// new + static NSOrderedCollectionChange new$() { + final $ret = _objc_msgSend_151sglz( + _class_NSOrderedCollectionChange, + _sel_new, ); - final $ret = _objc_msgSend_15qeuct( - _$$ref.pointer, - _sel_valueWithUniqueID_inPropertyWithKey_, - _$$ref$1.pointer, - _$$ref$2.pointer, + return NSOrderedCollectionChange.fromPointer( + $ret, + retain: false, + release: true, ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); } -} -/// NSScriptObjectSpecifier -/// -/// NSScriptObjectSpecifier -extension type NSScriptObjectSpecifier._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject, NSCoding { - /// Constructs a [NSScriptObjectSpecifier] that points to the same underlying object as [other]. - NSScriptObjectSpecifier.as(objc.ObjCObject other) : object$ = other {} - - /// Constructs a [NSScriptObjectSpecifier] that wraps the given raw object pointer. - NSScriptObjectSpecifier.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) {} + /// Returns a new instance of NSOrderedCollectionChange constructed with the default `new` method. + NSOrderedCollectionChange() : this.as(new$().object$); } -/// NSScriptObjectSpecifiers -extension NSScriptObjectSpecifiers on NSObject { - /// indicesOfObjectsByEvaluatingObjectSpecifier: - NSArray? indicesOfObjectsByEvaluatingObjectSpecifier( - NSScriptObjectSpecifier specifier, - ) { +extension NSOrderedCollectionChange$Methods on NSOrderedCollectionChange { + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + DartNSUInteger get associatedIndex { final _$$ref = object$.ref; - final _$$ref$1 = specifier.ref; objc.checkOsVersionInternal( - 'NSObject.indicesOfObjectsByEvaluatingObjectSpecifier:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_indicesOfObjectsByEvaluatingObjectSpecifier_, - _$$ref$1.pointer, + 'NSOrderedCollectionChange.associatedIndex', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), ); - return $ret.address == 0 - ? null - : NSArray.fromPointer($ret, retain: true, release: true); + return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_associatedIndex); } - /// objectSpecifier - NSScriptObjectSpecifier? get objectSpecifier { + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NSCollectionChangeType get changeType { final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSObject.objectSpecifier', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSOrderedCollectionChange.changeType', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_objectSpecifier); - return $ret.address == 0 - ? null - : NSScriptObjectSpecifier.fromPointer( - $ret, - retain: true, - release: true, - ); + final $ret = _objc_msgSend_hc8exi(_$$ref.pointer, _sel_changeType); + return NSCollectionChangeType.fromValue($ret); } -} -/// NSScripting -extension NSScripting on NSObject { - /// copyScriptingValue:forKey:withProperties: - objc.ObjCObject? copyScriptingValue( - objc.ObjCObject value, { - required NSString forKey, - required NSDictionary withProperties, - }) { + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + DartNSUInteger get index { final _$$ref = object$.ref; - final _$$ref$1 = value.ref; - final _$$ref$2 = forKey.ref; - final _$$ref$3 = withProperties.ref; objc.checkOsVersionInternal( - 'NSObject.copyScriptingValue:forKey:withProperties:', - iOS: (true, null), - macOS: (false, (10, 5, 0)), - ); - final $ret = _objc_msgSend_11spmsz( - _$$ref.pointer, - _sel_copyScriptingValue_forKey_withProperties_, - _$$ref$1.pointer, - _$$ref$2.pointer, - _$$ref$3.pointer, + 'NSOrderedCollectionChange.index', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: false, release: true); + return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_index); } - /// newScriptingObjectOfClass:forValueForKey:withContentsValue:properties: - objc.ObjCObject? newScriptingObjectOfClass( - objc.ObjCObject objectClass, { - required NSString forValueForKey, - objc.ObjCObject? withContentsValue, - required NSDictionary properties, + /// initWithObject:type:index: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NSOrderedCollectionChange initWithObject( + objc.ObjCObject? anObject, { + required NSCollectionChangeType type, + required DartNSUInteger index, }) { final _$$ref = object$.ref; - final _$$ref$1 = objectClass.ref; - final _$$ref$2 = forValueForKey.ref; - final _$$ref$3 = withContentsValue?.ref; - final _$$ref$4 = properties.ref; + final _$$ref$1 = anObject?.ref; objc.checkOsVersionInternal( - 'NSObject.newScriptingObjectOfClass:forValueForKey:withContentsValue:properties:', - iOS: (true, null), - macOS: (false, (10, 5, 0)), + 'NSOrderedCollectionChange.initWithObject:type:index:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), ); - final $ret = _objc_msgSend_s92gih( - _$$ref.pointer, - _sel_newScriptingObjectOfClass_forValueForKey_withContentsValue_properties_, - _$$ref$1.pointer, - _$$ref$2.pointer, - _$$ref$3?.pointer ?? ffi.nullptr, - _$$ref$4.pointer, + final $ret = _objc_msgSend_vbymrb( + _$$ref.retainAndReturnPointer(), + _sel_initWithObject_type_index_, + _$$ref$1?.pointer ?? ffi.nullptr, + type.value, + index, + ); + return NSOrderedCollectionChange.fromPointer( + $ret, + retain: false, + release: true, ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: false, release: true); } - /// scriptingProperties - NSDictionary? get scriptingProperties { + /// initWithObject:type:index:associatedIndex: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NSOrderedCollectionChange initWithObject$1( + objc.ObjCObject? anObject, { + required NSCollectionChangeType type, + required DartNSUInteger index, + required DartNSUInteger associatedIndex, + }) { final _$$ref = object$.ref; + final _$$ref$1 = anObject?.ref; objc.checkOsVersionInternal( - 'NSObject.scriptingProperties', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSOrderedCollectionChange.initWithObject:type:index:associatedIndex:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), ); - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_scriptingProperties, + final $ret = _objc_msgSend_1egc1c( + _$$ref.retainAndReturnPointer(), + _sel_initWithObject_type_index_associatedIndex_, + _$$ref$1?.pointer ?? ffi.nullptr, + type.value, + index, + associatedIndex, + ); + return NSOrderedCollectionChange.fromPointer( + $ret, + retain: false, + release: true, ); - return $ret.address == 0 - ? null - : NSDictionary.fromPointer($ret, retain: true, release: true); } - /// scriptingValueForSpecifier: - objc.ObjCObject? scriptingValueForSpecifier( - NSScriptObjectSpecifier objectSpecifier, - ) { + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + objc.ObjCObject? get object { final _$$ref = object$.ref; - final _$$ref$1 = objectSpecifier.ref; objc.checkOsVersionInternal( - 'NSObject.scriptingValueForSpecifier:', - iOS: (true, null), - macOS: (false, (10, 5, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_scriptingValueForSpecifier_, - _$$ref$1.pointer, + 'NSOrderedCollectionChange.object', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_object); return $ret.address == 0 ? null : objc.ObjCObject($ret, retain: true, release: true); } +} - /// setScriptingProperties: - set scriptingProperties(NSDictionary? value) { - final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; +/// NSOrderedCollectionDifference +/// +/// iOS: introduced 13.0.0 +/// macOS: introduced 10.15.0 +extension type NSOrderedCollectionDifference._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject, NSFastEnumeration { + /// Constructs a [NSOrderedCollectionDifference] that points to the same underlying object as [other]. + NSOrderedCollectionDifference.as(objc.ObjCObject other) : object$ = other { objc.checkOsVersionInternal( - 'NSObject.setScriptingProperties:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_setScriptingProperties_, - _$$ref$1?.pointer ?? ffi.nullptr, + 'NSOrderedCollectionDifference', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), ); + assert(isA(object$)); } -} -/// NSScriptingComparisonMethods -extension NSScriptingComparisonMethods on NSObject { - /// scriptingBeginsWith: - bool scriptingBeginsWith(objc.ObjCObject object) { - final _$$ref = object$.ref; - final _$$ref$1 = object.ref; + /// Constructs a [NSOrderedCollectionDifference] that wraps the given raw object pointer. + NSOrderedCollectionDifference.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { objc.checkOsVersionInternal( - 'NSObject.scriptingBeginsWith:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_scriptingBeginsWith_, - _$$ref$1.pointer, + 'NSOrderedCollectionDifference', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), ); + assert(isA(object$)); } - /// scriptingContains: - bool scriptingContains(objc.ObjCObject object) { - final _$$ref = object$.ref; - final _$$ref$1 = object.ref; - objc.checkOsVersionInternal( - 'NSObject.scriptingContains:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_scriptingContains_, - _$$ref$1.pointer, + /// Returns whether [obj] is an instance of [NSOrderedCollectionDifference]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSOrderedCollectionDifference, + ); + + /// alloc + static NSOrderedCollectionDifference alloc() { + final $ret = _objc_msgSend_151sglz( + _class_NSOrderedCollectionDifference, + _sel_alloc, + ); + return NSOrderedCollectionDifference.fromPointer( + $ret, + retain: false, + release: true, ); } - /// scriptingEndsWith: - bool scriptingEndsWith(objc.ObjCObject object) { - final _$$ref = object$.ref; - final _$$ref$1 = object.ref; - objc.checkOsVersionInternal( - 'NSObject.scriptingEndsWith:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + /// allocWithZone: + static NSOrderedCollectionDifference allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSOrderedCollectionDifference, + _sel_allocWithZone_, + zone, ); - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_scriptingEndsWith_, - _$$ref$1.pointer, + return NSOrderedCollectionDifference.fromPointer( + $ret, + retain: false, + release: true, ); } - /// scriptingIsEqualTo: - bool scriptingIsEqualTo(objc.ObjCObject object) { - final _$$ref = object$.ref; - final _$$ref$1 = object.ref; - objc.checkOsVersionInternal( - 'NSObject.scriptingIsEqualTo:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + /// new + static NSOrderedCollectionDifference new$() { + final $ret = _objc_msgSend_151sglz( + _class_NSOrderedCollectionDifference, + _sel_new, ); - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_scriptingIsEqualTo_, - _$$ref$1.pointer, + return NSOrderedCollectionDifference.fromPointer( + $ret, + retain: false, + release: true, ); } - /// scriptingIsGreaterThan: - bool scriptingIsGreaterThan(objc.ObjCObject object) { - final _$$ref = object$.ref; - final _$$ref$1 = object.ref; - objc.checkOsVersionInternal( - 'NSObject.scriptingIsGreaterThan:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_scriptingIsGreaterThan_, - _$$ref$1.pointer, + /// Returns a new instance of NSOrderedCollectionDifference constructed with the default `new` method. + NSOrderedCollectionDifference() : this.as(new$().object$); +} + +extension NSOrderedCollectionDifference$Methods + on NSOrderedCollectionDifference { + /// countByEnumeratingWithState:objects:count: + DartNSUInteger countByEnumeratingWithState( + ffi.Pointer state, { + required ffi.Pointer> objects, + required DartNSUInteger count, + }) { + final _$$ref$4 = object$.ref; + return _objc_msgSend_1b5ysjl( + _$$ref$4.pointer, + _sel_countByEnumeratingWithState_objects_count_, + state, + objects, + count, ); } - /// scriptingIsGreaterThanOrEqualTo: - bool scriptingIsGreaterThanOrEqualTo(objc.ObjCObject object) { + /// differenceByTransformingChangesWithBlock: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NSOrderedCollectionDifference differenceByTransformingChangesWithBlock( + objc.ObjCBlock< + NSOrderedCollectionChange Function(NSOrderedCollectionChange) + > + block, + ) { final _$$ref = object$.ref; - final _$$ref$1 = object.ref; + final _$$ref$1 = block.ref; objc.checkOsVersionInternal( - 'NSObject.scriptingIsGreaterThanOrEqualTo:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSOrderedCollectionDifference.differenceByTransformingChangesWithBlock:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), ); - return _objc_msgSend_19nvye5( + final $ret = _objc_msgSend_nnxkei( _$$ref.pointer, - _sel_scriptingIsGreaterThanOrEqualTo_, + _sel_differenceByTransformingChangesWithBlock_, _$$ref$1.pointer, ); + return NSOrderedCollectionDifference.fromPointer( + $ret, + retain: true, + release: true, + ); } - /// scriptingIsLessThan: - bool scriptingIsLessThan(objc.ObjCObject object) { + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + bool get hasChanges { final _$$ref = object$.ref; - final _$$ref$1 = object.ref; objc.checkOsVersionInternal( - 'NSObject.scriptingIsLessThan:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_scriptingIsLessThan_, - _$$ref$1.pointer, + 'NSOrderedCollectionDifference.hasChanges', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), ); + return _objc_msgSend_91o635(_$$ref.pointer, _sel_hasChanges); } - /// scriptingIsLessThanOrEqualTo: - bool scriptingIsLessThanOrEqualTo(objc.ObjCObject object) { - final _$$ref = object$.ref; - final _$$ref$1 = object.ref; + /// init + NSOrderedCollectionDifference init() { + final _$$ref$32 = object$.ref; objc.checkOsVersionInternal( - 'NSObject.scriptingIsLessThanOrEqualTo:', + 'NSOrderedCollectionDifference.init', iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_scriptingIsLessThanOrEqualTo_, - _$$ref$1.pointer, + final $ret = _objc_msgSend_151sglz( + _$$ref$32.retainAndReturnPointer(), + _sel_init, ); - } -} - -/// NSSecureCoding -extension type NSSecureCoding._(objc.ObjCProtocol object$) - implements objc.ObjCProtocol, NSCoding { - /// Constructs a [NSSecureCoding] that points to the same underlying object as [other]. - NSSecureCoding.as(objc.ObjCObject other) : object$ = other; - - /// Constructs a [NSSecureCoding] that wraps the given raw object pointer. - NSSecureCoding.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); - - /// Returns whether [obj] is an instance of [NSSecureCoding]. - static bool conformsTo(objc.ObjCObject obj) { - return _objc_msgSend_e3qsqz( - obj.ref.pointer, - _sel_conformsToProtocol_, - _protocol_NSSecureCoding, + return NSOrderedCollectionDifference.fromPointer( + $ret, + retain: false, + release: true, ); } -} -extension NSSecureCoding$Methods on NSSecureCoding { - /// encodeWithCoder: - void encodeWithCoder(NSCoder coder) { - final _$$ref$28 = object$.ref; - final _$$ref$29 = coder.ref; - _objc_msgSend_xtuoz7( - _$$ref$28.pointer, - _sel_encodeWithCoder_, - _$$ref$29.pointer, + /// initWithChanges: + /// + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NSOrderedCollectionDifference initWithChanges(NSArray changes) { + final _$$ref = object$.ref; + final _$$ref$1 = changes.ref; + objc.checkOsVersionInternal( + 'NSOrderedCollectionDifference.initWithChanges:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), ); - } - - /// initWithCoder: - NSSecureCoding? initWithCoder(NSCoder coder) { - final _$$ref$44 = object$.ref; - final _$$ref$45 = coder.ref; final $ret = _objc_msgSend_1sotr3r( - _$$ref$44.retainAndReturnPointer(), - _sel_initWithCoder_, - _$$ref$45.pointer, + _$$ref.retainAndReturnPointer(), + _sel_initWithChanges_, + _$$ref$1.pointer, + ); + return NSOrderedCollectionDifference.fromPointer( + $ret, + retain: false, + release: true, ); - return $ret.address == 0 - ? null - : NSSecureCoding.fromPointer($ret, retain: false, release: true); } -} - -interface class NSSecureCoding$Builder { - /// Returns the [objc.Protocol] object for this protocol. - static objc.Protocol get $protocol => - objc.Protocol.fromPointer(_protocol_NSSecureCoding.cast()); - /// Builds an object that implements the NSSecureCoding protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + /// initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects: /// - /// If `$keepIsolateAlive` is true, this protocol will keep this isolate - /// alive until it is garbage collected by both Dart and ObjC. - static NSSecureCoding implement({ - required void Function(NSCoder) encodeWithCoder_, - required Dartinstancetype? Function(NSCoder) initWithCoder_, - bool $keepIsolateAlive = true, + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NSOrderedCollectionDifference initWithInsertIndexes( + NSIndexSet inserts, { + NSArray? insertedObjects, + required NSIndexSet removeIndexes, + NSArray? removedObjects, }) { - final builder = objc.ObjCProtocolBuilder(debugName: 'NSSecureCoding'); - NSSecureCoding$Builder.encodeWithCoder_.implement( - builder, - encodeWithCoder_, + final _$$ref = object$.ref; + final _$$ref$1 = inserts.ref; + final _$$ref$2 = insertedObjects?.ref; + final _$$ref$3 = removeIndexes.ref; + final _$$ref$4 = removedObjects?.ref; + objc.checkOsVersionInternal( + 'NSOrderedCollectionDifference.initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), ); - NSSecureCoding$Builder.initWithCoder_.implement(builder, initWithCoder_); - builder.addProtocol($protocol); - return NSSecureCoding.as( - builder.build(keepIsolateAlive: $keepIsolateAlive), + final $ret = _objc_msgSend_s92gih( + _$$ref.retainAndReturnPointer(), + _sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_, + _$$ref$1.pointer, + _$$ref$2?.pointer ?? ffi.nullptr, + _$$ref$3.pointer, + _$$ref$4?.pointer ?? ffi.nullptr, ); - } - - /// Adds the implementation of the NSSecureCoding protocol to an existing - /// [objc.ObjCProtocolBuilder]. - /// - /// Note: You cannot call this method after you have called `builder.build`. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, { - required void Function(NSCoder) encodeWithCoder_, - required Dartinstancetype? Function(NSCoder) initWithCoder_, - bool $keepIsolateAlive = true, - }) { - NSSecureCoding$Builder.encodeWithCoder_.implement( - builder, - encodeWithCoder_, + return NSOrderedCollectionDifference.fromPointer( + $ret, + retain: false, + release: true, ); - NSSecureCoding$Builder.initWithCoder_.implement(builder, initWithCoder_); - builder.addProtocol($protocol); } - /// Builds an object that implements the NSSecureCoding protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All - /// methods that can be implemented as listeners will be. + /// initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:additionalChanges: /// - /// If `$keepIsolateAlive` is true, this protocol will keep this isolate - /// alive until it is garbage collected by both Dart and ObjC. - static NSSecureCoding implementAsListener({ - required void Function(NSCoder) encodeWithCoder_, - required Dartinstancetype? Function(NSCoder) initWithCoder_, - bool $keepIsolateAlive = true, + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NSOrderedCollectionDifference initWithInsertIndexes$1( + NSIndexSet inserts, { + NSArray? insertedObjects, + required NSIndexSet removeIndexes, + NSArray? removedObjects, + required NSArray additionalChanges, }) { - final builder = objc.ObjCProtocolBuilder(debugName: 'NSSecureCoding'); - NSSecureCoding$Builder.encodeWithCoder_.implementAsListener( - builder, - encodeWithCoder_, + final _$$ref = object$.ref; + final _$$ref$1 = inserts.ref; + final _$$ref$2 = insertedObjects?.ref; + final _$$ref$3 = removeIndexes.ref; + final _$$ref$4 = removedObjects?.ref; + final _$$ref$5 = additionalChanges.ref; + objc.checkOsVersionInternal( + 'NSOrderedCollectionDifference.initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:additionalChanges:', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), ); - NSSecureCoding$Builder.initWithCoder_.implement(builder, initWithCoder_); - builder.addProtocol($protocol); - return NSSecureCoding.as( - builder.build(keepIsolateAlive: $keepIsolateAlive), + final $ret = _objc_msgSend_3cbdpb( + _$$ref.retainAndReturnPointer(), + _sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges_, + _$$ref$1.pointer, + _$$ref$2?.pointer ?? ffi.nullptr, + _$$ref$3.pointer, + _$$ref$4?.pointer ?? ffi.nullptr, + _$$ref$5.pointer, + ); + return NSOrderedCollectionDifference.fromPointer( + $ret, + retain: false, + release: true, ); } - /// Adds the implementation of the NSSecureCoding protocol to an existing - /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will - /// be. - /// - /// Note: You cannot call this method after you have called `builder.build`. - static void addToBuilderAsListener( - objc.ObjCProtocolBuilder builder, { - required void Function(NSCoder) encodeWithCoder_, - required Dartinstancetype? Function(NSCoder) initWithCoder_, - bool $keepIsolateAlive = true, - }) { - NSSecureCoding$Builder.encodeWithCoder_.implementAsListener( - builder, - encodeWithCoder_, + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NSArray get insertions { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSOrderedCollectionDifference.insertions', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), ); - NSSecureCoding$Builder.initWithCoder_.implement(builder, initWithCoder_); - builder.addProtocol($protocol); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_insertions); + return NSArray.fromPointer($ret, retain: true, release: true); } - /// Builds an object that implements the NSSecureCoding protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All - /// methods that can be implemented as blocking listeners will be. + /// inverseDifference /// - /// If `$keepIsolateAlive` is true, this protocol will keep this isolate - /// alive until it is garbage collected by both Dart and ObjC. - static NSSecureCoding implementAsBlocking({ - required void Function(NSCoder) encodeWithCoder_, - required Dartinstancetype? Function(NSCoder) initWithCoder_, - bool $keepIsolateAlive = true, - }) { - final builder = objc.ObjCProtocolBuilder(debugName: 'NSSecureCoding'); - NSSecureCoding$Builder.encodeWithCoder_.implementAsBlocking( - builder, - encodeWithCoder_, + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NSOrderedCollectionDifference inverseDifference() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSOrderedCollectionDifference.inverseDifference', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), ); - NSSecureCoding$Builder.initWithCoder_.implement(builder, initWithCoder_); - builder.addProtocol($protocol); - return NSSecureCoding.as( - builder.build(keepIsolateAlive: $keepIsolateAlive), + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_inverseDifference); + return NSOrderedCollectionDifference.fromPointer( + $ret, + retain: true, + release: true, ); } - /// Adds the implementation of the NSSecureCoding protocol to an existing - /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as blocking - /// listeners will be. - /// - /// Note: You cannot call this method after you have called `builder.build`. - static void addToBuilderAsBlocking( - objc.ObjCProtocolBuilder builder, { - required void Function(NSCoder) encodeWithCoder_, - required Dartinstancetype? Function(NSCoder) initWithCoder_, - bool $keepIsolateAlive = true, - }) { - NSSecureCoding$Builder.encodeWithCoder_.implementAsBlocking( - builder, - encodeWithCoder_, + /// iOS: introduced 13.0.0 + /// macOS: introduced 10.15.0 + NSArray get removals { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSOrderedCollectionDifference.removals', + iOS: (false, (13, 0, 0)), + macOS: (false, (10, 15, 0)), ); - NSSecureCoding$Builder.initWithCoder_.implement(builder, initWithCoder_); - builder.addProtocol($protocol); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_removals); + return NSArray.fromPointer($ret, retain: true, release: true); } +} - /// encodeWithCoder: - static final encodeWithCoder_ = - objc.ObjCProtocolListenableMethod( - _protocol_NSSecureCoding, - _sel_encodeWithCoder_, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_18v1jvf) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSSecureCoding, - _sel_encodeWithCoder_, - isRequired: true, - isInstanceMethod: true, - ), - (void Function(NSCoder) func) => - ObjCBlock_ffiVoid_ffiVoid_NSCoder.fromFunction( - (ffi.Pointer _, NSCoder arg1) => func(arg1), - ), - (void Function(NSCoder) func) => - ObjCBlock_ffiVoid_ffiVoid_NSCoder.listener( - (ffi.Pointer _, NSCoder arg1) => func(arg1), - ), - (void Function(NSCoder) func) => - ObjCBlock_ffiVoid_ffiVoid_NSCoder.blocking( - (ffi.Pointer _, NSCoder arg1) => func(arg1), - ), - ); - - /// initWithCoder: - static final initWithCoder_ = - objc.ObjCProtocolMethod( - _protocol_NSSecureCoding, - _sel_initWithCoder_, - ffi.Native.addressOf< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_xr62hr) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSSecureCoding, - _sel_initWithCoder_, - isRequired: true, - isInstanceMethod: true, - ), - (Dartinstancetype? Function(NSCoder) func) => - ObjCBlock_instancetype_ffiVoid_NSCoder_retained.fromFunction( - (ffi.Pointer _, NSCoder arg1) => func(arg1), - ), - ); +/// iOS: introduced 13.0.0 +/// macOS: introduced 10.15.0 +sealed class NSOrderedCollectionDifferenceCalculationOptions { + static const NSOrderedCollectionDifferenceCalculationOmitInsertedObjects = 1; + static const NSOrderedCollectionDifferenceCalculationOmitRemovedObjects = 2; + static const NSOrderedCollectionDifferenceCalculationInferMoves = 4; } -/// NSSet -extension type NSSet._(objc.ObjCObject object$) +/// NSOrderedSet +extension type NSOrderedSet._(objc.ObjCObject object$) implements objc.ObjCObject, NSObject, @@ -27022,128 +17564,253 @@ extension type NSSet._(objc.ObjCObject object$) NSMutableCopying, NSSecureCoding, NSFastEnumeration { - /// Creates a [NSSet] from [elements]. - static NSSet of(Iterable elements) => - NSMutableSet.of(elements); - - /// Constructs a [NSSet] that points to the same underlying object as [other]. - NSSet.as(objc.ObjCObject other) : object$ = other { + /// Constructs a [NSOrderedSet] that points to the same underlying object as [other]. + NSOrderedSet.as(objc.ObjCObject other) : object$ = other { + objc.checkOsVersionInternal( + 'NSOrderedSet', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); assert(isA(object$)); } - /// Constructs a [NSSet] that wraps the given raw object pointer. - NSSet.fromPointer( + /// Constructs a [NSOrderedSet] that wraps the given raw object pointer. + NSOrderedSet.fromPointer( ffi.Pointer other, { bool retain = false, bool release = false, }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + objc.checkOsVersionInternal( + 'NSOrderedSet', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); assert(isA(object$)); } - /// Returns whether [obj] is an instance of [NSSet]. + /// Returns whether [obj] is an instance of [NSOrderedSet]. static bool isA(objc.ObjCObject? obj) => obj == null ? false : _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, - _class_NSSet, + _class_NSOrderedSet, ); /// alloc - static NSSet alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSSet, _sel_alloc); - return NSSet.fromPointer($ret, retain: false, release: true); + static NSOrderedSet alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSOrderedSet, _sel_alloc); + return NSOrderedSet.fromPointer($ret, retain: false, release: true); } /// allocWithZone: - static NSSet allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428(_class_NSSet, _sel_allocWithZone_, zone); - return NSSet.fromPointer($ret, retain: false, release: true); + static NSOrderedSet allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSOrderedSet, + _sel_allocWithZone_, + zone, + ); + return NSOrderedSet.fromPointer($ret, retain: false, release: true); } /// new - static NSSet new$() { - final $ret = _objc_msgSend_151sglz(_class_NSSet, _sel_new); - return NSSet.fromPointer($ret, retain: false, release: true); + static NSOrderedSet new$() { + final $ret = _objc_msgSend_151sglz(_class_NSOrderedSet, _sel_new); + return NSOrderedSet.fromPointer($ret, retain: false, release: true); } - /// set - static NSSet set() { - final $ret = _objc_msgSend_151sglz(_class_NSSet, _sel_set); - return NSSet.fromPointer($ret, retain: true, release: true); + /// orderedSet + static NSOrderedSet orderedSet() { + objc.checkOsVersionInternal( + 'NSOrderedSet.orderedSet', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + final $ret = _objc_msgSend_151sglz(_class_NSOrderedSet, _sel_orderedSet); + return NSOrderedSet.fromPointer($ret, retain: true, release: true); + } + + /// orderedSetWithArray: + static NSOrderedSet orderedSetWithArray(NSArray array) { + final _$$ref$1 = array.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.orderedSetWithArray:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _class_NSOrderedSet, + _sel_orderedSetWithArray_, + _$$ref$1.pointer, + ); + return NSOrderedSet.fromPointer($ret, retain: true, release: true); } - /// setWithArray: - static NSSet setWithArray(NSArray array) { + /// orderedSetWithArray:range:copyItems: + static NSOrderedSet orderedSetWithArray$1( + NSArray array, { + required NSRange range, + required bool copyItems, + }) { final _$$ref$1 = array.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSSet, - _sel_setWithArray_, + objc.checkOsVersionInternal( + 'NSOrderedSet.orderedSetWithArray:range:copyItems:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + final $ret = _objc_msgSend_w9bq5x( + _class_NSOrderedSet, + _sel_orderedSetWithArray_range_copyItems_, _$$ref$1.pointer, + range, + copyItems, ); - return NSSet.fromPointer($ret, retain: true, release: true); + return NSOrderedSet.fromPointer($ret, retain: true, release: true); } - /// setWithObject: - static NSSet setWithObject(objc.ObjCObject object) { + /// orderedSetWithObject: + static NSOrderedSet orderedSetWithObject(objc.ObjCObject object) { final _$$ref$1 = object.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.orderedSetWithObject:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); final $ret = _objc_msgSend_1sotr3r( - _class_NSSet, - _sel_setWithObject_, + _class_NSOrderedSet, + _sel_orderedSetWithObject_, _$$ref$1.pointer, ); - return NSSet.fromPointer($ret, retain: true, release: true); + return NSOrderedSet.fromPointer($ret, retain: true, release: true); } - /// setWithObjects: - static NSSet setWithObjects(objc.ObjCObject firstObj) { + /// orderedSetWithObjects: + static NSOrderedSet orderedSetWithObjects(objc.ObjCObject firstObj) { final _$$ref$1 = firstObj.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.orderedSetWithObjects:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); final $ret = _objc_msgSend_1sotr3r( - _class_NSSet, - _sel_setWithObjects_, + _class_NSOrderedSet, + _sel_orderedSetWithObjects_, _$$ref$1.pointer, ); - return NSSet.fromPointer($ret, retain: true, release: true); + return NSOrderedSet.fromPointer($ret, retain: true, release: true); } - /// setWithObjects:count: - static NSSet setWithObjects$1( + /// orderedSetWithObjects:count: + static NSOrderedSet orderedSetWithObjects$1( ffi.Pointer> objects, { required DartNSUInteger count, }) { + objc.checkOsVersionInternal( + 'NSOrderedSet.orderedSetWithObjects:count:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); final $ret = _objc_msgSend_zmbtbd( - _class_NSSet, - _sel_setWithObjects_count_, + _class_NSOrderedSet, + _sel_orderedSetWithObjects_count_, objects, count, ); - return NSSet.fromPointer($ret, retain: true, release: true); + return NSOrderedSet.fromPointer($ret, retain: true, release: true); } - /// setWithSet: - static NSSet setWithSet(NSSet set) { + /// orderedSetWithOrderedSet: + static NSOrderedSet orderedSetWithOrderedSet(NSOrderedSet set) { final _$$ref$1 = set.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.orderedSetWithOrderedSet:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); final $ret = _objc_msgSend_1sotr3r( - _class_NSSet, - _sel_setWithSet_, + _class_NSOrderedSet, + _sel_orderedSetWithOrderedSet_, _$$ref$1.pointer, ); - return NSSet.fromPointer($ret, retain: true, release: true); + return NSOrderedSet.fromPointer($ret, retain: true, release: true); + } + + /// orderedSetWithOrderedSet:range:copyItems: + static NSOrderedSet orderedSetWithOrderedSet$1( + NSOrderedSet set, { + required NSRange range, + required bool copyItems, + }) { + final _$$ref$1 = set.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.orderedSetWithOrderedSet:range:copyItems:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + final $ret = _objc_msgSend_w9bq5x( + _class_NSOrderedSet, + _sel_orderedSetWithOrderedSet_range_copyItems_, + _$$ref$1.pointer, + range, + copyItems, + ); + return NSOrderedSet.fromPointer($ret, retain: true, release: true); + } + + /// orderedSetWithSet: + static NSOrderedSet orderedSetWithSet(NSSet set) { + final _$$ref$1 = set.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.orderedSetWithSet:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _class_NSOrderedSet, + _sel_orderedSetWithSet_, + _$$ref$1.pointer, + ); + return NSOrderedSet.fromPointer($ret, retain: true, release: true); + } + + /// orderedSetWithSet:copyItems: + static NSOrderedSet orderedSetWithSet$1( + NSSet set, { + required bool copyItems, + }) { + final _$$ref$1 = set.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.orderedSetWithSet:copyItems:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + final $ret = _objc_msgSend_17amj0z( + _class_NSOrderedSet, + _sel_orderedSetWithSet_copyItems_, + _$$ref$1.pointer, + copyItems, + ); + return NSOrderedSet.fromPointer($ret, retain: true, release: true); } /// supportsSecureCoding static bool getSupportsSecureCoding() { - return _objc_msgSend_91o635(_class_NSSet, _sel_supportsSecureCoding); + return _objc_msgSend_91o635(_class_NSOrderedSet, _sel_supportsSecureCoding); } - /// Returns a new instance of NSSet constructed with the default `new` method. - NSSet() : this.as(new$().object$); + /// Returns a new instance of NSOrderedSet constructed with the default `new` method. + NSOrderedSet() : this.as(new$().object$); } -extension NSSet$Methods on NSSet { +extension NSOrderedSet$Methods on NSOrderedSet { /// count DartNSUInteger get count { final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.count', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_count); } @@ -27153,9 +17820,9 @@ extension NSSet$Methods on NSSet { required ffi.Pointer> objects, required DartNSUInteger count, }) { - final _$$ref$7 = object$.ref; + final _$$ref$5 = object$.ref; return _objc_msgSend_1b5ysjl( - _$$ref$7.pointer, + _$$ref$5.pointer, _sel_countByEnumeratingWithState_objects_count_, state, objects, @@ -27165,288 +17832,504 @@ extension NSSet$Methods on NSSet { /// encodeWithCoder: void encodeWithCoder(NSCoder coder) { - final _$$ref$30 = object$.ref; - final _$$ref$31 = coder.ref; + final _$$ref$24 = object$.ref; + final _$$ref$25 = coder.ref; _objc_msgSend_xtuoz7( - _$$ref$30.pointer, + _$$ref$24.pointer, _sel_encodeWithCoder_, - _$$ref$31.pointer, + _$$ref$25.pointer, + ); + } + + /// indexOfObject: + DartNSUInteger indexOfObject(objc.ObjCObject object) { + final _$$ref = object$.ref; + final _$$ref$1 = object.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.indexOfObject:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + return _objc_msgSend_1vd1c5m( + _$$ref.pointer, + _sel_indexOfObject_, + _$$ref$1.pointer, ); } /// init - NSSet init() { - final _$$ref$39 = object$.ref; + NSOrderedSet init() { + final _$$ref$33 = object$.ref; objc.checkOsVersionInternal( - 'NSSet.init', + 'NSOrderedSet.init', iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); final $ret = _objc_msgSend_151sglz( - _$$ref$39.retainAndReturnPointer(), + _$$ref$33.retainAndReturnPointer(), _sel_init, ); - return NSSet.fromPointer($ret, retain: false, release: true); + return NSOrderedSet.fromPointer($ret, retain: false, release: true); } /// initWithArray: - NSSet initWithArray(NSArray array) { + NSOrderedSet initWithArray(NSArray array) { final _$$ref$2 = object$.ref; final _$$ref$3 = array.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.initWithArray:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); final $ret = _objc_msgSend_1sotr3r( _$$ref$2.retainAndReturnPointer(), _sel_initWithArray_, _$$ref$3.pointer, ); - return NSSet.fromPointer($ret, retain: false, release: true); + return NSOrderedSet.fromPointer($ret, retain: false, release: true); + } + + /// initWithArray:copyItems: + NSOrderedSet initWithArray$1(NSArray set, {required bool copyItems}) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = set.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.initWithArray:copyItems:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + final $ret = _objc_msgSend_17amj0z( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithArray_copyItems_, + _$$ref$3.pointer, + copyItems, + ); + return NSOrderedSet.fromPointer($ret, retain: false, release: true); + } + + /// initWithArray:range:copyItems: + NSOrderedSet initWithArray$2( + NSArray set, { + required NSRange range, + required bool copyItems, + }) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = set.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.initWithArray:range:copyItems:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + final $ret = _objc_msgSend_w9bq5x( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithArray_range_copyItems_, + _$$ref$3.pointer, + range, + copyItems, + ); + return NSOrderedSet.fromPointer($ret, retain: false, release: true); } /// initWithCoder: - NSSet? initWithCoder(NSCoder coder) { - final _$$ref$46 = object$.ref; - final _$$ref$47 = coder.ref; + NSOrderedSet? initWithCoder(NSCoder coder) { + final _$$ref$40 = object$.ref; + final _$$ref$41 = coder.ref; final $ret = _objc_msgSend_1sotr3r( - _$$ref$46.retainAndReturnPointer(), + _$$ref$40.retainAndReturnPointer(), _sel_initWithCoder_, - _$$ref$47.pointer, + _$$ref$41.pointer, ); return $ret.address == 0 ? null - : NSSet.fromPointer($ret, retain: false, release: true); + : NSOrderedSet.fromPointer($ret, retain: false, release: true); + } + + /// initWithObject: + NSOrderedSet initWithObject(objc.ObjCObject object) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = object.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.initWithObject:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithObject_, + _$$ref$3.pointer, + ); + return NSOrderedSet.fromPointer($ret, retain: false, release: true); } /// initWithObjects: - NSSet initWithObjects(objc.ObjCObject firstObj) { + NSOrderedSet initWithObjects(objc.ObjCObject firstObj) { final _$$ref$2 = object$.ref; final _$$ref$3 = firstObj.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.initWithObjects:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); final $ret = _objc_msgSend_1sotr3r( _$$ref$2.retainAndReturnPointer(), _sel_initWithObjects_, _$$ref$3.pointer, ); - return NSSet.fromPointer($ret, retain: false, release: true); + return NSOrderedSet.fromPointer($ret, retain: false, release: true); } /// initWithObjects:count: - NSSet initWithObjects$1( + NSOrderedSet initWithObjects$1( ffi.Pointer> objects, { required DartNSUInteger count, }) { final _$$ref$1 = object$.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.initWithObjects:count:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); final $ret = _objc_msgSend_zmbtbd( _$$ref$1.retainAndReturnPointer(), _sel_initWithObjects_count_, objects, count, ); - return NSSet.fromPointer($ret, retain: false, release: true); + return NSOrderedSet.fromPointer($ret, retain: false, release: true); + } + + /// initWithOrderedSet: + NSOrderedSet initWithOrderedSet(NSOrderedSet set) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = set.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.initWithOrderedSet:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + final $ret = _objc_msgSend_1sotr3r( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithOrderedSet_, + _$$ref$3.pointer, + ); + return NSOrderedSet.fromPointer($ret, retain: false, release: true); + } + + /// initWithOrderedSet:copyItems: + NSOrderedSet initWithOrderedSet$1( + NSOrderedSet set, { + required bool copyItems, + }) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = set.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.initWithOrderedSet:copyItems:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + final $ret = _objc_msgSend_17amj0z( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithOrderedSet_copyItems_, + _$$ref$3.pointer, + copyItems, + ); + return NSOrderedSet.fromPointer($ret, retain: false, release: true); + } + + /// initWithOrderedSet:range:copyItems: + NSOrderedSet initWithOrderedSet$2( + NSOrderedSet set, { + required NSRange range, + required bool copyItems, + }) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = set.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.initWithOrderedSet:range:copyItems:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + final $ret = _objc_msgSend_w9bq5x( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithOrderedSet_range_copyItems_, + _$$ref$3.pointer, + range, + copyItems, + ); + return NSOrderedSet.fromPointer($ret, retain: false, release: true); } /// initWithSet: - NSSet initWithSet(NSSet set) { + NSOrderedSet initWithSet(NSSet set) { final _$$ref$2 = object$.ref; final _$$ref$3 = set.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.initWithSet:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); final $ret = _objc_msgSend_1sotr3r( _$$ref$2.retainAndReturnPointer(), _sel_initWithSet_, _$$ref$3.pointer, ); - return NSSet.fromPointer($ret, retain: false, release: true); + return NSOrderedSet.fromPointer($ret, retain: false, release: true); } /// initWithSet:copyItems: - NSSet initWithSet$1(NSSet set, {required bool copyItems}) { + NSOrderedSet initWithSet$1(NSSet set, {required bool copyItems}) { final _$$ref$2 = object$.ref; final _$$ref$3 = set.ref; + objc.checkOsVersionInternal( + 'NSOrderedSet.initWithSet:copyItems:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); final $ret = _objc_msgSend_17amj0z( _$$ref$2.retainAndReturnPointer(), _sel_initWithSet_copyItems_, _$$ref$3.pointer, copyItems, ); - return NSSet.fromPointer($ret, retain: false, release: true); + return NSOrderedSet.fromPointer($ret, retain: false, release: true); } - /// member: - objc.ObjCObject? member(objc.ObjCObject object) { + /// objectAtIndex: + objc.ObjCObject objectAtIndex(DartNSUInteger idx) { final _$$ref = object$.ref; - final _$$ref$1 = object.ref; - final $ret = _objc_msgSend_1sotr3r( + objc.checkOsVersionInternal( + 'NSOrderedSet.objectAtIndex:', + iOS: (false, (5, 0, 0)), + macOS: (false, (10, 7, 0)), + ); + final $ret = _objc_msgSend_14hpxwa( _$$ref.pointer, - _sel_member_, - _$$ref$1.pointer, + _sel_objectAtIndex_, + idx, ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); + return objc.ObjCObject($ret, retain: true, release: true); } +} - /// objectEnumerator - NSEnumerator objectEnumerator() { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_objectEnumerator); - return NSEnumerator.fromPointer($ret, retain: true, release: true); +/// NSOutputStream +extension type NSOutputStream._(objc.ObjCObject object$) + implements objc.ObjCObject, NSStream { + /// Constructs a [NSOutputStream] that points to the same underlying object as [other]. + NSOutputStream.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); } -} -/// NSSetCreation -extension NSSetCreation on NSSet {} + /// Constructs a [NSOutputStream] that wraps the given raw object pointer. + NSOutputStream.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + assert(isA(object$)); + } -/// NSSharedKeySetDictionary -extension NSSharedKeySetDictionary on NSDictionary { - /// sharedKeySetForKeys: - static objc.ObjCObject sharedKeySetForKeys(NSArray keys) { - final _$$ref = keys.ref; + /// Returns whether [obj] is an instance of [NSOutputStream]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSOutputStream, + ); + + /// alloc + static NSOutputStream alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSOutputStream, _sel_alloc); + return NSOutputStream.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NSOutputStream allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSOutputStream, + _sel_allocWithZone_, + zone, + ); + return NSOutputStream.fromPointer($ret, retain: false, release: true); + } + + /// new + static NSOutputStream new$() { + final $ret = _objc_msgSend_151sglz(_class_NSOutputStream, _sel_new); + return NSOutputStream.fromPointer($ret, retain: false, release: true); + } + + /// outputStreamToBuffer:capacity: + static NSOutputStream outputStreamToBuffer( + ffi.Pointer buffer, { + required DartNSUInteger capacity, + }) { + final $ret = _objc_msgSend_158ju31( + _class_NSOutputStream, + _sel_outputStreamToBuffer_capacity_, + buffer, + capacity, + ); + return NSOutputStream.fromPointer($ret, retain: true, release: true); + } + + /// outputStreamToFileAtPath:append: + static NSOutputStream outputStreamToFileAtPath( + NSString path, { + required bool append, + }) { + final _$$ref = path.ref; + final $ret = _objc_msgSend_17amj0z( + _class_NSOutputStream, + _sel_outputStreamToFileAtPath_append_, + _$$ref.pointer, + append, + ); + return NSOutputStream.fromPointer($ret, retain: true, release: true); + } + + /// outputStreamToMemory + static NSOutputStream outputStreamToMemory() { + final $ret = _objc_msgSend_151sglz( + _class_NSOutputStream, + _sel_outputStreamToMemory, + ); + return NSOutputStream.fromPointer($ret, retain: true, release: true); + } + + /// outputStreamWithURL:append: + static NSOutputStream? outputStreamWithURL( + NSURL url, { + required bool append, + }) { + final _$$ref = url.ref; objc.checkOsVersionInternal( - 'NSDictionary.sharedKeySetForKeys:', - iOS: (false, (6, 0, 0)), - macOS: (false, (10, 8, 0)), + 'NSOutputStream.outputStreamWithURL:append:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - final $ret = _objc_msgSend_1sotr3r( - _class_NSDictionary, - _sel_sharedKeySetForKeys_, + final $ret = _objc_msgSend_17amj0z( + _class_NSOutputStream, + _sel_outputStreamWithURL_append_, _$$ref.pointer, + append, ); - return objc.ObjCObject($ret, retain: true, release: true); + return $ret.address == 0 + ? null + : NSOutputStream.fromPointer($ret, retain: true, release: true); + } + + /// Returns a new instance of NSOutputStream constructed with the default `new` method. + NSOutputStream() : this.as(new$().object$); +} + +extension NSOutputStream$Methods on NSOutputStream { + /// hasSpaceAvailable + bool get hasSpaceAvailable { + final _$$ref = object$.ref; + return _objc_msgSend_91o635(_$$ref.pointer, _sel_hasSpaceAvailable); } -} -/// NSSharedKeySetDictionary -extension NSSharedKeySetDictionary$1 on NSMutableDictionary { - /// dictionaryWithSharedKeySet: - static NSMutableDictionary dictionaryWithSharedKeySet( - objc.ObjCObject keyset, - ) { - final _$$ref = keyset.ref; + /// init + NSOutputStream init() { + final _$$ref$34 = object$.ref; objc.checkOsVersionInternal( - 'NSMutableDictionary.dictionaryWithSharedKeySet:', - iOS: (false, (6, 0, 0)), - macOS: (false, (10, 8, 0)), + 'NSOutputStream.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - final $ret = _objc_msgSend_1sotr3r( - _class_NSMutableDictionary, - _sel_dictionaryWithSharedKeySet_, - _$$ref.pointer, + final $ret = _objc_msgSend_151sglz( + _$$ref$34.retainAndReturnPointer(), + _sel_init, ); - return NSMutableDictionary.fromPointer($ret, retain: true, release: true); + return NSOutputStream.fromPointer($ret, retain: false, release: true); } -} -/// NSSocketStreamCreationExtensions -extension NSSocketStreamCreationExtensions on NSStream { - /// getStreamsToHost:port:inputStream:outputStream: - @Deprecated('Use nw_connection_t in Network framework instead') - static void getStreamsToHost( - NSHost host, { - required int port, - required ffi.Pointer> inputStream, - required ffi.Pointer> outputStream, + /// initToBuffer:capacity: + NSOutputStream initToBuffer( + ffi.Pointer buffer, { + required DartNSUInteger capacity, }) { - final _$$ref = host.ref; - objc.checkOsVersionInternal( - 'NSStream.getStreamsToHost:port:inputStream:outputStream:', - iOS: (true, null), - macOS: (false, (10, 3, 0)), - ); - _objc_msgSend_1jknn71( - _class_NSStream, - _sel_getStreamsToHost_port_inputStream_outputStream_, - _$$ref.pointer, - port, - inputStream, - outputStream, + final _$$ref = object$.ref; + final $ret = _objc_msgSend_158ju31( + _$$ref.retainAndReturnPointer(), + _sel_initToBuffer_capacity_, + buffer, + capacity, ); + return NSOutputStream.fromPointer($ret, retain: false, release: true); } - /// getStreamsToHostWithName:port:inputStream:outputStream: - @Deprecated('Use nw_connection_t in Network framework instead') - static void getStreamsToHostWithName( - NSString hostname, { - required int port, - required ffi.Pointer> inputStream, - required ffi.Pointer> outputStream, - }) { - final _$$ref = hostname.ref; - objc.checkOsVersionInternal( - 'NSStream.getStreamsToHostWithName:port:inputStream:outputStream:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), + /// initToFileAtPath:append: + NSOutputStream? initToFileAtPath(NSString path, {required bool append}) { + final _$$ref = object$.ref; + final _$$ref$1 = path.ref; + final $ret = _objc_msgSend_17amj0z( + _$$ref.retainAndReturnPointer(), + _sel_initToFileAtPath_append_, + _$$ref$1.pointer, + append, ); - _objc_msgSend_1jknn71( - _class_NSStream, - _sel_getStreamsToHostWithName_port_inputStream_outputStream_, - _$$ref.pointer, - port, - inputStream, - outputStream, + return $ret.address == 0 + ? null + : NSOutputStream.fromPointer($ret, retain: false, release: true); + } + + /// initToMemory + NSOutputStream initToMemory() { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz( + _$$ref.retainAndReturnPointer(), + _sel_initToMemory, ); + return NSOutputStream.fromPointer($ret, retain: false, release: true); } -} -/// NSSortDescriptorSorting -extension NSSortDescriptorSorting on NSSet { - /// sortedArrayUsingDescriptors: - NSArray sortedArrayUsingDescriptors(NSArray sortDescriptors) { + /// initWithURL:append: + NSOutputStream? initWithURL(NSURL url, {required bool append}) { final _$$ref = object$.ref; - final _$$ref$1 = sortDescriptors.ref; + final _$$ref$1 = url.ref; objc.checkOsVersionInternal( - 'NSSet.sortedArrayUsingDescriptors:', + 'NSOutputStream.initWithURL:append:', iOS: (false, (4, 0, 0)), macOS: (false, (10, 6, 0)), ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_sortedArrayUsingDescriptors_, - _$$ref$1.pointer, - ); - return NSArray.fromPointer($ret, retain: true, release: true); - } -} - -/// NSSortDescriptorSorting -extension NSSortDescriptorSorting$1 on NSMutableArray { - /// sortUsingDescriptors: - void sortUsingDescriptors(NSArray sortDescriptors) { - final _$$ref = object$.ref; - final _$$ref$1 = sortDescriptors.ref; - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_sortUsingDescriptors_, + final $ret = _objc_msgSend_17amj0z( + _$$ref.retainAndReturnPointer(), + _sel_initWithURL_append_, _$$ref$1.pointer, + append, ); + return $ret.address == 0 + ? null + : NSOutputStream.fromPointer($ret, retain: false, release: true); } -} -/// NSSortDescriptorSorting -extension NSSortDescriptorSorting$2 on NSArray { - /// sortedArrayUsingDescriptors: - NSArray sortedArrayUsingDescriptors(NSArray sortDescriptors) { + /// write:maxLength: + int write( + ffi.Pointer buffer, { + required DartNSUInteger maxLength, + }) { final _$$ref = object$.ref; - final _$$ref$1 = sortDescriptors.ref; - final $ret = _objc_msgSend_1sotr3r( + return _objc_msgSend_11e9f5x( _$$ref.pointer, - _sel_sortedArrayUsingDescriptors_, - _$$ref$1.pointer, + _sel_write_maxLength_, + buffer, + maxLength, ); - return NSArray.fromPointer($ret, retain: true, release: true); } } -sealed class NSSortOptions { - static const NSSortConcurrent = 1; - static const NSSortStable = 16; -} - -/// NSStream -extension type NSStream._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject { - /// Constructs a [NSStream] that points to the same underlying object as [other]. - NSStream.as(objc.ObjCObject other) : object$ = other { +/// NSPort +extension type NSPort._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject, NSCopying, NSCoding { + /// Constructs a [NSPort] that points to the same underlying object as [other]. + NSPort.as(objc.ObjCObject other) : object$ = other { assert(isA(object$)); } - /// Constructs a [NSStream] that wraps the given raw object pointer. - NSStream.fromPointer( + /// Constructs a [NSPort] that wraps the given raw object pointer. + NSPort.fromPointer( ffi.Pointer other, { bool retain = false, bool release = false, @@ -27454,96 +18337,113 @@ extension type NSStream._(objc.ObjCObject object$) assert(isA(object$)); } - /// Returns whether [obj] is an instance of [NSStream]. + /// Returns whether [obj] is an instance of [NSPort]. static bool isA(objc.ObjCObject? obj) => obj == null ? false : _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, - _class_NSStream, + _class_NSPort, ); /// alloc - static NSStream alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSStream, _sel_alloc); - return NSStream.fromPointer($ret, retain: false, release: true); + static NSPort alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSPort, _sel_alloc); + return NSPort.fromPointer($ret, retain: false, release: true); } /// allocWithZone: - static NSStream allocWithZone(ffi.Pointer zone) { + static NSPort allocWithZone(ffi.Pointer zone) { final $ret = _objc_msgSend_1cwp428( - _class_NSStream, + _class_NSPort, _sel_allocWithZone_, zone, ); - return NSStream.fromPointer($ret, retain: false, release: true); + return NSPort.fromPointer($ret, retain: false, release: true); } /// new - static NSStream new$() { - final $ret = _objc_msgSend_151sglz(_class_NSStream, _sel_new); - return NSStream.fromPointer($ret, retain: false, release: true); + static NSPort new$() { + final $ret = _objc_msgSend_151sglz(_class_NSPort, _sel_new); + return NSPort.fromPointer($ret, retain: false, release: true); } - /// Returns a new instance of NSStream constructed with the default `new` method. - NSStream() : this.as(new$().object$); -} - -extension NSStream$Methods on NSStream { - /// close - void close() { - final _$$ref = object$.ref; - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_close); + /// port + static NSPort port() { + final $ret = _objc_msgSend_151sglz(_class_NSPort, _sel_port); + return NSPort.fromPointer($ret, retain: true, release: true); } + /// Returns a new instance of NSPort constructed with the default `new` method. + NSPort() : this.as(new$().object$); +} + +extension NSPort$Methods on NSPort { /// delegate - NSStreamDelegate? get delegate { + NSPortDelegate? delegate() { final _$$ref = object$.ref; final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_delegate); return $ret.address == 0 ? null - : NSStreamDelegate.fromPointer($ret, retain: true, release: true); + : NSPortDelegate.fromPointer($ret, retain: true, release: true); + } + + /// encodeWithCoder: + void encodeWithCoder(NSCoder coder) { + final _$$ref$26 = object$.ref; + final _$$ref$27 = coder.ref; + _objc_msgSend_xtuoz7( + _$$ref$26.pointer, + _sel_encodeWithCoder_, + _$$ref$27.pointer, + ); } /// init - NSStream init() { - final _$$ref$40 = object$.ref; + NSPort init() { + final _$$ref$35 = object$.ref; objc.checkOsVersionInternal( - 'NSStream.init', + 'NSPort.init', iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); final $ret = _objc_msgSend_151sglz( - _$$ref$40.retainAndReturnPointer(), + _$$ref$35.retainAndReturnPointer(), _sel_init, ); - return NSStream.fromPointer($ret, retain: false, release: true); - } - - /// open - void open() { - final _$$ref = object$.ref; - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_open); + return NSPort.fromPointer($ret, retain: false, release: true); } - /// propertyForKey: - objc.ObjCObject? propertyForKey(NSString key) { - final _$$ref = object$.ref; - final _$$ref$1 = key.ref; + /// initWithCoder: + NSPort? initWithCoder(NSCoder coder) { + final _$$ref$42 = object$.ref; + final _$$ref$43 = coder.ref; final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_propertyForKey_, - _$$ref$1.pointer, + _$$ref$42.retainAndReturnPointer(), + _sel_initWithCoder_, + _$$ref$43.pointer, ); return $ret.address == 0 ? null - : objc.ObjCObject($ret, retain: true, release: true); + : NSPort.fromPointer($ret, retain: false, release: true); + } + + /// invalidate + void invalidate() { + final _$$ref = object$.ref; + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_invalidate); + } + + /// isValid + bool get isValid { + final _$$ref = object$.ref; + return _objc_msgSend_91o635(_$$ref.pointer, _sel_isValid); } /// removeFromRunLoop:forMode: - void removeFromRunLoop(NSRunLoop aRunLoop, {required NSString forMode}) { + void removeFromRunLoop(NSRunLoop runLoop, {required NSString forMode}) { final _$$ref = object$.ref; - final _$$ref$1 = aRunLoop.ref; + final _$$ref$1 = runLoop.ref; final _$$ref$2 = forMode.ref; _objc_msgSend_pfv6jd( _$$ref.pointer, @@ -27553,10 +18453,16 @@ extension NSStream$Methods on NSStream { ); } + /// reservedSpaceLength + DartNSUInteger get reservedSpaceLength { + final _$$ref = object$.ref; + return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_reservedSpaceLength); + } + /// scheduleInRunLoop:forMode: - void scheduleInRunLoop(NSRunLoop aRunLoop, {required NSString forMode}) { + void scheduleInRunLoop(NSRunLoop runLoop, {required NSString forMode}) { final _$$ref = object$.ref; - final _$$ref$1 = aRunLoop.ref; + final _$$ref$1 = runLoop.ref; final _$$ref$2 = forMode.ref; _objc_msgSend_pfv6jd( _$$ref.pointer, @@ -27566,331 +18472,406 @@ extension NSStream$Methods on NSStream { ); } - /// setDelegate: - set delegate(NSStreamDelegate? value) { + /// sendBeforeDate:components:from:reserved: + bool sendBeforeDate( + NSDate limitDate, { + NSMutableArray? components, + NSPort? from, + required DartNSUInteger reserved, + }) { final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; - _objc_msgSend_xtuoz7( + final _$$ref$1 = limitDate.ref; + final _$$ref$2 = components?.ref; + final _$$ref$3 = from?.ref; + return _objc_msgSend_1frfu5e( _$$ref.pointer, - _sel_setDelegate_, - _$$ref$1?.pointer ?? ffi.nullptr, + _sel_sendBeforeDate_components_from_reserved_, + _$$ref$1.pointer, + _$$ref$2?.pointer ?? ffi.nullptr, + _$$ref$3?.pointer ?? ffi.nullptr, + reserved, ); } - /// setProperty:forKey: - bool setProperty(objc.ObjCObject? property, {required NSString forKey}) { + /// sendBeforeDate:msgid:components:from:reserved: + bool sendBeforeDate$1( + NSDate limitDate, { + required DartNSUInteger msgid, + NSMutableArray? components, + NSPort? from, + required DartNSUInteger reserved, + }) { final _$$ref = object$.ref; - final _$$ref$1 = property?.ref; - final _$$ref$2 = forKey.ref; - return _objc_msgSend_1lsax7n( + final _$$ref$1 = limitDate.ref; + final _$$ref$2 = components?.ref; + final _$$ref$3 = from?.ref; + return _objc_msgSend_gupwtj( _$$ref.pointer, - _sel_setProperty_forKey_, - _$$ref$1?.pointer ?? ffi.nullptr, - _$$ref$2.pointer, + _sel_sendBeforeDate_msgid_components_from_reserved_, + _$$ref$1.pointer, + msgid, + _$$ref$2?.pointer ?? ffi.nullptr, + _$$ref$3?.pointer ?? ffi.nullptr, + reserved, ); } - /// streamError - NSError? get streamError { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_streamError); - return $ret.address == 0 - ? null - : NSError.fromPointer($ret, retain: true, release: true); - } - - /// streamStatus - NSStreamStatus get streamStatus { + /// setDelegate: + void setDelegate(NSPortDelegate? anObject) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_1efxbd8(_$$ref.pointer, _sel_streamStatus); - return NSStreamStatus.fromValue($ret); - } -} - -/// NSStreamBoundPairCreationExtensions -extension NSStreamBoundPairCreationExtensions on NSStream { - /// getBoundStreamsWithBufferSize:inputStream:outputStream: - static void getBoundStreamsWithBufferSize( - DartNSUInteger bufferSize, { - required ffi.Pointer> inputStream, - required ffi.Pointer> outputStream, - }) { - objc.checkOsVersionInternal( - 'NSStream.getBoundStreamsWithBufferSize:inputStream:outputStream:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), - ); - _objc_msgSend_1i17va2( - _class_NSStream, - _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_, - bufferSize, - inputStream, - outputStream, + final _$$ref$1 = anObject?.ref; + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_setDelegate_, + _$$ref$1?.pointer ?? ffi.nullptr, ); } } -/// NSStreamDelegate -extension type NSStreamDelegate._(objc.ObjCProtocol object$) +/// NSPortDelegate +extension type NSPortDelegate._(objc.ObjCProtocol object$) implements objc.ObjCProtocol, NSObjectProtocol { - /// Constructs a [NSStreamDelegate] that points to the same underlying object as [other]. - NSStreamDelegate.as(objc.ObjCObject other) : object$ = other; + /// Constructs a [NSPortDelegate] that points to the same underlying object as [other]. + NSPortDelegate.as(objc.ObjCObject other) : object$ = other; - /// Constructs a [NSStreamDelegate] that wraps the given raw object pointer. - NSStreamDelegate.fromPointer( + /// Constructs a [NSPortDelegate] that wraps the given raw object pointer. + NSPortDelegate.fromPointer( ffi.Pointer other, { bool retain = false, bool release = false, }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSStreamDelegate]. + /// Returns whether [obj] is an instance of [NSPortDelegate]. static bool conformsTo(objc.ObjCObject obj) { return _objc_msgSend_e3qsqz( obj.ref.pointer, _sel_conformsToProtocol_, - _protocol_NSStreamDelegate, + _protocol_NSPortDelegate, ); } } -extension NSStreamDelegate$Methods on NSStreamDelegate { - /// stream:handleEvent: - void stream(NSStream aStream, {required DartNSUInteger handleEvent}) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = aStream.ref; - if (!objc.respondsToSelector(_$$ref$2.pointer, _sel_stream_handleEvent_)) { +extension NSPortDelegate$Methods on NSPortDelegate { + /// handlePortMessage: + void handlePortMessage(NSPortMessage message) { + final _$$ref = object$.ref; + final _$$ref$1 = message.ref; + if (!objc.respondsToSelector(_$$ref.pointer, _sel_handlePortMessage_)) { throw objc.UnimplementedOptionalMethodException( - 'NSStreamDelegate', - 'stream:handleEvent:', + 'NSPortDelegate', + 'handlePortMessage:', ); } - _objc_msgSend_3l8zum( - _$$ref$2.pointer, - _sel_stream_handleEvent_, - _$$ref$3.pointer, - handleEvent, + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_handlePortMessage_, + _$$ref$1.pointer, ); } } -interface class NSStreamDelegate$Builder { +interface class NSPortDelegate$Builder { /// Returns the [objc.Protocol] object for this protocol. static objc.Protocol get $protocol => - objc.Protocol.fromPointer(_protocol_NSStreamDelegate.cast()); + objc.Protocol.fromPointer(_protocol_NSPortDelegate.cast()); - /// Builds an object that implements the NSStreamDelegate protocol. To implement + /// Builds an object that implements the NSPortDelegate protocol. To implement /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. /// /// If `$keepIsolateAlive` is true, this protocol will keep this isolate /// alive until it is garbage collected by both Dart and ObjC. - static NSStreamDelegate implement({ - void Function(NSStream, DartNSUInteger)? stream_handleEvent_, + static NSPortDelegate implement({ + void Function(NSPortMessage)? handlePortMessage_, bool $keepIsolateAlive = true, }) { - final builder = objc.ObjCProtocolBuilder(debugName: 'NSStreamDelegate'); - NSStreamDelegate$Builder.stream_handleEvent_.implement( + final builder = objc.ObjCProtocolBuilder(debugName: 'NSPortDelegate'); + NSPortDelegate$Builder.handlePortMessage_.implement( builder, - stream_handleEvent_, + handlePortMessage_, ); builder.addProtocol($protocol); - return NSStreamDelegate.as( + return NSPortDelegate.as( builder.build(keepIsolateAlive: $keepIsolateAlive), ); } - /// Adds the implementation of the NSStreamDelegate protocol to an existing + /// Adds the implementation of the NSPortDelegate protocol to an existing /// [objc.ObjCProtocolBuilder]. /// /// Note: You cannot call this method after you have called `builder.build`. static void addToBuilder( objc.ObjCProtocolBuilder builder, { - void Function(NSStream, DartNSUInteger)? stream_handleEvent_, + void Function(NSPortMessage)? handlePortMessage_, bool $keepIsolateAlive = true, }) { - NSStreamDelegate$Builder.stream_handleEvent_.implement( + NSPortDelegate$Builder.handlePortMessage_.implement( builder, - stream_handleEvent_, + handlePortMessage_, ); builder.addProtocol($protocol); } - /// Builds an object that implements the NSStreamDelegate protocol. To implement + /// Builds an object that implements the NSPortDelegate protocol. To implement /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All /// methods that can be implemented as listeners will be. /// /// If `$keepIsolateAlive` is true, this protocol will keep this isolate /// alive until it is garbage collected by both Dart and ObjC. - static NSStreamDelegate implementAsListener({ - void Function(NSStream, DartNSUInteger)? stream_handleEvent_, + static NSPortDelegate implementAsListener({ + void Function(NSPortMessage)? handlePortMessage_, bool $keepIsolateAlive = true, }) { - final builder = objc.ObjCProtocolBuilder(debugName: 'NSStreamDelegate'); - NSStreamDelegate$Builder.stream_handleEvent_.implementAsListener( + final builder = objc.ObjCProtocolBuilder(debugName: 'NSPortDelegate'); + NSPortDelegate$Builder.handlePortMessage_.implementAsListener( builder, - stream_handleEvent_, + handlePortMessage_, ); builder.addProtocol($protocol); - return NSStreamDelegate.as( + return NSPortDelegate.as( builder.build(keepIsolateAlive: $keepIsolateAlive), ); } - /// Adds the implementation of the NSStreamDelegate protocol to an existing + /// Adds the implementation of the NSPortDelegate protocol to an existing /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will /// be. /// /// Note: You cannot call this method after you have called `builder.build`. static void addToBuilderAsListener( objc.ObjCProtocolBuilder builder, { - void Function(NSStream, DartNSUInteger)? stream_handleEvent_, + void Function(NSPortMessage)? handlePortMessage_, bool $keepIsolateAlive = true, }) { - NSStreamDelegate$Builder.stream_handleEvent_.implementAsListener( + NSPortDelegate$Builder.handlePortMessage_.implementAsListener( builder, - stream_handleEvent_, + handlePortMessage_, ); builder.addProtocol($protocol); } - /// Builds an object that implements the NSStreamDelegate protocol. To implement + /// Builds an object that implements the NSPortDelegate protocol. To implement /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All /// methods that can be implemented as blocking listeners will be. /// /// If `$keepIsolateAlive` is true, this protocol will keep this isolate /// alive until it is garbage collected by both Dart and ObjC. - static NSStreamDelegate implementAsBlocking({ - void Function(NSStream, DartNSUInteger)? stream_handleEvent_, + static NSPortDelegate implementAsBlocking({ + void Function(NSPortMessage)? handlePortMessage_, bool $keepIsolateAlive = true, }) { - final builder = objc.ObjCProtocolBuilder(debugName: 'NSStreamDelegate'); - NSStreamDelegate$Builder.stream_handleEvent_.implementAsBlocking( + final builder = objc.ObjCProtocolBuilder(debugName: 'NSPortDelegate'); + NSPortDelegate$Builder.handlePortMessage_.implementAsBlocking( builder, - stream_handleEvent_, + handlePortMessage_, ); builder.addProtocol($protocol); - return NSStreamDelegate.as( + return NSPortDelegate.as( builder.build(keepIsolateAlive: $keepIsolateAlive), ); } - /// Adds the implementation of the NSStreamDelegate protocol to an existing + /// Adds the implementation of the NSPortDelegate protocol to an existing /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as blocking /// listeners will be. /// /// Note: You cannot call this method after you have called `builder.build`. static void addToBuilderAsBlocking( objc.ObjCProtocolBuilder builder, { - void Function(NSStream, DartNSUInteger)? stream_handleEvent_, + void Function(NSPortMessage)? handlePortMessage_, bool $keepIsolateAlive = true, }) { - NSStreamDelegate$Builder.stream_handleEvent_.implementAsBlocking( + NSPortDelegate$Builder.handlePortMessage_.implementAsBlocking( builder, - stream_handleEvent_, + handlePortMessage_, ); builder.addProtocol($protocol); } - /// stream:handleEvent: - static final stream_handleEvent_ = - objc.ObjCProtocolListenableMethod< - void Function(NSStream, DartNSUInteger) - >( - _protocol_NSStreamDelegate, - _sel_stream_handleEvent_, + /// handlePortMessage: + static final handlePortMessage_ = + objc.ObjCProtocolListenableMethod( + _protocol_NSPortDelegate, + _sel_handlePortMessage_, ffi.Native.addressOf< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - NSUInteger, ) > - >(_1wx624s_protocolTrampoline_hoampi) + >(_1wx624s_protocolTrampoline_18v1jvf) .cast(), objc.getProtocolMethodSignature( - _protocol_NSStreamDelegate, - _sel_stream_handleEvent_, + _protocol_NSPortDelegate, + _sel_handlePortMessage_, isRequired: false, isInstanceMethod: true, ), - (void Function(NSStream, DartNSUInteger) func) => - ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent.fromFunction( - (ffi.Pointer _, NSStream arg1, DartNSUInteger arg2) => - func(arg1, arg2), + (void Function(NSPortMessage) func) => + ObjCBlock_ffiVoid_ffiVoid_NSPortMessage.fromFunction( + (ffi.Pointer _, NSPortMessage arg1) => func(arg1), ), - (void Function(NSStream, DartNSUInteger) func) => - ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent.listener( - (ffi.Pointer _, NSStream arg1, DartNSUInteger arg2) => - func(arg1, arg2), + (void Function(NSPortMessage) func) => + ObjCBlock_ffiVoid_ffiVoid_NSPortMessage.listener( + (ffi.Pointer _, NSPortMessage arg1) => func(arg1), ), - (void Function(NSStream, DartNSUInteger) func) => - ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent.blocking( - (ffi.Pointer _, NSStream arg1, DartNSUInteger arg2) => - func(arg1, arg2), + (void Function(NSPortMessage) func) => + ObjCBlock_ffiVoid_ffiVoid_NSPortMessage.blocking( + (ffi.Pointer _, NSPortMessage arg1) => func(arg1), ), ); } -sealed class NSStreamEvent { - static const NSStreamEventNone = 0; - static const NSStreamEventOpenCompleted = 1; - static const NSStreamEventHasBytesAvailable = 2; - static const NSStreamEventHasSpaceAvailable = 4; - static const NSStreamEventErrorOccurred = 8; - static const NSStreamEventEndEncountered = 16; +/// NSPortMessage +extension type NSPortMessage._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject { + /// Constructs a [NSPortMessage] that points to the same underlying object as [other]. + NSPortMessage.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NSPortMessage] that wraps the given raw object pointer. + NSPortMessage.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + assert(isA(object$)); + } + + /// Returns whether [obj] is an instance of [NSPortMessage]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSPortMessage, + ); + + /// alloc + static NSPortMessage alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSPortMessage, _sel_alloc); + return NSPortMessage.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NSPortMessage allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSPortMessage, + _sel_allocWithZone_, + zone, + ); + return NSPortMessage.fromPointer($ret, retain: false, release: true); + } + + /// new + static NSPortMessage new$() { + final $ret = _objc_msgSend_151sglz(_class_NSPortMessage, _sel_new); + return NSPortMessage.fromPointer($ret, retain: false, release: true); + } + + /// Returns a new instance of NSPortMessage constructed with the default `new` method. + NSPortMessage() : this.as(new$().object$); } -enum NSStreamStatus { - NSStreamStatusNotOpen(0), - NSStreamStatusOpening(1), - NSStreamStatusOpen(2), - NSStreamStatusReading(3), - NSStreamStatusWriting(4), - NSStreamStatusAtEnd(5), - NSStreamStatusClosed(6), - NSStreamStatusError(7); +extension NSPortMessage$Methods on NSPortMessage { + /// components + NSArray? get components { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_components); + return $ret.address == 0 + ? null + : NSArray.fromPointer($ret, retain: true, release: true); + } - final int value; - const NSStreamStatus(this.value); + /// init + NSPortMessage init() { + final _$$ref$36 = object$.ref; + objc.checkOsVersionInternal( + 'NSPortMessage.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref$36.retainAndReturnPointer(), + _sel_init, + ); + return NSPortMessage.fromPointer($ret, retain: false, release: true); + } - static NSStreamStatus fromValue(int value) => switch (value) { - 0 => NSStreamStatusNotOpen, - 1 => NSStreamStatusOpening, - 2 => NSStreamStatusOpen, - 3 => NSStreamStatusReading, - 4 => NSStreamStatusWriting, - 5 => NSStreamStatusAtEnd, - 6 => NSStreamStatusClosed, - 7 => NSStreamStatusError, - _ => throw ArgumentError('Unknown value for NSStreamStatus: $value'), - }; -} + /// initWithSendPort:receivePort:components: + NSPortMessage initWithSendPort( + NSPort? sendPort, { + NSPort? receivePort, + NSArray? components, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = sendPort?.ref; + final _$$ref$2 = receivePort?.ref; + final _$$ref$3 = components?.ref; + final $ret = _objc_msgSend_11spmsz( + _$$ref.retainAndReturnPointer(), + _sel_initWithSendPort_receivePort_components_, + _$$ref$1?.pointer ?? ffi.nullptr, + _$$ref$2?.pointer ?? ffi.nullptr, + _$$ref$3?.pointer ?? ffi.nullptr, + ); + return NSPortMessage.fromPointer($ret, retain: false, release: true); + } -/// NSString -extension type NSString._(objc.ObjCObject object$) - implements - objc.ObjCObject, - NSObject, - NSCopying, - NSMutableCopying, - NSSecureCoding { - NSString(String str) : this.as(_stringToNSString$(str)); + /// msgid + int get msgid { + final _$$ref = object$.ref; + return _objc_msgSend_usggvf(_$$ref.pointer, _sel_msgid); + } - static NSString _stringToNSString$(String str) { - final cstr = str.toNativeUtf16(); - final nsstr = stringWithCharacters(cstr.cast(), length: str.length); - pkg_ffi.calloc.free(cstr); - return nsstr; + /// receivePort + NSPort? get receivePort { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_receivePort); + return $ret.address == 0 + ? null + : NSPort.fromPointer($ret, retain: true, release: true); } - /// Constructs a [NSString] that points to the same underlying object as [other]. - NSString.as(objc.ObjCObject other) : object$ = other { + /// sendBeforeDate: + bool sendBeforeDate(NSDate date) { + final _$$ref = object$.ref; + final _$$ref$1 = date.ref; + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_sendBeforeDate_, + _$$ref$1.pointer, + ); + } + + /// sendPort + NSPort? get sendPort { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_sendPort); + return $ret.address == 0 + ? null + : NSPort.fromPointer($ret, retain: true, release: true); + } + + /// setMsgid: + set msgid(int value) { + final _$$ref = object$.ref; + _objc_msgSend_1xpk2hb(_$$ref.pointer, _sel_setMsgid_, value); + } +} + +/// NSProgress +extension type NSProgress._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject { + /// Constructs a [NSProgress] that points to the same underlying object as [other]. + NSProgress.as(objc.ObjCObject other) : object$ = other { assert(isA(object$)); } - /// Constructs a [NSString] that wraps the given raw object pointer. - NSString.fromPointer( + /// Constructs a [NSProgress] that wraps the given raw object pointer. + NSProgress.fromPointer( ffi.Pointer other, { bool retain = false, bool release = false, @@ -27898,4015 +18879,4026 @@ extension type NSString._(objc.ObjCObject object$) assert(isA(object$)); } - /// Returns whether [obj] is an instance of [NSString]. + /// Returns whether [obj] is an instance of [NSProgress]. static bool isA(objc.ObjCObject? obj) => obj == null ? false : _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, - _class_NSString, + _class_NSProgress, ); + /// addSubscriberForFileURL:withPublishingHandler: + /// + /// iOS: unavailable + /// macOS: introduced 10.9.0 + static objc.ObjCObject addSubscriberForFileURL( + NSURL url, { + required objc.ObjCBlock< + objc.ObjCBlock? Function(NSProgress) + > + withPublishingHandler, + }) { + final _$$ref = url.ref; + final _$$ref$1 = withPublishingHandler.ref; + objc.checkOsVersionInternal( + 'NSProgress.addSubscriberForFileURL:withPublishingHandler:', + iOS: (true, null), + macOS: (false, (10, 9, 0)), + ); + final $ret = _objc_msgSend_r0bo0s( + _class_NSProgress, + _sel_addSubscriberForFileURL_withPublishingHandler_, + _$$ref.pointer, + _$$ref$1.pointer, + ); + return objc.ObjCObject($ret, retain: true, release: true); + } + /// alloc - static NSString alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSString, _sel_alloc); - return NSString.fromPointer($ret, retain: false, release: true); + static NSProgress alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSProgress, _sel_alloc); + return NSProgress.fromPointer($ret, retain: false, release: true); } /// allocWithZone: - static NSString allocWithZone(ffi.Pointer zone) { + static NSProgress allocWithZone(ffi.Pointer zone) { final $ret = _objc_msgSend_1cwp428( - _class_NSString, + _class_NSProgress, _sel_allocWithZone_, zone, ); - return NSString.fromPointer($ret, retain: false, release: true); + return NSProgress.fromPointer($ret, retain: false, release: true); } - /// localizedStringWithFormat: - static NSString localizedStringWithFormat(NSString format) { - final _$$ref$1 = format.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSString, - _sel_localizedStringWithFormat_, - _$$ref$1.pointer, + /// currentProgress + static NSProgress? currentProgress() { + objc.checkOsVersionInternal( + 'NSProgress.currentProgress', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - return NSString.fromPointer($ret, retain: true, release: true); + final $ret = _objc_msgSend_151sglz(_class_NSProgress, _sel_currentProgress); + return $ret.address == 0 + ? null + : NSProgress.fromPointer($ret, retain: true, release: true); } - /// localizedStringWithValidatedFormat:validFormatSpecifiers:error: - static NSString? localizedStringWithValidatedFormat( - NSString format, { - required NSString validFormatSpecifiers, - }) { - final _$$ref$2 = format.ref; - final _$$ref$3 = validFormatSpecifiers.ref; + /// discreteProgressWithTotalUnitCount: + static NSProgress discreteProgressWithTotalUnitCount(int unitCount) { objc.checkOsVersionInternal( - 'NSString.localizedStringWithValidatedFormat:validFormatSpecifiers:error:', - iOS: (false, (11, 0, 0)), - macOS: (false, (10, 13, 0)), + 'NSProgress.discreteProgressWithTotalUnitCount:', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1pnyuds( - _class_NSString, - _sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_, - _$$ref$2.pointer, - _$$ref$3.pointer, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); - } finally { - pkg_ffi.calloc.free($err); - } + final $ret = _objc_msgSend_1ya1kjn( + _class_NSProgress, + _sel_discreteProgressWithTotalUnitCount_, + unitCount, + ); + return NSProgress.fromPointer($ret, retain: true, release: true); } /// new - static NSString new$() { - final $ret = _objc_msgSend_151sglz(_class_NSString, _sel_new); - return NSString.fromPointer($ret, retain: false, release: true); + static NSProgress new$() { + final $ret = _objc_msgSend_151sglz(_class_NSProgress, _sel_new); + return NSProgress.fromPointer($ret, retain: false, release: true); } - /// string - static NSString string() { - final $ret = _objc_msgSend_151sglz(_class_NSString, _sel_string); - return NSString.fromPointer($ret, retain: true, release: true); + /// progressWithTotalUnitCount: + static NSProgress progressWithTotalUnitCount(int unitCount) { + objc.checkOsVersionInternal( + 'NSProgress.progressWithTotalUnitCount:', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), + ); + final $ret = _objc_msgSend_1ya1kjn( + _class_NSProgress, + _sel_progressWithTotalUnitCount_, + unitCount, + ); + return NSProgress.fromPointer($ret, retain: true, release: true); } - /// stringWithCString:encoding: - static NSString? stringWithCString( - ffi.Pointer cString, { - required DartNSUInteger encoding, + /// progressWithTotalUnitCount:parent:pendingUnitCount: + static NSProgress progressWithTotalUnitCount$1( + int unitCount, { + required NSProgress parent, + required int pendingUnitCount, }) { - final $ret = _objc_msgSend_erqryg( - _class_NSString, - _sel_stringWithCString_encoding_, - cString, - encoding, + final _$$ref = parent.ref; + objc.checkOsVersionInternal( + 'NSProgress.progressWithTotalUnitCount:parent:pendingUnitCount:', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), ); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); + final $ret = _objc_msgSend_553v( + _class_NSProgress, + _sel_progressWithTotalUnitCount_parent_pendingUnitCount_, + unitCount, + _$$ref.pointer, + pendingUnitCount, + ); + return NSProgress.fromPointer($ret, retain: true, release: true); } - /// stringWithCharacters:length: - static NSString stringWithCharacters( - ffi.Pointer characters, { - required DartNSUInteger length, - }) { - final $ret = _objc_msgSend_9x4k8x( - _class_NSString, - _sel_stringWithCharacters_length_, - characters, - length, + /// removeSubscriber: + /// + /// iOS: unavailable + /// macOS: introduced 10.9.0 + static void removeSubscriber(objc.ObjCObject subscriber) { + final _$$ref = subscriber.ref; + objc.checkOsVersionInternal( + 'NSProgress.removeSubscriber:', + iOS: (true, null), + macOS: (false, (10, 9, 0)), + ); + _objc_msgSend_xtuoz7( + _class_NSProgress, + _sel_removeSubscriber_, + _$$ref.pointer, ); - return NSString.fromPointer($ret, retain: true, release: true); } - /// stringWithContentsOfFile:encoding:error: - static NSString? stringWithContentsOfFile( - NSString path, { - required DartNSUInteger encoding, - }) { - final _$$ref$1 = path.ref; - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1nomli1( - _class_NSString, - _sel_stringWithContentsOfFile_encoding_error_, - _$$ref$1.pointer, - encoding, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); - } finally { - pkg_ffi.calloc.free($err); - } + /// Returns a new instance of NSProgress constructed with the default `new` method. + NSProgress() : this.as(new$().object$); +} + +extension NSProgress$Methods on NSProgress { + /// addChild:withPendingUnitCount: + void addChild(NSProgress child, {required int withPendingUnitCount}) { + final _$$ref = object$.ref; + final _$$ref$1 = child.ref; + objc.checkOsVersionInternal( + 'NSProgress.addChild:withPendingUnitCount:', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), + ); + _objc_msgSend_1m7prh1( + _$$ref.pointer, + _sel_addChild_withPendingUnitCount_, + _$$ref$1.pointer, + withPendingUnitCount, + ); } - /// stringWithContentsOfFile:usedEncoding:error: - static NSString? stringWithContentsOfFile$1( - NSString path, { - required ffi.Pointer usedEncoding, - }) { - final _$$ref$1 = path.ref; - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1alewu7( - _class_NSString, - _sel_stringWithContentsOfFile_usedEncoding_error_, - _$$ref$1.pointer, - usedEncoding, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); - } finally { - pkg_ffi.calloc.free($err); - } + /// becomeCurrentWithPendingUnitCount: + void becomeCurrentWithPendingUnitCount(int unitCount) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSProgress.becomeCurrentWithPendingUnitCount:', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), + ); + _objc_msgSend_17gvxvj( + _$$ref.pointer, + _sel_becomeCurrentWithPendingUnitCount_, + unitCount, + ); } - /// stringWithContentsOfURL:encoding:error: - static NSString? stringWithContentsOfURL( - NSURL url, { - required DartNSUInteger encoding, - }) { - final _$$ref$1 = url.ref; - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1nomli1( - _class_NSString, - _sel_stringWithContentsOfURL_encoding_error_, - _$$ref$1.pointer, - encoding, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); - } finally { - pkg_ffi.calloc.free($err); - } + /// cancel + void cancel() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSProgress.cancel', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), + ); + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_cancel); } - /// stringWithContentsOfURL:usedEncoding:error: - static NSString? stringWithContentsOfURL$1( - NSURL url, { - required ffi.Pointer usedEncoding, - }) { - final _$$ref$1 = url.ref; - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1alewu7( - _class_NSString, - _sel_stringWithContentsOfURL_usedEncoding_error_, - _$$ref$1.pointer, - usedEncoding, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); - } finally { - pkg_ffi.calloc.free($err); - } + /// cancellationHandler + objc.ObjCBlock? get cancellationHandler { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSProgress.cancellationHandler', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), + ); + final $ret = _objc_msgSend_uwvaik(_$$ref.pointer, _sel_cancellationHandler); + return $ret.address == 0 + ? null + : ObjCBlock_ffiVoid.fromPointer($ret, retain: true, release: true); } - /// stringWithFormat: - static NSString stringWithFormat(NSString format) { - final _$$ref$1 = format.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSString, - _sel_stringWithFormat_, - _$$ref$1.pointer, + /// completedUnitCount + int get completedUnitCount { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSProgress.completedUnitCount', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - return NSString.fromPointer($ret, retain: true, release: true); + return _objc_msgSend_pysgoz(_$$ref.pointer, _sel_completedUnitCount); } - /// stringWithString: - static NSString stringWithString(NSString string) { - final _$$ref$1 = string.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSString, - _sel_stringWithString_, - _$$ref$1.pointer, + /// estimatedTimeRemaining + NSNumber? get estimatedTimeRemaining { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSProgress.estimatedTimeRemaining', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), ); - return NSString.fromPointer($ret, retain: true, release: true); + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_estimatedTimeRemaining, + ); + return $ret.address == 0 + ? null + : NSNumber.fromPointer($ret, retain: true, release: true); } - /// stringWithUTF8String: - static NSString? stringWithUTF8String( - ffi.Pointer nullTerminatedCString, - ) { - final $ret = _objc_msgSend_56zxyn( - _class_NSString, - _sel_stringWithUTF8String_, - nullTerminatedCString, + /// fileCompletedCount + NSNumber? get fileCompletedCount { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSProgress.fileCompletedCount', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_fileCompletedCount); + return $ret.address == 0 + ? null + : NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// fileOperationKind + NSString? get fileOperationKind { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSProgress.fileOperationKind', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_fileOperationKind); return $ret.address == 0 ? null : NSString.fromPointer($ret, retain: true, release: true); } - /// stringWithValidatedFormat:validFormatSpecifiers:error: - static NSString? stringWithValidatedFormat( - NSString format, { - required NSString validFormatSpecifiers, - }) { - final _$$ref$2 = format.ref; - final _$$ref$3 = validFormatSpecifiers.ref; + /// fileTotalCount + NSNumber? get fileTotalCount { + final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSString.stringWithValidatedFormat:validFormatSpecifiers:error:', + 'NSProgress.fileTotalCount', iOS: (false, (11, 0, 0)), macOS: (false, (10, 13, 0)), ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1pnyuds( - _class_NSString, - _sel_stringWithValidatedFormat_validFormatSpecifiers_error_, - _$$ref$2.pointer, - _$$ref$3.pointer, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); - } finally { - pkg_ffi.calloc.free($err); - } - } - - /// supportsSecureCoding - static bool getSupportsSecureCoding() { - return _objc_msgSend_91o635(_class_NSString, _sel_supportsSecureCoding); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_fileTotalCount); + return $ret.address == 0 + ? null + : NSNumber.fromPointer($ret, retain: true, release: true); } -} -extension NSString$Methods on NSString { - /// characterAtIndex: - int characterAtIndex(DartNSUInteger index) { + /// fileURL + NSURL? get fileURL { final _$$ref = object$.ref; - return _objc_msgSend_1deg8x(_$$ref.pointer, _sel_characterAtIndex_, index); + objc.checkOsVersionInternal( + 'NSProgress.fileURL', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_fileURL); + return $ret.address == 0 + ? null + : NSURL.fromPointer($ret, retain: true, release: true); } - /// encodeWithCoder: - void encodeWithCoder(NSCoder coder) { - final _$$ref$32 = object$.ref; - final _$$ref$33 = coder.ref; - _objc_msgSend_xtuoz7( - _$$ref$32.pointer, - _sel_encodeWithCoder_, - _$$ref$33.pointer, + /// fractionCompleted + double get fractionCompleted { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSProgress.fractionCompleted', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); + return objc.useMsgSendVariants + ? _objc_msgSend_1ukqyt8Fpret(_$$ref.pointer, _sel_fractionCompleted) + : _objc_msgSend_1ukqyt8(_$$ref.pointer, _sel_fractionCompleted); } /// init - NSString init() { - final _$$ref$41 = object$.ref; + NSProgress init() { + final _$$ref$37 = object$.ref; objc.checkOsVersionInternal( - 'NSString.init', + 'NSProgress.init', iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); final $ret = _objc_msgSend_151sglz( - _$$ref$41.retainAndReturnPointer(), + _$$ref$37.retainAndReturnPointer(), _sel_init, ); - return NSString.fromPointer($ret, retain: false, release: true); + return NSProgress.fromPointer($ret, retain: false, release: true); } - /// initWithBytes:length:encoding: - NSString? initWithBytes( - ffi.Pointer bytes, { - required DartNSUInteger length, - required DartNSUInteger encoding, + /// initWithParent:userInfo: + NSProgress initWithParent( + NSProgress? parentProgressOrNil, { + NSDictionary? userInfo, }) { - final _$$ref$1 = object$.ref; - final $ret = _objc_msgSend_9b3h4v( - _$$ref$1.retainAndReturnPointer(), - _sel_initWithBytes_length_encoding_, - bytes, - length, - encoding, + final _$$ref = object$.ref; + final _$$ref$1 = parentProgressOrNil?.ref; + final _$$ref$2 = userInfo?.ref; + objc.checkOsVersionInternal( + 'NSProgress.initWithParent:userInfo:', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: false, release: true); - } - - /// initWithBytesNoCopy:length:encoding:deallocator: - NSString? initWithBytesNoCopy( - ffi.Pointer bytes, { - required DartNSUInteger length, - required DartNSUInteger encoding, - objc.ObjCBlock, ffi.UnsignedLong)>? - deallocator, - }) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = deallocator?.ref; - final $ret = _objc_msgSend_1lbgrac( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithBytesNoCopy_length_encoding_deallocator_, - bytes, - length, - encoding, - _$$ref$3?.pointer ?? ffi.nullptr, + final $ret = _objc_msgSend_15qeuct( + _$$ref.retainAndReturnPointer(), + _sel_initWithParent_userInfo_, + _$$ref$1?.pointer ?? ffi.nullptr, + _$$ref$2?.pointer ?? ffi.nullptr, ); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: false, release: true); + return NSProgress.fromPointer($ret, retain: false, release: true); } - /// initWithBytesNoCopy:length:encoding:freeWhenDone: - NSString? initWithBytesNoCopy$1( - ffi.Pointer bytes, { - required DartNSUInteger length, - required DartNSUInteger encoding, - required bool freeWhenDone, - }) { - final _$$ref$1 = object$.ref; - final $ret = _objc_msgSend_k4j8m3( - _$$ref$1.retainAndReturnPointer(), - _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_, - bytes, - length, - encoding, - freeWhenDone, + /// isCancellable + bool get isCancellable { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSProgress.isCancellable', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: false, release: true); + return _objc_msgSend_91o635(_$$ref.pointer, _sel_isCancellable); } - /// initWithCString:encoding: - NSString? initWithCString( - ffi.Pointer nullTerminatedCString, { - required DartNSUInteger encoding, - }) { - final _$$ref$1 = object$.ref; - final $ret = _objc_msgSend_erqryg( - _$$ref$1.retainAndReturnPointer(), - _sel_initWithCString_encoding_, - nullTerminatedCString, - encoding, + /// isCancelled + bool get isCancelled { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSProgress.isCancelled', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: false, release: true); + return _objc_msgSend_91o635(_$$ref.pointer, _sel_isCancelled); } - /// initWithCharacters:length: - NSString initWithCharacters( - ffi.Pointer characters, { - required DartNSUInteger length, - }) { - final _$$ref$1 = object$.ref; - final $ret = _objc_msgSend_9x4k8x( - _$$ref$1.retainAndReturnPointer(), - _sel_initWithCharacters_length_, - characters, - length, + /// isFinished + bool get isFinished { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSProgress.isFinished', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - return NSString.fromPointer($ret, retain: false, release: true); + return _objc_msgSend_91o635(_$$ref.pointer, _sel_isFinished); } - /// initWithCharactersNoCopy:length:deallocator: - NSString initWithCharactersNoCopy( - ffi.Pointer chars, { - required DartNSUInteger length, - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) - >? - deallocator, - }) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = deallocator?.ref; - final $ret = _objc_msgSend_talwei( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithCharactersNoCopy_length_deallocator_, - chars, - length, - _$$ref$3?.pointer ?? ffi.nullptr, + /// isIndeterminate + bool get isIndeterminate { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSProgress.isIndeterminate', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - return NSString.fromPointer($ret, retain: false, release: true); + return _objc_msgSend_91o635(_$$ref.pointer, _sel_isIndeterminate); } - /// initWithCharactersNoCopy:length:freeWhenDone: - NSString initWithCharactersNoCopy$1( - ffi.Pointer characters, { - required DartNSUInteger length, - required bool freeWhenDone, - }) { - final _$$ref$1 = object$.ref; - final $ret = _objc_msgSend_lh0jh5( - _$$ref$1.retainAndReturnPointer(), - _sel_initWithCharactersNoCopy_length_freeWhenDone_, - characters, - length, - freeWhenDone, + /// iOS: unavailable + /// macOS: introduced 10.9.0 + bool get isOld { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSProgress.isOld', + iOS: (true, null), + macOS: (false, (10, 9, 0)), ); - return NSString.fromPointer($ret, retain: false, release: true); + return _objc_msgSend_91o635(_$$ref.pointer, _sel_isOld); } - /// initWithCoder: - NSString? initWithCoder(NSCoder coder) { - final _$$ref$48 = object$.ref; - final _$$ref$49 = coder.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref$48.retainAndReturnPointer(), - _sel_initWithCoder_, - _$$ref$49.pointer, + /// isPausable + bool get isPausable { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSProgress.isPausable', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: false, release: true); - } - - /// initWithContentsOfFile:encoding:error: - NSString? initWithContentsOfFile( - NSString path, { - required DartNSUInteger encoding, - }) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = path.ref; - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1nomli1( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithContentsOfFile_encoding_error_, - _$$ref$3.pointer, - encoding, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: false, release: true); - } finally { - pkg_ffi.calloc.free($err); - } - } - - /// initWithContentsOfFile:usedEncoding:error: - NSString? initWithContentsOfFile$1( - NSString path, { - required ffi.Pointer usedEncoding, - }) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = path.ref; - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1alewu7( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithContentsOfFile_usedEncoding_error_, - _$$ref$3.pointer, - usedEncoding, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: false, release: true); - } finally { - pkg_ffi.calloc.free($err); - } - } - - /// initWithContentsOfURL:encoding:error: - NSString? initWithContentsOfURL( - NSURL url, { - required DartNSUInteger encoding, - }) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = url.ref; - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1nomli1( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithContentsOfURL_encoding_error_, - _$$ref$3.pointer, - encoding, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: false, release: true); - } finally { - pkg_ffi.calloc.free($err); - } + return _objc_msgSend_91o635(_$$ref.pointer, _sel_isPausable); } - /// initWithContentsOfURL:usedEncoding:error: - NSString? initWithContentsOfURL$1( - NSURL url, { - required ffi.Pointer usedEncoding, - }) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = url.ref; - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1alewu7( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithContentsOfURL_usedEncoding_error_, - _$$ref$3.pointer, - usedEncoding, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: false, release: true); - } finally { - pkg_ffi.calloc.free($err); - } + /// isPaused + bool get isPaused { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSProgress.isPaused', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), + ); + return _objc_msgSend_91o635(_$$ref.pointer, _sel_isPaused); } - /// initWithData:encoding: - NSString? initWithData(NSData data, {required DartNSUInteger encoding}) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = data.ref; - final $ret = _objc_msgSend_1k4kd9s( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithData_encoding_, - _$$ref$3.pointer, - encoding, + /// kind + NSString? get kind { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSProgress.kind', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_kind); return $ret.address == 0 ? null - : NSString.fromPointer($ret, retain: false, release: true); + : NSString.fromPointer($ret, retain: true, release: true); } - /// initWithFormat: - NSString initWithFormat(NSString format) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = format.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithFormat_, - _$$ref$3.pointer, + /// localizedAdditionalDescription + NSString get localizedAdditionalDescription { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSProgress.localizedAdditionalDescription', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - return NSString.fromPointer($ret, retain: false, release: true); + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_localizedAdditionalDescription, + ); + return NSString.fromPointer($ret, retain: true, release: true); } - /// initWithFormat:locale: - NSString initWithFormat$1(NSString format, {objc.ObjCObject? locale}) { - final _$$ref$3 = object$.ref; - final _$$ref$4 = format.ref; - final _$$ref$5 = locale?.ref; - final $ret = _objc_msgSend_15qeuct( - _$$ref$3.retainAndReturnPointer(), - _sel_initWithFormat_locale_, - _$$ref$4.pointer, - _$$ref$5?.pointer ?? ffi.nullptr, + /// localizedDescription + NSString get localizedDescription { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSProgress.localizedDescription', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - return NSString.fromPointer($ret, retain: false, release: true); + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_localizedDescription, + ); + return NSString.fromPointer($ret, retain: true, release: true); } - /// initWithString: - NSString initWithString(NSString aString) { - final _$$ref$2 = object$.ref; - final _$$ref$3 = aString.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref$2.retainAndReturnPointer(), - _sel_initWithString_, - _$$ref$3.pointer, + /// pause + void pause() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSProgress.pause', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - return NSString.fromPointer($ret, retain: false, release: true); + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_pause); } - /// initWithUTF8String: - NSString? initWithUTF8String(ffi.Pointer nullTerminatedCString) { - final _$$ref$1 = object$.ref; - final $ret = _objc_msgSend_56zxyn( - _$$ref$1.retainAndReturnPointer(), - _sel_initWithUTF8String_, - nullTerminatedCString, + /// pausingHandler + objc.ObjCBlock? get pausingHandler { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSProgress.pausingHandler', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); + final $ret = _objc_msgSend_uwvaik(_$$ref.pointer, _sel_pausingHandler); return $ret.address == 0 ? null - : NSString.fromPointer($ret, retain: false, release: true); + : ObjCBlock_ffiVoid.fromPointer($ret, retain: true, release: true); } - /// initWithValidatedFormat:validFormatSpecifiers:error: - NSString? initWithValidatedFormat( - NSString format, { - required NSString validFormatSpecifiers, + /// performAsCurrentWithPendingUnitCount:usingBlock: + void performAsCurrentWithPendingUnitCount( + int unitCount, { + required objc.ObjCBlock usingBlock, }) { - final _$$ref$3 = object$.ref; - final _$$ref$4 = format.ref; - final _$$ref$5 = validFormatSpecifiers.ref; + final _$$ref = object$.ref; + final _$$ref$1 = usingBlock.ref; + objc.checkOsVersionInternal( + 'NSProgress.performAsCurrentWithPendingUnitCount:usingBlock:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + _objc_msgSend_1i0cxyc( + _$$ref.pointer, + _sel_performAsCurrentWithPendingUnitCount_usingBlock_, + unitCount, + _$$ref$1.pointer, + ); + } + + /// publish + /// + /// iOS: unavailable + /// macOS: introduced 10.9.0 + void publish() { + final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSString.initWithValidatedFormat:validFormatSpecifiers:error:', - iOS: (false, (16, 0, 0)), - macOS: (false, (13, 0, 0)), + 'NSProgress.publish', + iOS: (true, null), + macOS: (false, (10, 9, 0)), ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1pnyuds( - _$$ref$3.retainAndReturnPointer(), - _sel_initWithValidatedFormat_validFormatSpecifiers_error_, - _$$ref$4.pointer, - _$$ref$5.pointer, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: false, release: true); - } finally { - pkg_ffi.calloc.free($err); - } + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_publish); } - /// initWithValidatedFormat:validFormatSpecifiers:locale:error: - NSString? initWithValidatedFormat$1( - NSString format, { - required NSString validFormatSpecifiers, - objc.ObjCObject? locale, - }) { - final _$$ref$4 = object$.ref; - final _$$ref$5 = format.ref; - final _$$ref$6 = validFormatSpecifiers.ref; - final _$$ref$7 = locale?.ref; + /// resignCurrent + void resignCurrent() { + final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSString.initWithValidatedFormat:validFormatSpecifiers:locale:error:', - iOS: (false, (16, 0, 0)), - macOS: (false, (13, 0, 0)), + 'NSProgress.resignCurrent', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1k0ezzm( - _$$ref$4.retainAndReturnPointer(), - _sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_, - _$$ref$5.pointer, - _$$ref$6.pointer, - _$$ref$7?.pointer ?? ffi.nullptr, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: false, release: true); - } finally { - pkg_ffi.calloc.free($err); - } + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_resignCurrent); } - /// length - DartNSUInteger get length { + /// resume + void resume() { final _$$ref = object$.ref; - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_length); + objc.checkOsVersionInternal( + 'NSProgress.resume', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), + ); + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_resume); } -} -sealed class NSStringCompareOptions { - static const NSCaseInsensitiveSearch = 1; - static const NSLiteralSearch = 2; - static const NSBackwardsSearch = 4; - static const NSAnchoredSearch = 8; - static const NSNumericSearch = 64; - static const NSDiacriticInsensitiveSearch = 128; - static const NSWidthInsensitiveSearch = 256; - static const NSForcedOrderingSearch = 512; - static const NSRegularExpressionSearch = 1024; -} + /// resumingHandler + objc.ObjCBlock? get resumingHandler { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSProgress.resumingHandler', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), + ); + final $ret = _objc_msgSend_uwvaik(_$$ref.pointer, _sel_resumingHandler); + return $ret.address == 0 + ? null + : ObjCBlock_ffiVoid.fromPointer($ret, retain: true, release: true); + } -/// NSStringDeprecated -extension NSStringDeprecated on NSString { - /// cString - @Deprecated('Use -cStringUsingEncoding: instead') - ffi.Pointer cString() { + /// setCancellable: + set isCancellable(bool value) { final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSString.cString', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSProgress.setCancellable:', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - return _objc_msgSend_1fuqfwb(_$$ref.pointer, _sel_cString); + _objc_msgSend_1s56lr9(_$$ref.pointer, _sel_setCancellable_, value); } - /// cStringLength - @Deprecated('Use -lengthOfBytesUsingEncoding: instead') - DartNSUInteger cStringLength() { + /// setCancellationHandler: + set cancellationHandler(objc.ObjCBlock? value) { final _$$ref = object$.ref; + final _$$ref$1 = value?.ref; objc.checkOsVersionInternal( - 'NSString.cStringLength', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSProgress.setCancellationHandler:', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), + ); + _objc_msgSend_f167m6( + _$$ref.pointer, + _sel_setCancellationHandler_, + _$$ref$1?.pointer ?? ffi.nullptr, ); - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_cStringLength); } - /// getCString: - @Deprecated('Use -getCString:maxLength:encoding: instead') - void getCString(ffi.Pointer bytes) { + /// setCompletedUnitCount: + set completedUnitCount(int value) { final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSString.getCString:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSProgress.setCompletedUnitCount:', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - _objc_msgSend_1r7ue5f(_$$ref.pointer, _sel_getCString_, bytes); + _objc_msgSend_17gvxvj(_$$ref.pointer, _sel_setCompletedUnitCount_, value); } - /// getCString:maxLength: - @Deprecated('Use -getCString:maxLength:encoding: instead') - void getCString$1( - ffi.Pointer bytes, { - required DartNSUInteger maxLength, - }) { + /// setEstimatedTimeRemaining: + set estimatedTimeRemaining(NSNumber? value) { final _$$ref = object$.ref; + final _$$ref$1 = value?.ref; objc.checkOsVersionInternal( - 'NSString.getCString:maxLength:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSProgress.setEstimatedTimeRemaining:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), ); - _objc_msgSend_1h3mito( + _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_getCString_maxLength_, - bytes, - maxLength, + _sel_setEstimatedTimeRemaining_, + _$$ref$1?.pointer ?? ffi.nullptr, ); } - /// getCString:maxLength:range:remainingRange: - @Deprecated('Use -getCString:maxLength:encoding: instead') - void getCString$2( - ffi.Pointer bytes, { - required DartNSUInteger maxLength, - required NSRange range, - required ffi.Pointer remainingRange, - }) { + /// setFileCompletedCount: + set fileCompletedCount(NSNumber? value) { final _$$ref = object$.ref; + final _$$ref$1 = value?.ref; objc.checkOsVersionInternal( - 'NSString.getCString:maxLength:range:remainingRange:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSProgress.setFileCompletedCount:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), ); - _objc_msgSend_3gpdva( + _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_getCString_maxLength_range_remainingRange_, - bytes, - maxLength, - range, - remainingRange, + _sel_setFileCompletedCount_, + _$$ref$1?.pointer ?? ffi.nullptr, ); } - /// getCharacters: - void getCharacters(ffi.Pointer buffer) { + /// setFileOperationKind: + set fileOperationKind(NSString? value) { final _$$ref = object$.ref; - _objc_msgSend_g3kdhc(_$$ref.pointer, _sel_getCharacters_, buffer); + final _$$ref$1 = value?.ref; + objc.checkOsVersionInternal( + 'NSProgress.setFileOperationKind:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_setFileOperationKind_, + _$$ref$1?.pointer ?? ffi.nullptr, + ); } - /// initWithCString: - @Deprecated('Use -initWithCString:encoding: instead') - objc.ObjCObject? initWithCString$1(ffi.Pointer bytes) { + /// setFileTotalCount: + set fileTotalCount(NSNumber? value) { final _$$ref = object$.ref; + final _$$ref$1 = value?.ref; objc.checkOsVersionInternal( - 'NSString.initWithCString:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSProgress.setFileTotalCount:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), ); - final $ret = _objc_msgSend_56zxyn( - _$$ref.retainAndReturnPointer(), - _sel_initWithCString_, - bytes, + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_setFileTotalCount_, + _$$ref$1?.pointer ?? ffi.nullptr, ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: false, release: true); } - /// initWithCString:length: - @Deprecated('Use -initWithCString:encoding: instead') - objc.ObjCObject? initWithCString$2( - ffi.Pointer bytes, { - required DartNSUInteger length, - }) { + /// setFileURL: + set fileURL(NSURL? value) { final _$$ref = object$.ref; + final _$$ref$1 = value?.ref; objc.checkOsVersionInternal( - 'NSString.initWithCString:length:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSProgress.setFileURL:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), ); - final $ret = _objc_msgSend_erqryg( - _$$ref.retainAndReturnPointer(), - _sel_initWithCString_length_, - bytes, - length, + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_setFileURL_, + _$$ref$1?.pointer ?? ffi.nullptr, ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: false, release: true); } - /// initWithCStringNoCopy:length:freeWhenDone: - @Deprecated('Use -initWithCString:encoding: instead') - objc.ObjCObject? initWithCStringNoCopy( - ffi.Pointer bytes, { - required DartNSUInteger length, - required bool freeWhenDone, - }) { + /// setKind: + set kind(NSString? value) { final _$$ref = object$.ref; + final _$$ref$1 = value?.ref; objc.checkOsVersionInternal( - 'NSString.initWithCStringNoCopy:length:freeWhenDone:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSProgress.setKind:', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - final $ret = _objc_msgSend_1ojrli4( - _$$ref.retainAndReturnPointer(), - _sel_initWithCStringNoCopy_length_freeWhenDone_, - bytes, - length, - freeWhenDone, + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_setKind_, + _$$ref$1?.pointer ?? ffi.nullptr, ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: false, release: true); } - /// initWithContentsOfFile: - @Deprecated('Use -initWithContentsOfFile:encoding:error: instead') - objc.ObjCObject? initWithContentsOfFile$2(NSString path) { + /// setLocalizedAdditionalDescription: + set localizedAdditionalDescription(NSString value) { final _$$ref = object$.ref; - final _$$ref$1 = path.ref; + final _$$ref$1 = value.ref; objc.checkOsVersionInternal( - 'NSString.initWithContentsOfFile:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSProgress.setLocalizedAdditionalDescription:', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.retainAndReturnPointer(), - _sel_initWithContentsOfFile_, + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_setLocalizedAdditionalDescription_, _$$ref$1.pointer, ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: false, release: true); } - /// initWithContentsOfURL: - @Deprecated('Use -initWithContentsOfURL:encoding:error: instead') - objc.ObjCObject? initWithContentsOfURL$2(NSURL url) { + /// setLocalizedDescription: + set localizedDescription(NSString value) { final _$$ref = object$.ref; - final _$$ref$1 = url.ref; + final _$$ref$1 = value.ref; objc.checkOsVersionInternal( - 'NSString.initWithContentsOfURL:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSProgress.setLocalizedDescription:', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.retainAndReturnPointer(), - _sel_initWithContentsOfURL_, + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_setLocalizedDescription_, _$$ref$1.pointer, ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: false, release: true); } - /// lossyCString - @Deprecated('Use -cStringUsingEncoding: instead') - ffi.Pointer lossyCString() { + /// setPausable: + set isPausable(bool value) { final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSString.lossyCString', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSProgress.setPausable:', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - return _objc_msgSend_1fuqfwb(_$$ref.pointer, _sel_lossyCString); + _objc_msgSend_1s56lr9(_$$ref.pointer, _sel_setPausable_, value); } - /// writeToFile:atomically: - @Deprecated('Use -writeToFile:atomically:encoding:error: instead') - bool writeToFile(NSString path, {required bool atomically}) { + /// setPausingHandler: + set pausingHandler(objc.ObjCBlock? value) { final _$$ref = object$.ref; - final _$$ref$1 = path.ref; + final _$$ref$1 = value?.ref; objc.checkOsVersionInternal( - 'NSString.writeToFile:atomically:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSProgress.setPausingHandler:', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - return _objc_msgSend_1iyq28l( + _objc_msgSend_f167m6( _$$ref.pointer, - _sel_writeToFile_atomically_, - _$$ref$1.pointer, - atomically, + _sel_setPausingHandler_, + _$$ref$1?.pointer ?? ffi.nullptr, ); } - /// writeToURL:atomically: - @Deprecated('Use -writeToURL:atomically:encoding:error: instead') - bool writeToURL(NSURL url, {required bool atomically}) { + /// setResumingHandler: + set resumingHandler(objc.ObjCBlock? value) { final _$$ref = object$.ref; - final _$$ref$1 = url.ref; + final _$$ref$1 = value?.ref; objc.checkOsVersionInternal( - 'NSString.writeToURL:atomically:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSProgress.setResumingHandler:', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), ); - return _objc_msgSend_1iyq28l( + _objc_msgSend_f167m6( _$$ref.pointer, - _sel_writeToURL_atomically_, - _$$ref$1.pointer, - atomically, + _sel_setResumingHandler_, + _$$ref$1?.pointer ?? ffi.nullptr, ); } - /// stringWithCString: - @Deprecated('Use +stringWithCString:encoding: instead') - static objc.ObjCObject? stringWithCString$1(ffi.Pointer bytes) { + /// setThroughput: + set throughput(NSNumber? value) { + final _$$ref = object$.ref; + final _$$ref$1 = value?.ref; objc.checkOsVersionInternal( - 'NSString.stringWithCString:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSProgress.setThroughput:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), ); - final $ret = _objc_msgSend_56zxyn( - _class_NSString, - _sel_stringWithCString_, - bytes, + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_setThroughput_, + _$$ref$1?.pointer ?? ffi.nullptr, ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); } - /// stringWithCString:length: - @Deprecated('Use +stringWithCString:encoding:') - static objc.ObjCObject? stringWithCString$2( - ffi.Pointer bytes, { - required DartNSUInteger length, - }) { + /// setTotalUnitCount: + set totalUnitCount(int value) { + final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSString.stringWithCString:length:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_erqryg( - _class_NSString, - _sel_stringWithCString_length_, - bytes, - length, + 'NSProgress.setTotalUnitCount:', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); + _objc_msgSend_17gvxvj(_$$ref.pointer, _sel_setTotalUnitCount_, value); } - /// stringWithContentsOfFile: - @Deprecated('Use +stringWithContentsOfFile:encoding:error: instead') - static objc.ObjCObject? stringWithContentsOfFile$2(NSString path) { - final _$$ref = path.ref; + /// setUserInfoObject:forKey: + void setUserInfoObject( + objc.ObjCObject? objectOrNil, { + required NSString forKey, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = objectOrNil?.ref; + final _$$ref$2 = forKey.ref; objc.checkOsVersionInternal( - 'NSString.stringWithContentsOfFile:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSProgress.setUserInfoObject:forKey:', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - final $ret = _objc_msgSend_1sotr3r( - _class_NSString, - _sel_stringWithContentsOfFile_, + _objc_msgSend_pfv6jd( _$$ref.pointer, + _sel_setUserInfoObject_forKey_, + _$$ref$1?.pointer ?? ffi.nullptr, + _$$ref$2.pointer, ); + } + + /// throughput + NSNumber? get throughput { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSProgress.throughput', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_throughput); return $ret.address == 0 ? null - : objc.ObjCObject($ret, retain: true, release: true); + : NSNumber.fromPointer($ret, retain: true, release: true); } - /// stringWithContentsOfURL: - @Deprecated('Use +stringWithContentsOfURL:encoding:error: instead') - static objc.ObjCObject? stringWithContentsOfURL$2(NSURL url) { - final _$$ref = url.ref; + /// totalUnitCount + int get totalUnitCount { + final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSString.stringWithContentsOfURL:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSProgress.totalUnitCount', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - final $ret = _objc_msgSend_1sotr3r( - _class_NSString, - _sel_stringWithContentsOfURL_, - _$$ref.pointer, + return _objc_msgSend_pysgoz(_$$ref.pointer, _sel_totalUnitCount); + } + + /// unpublish + /// + /// iOS: unavailable + /// macOS: introduced 10.9.0 + void unpublish() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSProgress.unpublish', + iOS: (true, null), + macOS: (false, (10, 9, 0)), ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_unpublish); + } + + /// userInfo + NSDictionary get userInfo { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSProgress.userInfo', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_userInfo); + return NSDictionary.fromPointer($ret, retain: true, release: true); + } +} + +enum NSPropertyListFormat { + NSPropertyListOpenStepFormat(1), + NSPropertyListXMLFormat_v1_0(100), + NSPropertyListBinaryFormat_v1_0(200); + + final int value; + const NSPropertyListFormat(this.value); + + static NSPropertyListFormat fromValue(int value) => switch (value) { + 1 => NSPropertyListOpenStepFormat, + 100 => NSPropertyListXMLFormat_v1_0, + 200 => NSPropertyListBinaryFormat_v1_0, + _ => throw ArgumentError('Unknown value for NSPropertyListFormat: $value'), + }; +} + +enum NSQualityOfService { + NSQualityOfServiceUserInteractive(33), + NSQualityOfServiceUserInitiated(25), + NSQualityOfServiceUtility(17), + NSQualityOfServiceBackground(9), + NSQualityOfServiceDefault(-1); + + final int value; + const NSQualityOfService(this.value); + + static NSQualityOfService fromValue(int value) => switch (value) { + 33 => NSQualityOfServiceUserInteractive, + 25 => NSQualityOfServiceUserInitiated, + 17 => NSQualityOfServiceUtility, + 9 => NSQualityOfServiceBackground, + -1 => NSQualityOfServiceDefault, + _ => throw ArgumentError('Unknown value for NSQualityOfService: $value'), + }; +} + +final class NSRange extends ffi.Struct { + @NSUInteger() + external int location; + + @NSUInteger() + external int length; + + static ffi.Pointer $allocate( + ffi.Allocator $allocator, { + required int location, + required int length, + }) => $allocator() + ..ref.location = location + ..ref.length = length; +} + +/// NSRunLoop +extension type NSRunLoop._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject { + /// Constructs a [NSRunLoop] that points to the same underlying object as [other]. + NSRunLoop.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NSRunLoop] that wraps the given raw object pointer. + NSRunLoop.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + assert(isA(object$)); + } + + /// Returns whether [obj] is an instance of [NSRunLoop]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSRunLoop, + ); + + /// alloc + static NSRunLoop alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSRunLoop, _sel_alloc); + return NSRunLoop.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NSRunLoop allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSRunLoop, + _sel_allocWithZone_, + zone, + ); + return NSRunLoop.fromPointer($ret, retain: false, release: true); } -} -sealed class NSStringEncodingConversionOptions { - static const NSStringEncodingConversionAllowLossy = 1; - static const NSStringEncodingConversionExternalRepresentation = 2; -} + /// currentRunLoop + static NSRunLoop getCurrentRunLoop() { + final $ret = _objc_msgSend_151sglz(_class_NSRunLoop, _sel_currentRunLoop); + return NSRunLoop.fromPointer($ret, retain: true, release: true); + } -/// NSStringEncodingDetection -extension NSStringEncodingDetection on NSString { - /// stringEncodingForData:encodingOptions:convertedString:usedLossyConversion: - static DartNSUInteger stringEncodingForData( - NSData data, { - NSDictionary? encodingOptions, - required ffi.Pointer> convertedString, - required ffi.Pointer usedLossyConversion, - }) { - final _$$ref = data.ref; - final _$$ref$1 = encodingOptions?.ref; + /// mainRunLoop + static NSRunLoop getMainRunLoop() { objc.checkOsVersionInternal( - 'NSString.stringEncodingForData:encodingOptions:convertedString:usedLossyConversion:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), - ); - return _objc_msgSend_1q2ox4r( - _class_NSString, - _sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_, - _$$ref.pointer, - _$$ref$1?.pointer ?? ffi.nullptr, - convertedString, - usedLossyConversion, + 'NSRunLoop.mainRunLoop', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), ); + final $ret = _objc_msgSend_151sglz(_class_NSRunLoop, _sel_mainRunLoop); + return NSRunLoop.fromPointer($ret, retain: true, release: true); } -} - -sealed class NSStringEnumerationOptions { - static const NSStringEnumerationByLines = 0; - static const NSStringEnumerationByParagraphs = 1; - static const NSStringEnumerationByComposedCharacterSequences = 2; - static const NSStringEnumerationByWords = 3; - static const NSStringEnumerationBySentences = 4; - static const NSStringEnumerationByCaretPositions = 5; - static const NSStringEnumerationByDeletionClusters = 6; - static const NSStringEnumerationReverse = 256; - static const NSStringEnumerationSubstringNotRequired = 512; - static const NSStringEnumerationLocalized = 1024; -} -/// NSStringExtensionMethods -extension NSStringExtensionMethods on NSString { - /// UTF8String - ffi.Pointer get UTF8String { - final _$$ref = object$.ref; - return _objc_msgSend_1fuqfwb(_$$ref.pointer, _sel_UTF8String); + /// new + static NSRunLoop new$() { + final $ret = _objc_msgSend_151sglz(_class_NSRunLoop, _sel_new); + return NSRunLoop.fromPointer($ret, retain: false, release: true); } - /// boolValue - bool get boolValue { + /// Returns a new instance of NSRunLoop constructed with the default `new` method. + NSRunLoop() : this.as(new$().object$); +} + +extension NSRunLoop$Methods on NSRunLoop { + /// acceptInputForMode:beforeDate: + void acceptInputForMode(NSString mode, {required NSDate beforeDate}) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSString.boolValue', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), + final _$$ref$1 = mode.ref; + final _$$ref$2 = beforeDate.ref; + _objc_msgSend_pfv6jd( + _$$ref.pointer, + _sel_acceptInputForMode_beforeDate_, + _$$ref$1.pointer, + _$$ref$2.pointer, ); - return _objc_msgSend_91o635(_$$ref.pointer, _sel_boolValue); } - /// cStringUsingEncoding: - ffi.Pointer cStringUsingEncoding(DartNSUInteger encoding) { + /// addPort:forMode: + void addPort(NSPort aPort, {required NSString forMode}) { final _$$ref = object$.ref; - return _objc_msgSend_1jtxufi( + final _$$ref$1 = aPort.ref; + final _$$ref$2 = forMode.ref; + _objc_msgSend_pfv6jd( _$$ref.pointer, - _sel_cStringUsingEncoding_, - encoding, + _sel_addPort_forMode_, + _$$ref$1.pointer, + _$$ref$2.pointer, ); } - /// canBeConvertedToEncoding: - bool canBeConvertedToEncoding(DartNSUInteger encoding) { + /// addTimer:forMode: + void addTimer(NSTimer timer, {required NSString forMode}) { final _$$ref = object$.ref; - return _objc_msgSend_6peh6o( + final _$$ref$1 = timer.ref; + final _$$ref$2 = forMode.ref; + _objc_msgSend_pfv6jd( _$$ref.pointer, - _sel_canBeConvertedToEncoding_, - encoding, + _sel_addTimer_forMode_, + _$$ref$1.pointer, + _$$ref$2.pointer, ); } - /// capitalizedString - NSString get capitalizedString { + /// currentMode + NSString? get currentMode { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_capitalizedString); - return NSString.fromPointer($ret, retain: true, release: true); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_currentMode); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); } - /// capitalizedStringWithLocale: - NSString capitalizedStringWithLocale(NSLocale? locale) { + /// getCFRunLoop + ffi.Pointer getCFRunLoop() { final _$$ref = object$.ref; - final _$$ref$1 = locale?.ref; + return _objc_msgSend_1bbja28(_$$ref.pointer, _sel_getCFRunLoop); + } + + /// init + NSRunLoop init() { + final _$$ref$38 = object$.ref; objc.checkOsVersionInternal( - 'NSString.capitalizedStringWithLocale:', - iOS: (false, (6, 0, 0)), - macOS: (false, (10, 8, 0)), + 'NSRunLoop.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_capitalizedStringWithLocale_, - _$$ref$1?.pointer ?? ffi.nullptr, + final $ret = _objc_msgSend_151sglz( + _$$ref$38.retainAndReturnPointer(), + _sel_init, ); - return NSString.fromPointer($ret, retain: true, release: true); + return NSRunLoop.fromPointer($ret, retain: false, release: true); } - /// caseInsensitiveCompare: - NSComparisonResult caseInsensitiveCompare(NSString string) { + /// limitDateForMode: + NSDate? limitDateForMode(NSString mode) { final _$$ref = object$.ref; - final _$$ref$1 = string.ref; - final $ret = _objc_msgSend_1ym6zyw( + final _$$ref$1 = mode.ref; + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_caseInsensitiveCompare_, + _sel_limitDateForMode_, _$$ref$1.pointer, ); - return NSComparisonResult.fromValue($ret); + return $ret.address == 0 + ? null + : NSDate.fromPointer($ret, retain: true, release: true); } - /// commonPrefixWithString:options: - NSString commonPrefixWithString( - NSString str, { - required DartNSUInteger options, - }) { + /// removePort:forMode: + void removePort(NSPort aPort, {required NSString forMode}) { final _$$ref = object$.ref; - final _$$ref$1 = str.ref; - final $ret = _objc_msgSend_diypgk( + final _$$ref$1 = aPort.ref; + final _$$ref$2 = forMode.ref; + _objc_msgSend_pfv6jd( _$$ref.pointer, - _sel_commonPrefixWithString_options_, + _sel_removePort_forMode_, _$$ref$1.pointer, - options, + _$$ref$2.pointer, ); - return NSString.fromPointer($ret, retain: true, release: true); } +} - /// compare: - NSComparisonResult compare(NSString string) { - final _$$ref = object$.ref; - final _$$ref$1 = string.ref; - final $ret = _objc_msgSend_1ym6zyw( - _$$ref.pointer, - _sel_compare_, - _$$ref$1.pointer, +/// NSSecureCoding +extension type NSSecureCoding._(objc.ObjCProtocol object$) + implements objc.ObjCProtocol, NSCoding { + /// Constructs a [NSSecureCoding] that points to the same underlying object as [other]. + NSSecureCoding.as(objc.ObjCObject other) : object$ = other; + + /// Constructs a [NSSecureCoding] that wraps the given raw object pointer. + NSSecureCoding.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSSecureCoding]. + static bool conformsTo(objc.ObjCObject obj) { + return _objc_msgSend_e3qsqz( + obj.ref.pointer, + _sel_conformsToProtocol_, + _protocol_NSSecureCoding, ); - return NSComparisonResult.fromValue($ret); } +} - /// compare:options: - NSComparisonResult compare$1( - NSString string, { - required DartNSUInteger options, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = string.ref; - final $ret = _objc_msgSend_pg1fnv( - _$$ref.pointer, - _sel_compare_options_, - _$$ref$1.pointer, - options, +extension NSSecureCoding$Methods on NSSecureCoding { + /// encodeWithCoder: + void encodeWithCoder(NSCoder coder) { + final _$$ref$28 = object$.ref; + final _$$ref$29 = coder.ref; + _objc_msgSend_xtuoz7( + _$$ref$28.pointer, + _sel_encodeWithCoder_, + _$$ref$29.pointer, ); - return NSComparisonResult.fromValue($ret); } - /// compare:options:range: - NSComparisonResult compare$2( - NSString string, { - required DartNSUInteger options, - required NSRange range, + /// initWithCoder: + NSSecureCoding? initWithCoder(NSCoder coder) { + final _$$ref$44 = object$.ref; + final _$$ref$45 = coder.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref$44.retainAndReturnPointer(), + _sel_initWithCoder_, + _$$ref$45.pointer, + ); + return $ret.address == 0 + ? null + : NSSecureCoding.fromPointer($ret, retain: false, release: true); + } +} + +interface class NSSecureCoding$Builder { + /// Returns the [objc.Protocol] object for this protocol. + static objc.Protocol get $protocol => + objc.Protocol.fromPointer(_protocol_NSSecureCoding.cast()); + + /// Builds an object that implements the NSSecureCoding protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + /// + /// If `$keepIsolateAlive` is true, this protocol will keep this isolate + /// alive until it is garbage collected by both Dart and ObjC. + static NSSecureCoding implement({ + required void Function(NSCoder) encodeWithCoder_, + required Dartinstancetype? Function(NSCoder) initWithCoder_, + bool $keepIsolateAlive = true, }) { - final _$$ref = object$.ref; - final _$$ref$1 = string.ref; - final $ret = _objc_msgSend_xrqic1( - _$$ref.pointer, - _sel_compare_options_range_, - _$$ref$1.pointer, - options, - range, + final builder = objc.ObjCProtocolBuilder(debugName: 'NSSecureCoding'); + NSSecureCoding$Builder.encodeWithCoder_.implement( + builder, + encodeWithCoder_, + ); + NSSecureCoding$Builder.initWithCoder_.implement(builder, initWithCoder_); + builder.addProtocol($protocol); + return NSSecureCoding.as( + builder.build(keepIsolateAlive: $keepIsolateAlive), ); - return NSComparisonResult.fromValue($ret); } - /// compare:options:range:locale: - NSComparisonResult compare$3( - NSString string, { - required DartNSUInteger options, - required NSRange range, - objc.ObjCObject? locale, + /// Adds the implementation of the NSSecureCoding protocol to an existing + /// [objc.ObjCProtocolBuilder]. + /// + /// Note: You cannot call this method after you have called `builder.build`. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, { + required void Function(NSCoder) encodeWithCoder_, + required Dartinstancetype? Function(NSCoder) initWithCoder_, + bool $keepIsolateAlive = true, }) { - final _$$ref = object$.ref; - final _$$ref$1 = string.ref; - final _$$ref$2 = locale?.ref; - final $ret = _objc_msgSend_1895u4n( - _$$ref.pointer, - _sel_compare_options_range_locale_, - _$$ref$1.pointer, - options, - range, - _$$ref$2?.pointer ?? ffi.nullptr, + NSSecureCoding$Builder.encodeWithCoder_.implement( + builder, + encodeWithCoder_, ); - return NSComparisonResult.fromValue($ret); + NSSecureCoding$Builder.initWithCoder_.implement(builder, initWithCoder_); + builder.addProtocol($protocol); } - /// componentsSeparatedByCharactersInSet: - NSArray componentsSeparatedByCharactersInSet(NSCharacterSet separator) { - final _$$ref = object$.ref; - final _$$ref$1 = separator.ref; - objc.checkOsVersionInternal( - 'NSString.componentsSeparatedByCharactersInSet:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), + /// Builds an object that implements the NSSecureCoding protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All + /// methods that can be implemented as listeners will be. + /// + /// If `$keepIsolateAlive` is true, this protocol will keep this isolate + /// alive until it is garbage collected by both Dart and ObjC. + static NSSecureCoding implementAsListener({ + required void Function(NSCoder) encodeWithCoder_, + required Dartinstancetype? Function(NSCoder) initWithCoder_, + bool $keepIsolateAlive = true, + }) { + final builder = objc.ObjCProtocolBuilder(debugName: 'NSSecureCoding'); + NSSecureCoding$Builder.encodeWithCoder_.implementAsListener( + builder, + encodeWithCoder_, ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_componentsSeparatedByCharactersInSet_, - _$$ref$1.pointer, + NSSecureCoding$Builder.initWithCoder_.implement(builder, initWithCoder_); + builder.addProtocol($protocol); + return NSSecureCoding.as( + builder.build(keepIsolateAlive: $keepIsolateAlive), ); - return NSArray.fromPointer($ret, retain: true, release: true); } - /// componentsSeparatedByString: - NSArray componentsSeparatedByString(NSString separator) { - final _$$ref = object$.ref; - final _$$ref$1 = separator.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_componentsSeparatedByString_, - _$$ref$1.pointer, + /// Adds the implementation of the NSSecureCoding protocol to an existing + /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will + /// be. + /// + /// Note: You cannot call this method after you have called `builder.build`. + static void addToBuilderAsListener( + objc.ObjCProtocolBuilder builder, { + required void Function(NSCoder) encodeWithCoder_, + required Dartinstancetype? Function(NSCoder) initWithCoder_, + bool $keepIsolateAlive = true, + }) { + NSSecureCoding$Builder.encodeWithCoder_.implementAsListener( + builder, + encodeWithCoder_, ); - return NSArray.fromPointer($ret, retain: true, release: true); + NSSecureCoding$Builder.initWithCoder_.implement(builder, initWithCoder_); + builder.addProtocol($protocol); } - /// containsString: - bool containsString(NSString str) { - final _$$ref = object$.ref; - final _$$ref$1 = str.ref; - objc.checkOsVersionInternal( - 'NSString.containsString:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), + /// Builds an object that implements the NSSecureCoding protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All + /// methods that can be implemented as blocking listeners will be. + /// + /// If `$keepIsolateAlive` is true, this protocol will keep this isolate + /// alive until it is garbage collected by both Dart and ObjC. + static NSSecureCoding implementAsBlocking({ + required void Function(NSCoder) encodeWithCoder_, + required Dartinstancetype? Function(NSCoder) initWithCoder_, + bool $keepIsolateAlive = true, + }) { + final builder = objc.ObjCProtocolBuilder(debugName: 'NSSecureCoding'); + NSSecureCoding$Builder.encodeWithCoder_.implementAsBlocking( + builder, + encodeWithCoder_, ); - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_containsString_, - _$$ref$1.pointer, + NSSecureCoding$Builder.initWithCoder_.implement(builder, initWithCoder_); + builder.addProtocol($protocol); + return NSSecureCoding.as( + builder.build(keepIsolateAlive: $keepIsolateAlive), ); } - /// dataUsingEncoding: - NSData? dataUsingEncoding(DartNSUInteger encoding) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_14hpxwa( - _$$ref.pointer, - _sel_dataUsingEncoding_, - encoding, + /// Adds the implementation of the NSSecureCoding protocol to an existing + /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as blocking + /// listeners will be. + /// + /// Note: You cannot call this method after you have called `builder.build`. + static void addToBuilderAsBlocking( + objc.ObjCProtocolBuilder builder, { + required void Function(NSCoder) encodeWithCoder_, + required Dartinstancetype? Function(NSCoder) initWithCoder_, + bool $keepIsolateAlive = true, + }) { + NSSecureCoding$Builder.encodeWithCoder_.implementAsBlocking( + builder, + encodeWithCoder_, ); - return $ret.address == 0 - ? null - : NSData.fromPointer($ret, retain: true, release: true); + NSSecureCoding$Builder.initWithCoder_.implement(builder, initWithCoder_); + builder.addProtocol($protocol); } - /// dataUsingEncoding:allowLossyConversion: - NSData? dataUsingEncoding$1( - DartNSUInteger encoding, { - required bool allowLossyConversion, - }) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_hiwitm( - _$$ref.pointer, - _sel_dataUsingEncoding_allowLossyConversion_, - encoding, - allowLossyConversion, - ); - return $ret.address == 0 - ? null - : NSData.fromPointer($ret, retain: true, release: true); + /// encodeWithCoder: + static final encodeWithCoder_ = + objc.ObjCProtocolListenableMethod( + _protocol_NSSecureCoding, + _sel_encodeWithCoder_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_18v1jvf) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSSecureCoding, + _sel_encodeWithCoder_, + isRequired: true, + isInstanceMethod: true, + ), + (void Function(NSCoder) func) => + ObjCBlock_ffiVoid_ffiVoid_NSCoder.fromFunction( + (ffi.Pointer _, NSCoder arg1) => func(arg1), + ), + (void Function(NSCoder) func) => + ObjCBlock_ffiVoid_ffiVoid_NSCoder.listener( + (ffi.Pointer _, NSCoder arg1) => func(arg1), + ), + (void Function(NSCoder) func) => + ObjCBlock_ffiVoid_ffiVoid_NSCoder.blocking( + (ffi.Pointer _, NSCoder arg1) => func(arg1), + ), + ); + + /// initWithCoder: + static final initWithCoder_ = + objc.ObjCProtocolMethod( + _protocol_NSSecureCoding, + _sel_initWithCoder_, + ffi.Native.addressOf< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_1wx624s_protocolTrampoline_xr62hr) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSSecureCoding, + _sel_initWithCoder_, + isRequired: true, + isInstanceMethod: true, + ), + (Dartinstancetype? Function(NSCoder) func) => + ObjCBlock_instancetype_ffiVoid_NSCoder_retained.fromFunction( + (ffi.Pointer _, NSCoder arg1) => func(arg1), + ), + ); +} + +/// NSSet +extension type NSSet._(objc.ObjCObject object$) + implements + objc.ObjCObject, + NSObject, + NSCopying, + NSMutableCopying, + NSSecureCoding, + NSFastEnumeration { + /// Creates a [NSSet] from [elements]. + static NSSet of(Iterable elements) => + NSMutableSet.of(elements); + + /// Constructs a [NSSet] that points to the same underlying object as [other]. + NSSet.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NSSet] that wraps the given raw object pointer. + NSSet.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + assert(isA(object$)); } - /// decomposedStringWithCanonicalMapping - NSString get decomposedStringWithCanonicalMapping { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_decomposedStringWithCanonicalMapping, - ); - return NSString.fromPointer($ret, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSSet]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSSet, + ); + + /// alloc + static NSSet alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSSet, _sel_alloc); + return NSSet.fromPointer($ret, retain: false, release: true); } - /// decomposedStringWithCompatibilityMapping - NSString get decomposedStringWithCompatibilityMapping { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_decomposedStringWithCompatibilityMapping, - ); - return NSString.fromPointer($ret, retain: true, release: true); + /// allocWithZone: + static NSSet allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428(_class_NSSet, _sel_allocWithZone_, zone); + return NSSet.fromPointer($ret, retain: false, release: true); } - /// description - NSString get description$1 { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_description); - return NSString.fromPointer($ret, retain: true, release: true); + /// new + static NSSet new$() { + final $ret = _objc_msgSend_151sglz(_class_NSSet, _sel_new); + return NSSet.fromPointer($ret, retain: false, release: true); } - /// doubleValue - double get doubleValue { - final _$$ref = object$.ref; - return objc.useMsgSendVariants - ? _objc_msgSend_1ukqyt8Fpret(_$$ref.pointer, _sel_doubleValue) - : _objc_msgSend_1ukqyt8(_$$ref.pointer, _sel_doubleValue); + /// set + static NSSet set() { + final $ret = _objc_msgSend_151sglz(_class_NSSet, _sel_set); + return NSSet.fromPointer($ret, retain: true, release: true); } - /// enumerateLinesUsingBlock: - void enumerateLinesUsingBlock( - objc.ObjCBlock)> block, - ) { - final _$$ref = object$.ref; - final _$$ref$1 = block.ref; - objc.checkOsVersionInternal( - 'NSString.enumerateLinesUsingBlock:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - _objc_msgSend_f167m6( - _$$ref.pointer, - _sel_enumerateLinesUsingBlock_, + /// setWithArray: + static NSSet setWithArray(NSArray array) { + final _$$ref$1 = array.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSSet, + _sel_setWithArray_, _$$ref$1.pointer, ); + return NSSet.fromPointer($ret, retain: true, release: true); } - /// enumerateSubstringsInRange:options:usingBlock: - void enumerateSubstringsInRange( - NSRange range, { - required DartNSUInteger options, - required objc.ObjCBlock< - ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) - > - usingBlock, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = usingBlock.ref; - objc.checkOsVersionInternal( - 'NSString.enumerateSubstringsInRange:options:usingBlock:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - _objc_msgSend_14ew8zr( - _$$ref.pointer, - _sel_enumerateSubstringsInRange_options_usingBlock_, - range, - options, + /// setWithObject: + static NSSet setWithObject(objc.ObjCObject object) { + final _$$ref$1 = object.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSSet, + _sel_setWithObject_, _$$ref$1.pointer, ); + return NSSet.fromPointer($ret, retain: true, release: true); } - /// fastestEncoding - DartNSUInteger get fastestEncoding { - final _$$ref = object$.ref; - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_fastestEncoding); - } - - /// floatValue - double get floatValue { - final _$$ref = object$.ref; - return objc.useMsgSendVariants - ? _objc_msgSend_2cgrxlFpret(_$$ref.pointer, _sel_floatValue) - : _objc_msgSend_2cgrxl(_$$ref.pointer, _sel_floatValue); + /// setWithObjects: + static NSSet setWithObjects(objc.ObjCObject firstObj) { + final _$$ref$1 = firstObj.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSSet, + _sel_setWithObjects_, + _$$ref$1.pointer, + ); + return NSSet.fromPointer($ret, retain: true, release: true); } - /// getBytes:maxLength:usedLength:encoding:options:range:remainingRange: - bool getBytes( - ffi.Pointer buffer, { - required DartNSUInteger maxLength, - required ffi.Pointer usedLength, - required DartNSUInteger encoding, - required DartNSUInteger options, - required NSRange range, - required ffi.Pointer remainingRange, + /// setWithObjects:count: + static NSSet setWithObjects$1( + ffi.Pointer> objects, { + required DartNSUInteger count, }) { - final _$$ref = object$.ref; - return _objc_msgSend_i30zh3( - _$$ref.pointer, - _sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_, - buffer, - maxLength, - usedLength, - encoding, - options, - range, - remainingRange, + final $ret = _objc_msgSend_zmbtbd( + _class_NSSet, + _sel_setWithObjects_count_, + objects, + count, ); + return NSSet.fromPointer($ret, retain: true, release: true); } - /// getCString:maxLength:encoding: - bool getCString( - ffi.Pointer buffer, { - required DartNSUInteger maxLength, - required DartNSUInteger encoding, - }) { - final _$$ref = object$.ref; - return _objc_msgSend_1lv8yz3( - _$$ref.pointer, - _sel_getCString_maxLength_encoding_, - buffer, - maxLength, - encoding, + /// setWithSet: + static NSSet setWithSet(NSSet set) { + final _$$ref$1 = set.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSSet, + _sel_setWithSet_, + _$$ref$1.pointer, ); + return NSSet.fromPointer($ret, retain: true, release: true); } - /// getCharacters:range: - void getCharacters( - ffi.Pointer buffer, { - required NSRange range, - }) { - final _$$ref = object$.ref; - _objc_msgSend_898fog( - _$$ref.pointer, - _sel_getCharacters_range_, - buffer, - range, - ); + /// supportsSecureCoding + static bool getSupportsSecureCoding() { + return _objc_msgSend_91o635(_class_NSSet, _sel_supportsSecureCoding); } - /// getLineStart:end:contentsEnd:forRange: - void getLineStart( - ffi.Pointer startPtr, { - required ffi.Pointer end, - required ffi.Pointer contentsEnd, - required NSRange forRange, - }) { + /// Returns a new instance of NSSet constructed with the default `new` method. + NSSet() : this.as(new$().object$); +} + +extension NSSet$Methods on NSSet { + /// count + DartNSUInteger get count { final _$$ref = object$.ref; - _objc_msgSend_ourvf2( - _$$ref.pointer, - _sel_getLineStart_end_contentsEnd_forRange_, - startPtr, - end, - contentsEnd, - forRange, - ); + return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_count); } - /// getParagraphStart:end:contentsEnd:forRange: - void getParagraphStart( - ffi.Pointer startPtr, { - required ffi.Pointer end, - required ffi.Pointer contentsEnd, - required NSRange forRange, + /// countByEnumeratingWithState:objects:count: + DartNSUInteger countByEnumeratingWithState( + ffi.Pointer state, { + required ffi.Pointer> objects, + required DartNSUInteger count, }) { - final _$$ref = object$.ref; - _objc_msgSend_ourvf2( - _$$ref.pointer, - _sel_getParagraphStart_end_contentsEnd_forRange_, - startPtr, - end, - contentsEnd, - forRange, + final _$$ref$6 = object$.ref; + return _objc_msgSend_1b5ysjl( + _$$ref$6.pointer, + _sel_countByEnumeratingWithState_objects_count_, + state, + objects, + count, ); } - /// hasPrefix: - bool hasPrefix(NSString str) { - final _$$ref = object$.ref; - final _$$ref$1 = str.ref; - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_hasPrefix_, - _$$ref$1.pointer, + /// encodeWithCoder: + void encodeWithCoder(NSCoder coder) { + final _$$ref$30 = object$.ref; + final _$$ref$31 = coder.ref; + _objc_msgSend_xtuoz7( + _$$ref$30.pointer, + _sel_encodeWithCoder_, + _$$ref$31.pointer, ); } - /// hasSuffix: - bool hasSuffix(NSString str) { - final _$$ref = object$.ref; - final _$$ref$1 = str.ref; - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_hasSuffix_, - _$$ref$1.pointer, + /// init + NSSet init() { + final _$$ref$39 = object$.ref; + objc.checkOsVersionInternal( + 'NSSet.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); + final $ret = _objc_msgSend_151sglz( + _$$ref$39.retainAndReturnPointer(), + _sel_init, + ); + return NSSet.fromPointer($ret, retain: false, release: true); } - /// hash - DartNSUInteger get hash$1 { - final _$$ref = object$.ref; - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_hash); - } - - /// intValue - int get intValue { - final _$$ref = object$.ref; - return _objc_msgSend_13yqbb6(_$$ref.pointer, _sel_intValue); + /// initWithArray: + NSSet initWithArray(NSArray array) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = array.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithArray_, + _$$ref$3.pointer, + ); + return NSSet.fromPointer($ret, retain: false, release: true); } - /// integerValue - int get integerValue { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSString.integerValue', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), + /// initWithCoder: + NSSet? initWithCoder(NSCoder coder) { + final _$$ref$46 = object$.ref; + final _$$ref$47 = coder.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref$46.retainAndReturnPointer(), + _sel_initWithCoder_, + _$$ref$47.pointer, ); - return _objc_msgSend_1hz7y9r(_$$ref.pointer, _sel_integerValue); + return $ret.address == 0 + ? null + : NSSet.fromPointer($ret, retain: false, release: true); } - /// isEqualToString: - bool isEqualToString(NSString aString) { - final _$$ref = object$.ref; - final _$$ref$1 = aString.ref; - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_isEqualToString_, - _$$ref$1.pointer, + /// initWithObjects: + NSSet initWithObjects(objc.ObjCObject firstObj) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = firstObj.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithObjects_, + _$$ref$3.pointer, ); + return NSSet.fromPointer($ret, retain: false, release: true); } - /// lengthOfBytesUsingEncoding: - DartNSUInteger lengthOfBytesUsingEncoding(DartNSUInteger enc) { - final _$$ref = object$.ref; - return _objc_msgSend_12py2ux( - _$$ref.pointer, - _sel_lengthOfBytesUsingEncoding_, - enc, + /// initWithObjects:count: + NSSet initWithObjects$1( + ffi.Pointer> objects, { + required DartNSUInteger count, + }) { + final _$$ref$1 = object$.ref; + final $ret = _objc_msgSend_zmbtbd( + _$$ref$1.retainAndReturnPointer(), + _sel_initWithObjects_count_, + objects, + count, ); + return NSSet.fromPointer($ret, retain: false, release: true); } - /// lineRangeForRange: - NSRange lineRangeForRange(NSRange range) { - final _$$ref = object$.ref; - final $ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants - ? _objc_msgSend_uimyc7Stret( - $ptr, - _$$ref.pointer, - _sel_lineRangeForRange_, - range, - ) - : $ptr.ref = _objc_msgSend_uimyc7( - _$$ref.pointer, - _sel_lineRangeForRange_, - range, - ); - final $finalizable = $ptr.cast().asTypedList( - ffi.sizeOf(), - finalizer: pkg_ffi.calloc.nativeFree, + /// initWithSet: + NSSet initWithSet(NSSet set) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = set.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithSet_, + _$$ref$3.pointer, ); - return ffi.Struct.create($finalizable); + return NSSet.fromPointer($ret, retain: false, release: true); } - /// localizedCapitalizedString - NSString get localizedCapitalizedString { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSString.localizedCapitalizedString', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_localizedCapitalizedString, + /// initWithSet:copyItems: + NSSet initWithSet$1(NSSet set, {required bool copyItems}) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = set.ref; + final $ret = _objc_msgSend_17amj0z( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithSet_copyItems_, + _$$ref$3.pointer, + copyItems, ); - return NSString.fromPointer($ret, retain: true, release: true); + return NSSet.fromPointer($ret, retain: false, release: true); } - /// localizedCaseInsensitiveCompare: - NSComparisonResult localizedCaseInsensitiveCompare(NSString string) { + /// member: + objc.ObjCObject? member(objc.ObjCObject object) { final _$$ref = object$.ref; - final _$$ref$1 = string.ref; - final $ret = _objc_msgSend_1ym6zyw( + final _$$ref$1 = object.ref; + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_localizedCaseInsensitiveCompare_, + _sel_member_, _$$ref$1.pointer, ); - return NSComparisonResult.fromValue($ret); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); } - /// localizedCaseInsensitiveContainsString: - bool localizedCaseInsensitiveContainsString(NSString str) { + /// objectEnumerator + NSEnumerator objectEnumerator() { final _$$ref = object$.ref; - final _$$ref$1 = str.ref; - objc.checkOsVersionInternal( - 'NSString.localizedCaseInsensitiveContainsString:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), - ); - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_localizedCaseInsensitiveContainsString_, - _$$ref$1.pointer, - ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_objectEnumerator); + return NSEnumerator.fromPointer($ret, retain: true, release: true); } +} - /// localizedCompare: - NSComparisonResult localizedCompare(NSString string) { - final _$$ref = object$.ref; - final _$$ref$1 = string.ref; - final $ret = _objc_msgSend_1ym6zyw( - _$$ref.pointer, - _sel_localizedCompare_, - _$$ref$1.pointer, - ); - return NSComparisonResult.fromValue($ret); +sealed class NSSortOptions { + static const NSSortConcurrent = 1; + static const NSSortStable = 16; +} + +/// NSStream +extension type NSStream._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject { + /// Constructs a [NSStream] that points to the same underlying object as [other]. + NSStream.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); } - /// localizedLowercaseString - NSString get localizedLowercaseString { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSString.localizedLowercaseString', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_localizedLowercaseString, - ); - return NSString.fromPointer($ret, retain: true, release: true); + /// Constructs a [NSStream] that wraps the given raw object pointer. + NSStream.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + assert(isA(object$)); } - /// localizedStandardCompare: - NSComparisonResult localizedStandardCompare(NSString string) { - final _$$ref = object$.ref; - final _$$ref$1 = string.ref; - objc.checkOsVersionInternal( - 'NSString.localizedStandardCompare:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_1ym6zyw( - _$$ref.pointer, - _sel_localizedStandardCompare_, - _$$ref$1.pointer, + /// Returns whether [obj] is an instance of [NSStream]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSStream, + ); + + /// alloc + static NSStream alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSStream, _sel_alloc); + return NSStream.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NSStream allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSStream, + _sel_allocWithZone_, + zone, ); - return NSComparisonResult.fromValue($ret); + return NSStream.fromPointer($ret, retain: false, release: true); } - /// localizedStandardContainsString: - bool localizedStandardContainsString(NSString str) { - final _$$ref = object$.ref; - final _$$ref$1 = str.ref; - objc.checkOsVersionInternal( - 'NSString.localizedStandardContainsString:', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), - ); - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_localizedStandardContainsString_, - _$$ref$1.pointer, - ); + /// new + static NSStream new$() { + final $ret = _objc_msgSend_151sglz(_class_NSStream, _sel_new); + return NSStream.fromPointer($ret, retain: false, release: true); } - /// localizedStandardRangeOfString: - NSRange localizedStandardRangeOfString(NSString str) { + /// Returns a new instance of NSStream constructed with the default `new` method. + NSStream() : this.as(new$().object$); +} + +extension NSStream$Methods on NSStream { + /// close + void close() { final _$$ref = object$.ref; - final _$$ref$1 = str.ref; - objc.checkOsVersionInternal( - 'NSString.localizedStandardRangeOfString:', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), - ); - final $ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants - ? _objc_msgSend_182fzonStret( - $ptr, - _$$ref.pointer, - _sel_localizedStandardRangeOfString_, - _$$ref$1.pointer, - ) - : $ptr.ref = _objc_msgSend_182fzon( - _$$ref.pointer, - _sel_localizedStandardRangeOfString_, - _$$ref$1.pointer, - ); - final $finalizable = $ptr.cast().asTypedList( - ffi.sizeOf(), - finalizer: pkg_ffi.calloc.nativeFree, - ); - return ffi.Struct.create($finalizable); + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_close); } - /// localizedUppercaseString - NSString get localizedUppercaseString { + /// delegate + NSStreamDelegate? get delegate { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSString.localizedUppercaseString', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_localizedUppercaseString, - ); - return NSString.fromPointer($ret, retain: true, release: true); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_delegate); + return $ret.address == 0 + ? null + : NSStreamDelegate.fromPointer($ret, retain: true, release: true); } - /// longLongValue - int get longLongValue { - final _$$ref = object$.ref; + /// init + NSStream init() { + final _$$ref$40 = object$.ref; objc.checkOsVersionInternal( - 'NSString.longLongValue', + 'NSStream.init', iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), + macOS: (false, (10, 0, 0)), ); - return _objc_msgSend_1k101e3(_$$ref.pointer, _sel_longLongValue); + final $ret = _objc_msgSend_151sglz( + _$$ref$40.retainAndReturnPointer(), + _sel_init, + ); + return NSStream.fromPointer($ret, retain: false, release: true); } - /// lowercaseString - NSString get lowercaseString { + /// open + void open() { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_lowercaseString); - return NSString.fromPointer($ret, retain: true, release: true); + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_open); } - /// lowercaseStringWithLocale: - NSString lowercaseStringWithLocale(NSLocale? locale) { + /// propertyForKey: + objc.ObjCObject? propertyForKey(NSString key) { final _$$ref = object$.ref; - final _$$ref$1 = locale?.ref; - objc.checkOsVersionInternal( - 'NSString.lowercaseStringWithLocale:', - iOS: (false, (6, 0, 0)), - macOS: (false, (10, 8, 0)), - ); + final _$$ref$1 = key.ref; final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_lowercaseStringWithLocale_, - _$$ref$1?.pointer ?? ffi.nullptr, + _sel_propertyForKey_, + _$$ref$1.pointer, ); - return NSString.fromPointer($ret, retain: true, release: true); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); } - /// maximumLengthOfBytesUsingEncoding: - DartNSUInteger maximumLengthOfBytesUsingEncoding(DartNSUInteger enc) { + /// removeFromRunLoop:forMode: + void removeFromRunLoop(NSRunLoop aRunLoop, {required NSString forMode}) { final _$$ref = object$.ref; - return _objc_msgSend_12py2ux( + final _$$ref$1 = aRunLoop.ref; + final _$$ref$2 = forMode.ref; + _objc_msgSend_pfv6jd( _$$ref.pointer, - _sel_maximumLengthOfBytesUsingEncoding_, - enc, - ); - } - - /// paragraphRangeForRange: - NSRange paragraphRangeForRange(NSRange range) { - final _$$ref = object$.ref; - final $ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants - ? _objc_msgSend_uimyc7Stret( - $ptr, - _$$ref.pointer, - _sel_paragraphRangeForRange_, - range, - ) - : $ptr.ref = _objc_msgSend_uimyc7( - _$$ref.pointer, - _sel_paragraphRangeForRange_, - range, - ); - final $finalizable = $ptr.cast().asTypedList( - ffi.sizeOf(), - finalizer: pkg_ffi.calloc.nativeFree, + _sel_removeFromRunLoop_forMode_, + _$$ref$1.pointer, + _$$ref$2.pointer, ); - return ffi.Struct.create($finalizable); } - /// precomposedStringWithCanonicalMapping - NSString get precomposedStringWithCanonicalMapping { + /// scheduleInRunLoop:forMode: + void scheduleInRunLoop(NSRunLoop aRunLoop, {required NSString forMode}) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz( + final _$$ref$1 = aRunLoop.ref; + final _$$ref$2 = forMode.ref; + _objc_msgSend_pfv6jd( _$$ref.pointer, - _sel_precomposedStringWithCanonicalMapping, + _sel_scheduleInRunLoop_forMode_, + _$$ref$1.pointer, + _$$ref$2.pointer, ); - return NSString.fromPointer($ret, retain: true, release: true); } - /// precomposedStringWithCompatibilityMapping - NSString get precomposedStringWithCompatibilityMapping { + /// setDelegate: + set delegate(NSStreamDelegate? value) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz( + final _$$ref$1 = value?.ref; + _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_precomposedStringWithCompatibilityMapping, + _sel_setDelegate_, + _$$ref$1?.pointer ?? ffi.nullptr, ); - return NSString.fromPointer($ret, retain: true, release: true); } - /// rangeOfCharacterFromSet: - NSRange rangeOfCharacterFromSet(NSCharacterSet searchSet) { + /// setProperty:forKey: + bool setProperty(objc.ObjCObject? property, {required NSString forKey}) { final _$$ref = object$.ref; - final _$$ref$1 = searchSet.ref; - final $ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants - ? _objc_msgSend_182fzonStret( - $ptr, - _$$ref.pointer, - _sel_rangeOfCharacterFromSet_, - _$$ref$1.pointer, - ) - : $ptr.ref = _objc_msgSend_182fzon( - _$$ref.pointer, - _sel_rangeOfCharacterFromSet_, - _$$ref$1.pointer, - ); - final $finalizable = $ptr.cast().asTypedList( - ffi.sizeOf(), - finalizer: pkg_ffi.calloc.nativeFree, + final _$$ref$1 = property?.ref; + final _$$ref$2 = forKey.ref; + return _objc_msgSend_1lsax7n( + _$$ref.pointer, + _sel_setProperty_forKey_, + _$$ref$1?.pointer ?? ffi.nullptr, + _$$ref$2.pointer, ); - return ffi.Struct.create($finalizable); } - /// rangeOfCharacterFromSet:options: - NSRange rangeOfCharacterFromSet$1( - NSCharacterSet searchSet, { - required DartNSUInteger options, - }) { + /// streamError + NSError? get streamError { final _$$ref = object$.ref; - final _$$ref$1 = searchSet.ref; - final $ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants - ? _objc_msgSend_102xxo4Stret( - $ptr, - _$$ref.pointer, - _sel_rangeOfCharacterFromSet_options_, - _$$ref$1.pointer, - options, - ) - : $ptr.ref = _objc_msgSend_102xxo4( - _$$ref.pointer, - _sel_rangeOfCharacterFromSet_options_, - _$$ref$1.pointer, - options, - ); - final $finalizable = $ptr.cast().asTypedList( - ffi.sizeOf(), - finalizer: pkg_ffi.calloc.nativeFree, - ); - return ffi.Struct.create($finalizable); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_streamError); + return $ret.address == 0 + ? null + : NSError.fromPointer($ret, retain: true, release: true); } - /// rangeOfCharacterFromSet:options:range: - NSRange rangeOfCharacterFromSet$2( - NSCharacterSet searchSet, { - required DartNSUInteger options, - required NSRange range, - }) { + /// streamStatus + NSStreamStatus get streamStatus { final _$$ref = object$.ref; - final _$$ref$1 = searchSet.ref; - final $ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants - ? _objc_msgSend_1nmlvqcStret( - $ptr, - _$$ref.pointer, - _sel_rangeOfCharacterFromSet_options_range_, - _$$ref$1.pointer, - options, - range, - ) - : $ptr.ref = _objc_msgSend_1nmlvqc( - _$$ref.pointer, - _sel_rangeOfCharacterFromSet_options_range_, - _$$ref$1.pointer, - options, - range, - ); - final $finalizable = $ptr.cast().asTypedList( - ffi.sizeOf(), - finalizer: pkg_ffi.calloc.nativeFree, - ); - return ffi.Struct.create($finalizable); + final $ret = _objc_msgSend_1efxbd8(_$$ref.pointer, _sel_streamStatus); + return NSStreamStatus.fromValue($ret); } +} - /// rangeOfComposedCharacterSequenceAtIndex: - NSRange rangeOfComposedCharacterSequenceAtIndex(DartNSUInteger index) { - final _$$ref = object$.ref; - final $ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants - ? _objc_msgSend_d3i1uyStret( - $ptr, - _$$ref.pointer, - _sel_rangeOfComposedCharacterSequenceAtIndex_, - index, - ) - : $ptr.ref = _objc_msgSend_d3i1uy( - _$$ref.pointer, - _sel_rangeOfComposedCharacterSequenceAtIndex_, - index, - ); - final $finalizable = $ptr.cast().asTypedList( - ffi.sizeOf(), - finalizer: pkg_ffi.calloc.nativeFree, - ); - return ffi.Struct.create($finalizable); - } +/// NSStreamDelegate +extension type NSStreamDelegate._(objc.ObjCProtocol object$) + implements objc.ObjCProtocol, NSObjectProtocol { + /// Constructs a [NSStreamDelegate] that points to the same underlying object as [other]. + NSStreamDelegate.as(objc.ObjCObject other) : object$ = other; - /// rangeOfComposedCharacterSequencesForRange: - NSRange rangeOfComposedCharacterSequencesForRange(NSRange range) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSString.rangeOfComposedCharacterSequencesForRange:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - final $ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants - ? _objc_msgSend_uimyc7Stret( - $ptr, - _$$ref.pointer, - _sel_rangeOfComposedCharacterSequencesForRange_, - range, - ) - : $ptr.ref = _objc_msgSend_uimyc7( - _$$ref.pointer, - _sel_rangeOfComposedCharacterSequencesForRange_, - range, - ); - final $finalizable = $ptr.cast().asTypedList( - ffi.sizeOf(), - finalizer: pkg_ffi.calloc.nativeFree, - ); - return ffi.Struct.create($finalizable); - } + /// Constructs a [NSStreamDelegate] that wraps the given raw object pointer. + NSStreamDelegate.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); - /// rangeOfString: - NSRange rangeOfString(NSString searchString) { - final _$$ref = object$.ref; - final _$$ref$1 = searchString.ref; - final $ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants - ? _objc_msgSend_182fzonStret( - $ptr, - _$$ref.pointer, - _sel_rangeOfString_, - _$$ref$1.pointer, - ) - : $ptr.ref = _objc_msgSend_182fzon( - _$$ref.pointer, - _sel_rangeOfString_, - _$$ref$1.pointer, - ); - final $finalizable = $ptr.cast().asTypedList( - ffi.sizeOf(), - finalizer: pkg_ffi.calloc.nativeFree, + /// Returns whether [obj] is an instance of [NSStreamDelegate]. + static bool conformsTo(objc.ObjCObject obj) { + return _objc_msgSend_e3qsqz( + obj.ref.pointer, + _sel_conformsToProtocol_, + _protocol_NSStreamDelegate, ); - return ffi.Struct.create($finalizable); } +} - /// rangeOfString:options: - NSRange rangeOfString$1( - NSString searchString, { - required DartNSUInteger options, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = searchString.ref; - final $ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants - ? _objc_msgSend_102xxo4Stret( - $ptr, - _$$ref.pointer, - _sel_rangeOfString_options_, - _$$ref$1.pointer, - options, - ) - : $ptr.ref = _objc_msgSend_102xxo4( - _$$ref.pointer, - _sel_rangeOfString_options_, - _$$ref$1.pointer, - options, - ); - final $finalizable = $ptr.cast().asTypedList( - ffi.sizeOf(), - finalizer: pkg_ffi.calloc.nativeFree, +extension NSStreamDelegate$Methods on NSStreamDelegate { + /// stream:handleEvent: + void stream(NSStream aStream, {required DartNSUInteger handleEvent}) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = aStream.ref; + if (!objc.respondsToSelector(_$$ref$2.pointer, _sel_stream_handleEvent_)) { + throw objc.UnimplementedOptionalMethodException( + 'NSStreamDelegate', + 'stream:handleEvent:', + ); + } + _objc_msgSend_3l8zum( + _$$ref$2.pointer, + _sel_stream_handleEvent_, + _$$ref$3.pointer, + handleEvent, ); - return ffi.Struct.create($finalizable); } +} - /// rangeOfString:options:range: - NSRange rangeOfString$2( - NSString searchString, { - required DartNSUInteger options, - required NSRange range, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = searchString.ref; - final $ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants - ? _objc_msgSend_1nmlvqcStret( - $ptr, - _$$ref.pointer, - _sel_rangeOfString_options_range_, - _$$ref$1.pointer, - options, - range, - ) - : $ptr.ref = _objc_msgSend_1nmlvqc( - _$$ref.pointer, - _sel_rangeOfString_options_range_, - _$$ref$1.pointer, - options, - range, - ); - final $finalizable = $ptr.cast().asTypedList( - ffi.sizeOf(), - finalizer: pkg_ffi.calloc.nativeFree, - ); - return ffi.Struct.create($finalizable); - } +interface class NSStreamDelegate$Builder { + /// Returns the [objc.Protocol] object for this protocol. + static objc.Protocol get $protocol => + objc.Protocol.fromPointer(_protocol_NSStreamDelegate.cast()); - /// rangeOfString:options:range:locale: - NSRange rangeOfString$3( - NSString searchString, { - required DartNSUInteger options, - required NSRange range, - NSLocale? locale, + /// Builds an object that implements the NSStreamDelegate protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + /// + /// If `$keepIsolateAlive` is true, this protocol will keep this isolate + /// alive until it is garbage collected by both Dart and ObjC. + static NSStreamDelegate implement({ + void Function(NSStream, DartNSUInteger)? stream_handleEvent_, + bool $keepIsolateAlive = true, }) { - final _$$ref = object$.ref; - final _$$ref$1 = searchString.ref; - final _$$ref$2 = locale?.ref; - objc.checkOsVersionInternal( - 'NSString.rangeOfString:options:range:locale:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - final $ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants - ? _objc_msgSend_gg0462Stret( - $ptr, - _$$ref.pointer, - _sel_rangeOfString_options_range_locale_, - _$$ref$1.pointer, - options, - range, - _$$ref$2?.pointer ?? ffi.nullptr, - ) - : $ptr.ref = _objc_msgSend_gg0462( - _$$ref.pointer, - _sel_rangeOfString_options_range_locale_, - _$$ref$1.pointer, - options, - range, - _$$ref$2?.pointer ?? ffi.nullptr, - ); - final $finalizable = $ptr.cast().asTypedList( - ffi.sizeOf(), - finalizer: pkg_ffi.calloc.nativeFree, - ); - return ffi.Struct.create($finalizable); - } - - /// smallestEncoding - DartNSUInteger get smallestEncoding { - final _$$ref = object$.ref; - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_smallestEncoding); - } - - /// stringByAppendingFormat: - NSString stringByAppendingFormat(NSString format) { - final _$$ref = object$.ref; - final _$$ref$1 = format.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_stringByAppendingFormat_, - _$$ref$1.pointer, - ); - return NSString.fromPointer($ret, retain: true, release: true); - } - - /// stringByAppendingString: - NSString stringByAppendingString(NSString aString) { - final _$$ref = object$.ref; - final _$$ref$1 = aString.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_stringByAppendingString_, - _$$ref$1.pointer, + final builder = objc.ObjCProtocolBuilder(debugName: 'NSStreamDelegate'); + NSStreamDelegate$Builder.stream_handleEvent_.implement( + builder, + stream_handleEvent_, + ); + builder.addProtocol($protocol); + return NSStreamDelegate.as( + builder.build(keepIsolateAlive: $keepIsolateAlive), ); - return NSString.fromPointer($ret, retain: true, release: true); } - /// stringByApplyingTransform:reverse: - NSString? stringByApplyingTransform( - NSString transform, { - required bool reverse, + /// Adds the implementation of the NSStreamDelegate protocol to an existing + /// [objc.ObjCProtocolBuilder]. + /// + /// Note: You cannot call this method after you have called `builder.build`. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, { + void Function(NSStream, DartNSUInteger)? stream_handleEvent_, + bool $keepIsolateAlive = true, }) { - final _$$ref = object$.ref; - final _$$ref$1 = transform.ref; - objc.checkOsVersionInternal( - 'NSString.stringByApplyingTransform:reverse:', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), - ); - final $ret = _objc_msgSend_17amj0z( - _$$ref.pointer, - _sel_stringByApplyingTransform_reverse_, - _$$ref$1.pointer, - reverse, + NSStreamDelegate$Builder.stream_handleEvent_.implement( + builder, + stream_handleEvent_, ); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); + builder.addProtocol($protocol); } - /// stringByFoldingWithOptions:locale: - NSString stringByFoldingWithOptions( - DartNSUInteger options, { - NSLocale? locale, + /// Builds an object that implements the NSStreamDelegate protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All + /// methods that can be implemented as listeners will be. + /// + /// If `$keepIsolateAlive` is true, this protocol will keep this isolate + /// alive until it is garbage collected by both Dart and ObjC. + static NSStreamDelegate implementAsListener({ + void Function(NSStream, DartNSUInteger)? stream_handleEvent_, + bool $keepIsolateAlive = true, }) { - final _$$ref = object$.ref; - final _$$ref$1 = locale?.ref; - objc.checkOsVersionInternal( - 'NSString.stringByFoldingWithOptions:locale:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), + final builder = objc.ObjCProtocolBuilder(debugName: 'NSStreamDelegate'); + NSStreamDelegate$Builder.stream_handleEvent_.implementAsListener( + builder, + stream_handleEvent_, ); - final $ret = _objc_msgSend_11cbyu0( - _$$ref.pointer, - _sel_stringByFoldingWithOptions_locale_, - options, - _$$ref$1?.pointer ?? ffi.nullptr, + builder.addProtocol($protocol); + return NSStreamDelegate.as( + builder.build(keepIsolateAlive: $keepIsolateAlive), ); - return NSString.fromPointer($ret, retain: true, release: true); } - /// stringByPaddingToLength:withString:startingAtIndex: - NSString stringByPaddingToLength( - DartNSUInteger newLength, { - required NSString withString, - required DartNSUInteger startingAtIndex, + /// Adds the implementation of the NSStreamDelegate protocol to an existing + /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will + /// be. + /// + /// Note: You cannot call this method after you have called `builder.build`. + static void addToBuilderAsListener( + objc.ObjCProtocolBuilder builder, { + void Function(NSStream, DartNSUInteger)? stream_handleEvent_, + bool $keepIsolateAlive = true, }) { - final _$$ref = object$.ref; - final _$$ref$1 = withString.ref; - final $ret = _objc_msgSend_1tfztp( - _$$ref.pointer, - _sel_stringByPaddingToLength_withString_startingAtIndex_, - newLength, - _$$ref$1.pointer, - startingAtIndex, + NSStreamDelegate$Builder.stream_handleEvent_.implementAsListener( + builder, + stream_handleEvent_, ); - return NSString.fromPointer($ret, retain: true, release: true); + builder.addProtocol($protocol); } - /// stringByReplacingCharactersInRange:withString: - NSString stringByReplacingCharactersInRange( - NSRange range, { - required NSString withString, + /// Builds an object that implements the NSStreamDelegate protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All + /// methods that can be implemented as blocking listeners will be. + /// + /// If `$keepIsolateAlive` is true, this protocol will keep this isolate + /// alive until it is garbage collected by both Dart and ObjC. + static NSStreamDelegate implementAsBlocking({ + void Function(NSStream, DartNSUInteger)? stream_handleEvent_, + bool $keepIsolateAlive = true, }) { - final _$$ref = object$.ref; - final _$$ref$1 = withString.ref; - objc.checkOsVersionInternal( - 'NSString.stringByReplacingCharactersInRange:withString:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), + final builder = objc.ObjCProtocolBuilder(debugName: 'NSStreamDelegate'); + NSStreamDelegate$Builder.stream_handleEvent_.implementAsBlocking( + builder, + stream_handleEvent_, ); - final $ret = _objc_msgSend_bstjp9( - _$$ref.pointer, - _sel_stringByReplacingCharactersInRange_withString_, - range, - _$$ref$1.pointer, + builder.addProtocol($protocol); + return NSStreamDelegate.as( + builder.build(keepIsolateAlive: $keepIsolateAlive), ); - return NSString.fromPointer($ret, retain: true, release: true); } - /// stringByReplacingOccurrencesOfString:withString: - NSString stringByReplacingOccurrencesOfString( - NSString target, { - required NSString withString, + /// Adds the implementation of the NSStreamDelegate protocol to an existing + /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as blocking + /// listeners will be. + /// + /// Note: You cannot call this method after you have called `builder.build`. + static void addToBuilderAsBlocking( + objc.ObjCProtocolBuilder builder, { + void Function(NSStream, DartNSUInteger)? stream_handleEvent_, + bool $keepIsolateAlive = true, }) { - final _$$ref = object$.ref; - final _$$ref$1 = target.ref; - final _$$ref$2 = withString.ref; - objc.checkOsVersionInternal( - 'NSString.stringByReplacingOccurrencesOfString:withString:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - final $ret = _objc_msgSend_15qeuct( - _$$ref.pointer, - _sel_stringByReplacingOccurrencesOfString_withString_, - _$$ref$1.pointer, - _$$ref$2.pointer, + NSStreamDelegate$Builder.stream_handleEvent_.implementAsBlocking( + builder, + stream_handleEvent_, ); - return NSString.fromPointer($ret, retain: true, release: true); + builder.addProtocol($protocol); } - /// stringByReplacingOccurrencesOfString:withString:options:range: - NSString stringByReplacingOccurrencesOfString$1( - NSString target, { - required NSString withString, - required DartNSUInteger options, - required NSRange range, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = target.ref; - final _$$ref$2 = withString.ref; - objc.checkOsVersionInternal( - 'NSString.stringByReplacingOccurrencesOfString:withString:options:range:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - final $ret = _objc_msgSend_2u4jm6( - _$$ref.pointer, - _sel_stringByReplacingOccurrencesOfString_withString_options_range_, - _$$ref$1.pointer, - _$$ref$2.pointer, - options, - range, + /// stream:handleEvent: + static final stream_handleEvent_ = + objc.ObjCProtocolListenableMethod< + void Function(NSStream, DartNSUInteger) + >( + _protocol_NSStreamDelegate, + _sel_stream_handleEvent_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ) + > + >(_1wx624s_protocolTrampoline_hoampi) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NSStreamDelegate, + _sel_stream_handleEvent_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSStream, DartNSUInteger) func) => + ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent.fromFunction( + (ffi.Pointer _, NSStream arg1, DartNSUInteger arg2) => + func(arg1, arg2), + ), + (void Function(NSStream, DartNSUInteger) func) => + ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent.listener( + (ffi.Pointer _, NSStream arg1, DartNSUInteger arg2) => + func(arg1, arg2), + ), + (void Function(NSStream, DartNSUInteger) func) => + ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent.blocking( + (ffi.Pointer _, NSStream arg1, DartNSUInteger arg2) => + func(arg1, arg2), + ), + ); +} + +sealed class NSStreamEvent { + static const NSStreamEventNone = 0; + static const NSStreamEventOpenCompleted = 1; + static const NSStreamEventHasBytesAvailable = 2; + static const NSStreamEventHasSpaceAvailable = 4; + static const NSStreamEventErrorOccurred = 8; + static const NSStreamEventEndEncountered = 16; +} + +enum NSStreamStatus { + NSStreamStatusNotOpen(0), + NSStreamStatusOpening(1), + NSStreamStatusOpen(2), + NSStreamStatusReading(3), + NSStreamStatusWriting(4), + NSStreamStatusAtEnd(5), + NSStreamStatusClosed(6), + NSStreamStatusError(7); + + final int value; + const NSStreamStatus(this.value); + + static NSStreamStatus fromValue(int value) => switch (value) { + 0 => NSStreamStatusNotOpen, + 1 => NSStreamStatusOpening, + 2 => NSStreamStatusOpen, + 3 => NSStreamStatusReading, + 4 => NSStreamStatusWriting, + 5 => NSStreamStatusAtEnd, + 6 => NSStreamStatusClosed, + 7 => NSStreamStatusError, + _ => throw ArgumentError('Unknown value for NSStreamStatus: $value'), + }; +} + +/// NSString +extension type NSString._(objc.ObjCObject object$) + implements + objc.ObjCObject, + NSObject, + NSCopying, + NSMutableCopying, + NSSecureCoding { + NSString(String str) : this.as(_stringToNSString$(str)); + + static NSString _stringToNSString$(String str) { + final cstr = str.toNativeUtf16(); + final nsstr = stringWithCharacters(cstr.cast(), length: str.length); + pkg_ffi.calloc.free(cstr); + return nsstr; + } + + /// Constructs a [NSString] that points to the same underlying object as [other]. + NSString.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NSString] that wraps the given raw object pointer. + NSString.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + assert(isA(object$)); + } + + /// Returns whether [obj] is an instance of [NSString]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSString, + ); + + /// alloc + static NSString alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSString, _sel_alloc); + return NSString.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NSString allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSString, + _sel_allocWithZone_, + zone, ); - return NSString.fromPointer($ret, retain: true, release: true); + return NSString.fromPointer($ret, retain: false, release: true); } - /// stringByTrimmingCharactersInSet: - NSString stringByTrimmingCharactersInSet(NSCharacterSet set) { - final _$$ref = object$.ref; - final _$$ref$1 = set.ref; + /// localizedStringWithFormat: + static NSString localizedStringWithFormat(NSString format) { + final _$$ref$1 = format.ref; final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_stringByTrimmingCharactersInSet_, + _class_NSString, + _sel_localizedStringWithFormat_, _$$ref$1.pointer, ); return NSString.fromPointer($ret, retain: true, release: true); } - /// substringFromIndex: - NSString substringFromIndex(DartNSUInteger from) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_14hpxwa( - _$$ref.pointer, - _sel_substringFromIndex_, - from, + /// localizedStringWithValidatedFormat:validFormatSpecifiers:error: + static NSString? localizedStringWithValidatedFormat( + NSString format, { + required NSString validFormatSpecifiers, + }) { + final _$$ref$2 = format.ref; + final _$$ref$3 = validFormatSpecifiers.ref; + objc.checkOsVersionInternal( + 'NSString.localizedStringWithValidatedFormat:validFormatSpecifiers:error:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), ); - return NSString.fromPointer($ret, retain: true, release: true); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1pnyuds( + _class_NSString, + _sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_, + _$$ref$2.pointer, + _$$ref$3.pointer, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); + } finally { + pkg_ffi.calloc.free($err); + } } - /// substringToIndex: - NSString substringToIndex(DartNSUInteger to) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_14hpxwa( - _$$ref.pointer, - _sel_substringToIndex_, - to, - ); - return NSString.fromPointer($ret, retain: true, release: true); + /// new + static NSString new$() { + final $ret = _objc_msgSend_151sglz(_class_NSString, _sel_new); + return NSString.fromPointer($ret, retain: false, release: true); } - /// substringWithRange: - NSString substringWithRange(NSRange range) { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_1k1o1s7( - _$$ref.pointer, - _sel_substringWithRange_, - range, - ); + /// string + static NSString string() { + final $ret = _objc_msgSend_151sglz(_class_NSString, _sel_string); return NSString.fromPointer($ret, retain: true, release: true); } - /// uppercaseString - NSString get uppercaseString { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_uppercaseString); - return NSString.fromPointer($ret, retain: true, release: true); + /// stringWithCString:encoding: + static NSString? stringWithCString( + ffi.Pointer cString, { + required DartNSUInteger encoding, + }) { + final $ret = _objc_msgSend_erqryg( + _class_NSString, + _sel_stringWithCString_encoding_, + cString, + encoding, + ); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); } - /// uppercaseStringWithLocale: - NSString uppercaseStringWithLocale(NSLocale? locale) { - final _$$ref = object$.ref; - final _$$ref$1 = locale?.ref; - objc.checkOsVersionInternal( - 'NSString.uppercaseStringWithLocale:', - iOS: (false, (6, 0, 0)), - macOS: (false, (10, 8, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_uppercaseStringWithLocale_, - _$$ref$1?.pointer ?? ffi.nullptr, + /// stringWithCharacters:length: + static NSString stringWithCharacters( + ffi.Pointer characters, { + required DartNSUInteger length, + }) { + final $ret = _objc_msgSend_9x4k8x( + _class_NSString, + _sel_stringWithCharacters_length_, + characters, + length, ); return NSString.fromPointer($ret, retain: true, release: true); } - /// writeToFile:atomically:encoding:error: - bool writeToFile( + /// stringWithContentsOfFile:encoding:error: + static NSString? stringWithContentsOfFile( NSString path, { - required bool atomically, required DartNSUInteger encoding, }) { - final _$$ref = object$.ref; final _$$ref$1 = path.ref; final $err = pkg_ffi.calloc>(); try { - final $ret = _objc_msgSend_dv3z6r( - _$$ref.pointer, - _sel_writeToFile_atomically_encoding_error_, + final $ret = _objc_msgSend_1nomli1( + _class_NSString, + _sel_stringWithContentsOfFile_encoding_error_, _$$ref$1.pointer, - atomically, encoding, $err, ); objc.NSErrorException.checkErrorPointer($err.value); - return $ret; + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); } finally { pkg_ffi.calloc.free($err); } } - /// writeToURL:atomically:encoding:error: - bool writeToURL( + /// stringWithContentsOfFile:usedEncoding:error: + static NSString? stringWithContentsOfFile$1( + NSString path, { + required ffi.Pointer usedEncoding, + }) { + final _$$ref$1 = path.ref; + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1alewu7( + _class_NSString, + _sel_stringWithContentsOfFile_usedEncoding_error_, + _$$ref$1.pointer, + usedEncoding, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); + } finally { + pkg_ffi.calloc.free($err); + } + } + + /// stringWithContentsOfURL:encoding:error: + static NSString? stringWithContentsOfURL( NSURL url, { - required bool atomically, required DartNSUInteger encoding, }) { - final _$$ref = object$.ref; final _$$ref$1 = url.ref; final $err = pkg_ffi.calloc>(); try { - final $ret = _objc_msgSend_dv3z6r( - _$$ref.pointer, - _sel_writeToURL_atomically_encoding_error_, + final $ret = _objc_msgSend_1nomli1( + _class_NSString, + _sel_stringWithContentsOfURL_encoding_error_, _$$ref$1.pointer, - atomically, encoding, $err, ); objc.NSErrorException.checkErrorPointer($err.value); - return $ret; + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); } finally { pkg_ffi.calloc.free($err); } } - /// availableStringEncodings - static ffi.Pointer getAvailableStringEncodings() { - return _objc_msgSend_1h2q612( - _class_NSString, - _sel_availableStringEncodings, - ); - } - - /// defaultCStringEncoding - static DartNSUInteger getDefaultCStringEncoding() { - return _objc_msgSend_xw2lbc(_class_NSString, _sel_defaultCStringEncoding); + /// stringWithContentsOfURL:usedEncoding:error: + static NSString? stringWithContentsOfURL$1( + NSURL url, { + required ffi.Pointer usedEncoding, + }) { + final _$$ref$1 = url.ref; + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1alewu7( + _class_NSString, + _sel_stringWithContentsOfURL_usedEncoding_error_, + _$$ref$1.pointer, + usedEncoding, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); + } finally { + pkg_ffi.calloc.free($err); + } } - /// localizedNameOfStringEncoding: - static NSString localizedNameOfStringEncoding(DartNSUInteger encoding) { - final $ret = _objc_msgSend_14hpxwa( + /// stringWithFormat: + static NSString stringWithFormat(NSString format) { + final _$$ref$1 = format.ref; + final $ret = _objc_msgSend_1sotr3r( _class_NSString, - _sel_localizedNameOfStringEncoding_, - encoding, + _sel_stringWithFormat_, + _$$ref$1.pointer, ); return NSString.fromPointer($ret, retain: true, release: true); } -} -/// NSStringPathExtensions -extension NSStringPathExtensions on NSString { - /// completePathIntoString:caseSensitive:matchesIntoArray:filterTypes: - DartNSUInteger completePathIntoString( - ffi.Pointer> outputName, { - required bool caseSensitive, - required ffi.Pointer> matchesIntoArray, - NSArray? filterTypes, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = filterTypes?.ref; - return _objc_msgSend_8mvqcu( - _$$ref.pointer, - _sel_completePathIntoString_caseSensitive_matchesIntoArray_filterTypes_, - outputName, - caseSensitive, - matchesIntoArray, - _$$ref$1?.pointer ?? ffi.nullptr, + /// stringWithString: + static NSString stringWithString(NSString string) { + final _$$ref$1 = string.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSString, + _sel_stringWithString_, + _$$ref$1.pointer, ); + return NSString.fromPointer($ret, retain: true, release: true); } - /// fileSystemRepresentation - ffi.Pointer get fileSystemRepresentation { - final _$$ref = object$.ref; - return _objc_msgSend_1fuqfwb(_$$ref.pointer, _sel_fileSystemRepresentation); + /// stringWithUTF8String: + static NSString? stringWithUTF8String( + ffi.Pointer nullTerminatedCString, + ) { + final $ret = _objc_msgSend_56zxyn( + _class_NSString, + _sel_stringWithUTF8String_, + nullTerminatedCString, + ); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); } - /// getFileSystemRepresentation:maxLength: - bool getFileSystemRepresentation( - ffi.Pointer cname, { - required DartNSUInteger maxLength, + /// stringWithValidatedFormat:validFormatSpecifiers:error: + static NSString? stringWithValidatedFormat( + NSString format, { + required NSString validFormatSpecifiers, }) { - final _$$ref = object$.ref; - return _objc_msgSend_8cymbm( - _$$ref.pointer, - _sel_getFileSystemRepresentation_maxLength_, - cname, - maxLength, + final _$$ref$2 = format.ref; + final _$$ref$3 = validFormatSpecifiers.ref; + objc.checkOsVersionInternal( + 'NSString.stringWithValidatedFormat:validFormatSpecifiers:error:', + iOS: (false, (11, 0, 0)), + macOS: (false, (10, 13, 0)), ); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1pnyuds( + _class_NSString, + _sel_stringWithValidatedFormat_validFormatSpecifiers_error_, + _$$ref$2.pointer, + _$$ref$3.pointer, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); + } finally { + pkg_ffi.calloc.free($err); + } } - /// isAbsolutePath - bool get isAbsolutePath { - final _$$ref = object$.ref; - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isAbsolutePath); - } - - /// lastPathComponent - NSString get lastPathComponent { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_lastPathComponent); - return NSString.fromPointer($ret, retain: true, release: true); + /// supportsSecureCoding + static bool getSupportsSecureCoding() { + return _objc_msgSend_91o635(_class_NSString, _sel_supportsSecureCoding); } +} - /// pathComponents - NSArray get pathComponents { +extension NSString$Methods on NSString { + /// characterAtIndex: + int characterAtIndex(DartNSUInteger index) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_pathComponents); - return NSArray.fromPointer($ret, retain: true, release: true); + return _objc_msgSend_1deg8x(_$$ref.pointer, _sel_characterAtIndex_, index); } - /// pathExtension - NSString get pathExtension { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_pathExtension); - return NSString.fromPointer($ret, retain: true, release: true); + /// encodeWithCoder: + void encodeWithCoder(NSCoder coder) { + final _$$ref$32 = object$.ref; + final _$$ref$33 = coder.ref; + _objc_msgSend_xtuoz7( + _$$ref$32.pointer, + _sel_encodeWithCoder_, + _$$ref$33.pointer, + ); } - /// stringByAbbreviatingWithTildeInPath - NSString get stringByAbbreviatingWithTildeInPath { - final _$$ref = object$.ref; + /// init + NSString init() { + final _$$ref$41 = object$.ref; + objc.checkOsVersionInternal( + 'NSString.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_stringByAbbreviatingWithTildeInPath, + _$$ref$41.retainAndReturnPointer(), + _sel_init, ); - return NSString.fromPointer($ret, retain: true, release: true); + return NSString.fromPointer($ret, retain: false, release: true); } - /// stringByAppendingPathComponent: - NSString stringByAppendingPathComponent(NSString str) { - final _$$ref = object$.ref; - final _$$ref$1 = str.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_stringByAppendingPathComponent_, - _$$ref$1.pointer, + /// initWithBytes:length:encoding: + NSString? initWithBytes( + ffi.Pointer bytes, { + required DartNSUInteger length, + required DartNSUInteger encoding, + }) { + final _$$ref$1 = object$.ref; + final $ret = _objc_msgSend_9b3h4v( + _$$ref$1.retainAndReturnPointer(), + _sel_initWithBytes_length_encoding_, + bytes, + length, + encoding, ); - return NSString.fromPointer($ret, retain: true, release: true); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: false, release: true); } - /// stringByAppendingPathExtension: - NSString? stringByAppendingPathExtension(NSString str) { - final _$$ref = object$.ref; - final _$$ref$1 = str.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_stringByAppendingPathExtension_, - _$$ref$1.pointer, + /// initWithBytesNoCopy:length:encoding:deallocator: + NSString? initWithBytesNoCopy( + ffi.Pointer bytes, { + required DartNSUInteger length, + required DartNSUInteger encoding, + objc.ObjCBlock, ffi.UnsignedLong)>? + deallocator, + }) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = deallocator?.ref; + final $ret = _objc_msgSend_1lbgrac( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithBytesNoCopy_length_encoding_deallocator_, + bytes, + length, + encoding, + _$$ref$3?.pointer ?? ffi.nullptr, ); return $ret.address == 0 ? null - : NSString.fromPointer($ret, retain: true, release: true); + : NSString.fromPointer($ret, retain: false, release: true); } - /// stringByDeletingLastPathComponent - NSString get stringByDeletingLastPathComponent { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_stringByDeletingLastPathComponent, + /// initWithBytesNoCopy:length:encoding:freeWhenDone: + NSString? initWithBytesNoCopy$1( + ffi.Pointer bytes, { + required DartNSUInteger length, + required DartNSUInteger encoding, + required bool freeWhenDone, + }) { + final _$$ref$1 = object$.ref; + final $ret = _objc_msgSend_k4j8m3( + _$$ref$1.retainAndReturnPointer(), + _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_, + bytes, + length, + encoding, + freeWhenDone, ); - return NSString.fromPointer($ret, retain: true, release: true); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: false, release: true); } - /// stringByDeletingPathExtension - NSString get stringByDeletingPathExtension { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_stringByDeletingPathExtension, + /// initWithCString:encoding: + NSString? initWithCString( + ffi.Pointer nullTerminatedCString, { + required DartNSUInteger encoding, + }) { + final _$$ref$1 = object$.ref; + final $ret = _objc_msgSend_erqryg( + _$$ref$1.retainAndReturnPointer(), + _sel_initWithCString_encoding_, + nullTerminatedCString, + encoding, ); - return NSString.fromPointer($ret, retain: true, release: true); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: false, release: true); } - /// stringByExpandingTildeInPath - NSString get stringByExpandingTildeInPath { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_stringByExpandingTildeInPath, + /// initWithCharacters:length: + NSString initWithCharacters( + ffi.Pointer characters, { + required DartNSUInteger length, + }) { + final _$$ref$1 = object$.ref; + final $ret = _objc_msgSend_9x4k8x( + _$$ref$1.retainAndReturnPointer(), + _sel_initWithCharacters_length_, + characters, + length, ); - return NSString.fromPointer($ret, retain: true, release: true); + return NSString.fromPointer($ret, retain: false, release: true); } - /// stringByResolvingSymlinksInPath - NSString get stringByResolvingSymlinksInPath { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_stringByResolvingSymlinksInPath, + /// initWithCharactersNoCopy:length:deallocator: + NSString initWithCharactersNoCopy( + ffi.Pointer chars, { + required DartNSUInteger length, + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) + >? + deallocator, + }) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = deallocator?.ref; + final $ret = _objc_msgSend_talwei( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithCharactersNoCopy_length_deallocator_, + chars, + length, + _$$ref$3?.pointer ?? ffi.nullptr, ); - return NSString.fromPointer($ret, retain: true, release: true); + return NSString.fromPointer($ret, retain: false, release: true); } - /// stringByStandardizingPath - NSString get stringByStandardizingPath { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_stringByStandardizingPath, + /// initWithCharactersNoCopy:length:freeWhenDone: + NSString initWithCharactersNoCopy$1( + ffi.Pointer characters, { + required DartNSUInteger length, + required bool freeWhenDone, + }) { + final _$$ref$1 = object$.ref; + final $ret = _objc_msgSend_lh0jh5( + _$$ref$1.retainAndReturnPointer(), + _sel_initWithCharactersNoCopy_length_freeWhenDone_, + characters, + length, + freeWhenDone, ); - return NSString.fromPointer($ret, retain: true, release: true); + return NSString.fromPointer($ret, retain: false, release: true); } - /// stringsByAppendingPaths: - NSArray stringsByAppendingPaths(NSArray paths) { - final _$$ref = object$.ref; - final _$$ref$1 = paths.ref; + /// initWithCoder: + NSString? initWithCoder(NSCoder coder) { + final _$$ref$48 = object$.ref; + final _$$ref$49 = coder.ref; final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_stringsByAppendingPaths_, - _$$ref$1.pointer, + _$$ref$48.retainAndReturnPointer(), + _sel_initWithCoder_, + _$$ref$49.pointer, ); - return NSArray.fromPointer($ret, retain: true, release: true); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: false, release: true); } - /// pathWithComponents: - static NSString pathWithComponents(NSArray components) { - final _$$ref = components.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSString, - _sel_pathWithComponents_, - _$$ref.pointer, - ); - return NSString.fromPointer($ret, retain: true, release: true); + /// initWithContentsOfFile:encoding:error: + NSString? initWithContentsOfFile( + NSString path, { + required DartNSUInteger encoding, + }) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = path.ref; + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1nomli1( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithContentsOfFile_encoding_error_, + _$$ref$3.pointer, + encoding, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: false, release: true); + } finally { + pkg_ffi.calloc.free($err); + } } -} -/// NSThread -extension type NSThread._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject { - /// Constructs a [NSThread] that points to the same underlying object as [other]. - NSThread.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); + /// initWithContentsOfFile:usedEncoding:error: + NSString? initWithContentsOfFile$1( + NSString path, { + required ffi.Pointer usedEncoding, + }) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = path.ref; + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1alewu7( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithContentsOfFile_usedEncoding_error_, + _$$ref$3.pointer, + usedEncoding, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: false, release: true); + } finally { + pkg_ffi.calloc.free($err); + } } - /// Constructs a [NSThread] that wraps the given raw object pointer. - NSThread.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); + /// initWithContentsOfURL:encoding:error: + NSString? initWithContentsOfURL( + NSURL url, { + required DartNSUInteger encoding, + }) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = url.ref; + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1nomli1( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithContentsOfURL_encoding_error_, + _$$ref$3.pointer, + encoding, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: false, release: true); + } finally { + pkg_ffi.calloc.free($err); + } } - /// Returns whether [obj] is an instance of [NSThread]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSThread, - ); - - /// alloc - static NSThread alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_alloc); - return NSThread.fromPointer($ret, retain: false, release: true); + /// initWithContentsOfURL:usedEncoding:error: + NSString? initWithContentsOfURL$1( + NSURL url, { + required ffi.Pointer usedEncoding, + }) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = url.ref; + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1alewu7( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithContentsOfURL_usedEncoding_error_, + _$$ref$3.pointer, + usedEncoding, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: false, release: true); + } finally { + pkg_ffi.calloc.free($err); + } } - /// allocWithZone: - static NSThread allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSThread, - _sel_allocWithZone_, - zone, + /// initWithData:encoding: + NSString? initWithData(NSData data, {required DartNSUInteger encoding}) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = data.ref; + final $ret = _objc_msgSend_1k4kd9s( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithData_encoding_, + _$$ref$3.pointer, + encoding, ); - return NSThread.fromPointer($ret, retain: false, release: true); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: false, release: true); } - /// callStackReturnAddresses - static NSArray getCallStackReturnAddresses() { - objc.checkOsVersionInternal( - 'NSThread.callStackReturnAddresses', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _class_NSThread, - _sel_callStackReturnAddresses, + /// initWithFormat: + NSString initWithFormat(NSString format) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = format.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithFormat_, + _$$ref$3.pointer, ); - return NSArray.fromPointer($ret, retain: true, release: true); + return NSString.fromPointer($ret, retain: false, release: true); } - /// callStackSymbols - static NSArray getCallStackSymbols() { - objc.checkOsVersionInternal( - 'NSThread.callStackSymbols', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + /// initWithFormat:locale: + NSString initWithFormat$1(NSString format, {objc.ObjCObject? locale}) { + final _$$ref$3 = object$.ref; + final _$$ref$4 = format.ref; + final _$$ref$5 = locale?.ref; + final $ret = _objc_msgSend_15qeuct( + _$$ref$3.retainAndReturnPointer(), + _sel_initWithFormat_locale_, + _$$ref$4.pointer, + _$$ref$5?.pointer ?? ffi.nullptr, ); - final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_callStackSymbols); - return NSArray.fromPointer($ret, retain: true, release: true); - } - - /// currentThread - static NSThread getCurrentThread() { - final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_currentThread); - return NSThread.fromPointer($ret, retain: true, release: true); + return NSString.fromPointer($ret, retain: false, release: true); } - /// detachNewThreadSelector:toTarget:withObject: - static void detachNewThreadSelector( - ffi.Pointer selector, { - required objc.ObjCObject toTarget, - objc.ObjCObject? withObject, - }) { - final _$$ref = toTarget.ref; - final _$$ref$1 = withObject?.ref; - _objc_msgSend_lzbvjm( - _class_NSThread, - _sel_detachNewThreadSelector_toTarget_withObject_, - selector, - _$$ref.pointer, - _$$ref$1?.pointer ?? ffi.nullptr, + /// initWithString: + NSString initWithString(NSString aString) { + final _$$ref$2 = object$.ref; + final _$$ref$3 = aString.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref$2.retainAndReturnPointer(), + _sel_initWithString_, + _$$ref$3.pointer, ); + return NSString.fromPointer($ret, retain: false, release: true); } - /// detachNewThreadWithBlock: - static void detachNewThreadWithBlock( - objc.ObjCBlock block, - ) { - final _$$ref = block.ref; - objc.checkOsVersionInternal( - 'NSThread.detachNewThreadWithBlock:', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), - ); - _objc_msgSend_f167m6( - _class_NSThread, - _sel_detachNewThreadWithBlock_, - _$$ref.pointer, + /// initWithUTF8String: + NSString? initWithUTF8String(ffi.Pointer nullTerminatedCString) { + final _$$ref$1 = object$.ref; + final $ret = _objc_msgSend_56zxyn( + _$$ref$1.retainAndReturnPointer(), + _sel_initWithUTF8String_, + nullTerminatedCString, ); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: false, release: true); } - /// exit - static void exit() { - _objc_msgSend_1pl9qdv(_class_NSThread, _sel_exit); - } - - /// isMainThread - static bool getIsMainThread$1() { + /// initWithValidatedFormat:validFormatSpecifiers:error: + /// + /// iOS: introduced 16.0.0 + /// macOS: introduced 13.0.0 + NSString? initWithValidatedFormat( + NSString format, { + required NSString validFormatSpecifiers, + }) { + final _$$ref$3 = object$.ref; + final _$$ref$4 = format.ref; + final _$$ref$5 = validFormatSpecifiers.ref; objc.checkOsVersionInternal( - 'NSThread.isMainThread', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), + 'NSString.initWithValidatedFormat:validFormatSpecifiers:error:', + iOS: (false, (16, 0, 0)), + macOS: (false, (13, 0, 0)), ); - return _objc_msgSend_91o635(_class_NSThread, _sel_isMainThread); - } - - /// isMultiThreaded - static bool isMultiThreaded() { - return _objc_msgSend_91o635(_class_NSThread, _sel_isMultiThreaded); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1pnyuds( + _$$ref$3.retainAndReturnPointer(), + _sel_initWithValidatedFormat_validFormatSpecifiers_error_, + _$$ref$4.pointer, + _$$ref$5.pointer, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: false, release: true); + } finally { + pkg_ffi.calloc.free($err); + } } - /// mainThread - static NSThread getMainThread() { + /// initWithValidatedFormat:validFormatSpecifiers:locale:error: + /// + /// iOS: introduced 16.0.0 + /// macOS: introduced 13.0.0 + NSString? initWithValidatedFormat$1( + NSString format, { + required NSString validFormatSpecifiers, + objc.ObjCObject? locale, + }) { + final _$$ref$4 = object$.ref; + final _$$ref$5 = format.ref; + final _$$ref$6 = validFormatSpecifiers.ref; + final _$$ref$7 = locale?.ref; objc.checkOsVersionInternal( - 'NSThread.mainThread', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), + 'NSString.initWithValidatedFormat:validFormatSpecifiers:locale:error:', + iOS: (false, (16, 0, 0)), + macOS: (false, (13, 0, 0)), ); - final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_mainThread); - return NSThread.fromPointer($ret, retain: true, release: true); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1k0ezzm( + _$$ref$4.retainAndReturnPointer(), + _sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_, + _$$ref$5.pointer, + _$$ref$6.pointer, + _$$ref$7?.pointer ?? ffi.nullptr, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: false, release: true); + } finally { + pkg_ffi.calloc.free($err); + } } - /// new - static NSThread new$() { - final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_new); - return NSThread.fromPointer($ret, retain: false, release: true); + /// length + DartNSUInteger get length { + final _$$ref = object$.ref; + return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_length); } +} - /// setThreadPriority: - static bool setThreadPriority(double p) { - return _objc_msgSend_18chyc(_class_NSThread, _sel_setThreadPriority_, p); - } +sealed class NSStringCompareOptions { + static const NSCaseInsensitiveSearch = 1; + static const NSLiteralSearch = 2; + static const NSBackwardsSearch = 4; + static const NSAnchoredSearch = 8; + static const NSNumericSearch = 64; + static const NSDiacriticInsensitiveSearch = 128; + static const NSWidthInsensitiveSearch = 256; + static const NSForcedOrderingSearch = 512; + static const NSRegularExpressionSearch = 1024; +} - /// sleepForTimeInterval: - static void sleepForTimeInterval(double ti) { - _objc_msgSend_hwm8nu(_class_NSThread, _sel_sleepForTimeInterval_, ti); - } +sealed class NSStringEncodingConversionOptions { + static const NSStringEncodingConversionAllowLossy = 1; + static const NSStringEncodingConversionExternalRepresentation = 2; +} - /// sleepUntilDate: - static void sleepUntilDate(NSDate date) { - final _$$ref = date.ref; - _objc_msgSend_xtuoz7(_class_NSThread, _sel_sleepUntilDate_, _$$ref.pointer); - } +sealed class NSStringEnumerationOptions { + static const NSStringEnumerationByLines = 0; + static const NSStringEnumerationByParagraphs = 1; + static const NSStringEnumerationByComposedCharacterSequences = 2; + static const NSStringEnumerationByWords = 3; + static const NSStringEnumerationBySentences = 4; + static const NSStringEnumerationByCaretPositions = 5; + static const NSStringEnumerationByDeletionClusters = 6; + static const NSStringEnumerationReverse = 256; + static const NSStringEnumerationSubstringNotRequired = 512; + static const NSStringEnumerationLocalized = 1024; +} - /// threadPriority - static double threadPriority$1() { - return objc.useMsgSendVariants - ? _objc_msgSend_1ukqyt8Fpret(_class_NSThread, _sel_threadPriority) - : _objc_msgSend_1ukqyt8(_class_NSThread, _sel_threadPriority); +/// NSStringExtensionMethods +extension NSStringExtensionMethods on NSString { + /// UTF8String + ffi.Pointer get UTF8String { + final _$$ref = object$.ref; + return _objc_msgSend_1fuqfwb(_$$ref.pointer, _sel_UTF8String); } - /// Returns a new instance of NSThread constructed with the default `new` method. - NSThread() : this.as(new$().object$); -} - -extension NSThread$Methods on NSThread { - /// cancel - void cancel() { + /// boolValue + bool get boolValue { final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSThread.cancel', + 'NSString.boolValue', iOS: (false, (2, 0, 0)), macOS: (false, (10, 5, 0)), ); - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_cancel); + return _objc_msgSend_91o635(_$$ref.pointer, _sel_boolValue); } - /// init - NSThread init() { - final _$$ref$42 = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.init', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + /// cStringUsingEncoding: + ffi.Pointer cStringUsingEncoding(DartNSUInteger encoding) { + final _$$ref = object$.ref; + return _objc_msgSend_1jtxufi( + _$$ref.pointer, + _sel_cStringUsingEncoding_, + encoding, ); - final $ret = _objc_msgSend_151sglz( - _$$ref$42.retainAndReturnPointer(), - _sel_init, + } + + /// canBeConvertedToEncoding: + bool canBeConvertedToEncoding(DartNSUInteger encoding) { + final _$$ref = object$.ref; + return _objc_msgSend_6peh6o( + _$$ref.pointer, + _sel_canBeConvertedToEncoding_, + encoding, ); - return NSThread.fromPointer($ret, retain: false, release: true); } - /// initWithBlock: - NSThread initWithBlock(objc.ObjCBlock block) { + /// capitalizedString + NSString get capitalizedString { final _$$ref = object$.ref; - final _$$ref$1 = block.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_capitalizedString); + return NSString.fromPointer($ret, retain: true, release: true); + } + + /// capitalizedStringWithLocale: + NSString capitalizedStringWithLocale(NSLocale? locale) { + final _$$ref = object$.ref; + final _$$ref$1 = locale?.ref; objc.checkOsVersionInternal( - 'NSThread.initWithBlock:', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), + 'NSString.capitalizedStringWithLocale:', + iOS: (false, (6, 0, 0)), + macOS: (false, (10, 8, 0)), ); - final $ret = _objc_msgSend_nnxkei( - _$$ref.retainAndReturnPointer(), - _sel_initWithBlock_, + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_capitalizedStringWithLocale_, + _$$ref$1?.pointer ?? ffi.nullptr, + ); + return NSString.fromPointer($ret, retain: true, release: true); + } + + /// caseInsensitiveCompare: + NSComparisonResult caseInsensitiveCompare(NSString string) { + final _$$ref = object$.ref; + final _$$ref$1 = string.ref; + final $ret = _objc_msgSend_1ym6zyw( + _$$ref.pointer, + _sel_caseInsensitiveCompare_, _$$ref$1.pointer, ); - return NSThread.fromPointer($ret, retain: false, release: true); + return NSComparisonResult.fromValue($ret); } - /// initWithTarget:selector:object: - NSThread initWithTarget( - objc.ObjCObject target, { - required ffi.Pointer selector, - objc.ObjCObject? object, + /// commonPrefixWithString:options: + NSString commonPrefixWithString( + NSString str, { + required DartNSUInteger options, }) { final _$$ref = object$.ref; - final _$$ref$1 = target.ref; - final _$$ref$2 = object?.ref; - objc.checkOsVersionInternal( - 'NSThread.initWithTarget:selector:object:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - final $ret = _objc_msgSend_1eldwyi( - _$$ref.retainAndReturnPointer(), - _sel_initWithTarget_selector_object_, + final _$$ref$1 = str.ref; + final $ret = _objc_msgSend_diypgk( + _$$ref.pointer, + _sel_commonPrefixWithString_options_, _$$ref$1.pointer, - selector, - _$$ref$2?.pointer ?? ffi.nullptr, + options, ); - return NSThread.fromPointer($ret, retain: false, release: true); + return NSString.fromPointer($ret, retain: true, release: true); } - /// isCancelled - bool get isCancelled { + /// compare: + NSComparisonResult compare(NSString string) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.isCancelled', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), + final _$$ref$1 = string.ref; + final $ret = _objc_msgSend_1ym6zyw( + _$$ref.pointer, + _sel_compare_, + _$$ref$1.pointer, ); - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isCancelled); + return NSComparisonResult.fromValue($ret); } - /// isExecuting - bool get isExecuting { + /// compare:options: + NSComparisonResult compare$1( + NSString string, { + required DartNSUInteger options, + }) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.isExecuting', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), + final _$$ref$1 = string.ref; + final $ret = _objc_msgSend_pg1fnv( + _$$ref.pointer, + _sel_compare_options_, + _$$ref$1.pointer, + options, ); - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isExecuting); + return NSComparisonResult.fromValue($ret); } - /// isFinished - bool get isFinished { + /// compare:options:range: + NSComparisonResult compare$2( + NSString string, { + required DartNSUInteger options, + required NSRange range, + }) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.isFinished', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), + final _$$ref$1 = string.ref; + final $ret = _objc_msgSend_xrqic1( + _$$ref.pointer, + _sel_compare_options_range_, + _$$ref$1.pointer, + options, + range, ); - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isFinished); + return NSComparisonResult.fromValue($ret); } - /// isMainThread - bool get isMainThread { + /// compare:options:range:locale: + NSComparisonResult compare$3( + NSString string, { + required DartNSUInteger options, + required NSRange range, + objc.ObjCObject? locale, + }) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.isMainThread', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), + final _$$ref$1 = string.ref; + final _$$ref$2 = locale?.ref; + final $ret = _objc_msgSend_1895u4n( + _$$ref.pointer, + _sel_compare_options_range_locale_, + _$$ref$1.pointer, + options, + range, + _$$ref$2?.pointer ?? ffi.nullptr, ); - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isMainThread); + return NSComparisonResult.fromValue($ret); } - /// main - void main() { + /// componentsSeparatedByCharactersInSet: + NSArray componentsSeparatedByCharactersInSet(NSCharacterSet separator) { final _$$ref = object$.ref; + final _$$ref$1 = separator.ref; objc.checkOsVersionInternal( - 'NSThread.main', + 'NSString.componentsSeparatedByCharactersInSet:', iOS: (false, (2, 0, 0)), macOS: (false, (10, 5, 0)), ); - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_main); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_componentsSeparatedByCharactersInSet_, + _$$ref$1.pointer, + ); + return NSArray.fromPointer($ret, retain: true, release: true); } - /// name - NSString? get name { + /// componentsSeparatedByString: + NSArray componentsSeparatedByString(NSString separator) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.name', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), + final _$$ref$1 = separator.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_componentsSeparatedByString_, + _$$ref$1.pointer, ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_name); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); + return NSArray.fromPointer($ret, retain: true, release: true); } - /// qualityOfService - NSQualityOfService get qualityOfService { + /// containsString: + bool containsString(NSString str) { final _$$ref = object$.ref; + final _$$ref$1 = str.ref; objc.checkOsVersionInternal( - 'NSThread.qualityOfService', + 'NSString.containsString:', iOS: (false, (8, 0, 0)), macOS: (false, (10, 10, 0)), ); - final $ret = _objc_msgSend_oi8iq9(_$$ref.pointer, _sel_qualityOfService); - return NSQualityOfService.fromValue($ret); + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_containsString_, + _$$ref$1.pointer, + ); } - /// setName: - set name(NSString? value) { + /// dataUsingEncoding: + NSData? dataUsingEncoding(DartNSUInteger encoding) { final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; - objc.checkOsVersionInternal( - 'NSThread.setName:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - _objc_msgSend_xtuoz7( + final $ret = _objc_msgSend_14hpxwa( _$$ref.pointer, - _sel_setName_, - _$$ref$1?.pointer ?? ffi.nullptr, + _sel_dataUsingEncoding_, + encoding, ); + return $ret.address == 0 + ? null + : NSData.fromPointer($ret, retain: true, release: true); } - /// setQualityOfService: - set qualityOfService(NSQualityOfService value) { + /// dataUsingEncoding:allowLossyConversion: + NSData? dataUsingEncoding$1( + DartNSUInteger encoding, { + required bool allowLossyConversion, + }) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.setQualityOfService:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), - ); - _objc_msgSend_n2da1l( + final $ret = _objc_msgSend_hiwitm( _$$ref.pointer, - _sel_setQualityOfService_, - value.value, + _sel_dataUsingEncoding_allowLossyConversion_, + encoding, + allowLossyConversion, ); + return $ret.address == 0 + ? null + : NSData.fromPointer($ret, retain: true, release: true); } - /// setStackSize: - set stackSize(DartNSUInteger value) { + /// decomposedStringWithCanonicalMapping + NSString get decomposedStringWithCanonicalMapping { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.setStackSize:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_decomposedStringWithCanonicalMapping, ); - _objc_msgSend_1i9r4xy(_$$ref.pointer, _sel_setStackSize_, value); + return NSString.fromPointer($ret, retain: true, release: true); } - /// setThreadPriority: - set threadPriority(double value) { + /// decomposedStringWithCompatibilityMapping + NSString get decomposedStringWithCompatibilityMapping { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.setThreadPriority:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_decomposedStringWithCompatibilityMapping, ); - _objc_msgSend_hwm8nu(_$$ref.pointer, _sel_setThreadPriority_, value); + return NSString.fromPointer($ret, retain: true, release: true); } - /// stackSize - DartNSUInteger get stackSize { + /// description + NSString get description$1 { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.stackSize', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_stackSize); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_description); + return NSString.fromPointer($ret, retain: true, release: true); } - /// start - void start() { + /// doubleValue + double get doubleValue { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.start', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_start); + return objc.useMsgSendVariants + ? _objc_msgSend_1ukqyt8Fpret(_$$ref.pointer, _sel_doubleValue) + : _objc_msgSend_1ukqyt8(_$$ref.pointer, _sel_doubleValue); } - /// threadDictionary - NSMutableDictionary get threadDictionary { + /// enumerateLinesUsingBlock: + void enumerateLinesUsingBlock( + objc.ObjCBlock)> block, + ) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_threadDictionary); - return NSMutableDictionary.fromPointer($ret, retain: true, release: true); + final _$$ref$1 = block.ref; + objc.checkOsVersionInternal( + 'NSString.enumerateLinesUsingBlock:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + _objc_msgSend_f167m6( + _$$ref.pointer, + _sel_enumerateLinesUsingBlock_, + _$$ref$1.pointer, + ); } - /// threadPriority - double get threadPriority { + /// enumerateSubstringsInRange:options:usingBlock: + void enumerateSubstringsInRange( + NSRange range, { + required DartNSUInteger options, + required objc.ObjCBlock< + ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) + > + usingBlock, + }) { final _$$ref = object$.ref; + final _$$ref$1 = usingBlock.ref; objc.checkOsVersionInternal( - 'NSThread.threadPriority', + 'NSString.enumerateSubstringsInRange:options:usingBlock:', iOS: (false, (4, 0, 0)), macOS: (false, (10, 6, 0)), ); + _objc_msgSend_14ew8zr( + _$$ref.pointer, + _sel_enumerateSubstringsInRange_options_usingBlock_, + range, + options, + _$$ref$1.pointer, + ); + } + + /// fastestEncoding + DartNSUInteger get fastestEncoding { + final _$$ref = object$.ref; + return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_fastestEncoding); + } + + /// floatValue + double get floatValue { + final _$$ref = object$.ref; return objc.useMsgSendVariants - ? _objc_msgSend_1ukqyt8Fpret(_$$ref.pointer, _sel_threadPriority) - : _objc_msgSend_1ukqyt8(_$$ref.pointer, _sel_threadPriority); + ? _objc_msgSend_2cgrxlFpret(_$$ref.pointer, _sel_floatValue) + : _objc_msgSend_2cgrxl(_$$ref.pointer, _sel_floatValue); } -} -/// NSThreadPerformAdditions -extension NSThreadPerformAdditions on NSObject { - /// performSelector:onThread:withObject:waitUntilDone: - void performSelector$3( - ffi.Pointer aSelector, { - required NSThread onThread, - objc.ObjCObject? withObject, - required bool waitUntilDone, + /// getBytes:maxLength:usedLength:encoding:options:range:remainingRange: + bool getBytes( + ffi.Pointer buffer, { + required DartNSUInteger maxLength, + required ffi.Pointer usedLength, + required DartNSUInteger encoding, + required DartNSUInteger options, + required NSRange range, + required ffi.Pointer remainingRange, }) { final _$$ref = object$.ref; - final _$$ref$1 = onThread.ref; - final _$$ref$2 = withObject?.ref; - objc.checkOsVersionInternal( - 'NSObject.performSelector:onThread:withObject:waitUntilDone:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - _objc_msgSend_1whyima( + return _objc_msgSend_i30zh3( _$$ref.pointer, - _sel_performSelector_onThread_withObject_waitUntilDone_, - aSelector, - _$$ref$1.pointer, - _$$ref$2?.pointer ?? ffi.nullptr, - waitUntilDone, + _sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_, + buffer, + maxLength, + usedLength, + encoding, + options, + range, + remainingRange, ); } - /// performSelector:onThread:withObject:waitUntilDone:modes: - void performSelector$4( - ffi.Pointer aSelector, { - required NSThread onThread, - objc.ObjCObject? withObject, - required bool waitUntilDone, - NSArray? modes, + /// getCString:maxLength:encoding: + bool getCString( + ffi.Pointer buffer, { + required DartNSUInteger maxLength, + required DartNSUInteger encoding, }) { final _$$ref = object$.ref; - final _$$ref$1 = onThread.ref; - final _$$ref$2 = withObject?.ref; - final _$$ref$3 = modes?.ref; - objc.checkOsVersionInternal( - 'NSObject.performSelector:onThread:withObject:waitUntilDone:modes:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - _objc_msgSend_1cc1buo( + return _objc_msgSend_1lv8yz3( _$$ref.pointer, - _sel_performSelector_onThread_withObject_waitUntilDone_modes_, - aSelector, - _$$ref$1.pointer, - _$$ref$2?.pointer ?? ffi.nullptr, - waitUntilDone, - _$$ref$3?.pointer ?? ffi.nullptr, + _sel_getCString_maxLength_encoding_, + buffer, + maxLength, + encoding, ); } - /// performSelectorInBackground:withObject: - void performSelectorInBackground( - ffi.Pointer aSelector, { - objc.ObjCObject? withObject, + /// getCharacters:range: + void getCharacters( + ffi.Pointer buffer, { + required NSRange range, }) { final _$$ref = object$.ref; - final _$$ref$1 = withObject?.ref; - objc.checkOsVersionInternal( - 'NSObject.performSelectorInBackground:withObject:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - _objc_msgSend_1qv0eq4( + _objc_msgSend_898fog( _$$ref.pointer, - _sel_performSelectorInBackground_withObject_, - aSelector, - _$$ref$1?.pointer ?? ffi.nullptr, + _sel_getCharacters_range_, + buffer, + range, ); } - /// performSelectorOnMainThread:withObject:waitUntilDone: - void performSelectorOnMainThread( - ffi.Pointer aSelector, { - objc.ObjCObject? withObject, - required bool waitUntilDone, + /// getLineStart:end:contentsEnd:forRange: + void getLineStart( + ffi.Pointer startPtr, { + required ffi.Pointer end, + required ffi.Pointer contentsEnd, + required NSRange forRange, }) { final _$$ref = object$.ref; - final _$$ref$1 = withObject?.ref; - objc.checkOsVersionInternal( - 'NSObject.performSelectorOnMainThread:withObject:waitUntilDone:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_tsocn4( + _objc_msgSend_ourvf2( _$$ref.pointer, - _sel_performSelectorOnMainThread_withObject_waitUntilDone_, - aSelector, - _$$ref$1?.pointer ?? ffi.nullptr, - waitUntilDone, + _sel_getLineStart_end_contentsEnd_forRange_, + startPtr, + end, + contentsEnd, + forRange, ); } - /// performSelectorOnMainThread:withObject:waitUntilDone:modes: - void performSelectorOnMainThread$1( - ffi.Pointer aSelector, { - objc.ObjCObject? withObject, - required bool waitUntilDone, - NSArray? modes, + /// getParagraphStart:end:contentsEnd:forRange: + void getParagraphStart( + ffi.Pointer startPtr, { + required ffi.Pointer end, + required ffi.Pointer contentsEnd, + required NSRange forRange, }) { final _$$ref = object$.ref; - final _$$ref$1 = withObject?.ref; - final _$$ref$2 = modes?.ref; - objc.checkOsVersionInternal( - 'NSObject.performSelectorOnMainThread:withObject:waitUntilDone:modes:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_1fdou4m( + _objc_msgSend_ourvf2( _$$ref.pointer, - _sel_performSelectorOnMainThread_withObject_waitUntilDone_modes_, - aSelector, - _$$ref$1?.pointer ?? ffi.nullptr, - waitUntilDone, - _$$ref$2?.pointer ?? ffi.nullptr, + _sel_getParagraphStart_end_contentsEnd_forRange_, + startPtr, + end, + contentsEnd, + forRange, ); } -} - -/// NSTimeZone -/// -/// NSTimeZone -extension type NSTimeZone._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject, NSCopying, NSSecureCoding { - /// Constructs a [NSTimeZone] that points to the same underlying object as [other]. - NSTimeZone.as(objc.ObjCObject other) : object$ = other {} - - /// Constructs a [NSTimeZone] that wraps the given raw object pointer. - NSTimeZone.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) {} -} - -/// NSTimer -extension type NSTimer._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject { - /// Constructs a [NSTimer] that points to the same underlying object as [other]. - NSTimer.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); - } - - /// Constructs a [NSTimer] that wraps the given raw object pointer. - NSTimer.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); - } - - /// Returns whether [obj] is an instance of [NSTimer]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSTimer, - ); - /// alloc - static NSTimer alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSTimer, _sel_alloc); - return NSTimer.fromPointer($ret, retain: false, release: true); + /// hasPrefix: + bool hasPrefix(NSString str) { + final _$$ref = object$.ref; + final _$$ref$1 = str.ref; + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_hasPrefix_, + _$$ref$1.pointer, + ); } - /// allocWithZone: - static NSTimer allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSTimer, - _sel_allocWithZone_, - zone, + /// hasSuffix: + bool hasSuffix(NSString str) { + final _$$ref = object$.ref; + final _$$ref$1 = str.ref; + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_hasSuffix_, + _$$ref$1.pointer, ); - return NSTimer.fromPointer($ret, retain: false, release: true); } - /// new - static NSTimer new$() { - final $ret = _objc_msgSend_151sglz(_class_NSTimer, _sel_new); - return NSTimer.fromPointer($ret, retain: false, release: true); + /// hash + DartNSUInteger get hash$1 { + final _$$ref = object$.ref; + return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_hash); } - /// scheduledTimerWithTimeInterval:invocation:repeats: - static NSTimer scheduledTimerWithTimeInterval( - double ti, { - required NSInvocation invocation, - required bool repeats, - }) { - final _$$ref = invocation.ref; - final $ret = _objc_msgSend_r49ehc( - _class_NSTimer, - _sel_scheduledTimerWithTimeInterval_invocation_repeats_, - ti, - _$$ref.pointer, - repeats, - ); - return NSTimer.fromPointer($ret, retain: true, release: true); + /// intValue + int get intValue { + final _$$ref = object$.ref; + return _objc_msgSend_13yqbb6(_$$ref.pointer, _sel_intValue); } - /// scheduledTimerWithTimeInterval:repeats:block: - static NSTimer scheduledTimerWithTimeInterval$1( - double interval, { - required bool repeats, - required objc.ObjCBlock block, - }) { - final _$$ref = block.ref; + /// integerValue + int get integerValue { + final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSTimer.scheduledTimerWithTimeInterval:repeats:block:', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), + 'NSString.integerValue', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), ); - final $ret = _objc_msgSend_9a64f1( - _class_NSTimer, - _sel_scheduledTimerWithTimeInterval_repeats_block_, - interval, - repeats, + return _objc_msgSend_1hz7y9r(_$$ref.pointer, _sel_integerValue); + } + + /// isEqualToString: + bool isEqualToString(NSString aString) { + final _$$ref = object$.ref; + final _$$ref$1 = aString.ref; + return _objc_msgSend_19nvye5( _$$ref.pointer, + _sel_isEqualToString_, + _$$ref$1.pointer, ); - return NSTimer.fromPointer($ret, retain: true, release: true); } - /// scheduledTimerWithTimeInterval:target:selector:userInfo:repeats: - static NSTimer scheduledTimerWithTimeInterval$2( - double ti, { - required objc.ObjCObject target, - required ffi.Pointer selector, - objc.ObjCObject? userInfo, - required bool repeats, - }) { - final _$$ref = target.ref; - final _$$ref$1 = userInfo?.ref; - final $ret = _objc_msgSend_ot6jdx( - _class_NSTimer, - _sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_, - ti, + /// lengthOfBytesUsingEncoding: + DartNSUInteger lengthOfBytesUsingEncoding(DartNSUInteger enc) { + final _$$ref = object$.ref; + return _objc_msgSend_12py2ux( _$$ref.pointer, - selector, - _$$ref$1?.pointer ?? ffi.nullptr, - repeats, + _sel_lengthOfBytesUsingEncoding_, + enc, ); - return NSTimer.fromPointer($ret, retain: true, release: true); } - /// timerWithTimeInterval:invocation:repeats: - static NSTimer timerWithTimeInterval( - double ti, { - required NSInvocation invocation, - required bool repeats, - }) { - final _$$ref = invocation.ref; - final $ret = _objc_msgSend_r49ehc( - _class_NSTimer, - _sel_timerWithTimeInterval_invocation_repeats_, - ti, - _$$ref.pointer, - repeats, + /// lineRangeForRange: + NSRange lineRangeForRange(NSRange range) { + final _$$ref = object$.ref; + final $ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_uimyc7Stret( + $ptr, + _$$ref.pointer, + _sel_lineRangeForRange_, + range, + ) + : $ptr.ref = _objc_msgSend_uimyc7( + _$$ref.pointer, + _sel_lineRangeForRange_, + range, + ); + final $finalizable = $ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree, ); - return NSTimer.fromPointer($ret, retain: true, release: true); + return ffi.Struct.create($finalizable); } - /// timerWithTimeInterval:repeats:block: - static NSTimer timerWithTimeInterval$1( - double interval, { - required bool repeats, - required objc.ObjCBlock block, - }) { - final _$$ref = block.ref; + /// localizedCapitalizedString + NSString get localizedCapitalizedString { + final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSTimer.timerWithTimeInterval:repeats:block:', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), + 'NSString.localizedCapitalizedString', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), ); - final $ret = _objc_msgSend_9a64f1( - _class_NSTimer, - _sel_timerWithTimeInterval_repeats_block_, - interval, - repeats, + final $ret = _objc_msgSend_151sglz( _$$ref.pointer, + _sel_localizedCapitalizedString, ); - return NSTimer.fromPointer($ret, retain: true, release: true); + return NSString.fromPointer($ret, retain: true, release: true); } - /// timerWithTimeInterval:target:selector:userInfo:repeats: - static NSTimer timerWithTimeInterval$2( - double ti, { - required objc.ObjCObject target, - required ffi.Pointer selector, - objc.ObjCObject? userInfo, - required bool repeats, - }) { - final _$$ref = target.ref; - final _$$ref$1 = userInfo?.ref; - final $ret = _objc_msgSend_ot6jdx( - _class_NSTimer, - _sel_timerWithTimeInterval_target_selector_userInfo_repeats_, - ti, + /// localizedCaseInsensitiveCompare: + NSComparisonResult localizedCaseInsensitiveCompare(NSString string) { + final _$$ref = object$.ref; + final _$$ref$1 = string.ref; + final $ret = _objc_msgSend_1ym6zyw( _$$ref.pointer, - selector, - _$$ref$1?.pointer ?? ffi.nullptr, - repeats, + _sel_localizedCaseInsensitiveCompare_, + _$$ref$1.pointer, ); - return NSTimer.fromPointer($ret, retain: true, release: true); + return NSComparisonResult.fromValue($ret); } - /// Returns a new instance of NSTimer constructed with the default `new` method. - NSTimer() : this.as(new$().object$); -} - -extension NSTimer$Methods on NSTimer { - /// fire - void fire() { + /// localizedCaseInsensitiveContainsString: + bool localizedCaseInsensitiveContainsString(NSString str) { final _$$ref = object$.ref; - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_fire); + final _$$ref$1 = str.ref; + objc.checkOsVersionInternal( + 'NSString.localizedCaseInsensitiveContainsString:', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_localizedCaseInsensitiveContainsString_, + _$$ref$1.pointer, + ); } - /// fireDate - NSDate get fireDate { + /// localizedCompare: + NSComparisonResult localizedCompare(NSString string) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_fireDate); - return NSDate.fromPointer($ret, retain: true, release: true); + final _$$ref$1 = string.ref; + final $ret = _objc_msgSend_1ym6zyw( + _$$ref.pointer, + _sel_localizedCompare_, + _$$ref$1.pointer, + ); + return NSComparisonResult.fromValue($ret); } - /// init - NSTimer init() { - final _$$ref$43 = object$.ref; + /// localizedLowercaseString + NSString get localizedLowercaseString { + final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSTimer.init', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSString.localizedLowercaseString', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), ); final $ret = _objc_msgSend_151sglz( - _$$ref$43.retainAndReturnPointer(), - _sel_init, + _$$ref.pointer, + _sel_localizedLowercaseString, ); - return NSTimer.fromPointer($ret, retain: false, release: true); + return NSString.fromPointer($ret, retain: true, release: true); } - /// initWithFireDate:interval:repeats:block: - NSTimer initWithFireDate( - NSDate date, { - required double interval, - required bool repeats, - required objc.ObjCBlock block, - }) { + /// localizedStandardCompare: + NSComparisonResult localizedStandardCompare(NSString string) { final _$$ref = object$.ref; - final _$$ref$1 = date.ref; - final _$$ref$2 = block.ref; + final _$$ref$1 = string.ref; objc.checkOsVersionInternal( - 'NSTimer.initWithFireDate:interval:repeats:block:', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), + 'NSString.localizedStandardCompare:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - final $ret = _objc_msgSend_1s0rfm3( - _$$ref.retainAndReturnPointer(), - _sel_initWithFireDate_interval_repeats_block_, + final $ret = _objc_msgSend_1ym6zyw( + _$$ref.pointer, + _sel_localizedStandardCompare_, _$$ref$1.pointer, - interval, - repeats, - _$$ref$2.pointer, ); - return NSTimer.fromPointer($ret, retain: false, release: true); + return NSComparisonResult.fromValue($ret); } - /// initWithFireDate:interval:target:selector:userInfo:repeats: - NSTimer initWithFireDate$1( - NSDate date, { - required double interval, - required objc.ObjCObject target, - required ffi.Pointer selector, - objc.ObjCObject? userInfo, - required bool repeats, - }) { + /// localizedStandardContainsString: + bool localizedStandardContainsString(NSString str) { final _$$ref = object$.ref; - final _$$ref$1 = date.ref; - final _$$ref$2 = target.ref; - final _$$ref$3 = userInfo?.ref; - final $ret = _objc_msgSend_14wwtbv( - _$$ref.retainAndReturnPointer(), - _sel_initWithFireDate_interval_target_selector_userInfo_repeats_, + final _$$ref$1 = str.ref; + objc.checkOsVersionInternal( + 'NSString.localizedStandardContainsString:', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), + ); + return _objc_msgSend_19nvye5( + _$$ref.pointer, + _sel_localizedStandardContainsString_, _$$ref$1.pointer, - interval, - _$$ref$2.pointer, - selector, - _$$ref$3?.pointer ?? ffi.nullptr, - repeats, ); - return NSTimer.fromPointer($ret, retain: false, release: true); - } - - /// invalidate - void invalidate() { - final _$$ref = object$.ref; - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_invalidate); } - /// isValid - bool get isValid { + /// localizedStandardRangeOfString: + NSRange localizedStandardRangeOfString(NSString str) { final _$$ref = object$.ref; - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isValid); + final _$$ref$1 = str.ref; + objc.checkOsVersionInternal( + 'NSString.localizedStandardRangeOfString:', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), + ); + final $ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_182fzonStret( + $ptr, + _$$ref.pointer, + _sel_localizedStandardRangeOfString_, + _$$ref$1.pointer, + ) + : $ptr.ref = _objc_msgSend_182fzon( + _$$ref.pointer, + _sel_localizedStandardRangeOfString_, + _$$ref$1.pointer, + ); + final $finalizable = $ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree, + ); + return ffi.Struct.create($finalizable); } - /// setFireDate: - set fireDate(NSDate value) { + /// localizedUppercaseString + NSString get localizedUppercaseString { final _$$ref = object$.ref; - final _$$ref$1 = value.ref; - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_setFireDate_, _$$ref$1.pointer); + objc.checkOsVersionInternal( + 'NSString.localizedUppercaseString', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_localizedUppercaseString, + ); + return NSString.fromPointer($ret, retain: true, release: true); } - - /// setTolerance: - set tolerance(double value) { + + /// longLongValue + int get longLongValue { final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSTimer.setTolerance:', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), + 'NSString.longLongValue', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), ); - _objc_msgSend_hwm8nu(_$$ref.pointer, _sel_setTolerance_, value); + return _objc_msgSend_1k101e3(_$$ref.pointer, _sel_longLongValue); } - /// timeInterval - double get timeInterval { + /// lowercaseString + NSString get lowercaseString { final _$$ref = object$.ref; - return objc.useMsgSendVariants - ? _objc_msgSend_1ukqyt8Fpret(_$$ref.pointer, _sel_timeInterval) - : _objc_msgSend_1ukqyt8(_$$ref.pointer, _sel_timeInterval); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_lowercaseString); + return NSString.fromPointer($ret, retain: true, release: true); } - /// tolerance - double get tolerance { + /// lowercaseStringWithLocale: + NSString lowercaseStringWithLocale(NSLocale? locale) { final _$$ref = object$.ref; + final _$$ref$1 = locale?.ref; objc.checkOsVersionInternal( - 'NSTimer.tolerance', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), + 'NSString.lowercaseStringWithLocale:', + iOS: (false, (6, 0, 0)), + macOS: (false, (10, 8, 0)), ); - return objc.useMsgSendVariants - ? _objc_msgSend_1ukqyt8Fpret(_$$ref.pointer, _sel_tolerance) - : _objc_msgSend_1ukqyt8(_$$ref.pointer, _sel_tolerance); + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_lowercaseStringWithLocale_, + _$$ref$1?.pointer ?? ffi.nullptr, + ); + return NSString.fromPointer($ret, retain: true, release: true); } - /// userInfo - objc.ObjCObject? get userInfo { + /// maximumLengthOfBytesUsingEncoding: + DartNSUInteger maximumLengthOfBytesUsingEncoding(DartNSUInteger enc) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_userInfo); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); + return _objc_msgSend_12py2ux( + _$$ref.pointer, + _sel_maximumLengthOfBytesUsingEncoding_, + enc, + ); } -} -/// NSTypedstreamCompatibility -extension NSTypedstreamCompatibility on NSCoder { - /// decodeNXObject - @Deprecated('Not supported') - objc.ObjCObject? decodeNXObject() { + /// paragraphRangeForRange: + NSRange paragraphRangeForRange(NSRange range) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSCoder.decodeNXObject', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + final $ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_uimyc7Stret( + $ptr, + _$$ref.pointer, + _sel_paragraphRangeForRange_, + range, + ) + : $ptr.ref = _objc_msgSend_uimyc7( + _$$ref.pointer, + _sel_paragraphRangeForRange_, + range, + ); + final $finalizable = $ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree, ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_decodeNXObject); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); + return ffi.Struct.create($finalizable); } - /// encodeNXObject: - @Deprecated('Not supported') - void encodeNXObject(objc.ObjCObject object) { + /// precomposedStringWithCanonicalMapping + NSString get precomposedStringWithCanonicalMapping { final _$$ref = object$.ref; - final _$$ref$1 = object.ref; - objc.checkOsVersionInternal( - 'NSCoder.encodeNXObject:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_xtuoz7( + final $ret = _objc_msgSend_151sglz( _$$ref.pointer, - _sel_encodeNXObject_, - _$$ref$1.pointer, + _sel_precomposedStringWithCanonicalMapping, ); + return NSString.fromPointer($ret, retain: true, release: true); } -} -typedef NSUInteger = ffi.UnsignedLong; -typedef DartNSUInteger = int; - -/// NSURL -extension type NSURL._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject, NSSecureCoding, NSCopying { - /// Constructs a [NSURL] that points to the same underlying object as [other]. - NSURL.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); + /// precomposedStringWithCompatibilityMapping + NSString get precomposedStringWithCompatibilityMapping { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz( + _$$ref.pointer, + _sel_precomposedStringWithCompatibilityMapping, + ); + return NSString.fromPointer($ret, retain: true, release: true); } - /// Constructs a [NSURL] that wraps the given raw object pointer. - NSURL.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); + /// rangeOfCharacterFromSet: + NSRange rangeOfCharacterFromSet(NSCharacterSet searchSet) { + final _$$ref = object$.ref; + final _$$ref$1 = searchSet.ref; + final $ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_182fzonStret( + $ptr, + _$$ref.pointer, + _sel_rangeOfCharacterFromSet_, + _$$ref$1.pointer, + ) + : $ptr.ref = _objc_msgSend_182fzon( + _$$ref.pointer, + _sel_rangeOfCharacterFromSet_, + _$$ref$1.pointer, + ); + final $finalizable = $ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree, + ); + return ffi.Struct.create($finalizable); } - /// Returns whether [obj] is an instance of [NSURL]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSURL, - ); - - /// URLByResolvingAliasFileAtURL:options:error: - static NSURL? URLByResolvingAliasFileAtURL( - NSURL url, { + /// rangeOfCharacterFromSet:options: + NSRange rangeOfCharacterFromSet$1( + NSCharacterSet searchSet, { required DartNSUInteger options, }) { - final _$$ref = url.ref; - objc.checkOsVersionInternal( - 'NSURL.URLByResolvingAliasFileAtURL:options:error:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), + final _$$ref = object$.ref; + final _$$ref$1 = searchSet.ref; + final $ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_102xxo4Stret( + $ptr, + _$$ref.pointer, + _sel_rangeOfCharacterFromSet_options_, + _$$ref$1.pointer, + options, + ) + : $ptr.ref = _objc_msgSend_102xxo4( + _$$ref.pointer, + _sel_rangeOfCharacterFromSet_options_, + _$$ref$1.pointer, + options, + ); + final $finalizable = $ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree, ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1tiux5i( - _class_NSURL, - _sel_URLByResolvingAliasFileAtURL_options_error_, - _$$ref.pointer, - options, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSURL.fromPointer($ret, retain: true, release: true); - } finally { - pkg_ffi.calloc.free($err); - } + return ffi.Struct.create($finalizable); } - /// URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error: - static NSURL? URLByResolvingBookmarkData( - NSData bookmarkData, { + /// rangeOfCharacterFromSet:options:range: + NSRange rangeOfCharacterFromSet$2( + NSCharacterSet searchSet, { required DartNSUInteger options, - NSURL? relativeToURL, - required ffi.Pointer bookmarkDataIsStale, + required NSRange range, }) { - final _$$ref = bookmarkData.ref; - final _$$ref$1 = relativeToURL?.ref; - objc.checkOsVersionInternal( - 'NSURL.URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1ceswyu( - _class_NSURL, - _sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_, - _$$ref.pointer, - options, - _$$ref$1?.pointer ?? ffi.nullptr, - bookmarkDataIsStale, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSURL.fromPointer($ret, retain: true, release: true); - } finally { - pkg_ffi.calloc.free($err); - } - } - - /// URLWithDataRepresentation:relativeToURL: - static NSURL URLWithDataRepresentation(NSData data, {NSURL? relativeToURL}) { - final _$$ref = data.ref; - final _$$ref$1 = relativeToURL?.ref; - objc.checkOsVersionInternal( - 'NSURL.URLWithDataRepresentation:relativeToURL:', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), - ); - final $ret = _objc_msgSend_15qeuct( - _class_NSURL, - _sel_URLWithDataRepresentation_relativeToURL_, - _$$ref.pointer, - _$$ref$1?.pointer ?? ffi.nullptr, + final _$$ref = object$.ref; + final _$$ref$1 = searchSet.ref; + final $ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_1nmlvqcStret( + $ptr, + _$$ref.pointer, + _sel_rangeOfCharacterFromSet_options_range_, + _$$ref$1.pointer, + options, + range, + ) + : $ptr.ref = _objc_msgSend_1nmlvqc( + _$$ref.pointer, + _sel_rangeOfCharacterFromSet_options_range_, + _$$ref$1.pointer, + options, + range, + ); + final $finalizable = $ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree, ); - return NSURL.fromPointer($ret, retain: true, release: true); + return ffi.Struct.create($finalizable); } - /// URLWithString: - static NSURL? URLWithString(NSString URLString) { - final _$$ref = URLString.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSURL, - _sel_URLWithString_, - _$$ref.pointer, + /// rangeOfComposedCharacterSequenceAtIndex: + NSRange rangeOfComposedCharacterSequenceAtIndex(DartNSUInteger index) { + final _$$ref = object$.ref; + final $ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_d3i1uyStret( + $ptr, + _$$ref.pointer, + _sel_rangeOfComposedCharacterSequenceAtIndex_, + index, + ) + : $ptr.ref = _objc_msgSend_d3i1uy( + _$$ref.pointer, + _sel_rangeOfComposedCharacterSequenceAtIndex_, + index, + ); + final $finalizable = $ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree, ); - return $ret.address == 0 - ? null - : NSURL.fromPointer($ret, retain: true, release: true); + return ffi.Struct.create($finalizable); } - /// URLWithString:encodingInvalidCharacters: - static NSURL? URLWithString$1( - NSString URLString, { - required bool encodingInvalidCharacters, - }) { - final _$$ref = URLString.ref; + /// rangeOfComposedCharacterSequencesForRange: + NSRange rangeOfComposedCharacterSequencesForRange(NSRange range) { + final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSURL.URLWithString:encodingInvalidCharacters:', - iOS: (false, (17, 0, 0)), - macOS: (false, (14, 0, 0)), + 'NSString.rangeOfComposedCharacterSequencesForRange:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), ); - final $ret = _objc_msgSend_17amj0z( - _class_NSURL, - _sel_URLWithString_encodingInvalidCharacters_, - _$$ref.pointer, - encodingInvalidCharacters, + final $ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_uimyc7Stret( + $ptr, + _$$ref.pointer, + _sel_rangeOfComposedCharacterSequencesForRange_, + range, + ) + : $ptr.ref = _objc_msgSend_uimyc7( + _$$ref.pointer, + _sel_rangeOfComposedCharacterSequencesForRange_, + range, + ); + final $finalizable = $ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree, ); - return $ret.address == 0 - ? null - : NSURL.fromPointer($ret, retain: true, release: true); + return ffi.Struct.create($finalizable); } - /// URLWithString:relativeToURL: - static NSURL? URLWithString$2(NSString URLString, {NSURL? relativeToURL}) { - final _$$ref = URLString.ref; - final _$$ref$1 = relativeToURL?.ref; - final $ret = _objc_msgSend_15qeuct( - _class_NSURL, - _sel_URLWithString_relativeToURL_, - _$$ref.pointer, - _$$ref$1?.pointer ?? ffi.nullptr, + /// rangeOfString: + NSRange rangeOfString(NSString searchString) { + final _$$ref = object$.ref; + final _$$ref$1 = searchString.ref; + final $ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_182fzonStret( + $ptr, + _$$ref.pointer, + _sel_rangeOfString_, + _$$ref$1.pointer, + ) + : $ptr.ref = _objc_msgSend_182fzon( + _$$ref.pointer, + _sel_rangeOfString_, + _$$ref$1.pointer, + ); + final $finalizable = $ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree, ); - return $ret.address == 0 - ? null - : NSURL.fromPointer($ret, retain: true, release: true); + return ffi.Struct.create($finalizable); } - /// absoluteURLWithDataRepresentation:relativeToURL: - static NSURL absoluteURLWithDataRepresentation( - NSData data, { - NSURL? relativeToURL, + /// rangeOfString:options: + NSRange rangeOfString$1( + NSString searchString, { + required DartNSUInteger options, }) { - final _$$ref = data.ref; - final _$$ref$1 = relativeToURL?.ref; - objc.checkOsVersionInternal( - 'NSURL.absoluteURLWithDataRepresentation:relativeToURL:', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), - ); - final $ret = _objc_msgSend_15qeuct( - _class_NSURL, - _sel_absoluteURLWithDataRepresentation_relativeToURL_, - _$$ref.pointer, - _$$ref$1?.pointer ?? ffi.nullptr, + final _$$ref = object$.ref; + final _$$ref$1 = searchString.ref; + final $ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_102xxo4Stret( + $ptr, + _$$ref.pointer, + _sel_rangeOfString_options_, + _$$ref$1.pointer, + options, + ) + : $ptr.ref = _objc_msgSend_102xxo4( + _$$ref.pointer, + _sel_rangeOfString_options_, + _$$ref$1.pointer, + options, + ); + final $finalizable = $ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree, ); - return NSURL.fromPointer($ret, retain: true, release: true); - } - - /// alloc - static NSURL alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSURL, _sel_alloc); - return NSURL.fromPointer($ret, retain: false, release: true); - } - - /// allocWithZone: - static NSURL allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428(_class_NSURL, _sel_allocWithZone_, zone); - return NSURL.fromPointer($ret, retain: false, release: true); + return ffi.Struct.create($finalizable); } - /// bookmarkDataWithContentsOfURL:error: - static NSData? bookmarkDataWithContentsOfURL(NSURL bookmarkFileURL) { - final _$$ref = bookmarkFileURL.ref; - objc.checkOsVersionInternal( - 'NSURL.bookmarkDataWithContentsOfURL:error:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + /// rangeOfString:options:range: + NSRange rangeOfString$2( + NSString searchString, { + required DartNSUInteger options, + required NSRange range, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = searchString.ref; + final $ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_1nmlvqcStret( + $ptr, + _$$ref.pointer, + _sel_rangeOfString_options_range_, + _$$ref$1.pointer, + options, + range, + ) + : $ptr.ref = _objc_msgSend_1nmlvqc( + _$$ref.pointer, + _sel_rangeOfString_options_range_, + _$$ref$1.pointer, + options, + range, + ); + final $finalizable = $ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree, ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1lhpu4m( - _class_NSURL, - _sel_bookmarkDataWithContentsOfURL_error_, - _$$ref.pointer, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSData.fromPointer($ret, retain: true, release: true); - } finally { - pkg_ffi.calloc.free($err); - } + return ffi.Struct.create($finalizable); } - /// fileURLWithFileSystemRepresentation:isDirectory:relativeToURL: - static NSURL fileURLWithFileSystemRepresentation( - ffi.Pointer path, { - required bool isDirectory, - NSURL? relativeToURL, + /// rangeOfString:options:range:locale: + NSRange rangeOfString$3( + NSString searchString, { + required DartNSUInteger options, + required NSRange range, + NSLocale? locale, }) { - final _$$ref = relativeToURL?.ref; + final _$$ref = object$.ref; + final _$$ref$1 = searchString.ref; + final _$$ref$2 = locale?.ref; objc.checkOsVersionInternal( - 'NSURL.fileURLWithFileSystemRepresentation:isDirectory:relativeToURL:', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), + 'NSString.rangeOfString:options:range:locale:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), ); - final $ret = _objc_msgSend_1n40f6p( - _class_NSURL, - _sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_, - path, - isDirectory, - _$$ref?.pointer ?? ffi.nullptr, + final $ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_gg0462Stret( + $ptr, + _$$ref.pointer, + _sel_rangeOfString_options_range_locale_, + _$$ref$1.pointer, + options, + range, + _$$ref$2?.pointer ?? ffi.nullptr, + ) + : $ptr.ref = _objc_msgSend_gg0462( + _$$ref.pointer, + _sel_rangeOfString_options_range_locale_, + _$$ref$1.pointer, + options, + range, + _$$ref$2?.pointer ?? ffi.nullptr, + ); + final $finalizable = $ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree, ); - return NSURL.fromPointer($ret, retain: true, release: true); + return ffi.Struct.create($finalizable); } - /// fileURLWithPath: - static NSURL fileURLWithPath(NSString path) { - final _$$ref = path.ref; + /// smallestEncoding + DartNSUInteger get smallestEncoding { + final _$$ref = object$.ref; + return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_smallestEncoding); + } + + /// stringByAppendingFormat: + NSString stringByAppendingFormat(NSString format) { + final _$$ref = object$.ref; + final _$$ref$1 = format.ref; final $ret = _objc_msgSend_1sotr3r( - _class_NSURL, - _sel_fileURLWithPath_, _$$ref.pointer, + _sel_stringByAppendingFormat_, + _$$ref$1.pointer, ); - return NSURL.fromPointer($ret, retain: true, release: true); + return NSString.fromPointer($ret, retain: true, release: true); } - /// fileURLWithPath:isDirectory: - static NSURL fileURLWithPath$1(NSString path, {required bool isDirectory}) { - final _$$ref = path.ref; - objc.checkOsVersionInternal( - 'NSURL.fileURLWithPath:isDirectory:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - final $ret = _objc_msgSend_17amj0z( - _class_NSURL, - _sel_fileURLWithPath_isDirectory_, + /// stringByAppendingString: + NSString stringByAppendingString(NSString aString) { + final _$$ref = object$.ref; + final _$$ref$1 = aString.ref; + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - isDirectory, + _sel_stringByAppendingString_, + _$$ref$1.pointer, ); - return NSURL.fromPointer($ret, retain: true, release: true); + return NSString.fromPointer($ret, retain: true, release: true); } - /// fileURLWithPath:isDirectory:relativeToURL: - static NSURL fileURLWithPath$2( - NSString path, { - required bool isDirectory, - NSURL? relativeToURL, + /// stringByApplyingTransform:reverse: + NSString? stringByApplyingTransform( + NSString transform, { + required bool reverse, }) { - final _$$ref = path.ref; - final _$$ref$1 = relativeToURL?.ref; + final _$$ref = object$.ref; + final _$$ref$1 = transform.ref; objc.checkOsVersionInternal( - 'NSURL.fileURLWithPath:isDirectory:relativeToURL:', + 'NSString.stringByApplyingTransform:reverse:', iOS: (false, (9, 0, 0)), macOS: (false, (10, 11, 0)), ); - final $ret = _objc_msgSend_1ged0jd( - _class_NSURL, - _sel_fileURLWithPath_isDirectory_relativeToURL_, + final $ret = _objc_msgSend_17amj0z( _$$ref.pointer, - isDirectory, - _$$ref$1?.pointer ?? ffi.nullptr, + _sel_stringByApplyingTransform_reverse_, + _$$ref$1.pointer, + reverse, ); - return NSURL.fromPointer($ret, retain: true, release: true); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); } - /// fileURLWithPath:relativeToURL: - static NSURL fileURLWithPath$3(NSString path, {NSURL? relativeToURL}) { - final _$$ref = path.ref; - final _$$ref$1 = relativeToURL?.ref; + /// stringByFoldingWithOptions:locale: + NSString stringByFoldingWithOptions( + DartNSUInteger options, { + NSLocale? locale, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = locale?.ref; objc.checkOsVersionInternal( - 'NSURL.fileURLWithPath:relativeToURL:', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), + 'NSString.stringByFoldingWithOptions:locale:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), ); - final $ret = _objc_msgSend_15qeuct( - _class_NSURL, - _sel_fileURLWithPath_relativeToURL_, + final $ret = _objc_msgSend_11cbyu0( _$$ref.pointer, + _sel_stringByFoldingWithOptions_locale_, + options, _$$ref$1?.pointer ?? ffi.nullptr, ); - return NSURL.fromPointer($ret, retain: true, release: true); - } - - /// new - static NSURL new$() { - final $ret = _objc_msgSend_151sglz(_class_NSURL, _sel_new); - return NSURL.fromPointer($ret, retain: false, release: true); + return NSString.fromPointer($ret, retain: true, release: true); } - /// resourceValuesForKeys:fromBookmarkData: - static NSDictionary? resourceValuesForKeys$1( - NSArray keys, { - required NSData fromBookmarkData, + /// stringByPaddingToLength:withString:startingAtIndex: + NSString stringByPaddingToLength( + DartNSUInteger newLength, { + required NSString withString, + required DartNSUInteger startingAtIndex, }) { - final _$$ref = keys.ref; - final _$$ref$1 = fromBookmarkData.ref; - objc.checkOsVersionInternal( - 'NSURL.resourceValuesForKeys:fromBookmarkData:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_15qeuct( - _class_NSURL, - _sel_resourceValuesForKeys_fromBookmarkData_, + final _$$ref = object$.ref; + final _$$ref$1 = withString.ref; + final $ret = _objc_msgSend_1tfztp( _$$ref.pointer, + _sel_stringByPaddingToLength_withString_startingAtIndex_, + newLength, _$$ref$1.pointer, + startingAtIndex, ); - return $ret.address == 0 - ? null - : NSDictionary.fromPointer($ret, retain: true, release: true); - } - - /// supportsSecureCoding - static bool getSupportsSecureCoding() { - return _objc_msgSend_91o635(_class_NSURL, _sel_supportsSecureCoding); + return NSString.fromPointer($ret, retain: true, release: true); } - /// writeBookmarkData:toURL:options:error: - static bool writeBookmarkData( - NSData bookmarkData, { - required NSURL toURL, - required DartNSUInteger options, + /// stringByReplacingCharactersInRange:withString: + NSString stringByReplacingCharactersInRange( + NSRange range, { + required NSString withString, }) { - final _$$ref = bookmarkData.ref; - final _$$ref$1 = toURL.ref; + final _$$ref = object$.ref; + final _$$ref$1 = withString.ref; objc.checkOsVersionInternal( - 'NSURL.writeBookmarkData:toURL:options:error:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSString.stringByReplacingCharactersInRange:withString:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1vxoo9h( - _class_NSURL, - _sel_writeBookmarkData_toURL_options_error_, - _$$ref.pointer, - _$$ref$1.pointer, - options, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret; - } finally { - pkg_ffi.calloc.free($err); - } - } - - /// Returns a new instance of NSURL constructed with the default `new` method. - NSURL() : this.as(new$().object$); -} - -extension NSURL$Methods on NSURL { - /// absoluteString - NSString? get absoluteString { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_absoluteString); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); - } - - /// absoluteURL - NSURL? get absoluteURL { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_absoluteURL); - return $ret.address == 0 - ? null - : NSURL.fromPointer($ret, retain: true, release: true); - } - - /// baseURL - NSURL? get baseURL { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_baseURL); - return $ret.address == 0 - ? null - : NSURL.fromPointer($ret, retain: true, release: true); + final $ret = _objc_msgSend_bstjp9( + _$$ref.pointer, + _sel_stringByReplacingCharactersInRange_withString_, + range, + _$$ref$1.pointer, + ); + return NSString.fromPointer($ret, retain: true, release: true); } - /// bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error: - NSData? bookmarkDataWithOptions( - DartNSUInteger options, { - NSArray? includingResourceValuesForKeys, - NSURL? relativeToURL, + /// stringByReplacingOccurrencesOfString:withString: + NSString stringByReplacingOccurrencesOfString( + NSString target, { + required NSString withString, }) { final _$$ref = object$.ref; - final _$$ref$1 = includingResourceValuesForKeys?.ref; - final _$$ref$2 = relativeToURL?.ref; + final _$$ref$1 = target.ref; + final _$$ref$2 = withString.ref; objc.checkOsVersionInternal( - 'NSURL.bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSString.stringByReplacingOccurrencesOfString:withString:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1wt9a7r( - _$$ref.pointer, - _sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_, - options, - _$$ref$1?.pointer ?? ffi.nullptr, - _$$ref$2?.pointer ?? ffi.nullptr, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSData.fromPointer($ret, retain: true, release: true); - } finally { - pkg_ffi.calloc.free($err); - } + final $ret = _objc_msgSend_15qeuct( + _$$ref.pointer, + _sel_stringByReplacingOccurrencesOfString_withString_, + _$$ref$1.pointer, + _$$ref$2.pointer, + ); + return NSString.fromPointer($ret, retain: true, release: true); } - /// dataRepresentation - NSData get dataRepresentation { + /// stringByReplacingOccurrencesOfString:withString:options:range: + NSString stringByReplacingOccurrencesOfString$1( + NSString target, { + required NSString withString, + required DartNSUInteger options, + required NSRange range, + }) { final _$$ref = object$.ref; + final _$$ref$1 = target.ref; + final _$$ref$2 = withString.ref; objc.checkOsVersionInternal( - 'NSURL.dataRepresentation', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), + 'NSString.stringByReplacingOccurrencesOfString:withString:options:range:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_dataRepresentation); - return NSData.fromPointer($ret, retain: true, release: true); + final $ret = _objc_msgSend_2u4jm6( + _$$ref.pointer, + _sel_stringByReplacingOccurrencesOfString_withString_options_range_, + _$$ref$1.pointer, + _$$ref$2.pointer, + options, + range, + ); + return NSString.fromPointer($ret, retain: true, release: true); } - /// encodeWithCoder: - void encodeWithCoder(NSCoder coder) { - final _$$ref$34 = object$.ref; - final _$$ref$35 = coder.ref; - _objc_msgSend_xtuoz7( - _$$ref$34.pointer, - _sel_encodeWithCoder_, - _$$ref$35.pointer, + /// stringByTrimmingCharactersInSet: + NSString stringByTrimmingCharactersInSet(NSCharacterSet set) { + final _$$ref = object$.ref; + final _$$ref$1 = set.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.pointer, + _sel_stringByTrimmingCharactersInSet_, + _$$ref$1.pointer, ); + return NSString.fromPointer($ret, retain: true, release: true); } - /// filePathURL - NSURL? get filePathURL { + /// substringFromIndex: + NSString substringFromIndex(DartNSUInteger from) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.filePathURL', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + final $ret = _objc_msgSend_14hpxwa( + _$$ref.pointer, + _sel_substringFromIndex_, + from, ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_filePathURL); - return $ret.address == 0 - ? null - : NSURL.fromPointer($ret, retain: true, release: true); + return NSString.fromPointer($ret, retain: true, release: true); } - /// fileReferenceURL - NSURL? fileReferenceURL() { + /// substringToIndex: + NSString substringToIndex(DartNSUInteger to) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.fileReferenceURL', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + final $ret = _objc_msgSend_14hpxwa( + _$$ref.pointer, + _sel_substringToIndex_, + to, ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_fileReferenceURL); - return $ret.address == 0 - ? null - : NSURL.fromPointer($ret, retain: true, release: true); + return NSString.fromPointer($ret, retain: true, release: true); } - /// fileSystemRepresentation - ffi.Pointer get fileSystemRepresentation { + /// substringWithRange: + NSString substringWithRange(NSRange range) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.fileSystemRepresentation', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), + final $ret = _objc_msgSend_1k1o1s7( + _$$ref.pointer, + _sel_substringWithRange_, + range, ); - return _objc_msgSend_1fuqfwb(_$$ref.pointer, _sel_fileSystemRepresentation); + return NSString.fromPointer($ret, retain: true, release: true); } - /// fragment - NSString? get fragment { + /// uppercaseString + NSString get uppercaseString { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_fragment); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_uppercaseString); + return NSString.fromPointer($ret, retain: true, release: true); } - /// getFileSystemRepresentation:maxLength: - bool getFileSystemRepresentation( - ffi.Pointer buffer, { - required DartNSUInteger maxLength, - }) { + /// uppercaseStringWithLocale: + NSString uppercaseStringWithLocale(NSLocale? locale) { final _$$ref = object$.ref; + final _$$ref$1 = locale?.ref; objc.checkOsVersionInternal( - 'NSURL.getFileSystemRepresentation:maxLength:', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), + 'NSString.uppercaseStringWithLocale:', + iOS: (false, (6, 0, 0)), + macOS: (false, (10, 8, 0)), ); - return _objc_msgSend_8cymbm( + final $ret = _objc_msgSend_1sotr3r( _$$ref.pointer, - _sel_getFileSystemRepresentation_maxLength_, - buffer, - maxLength, + _sel_uppercaseStringWithLocale_, + _$$ref$1?.pointer ?? ffi.nullptr, ); + return NSString.fromPointer($ret, retain: true, release: true); } - /// getResourceValue:forKey:error: - bool getResourceValue( - ffi.Pointer> value, { - required NSString forKey, + /// writeToFile:atomically:encoding:error: + bool writeToFile( + NSString path, { + required bool atomically, + required DartNSUInteger encoding, }) { final _$$ref = object$.ref; - final _$$ref$1 = forKey.ref; - objc.checkOsVersionInternal( - 'NSURL.getResourceValue:forKey:error:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); + final _$$ref$1 = path.ref; final $err = pkg_ffi.calloc>(); try { - final $ret = _objc_msgSend_1j9bhml( + final $ret = _objc_msgSend_dv3z6r( _$$ref.pointer, - _sel_getResourceValue_forKey_error_, - value, + _sel_writeToFile_atomically_encoding_error_, _$$ref$1.pointer, + atomically, + encoding, $err, ); objc.NSErrorException.checkErrorPointer($err.value); @@ -31916,689 +22908,800 @@ extension NSURL$Methods on NSURL { } } - /// hasDirectoryPath - bool get hasDirectoryPath { + /// writeToURL:atomically:encoding:error: + bool writeToURL( + NSURL url, { + required bool atomically, + required DartNSUInteger encoding, + }) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.hasDirectoryPath', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), + final _$$ref$1 = url.ref; + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_dv3z6r( + _$$ref.pointer, + _sel_writeToURL_atomically_encoding_error_, + _$$ref$1.pointer, + atomically, + encoding, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret; + } finally { + pkg_ffi.calloc.free($err); + } + } + + /// availableStringEncodings + static ffi.Pointer getAvailableStringEncodings() { + return _objc_msgSend_1h2q612( + _class_NSString, + _sel_availableStringEncodings, ); - return _objc_msgSend_91o635(_$$ref.pointer, _sel_hasDirectoryPath); } - /// host - NSString? get host { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_host); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); + /// defaultCStringEncoding + static DartNSUInteger getDefaultCStringEncoding() { + return _objc_msgSend_xw2lbc(_class_NSString, _sel_defaultCStringEncoding); } - /// init - NSURL init() { - final _$$ref$44 = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.init', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + /// localizedNameOfStringEncoding: + static NSString localizedNameOfStringEncoding(DartNSUInteger encoding) { + final $ret = _objc_msgSend_14hpxwa( + _class_NSString, + _sel_localizedNameOfStringEncoding_, + encoding, ); - final $ret = _objc_msgSend_151sglz( - _$$ref$44.retainAndReturnPointer(), - _sel_init, + return NSString.fromPointer($ret, retain: true, release: true); + } +} + +/// NSThread +extension type NSThread._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject { + /// Constructs a [NSThread] that points to the same underlying object as [other]. + NSThread.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NSThread] that wraps the given raw object pointer. + NSThread.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + assert(isA(object$)); + } + + /// Returns whether [obj] is an instance of [NSThread]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSThread, + ); + + /// alloc + static NSThread alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_alloc); + return NSThread.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NSThread allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSThread, + _sel_allocWithZone_, + zone, ); - return NSURL.fromPointer($ret, retain: false, release: true); + return NSThread.fromPointer($ret, retain: false, release: true); } - /// initAbsoluteURLWithDataRepresentation:relativeToURL: - NSURL initAbsoluteURLWithDataRepresentation( - NSData data, { - NSURL? relativeToURL, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = data.ref; - final _$$ref$2 = relativeToURL?.ref; + /// callStackReturnAddresses + static NSArray getCallStackReturnAddresses() { objc.checkOsVersionInternal( - 'NSURL.initAbsoluteURLWithDataRepresentation:relativeToURL:', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), + 'NSThread.callStackReturnAddresses', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), ); - final $ret = _objc_msgSend_15qeuct( - _$$ref.retainAndReturnPointer(), - _sel_initAbsoluteURLWithDataRepresentation_relativeToURL_, - _$$ref$1.pointer, - _$$ref$2?.pointer ?? ffi.nullptr, + final $ret = _objc_msgSend_151sglz( + _class_NSThread, + _sel_callStackReturnAddresses, ); - return NSURL.fromPointer($ret, retain: false, release: true); + return NSArray.fromPointer($ret, retain: true, release: true); } - /// initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error: - NSURL? initByResolvingBookmarkData( - NSData bookmarkData, { - required DartNSUInteger options, - NSURL? relativeToURL, - required ffi.Pointer bookmarkDataIsStale, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = bookmarkData.ref; - final _$$ref$2 = relativeToURL?.ref; + /// callStackSymbols + static NSArray getCallStackSymbols() { objc.checkOsVersionInternal( - 'NSURL.initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:', + 'NSThread.callStackSymbols', iOS: (false, (4, 0, 0)), macOS: (false, (10, 6, 0)), ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1ceswyu( - _$$ref.retainAndReturnPointer(), - _sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_, - _$$ref$1.pointer, - options, - _$$ref$2?.pointer ?? ffi.nullptr, - bookmarkDataIsStale, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSURL.fromPointer($ret, retain: false, release: true); - } finally { - pkg_ffi.calloc.free($err); - } + final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_callStackSymbols); + return NSArray.fromPointer($ret, retain: true, release: true); } - /// initFileURLWithFileSystemRepresentation:isDirectory:relativeToURL: - NSURL initFileURLWithFileSystemRepresentation( - ffi.Pointer path, { - required bool isDirectory, - NSURL? relativeToURL, + /// currentThread + static NSThread getCurrentThread() { + final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_currentThread); + return NSThread.fromPointer($ret, retain: true, release: true); + } + + /// detachNewThreadSelector:toTarget:withObject: + static void detachNewThreadSelector( + ffi.Pointer selector, { + required objc.ObjCObject toTarget, + objc.ObjCObject? withObject, }) { - final _$$ref = object$.ref; - final _$$ref$1 = relativeToURL?.ref; - objc.checkOsVersionInternal( - 'NSURL.initFileURLWithFileSystemRepresentation:isDirectory:relativeToURL:', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - final $ret = _objc_msgSend_1n40f6p( - _$$ref.retainAndReturnPointer(), - _sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_, - path, - isDirectory, + final _$$ref = toTarget.ref; + final _$$ref$1 = withObject?.ref; + _objc_msgSend_lzbvjm( + _class_NSThread, + _sel_detachNewThreadSelector_toTarget_withObject_, + selector, + _$$ref.pointer, _$$ref$1?.pointer ?? ffi.nullptr, ); - return NSURL.fromPointer($ret, retain: false, release: true); } - /// initFileURLWithPath: - NSURL initFileURLWithPath(NSString path) { - final _$$ref = object$.ref; - final _$$ref$1 = path.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref.retainAndReturnPointer(), - _sel_initFileURLWithPath_, - _$$ref$1.pointer, + /// detachNewThreadWithBlock: + static void detachNewThreadWithBlock( + objc.ObjCBlock block, + ) { + final _$$ref = block.ref; + objc.checkOsVersionInternal( + 'NSThread.detachNewThreadWithBlock:', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), + ); + _objc_msgSend_f167m6( + _class_NSThread, + _sel_detachNewThreadWithBlock_, + _$$ref.pointer, ); - return NSURL.fromPointer($ret, retain: false, release: true); } - /// initFileURLWithPath:isDirectory: - NSURL initFileURLWithPath$1(NSString path, {required bool isDirectory}) { - final _$$ref = object$.ref; - final _$$ref$1 = path.ref; + /// exit + static void exit() { + _objc_msgSend_1pl9qdv(_class_NSThread, _sel_exit); + } + + /// isMainThread + static bool getIsMainThread$1() { objc.checkOsVersionInternal( - 'NSURL.initFileURLWithPath:isDirectory:', + 'NSThread.isMainThread', iOS: (false, (2, 0, 0)), macOS: (false, (10, 5, 0)), ); - final $ret = _objc_msgSend_17amj0z( - _$$ref.retainAndReturnPointer(), - _sel_initFileURLWithPath_isDirectory_, - _$$ref$1.pointer, - isDirectory, - ); - return NSURL.fromPointer($ret, retain: false, release: true); + return _objc_msgSend_91o635(_class_NSThread, _sel_isMainThread); } - /// initFileURLWithPath:isDirectory:relativeToURL: - NSURL initFileURLWithPath$2( - NSString path, { - required bool isDirectory, - NSURL? relativeToURL, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = path.ref; - final _$$ref$2 = relativeToURL?.ref; + /// isMultiThreaded + static bool isMultiThreaded() { + return _objc_msgSend_91o635(_class_NSThread, _sel_isMultiThreaded); + } + + /// mainThread + static NSThread getMainThread() { objc.checkOsVersionInternal( - 'NSURL.initFileURLWithPath:isDirectory:relativeToURL:', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), - ); - final $ret = _objc_msgSend_1ged0jd( - _$$ref.retainAndReturnPointer(), - _sel_initFileURLWithPath_isDirectory_relativeToURL_, - _$$ref$1.pointer, - isDirectory, - _$$ref$2?.pointer ?? ffi.nullptr, + 'NSThread.mainThread', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), ); - return NSURL.fromPointer($ret, retain: false, release: true); + final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_mainThread); + return NSThread.fromPointer($ret, retain: true, release: true); } - /// initFileURLWithPath:relativeToURL: - NSURL initFileURLWithPath$3(NSString path, {NSURL? relativeToURL}) { + /// new + static NSThread new$() { + final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_new); + return NSThread.fromPointer($ret, retain: false, release: true); + } + + /// setThreadPriority: + static bool setThreadPriority(double p) { + return _objc_msgSend_18chyc(_class_NSThread, _sel_setThreadPriority_, p); + } + + /// sleepForTimeInterval: + static void sleepForTimeInterval(double ti) { + _objc_msgSend_hwm8nu(_class_NSThread, _sel_sleepForTimeInterval_, ti); + } + + /// sleepUntilDate: + static void sleepUntilDate(NSDate date) { + final _$$ref = date.ref; + _objc_msgSend_xtuoz7(_class_NSThread, _sel_sleepUntilDate_, _$$ref.pointer); + } + + /// threadPriority + static double threadPriority$1() { + return objc.useMsgSendVariants + ? _objc_msgSend_1ukqyt8Fpret(_class_NSThread, _sel_threadPriority) + : _objc_msgSend_1ukqyt8(_class_NSThread, _sel_threadPriority); + } + + /// Returns a new instance of NSThread constructed with the default `new` method. + NSThread() : this.as(new$().object$); +} + +extension NSThread$Methods on NSThread { + /// cancel + void cancel() { final _$$ref = object$.ref; - final _$$ref$1 = path.ref; - final _$$ref$2 = relativeToURL?.ref; objc.checkOsVersionInternal( - 'NSURL.initFileURLWithPath:relativeToURL:', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), - ); - final $ret = _objc_msgSend_15qeuct( - _$$ref.retainAndReturnPointer(), - _sel_initFileURLWithPath_relativeToURL_, - _$$ref$1.pointer, - _$$ref$2?.pointer ?? ffi.nullptr, + 'NSThread.cancel', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), ); - return NSURL.fromPointer($ret, retain: false, release: true); + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_cancel); } - /// initWithCoder: - NSURL? initWithCoder(NSCoder coder) { - final _$$ref$50 = object$.ref; - final _$$ref$51 = coder.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref$50.retainAndReturnPointer(), - _sel_initWithCoder_, - _$$ref$51.pointer, + /// init + NSThread init() { + final _$$ref$42 = object$.ref; + objc.checkOsVersionInternal( + 'NSThread.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), ); - return $ret.address == 0 - ? null - : NSURL.fromPointer($ret, retain: false, release: true); + final $ret = _objc_msgSend_151sglz( + _$$ref$42.retainAndReturnPointer(), + _sel_init, + ); + return NSThread.fromPointer($ret, retain: false, release: true); } - /// initWithDataRepresentation:relativeToURL: - NSURL initWithDataRepresentation(NSData data, {NSURL? relativeToURL}) { + /// initWithBlock: + NSThread initWithBlock(objc.ObjCBlock block) { final _$$ref = object$.ref; - final _$$ref$1 = data.ref; - final _$$ref$2 = relativeToURL?.ref; + final _$$ref$1 = block.ref; objc.checkOsVersionInternal( - 'NSURL.initWithDataRepresentation:relativeToURL:', - iOS: (false, (9, 0, 0)), - macOS: (false, (10, 11, 0)), + 'NSThread.initWithBlock:', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), ); - final $ret = _objc_msgSend_15qeuct( + final $ret = _objc_msgSend_nnxkei( _$$ref.retainAndReturnPointer(), - _sel_initWithDataRepresentation_relativeToURL_, + _sel_initWithBlock_, _$$ref$1.pointer, - _$$ref$2?.pointer ?? ffi.nullptr, ); - return NSURL.fromPointer($ret, retain: false, release: true); + return NSThread.fromPointer($ret, retain: false, release: true); } - /// initWithScheme:host:path: - @Deprecated( - 'Use NSURLComponents instead, which lets you create a valid URL with any valid combination of URL components and subcomponents (not just scheme, host and path), and lets you set components and subcomponents with either percent-encoded or un-percent-encoded strings.', - ) - NSURL? initWithScheme( - NSString scheme, { - NSString? host, - required NSString path, + /// initWithTarget:selector:object: + NSThread initWithTarget( + objc.ObjCObject target, { + required ffi.Pointer selector, + objc.ObjCObject? object, }) { final _$$ref = object$.ref; - final _$$ref$1 = scheme.ref; - final _$$ref$2 = host?.ref; - final _$$ref$3 = path.ref; + final _$$ref$1 = target.ref; + final _$$ref$2 = object?.ref; objc.checkOsVersionInternal( - 'NSURL.initWithScheme:host:path:', + 'NSThread.initWithTarget:selector:object:', iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + macOS: (false, (10, 5, 0)), ); - final $ret = _objc_msgSend_11spmsz( + final $ret = _objc_msgSend_1eldwyi( _$$ref.retainAndReturnPointer(), - _sel_initWithScheme_host_path_, + _sel_initWithTarget_selector_object_, _$$ref$1.pointer, + selector, _$$ref$2?.pointer ?? ffi.nullptr, - _$$ref$3.pointer, ); - return $ret.address == 0 - ? null - : NSURL.fromPointer($ret, retain: false, release: true); + return NSThread.fromPointer($ret, retain: false, release: true); } - /// initWithString: - NSURL? initWithString(NSString URLString) { + /// isCancelled + bool get isCancelled { final _$$ref = object$.ref; - final _$$ref$1 = URLString.ref; - final $ret = _objc_msgSend_1sotr3r( - _$$ref.retainAndReturnPointer(), - _sel_initWithString_, - _$$ref$1.pointer, + objc.checkOsVersionInternal( + 'NSThread.isCancelled', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), ); - return $ret.address == 0 - ? null - : NSURL.fromPointer($ret, retain: false, release: true); + return _objc_msgSend_91o635(_$$ref.pointer, _sel_isCancelled); } - /// initWithString:encodingInvalidCharacters: - NSURL? initWithString$1( - NSString URLString, { - required bool encodingInvalidCharacters, - }) { + /// isExecuting + bool get isExecuting { final _$$ref = object$.ref; - final _$$ref$1 = URLString.ref; objc.checkOsVersionInternal( - 'NSURL.initWithString:encodingInvalidCharacters:', - iOS: (false, (17, 0, 0)), - macOS: (false, (14, 0, 0)), - ); - final $ret = _objc_msgSend_17amj0z( - _$$ref.retainAndReturnPointer(), - _sel_initWithString_encodingInvalidCharacters_, - _$$ref$1.pointer, - encodingInvalidCharacters, + 'NSThread.isExecuting', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), ); - return $ret.address == 0 - ? null - : NSURL.fromPointer($ret, retain: false, release: true); + return _objc_msgSend_91o635(_$$ref.pointer, _sel_isExecuting); } - /// initWithString:relativeToURL: - NSURL? initWithString$2(NSString URLString, {NSURL? relativeToURL}) { + /// isFinished + bool get isFinished { final _$$ref = object$.ref; - final _$$ref$1 = URLString.ref; - final _$$ref$2 = relativeToURL?.ref; - final $ret = _objc_msgSend_15qeuct( - _$$ref.retainAndReturnPointer(), - _sel_initWithString_relativeToURL_, - _$$ref$1.pointer, - _$$ref$2?.pointer ?? ffi.nullptr, + objc.checkOsVersionInternal( + 'NSThread.isFinished', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), ); - return $ret.address == 0 - ? null - : NSURL.fromPointer($ret, retain: false, release: true); + return _objc_msgSend_91o635(_$$ref.pointer, _sel_isFinished); } - /// isFileReferenceURL - bool isFileReferenceURL() { + /// isMainThread + bool get isMainThread { final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSURL.isFileReferenceURL', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSThread.isMainThread', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), ); - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isFileReferenceURL); - } - - /// isFileURL - bool get isFileURL { - final _$$ref = object$.ref; - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isFileURL); + return _objc_msgSend_91o635(_$$ref.pointer, _sel_isMainThread); } - /// parameterString - @Deprecated( - 'The parameterString method is deprecated. Post deprecation for applications linked with or after the macOS 10.15, and for all iOS, watchOS, and tvOS applications, parameterString will always return nil, and the path method will return the complete path including the semicolon separator and params component if the URL string contains them.', - ) - NSString? get parameterString { + /// main + void main() { final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSURL.parameterString', + 'NSThread.main', iOS: (false, (2, 0, 0)), - macOS: (false, (10, 2, 0)), + macOS: (false, (10, 5, 0)), ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_parameterString); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_main); } - /// password - NSString? get password { + /// name + NSString? get name { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_password); + objc.checkOsVersionInternal( + 'NSThread.name', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_name); return $ret.address == 0 ? null : NSString.fromPointer($ret, retain: true, release: true); } - /// path - NSString? get path { + /// qualityOfService + NSQualityOfService get qualityOfService { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_path); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); + objc.checkOsVersionInternal( + 'NSThread.qualityOfService', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + final $ret = _objc_msgSend_oi8iq9(_$$ref.pointer, _sel_qualityOfService); + return NSQualityOfService.fromValue($ret); } - /// port - NSNumber? get port { + /// setName: + set name(NSString? value) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_port); - return $ret.address == 0 - ? null - : NSNumber.fromPointer($ret, retain: true, release: true); + final _$$ref$1 = value?.ref; + objc.checkOsVersionInternal( + 'NSThread.setName:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_setName_, + _$$ref$1?.pointer ?? ffi.nullptr, + ); } - /// query - NSString? get query { + /// setQualityOfService: + set qualityOfService(NSQualityOfService value) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_query); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); + objc.checkOsVersionInternal( + 'NSThread.setQualityOfService:', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + _objc_msgSend_n2da1l( + _$$ref.pointer, + _sel_setQualityOfService_, + value.value, + ); } - /// relativePath - NSString? get relativePath { + /// setStackSize: + set stackSize(DartNSUInteger value) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_relativePath); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); + objc.checkOsVersionInternal( + 'NSThread.setStackSize:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + _objc_msgSend_1i9r4xy(_$$ref.pointer, _sel_setStackSize_, value); } - /// relativeString - NSString get relativeString { + /// setThreadPriority: + set threadPriority(double value) { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_relativeString); - return NSString.fromPointer($ret, retain: true, release: true); + objc.checkOsVersionInternal( + 'NSThread.setThreadPriority:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + _objc_msgSend_hwm8nu(_$$ref.pointer, _sel_setThreadPriority_, value); } - /// removeAllCachedResourceValues - void removeAllCachedResourceValues() { + /// stackSize + DartNSUInteger get stackSize { final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSURL.removeAllCachedResourceValues', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), + 'NSThread.stackSize', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), ); - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_removeAllCachedResourceValues); + return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_stackSize); } - /// removeCachedResourceValueForKey: - void removeCachedResourceValueForKey(NSString key) { + /// start + void start() { final _$$ref = object$.ref; - final _$$ref$1 = key.ref; objc.checkOsVersionInternal( - 'NSURL.removeCachedResourceValueForKey:', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_removeCachedResourceValueForKey_, - _$$ref$1.pointer, + 'NSThread.start', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), ); + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_start); } - /// resourceSpecifier - NSString? get resourceSpecifier { + /// threadDictionary + NSMutableDictionary get threadDictionary { final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_resourceSpecifier); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_threadDictionary); + return NSMutableDictionary.fromPointer($ret, retain: true, release: true); } - /// resourceValuesForKeys:error: - NSDictionary? resourceValuesForKeys(NSArray keys) { + /// threadPriority + double get threadPriority { final _$$ref = object$.ref; - final _$$ref$1 = keys.ref; objc.checkOsVersionInternal( - 'NSURL.resourceValuesForKeys:error:', + 'NSThread.threadPriority', iOS: (false, (4, 0, 0)), macOS: (false, (10, 6, 0)), ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_1lhpu4m( - _$$ref.pointer, - _sel_resourceValuesForKeys_error_, - _$$ref$1.pointer, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret.address == 0 - ? null - : NSDictionary.fromPointer($ret, retain: true, release: true); - } finally { - pkg_ffi.calloc.free($err); - } + return objc.useMsgSendVariants + ? _objc_msgSend_1ukqyt8Fpret(_$$ref.pointer, _sel_threadPriority) + : _objc_msgSend_1ukqyt8(_$$ref.pointer, _sel_threadPriority); } +} - /// scheme - NSString? get scheme { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_scheme); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); +/// NSTimer +extension type NSTimer._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject { + /// Constructs a [NSTimer] that points to the same underlying object as [other]. + NSTimer.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); } - /// setResourceValue:forKey:error: - bool setResourceValue(objc.ObjCObject? value, {required NSString forKey}) { - final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; - final _$$ref$2 = forKey.ref; - objc.checkOsVersionInternal( - 'NSURL.setResourceValue:forKey:error:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + /// Constructs a [NSTimer] that wraps the given raw object pointer. + NSTimer.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + assert(isA(object$)); + } + + /// Returns whether [obj] is an instance of [NSTimer]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSTimer, + ); + + /// alloc + static NSTimer alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSTimer, _sel_alloc); + return NSTimer.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NSTimer allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSTimer, + _sel_allocWithZone_, + zone, ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_6z4k82( - _$$ref.pointer, - _sel_setResourceValue_forKey_error_, - _$$ref$1?.pointer ?? ffi.nullptr, - _$$ref$2.pointer, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret; - } finally { - pkg_ffi.calloc.free($err); - } + return NSTimer.fromPointer($ret, retain: false, release: true); } - /// setResourceValues:error: - bool setResourceValues(NSDictionary keyedValues) { - final _$$ref = object$.ref; - final _$$ref$1 = keyedValues.ref; - objc.checkOsVersionInternal( - 'NSURL.setResourceValues:error:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + /// new + static NSTimer new$() { + final $ret = _objc_msgSend_151sglz(_class_NSTimer, _sel_new); + return NSTimer.fromPointer($ret, retain: false, release: true); + } + + /// scheduledTimerWithTimeInterval:invocation:repeats: + static NSTimer scheduledTimerWithTimeInterval( + double ti, { + required NSInvocation invocation, + required bool repeats, + }) { + final _$$ref = invocation.ref; + final $ret = _objc_msgSend_r49ehc( + _class_NSTimer, + _sel_scheduledTimerWithTimeInterval_invocation_repeats_, + ti, + _$$ref.pointer, + repeats, ); - final $err = pkg_ffi.calloc>(); - try { - final $ret = _objc_msgSend_l9p60w( - _$$ref.pointer, - _sel_setResourceValues_error_, - _$$ref$1.pointer, - $err, - ); - objc.NSErrorException.checkErrorPointer($err.value); - return $ret; - } finally { - pkg_ffi.calloc.free($err); - } + return NSTimer.fromPointer($ret, retain: true, release: true); } - /// setTemporaryResourceValue:forKey: - void setTemporaryResourceValue( - objc.ObjCObject? value, { - required NSString forKey, + /// scheduledTimerWithTimeInterval:repeats:block: + static NSTimer scheduledTimerWithTimeInterval$1( + double interval, { + required bool repeats, + required objc.ObjCBlock block, }) { - final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; - final _$$ref$2 = forKey.ref; + final _$$ref = block.ref; objc.checkOsVersionInternal( - 'NSURL.setTemporaryResourceValue:forKey:', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), + 'NSTimer.scheduledTimerWithTimeInterval:repeats:block:', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), ); - _objc_msgSend_pfv6jd( + final $ret = _objc_msgSend_9a64f1( + _class_NSTimer, + _sel_scheduledTimerWithTimeInterval_repeats_block_, + interval, + repeats, _$$ref.pointer, - _sel_setTemporaryResourceValue_forKey_, - _$$ref$1?.pointer ?? ffi.nullptr, - _$$ref$2.pointer, ); + return NSTimer.fromPointer($ret, retain: true, release: true); } - /// standardizedURL - NSURL? get standardizedURL { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_standardizedURL); - return $ret.address == 0 - ? null - : NSURL.fromPointer($ret, retain: true, release: true); + /// scheduledTimerWithTimeInterval:target:selector:userInfo:repeats: + static NSTimer scheduledTimerWithTimeInterval$2( + double ti, { + required objc.ObjCObject target, + required ffi.Pointer selector, + objc.ObjCObject? userInfo, + required bool repeats, + }) { + final _$$ref = target.ref; + final _$$ref$1 = userInfo?.ref; + final $ret = _objc_msgSend_ot6jdx( + _class_NSTimer, + _sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_, + ti, + _$$ref.pointer, + selector, + _$$ref$1?.pointer ?? ffi.nullptr, + repeats, + ); + return NSTimer.fromPointer($ret, retain: true, release: true); } - /// startAccessingSecurityScopedResource - bool startAccessingSecurityScopedResource() { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.startAccessingSecurityScopedResource', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - return _objc_msgSend_91o635( + /// timerWithTimeInterval:invocation:repeats: + static NSTimer timerWithTimeInterval( + double ti, { + required NSInvocation invocation, + required bool repeats, + }) { + final _$$ref = invocation.ref; + final $ret = _objc_msgSend_r49ehc( + _class_NSTimer, + _sel_timerWithTimeInterval_invocation_repeats_, + ti, _$$ref.pointer, - _sel_startAccessingSecurityScopedResource, + repeats, ); + return NSTimer.fromPointer($ret, retain: true, release: true); } - /// stopAccessingSecurityScopedResource - void stopAccessingSecurityScopedResource() { - final _$$ref = object$.ref; + /// timerWithTimeInterval:repeats:block: + static NSTimer timerWithTimeInterval$1( + double interval, { + required bool repeats, + required objc.ObjCBlock block, + }) { + final _$$ref = block.ref; objc.checkOsVersionInternal( - 'NSURL.stopAccessingSecurityScopedResource', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 7, 0)), + 'NSTimer.timerWithTimeInterval:repeats:block:', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), ); - _objc_msgSend_1pl9qdv( + final $ret = _objc_msgSend_9a64f1( + _class_NSTimer, + _sel_timerWithTimeInterval_repeats_block_, + interval, + repeats, _$$ref.pointer, - _sel_stopAccessingSecurityScopedResource, ); + return NSTimer.fromPointer($ret, retain: true, release: true); } - /// user - NSString? get user { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_user); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); + /// timerWithTimeInterval:target:selector:userInfo:repeats: + static NSTimer timerWithTimeInterval$2( + double ti, { + required objc.ObjCObject target, + required ffi.Pointer selector, + objc.ObjCObject? userInfo, + required bool repeats, + }) { + final _$$ref = target.ref; + final _$$ref$1 = userInfo?.ref; + final $ret = _objc_msgSend_ot6jdx( + _class_NSTimer, + _sel_timerWithTimeInterval_target_selector_userInfo_repeats_, + ti, + _$$ref.pointer, + selector, + _$$ref$1?.pointer ?? ffi.nullptr, + repeats, + ); + return NSTimer.fromPointer($ret, retain: true, release: true); } -} -sealed class NSURLBookmarkCreationOptions { - static const NSURLBookmarkCreationPreferFileIDResolution = 256; - static const NSURLBookmarkCreationMinimalBookmark = 512; - static const NSURLBookmarkCreationSuitableForBookmarkFile = 1024; - static const NSURLBookmarkCreationWithSecurityScope = 2048; - static const NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = 4096; - static const NSURLBookmarkCreationWithoutImplicitSecurityScope = 536870912; + /// Returns a new instance of NSTimer constructed with the default `new` method. + NSTimer() : this.as(new$().object$); } -sealed class NSURLBookmarkResolutionOptions { - static const NSURLBookmarkResolutionWithoutUI = 256; - static const NSURLBookmarkResolutionWithoutMounting = 512; - static const NSURLBookmarkResolutionWithSecurityScope = 1024; - static const NSURLBookmarkResolutionWithoutImplicitStartAccessing = 32768; -} +extension NSTimer$Methods on NSTimer { + /// fire + void fire() { + final _$$ref = object$.ref; + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_fire); + } -/// NSURLClient -extension NSURLClient on NSObject { - /// URL:resourceDataDidBecomeAvailable: - @Deprecated('Use NSURLConnection instead') - void URL(NSURL sender, {required NSData resourceDataDidBecomeAvailable}) { + /// fireDate + NSDate get fireDate { final _$$ref = object$.ref; - final _$$ref$1 = sender.ref; - final _$$ref$2 = resourceDataDidBecomeAvailable.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_fireDate); + return NSDate.fromPointer($ret, retain: true, release: true); + } + + /// init + NSTimer init() { + final _$$ref$43 = object$.ref; objc.checkOsVersionInternal( - 'NSObject.URL:resourceDataDidBecomeAvailable:', + 'NSTimer.init', iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); - _objc_msgSend_pfv6jd( - _$$ref.pointer, - _sel_URL_resourceDataDidBecomeAvailable_, - _$$ref$1.pointer, - _$$ref$2.pointer, + final $ret = _objc_msgSend_151sglz( + _$$ref$43.retainAndReturnPointer(), + _sel_init, ); + return NSTimer.fromPointer($ret, retain: false, release: true); } - /// URL:resourceDidFailLoadingWithReason: - @Deprecated('Use NSURLConnection instead') - void URL$1( - NSURL sender, { - required NSString resourceDidFailLoadingWithReason, + /// initWithFireDate:interval:repeats:block: + NSTimer initWithFireDate( + NSDate date, { + required double interval, + required bool repeats, + required objc.ObjCBlock block, }) { final _$$ref = object$.ref; - final _$$ref$1 = sender.ref; - final _$$ref$2 = resourceDidFailLoadingWithReason.ref; + final _$$ref$1 = date.ref; + final _$$ref$2 = block.ref; objc.checkOsVersionInternal( - 'NSObject.URL:resourceDidFailLoadingWithReason:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSTimer.initWithFireDate:interval:repeats:block:', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), ); - _objc_msgSend_pfv6jd( - _$$ref.pointer, - _sel_URL_resourceDidFailLoadingWithReason_, + final $ret = _objc_msgSend_1s0rfm3( + _$$ref.retainAndReturnPointer(), + _sel_initWithFireDate_interval_repeats_block_, _$$ref$1.pointer, + interval, + repeats, _$$ref$2.pointer, ); + return NSTimer.fromPointer($ret, retain: false, release: true); } - /// URLResourceDidCancelLoading: - @Deprecated('Use NSURLConnection instead') - void URLResourceDidCancelLoading(NSURL sender) { + /// initWithFireDate:interval:target:selector:userInfo:repeats: + NSTimer initWithFireDate$1( + NSDate date, { + required double interval, + required objc.ObjCObject target, + required ffi.Pointer selector, + objc.ObjCObject? userInfo, + required bool repeats, + }) { final _$$ref = object$.ref; - final _$$ref$1 = sender.ref; - objc.checkOsVersionInternal( - 'NSObject.URLResourceDidCancelLoading:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_URLResourceDidCancelLoading_, + final _$$ref$1 = date.ref; + final _$$ref$2 = target.ref; + final _$$ref$3 = userInfo?.ref; + final $ret = _objc_msgSend_14wwtbv( + _$$ref.retainAndReturnPointer(), + _sel_initWithFireDate_interval_target_selector_userInfo_repeats_, _$$ref$1.pointer, + interval, + _$$ref$2.pointer, + selector, + _$$ref$3?.pointer ?? ffi.nullptr, + repeats, ); + return NSTimer.fromPointer($ret, retain: false, release: true); + } + + /// invalidate + void invalidate() { + final _$$ref = object$.ref; + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_invalidate); + } + + /// isValid + bool get isValid { + final _$$ref = object$.ref; + return _objc_msgSend_91o635(_$$ref.pointer, _sel_isValid); + } + + /// setFireDate: + set fireDate(NSDate value) { + final _$$ref = object$.ref; + final _$$ref$1 = value.ref; + _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_setFireDate_, _$$ref$1.pointer); } - /// URLResourceDidFinishLoading: - @Deprecated('Use NSURLConnection instead') - void URLResourceDidFinishLoading(NSURL sender) { + /// setTolerance: + set tolerance(double value) { final _$$ref = object$.ref; - final _$$ref$1 = sender.ref; objc.checkOsVersionInternal( - 'NSObject.URLResourceDidFinishLoading:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSTimer.setTolerance:', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_URLResourceDidFinishLoading_, - _$$ref$1.pointer, + _objc_msgSend_hwm8nu(_$$ref.pointer, _sel_setTolerance_, value); + } + + /// timeInterval + double get timeInterval { + final _$$ref = object$.ref; + return objc.useMsgSendVariants + ? _objc_msgSend_1ukqyt8Fpret(_$$ref.pointer, _sel_timeInterval) + : _objc_msgSend_1ukqyt8(_$$ref.pointer, _sel_timeInterval); + } + + /// tolerance + double get tolerance { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSTimer.tolerance', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); + return objc.useMsgSendVariants + ? _objc_msgSend_1ukqyt8Fpret(_$$ref.pointer, _sel_tolerance) + : _objc_msgSend_1ukqyt8(_$$ref.pointer, _sel_tolerance); + } + + /// userInfo + objc.ObjCObject? get userInfo { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_userInfo); + return $ret.address == 0 + ? null + : objc.ObjCObject($ret, retain: true, release: true); } } -/// NSURLHandle -extension type NSURLHandle._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject { - /// Constructs a [NSURLHandle] that points to the same underlying object as [other]. - NSURLHandle.as(objc.ObjCObject other) : object$ = other { +typedef NSUInteger = ffi.UnsignedLong; +typedef DartNSUInteger = int; + +/// NSURL +extension type NSURL._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject, NSSecureCoding, NSCopying { + /// Constructs a [NSURL] that points to the same underlying object as [other]. + NSURL.as(objc.ObjCObject other) : object$ = other { assert(isA(object$)); } - /// Constructs a [NSURLHandle] that wraps the given raw object pointer. - NSURLHandle.fromPointer( + /// Constructs a [NSURL] that wraps the given raw object pointer. + NSURL.fromPointer( ffi.Pointer other, { bool retain = false, bool release = false, @@ -32606,1517 +23709,1201 @@ extension type NSURLHandle._(objc.ObjCObject object$) assert(isA(object$)); } - /// Returns whether [obj] is an instance of [NSURLHandle]. + /// Returns whether [obj] is an instance of [NSURL]. static bool isA(objc.ObjCObject? obj) => obj == null ? false : _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, - _class_NSURLHandle, + _class_NSURL, ); - /// URLHandleClassForURL: - @Deprecated('Deprecated') - static objc.ObjCObject URLHandleClassForURL(NSURL anURL) { - final _$$ref = anURL.ref; + /// URLByResolvingAliasFileAtURL:options:error: + static NSURL? URLByResolvingAliasFileAtURL( + NSURL url, { + required DartNSUInteger options, + }) { + final _$$ref = url.ref; objc.checkOsVersionInternal( - 'NSURLHandle.URLHandleClassForURL:', - iOS: (true, null), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _class_NSURLHandle, - _sel_URLHandleClassForURL_, - _$$ref.pointer, + 'NSURL.URLByResolvingAliasFileAtURL:options:error:', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), ); - return objc.ObjCObject($ret, retain: true, release: true); - } - - /// alloc - static NSURLHandle alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSURLHandle, _sel_alloc); - return NSURLHandle.fromPointer($ret, retain: false, release: true); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1tiux5i( + _class_NSURL, + _sel_URLByResolvingAliasFileAtURL_options_error_, + _$$ref.pointer, + options, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSURL.fromPointer($ret, retain: true, release: true); + } finally { + pkg_ffi.calloc.free($err); + } } - /// allocWithZone: - static NSURLHandle allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSURLHandle, - _sel_allocWithZone_, - zone, + /// URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error: + static NSURL? URLByResolvingBookmarkData( + NSData bookmarkData, { + required DartNSUInteger options, + NSURL? relativeToURL, + required ffi.Pointer bookmarkDataIsStale, + }) { + final _$$ref = bookmarkData.ref; + final _$$ref$1 = relativeToURL?.ref; + objc.checkOsVersionInternal( + 'NSURL.URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - return NSURLHandle.fromPointer($ret, retain: false, release: true); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1ceswyu( + _class_NSURL, + _sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_, + _$$ref.pointer, + options, + _$$ref$1?.pointer ?? ffi.nullptr, + bookmarkDataIsStale, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSURL.fromPointer($ret, retain: true, release: true); + } finally { + pkg_ffi.calloc.free($err); + } } - /// cachedHandleForURL: - @Deprecated('Deprecated') - static NSURLHandle cachedHandleForURL(NSURL anURL) { - final _$$ref = anURL.ref; + /// URLWithDataRepresentation:relativeToURL: + static NSURL URLWithDataRepresentation(NSData data, {NSURL? relativeToURL}) { + final _$$ref = data.ref; + final _$$ref$1 = relativeToURL?.ref; objc.checkOsVersionInternal( - 'NSURLHandle.cachedHandleForURL:', - iOS: (true, null), - macOS: (false, (10, 0, 0)), + 'NSURL.URLWithDataRepresentation:relativeToURL:', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + _class_NSURL, + _sel_URLWithDataRepresentation_relativeToURL_, + _$$ref.pointer, + _$$ref$1?.pointer ?? ffi.nullptr, ); + return NSURL.fromPointer($ret, retain: true, release: true); + } + + /// URLWithString: + static NSURL? URLWithString(NSString URLString) { + final _$$ref = URLString.ref; final $ret = _objc_msgSend_1sotr3r( - _class_NSURLHandle, - _sel_cachedHandleForURL_, + _class_NSURL, + _sel_URLWithString_, _$$ref.pointer, ); - return NSURLHandle.fromPointer($ret, retain: true, release: true); + return $ret.address == 0 + ? null + : NSURL.fromPointer($ret, retain: true, release: true); } - /// canInitWithURL: - @Deprecated('Deprecated') - static bool canInitWithURL(NSURL anURL) { - final _$$ref = anURL.ref; + /// URLWithString:encodingInvalidCharacters: + /// + /// iOS: introduced 17.0.0 + /// macOS: introduced 14.0.0 + static NSURL? URLWithString$1( + NSString URLString, { + required bool encodingInvalidCharacters, + }) { + final _$$ref = URLString.ref; objc.checkOsVersionInternal( - 'NSURLHandle.canInitWithURL:', - iOS: (true, null), - macOS: (false, (10, 0, 0)), + 'NSURL.URLWithString:encodingInvalidCharacters:', + iOS: (false, (17, 0, 0)), + macOS: (false, (14, 0, 0)), ); - return _objc_msgSend_19nvye5( - _class_NSURLHandle, - _sel_canInitWithURL_, + final $ret = _objc_msgSend_17amj0z( + _class_NSURL, + _sel_URLWithString_encodingInvalidCharacters_, _$$ref.pointer, + encodingInvalidCharacters, ); + return $ret.address == 0 + ? null + : NSURL.fromPointer($ret, retain: true, release: true); } - /// new - static NSURLHandle new$() { - final $ret = _objc_msgSend_151sglz(_class_NSURLHandle, _sel_new); - return NSURLHandle.fromPointer($ret, retain: false, release: true); + /// URLWithString:relativeToURL: + static NSURL? URLWithString$2(NSString URLString, {NSURL? relativeToURL}) { + final _$$ref = URLString.ref; + final _$$ref$1 = relativeToURL?.ref; + final $ret = _objc_msgSend_15qeuct( + _class_NSURL, + _sel_URLWithString_relativeToURL_, + _$$ref.pointer, + _$$ref$1?.pointer ?? ffi.nullptr, + ); + return $ret.address == 0 + ? null + : NSURL.fromPointer($ret, retain: true, release: true); } - /// registerURLHandleClass: - @Deprecated('Deprecated') - static void registerURLHandleClass(objc.ObjCObject anURLHandleSubclass) { - final _$$ref = anURLHandleSubclass.ref; + /// absoluteURLWithDataRepresentation:relativeToURL: + static NSURL absoluteURLWithDataRepresentation( + NSData data, { + NSURL? relativeToURL, + }) { + final _$$ref = data.ref; + final _$$ref$1 = relativeToURL?.ref; objc.checkOsVersionInternal( - 'NSURLHandle.registerURLHandleClass:', - iOS: (true, null), - macOS: (false, (10, 0, 0)), + 'NSURL.absoluteURLWithDataRepresentation:relativeToURL:', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), ); - _objc_msgSend_xtuoz7( - _class_NSURLHandle, - _sel_registerURLHandleClass_, + final $ret = _objc_msgSend_15qeuct( + _class_NSURL, + _sel_absoluteURLWithDataRepresentation_relativeToURL_, _$$ref.pointer, + _$$ref$1?.pointer ?? ffi.nullptr, ); + return NSURL.fromPointer($ret, retain: true, release: true); } - /// Returns a new instance of NSURLHandle constructed with the default `new` method. - NSURLHandle() : this.as(new$().object$); -} + /// alloc + static NSURL alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSURL, _sel_alloc); + return NSURL.fromPointer($ret, retain: false, release: true); + } -extension NSURLHandle$Methods on NSURLHandle { - /// addClient: - @Deprecated('Deprecated') - void addClient(NSURLHandleClient client) { - final _$$ref = object$.ref; - final _$$ref$1 = client.ref; + /// allocWithZone: + static NSURL allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428(_class_NSURL, _sel_allocWithZone_, zone); + return NSURL.fromPointer($ret, retain: false, release: true); + } + + /// bookmarkDataWithContentsOfURL:error: + static NSData? bookmarkDataWithContentsOfURL(NSURL bookmarkFileURL) { + final _$$ref = bookmarkFileURL.ref; objc.checkOsVersionInternal( - 'NSURLHandle.addClient:', - iOS: (true, null), - macOS: (false, (10, 0, 0)), + 'NSURL.bookmarkDataWithContentsOfURL:error:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_addClient_, _$$ref$1.pointer); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1lhpu4m( + _class_NSURL, + _sel_bookmarkDataWithContentsOfURL_error_, + _$$ref.pointer, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSData.fromPointer($ret, retain: true, release: true); + } finally { + pkg_ffi.calloc.free($err); + } } - /// availableResourceData - @Deprecated('Deprecated') - NSData availableResourceData() { - final _$$ref = object$.ref; + /// fileURLWithFileSystemRepresentation:isDirectory:relativeToURL: + static NSURL fileURLWithFileSystemRepresentation( + ffi.Pointer path, { + required bool isDirectory, + NSURL? relativeToURL, + }) { + final _$$ref = relativeToURL?.ref; objc.checkOsVersionInternal( - 'NSURLHandle.availableResourceData', - iOS: (true, null), - macOS: (false, (10, 0, 0)), + 'NSURL.fileURLWithFileSystemRepresentation:isDirectory:relativeToURL:', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - final $ret = _objc_msgSend_151sglz( + final $ret = _objc_msgSend_1n40f6p( + _class_NSURL, + _sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_, + path, + isDirectory, + _$$ref?.pointer ?? ffi.nullptr, + ); + return NSURL.fromPointer($ret, retain: true, release: true); + } + + /// fileURLWithPath: + static NSURL fileURLWithPath(NSString path) { + final _$$ref = path.ref; + final $ret = _objc_msgSend_1sotr3r( + _class_NSURL, + _sel_fileURLWithPath_, _$$ref.pointer, - _sel_availableResourceData, ); - return NSData.fromPointer($ret, retain: true, release: true); + return NSURL.fromPointer($ret, retain: true, release: true); } - /// backgroundLoadDidFailWithReason: - @Deprecated('Deprecated') - void backgroundLoadDidFailWithReason(NSString reason) { - final _$$ref = object$.ref; - final _$$ref$1 = reason.ref; + /// fileURLWithPath:isDirectory: + static NSURL fileURLWithPath$1(NSString path, {required bool isDirectory}) { + final _$$ref = path.ref; objc.checkOsVersionInternal( - 'NSURLHandle.backgroundLoadDidFailWithReason:', - iOS: (true, null), - macOS: (false, (10, 0, 0)), + 'NSURL.fileURLWithPath:isDirectory:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), ); - _objc_msgSend_xtuoz7( + final $ret = _objc_msgSend_17amj0z( + _class_NSURL, + _sel_fileURLWithPath_isDirectory_, _$$ref.pointer, - _sel_backgroundLoadDidFailWithReason_, - _$$ref$1.pointer, + isDirectory, ); + return NSURL.fromPointer($ret, retain: true, release: true); } - /// beginLoadInBackground - @Deprecated('Deprecated') - void beginLoadInBackground() { - final _$$ref = object$.ref; + /// fileURLWithPath:isDirectory:relativeToURL: + static NSURL fileURLWithPath$2( + NSString path, { + required bool isDirectory, + NSURL? relativeToURL, + }) { + final _$$ref = path.ref; + final _$$ref$1 = relativeToURL?.ref; objc.checkOsVersionInternal( - 'NSURLHandle.beginLoadInBackground', - iOS: (true, null), - macOS: (false, (10, 0, 0)), + 'NSURL.fileURLWithPath:isDirectory:relativeToURL:', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), + ); + final $ret = _objc_msgSend_1ged0jd( + _class_NSURL, + _sel_fileURLWithPath_isDirectory_relativeToURL_, + _$$ref.pointer, + isDirectory, + _$$ref$1?.pointer ?? ffi.nullptr, ); - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_beginLoadInBackground); + return NSURL.fromPointer($ret, retain: true, release: true); } - /// cancelLoadInBackground - @Deprecated('Deprecated') - void cancelLoadInBackground() { - final _$$ref = object$.ref; + /// fileURLWithPath:relativeToURL: + static NSURL fileURLWithPath$3(NSString path, {NSURL? relativeToURL}) { + final _$$ref = path.ref; + final _$$ref$1 = relativeToURL?.ref; objc.checkOsVersionInternal( - 'NSURLHandle.cancelLoadInBackground', - iOS: (true, null), - macOS: (false, (10, 0, 0)), + 'NSURL.fileURLWithPath:relativeToURL:', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), + ); + final $ret = _objc_msgSend_15qeuct( + _class_NSURL, + _sel_fileURLWithPath_relativeToURL_, + _$$ref.pointer, + _$$ref$1?.pointer ?? ffi.nullptr, ); - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_cancelLoadInBackground); + return NSURL.fromPointer($ret, retain: true, release: true); } - /// didLoadBytes:loadComplete: - @Deprecated('Deprecated') - void didLoadBytes(NSData newBytes, {required bool loadComplete}) { - final _$$ref = object$.ref; - final _$$ref$1 = newBytes.ref; + /// new + static NSURL new$() { + final $ret = _objc_msgSend_151sglz(_class_NSURL, _sel_new); + return NSURL.fromPointer($ret, retain: false, release: true); + } + + /// resourceValuesForKeys:fromBookmarkData: + static NSDictionary? resourceValuesForKeys$1( + NSArray keys, { + required NSData fromBookmarkData, + }) { + final _$$ref = keys.ref; + final _$$ref$1 = fromBookmarkData.ref; objc.checkOsVersionInternal( - 'NSURLHandle.didLoadBytes:loadComplete:', - iOS: (true, null), - macOS: (false, (10, 0, 0)), + 'NSURL.resourceValuesForKeys:fromBookmarkData:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - _objc_msgSend_6p7ndb( + final $ret = _objc_msgSend_15qeuct( + _class_NSURL, + _sel_resourceValuesForKeys_fromBookmarkData_, _$$ref.pointer, - _sel_didLoadBytes_loadComplete_, _$$ref$1.pointer, - loadComplete, ); + return $ret.address == 0 + ? null + : NSDictionary.fromPointer($ret, retain: true, release: true); } - /// endLoadInBackground - @Deprecated('Deprecated') - void endLoadInBackground() { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURLHandle.endLoadInBackground', - iOS: (true, null), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_endLoadInBackground); + /// supportsSecureCoding + static bool getSupportsSecureCoding() { + return _objc_msgSend_91o635(_class_NSURL, _sel_supportsSecureCoding); } - /// expectedResourceDataSize - @Deprecated('Deprecated') - int expectedResourceDataSize() { - final _$$ref = object$.ref; + /// writeBookmarkData:toURL:options:error: + static bool writeBookmarkData( + NSData bookmarkData, { + required NSURL toURL, + required DartNSUInteger options, + }) { + final _$$ref = bookmarkData.ref; + final _$$ref$1 = toURL.ref; objc.checkOsVersionInternal( - 'NSURLHandle.expectedResourceDataSize', - iOS: (true, null), - macOS: (false, (10, 3, 0)), + 'NSURL.writeBookmarkData:toURL:options:error:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - return _objc_msgSend_1k101e3(_$$ref.pointer, _sel_expectedResourceDataSize); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1vxoo9h( + _class_NSURL, + _sel_writeBookmarkData_toURL_options_error_, + _$$ref.pointer, + _$$ref$1.pointer, + options, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret; + } finally { + pkg_ffi.calloc.free($err); + } } - /// failureReason - @Deprecated('Deprecated') - NSString failureReason() { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURLHandle.failureReason', - iOS: (true, null), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_failureReason); - return NSString.fromPointer($ret, retain: true, release: true); - } + /// Returns a new instance of NSURL constructed with the default `new` method. + NSURL() : this.as(new$().object$); +} - /// flushCachedData - @Deprecated('Deprecated') - void flushCachedData() { +extension NSURL$Methods on NSURL { + /// absoluteString + NSString? get absoluteString { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURLHandle.flushCachedData', - iOS: (true, null), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_flushCachedData); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_absoluteString); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); } - /// init - NSURLHandle init() { - final _$$ref$45 = object$.ref; - objc.checkOsVersionInternal( - 'NSURLHandle.init', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref$45.retainAndReturnPointer(), - _sel_init, - ); - return NSURLHandle.fromPointer($ret, retain: false, release: true); + /// absoluteURL + NSURL? get absoluteURL { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_absoluteURL); + return $ret.address == 0 + ? null + : NSURL.fromPointer($ret, retain: true, release: true); } - /// initWithURL:cached: - @Deprecated('Deprecated') - objc.ObjCObject initWithURL(NSURL anURL, {required bool cached}) { + /// baseURL + NSURL? get baseURL { final _$$ref = object$.ref; - final _$$ref$1 = anURL.ref; - objc.checkOsVersionInternal( - 'NSURLHandle.initWithURL:cached:', - iOS: (true, null), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_17amj0z( - _$$ref.retainAndReturnPointer(), - _sel_initWithURL_cached_, - _$$ref$1.pointer, - cached, - ); - return objc.ObjCObject($ret, retain: false, release: true); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_baseURL); + return $ret.address == 0 + ? null + : NSURL.fromPointer($ret, retain: true, release: true); } - /// loadInBackground - @Deprecated('Deprecated') - void loadInBackground() { + /// bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error: + NSData? bookmarkDataWithOptions( + DartNSUInteger options, { + NSArray? includingResourceValuesForKeys, + NSURL? relativeToURL, + }) { final _$$ref = object$.ref; + final _$$ref$1 = includingResourceValuesForKeys?.ref; + final _$$ref$2 = relativeToURL?.ref; objc.checkOsVersionInternal( - 'NSURLHandle.loadInBackground', - iOS: (true, null), - macOS: (false, (10, 0, 0)), + 'NSURL.bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_loadInBackground); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1wt9a7r( + _$$ref.pointer, + _sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_, + options, + _$$ref$1?.pointer ?? ffi.nullptr, + _$$ref$2?.pointer ?? ffi.nullptr, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSData.fromPointer($ret, retain: true, release: true); + } finally { + pkg_ffi.calloc.free($err); + } } - /// loadInForeground - @Deprecated('Deprecated') - NSData loadInForeground() { + /// dataRepresentation + NSData get dataRepresentation { final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSURLHandle.loadInForeground', - iOS: (true, null), - macOS: (false, (10, 0, 0)), + 'NSURL.dataRepresentation', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_loadInForeground); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_dataRepresentation); return NSData.fromPointer($ret, retain: true, release: true); } - /// propertyForKey: - @Deprecated('Deprecated') - objc.ObjCObject propertyForKey(NSString propertyKey) { - final _$$ref = object$.ref; - final _$$ref$1 = propertyKey.ref; - objc.checkOsVersionInternal( - 'NSURLHandle.propertyForKey:', - iOS: (true, null), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_propertyForKey_, - _$$ref$1.pointer, + /// encodeWithCoder: + void encodeWithCoder(NSCoder coder) { + final _$$ref$34 = object$.ref; + final _$$ref$35 = coder.ref; + _objc_msgSend_xtuoz7( + _$$ref$34.pointer, + _sel_encodeWithCoder_, + _$$ref$35.pointer, ); - return objc.ObjCObject($ret, retain: true, release: true); } - /// propertyForKeyIfAvailable: - @Deprecated('Deprecated') - objc.ObjCObject propertyForKeyIfAvailable(NSString propertyKey) { + /// filePathURL + NSURL? get filePathURL { final _$$ref = object$.ref; - final _$$ref$1 = propertyKey.ref; objc.checkOsVersionInternal( - 'NSURLHandle.propertyForKeyIfAvailable:', - iOS: (true, null), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_propertyForKeyIfAvailable_, - _$$ref$1.pointer, + 'NSURL.filePathURL', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - return objc.ObjCObject($ret, retain: true, release: true); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_filePathURL); + return $ret.address == 0 + ? null + : NSURL.fromPointer($ret, retain: true, release: true); } - /// removeClient: - @Deprecated('Deprecated') - void removeClient(NSURLHandleClient client) { + /// fileReferenceURL + NSURL? fileReferenceURL() { final _$$ref = object$.ref; - final _$$ref$1 = client.ref; objc.checkOsVersionInternal( - 'NSURLHandle.removeClient:', - iOS: (true, null), - macOS: (false, (10, 0, 0)), + 'NSURL.fileReferenceURL', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - _objc_msgSend_xtuoz7(_$$ref.pointer, _sel_removeClient_, _$$ref$1.pointer); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_fileReferenceURL); + return $ret.address == 0 + ? null + : NSURL.fromPointer($ret, retain: true, release: true); } - /// resourceData - @Deprecated('Deprecated') - NSData resourceData() { + /// fileSystemRepresentation + ffi.Pointer get fileSystemRepresentation { final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSURLHandle.resourceData', - iOS: (true, null), - macOS: (false, (10, 0, 0)), + 'NSURL.fileSystemRepresentation', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_resourceData); - return NSData.fromPointer($ret, retain: true, release: true); + return _objc_msgSend_1fuqfwb(_$$ref.pointer, _sel_fileSystemRepresentation); } - /// status - @Deprecated('Deprecated') - NSURLHandleStatus status() { + /// fragment + NSString? get fragment { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURLHandle.status', - iOS: (true, null), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_jtzjjr(_$$ref.pointer, _sel_status); - return NSURLHandleStatus.fromValue($ret); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_fragment); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); } - /// writeData: - @Deprecated('Deprecated') - bool writeData(NSData data) { + /// getFileSystemRepresentation:maxLength: + bool getFileSystemRepresentation( + ffi.Pointer buffer, { + required DartNSUInteger maxLength, + }) { final _$$ref = object$.ref; - final _$$ref$1 = data.ref; objc.checkOsVersionInternal( - 'NSURLHandle.writeData:', - iOS: (true, null), - macOS: (false, (10, 0, 0)), + 'NSURL.getFileSystemRepresentation:maxLength:', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - return _objc_msgSend_19nvye5( + return _objc_msgSend_8cymbm( _$$ref.pointer, - _sel_writeData_, - _$$ref$1.pointer, + _sel_getFileSystemRepresentation_maxLength_, + buffer, + maxLength, ); } - /// writeProperty:forKey: - @Deprecated('Deprecated') - bool writeProperty( - objc.ObjCObject propertyValue, { + /// getResourceValue:forKey:error: + bool getResourceValue( + ffi.Pointer> value, { required NSString forKey, }) { final _$$ref = object$.ref; - final _$$ref$1 = propertyValue.ref; - final _$$ref$2 = forKey.ref; + final _$$ref$1 = forKey.ref; objc.checkOsVersionInternal( - 'NSURLHandle.writeProperty:forKey:', - iOS: (true, null), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_1lsax7n( - _$$ref.pointer, - _sel_writeProperty_forKey_, - _$$ref$1.pointer, - _$$ref$2.pointer, + 'NSURL.getResourceValue:forKey:error:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1j9bhml( + _$$ref.pointer, + _sel_getResourceValue_forKey_error_, + value, + _$$ref$1.pointer, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret; + } finally { + pkg_ffi.calloc.free($err); + } } -} -/// NSURLHandleClient -@Deprecated('Deprecated') -extension type NSURLHandleClient._(objc.ObjCProtocol object$) - implements objc.ObjCProtocol { - /// Constructs a [NSURLHandleClient] that points to the same underlying object as [other]. - NSURLHandleClient.as(objc.ObjCObject other) : object$ = other; + /// hasDirectoryPath + bool get hasDirectoryPath { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.hasDirectoryPath', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), + ); + return _objc_msgSend_91o635(_$$ref.pointer, _sel_hasDirectoryPath); + } - /// Constructs a [NSURLHandleClient] that wraps the given raw object pointer. - NSURLHandleClient.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); + /// host + NSString? get host { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_host); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); + } - /// Returns whether [obj] is an instance of [NSURLHandleClient]. - static bool conformsTo(objc.ObjCObject obj) { - return _objc_msgSend_e3qsqz( - obj.ref.pointer, - _sel_conformsToProtocol_, - _protocol_NSURLHandleClient, + /// init + NSURL init() { + final _$$ref$44 = object$.ref; + objc.checkOsVersionInternal( + 'NSURL.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref$44.retainAndReturnPointer(), + _sel_init, ); + return NSURL.fromPointer($ret, retain: false, release: true); } -} -extension NSURLHandleClient$Methods on NSURLHandleClient { - /// URLHandle:resourceDataDidBecomeAvailable: - @Deprecated('Deprecated') - void URLHandle( - NSURLHandle sender, { - required NSData resourceDataDidBecomeAvailable, + /// initAbsoluteURLWithDataRepresentation:relativeToURL: + NSURL initAbsoluteURLWithDataRepresentation( + NSData data, { + NSURL? relativeToURL, }) { final _$$ref = object$.ref; - final _$$ref$1 = sender.ref; - final _$$ref$2 = resourceDataDidBecomeAvailable.ref; + final _$$ref$1 = data.ref; + final _$$ref$2 = relativeToURL?.ref; objc.checkOsVersionInternal( - 'NSURLHandleClient.URLHandle:resourceDataDidBecomeAvailable:', - iOS: (true, null), - macOS: (false, (10, 0, 0)), + 'NSURL.initAbsoluteURLWithDataRepresentation:relativeToURL:', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), ); - _objc_msgSend_pfv6jd( - _$$ref.pointer, - _sel_URLHandle_resourceDataDidBecomeAvailable_, + final $ret = _objc_msgSend_15qeuct( + _$$ref.retainAndReturnPointer(), + _sel_initAbsoluteURLWithDataRepresentation_relativeToURL_, _$$ref$1.pointer, - _$$ref$2.pointer, + _$$ref$2?.pointer ?? ffi.nullptr, ); + return NSURL.fromPointer($ret, retain: false, release: true); } - /// URLHandle:resourceDidFailLoadingWithReason: - @Deprecated('Deprecated') - void URLHandle$1( - NSURLHandle sender, { - required NSString resourceDidFailLoadingWithReason, + /// initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error: + NSURL? initByResolvingBookmarkData( + NSData bookmarkData, { + required DartNSUInteger options, + NSURL? relativeToURL, + required ffi.Pointer bookmarkDataIsStale, }) { final _$$ref = object$.ref; - final _$$ref$1 = sender.ref; - final _$$ref$2 = resourceDidFailLoadingWithReason.ref; + final _$$ref$1 = bookmarkData.ref; + final _$$ref$2 = relativeToURL?.ref; objc.checkOsVersionInternal( - 'NSURLHandleClient.URLHandle:resourceDidFailLoadingWithReason:', - iOS: (true, null), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_pfv6jd( - _$$ref.pointer, - _sel_URLHandle_resourceDidFailLoadingWithReason_, - _$$ref$1.pointer, - _$$ref$2.pointer, + 'NSURL.initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_1ceswyu( + _$$ref.retainAndReturnPointer(), + _sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_, + _$$ref$1.pointer, + options, + _$$ref$2?.pointer ?? ffi.nullptr, + bookmarkDataIsStale, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret.address == 0 + ? null + : NSURL.fromPointer($ret, retain: false, release: true); + } finally { + pkg_ffi.calloc.free($err); + } } - /// URLHandleResourceDidBeginLoading: - @Deprecated('Deprecated') - void URLHandleResourceDidBeginLoading(NSURLHandle sender) { + /// initFileURLWithFileSystemRepresentation:isDirectory:relativeToURL: + NSURL initFileURLWithFileSystemRepresentation( + ffi.Pointer path, { + required bool isDirectory, + NSURL? relativeToURL, + }) { final _$$ref = object$.ref; - final _$$ref$1 = sender.ref; + final _$$ref$1 = relativeToURL?.ref; objc.checkOsVersionInternal( - 'NSURLHandleClient.URLHandleResourceDidBeginLoading:', - iOS: (true, null), - macOS: (false, (10, 0, 0)), + 'NSURL.initFileURLWithFileSystemRepresentation:isDirectory:relativeToURL:', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_URLHandleResourceDidBeginLoading_, - _$$ref$1.pointer, + final $ret = _objc_msgSend_1n40f6p( + _$$ref.retainAndReturnPointer(), + _sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_, + path, + isDirectory, + _$$ref$1?.pointer ?? ffi.nullptr, ); + return NSURL.fromPointer($ret, retain: false, release: true); } - /// URLHandleResourceDidCancelLoading: - @Deprecated('Deprecated') - void URLHandleResourceDidCancelLoading(NSURLHandle sender) { + /// initFileURLWithPath: + NSURL initFileURLWithPath(NSString path) { final _$$ref = object$.ref; - final _$$ref$1 = sender.ref; - objc.checkOsVersionInternal( - 'NSURLHandleClient.URLHandleResourceDidCancelLoading:', - iOS: (true, null), - macOS: (false, (10, 0, 0)), - ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_URLHandleResourceDidCancelLoading_, + final _$$ref$1 = path.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.retainAndReturnPointer(), + _sel_initFileURLWithPath_, _$$ref$1.pointer, ); + return NSURL.fromPointer($ret, retain: false, release: true); } - /// URLHandleResourceDidFinishLoading: - @Deprecated('Deprecated') - void URLHandleResourceDidFinishLoading(NSURLHandle sender) { + /// initFileURLWithPath:isDirectory: + NSURL initFileURLWithPath$1(NSString path, {required bool isDirectory}) { final _$$ref = object$.ref; - final _$$ref$1 = sender.ref; + final _$$ref$1 = path.ref; objc.checkOsVersionInternal( - 'NSURLHandleClient.URLHandleResourceDidFinishLoading:', - iOS: (true, null), - macOS: (false, (10, 0, 0)), + 'NSURL.initFileURLWithPath:isDirectory:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_URLHandleResourceDidFinishLoading_, + final $ret = _objc_msgSend_17amj0z( + _$$ref.retainAndReturnPointer(), + _sel_initFileURLWithPath_isDirectory_, _$$ref$1.pointer, + isDirectory, ); - } -} - -interface class NSURLHandleClient$Builder { - /// Returns the [objc.Protocol] object for this protocol. - static objc.Protocol get $protocol => - objc.Protocol.fromPointer(_protocol_NSURLHandleClient.cast()); - - /// Builds an object that implements the NSURLHandleClient protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - /// - /// If `$keepIsolateAlive` is true, this protocol will keep this isolate - /// alive until it is garbage collected by both Dart and ObjC. - static NSURLHandleClient implement({ - required void Function(NSURLHandle, NSData) - URLHandle_resourceDataDidBecomeAvailable_, - required void Function(NSURLHandle, NSString) - URLHandle_resourceDidFailLoadingWithReason_, - required void Function(NSURLHandle) URLHandleResourceDidBeginLoading_, - required void Function(NSURLHandle) URLHandleResourceDidCancelLoading_, - required void Function(NSURLHandle) URLHandleResourceDidFinishLoading_, - bool $keepIsolateAlive = true, - }) { - final builder = objc.ObjCProtocolBuilder(debugName: 'NSURLHandleClient'); - NSURLHandleClient$Builder - .URLHandle_resourceDataDidBecomeAvailable_.implement( - builder, - URLHandle_resourceDataDidBecomeAvailable_, - ); - NSURLHandleClient$Builder - .URLHandle_resourceDidFailLoadingWithReason_.implement( - builder, - URLHandle_resourceDidFailLoadingWithReason_, - ); - NSURLHandleClient$Builder.URLHandleResourceDidBeginLoading_.implement( - builder, - URLHandleResourceDidBeginLoading_, - ); - NSURLHandleClient$Builder.URLHandleResourceDidCancelLoading_.implement( - builder, - URLHandleResourceDidCancelLoading_, - ); - NSURLHandleClient$Builder.URLHandleResourceDidFinishLoading_.implement( - builder, - URLHandleResourceDidFinishLoading_, - ); - builder.addProtocol($protocol); - return NSURLHandleClient.as( - builder.build(keepIsolateAlive: $keepIsolateAlive), - ); - } - - /// Adds the implementation of the NSURLHandleClient protocol to an existing - /// [objc.ObjCProtocolBuilder]. - /// - /// Note: You cannot call this method after you have called `builder.build`. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, { - required void Function(NSURLHandle, NSData) - URLHandle_resourceDataDidBecomeAvailable_, - required void Function(NSURLHandle, NSString) - URLHandle_resourceDidFailLoadingWithReason_, - required void Function(NSURLHandle) URLHandleResourceDidBeginLoading_, - required void Function(NSURLHandle) URLHandleResourceDidCancelLoading_, - required void Function(NSURLHandle) URLHandleResourceDidFinishLoading_, - bool $keepIsolateAlive = true, - }) { - NSURLHandleClient$Builder - .URLHandle_resourceDataDidBecomeAvailable_.implement( - builder, - URLHandle_resourceDataDidBecomeAvailable_, - ); - NSURLHandleClient$Builder - .URLHandle_resourceDidFailLoadingWithReason_.implement( - builder, - URLHandle_resourceDidFailLoadingWithReason_, - ); - NSURLHandleClient$Builder.URLHandleResourceDidBeginLoading_.implement( - builder, - URLHandleResourceDidBeginLoading_, - ); - NSURLHandleClient$Builder.URLHandleResourceDidCancelLoading_.implement( - builder, - URLHandleResourceDidCancelLoading_, - ); - NSURLHandleClient$Builder.URLHandleResourceDidFinishLoading_.implement( - builder, - URLHandleResourceDidFinishLoading_, - ); - builder.addProtocol($protocol); + return NSURL.fromPointer($ret, retain: false, release: true); } - /// Builds an object that implements the NSURLHandleClient protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All - /// methods that can be implemented as listeners will be. - /// - /// If `$keepIsolateAlive` is true, this protocol will keep this isolate - /// alive until it is garbage collected by both Dart and ObjC. - static NSURLHandleClient implementAsListener({ - required void Function(NSURLHandle, NSData) - URLHandle_resourceDataDidBecomeAvailable_, - required void Function(NSURLHandle, NSString) - URLHandle_resourceDidFailLoadingWithReason_, - required void Function(NSURLHandle) URLHandleResourceDidBeginLoading_, - required void Function(NSURLHandle) URLHandleResourceDidCancelLoading_, - required void Function(NSURLHandle) URLHandleResourceDidFinishLoading_, - bool $keepIsolateAlive = true, + /// initFileURLWithPath:isDirectory:relativeToURL: + NSURL initFileURLWithPath$2( + NSString path, { + required bool isDirectory, + NSURL? relativeToURL, }) { - final builder = objc.ObjCProtocolBuilder(debugName: 'NSURLHandleClient'); - NSURLHandleClient$Builder - .URLHandle_resourceDataDidBecomeAvailable_.implementAsListener( - builder, - URLHandle_resourceDataDidBecomeAvailable_, - ); - NSURLHandleClient$Builder - .URLHandle_resourceDidFailLoadingWithReason_.implementAsListener( - builder, - URLHandle_resourceDidFailLoadingWithReason_, - ); - NSURLHandleClient$Builder - .URLHandleResourceDidBeginLoading_.implementAsListener( - builder, - URLHandleResourceDidBeginLoading_, - ); - NSURLHandleClient$Builder - .URLHandleResourceDidCancelLoading_.implementAsListener( - builder, - URLHandleResourceDidCancelLoading_, - ); - NSURLHandleClient$Builder - .URLHandleResourceDidFinishLoading_.implementAsListener( - builder, - URLHandleResourceDidFinishLoading_, + final _$$ref = object$.ref; + final _$$ref$1 = path.ref; + final _$$ref$2 = relativeToURL?.ref; + objc.checkOsVersionInternal( + 'NSURL.initFileURLWithPath:isDirectory:relativeToURL:', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), ); - builder.addProtocol($protocol); - return NSURLHandleClient.as( - builder.build(keepIsolateAlive: $keepIsolateAlive), + final $ret = _objc_msgSend_1ged0jd( + _$$ref.retainAndReturnPointer(), + _sel_initFileURLWithPath_isDirectory_relativeToURL_, + _$$ref$1.pointer, + isDirectory, + _$$ref$2?.pointer ?? ffi.nullptr, ); + return NSURL.fromPointer($ret, retain: false, release: true); } - /// Adds the implementation of the NSURLHandleClient protocol to an existing - /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will - /// be. - /// - /// Note: You cannot call this method after you have called `builder.build`. - static void addToBuilderAsListener( - objc.ObjCProtocolBuilder builder, { - required void Function(NSURLHandle, NSData) - URLHandle_resourceDataDidBecomeAvailable_, - required void Function(NSURLHandle, NSString) - URLHandle_resourceDidFailLoadingWithReason_, - required void Function(NSURLHandle) URLHandleResourceDidBeginLoading_, - required void Function(NSURLHandle) URLHandleResourceDidCancelLoading_, - required void Function(NSURLHandle) URLHandleResourceDidFinishLoading_, - bool $keepIsolateAlive = true, - }) { - NSURLHandleClient$Builder - .URLHandle_resourceDataDidBecomeAvailable_.implementAsListener( - builder, - URLHandle_resourceDataDidBecomeAvailable_, - ); - NSURLHandleClient$Builder - .URLHandle_resourceDidFailLoadingWithReason_.implementAsListener( - builder, - URLHandle_resourceDidFailLoadingWithReason_, - ); - NSURLHandleClient$Builder - .URLHandleResourceDidBeginLoading_.implementAsListener( - builder, - URLHandleResourceDidBeginLoading_, - ); - NSURLHandleClient$Builder - .URLHandleResourceDidCancelLoading_.implementAsListener( - builder, - URLHandleResourceDidCancelLoading_, + /// initFileURLWithPath:relativeToURL: + NSURL initFileURLWithPath$3(NSString path, {NSURL? relativeToURL}) { + final _$$ref = object$.ref; + final _$$ref$1 = path.ref; + final _$$ref$2 = relativeToURL?.ref; + objc.checkOsVersionInternal( + 'NSURL.initFileURLWithPath:relativeToURL:', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), ); - NSURLHandleClient$Builder - .URLHandleResourceDidFinishLoading_.implementAsListener( - builder, - URLHandleResourceDidFinishLoading_, + final $ret = _objc_msgSend_15qeuct( + _$$ref.retainAndReturnPointer(), + _sel_initFileURLWithPath_relativeToURL_, + _$$ref$1.pointer, + _$$ref$2?.pointer ?? ffi.nullptr, ); - builder.addProtocol($protocol); + return NSURL.fromPointer($ret, retain: false, release: true); } - /// Builds an object that implements the NSURLHandleClient protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All - /// methods that can be implemented as blocking listeners will be. - /// - /// If `$keepIsolateAlive` is true, this protocol will keep this isolate - /// alive until it is garbage collected by both Dart and ObjC. - static NSURLHandleClient implementAsBlocking({ - required void Function(NSURLHandle, NSData) - URLHandle_resourceDataDidBecomeAvailable_, - required void Function(NSURLHandle, NSString) - URLHandle_resourceDidFailLoadingWithReason_, - required void Function(NSURLHandle) URLHandleResourceDidBeginLoading_, - required void Function(NSURLHandle) URLHandleResourceDidCancelLoading_, - required void Function(NSURLHandle) URLHandleResourceDidFinishLoading_, - bool $keepIsolateAlive = true, - }) { - final builder = objc.ObjCProtocolBuilder(debugName: 'NSURLHandleClient'); - NSURLHandleClient$Builder - .URLHandle_resourceDataDidBecomeAvailable_.implementAsBlocking( - builder, - URLHandle_resourceDataDidBecomeAvailable_, - ); - NSURLHandleClient$Builder - .URLHandle_resourceDidFailLoadingWithReason_.implementAsBlocking( - builder, - URLHandle_resourceDidFailLoadingWithReason_, - ); - NSURLHandleClient$Builder - .URLHandleResourceDidBeginLoading_.implementAsBlocking( - builder, - URLHandleResourceDidBeginLoading_, - ); - NSURLHandleClient$Builder - .URLHandleResourceDidCancelLoading_.implementAsBlocking( - builder, - URLHandleResourceDidCancelLoading_, - ); - NSURLHandleClient$Builder - .URLHandleResourceDidFinishLoading_.implementAsBlocking( - builder, - URLHandleResourceDidFinishLoading_, - ); - builder.addProtocol($protocol); - return NSURLHandleClient.as( - builder.build(keepIsolateAlive: $keepIsolateAlive), + /// initWithCoder: + NSURL? initWithCoder(NSCoder coder) { + final _$$ref$50 = object$.ref; + final _$$ref$51 = coder.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref$50.retainAndReturnPointer(), + _sel_initWithCoder_, + _$$ref$51.pointer, ); + return $ret.address == 0 + ? null + : NSURL.fromPointer($ret, retain: false, release: true); } - /// Adds the implementation of the NSURLHandleClient protocol to an existing - /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as blocking - /// listeners will be. - /// - /// Note: You cannot call this method after you have called `builder.build`. - static void addToBuilderAsBlocking( - objc.ObjCProtocolBuilder builder, { - required void Function(NSURLHandle, NSData) - URLHandle_resourceDataDidBecomeAvailable_, - required void Function(NSURLHandle, NSString) - URLHandle_resourceDidFailLoadingWithReason_, - required void Function(NSURLHandle) URLHandleResourceDidBeginLoading_, - required void Function(NSURLHandle) URLHandleResourceDidCancelLoading_, - required void Function(NSURLHandle) URLHandleResourceDidFinishLoading_, - bool $keepIsolateAlive = true, - }) { - NSURLHandleClient$Builder - .URLHandle_resourceDataDidBecomeAvailable_.implementAsBlocking( - builder, - URLHandle_resourceDataDidBecomeAvailable_, - ); - NSURLHandleClient$Builder - .URLHandle_resourceDidFailLoadingWithReason_.implementAsBlocking( - builder, - URLHandle_resourceDidFailLoadingWithReason_, - ); - NSURLHandleClient$Builder - .URLHandleResourceDidBeginLoading_.implementAsBlocking( - builder, - URLHandleResourceDidBeginLoading_, - ); - NSURLHandleClient$Builder - .URLHandleResourceDidCancelLoading_.implementAsBlocking( - builder, - URLHandleResourceDidCancelLoading_, + /// initWithDataRepresentation:relativeToURL: + NSURL initWithDataRepresentation(NSData data, {NSURL? relativeToURL}) { + final _$$ref = object$.ref; + final _$$ref$1 = data.ref; + final _$$ref$2 = relativeToURL?.ref; + objc.checkOsVersionInternal( + 'NSURL.initWithDataRepresentation:relativeToURL:', + iOS: (false, (9, 0, 0)), + macOS: (false, (10, 11, 0)), ); - NSURLHandleClient$Builder - .URLHandleResourceDidFinishLoading_.implementAsBlocking( - builder, - URLHandleResourceDidFinishLoading_, + final $ret = _objc_msgSend_15qeuct( + _$$ref.retainAndReturnPointer(), + _sel_initWithDataRepresentation_relativeToURL_, + _$$ref$1.pointer, + _$$ref$2?.pointer ?? ffi.nullptr, ); - builder.addProtocol($protocol); + return NSURL.fromPointer($ret, retain: false, release: true); } - /// URLHandle:resourceDataDidBecomeAvailable: - static final URLHandle_resourceDataDidBecomeAvailable_ = - objc.ObjCProtocolListenableMethod( - _protocol_NSURLHandleClient, - _sel_URLHandle_resourceDataDidBecomeAvailable_, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_fjrv01) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSURLHandleClient, - _sel_URLHandle_resourceDataDidBecomeAvailable_, - isRequired: true, - isInstanceMethod: true, - ), - (void Function(NSURLHandle, NSData) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData.fromFunction( - (ffi.Pointer _, NSURLHandle arg1, NSData arg2) => - func(arg1, arg2), - ), - (void Function(NSURLHandle, NSData) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData.listener( - (ffi.Pointer _, NSURLHandle arg1, NSData arg2) => - func(arg1, arg2), - ), - (void Function(NSURLHandle, NSData) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData.blocking( - (ffi.Pointer _, NSURLHandle arg1, NSData arg2) => - func(arg1, arg2), - ), - ); - - /// URLHandle:resourceDidFailLoadingWithReason: - static final URLHandle_resourceDidFailLoadingWithReason_ = - objc.ObjCProtocolListenableMethod( - _protocol_NSURLHandleClient, - _sel_URLHandle_resourceDidFailLoadingWithReason_, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_fjrv01) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSURLHandleClient, - _sel_URLHandle_resourceDidFailLoadingWithReason_, - isRequired: true, - isInstanceMethod: true, - ), - (void Function(NSURLHandle, NSString) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString.fromFunction( - (ffi.Pointer _, NSURLHandle arg1, NSString arg2) => - func(arg1, arg2), - ), - (void Function(NSURLHandle, NSString) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString.listener( - (ffi.Pointer _, NSURLHandle arg1, NSString arg2) => - func(arg1, arg2), - ), - (void Function(NSURLHandle, NSString) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString.blocking( - (ffi.Pointer _, NSURLHandle arg1, NSString arg2) => - func(arg1, arg2), - ), - ); - - /// URLHandleResourceDidBeginLoading: - static final URLHandleResourceDidBeginLoading_ = - objc.ObjCProtocolListenableMethod( - _protocol_NSURLHandleClient, - _sel_URLHandleResourceDidBeginLoading_, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_18v1jvf) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSURLHandleClient, - _sel_URLHandleResourceDidBeginLoading_, - isRequired: true, - isInstanceMethod: true, - ), - (void Function(NSURLHandle) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLHandle.fromFunction( - (ffi.Pointer _, NSURLHandle arg1) => func(arg1), - ), - (void Function(NSURLHandle) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLHandle.listener( - (ffi.Pointer _, NSURLHandle arg1) => func(arg1), - ), - (void Function(NSURLHandle) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLHandle.blocking( - (ffi.Pointer _, NSURLHandle arg1) => func(arg1), - ), - ); - - /// URLHandleResourceDidCancelLoading: - static final URLHandleResourceDidCancelLoading_ = - objc.ObjCProtocolListenableMethod( - _protocol_NSURLHandleClient, - _sel_URLHandleResourceDidCancelLoading_, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_18v1jvf) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSURLHandleClient, - _sel_URLHandleResourceDidCancelLoading_, - isRequired: true, - isInstanceMethod: true, - ), - (void Function(NSURLHandle) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLHandle.fromFunction( - (ffi.Pointer _, NSURLHandle arg1) => func(arg1), - ), - (void Function(NSURLHandle) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLHandle.listener( - (ffi.Pointer _, NSURLHandle arg1) => func(arg1), - ), - (void Function(NSURLHandle) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLHandle.blocking( - (ffi.Pointer _, NSURLHandle arg1) => func(arg1), - ), - ); - - /// URLHandleResourceDidFinishLoading: - static final URLHandleResourceDidFinishLoading_ = - objc.ObjCProtocolListenableMethod( - _protocol_NSURLHandleClient, - _sel_URLHandleResourceDidFinishLoading_, - ffi.Native.addressOf< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >(_1wx624s_protocolTrampoline_18v1jvf) - .cast(), - objc.getProtocolMethodSignature( - _protocol_NSURLHandleClient, - _sel_URLHandleResourceDidFinishLoading_, - isRequired: true, - isInstanceMethod: true, - ), - (void Function(NSURLHandle) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLHandle.fromFunction( - (ffi.Pointer _, NSURLHandle arg1) => func(arg1), - ), - (void Function(NSURLHandle) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLHandle.listener( - (ffi.Pointer _, NSURLHandle arg1) => func(arg1), - ), - (void Function(NSURLHandle) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLHandle.blocking( - (ffi.Pointer _, NSURLHandle arg1) => func(arg1), - ), - ); -} - -enum NSURLHandleStatus { - NSURLHandleNotLoaded(0), - NSURLHandleLoadSucceeded(1), - NSURLHandleLoadInProgress(2), - NSURLHandleLoadFailed(3); - - final int value; - const NSURLHandleStatus(this.value); - - static NSURLHandleStatus fromValue(int value) => switch (value) { - 0 => NSURLHandleNotLoaded, - 1 => NSURLHandleLoadSucceeded, - 2 => NSURLHandleLoadInProgress, - 3 => NSURLHandleLoadFailed, - _ => throw ArgumentError('Unknown value for NSURLHandleStatus: $value'), - }; -} - -/// NSURLLoading -extension NSURLLoading on NSURL { - /// URLHandleUsingCache: - @Deprecated('Use NSURLConnection instead') - NSURLHandle? URLHandleUsingCache(bool shouldUseCache) { + /// initWithString: + NSURL? initWithString(NSString URLString) { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.URLHandleUsingCache:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_1t6aok9( - _$$ref.pointer, - _sel_URLHandleUsingCache_, - shouldUseCache, + final _$$ref$1 = URLString.ref; + final $ret = _objc_msgSend_1sotr3r( + _$$ref.retainAndReturnPointer(), + _sel_initWithString_, + _$$ref$1.pointer, ); return $ret.address == 0 ? null - : NSURLHandle.fromPointer($ret, retain: true, release: true); + : NSURL.fromPointer($ret, retain: false, release: true); } - /// loadResourceDataNotifyingClient:usingCache: - @Deprecated('Use NSURLConnection instead') - void loadResourceDataNotifyingClient( - objc.ObjCObject client, { - required bool usingCache, + /// initWithString:encodingInvalidCharacters: + /// + /// iOS: introduced 17.0.0 + /// macOS: introduced 14.0.0 + NSURL? initWithString$1( + NSString URLString, { + required bool encodingInvalidCharacters, }) { final _$$ref = object$.ref; - final _$$ref$1 = client.ref; + final _$$ref$1 = URLString.ref; objc.checkOsVersionInternal( - 'NSURL.loadResourceDataNotifyingClient:usingCache:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), + 'NSURL.initWithString:encodingInvalidCharacters:', + iOS: (false, (17, 0, 0)), + macOS: (false, (14, 0, 0)), ); - _objc_msgSend_6p7ndb( - _$$ref.pointer, - _sel_loadResourceDataNotifyingClient_usingCache_, + final $ret = _objc_msgSend_17amj0z( + _$$ref.retainAndReturnPointer(), + _sel_initWithString_encodingInvalidCharacters_, _$$ref$1.pointer, - usingCache, + encodingInvalidCharacters, ); + return $ret.address == 0 + ? null + : NSURL.fromPointer($ret, retain: false, release: true); } - /// propertyForKey: - @Deprecated('Use NSURLConnection instead') - objc.ObjCObject? propertyForKey(NSString propertyKey) { + /// initWithString:relativeToURL: + NSURL? initWithString$2(NSString URLString, {NSURL? relativeToURL}) { final _$$ref = object$.ref; - final _$$ref$1 = propertyKey.ref; - objc.checkOsVersionInternal( - 'NSURL.propertyForKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_propertyForKey_, + final _$$ref$1 = URLString.ref; + final _$$ref$2 = relativeToURL?.ref; + final $ret = _objc_msgSend_15qeuct( + _$$ref.retainAndReturnPointer(), + _sel_initWithString_relativeToURL_, _$$ref$1.pointer, + _$$ref$2?.pointer ?? ffi.nullptr, ); return $ret.address == 0 ? null - : objc.ObjCObject($ret, retain: true, release: true); + : NSURL.fromPointer($ret, retain: false, release: true); } - /// resourceDataUsingCache: - @Deprecated('Use NSURLConnection instead') - NSData? resourceDataUsingCache(bool shouldUseCache) { + /// isFileReferenceURL + bool isFileReferenceURL() { final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSURL.resourceDataUsingCache:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_1t6aok9( - _$$ref.pointer, - _sel_resourceDataUsingCache_, - shouldUseCache, + 'NSURL.isFileReferenceURL', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), ); - return $ret.address == 0 - ? null - : NSData.fromPointer($ret, retain: true, release: true); + return _objc_msgSend_91o635(_$$ref.pointer, _sel_isFileReferenceURL); } - /// setProperty:forKey: - @Deprecated('Use NSURLConnection instead') - bool setProperty(objc.ObjCObject property, {required NSString forKey}) { + /// isFileURL + bool get isFileURL { final _$$ref = object$.ref; - final _$$ref$1 = property.ref; - final _$$ref$2 = forKey.ref; - objc.checkOsVersionInternal( - 'NSURL.setProperty:forKey:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_1lsax7n( - _$$ref.pointer, - _sel_setProperty_forKey_, - _$$ref$1.pointer, - _$$ref$2.pointer, - ); + return _objc_msgSend_91o635(_$$ref.pointer, _sel_isFileURL); } - /// setResourceData: - @Deprecated('Use NSURLConnection instead') - bool setResourceData(NSData data) { + /// iOS: introduced 2.0.0, deprecated 13.0.0 + /// macOS: introduced 10.2.0, deprecated 10.15.0 + @Deprecated( + 'The parameterString method is deprecated. Post deprecation for applications linked with or after the macOS 10.15, and for all iOS, watchOS, and tvOS applications, parameterString will always return nil, and the path method will return the complete path including the semicolon separator and params component if the URL string contains them.', + ) + NSString? get parameterString { final _$$ref = object$.ref; - final _$$ref$1 = data.ref; objc.checkOsVersionInternal( - 'NSURL.setResourceData:', + 'NSURL.parameterString', iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_setResourceData_, - _$$ref$1.pointer, + macOS: (false, (10, 2, 0)), ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_parameterString); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); + } + + /// password + NSString? get password { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_password); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); } -} -/// NSURLPathUtilities -extension NSURLPathUtilities on NSURL { - /// URLByAppendingPathComponent: - NSURL? URLByAppendingPathComponent(NSString pathComponent) { + /// path + NSString? get path { final _$$ref = object$.ref; - final _$$ref$1 = pathComponent.ref; - objc.checkOsVersionInternal( - 'NSURL.URLByAppendingPathComponent:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_URLByAppendingPathComponent_, - _$$ref$1.pointer, - ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_path); return $ret.address == 0 ? null - : NSURL.fromPointer($ret, retain: true, release: true); + : NSString.fromPointer($ret, retain: true, release: true); } - /// URLByAppendingPathComponent:isDirectory: - NSURL? URLByAppendingPathComponent$1( - NSString pathComponent, { - required bool isDirectory, - }) { + /// port + NSNumber? get port { final _$$ref = object$.ref; - final _$$ref$1 = pathComponent.ref; - objc.checkOsVersionInternal( - 'NSURL.URLByAppendingPathComponent:isDirectory:', - iOS: (false, (5, 0, 0)), - macOS: (false, (10, 7, 0)), - ); - final $ret = _objc_msgSend_17amj0z( - _$$ref.pointer, - _sel_URLByAppendingPathComponent_isDirectory_, - _$$ref$1.pointer, - isDirectory, - ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_port); return $ret.address == 0 ? null - : NSURL.fromPointer($ret, retain: true, release: true); + : NSNumber.fromPointer($ret, retain: true, release: true); } - /// URLByAppendingPathExtension: - NSURL? URLByAppendingPathExtension(NSString pathExtension) { + /// query + NSString? get query { final _$$ref = object$.ref; - final _$$ref$1 = pathExtension.ref; - objc.checkOsVersionInternal( - 'NSURL.URLByAppendingPathExtension:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_URLByAppendingPathExtension_, - _$$ref$1.pointer, - ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_query); return $ret.address == 0 ? null - : NSURL.fromPointer($ret, retain: true, release: true); + : NSString.fromPointer($ret, retain: true, release: true); } - /// URLByDeletingLastPathComponent - NSURL? get URLByDeletingLastPathComponent { + /// relativePath + NSString? get relativePath { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.URLByDeletingLastPathComponent', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_URLByDeletingLastPathComponent, - ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_relativePath); return $ret.address == 0 ? null - : NSURL.fromPointer($ret, retain: true, release: true); + : NSString.fromPointer($ret, retain: true, release: true); } - /// URLByDeletingPathExtension - NSURL? get URLByDeletingPathExtension { + /// relativeString + NSString get relativeString { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.URLByDeletingPathExtension', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_URLByDeletingPathExtension, - ); - return $ret.address == 0 - ? null - : NSURL.fromPointer($ret, retain: true, release: true); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_relativeString); + return NSString.fromPointer($ret, retain: true, release: true); } - /// URLByResolvingSymlinksInPath - NSURL? get URLByResolvingSymlinksInPath { + /// removeAllCachedResourceValues + void removeAllCachedResourceValues() { final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSURL.URLByResolvingSymlinksInPath', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_URLByResolvingSymlinksInPath, + 'NSURL.removeAllCachedResourceValues', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - return $ret.address == 0 - ? null - : NSURL.fromPointer($ret, retain: true, release: true); + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_removeAllCachedResourceValues); } - /// URLByStandardizingPath - NSURL? get URLByStandardizingPath { + /// removeCachedResourceValueForKey: + void removeCachedResourceValueForKey(NSString key) { final _$$ref = object$.ref; + final _$$ref$1 = key.ref; objc.checkOsVersionInternal( - 'NSURL.URLByStandardizingPath', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSURL.removeCachedResourceValueForKey:', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - final $ret = _objc_msgSend_151sglz( + _objc_msgSend_xtuoz7( _$$ref.pointer, - _sel_URLByStandardizingPath, + _sel_removeCachedResourceValueForKey_, + _$$ref$1.pointer, ); + } + + /// resourceSpecifier + NSString? get resourceSpecifier { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_resourceSpecifier); return $ret.address == 0 ? null - : NSURL.fromPointer($ret, retain: true, release: true); + : NSString.fromPointer($ret, retain: true, release: true); } - /// checkResourceIsReachableAndReturnError: - bool checkResourceIsReachableAndReturnError() { + /// resourceValuesForKeys:error: + NSDictionary? resourceValuesForKeys(NSArray keys) { final _$$ref = object$.ref; + final _$$ref$1 = keys.ref; objc.checkOsVersionInternal( - 'NSURL.checkResourceIsReachableAndReturnError:', + 'NSURL.resourceValuesForKeys:error:', iOS: (false, (4, 0, 0)), macOS: (false, (10, 6, 0)), ); final $err = pkg_ffi.calloc>(); try { - final $ret = _objc_msgSend_1dom33q( + final $ret = _objc_msgSend_1lhpu4m( _$$ref.pointer, - _sel_checkResourceIsReachableAndReturnError_, + _sel_resourceValuesForKeys_error_, + _$$ref$1.pointer, $err, ); objc.NSErrorException.checkErrorPointer($err.value); - return $ret; + return $ret.address == 0 + ? null + : NSDictionary.fromPointer($ret, retain: true, release: true); } finally { pkg_ffi.calloc.free($err); } } - /// lastPathComponent - NSString? get lastPathComponent { + /// scheme + NSString? get scheme { final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSURL.lastPathComponent', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_lastPathComponent); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_scheme); return $ret.address == 0 ? null : NSString.fromPointer($ret, retain: true, release: true); } - /// pathComponents - NSArray? get pathComponents { + /// setResourceValue:forKey:error: + bool setResourceValue(objc.ObjCObject? value, {required NSString forKey}) { final _$$ref = object$.ref; + final _$$ref$1 = value?.ref; + final _$$ref$2 = forKey.ref; objc.checkOsVersionInternal( - 'NSURL.pathComponents', + 'NSURL.setResourceValue:forKey:error:', iOS: (false, (4, 0, 0)), macOS: (false, (10, 6, 0)), ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_pathComponents); - return $ret.address == 0 - ? null - : NSArray.fromPointer($ret, retain: true, release: true); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_6z4k82( + _$$ref.pointer, + _sel_setResourceValue_forKey_error_, + _$$ref$1?.pointer ?? ffi.nullptr, + _$$ref$2.pointer, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret; + } finally { + pkg_ffi.calloc.free($err); + } } - /// pathExtension - NSString? get pathExtension { + /// setResourceValues:error: + bool setResourceValues(NSDictionary keyedValues) { final _$$ref = object$.ref; + final _$$ref$1 = keyedValues.ref; objc.checkOsVersionInternal( - 'NSURL.pathExtension', + 'NSURL.setResourceValues:error:', iOS: (false, (4, 0, 0)), macOS: (false, (10, 6, 0)), ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_pathExtension); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); + final $err = pkg_ffi.calloc>(); + try { + final $ret = _objc_msgSend_l9p60w( + _$$ref.pointer, + _sel_setResourceValues_error_, + _$$ref$1.pointer, + $err, + ); + objc.NSErrorException.checkErrorPointer($err.value); + return $ret; + } finally { + pkg_ffi.calloc.free($err); + } } - /// fileURLWithPathComponents: - static NSURL? fileURLWithPathComponents(NSArray components) { - final _$$ref = components.ref; + /// setTemporaryResourceValue:forKey: + void setTemporaryResourceValue( + objc.ObjCObject? value, { + required NSString forKey, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = value?.ref; + final _$$ref$2 = forKey.ref; objc.checkOsVersionInternal( - 'NSURL.fileURLWithPathComponents:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), + 'NSURL.setTemporaryResourceValue:forKey:', + iOS: (false, (7, 0, 0)), + macOS: (false, (10, 9, 0)), ); - final $ret = _objc_msgSend_1sotr3r( - _class_NSURL, - _sel_fileURLWithPathComponents_, + _objc_msgSend_pfv6jd( _$$ref.pointer, + _sel_setTemporaryResourceValue_forKey_, + _$$ref$1?.pointer ?? ffi.nullptr, + _$$ref$2.pointer, ); + } + + /// standardizedURL + NSURL? get standardizedURL { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_standardizedURL); return $ret.address == 0 ? null : NSURL.fromPointer($ret, retain: true, release: true); } -} -/// NSURLUtilities -extension NSURLUtilities on NSCharacterSet { - /// URLFragmentAllowedCharacterSet - static NSCharacterSet getURLFragmentAllowedCharacterSet() { + /// startAccessingSecurityScopedResource + bool startAccessingSecurityScopedResource() { + final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSCharacterSet.URLFragmentAllowedCharacterSet', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), + 'NSURL.startAccessingSecurityScopedResource', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_151sglz( - _class_NSCharacterSet, - _sel_URLFragmentAllowedCharacterSet, + return _objc_msgSend_91o635( + _$$ref.pointer, + _sel_startAccessingSecurityScopedResource, ); - return NSCharacterSet.fromPointer($ret, retain: true, release: true); } - /// URLHostAllowedCharacterSet - static NSCharacterSet getURLHostAllowedCharacterSet() { + /// stopAccessingSecurityScopedResource + void stopAccessingSecurityScopedResource() { + final _$$ref = object$.ref; objc.checkOsVersionInternal( - 'NSCharacterSet.URLHostAllowedCharacterSet', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), + 'NSURL.stopAccessingSecurityScopedResource', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 7, 0)), ); - final $ret = _objc_msgSend_151sglz( - _class_NSCharacterSet, - _sel_URLHostAllowedCharacterSet, + _objc_msgSend_1pl9qdv( + _$$ref.pointer, + _sel_stopAccessingSecurityScopedResource, ); - return NSCharacterSet.fromPointer($ret, retain: true, release: true); } - /// URLPasswordAllowedCharacterSet - static NSCharacterSet getURLPasswordAllowedCharacterSet() { - objc.checkOsVersionInternal( - 'NSCharacterSet.URLPasswordAllowedCharacterSet', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _class_NSCharacterSet, - _sel_URLPasswordAllowedCharacterSet, - ); - return NSCharacterSet.fromPointer($ret, retain: true, release: true); + /// user + NSString? get user { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_user); + return $ret.address == 0 + ? null + : NSString.fromPointer($ret, retain: true, release: true); } +} - /// URLPathAllowedCharacterSet - static NSCharacterSet getURLPathAllowedCharacterSet() { - objc.checkOsVersionInternal( - 'NSCharacterSet.URLPathAllowedCharacterSet', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _class_NSCharacterSet, - _sel_URLPathAllowedCharacterSet, - ); - return NSCharacterSet.fromPointer($ret, retain: true, release: true); - } +sealed class NSURLBookmarkCreationOptions { + static const NSURLBookmarkCreationPreferFileIDResolution = 256; + static const NSURLBookmarkCreationMinimalBookmark = 512; + static const NSURLBookmarkCreationSuitableForBookmarkFile = 1024; + static const NSURLBookmarkCreationWithSecurityScope = 2048; + static const NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = 4096; + static const NSURLBookmarkCreationWithoutImplicitSecurityScope = 536870912; +} - /// URLQueryAllowedCharacterSet - static NSCharacterSet getURLQueryAllowedCharacterSet() { - objc.checkOsVersionInternal( - 'NSCharacterSet.URLQueryAllowedCharacterSet', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _class_NSCharacterSet, - _sel_URLQueryAllowedCharacterSet, - ); - return NSCharacterSet.fromPointer($ret, retain: true, release: true); +sealed class NSURLBookmarkResolutionOptions { + static const NSURLBookmarkResolutionWithoutUI = 256; + static const NSURLBookmarkResolutionWithoutMounting = 512; + static const NSURLBookmarkResolutionWithSecurityScope = 1024; + static const NSURLBookmarkResolutionWithoutImplicitStartAccessing = 32768; +} + +/// NSURLHandle +extension type NSURLHandle._(objc.ObjCObject object$) + implements objc.ObjCObject, NSObject { + /// Constructs a [NSURLHandle] that points to the same underlying object as [other]. + NSURLHandle.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); } - /// URLUserAllowedCharacterSet - static NSCharacterSet getURLUserAllowedCharacterSet() { - objc.checkOsVersionInternal( - 'NSCharacterSet.URLUserAllowedCharacterSet', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _class_NSCharacterSet, - _sel_URLUserAllowedCharacterSet, - ); - return NSCharacterSet.fromPointer($ret, retain: true, release: true); + /// Constructs a [NSURLHandle] that wraps the given raw object pointer. + NSURLHandle.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + assert(isA(object$)); } -} -/// NSURLUtilities -extension NSURLUtilities$1 on NSString { - /// stringByAddingPercentEncodingWithAllowedCharacters: - NSString? stringByAddingPercentEncodingWithAllowedCharacters( - NSCharacterSet allowedCharacters, - ) { - final _$$ref = object$.ref; - final _$$ref$1 = allowedCharacters.ref; - objc.checkOsVersionInternal( - 'NSString.stringByAddingPercentEncodingWithAllowedCharacters:', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - final $ret = _objc_msgSend_1sotr3r( - _$$ref.pointer, - _sel_stringByAddingPercentEncodingWithAllowedCharacters_, - _$$ref$1.pointer, - ); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSURLHandle]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSURLHandle, + ); + + /// alloc + static NSURLHandle alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSURLHandle, _sel_alloc); + return NSURLHandle.fromPointer($ret, retain: false, release: true); } - /// stringByAddingPercentEscapesUsingEncoding: - @Deprecated( - 'Use -stringByAddingPercentEncodingWithAllowedCharacters: instead, which always uses the recommended UTF-8 encoding, and which encodes for a specific URL component or subcomponent since each URL component or subcomponent has different rules for what characters are valid.', - ) - NSString? stringByAddingPercentEscapesUsingEncoding(DartNSUInteger enc) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSString.stringByAddingPercentEscapesUsingEncoding:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_14hpxwa( - _$$ref.pointer, - _sel_stringByAddingPercentEscapesUsingEncoding_, - enc, + /// allocWithZone: + static NSURLHandle allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSURLHandle, + _sel_allocWithZone_, + zone, ); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); + return NSURLHandle.fromPointer($ret, retain: false, release: true); } - /// stringByRemovingPercentEncoding - NSString? get stringByRemovingPercentEncoding { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSString.stringByRemovingPercentEncoding', - iOS: (false, (7, 0, 0)), - macOS: (false, (10, 9, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_stringByRemovingPercentEncoding, - ); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); + /// new + static NSURLHandle new$() { + final $ret = _objc_msgSend_151sglz(_class_NSURLHandle, _sel_new); + return NSURLHandle.fromPointer($ret, retain: false, release: true); } - /// stringByReplacingPercentEscapesUsingEncoding: - @Deprecated( - 'Use -stringByRemovingPercentEncoding instead, which always uses the recommended UTF-8 encoding.', - ) - NSString? stringByReplacingPercentEscapesUsingEncoding(DartNSUInteger enc) { - final _$$ref = object$.ref; + /// Returns a new instance of NSURLHandle constructed with the default `new` method. + NSURLHandle() : this.as(new$().object$); +} + +extension NSURLHandle$Methods on NSURLHandle { + /// init + NSURLHandle init() { + final _$$ref$45 = object$.ref; objc.checkOsVersionInternal( - 'NSString.stringByReplacingPercentEscapesUsingEncoding:', + 'NSURLHandle.init', iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); - final $ret = _objc_msgSend_14hpxwa( - _$$ref.pointer, - _sel_stringByReplacingPercentEscapesUsingEncoding_, - enc, + final $ret = _objc_msgSend_151sglz( + _$$ref$45.retainAndReturnPointer(), + _sel_init, ); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); + return NSURLHandle.fromPointer($ret, retain: false, release: true); } } +enum NSURLHandleStatus { + NSURLHandleNotLoaded(0), + NSURLHandleLoadSucceeded(1), + NSURLHandleLoadInProgress(2), + NSURLHandleLoadFailed(3); + + final int value; + const NSURLHandleStatus(this.value); + + static NSURLHandleStatus fromValue(int value) => switch (value) { + 0 => NSURLHandleNotLoaded, + 1 => NSURLHandleLoadSucceeded, + 2 => NSURLHandleLoadInProgress, + 3 => NSURLHandleLoadFailed, + _ => throw ArgumentError('Unknown value for NSURLHandleStatus: $value'), + }; +} + /// NSValue extension type NSValue._(objc.ObjCObject object$) implements objc.ObjCObject, NSObject, NSCopying, NSSecureCoding { @@ -34248,226 +25035,6 @@ extension NSValue$Methods on NSValue { } } -/// NSValueCreation -extension NSValueCreation on NSValue { - /// value:withObjCType: - static NSValue value( - ffi.Pointer value, { - required ffi.Pointer withObjCType, - }) { - final $ret = _objc_msgSend_e9mncn( - _class_NSValue, - _sel_value_withObjCType_, - value, - withObjCType, - ); - return NSValue.fromPointer($ret, retain: true, release: true); - } - - /// valueWithBytes:objCType: - static NSValue valueWithBytes( - ffi.Pointer value, { - required ffi.Pointer objCType, - }) { - final $ret = _objc_msgSend_e9mncn( - _class_NSValue, - _sel_valueWithBytes_objCType_, - value, - objCType, - ); - return NSValue.fromPointer($ret, retain: true, release: true); - } -} - -/// NSValueExtensionMethods -extension NSValueExtensionMethods on NSValue { - /// isEqualToValue: - bool isEqualToValue(NSValue value) { - final _$$ref = object$.ref; - final _$$ref$1 = value.ref; - return _objc_msgSend_19nvye5( - _$$ref.pointer, - _sel_isEqualToValue_, - _$$ref$1.pointer, - ); - } - - /// nonretainedObjectValue - objc.ObjCObject? get nonretainedObjectValue { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz( - _$$ref.pointer, - _sel_nonretainedObjectValue, - ); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); - } - - /// pointerValue - ffi.Pointer get pointerValue { - final _$$ref = object$.ref; - return _objc_msgSend_6ex6p5(_$$ref.pointer, _sel_pointerValue); - } - - /// valueWithNonretainedObject: - static NSValue valueWithNonretainedObject(objc.ObjCObject? anObject) { - final _$$ref = anObject?.ref; - final $ret = _objc_msgSend_1sotr3r( - _class_NSValue, - _sel_valueWithNonretainedObject_, - _$$ref?.pointer ?? ffi.nullptr, - ); - return NSValue.fromPointer($ret, retain: true, release: true); - } - - /// valueWithPointer: - static NSValue valueWithPointer(ffi.Pointer pointer) { - final $ret = _objc_msgSend_1mbt9g9( - _class_NSValue, - _sel_valueWithPointer_, - pointer, - ); - return NSValue.fromPointer($ret, retain: true, release: true); - } -} - -/// NSValueGeometryExtensions -extension NSValueGeometryExtensions on NSValue { - /// edgeInsetsValue - NSEdgeInsets get edgeInsetsValue { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSValue.edgeInsetsValue', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), - ); - final $ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants - ? _objc_msgSend_sl0cgwStret($ptr, _$$ref.pointer, _sel_edgeInsetsValue) - : $ptr.ref = _objc_msgSend_sl0cgw(_$$ref.pointer, _sel_edgeInsetsValue); - final $finalizable = $ptr.cast().asTypedList( - ffi.sizeOf(), - finalizer: pkg_ffi.calloc.nativeFree, - ); - return ffi.Struct.create($finalizable); - } - - /// pointValue - CGPoint get pointValue { - final _$$ref = object$.ref; - final $ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants - ? _objc_msgSend_1uwdhlkStret($ptr, _$$ref.pointer, _sel_pointValue) - : $ptr.ref = _objc_msgSend_1uwdhlk(_$$ref.pointer, _sel_pointValue); - final $finalizable = $ptr.cast().asTypedList( - ffi.sizeOf(), - finalizer: pkg_ffi.calloc.nativeFree, - ); - return ffi.Struct.create($finalizable); - } - - /// rectValue - CGRect get rectValue { - final _$$ref = object$.ref; - final $ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants - ? _objc_msgSend_bu1hbwStret($ptr, _$$ref.pointer, _sel_rectValue) - : $ptr.ref = _objc_msgSend_bu1hbw(_$$ref.pointer, _sel_rectValue); - final $finalizable = $ptr.cast().asTypedList( - ffi.sizeOf(), - finalizer: pkg_ffi.calloc.nativeFree, - ); - return ffi.Struct.create($finalizable); - } - - /// sizeValue - CGSize get sizeValue { - final _$$ref = object$.ref; - final $ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants - ? _objc_msgSend_1vdfkenStret($ptr, _$$ref.pointer, _sel_sizeValue) - : $ptr.ref = _objc_msgSend_1vdfken(_$$ref.pointer, _sel_sizeValue); - final $finalizable = $ptr.cast().asTypedList( - ffi.sizeOf(), - finalizer: pkg_ffi.calloc.nativeFree, - ); - return ffi.Struct.create($finalizable); - } - - /// valueWithEdgeInsets: - static NSValue valueWithEdgeInsets(NSEdgeInsets insets) { - objc.checkOsVersionInternal( - 'NSValue.valueWithEdgeInsets:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), - ); - final $ret = _objc_msgSend_sax6zm( - _class_NSValue, - _sel_valueWithEdgeInsets_, - insets, - ); - return NSValue.fromPointer($ret, retain: true, release: true); - } - - /// valueWithPoint: - static NSValue valueWithPoint(CGPoint point) { - final $ret = _objc_msgSend_wgkxx2( - _class_NSValue, - _sel_valueWithPoint_, - point, - ); - return NSValue.fromPointer($ret, retain: true, release: true); - } - - /// valueWithRect: - static NSValue valueWithRect(CGRect rect) { - final $ret = _objc_msgSend_15yz4e6( - _class_NSValue, - _sel_valueWithRect_, - rect, - ); - return NSValue.fromPointer($ret, retain: true, release: true); - } - - /// valueWithSize: - static NSValue valueWithSize(CGSize size) { - final $ret = _objc_msgSend_1c2zpn3( - _class_NSValue, - _sel_valueWithSize_, - size, - ); - return NSValue.fromPointer($ret, retain: true, release: true); - } -} - -/// NSValueRangeExtensions -extension NSValueRangeExtensions on NSValue { - /// rangeValue - NSRange get rangeValue { - final _$$ref = object$.ref; - final $ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants - ? _objc_msgSend_1u11dbbStret($ptr, _$$ref.pointer, _sel_rangeValue) - : $ptr.ref = _objc_msgSend_1u11dbb(_$$ref.pointer, _sel_rangeValue); - final $finalizable = $ptr.cast().asTypedList( - ffi.sizeOf(), - finalizer: pkg_ffi.calloc.nativeFree, - ); - return ffi.Struct.create($finalizable); - } - - /// valueWithRange: - static NSValue valueWithRange(NSRange range) { - final $ret = _objc_msgSend_1k1o1s7( - _class_NSValue, - _sel_valueWithRange_, - range, - ); - return NSValue.fromPointer($ret, retain: true, release: true); - } -} - final class NSZone extends ffi.Opaque {} /// Construction methods for `objc.ObjCBlock)>`. @@ -36428,504 +26995,42 @@ extension ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObjectImpl ffi.Pointer>, int, ) - >()(ref.pointer, arg0, arg1, arg2, arg3); - } -} - -/// Construction methods for `objc.ObjCBlock Function(ffi.Pointer)>`. -abstract final class ObjCBlock_NSZone_ffiVoid { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock Function(ffi.Pointer)> - fromPointer( - ffi.Pointer pointer, { - bool retain = false, - bool release = false, - }) => objc.ObjCBlock Function(ffi.Pointer)>( - pointer, - retain: retain, - release: release, - ); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock Function(ffi.Pointer)> - fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer arg0) - > - > - ptr, - ) => objc.ObjCBlock Function(ffi.Pointer)>( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - /// - /// If `keepIsolateAlive` is true, this block will keep this isolate alive - /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock Function(ffi.Pointer)> - fromFunction( - ffi.Pointer Function(ffi.Pointer) fn, { - bool keepIsolateAlive = true, - }) => objc.ObjCBlock Function(ffi.Pointer)>( - objc.newClosureBlock(_closureCallable, (ffi.Pointer arg0) { - return fn(arg0); - }, keepIsolateAlive), - retain: false, - release: true, - ); - - static ffi.Pointer _fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ) => block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer arg0) - > - >() - .asFunction Function(ffi.Pointer)>()(arg0); - static ffi.Pointer _fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - >(_fnPtrTrampoline) - .cast(); - static ffi.Pointer _closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ) => - (objc.getBlockClosure(block) - as ffi.Pointer Function(ffi.Pointer))(arg0); - static ffi.Pointer _closureCallable = - ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - >(_closureTrampoline) - .cast(); -} - -/// Call operator for `objc.ObjCBlock Function(ffi.Pointer)>`. -extension ObjCBlock_NSZone_ffiVoid$CallExtension - on objc.ObjCBlock Function(ffi.Pointer)> { - ffi.Pointer call(ffi.Pointer arg0) { - return ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer block, - ffi.Pointer arg0, - ) - > - >() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - >()(ref.pointer, arg0); - } -} - -/// Construction methods for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>`. -abstract final class ObjCBlock_bool_KeyType_ObjectType_bool { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - fromPointer( - ffi.Pointer pointer, { - bool retain = false, - bool release = false, - }) => - objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(pointer, retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ) - > - > - ptr, - ) => - objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - /// - /// If `keepIsolateAlive` is true, this block will keep this isolate alive - /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - fromFunction( - bool Function(objc.ObjCObject, objc.ObjCObject, ffi.Pointer) fn, { - bool keepIsolateAlive = true, - }) => - objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >( - objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ) { - return fn( - objc.ObjCObject(arg0, retain: true, release: true), - objc.ObjCObject(arg1, retain: true, release: true), - arg2, - ); - }, keepIsolateAlive), - retain: false, - release: true, - ); - - static 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); - static ffi.Pointer _fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(_fnPtrTrampoline, false) - .cast(); - static bool _closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ) => - (objc.getBlockClosure(block) - as bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1, arg2); - static ffi.Pointer _closureCallable = - ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(_closureTrampoline, false) - .cast(); -} - -/// Call operator for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>`. -extension ObjCBlock_bool_KeyType_ObjectType_bool$CallExtension - on - objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > { - bool call( - objc.ObjCObject arg0, - objc.ObjCObject arg1, - ffi.Pointer arg2, - ) { - final _$$ref = arg0.ref; - final _$$ref$1 = arg1.ref; - return ref.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, - ) - >()(ref.pointer, _$$ref.pointer, _$$ref$1.pointer, arg2); - } -} - -/// Construction methods for `objc.ObjCBlock)>`. -abstract final class ObjCBlock_bool_NSUInteger_bool { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) - > - fromPointer( - ffi.Pointer pointer, { - bool retain = false, - bool release = false, - }) => - objc.ObjCBlock< - ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) - >(pointer, retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock< - ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) - > - fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(NSUInteger arg0, ffi.Pointer arg1) - > - > - ptr, - ) => - objc.ObjCBlock< - ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) - >( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - /// - /// If `keepIsolateAlive` is true, this block will keep this isolate alive - /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock< - ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) - > - fromFunction( - bool Function(DartNSUInteger, ffi.Pointer) fn, { - bool keepIsolateAlive = true, - }) => - objc.ObjCBlock< - ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) - >( - objc.newClosureBlock(_closureCallable, ( - int arg0, - ffi.Pointer arg1, - ) { - return fn(arg0, arg1); - }, keepIsolateAlive), - retain: false, - release: true, - ); - - static bool _fnPtrTrampoline( - ffi.Pointer block, - int arg0, - ffi.Pointer arg1, - ) => block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(NSUInteger arg0, ffi.Pointer arg1) - > - >() - .asFunction)>()(arg0, arg1); - static ffi.Pointer _fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - NSUInteger, - ffi.Pointer, - ) - >(_fnPtrTrampoline, false) - .cast(); - static bool _closureTrampoline( - ffi.Pointer block, - int arg0, - ffi.Pointer arg1, - ) => - (objc.getBlockClosure(block) - as bool Function(int, ffi.Pointer))(arg0, arg1); - static ffi.Pointer _closureCallable = - ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - NSUInteger, - ffi.Pointer, - ) - >(_closureTrampoline, false) - .cast(); -} - -/// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_bool_NSUInteger_bool$CallExtension - on - objc.ObjCBlock< - ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) - > { - bool call(DartNSUInteger arg0, ffi.Pointer arg1) { - return ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer block, - NSUInteger arg0, - ffi.Pointer arg1, - ) - > - >() - .asFunction< - bool Function( - ffi.Pointer, - int, - ffi.Pointer, - ) - >()(ref.pointer, arg0, arg1); + >()(ref.pointer, arg0, arg1, arg2, arg3); } } -/// Construction methods for `objc.ObjCBlock, ffi.UnsignedLong, ffi.Pointer)>`. -abstract final class ObjCBlock_bool_ObjectType_NSUInteger_bool { +/// Construction methods for `objc.ObjCBlock Function(ffi.Pointer)>`. +abstract final class ObjCBlock_NSZone_ffiVoid { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - > + static objc.ObjCBlock Function(ffi.Pointer)> fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => - objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - >(pointer, retain: retain, release: release); + }) => objc.ObjCBlock Function(ffi.Pointer)>( + pointer, + retain: retain, + release: release, + ); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - > + static objc.ObjCBlock Function(ffi.Pointer)> fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer arg0, - NSUInteger arg1, - ffi.Pointer arg2, - ) + ffi.Pointer Function(ffi.Pointer arg0) > > ptr, - ) => - objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - >( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); + ) => objc.ObjCBlock Function(ffi.Pointer)>( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); /// Creates a block from a Dart function. /// @@ -36935,140 +27040,82 @@ abstract final class ObjCBlock_bool_ObjectType_NSUInteger_bool { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - > + static objc.ObjCBlock Function(ffi.Pointer)> fromFunction( - bool Function(objc.ObjCObject, DartNSUInteger, ffi.Pointer) fn, { + ffi.Pointer Function(ffi.Pointer) fn, { bool keepIsolateAlive = true, - }) => - objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - >( - objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, - ) { - return fn( - objc.ObjCObject(arg0, retain: true, release: true), - arg1, - arg2, - ); - }, keepIsolateAlive), - retain: false, - release: true, - ); + }) => objc.ObjCBlock Function(ffi.Pointer)>( + objc.newClosureBlock(_closureCallable, (ffi.Pointer arg0) { + return fn(arg0); + }, keepIsolateAlive), + retain: false, + release: true, + ); - static bool _fnPtrTrampoline( + static ffi.Pointer _fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, + ffi.Pointer arg0, ) => block.ref.target .cast< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer arg0, - NSUInteger arg1, - ffi.Pointer arg2, - ) + ffi.Pointer Function(ffi.Pointer arg0) > >() - .asFunction< - bool Function( - ffi.Pointer, - int, - ffi.Pointer, - ) - >()(arg0, arg1, arg2); + .asFunction Function(ffi.Pointer)>()(arg0); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Bool Function( + ffi.Pointer Function( ffi.Pointer, - ffi.Pointer, - NSUInteger, - ffi.Pointer, + ffi.Pointer, ) - >(_fnPtrTrampoline, false) + >(_fnPtrTrampoline) .cast(); - static bool _closureTrampoline( + static ffi.Pointer _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, + ffi.Pointer arg0, ) => (objc.getBlockClosure(block) - as bool Function( - ffi.Pointer, - int, - ffi.Pointer, - ))(arg0, arg1, arg2); + as ffi.Pointer Function(ffi.Pointer))(arg0); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< - ffi.Bool Function( + ffi.Pointer Function( ffi.Pointer, - ffi.Pointer, - NSUInteger, - ffi.Pointer, + ffi.Pointer, ) - >(_closureTrampoline, false) + >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock, ffi.UnsignedLong, ffi.Pointer)>`. -extension ObjCBlock_bool_ObjectType_NSUInteger_bool$CallExtension - on - objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ) - > { - bool call( - objc.ObjCObject arg0, - DartNSUInteger arg1, - ffi.Pointer arg2, - ) { - final _$$ref = arg0.ref; +/// Call operator for `objc.ObjCBlock Function(ffi.Pointer)>`. +extension ObjCBlock_NSZone_ffiVoid$CallExtension + on objc.ObjCBlock Function(ffi.Pointer)> { + ffi.Pointer call(ffi.Pointer arg0) { return ref.pointer.ref.invoke .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Pointer Function( ffi.Pointer block, - ffi.Pointer arg0, - NSUInteger arg1, - ffi.Pointer arg2, + ffi.Pointer arg0, ) > >() .asFunction< - bool Function( + ffi.Pointer Function( ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, + ffi.Pointer, ) - >()(ref.pointer, _$$ref.pointer, arg1, arg2); + >()(ref.pointer, arg0); } } -/// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. -abstract final class ObjCBlock_bool_ObjectType_ObjectType { +/// Construction methods for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>`. +abstract final class ObjCBlock_bool_KeyType_ObjectType_bool { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< ffi.Bool Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) > fromPointer( @@ -37080,6 +27127,7 @@ abstract final class ObjCBlock_bool_ObjectType_ObjectType { ffi.Bool Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) >(pointer, retain: retain, release: release); @@ -37092,6 +27140,7 @@ abstract final class ObjCBlock_bool_ObjectType_ObjectType { ffi.Bool Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) > fromFunctionPointer( @@ -37100,6 +27149,7 @@ abstract final class ObjCBlock_bool_ObjectType_ObjectType { ffi.Bool Function( ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2, ) > > @@ -37109,6 +27159,7 @@ abstract final class ObjCBlock_bool_ObjectType_ObjectType { ffi.Bool Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), @@ -37128,25 +27179,29 @@ abstract final class ObjCBlock_bool_ObjectType_ObjectType { ffi.Bool Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) > fromFunction( - bool Function(objc.ObjCObject, objc.ObjCObject) fn, { + bool Function(objc.ObjCObject, objc.ObjCObject, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< ffi.Bool Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) >( objc.newClosureBlock(_closureCallable, ( ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2, ) { return fn( objc.ObjCObject(arg0, retain: true, release: true), objc.ObjCObject(arg1, retain: true, release: true), + arg2, ); }, keepIsolateAlive), retain: false, @@ -37157,12 +27212,14 @@ abstract final class ObjCBlock_bool_ObjectType_ObjectType { 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, ) > >() @@ -37170,14 +27227,16 @@ abstract final class ObjCBlock_bool_ObjectType_ObjectType { bool Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) - >()(arg0, arg1); + >()(arg0, arg1, arg2); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) >(_fnPtrTrampoline, false) .cast(); @@ -37185,33 +27244,41 @@ abstract final class ObjCBlock_bool_ObjectType_ObjectType { ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2, ) => (objc.getBlockClosure(block) as bool Function( ffi.Pointer, ffi.Pointer, - ))(arg0, arg1); + ffi.Pointer, + ))(arg0, arg1, arg2); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) >(_closureTrampoline, false) .cast(); } -/// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. -extension ObjCBlock_bool_ObjectType_ObjectType$CallExtension +/// Call operator for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>`. +extension ObjCBlock_bool_KeyType_ObjectType_bool$CallExtension on objc.ObjCBlock< ffi.Bool Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) > { - bool call(objc.ObjCObject arg0, objc.ObjCObject arg1) { + bool call( + objc.ObjCObject arg0, + objc.ObjCObject arg1, + ffi.Pointer arg2, + ) { final _$$ref = arg0.ref; final _$$ref$1 = arg1.ref; return ref.pointer.ref.invoke @@ -37221,6 +27288,7 @@ extension ObjCBlock_bool_ObjectType_ObjectType$CallExtension ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2, ) > >() @@ -37229,16 +27297,17 @@ extension ObjCBlock_bool_ObjectType_ObjectType$CallExtension ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) - >()(ref.pointer, _$$ref.pointer, _$$ref$1.pointer); + >()(ref.pointer, _$$ref.pointer, _$$ref$1.pointer, arg2); } } -/// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. -abstract final class ObjCBlock_bool_ObjectType_bool { +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_bool_NSUInteger_bool { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, ffi.Pointer) + ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) > fromPointer( ffi.Pointer pointer, { @@ -37246,10 +27315,7 @@ abstract final class ObjCBlock_bool_ObjectType_bool { bool release = false, }) => objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ) + ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. @@ -37258,24 +27324,18 @@ abstract final class ObjCBlock_bool_ObjectType_bool { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, ffi.Pointer) + ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) + ffi.Bool Function(NSUInteger arg0, ffi.Pointer arg1) > > ptr, ) => objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ) + ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, @@ -37291,23 +27351,20 @@ abstract final class ObjCBlock_bool_ObjectType_bool { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, ffi.Pointer) + ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) > fromFunction( - bool Function(objc.ObjCObject, ffi.Pointer) fn, { + bool Function(DartNSUInteger, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ) + ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) >( objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, + int arg0, ffi.Pointer arg1, ) { - return fn(objc.ObjCObject(arg0, retain: true, release: true), arg1); + return fn(arg0, arg1); }, keepIsolateAlive), retain: false, release: true, @@ -37315,314 +27372,78 @@ abstract final class ObjCBlock_bool_ObjectType_bool { static bool _fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + int arg0, ffi.Pointer arg1, ) => block.ref.target .cast< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) + ffi.Bool Function(NSUInteger arg0, ffi.Pointer arg1) > >() - .asFunction< - bool Function(ffi.Pointer, ffi.Pointer) - >()(arg0, arg1); + .asFunction)>()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Bool Function( ffi.Pointer, - ffi.Pointer, + NSUInteger, ffi.Pointer, ) >(_fnPtrTrampoline, false) .cast(); static bool _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + int arg0, ffi.Pointer arg1, ) => (objc.getBlockClosure(block) - as bool Function( - ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1); + as bool Function(int, ffi.Pointer))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Bool Function( ffi.Pointer, - ffi.Pointer, + NSUInteger, ffi.Pointer, ) >(_closureTrampoline, false) .cast(); -} - -/// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. -extension ObjCBlock_bool_ObjectType_bool$CallExtension - on - objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ) - > { - bool call(objc.ObjCObject arg0, ffi.Pointer arg1) { - final _$$ref = arg0.ref; - return ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ) - > - >() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >()(ref.pointer, _$$ref.pointer, arg1); - } -} - -/// Construction methods for `objc.ObjCBlock)>`. -abstract final class ObjCBlock_bool_ffiVoid { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock)> fromPointer( - ffi.Pointer pointer, { - bool retain = false, - bool release = false, - }) => objc.ObjCBlock)>( - pointer, - retain: retain, - release: release, - ); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock)> - fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction arg0)> - > - ptr, - ) => objc.ObjCBlock)>( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - /// - /// If `keepIsolateAlive` is true, this block will keep this isolate alive - /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock)> fromFunction( - bool Function(ffi.Pointer) fn, { - bool keepIsolateAlive = true, - }) => objc.ObjCBlock)>( - objc.newClosureBlock(_closureCallable, (ffi.Pointer arg0) { - return fn(arg0); - }, keepIsolateAlive), - retain: false, - release: true, - ); - - static bool _fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ) => block.ref.target - .cast arg0)>>() - .asFunction)>()(arg0); - static ffi.Pointer _fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ) - >(_fnPtrTrampoline, false) - .cast(); - static bool _closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ) => (objc.getBlockClosure(block) as bool Function(ffi.Pointer))( - arg0, - ); - static ffi.Pointer _closureCallable = - ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ) - >(_closureTrampoline, false) - .cast(); -} - -/// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_bool_ffiVoid$CallExtension - on objc.ObjCBlock)> { - bool call(ffi.Pointer arg0) { - return ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer block, - ffi.Pointer arg0, - ) - > - >() - .asFunction< - bool Function(ffi.Pointer, ffi.Pointer) - >()(ref.pointer, arg0); - } -} - -/// Construction methods for `objc.ObjCBlock, Protocol)>`. -abstract final class ObjCBlock_bool_ffiVoid_Protocol { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock, Protocol)> - fromPointer( - ffi.Pointer pointer, { - bool retain = false, - bool release = false, - }) => objc.ObjCBlock, Protocol)>( - pointer, - retain: retain, - release: release, - ); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock, Protocol)> - fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) - > - > - ptr, - ) => objc.ObjCBlock, Protocol)>( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - /// - /// If `keepIsolateAlive` is true, this block will keep this isolate alive - /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock, Protocol)> - fromFunction( - bool Function(ffi.Pointer, Protocol) fn, { - bool keepIsolateAlive = true, - }) => objc.ObjCBlock, Protocol)>( - objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - return fn(arg0, Protocol.fromPointer(arg1, retain: true, release: true)); - }, keepIsolateAlive), - retain: false, - release: true, - ); - - static 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); - static ffi.Pointer _fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(_fnPtrTrampoline, false) - .cast(); - static bool _closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ) => - (objc.getBlockClosure(block) - as bool Function( - ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1); - static ffi.Pointer _closureCallable = - ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(_closureTrampoline, false) - .cast(); -} - -/// Call operator for `objc.ObjCBlock, Protocol)>`. -extension ObjCBlock_bool_ffiVoid_Protocol$CallExtension - on objc.ObjCBlock, Protocol)> { - bool call(ffi.Pointer arg0, Protocol arg1) { - final _$$ref = arg1.ref; +} + +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_bool_NSUInteger_bool$CallExtension + on + objc.ObjCBlock< + ffi.Bool Function(ffi.UnsignedLong, ffi.Pointer) + > { + bool call(DartNSUInteger arg0, ffi.Pointer arg1) { return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, + NSUInteger arg0, + ffi.Pointer arg1, ) > >() .asFunction< bool Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + int, + ffi.Pointer, ) - >()(ref.pointer, arg0, _$$ref.pointer); + >()(ref.pointer, arg0, arg1); } } -/// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. -abstract final class ObjCBlock_bool_ffiVoid_objcObjCObjectImpl { +/// Construction methods for `objc.ObjCBlock, ffi.UnsignedLong, ffi.Pointer)>`. +abstract final class ObjCBlock_bool_ObjectType_NSUInteger_bool { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, ffi.Pointer) + ffi.Bool Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) > fromPointer( ffi.Pointer pointer, { @@ -37631,8 +27452,9 @@ abstract final class ObjCBlock_bool_ffiVoid_objcObjCObjectImpl { }) => objc.ObjCBlock< ffi.Bool Function( - ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, ) >(pointer, retain: retain, release: release); @@ -37642,14 +27464,19 @@ abstract final class ObjCBlock_bool_ffiVoid_objcObjCObjectImpl { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, ffi.Pointer) + ffi.Bool Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Bool Function( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2, ) > > @@ -37657,8 +27484,9 @@ abstract final class ObjCBlock_bool_ffiVoid_objcObjCObjectImpl { ) => objc.ObjCBlock< ffi.Bool Function( - ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, ) >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), @@ -37675,23 +27503,33 @@ abstract final class ObjCBlock_bool_ffiVoid_objcObjCObjectImpl { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, ffi.Pointer) + ffi.Bool Function( + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ) > fromFunction( - bool Function(ffi.Pointer, objc.ObjCObject) fn, { + bool Function(objc.ObjCObject, DartNSUInteger, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< ffi.Bool Function( - ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, ) >( objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, ) { - return fn(arg0, objc.ObjCObject(arg1, retain: true, release: true)); + return fn( + objc.ObjCObject(arg0, retain: true, release: true), + arg1, + arg2, + ); }, keepIsolateAlive), retain: false, release: true, @@ -37699,86 +27537,103 @@ abstract final class ObjCBlock_bool_ffiVoid_objcObjCObjectImpl { static bool _fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, ) => block.ref.target .cast< ffi.NativeFunction< ffi.Bool Function( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2, ) > >() .asFunction< - bool Function(ffi.Pointer, ffi.Pointer) - >()(arg0, arg1); + bool Function( + ffi.Pointer, + int, + ffi.Pointer, + ) + >()(arg0, arg1, arg2); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Bool Function( ffi.Pointer, - ffi.Pointer, ffi.Pointer, + NSUInteger, + ffi.Pointer, ) >(_fnPtrTrampoline, false) .cast(); static bool _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, ) => (objc.getBlockClosure(block) as bool Function( - ffi.Pointer, ffi.Pointer, - ))(arg0, arg1); + int, + ffi.Pointer, + ))(arg0, arg1, arg2); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Bool Function( ffi.Pointer, - ffi.Pointer, ffi.Pointer, + NSUInteger, + ffi.Pointer, ) >(_closureTrampoline, false) .cast(); } -/// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. -extension ObjCBlock_bool_ffiVoid_objcObjCObjectImpl$CallExtension +/// Call operator for `objc.ObjCBlock, ffi.UnsignedLong, ffi.Pointer)>`. +extension ObjCBlock_bool_ObjectType_NSUInteger_bool$CallExtension on objc.ObjCBlock< ffi.Bool Function( - ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, ) > { - bool call(ffi.Pointer arg0, objc.ObjCObject arg1) { - final _$$ref = arg1.ref; + bool call( + objc.ObjCObject arg0, + DartNSUInteger arg1, + ffi.Pointer arg2, + ) { + final _$$ref = arg0.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2, ) > >() .asFunction< bool Function( ffi.Pointer, - ffi.Pointer, ffi.Pointer, + int, + ffi.Pointer, ) - >()(ref.pointer, arg0, _$$ref.pointer); + >()(ref.pointer, _$$ref.pointer, arg1, arg2); } } -/// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. -abstract final class ObjCBlock_bool_ffiVoid_objcObjCSelector { +/// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. +abstract final class ObjCBlock_bool_ObjectType_bool { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, ffi.Pointer) + ffi.Bool Function(ffi.Pointer, ffi.Pointer) > fromPointer( ffi.Pointer pointer, { @@ -37786,7 +27641,10 @@ abstract final class ObjCBlock_bool_ffiVoid_objcObjCSelector { bool release = false, }) => objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, ffi.Pointer) + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ) >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. @@ -37795,21 +27653,24 @@ abstract final class ObjCBlock_bool_ffiVoid_objcObjCSelector { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, ffi.Pointer) + ffi.Bool Function(ffi.Pointer, ffi.Pointer) > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Bool Function( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + ffi.Pointer arg1, ) > > ptr, ) => objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, ffi.Pointer) + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ) >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, @@ -37825,20 +27686,23 @@ abstract final class ObjCBlock_bool_ffiVoid_objcObjCSelector { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, ffi.Pointer) + ffi.Bool Function(ffi.Pointer, ffi.Pointer) > fromFunction( - bool Function(ffi.Pointer, ffi.Pointer) fn, { + bool Function(objc.ObjCObject, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, ffi.Pointer) + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ) >( objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return fn(arg0, arg1); + return fn(objc.ObjCObject(arg0, retain: true, release: true), arg1); }, keepIsolateAlive), retain: false, release: true, @@ -37846,88 +27710,89 @@ abstract final class ObjCBlock_bool_ffiVoid_objcObjCSelector { static bool _fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + ffi.Pointer arg1, ) => block.ref.target .cast< ffi.NativeFunction< ffi.Bool Function( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + ffi.Pointer arg1, ) > >() .asFunction< - bool Function(ffi.Pointer, ffi.Pointer) + bool Function(ffi.Pointer, ffi.Pointer) >()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Bool Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) >(_fnPtrTrampoline, false) .cast(); static bool _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + ffi.Pointer arg1, ) => (objc.getBlockClosure(block) as bool Function( - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Bool Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) >(_closureTrampoline, false) .cast(); } -/// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. -extension ObjCBlock_bool_ffiVoid_objcObjCSelector$CallExtension +/// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. +extension ObjCBlock_bool_ObjectType_bool$CallExtension on objc.ObjCBlock< ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) > { - bool call(ffi.Pointer arg0, ffi.Pointer arg1) { + bool call(objc.ObjCObject arg0, ffi.Pointer arg1) { + final _$$ref = arg0.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + ffi.Pointer arg1, ) > >() .asFunction< bool Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) - >()(ref.pointer, arg0, arg1); + >()(ref.pointer, _$$ref.pointer, arg1); } } -/// Construction methods for `objc.ObjCBlock`. -abstract final class ObjCBlock_ffiVoid { +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_bool_ffiVoid { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock fromPointer( + static objc.ObjCBlock)> fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => objc.ObjCBlock( + }) => objc.ObjCBlock)>( pointer, retain: retain, release: release, @@ -37938,9 +27803,13 @@ abstract final class ObjCBlock_ffiVoid { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunctionPointer( - ffi.Pointer> ptr, - ) => objc.ObjCBlock( + static objc.ObjCBlock)> + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction arg0)> + > + ptr, + ) => objc.ObjCBlock)>( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, release: true, @@ -37954,158 +27823,101 @@ abstract final class ObjCBlock_ffiVoid { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock fromFunction( - void Function() fn, { + static objc.ObjCBlock)> fromFunction( + bool Function(ffi.Pointer) fn, { bool keepIsolateAlive = true, - }) => objc.ObjCBlock( - objc.newClosureBlock(_closureCallable, () { - return fn(); + }) => objc.ObjCBlock)>( + objc.newClosureBlock(_closureCallable, (ffi.Pointer arg0) { + return fn(arg0); }, keepIsolateAlive), retain: false, release: true, ); - /// Creates a listener block from a Dart function. - /// - /// This block can be invoked from any thread, but only supports void - /// functions, and is not run synchronously. Async functions (ie returning - /// Future) are not supported. - /// - /// If `keepIsolateAlive` is true, this block will keep this isolate alive - /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock listener( - void Function() fn, { - bool keepIsolateAlive = true, - }) { - return objc.ObjCBlock( - objc.newBlockPort( - _1wx624s_wrapListenerBlock_1pl9qdv, - (ffi.Pointer rawArgs) => fn(), - keepIsolateAlive, - ), - retain: false, - release: true, - ); - } - - /// Creates a blocking block from a Dart function. - /// - /// This callback can be invoked from any native thread, and will block the - /// caller until the callback is handled by the Dart isolate that created - /// the block. Async functions (ie returning Future) are not supported. - /// - /// If `keepIsolateAlive` is true, this block will keep this isolate alive - /// until it is garbage collected by both Dart and ObjC. If the owner isolate - /// has shut down, and the block is invoked by native code, it may block - /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock blocking( - void Function() fn, { - bool keepIsolateAlive = true, - }) { - return objc.ObjCBlock( - objc.newBlockingBlockPort( - _1wx624s_wrapBlockingBlock_1pl9qdv, - (ffi.Pointer rawArgs) => fn(), - keepIsolateAlive, - ), - retain: false, - release: true, - ); - } - - static void _fnPtrTrampoline(ffi.Pointer block) => block - .ref - .target - .cast>() - .asFunction()(); + static bool _fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) => block.ref.target + .cast arg0)>>() + .asFunction)>()(arg0); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer) - >(_fnPtrTrampoline) + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline, false) .cast(); - static void _closureTrampoline(ffi.Pointer block) => - (objc.getBlockClosure(block) as void Function())(); + static bool _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ) => (objc.getBlockClosure(block) as bool Function(ffi.Pointer))( + arg0, + ); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer) - >(_closureTrampoline) + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline, false) .cast(); } -/// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid$CallExtension - on objc.ObjCBlock { - void call() { +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_bool_ffiVoid$CallExtension + on objc.ObjCBlock)> { + bool call(ffi.Pointer arg0) { return ref.pointer.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block) + ffi.Bool Function( + ffi.Pointer block, + ffi.Pointer arg0, + ) > >() - .asFunction)>()( - ref.pointer, - ); + .asFunction< + bool Function(ffi.Pointer, ffi.Pointer) + >()(ref.pointer, arg0); } } -/// Construction methods for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>`. -abstract final class ObjCBlock_ffiVoid_KeyType_ObjectType_bool { +/// Construction methods for `objc.ObjCBlock, Protocol)>`. +abstract final class ObjCBlock_bool_ffiVoid_Protocol { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > + static objc.ObjCBlock, Protocol)> fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(pointer, retain: retain, release: release); + }) => objc.ObjCBlock, Protocol)>( + pointer, + retain: retain, + release: release, + ); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > + static objc.ObjCBlock, Protocol)> fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, + ffi.Bool Function( + ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, ) > > ptr, - ) => - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); + ) => objc.ObjCBlock, Protocol)>( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); /// Creates a block from a Dart function. /// @@ -38115,254 +27927,139 @@ abstract final class ObjCBlock_ffiVoid_KeyType_ObjectType_bool { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > + static objc.ObjCBlock, Protocol)> fromFunction( - void Function(objc.ObjCObject, objc.ObjCObject, ffi.Pointer) fn, { - bool keepIsolateAlive = true, - }) => - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >( - objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ) { - return fn( - objc.ObjCObject(arg0, retain: true, release: true), - objc.ObjCObject(arg1, retain: true, release: true), - arg2, - ); - }, keepIsolateAlive), - retain: false, - release: true, - ); - - /// Creates a listener block from a Dart function. - /// - /// This block can be invoked from any thread, but only supports void - /// functions, and is not run synchronously. Async functions (ie returning - /// Future) are not supported. - /// - /// If `keepIsolateAlive` is true, this block will keep this isolate alive - /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - listener( - void Function(objc.ObjCObject, objc.ObjCObject, ffi.Pointer) fn, { - bool keepIsolateAlive = true, - }) { - return objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >( - objc.newBlockPort(_1wx624s_wrapListenerBlock_1o83rbn, ( - ffi.Pointer rawArgs, - ) { - final args = _BlockArgs_gk3fi2.fromPointer( - rawArgs, - retain: false, - release: false, - ); - - fn(args.arg0, args.arg1, args.arg2); - }, keepIsolateAlive), - retain: false, - release: true, - ); - } - - /// Creates a blocking block from a Dart function. - /// - /// This callback can be invoked from any native thread, and will block the - /// caller until the callback is handled by the Dart isolate that created - /// the block. Async functions (ie returning Future) are not supported. - /// - /// If `keepIsolateAlive` is true, this block will keep this isolate alive - /// until it is garbage collected by both Dart and ObjC. If the owner isolate - /// has shut down, and the block is invoked by native code, it may block - /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - blocking( - void Function(objc.ObjCObject, objc.ObjCObject, ffi.Pointer) fn, { - bool keepIsolateAlive = true, - }) { - return objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >( - objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_1o83rbn, ( - ffi.Pointer rawArgs, - ) { - final args = _BlockArgs_gk3fi2.fromPointer( - rawArgs, - retain: false, - release: false, - ); - - fn(args.arg0, args.arg1, args.arg2); - }, keepIsolateAlive), - retain: false, - release: true, - ); - } + bool Function(ffi.Pointer, Protocol) fn, { + bool keepIsolateAlive = true, + }) => objc.ObjCBlock, Protocol)>( + objc.newClosureBlock(_closureCallable, ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return fn(arg0, Protocol.fromPointer(arg1, retain: true, release: true)); + }, keepIsolateAlive), + retain: false, + release: true, + ); - static void _fnPtrTrampoline( + static bool _fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, ) => block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, + ffi.Bool Function( + ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, ) > >() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >()(arg0, arg1, arg2); + bool Function(ffi.Pointer, ffi.Pointer) + >()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function( + ffi.Bool Function( ffi.Pointer, + ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ) - >(_fnPtrTrampoline) + >(_fnPtrTrampoline, false) .cast(); - static void _closureTrampoline( + static bool _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, ) => (objc.getBlockClosure(block) - as void Function( - ffi.Pointer, + as bool Function( + ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1, arg2); + ))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function( + ffi.Bool Function( ffi.Pointer, + ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ) - >(_closureTrampoline) + >(_closureTrampoline, false) .cast(); } -/// Call operator for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>`. -extension ObjCBlock_ffiVoid_KeyType_ObjectType_bool$CallExtension - on - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > { - void call( - objc.ObjCObject arg0, - objc.ObjCObject arg1, - ffi.Pointer arg2, - ) { - final _$$ref = arg0.ref; - final _$$ref$1 = arg1.ref; +/// Call operator for `objc.ObjCBlock, Protocol)>`. +extension ObjCBlock_bool_ffiVoid_Protocol$CallExtension + on objc.ObjCBlock, Protocol)> { + bool call(ffi.Pointer arg0, Protocol arg1) { + final _$$ref = arg1.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Bool Function( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, ) > >() .asFunction< - void Function( + bool Function( ffi.Pointer, + ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ) - >()(ref.pointer, _$$ref.pointer, _$$ref$1.pointer, arg2); + >()(ref.pointer, arg0, _$$ref.pointer); } } -/// Construction methods for `objc.ObjCBlock`. -abstract final class ObjCBlock_ffiVoid_NSData_NSError { +/// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. +abstract final class ObjCBlock_bool_ffiVoid_objcObjCObjectImpl { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock fromPointer( + static objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, ffi.Pointer) + > + fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => objc.ObjCBlock( - pointer, - retain: retain, - release: release, - ); + }) => + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ) + >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock + static objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, ffi.Pointer) + > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, + ffi.Bool Function( + ffi.Pointer arg0, ffi.Pointer arg1, ) > > ptr, - ) => objc.ObjCBlock( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); + ) => + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); /// Creates a block from a Dart function. /// @@ -38372,171 +28069,111 @@ abstract final class ObjCBlock_ffiVoid_NSData_NSError { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock fromFunction( - void Function(NSData?, NSError?) fn, { + static objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, ffi.Pointer) + > + fromFunction( + bool Function(ffi.Pointer, objc.ObjCObject) fn, { bool keepIsolateAlive = true, - }) => objc.ObjCBlock( - objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - return fn( - arg0.address == 0 - ? null - : NSData.fromPointer(arg0, retain: true, release: true), - arg1.address == 0 - ? null - : NSError.fromPointer(arg1, retain: true, release: true), + }) => + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ) + >( + objc.newClosureBlock(_closureCallable, ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return fn(arg0, objc.ObjCObject(arg1, retain: true, release: true)); + }, keepIsolateAlive), + retain: false, + release: true, ); - }, keepIsolateAlive), - retain: false, - release: true, - ); - - /// Creates a listener block from a Dart function. - /// - /// This block can be invoked from any thread, but only supports void - /// functions, and is not run synchronously. Async functions (ie returning - /// Future) are not supported. - /// - /// If `keepIsolateAlive` is true, this block will keep this isolate alive - /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock listener( - void Function(NSData?, NSError?) fn, { - bool keepIsolateAlive = true, - }) { - return objc.ObjCBlock( - objc.newBlockPort(_1wx624s_wrapListenerBlock_pfv6jd, ( - ffi.Pointer rawArgs, - ) { - final args = _BlockArgs_x5cg0.fromPointer( - rawArgs, - retain: false, - release: false, - ); - - fn(args.arg0, args.arg1); - }, keepIsolateAlive), - retain: false, - release: true, - ); - } - - /// Creates a blocking block from a Dart function. - /// - /// This callback can be invoked from any native thread, and will block the - /// caller until the callback is handled by the Dart isolate that created - /// the block. Async functions (ie returning Future) are not supported. - /// - /// If `keepIsolateAlive` is true, this block will keep this isolate alive - /// until it is garbage collected by both Dart and ObjC. If the owner isolate - /// has shut down, and the block is invoked by native code, it may block - /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock blocking( - void Function(NSData?, NSError?) fn, { - bool keepIsolateAlive = true, - }) { - return objc.ObjCBlock( - objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_pfv6jd, ( - ffi.Pointer rawArgs, - ) { - final args = _BlockArgs_x5cg0.fromPointer( - rawArgs, - retain: false, - release: false, - ); - - fn(args.arg0, args.arg1); - }, keepIsolateAlive), - retain: false, - release: true, - ); - } - static void _fnPtrTrampoline( + static bool _fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, ) => block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, + ffi.Bool Function( + ffi.Pointer arg0, ffi.Pointer arg1, ) > >() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ) + bool Function(ffi.Pointer, ffi.Pointer) >()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function( + ffi.Bool Function( ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ) - >(_fnPtrTrampoline) + >(_fnPtrTrampoline, false) .cast(); - static void _closureTrampoline( + static bool _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, ) => (objc.getBlockClosure(block) - as void Function( - ffi.Pointer, + as bool Function( + ffi.Pointer, ffi.Pointer, ))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function( + ffi.Bool Function( ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ) - >(_closureTrampoline) + >(_closureTrampoline, false) .cast(); } -/// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSData_NSError$CallExtension - on objc.ObjCBlock { - void call(NSData? arg0, NSError? arg1) { - final _$$ref = arg0?.ref; - final _$$ref$1 = arg1?.ref; +/// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. +extension ObjCBlock_bool_ffiVoid_objcObjCObjectImpl$CallExtension + on + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ) + > { + bool call(ffi.Pointer arg0, objc.ObjCObject arg1) { + final _$$ref = arg1.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Bool Function( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, ) > >() .asFunction< - void Function( + bool Function( ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ) - >()( - ref.pointer, - _$$ref?.pointer ?? ffi.nullptr, - _$$ref$1?.pointer ?? ffi.nullptr, - ); + >()(ref.pointer, arg0, _$$ref.pointer); } } -/// Construction methods for `objc.ObjCBlock)>`. -abstract final class ObjCBlock_ffiVoid_NSDictionary_NSRange_bool { +/// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. +abstract final class ObjCBlock_bool_ffiVoid_objcObjCSelector { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - ffi.Void Function(NSDictionary, NSRange, ffi.Pointer) + ffi.Bool Function(ffi.Pointer, ffi.Pointer) > fromPointer( ffi.Pointer pointer, { @@ -38544,7 +28181,7 @@ abstract final class ObjCBlock_ffiVoid_NSDictionary_NSRange_bool { bool release = false, }) => objc.ObjCBlock< - ffi.Void Function(NSDictionary, NSRange, ffi.Pointer) + ffi.Bool Function(ffi.Pointer, ffi.Pointer) >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. @@ -38553,22 +28190,21 @@ abstract final class ObjCBlock_ffiVoid_NSDictionary_NSRange_bool { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - ffi.Void Function(NSDictionary, NSRange, ffi.Pointer) + ffi.Bool Function(ffi.Pointer, ffi.Pointer) > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2, + ffi.Bool Function( + ffi.Pointer arg0, + ffi.Pointer arg1, ) > > ptr, ) => objc.ObjCBlock< - ffi.Void Function(NSDictionary, NSRange, ffi.Pointer) + ffi.Bool Function(ffi.Pointer, ffi.Pointer) >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, @@ -38584,30 +28220,146 @@ abstract final class ObjCBlock_ffiVoid_NSDictionary_NSRange_bool { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function(NSDictionary, NSRange, ffi.Pointer) + ffi.Bool Function(ffi.Pointer, ffi.Pointer) > fromFunction( - void Function(NSDictionary, NSRange, ffi.Pointer) fn, { + bool Function(ffi.Pointer, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< - ffi.Void Function(NSDictionary, NSRange, ffi.Pointer) + ffi.Bool Function(ffi.Pointer, ffi.Pointer) >( objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2, + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return fn( - NSDictionary.fromPointer(arg0, retain: true, release: true), - arg1, - arg2, - ); + return fn(arg0, arg1); }, keepIsolateAlive), retain: false, release: true, ); + static 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); + static ffi.Pointer _fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_fnPtrTrampoline, false) + .cast(); + static bool _closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ) => + (objc.getBlockClosure(block) + as bool Function( + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >(_closureTrampoline, false) + .cast(); +} + +/// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. +extension ObjCBlock_bool_ffiVoid_objcObjCSelector$CallExtension + on + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ) + > { + bool call(ffi.Pointer arg0, ffi.Pointer arg1) { + return ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ) + > + >() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(ref.pointer, arg0, arg1); + } +} + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => objc.ObjCBlock( + pointer, + retain: retain, + release: release, + ); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer> ptr, + ) => objc.ObjCBlock( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + /// + /// If `keepIsolateAlive` is true, this block will keep this isolate alive + /// until it is garbage collected by both Dart and ObjC. + static objc.ObjCBlock fromFunction( + void Function() fn, { + bool keepIsolateAlive = true, + }) => objc.ObjCBlock( + objc.newClosureBlock(_closureCallable, () { + return fn(); + }, keepIsolateAlive), + retain: false, + release: true, + ); + /// Creates a listener block from a Dart function. /// /// This block can be invoked from any thread, but only supports void @@ -38616,27 +28368,16 @@ abstract final class ObjCBlock_ffiVoid_NSDictionary_NSRange_bool { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock< - ffi.Void Function(NSDictionary, NSRange, ffi.Pointer) - > - listener( - void Function(NSDictionary, NSRange, ffi.Pointer) fn, { + static objc.ObjCBlock listener( + void Function() fn, { bool keepIsolateAlive = true, }) { - return objc.ObjCBlock< - ffi.Void Function(NSDictionary, NSRange, ffi.Pointer) - >( - objc.newBlockPort(_1wx624s_wrapListenerBlock_1a22wz, ( - ffi.Pointer rawArgs, - ) { - final args = _BlockArgs_v8in3.fromPointer( - rawArgs, - retain: false, - release: false, - ); - - fn(args.arg0, args.arg1, args.arg2); - }, keepIsolateAlive), + return objc.ObjCBlock( + objc.newBlockPort( + _1wx624s_wrapListenerBlock_1pl9qdv, + (ffi.Pointer rawArgs) => fn(), + keepIsolateAlive, + ), retain: false, release: true, ); @@ -38649,131 +28390,67 @@ abstract final class ObjCBlock_ffiVoid_NSDictionary_NSRange_bool { /// the block. Async functions (ie returning Future) are not supported. /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive - /// until it is garbage collected by both Dart and ObjC. If the owner isolate - /// has shut down, and the block is invoked by native code, it may block - /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock< - ffi.Void Function(NSDictionary, NSRange, ffi.Pointer) - > - blocking( - void Function(NSDictionary, NSRange, ffi.Pointer) fn, { - bool keepIsolateAlive = true, - }) { - return objc.ObjCBlock< - ffi.Void Function(NSDictionary, NSRange, ffi.Pointer) - >( - objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_1a22wz, ( - ffi.Pointer rawArgs, - ) { - final args = _BlockArgs_v8in3.fromPointer( - rawArgs, - retain: false, - release: false, - ); - - fn(args.arg0, args.arg1, args.arg2); - }, keepIsolateAlive), - retain: false, - release: true, - ); - } - - static void _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); + /// until it is garbage collected by both Dart and ObjC. If the owner isolate + /// has shut down, and the block is invoked by native code, it may block + /// indefinitely, or have other undefined behavior. + static objc.ObjCBlock blocking( + void Function() fn, { + bool keepIsolateAlive = true, + }) { + return objc.ObjCBlock( + objc.newBlockingBlockPort( + _1wx624s_wrapBlockingBlock_1pl9qdv, + (ffi.Pointer rawArgs) => fn(), + keepIsolateAlive, + ), + retain: false, + release: true, + ); + } + + static void _fnPtrTrampoline(ffi.Pointer block) => block + .ref + .target + .cast>() + .asFunction()(); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - NSRange, - ffi.Pointer, - ) + ffi.Void Function(ffi.Pointer) >(_fnPtrTrampoline) .cast(); - static void _closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2, - ) => - (objc.getBlockClosure(block) - as void Function( - ffi.Pointer, - NSRange, - ffi.Pointer, - ))(arg0, arg1, arg2); + static void _closureTrampoline(ffi.Pointer block) => + (objc.getBlockClosure(block) as void Function())(); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - NSRange, - ffi.Pointer, - ) + ffi.Void Function(ffi.Pointer) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_ffiVoid_NSDictionary_NSRange_bool$CallExtension - on - objc.ObjCBlock< - ffi.Void Function(NSDictionary, NSRange, ffi.Pointer) - > { - void call(NSDictionary arg0, NSRange arg1, ffi.Pointer arg2) { - final _$$ref = arg0.ref; +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid$CallExtension + on objc.ObjCBlock { + void call() { return ref.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) > >() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - NSRange, - ffi.Pointer, - ) - >()(ref.pointer, _$$ref.pointer, arg1, arg2); + .asFunction)>()( + ref.pointer, + ); } } -/// Construction methods for `objc.ObjCBlock?, NSError)>, ffi.Pointer, NSDictionary)>`. -abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObjectImpl_NSDictionary { +/// Construction methods for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>`. +abstract final class ObjCBlock_ffiVoid_KeyType_ObjectType_bool { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, ffi.Pointer, - NSDictionary, + ffi.Pointer, + ffi.Pointer, ) > fromPointer( @@ -38783,11 +28460,9 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO }) => objc.ObjCBlock< ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, ffi.Pointer, - NSDictionary, + ffi.Pointer, + ffi.Pointer, ) >(pointer, retain: retain, release: release); @@ -38798,20 +28473,18 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO /// will result in a crash. static objc.ObjCBlock< ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, ffi.Pointer, - NSDictionary, + ffi.Pointer, + ffi.Pointer, ) > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, + ffi.Pointer arg2, ) > > @@ -38819,11 +28492,9 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO ) => objc.ObjCBlock< ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, ffi.Pointer, - NSDictionary, + ffi.Pointer, + ffi.Pointer, ) >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), @@ -38841,46 +28512,31 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, ffi.Pointer, - NSDictionary, + ffi.Pointer, + ffi.Pointer, ) > fromFunction( - void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, - objc.ObjCObject, - NSDictionary, - ) - fn, { + void Function(objc.ObjCObject, objc.ObjCObject, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, ffi.Pointer, - NSDictionary, + ffi.Pointer, + ffi.Pointer, ) >( objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, + ffi.Pointer arg2, ) { return fn( - ObjCBlock_ffiVoid_idNSSecureCoding_NSError.fromPointer( - arg0, - retain: true, - release: true, - ), + objc.ObjCObject(arg0, retain: true, release: true), objc.ObjCObject(arg1, retain: true, release: true), - NSDictionary.fromPointer(arg2, retain: true, release: true), + arg2, ); }, keepIsolateAlive), retain: false, @@ -38897,37 +28553,26 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, ffi.Pointer, - NSDictionary, + ffi.Pointer, + ffi.Pointer, ) > listener( - void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, - objc.ObjCObject, - NSDictionary, - ) - fn, { + void Function(objc.ObjCObject, objc.ObjCObject, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { return objc.ObjCBlock< ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, ffi.Pointer, - NSDictionary, + ffi.Pointer, + ffi.Pointer, ) >( - objc.newBlockPort(_1wx624s_wrapListenerBlock_1b3bb6a, ( + objc.newBlockPort(_1wx624s_wrapListenerBlock_1o83rbn, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_6yk1dr.fromPointer( + final args = _BlockArgs_gk3fi2.fromPointer( rawArgs, retain: false, release: false, @@ -38952,37 +28597,26 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO /// indefinitely, or have other undefined behavior. static objc.ObjCBlock< ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, ffi.Pointer, - NSDictionary, + ffi.Pointer, + ffi.Pointer, ) > blocking( - void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, - objc.ObjCObject, - NSDictionary, - ) - fn, { + void Function(objc.ObjCObject, objc.ObjCObject, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { return objc.ObjCBlock< ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, ffi.Pointer, - NSDictionary, + ffi.Pointer, + ffi.Pointer, ) >( - objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_1b3bb6a, ( + objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_1o83rbn, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_6yk1dr.fromPointer( + final args = _BlockArgs_gk3fi2.fromPointer( rawArgs, retain: false, release: false, @@ -38997,114 +28631,107 @@ abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCO static void _fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, + ffi.Pointer arg2, ) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, + ffi.Pointer arg2, ) > >() .asFunction< void Function( - ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) >()(arg0, arg1, arg2); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static void _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, + ffi.Pointer arg2, ) => (objc.getBlockClosure(block) as void Function( - ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, ))(arg0, arg1, arg2); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock?, NSError)>, ffi.Pointer, NSDictionary)>`. -extension ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObjectImpl_NSDictionary$CallExtension +/// Call operator for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>`. +extension ObjCBlock_ffiVoid_KeyType_ObjectType_bool$CallExtension on objc.ObjCBlock< ffi.Void Function( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - >, ffi.Pointer, - NSDictionary, + ffi.Pointer, + ffi.Pointer, ) > { void call( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) - > - arg0, + objc.ObjCObject arg0, objc.ObjCObject arg1, - NSDictionary arg2, + ffi.Pointer arg2, ) { final _$$ref = arg0.ref; final _$$ref$1 = arg1.ref; - final _$$ref$2 = arg2.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, + ffi.Pointer arg2, ) > >() .asFunction< void Function( - ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) - >()(ref.pointer, _$$ref.pointer, _$$ref$1.pointer, _$$ref$2.pointer); + >()(ref.pointer, _$$ref.pointer, _$$ref$1.pointer, arg2); } } -/// Construction methods for `objc.ObjCBlock)>`. -abstract final class ObjCBlock_ffiVoid_NSRange_bool { +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSData_NSError { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock)> - fromPointer( + static objc.ObjCBlock fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => objc.ObjCBlock)>( + }) => objc.ObjCBlock( pointer, retain: retain, release: release, @@ -39115,15 +28742,18 @@ abstract final class ObjCBlock_ffiVoid_NSRange_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. - static objc.ObjCBlock)> + static objc.ObjCBlock fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(NSRange arg0, ffi.Pointer arg1) + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) > > ptr, - ) => objc.ObjCBlock)>( + ) => objc.ObjCBlock( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, release: true, @@ -39137,16 +28767,22 @@ abstract final class ObjCBlock_ffiVoid_NSRange_bool { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock)> - fromFunction( - void Function(NSRange, ffi.Pointer) fn, { + static objc.ObjCBlock fromFunction( + void Function(NSData?, NSError?) fn, { bool keepIsolateAlive = true, - }) => objc.ObjCBlock)>( + }) => objc.ObjCBlock( objc.newClosureBlock(_closureCallable, ( - NSRange arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return fn(arg0, arg1); + return fn( + arg0.address == 0 + ? null + : NSData.fromPointer(arg0, retain: true, release: true), + arg1.address == 0 + ? null + : NSError.fromPointer(arg1, retain: true, release: true), + ); }, keepIsolateAlive), retain: false, release: true, @@ -39160,48 +28796,15 @@ abstract final class ObjCBlock_ffiVoid_NSRange_bool { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock)> - listener( - void Function(NSRange, ffi.Pointer) fn, { - bool keepIsolateAlive = true, - }) { - return objc.ObjCBlock)>( - objc.newBlockPort(_1wx624s_wrapListenerBlock_zkjmn1, ( - ffi.Pointer rawArgs, - ) { - final args = _BlockArgs_uckb5m.fromPointer( - rawArgs, - retain: false, - release: false, - ); - - fn(args.arg0, args.arg1); - }, keepIsolateAlive), - retain: false, - release: true, - ); - } - - /// Creates a blocking block from a Dart function. - /// - /// This callback can be invoked from any native thread, and will block the - /// caller until the callback is handled by the Dart isolate that created - /// the block. Async functions (ie returning Future) are not supported. - /// - /// If `keepIsolateAlive` is true, this block will keep this isolate alive - /// until it is garbage collected by both Dart and ObjC. If the owner isolate - /// has shut down, and the block is invoked by native code, it may block - /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock)> - blocking( - void Function(NSRange, ffi.Pointer) fn, { + static objc.ObjCBlock listener( + void Function(NSData?, NSError?) fn, { bool keepIsolateAlive = true, }) { - return objc.ObjCBlock)>( - objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_zkjmn1, ( + return objc.ObjCBlock( + objc.newBlockPort(_1wx624s_wrapListenerBlock_pfv6jd, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_uckb5m.fromPointer( + final args = _BlockArgs_x5cg0.fromPointer( rawArgs, retain: false, release: false, @@ -39214,183 +28817,6 @@ abstract final class ObjCBlock_ffiVoid_NSRange_bool { ); } - static void _fnPtrTrampoline( - ffi.Pointer block, - NSRange arg0, - ffi.Pointer arg1, - ) => block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(NSRange arg0, ffi.Pointer arg1) - > - >() - .asFunction)>()(arg0, arg1); - static ffi.Pointer _fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - NSRange, - ffi.Pointer, - ) - >(_fnPtrTrampoline) - .cast(); - static void _closureTrampoline( - ffi.Pointer block, - NSRange arg0, - ffi.Pointer arg1, - ) => - (objc.getBlockClosure(block) - as void Function(NSRange, ffi.Pointer))(arg0, arg1); - static ffi.Pointer _closureCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - NSRange, - ffi.Pointer, - ) - >(_closureTrampoline) - .cast(); -} - -/// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_ffiVoid_NSRange_bool$CallExtension - on objc.ObjCBlock)> { - void call(NSRange arg0, ffi.Pointer arg1) { - return ref.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, - ) - >()(ref.pointer, arg0, arg1); - } -} - -/// Construction methods for `objc.ObjCBlock)>`. -abstract final class ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) - > - fromPointer( - ffi.Pointer pointer, { - bool retain = false, - bool release = false, - }) => - objc.ObjCBlock< - ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) - >(pointer, retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock< - ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) - > - fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3, - ) - > - > - ptr, - ) => - objc.ObjCBlock< - ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) - >( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - /// - /// If `keepIsolateAlive` is true, this block will keep this isolate alive - /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock< - ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) - > - fromFunction( - void Function(NSString?, NSRange, NSRange, ffi.Pointer) fn, { - bool keepIsolateAlive = true, - }) => - objc.ObjCBlock< - ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) - >( - objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3, - ) { - return fn( - arg0.address == 0 - ? null - : NSString.fromPointer(arg0, retain: true, release: true), - arg1, - arg2, - arg3, - ); - }, keepIsolateAlive), - retain: false, - release: true, - ); - - /// Creates a listener block from a Dart function. - /// - /// This block can be invoked from any thread, but only supports void - /// functions, and is not run synchronously. Async functions (ie returning - /// Future) are not supported. - /// - /// If `keepIsolateAlive` is true, this block will keep this isolate alive - /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock< - ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) - > - listener( - void Function(NSString?, NSRange, NSRange, ffi.Pointer) fn, { - bool keepIsolateAlive = true, - }) { - return objc.ObjCBlock< - ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) - >( - objc.newBlockPort(_1wx624s_wrapListenerBlock_lmc3p5, ( - ffi.Pointer rawArgs, - ) { - final args = _BlockArgs_1pvrxoh.fromPointer( - rawArgs, - retain: false, - release: false, - ); - - fn(args.arg0, args.arg1, args.arg2, args.arg3); - }, keepIsolateAlive), - retain: false, - release: true, - ); - } - /// Creates a blocking block from a Dart function. /// /// This callback can be invoked from any native thread, and will block the @@ -39401,26 +28827,21 @@ abstract final class ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool { /// until it is garbage collected by both Dart and ObjC. If the owner isolate /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock< - ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) - > - blocking( - void Function(NSString?, NSRange, NSRange, ffi.Pointer) fn, { + static objc.ObjCBlock blocking( + void Function(NSData?, NSError?) fn, { bool keepIsolateAlive = true, }) { - return objc.ObjCBlock< - ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) - >( - objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_lmc3p5, ( + return objc.ObjCBlock( + objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_pfv6jd, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_1pvrxoh.fromPointer( + final args = _BlockArgs_x5cg0.fromPointer( rawArgs, retain: false, release: false, ); - fn(args.arg0, args.arg1, args.arg2, args.arg3); + fn(args.arg0, args.arg1); }, keepIsolateAlive), retain: false, release: true, @@ -39430,88 +28851,65 @@ abstract final class ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool { static void _fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3, + ffi.Pointer arg1, ) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3, + ffi.Pointer arg1, ) > >() .asFunction< void Function( ffi.Pointer, - NSRange, - NSRange, - ffi.Pointer, + ffi.Pointer, ) - >()(arg0, arg1, arg2, arg3); + >()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - NSRange, - NSRange, - ffi.Pointer, + ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static void _closureTrampoline( ffi.Pointer block, ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3, + ffi.Pointer arg1, ) => (objc.getBlockClosure(block) as void Function( ffi.Pointer, - NSRange, - NSRange, - ffi.Pointer, - ))(arg0, arg1, arg2, arg3); + ffi.Pointer, + ))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - NSRange, - NSRange, - ffi.Pointer, + ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool$CallExtension - on - objc.ObjCBlock< - ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) - > { - void call( - NSString? arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3, - ) { +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSData_NSError$CallExtension + on objc.ObjCBlock { + void call(NSData? arg0, NSError? arg1) { final _$$ref = arg0?.ref; + final _$$ref$1 = arg1?.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3, + ffi.Pointer arg1, ) > >() @@ -39519,49 +28917,82 @@ extension ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool$CallExtension void Function( ffi.Pointer, ffi.Pointer, - NSRange, - NSRange, - ffi.Pointer, + ffi.Pointer, ) - >()(ref.pointer, _$$ref?.pointer ?? ffi.nullptr, arg1, arg2, arg3); + >()( + ref.pointer, + _$$ref?.pointer ?? ffi.nullptr, + _$$ref$1?.pointer ?? ffi.nullptr, + ); } } -/// Construction methods for `objc.ObjCBlock)>`. -abstract final class ObjCBlock_ffiVoid_NSString_bool { +/// Construction methods for `objc.ObjCBlock?, NSError)>, ffi.Pointer, NSDictionary)>`. +abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObjectImpl_NSDictionary { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock)> + static objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + ffi.Pointer, + NSDictionary, + ) + > fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => objc.ObjCBlock)>( - pointer, - retain: retain, - release: release, - ); + }) => + objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + ffi.Pointer, + 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. - static objc.ObjCBlock)> + static objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + ffi.Pointer, + NSDictionary, + ) + > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) > > ptr, - ) => objc.ObjCBlock)>( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); + ) => + objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + ffi.Pointer, + NSDictionary, + ) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); /// Creates a block from a Dart function. /// @@ -39571,20 +29002,53 @@ abstract final class ObjCBlock_ffiVoid_NSString_bool { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock)> + static objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + ffi.Pointer, + NSDictionary, + ) + > fromFunction( - void Function(NSString, ffi.Pointer) fn, { + void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + objc.ObjCObject, + NSDictionary, + ) + fn, { bool keepIsolateAlive = true, - }) => objc.ObjCBlock)>( - objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - return fn(NSString.fromPointer(arg0, retain: true, release: true), arg1); - }, keepIsolateAlive), - retain: false, - release: true, - ); + }) => + objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + ffi.Pointer, + NSDictionary, + ) + >( + objc.newClosureBlock(_closureCallable, ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + return fn( + ObjCBlock_ffiVoid_idNSSecureCoding_NSError.fromPointer( + arg0, + retain: true, + release: true, + ), + objc.ObjCObject(arg1, retain: true, release: true), + NSDictionary.fromPointer(arg2, retain: true, release: true), + ); + }, keepIsolateAlive), + retain: false, + release: true, + ); /// Creates a listener block from a Dart function. /// @@ -39594,22 +29058,45 @@ abstract final class ObjCBlock_ffiVoid_NSString_bool { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock)> + static objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + ffi.Pointer, + NSDictionary, + ) + > listener( - void Function(NSString, ffi.Pointer) fn, { + void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + objc.ObjCObject, + NSDictionary, + ) + fn, { bool keepIsolateAlive = true, }) { - return objc.ObjCBlock)>( - objc.newBlockPort(_1wx624s_wrapListenerBlock_t8l8el, ( + return objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + ffi.Pointer, + NSDictionary, + ) + >( + objc.newBlockPort(_1wx624s_wrapListenerBlock_1b3bb6a, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_ounrb4.fromPointer( + final args = _BlockArgs_6yk1dr.fromPointer( rawArgs, retain: false, release: false, ); - fn(args.arg0, args.arg1); + fn(args.arg0, args.arg1, args.arg2); }, keepIsolateAlive), retain: false, release: true, @@ -39626,22 +29113,45 @@ abstract final class ObjCBlock_ffiVoid_NSString_bool { /// until it is garbage collected by both Dart and ObjC. If the owner isolate /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock)> + static objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + ffi.Pointer, + NSDictionary, + ) + > blocking( - void Function(NSString, ffi.Pointer) fn, { + void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + objc.ObjCObject, + NSDictionary, + ) + fn, { bool keepIsolateAlive = true, }) { - return objc.ObjCBlock)>( - objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_t8l8el, ( + return objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + ffi.Pointer, + NSDictionary, + ) + >( + objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_1b3bb6a, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_ounrb4.fromPointer( + final args = _BlockArgs_6yk1dr.fromPointer( rawArgs, retain: false, release: false, ); - fn(args.arg0, args.arg1); + fn(args.arg0, args.arg1, args.arg2); }, keepIsolateAlive), retain: false, release: true, @@ -39650,83 +29160,114 @@ abstract final class ObjCBlock_ffiVoid_NSString_bool { static void _fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, + 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 arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) > >() .asFunction< - void Function(ffi.Pointer, ffi.Pointer) - >()(arg0, arg1); + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + >()(arg0, arg1, arg2); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( + ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static void _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) => (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1); + ffi.Pointer, + ))(arg0, arg1, arg2); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( + ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_ffiVoid_NSString_bool$CallExtension - on objc.ObjCBlock)> { - void call(NSString arg0, ffi.Pointer arg1) { +/// Call operator for `objc.ObjCBlock?, NSError)>, ffi.Pointer, NSDictionary)>`. +extension ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObjectImpl_NSDictionary$CallExtension + on + objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + >, + ffi.Pointer, + NSDictionary, + ) + > { + void call( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, NSError) + > + arg0, + objc.ObjCObject arg1, + NSDictionary arg2, + ) { final _$$ref = arg0.ref; + final _$$ref$1 = arg1.ref; + final _$$ref$2 = arg2.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) > >() .asFunction< void Function( + ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ) - >()(ref.pointer, _$$ref.pointer, arg1); + >()(ref.pointer, _$$ref.pointer, _$$ref$1.pointer, _$$ref$2.pointer); } } -/// Construction methods for `objc.ObjCBlock`. -abstract final class ObjCBlock_ffiVoid_NSTimer { +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_NSRange_bool { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock fromPointer( + static objc.ObjCBlock)> + fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => objc.ObjCBlock( + }) => objc.ObjCBlock)>( pointer, retain: retain, release: release, @@ -39737,14 +29278,15 @@ abstract final class ObjCBlock_ffiVoid_NSTimer { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunctionPointer( + static objc.ObjCBlock)> + fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0) + ffi.Void Function(NSRange arg0, ffi.Pointer arg1) > > ptr, - ) => objc.ObjCBlock( + ) => objc.ObjCBlock)>( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, release: true, @@ -39758,14 +29300,16 @@ abstract final class ObjCBlock_ffiVoid_NSTimer { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock fromFunction( - void Function(NSTimer) fn, { + static objc.ObjCBlock)> + fromFunction( + void Function(NSRange, ffi.Pointer) fn, { bool keepIsolateAlive = true, - }) => objc.ObjCBlock( + }) => objc.ObjCBlock)>( objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, + NSRange arg0, + ffi.Pointer arg1, ) { - return fn(NSTimer.fromPointer(arg0, retain: true, release: true)); + return fn(arg0, arg1); }, keepIsolateAlive), retain: false, release: true, @@ -39779,21 +29323,22 @@ abstract final class ObjCBlock_ffiVoid_NSTimer { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock listener( - void Function(NSTimer) fn, { + static objc.ObjCBlock)> + listener( + void Function(NSRange, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { - return objc.ObjCBlock( - objc.newBlockPort(_1wx624s_wrapListenerBlock_xtuoz7, ( + return objc.ObjCBlock)>( + objc.newBlockPort(_1wx624s_wrapListenerBlock_zkjmn1, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_kr40r0.fromPointer( + final args = _BlockArgs_uckb5m.fromPointer( rawArgs, retain: false, release: false, ); - fn(args.arg0); + fn(args.arg0, args.arg1); }, keepIsolateAlive), retain: false, release: true, @@ -39810,21 +29355,22 @@ abstract final class ObjCBlock_ffiVoid_NSTimer { /// until it is garbage collected by both Dart and ObjC. If the owner isolate /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock blocking( - void Function(NSTimer) fn, { + static objc.ObjCBlock)> + blocking( + void Function(NSRange, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { - return objc.ObjCBlock( - objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_xtuoz7, ( + return objc.ObjCBlock)>( + objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_zkjmn1, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_kr40r0.fromPointer( + final args = _BlockArgs_uckb5m.fromPointer( rawArgs, retain: false, release: false, ); - fn(args.arg0); + fn(args.arg0, args.arg1); }, keepIsolateAlive), retain: false, release: true, @@ -39833,66 +29379,71 @@ abstract final class ObjCBlock_ffiVoid_NSTimer { static void _fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + NSRange arg0, + ffi.Pointer arg1, ) => block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0) + ffi.Void Function(NSRange arg0, ffi.Pointer arg1) > >() - .asFunction)>()(arg0); + .asFunction)>()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, - ffi.Pointer, + NSRange, + ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static void _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + NSRange arg0, + ffi.Pointer arg1, ) => (objc.getBlockClosure(block) - as void Function(ffi.Pointer))(arg0); + as void Function(NSRange, ffi.Pointer))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, - ffi.Pointer, + NSRange, + ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSTimer$CallExtension - on objc.ObjCBlock { - void call(NSTimer arg0) { - final _$$ref = arg0.ref; +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_NSRange_bool$CallExtension + on objc.ObjCBlock)> { + void call(NSRange arg0, ffi.Pointer arg1) { return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, - ffi.Pointer arg0, + NSRange arg0, + ffi.Pointer arg1, ) > >() .asFunction< void Function( ffi.Pointer, - ffi.Pointer, + NSRange, + ffi.Pointer, ) - >()(ref.pointer, _$$ref.pointer); + >()(ref.pointer, arg0, arg1); } } -/// Construction methods for `objc.ObjCBlock)>`. -abstract final class ObjCBlock_ffiVoid_NSUInteger_bool { +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) > fromPointer( ffi.Pointer pointer, { @@ -39900,7 +29451,7 @@ abstract final class ObjCBlock_ffiVoid_NSUInteger_bool { bool release = false, }) => objc.ObjCBlock< - ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. @@ -39909,18 +29460,23 @@ abstract final class ObjCBlock_ffiVoid_NSUInteger_bool { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(NSUInteger arg0, ffi.Pointer arg1) + ffi.Void Function( + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3, + ) > > ptr, ) => objc.ObjCBlock< - ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, @@ -39936,20 +29492,29 @@ abstract final class ObjCBlock_ffiVoid_NSUInteger_bool { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) > fromFunction( - void Function(DartNSUInteger, ffi.Pointer) fn, { + void Function(NSString?, NSRange, NSRange, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< - ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) >( objc.newClosureBlock(_closureCallable, ( - int arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3, ) { - return fn(arg0, arg1); + return fn( + arg0.address == 0 + ? null + : NSString.fromPointer(arg0, retain: true, release: true), + arg1, + arg2, + arg3, + ); }, keepIsolateAlive), retain: false, release: true, @@ -39964,25 +29529,25 @@ abstract final class ObjCBlock_ffiVoid_NSUInteger_bool { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) > listener( - void Function(DartNSUInteger, ffi.Pointer) fn, { + void Function(NSString?, NSRange, NSRange, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { return objc.ObjCBlock< - ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) >( - objc.newBlockPort(_1wx624s_wrapListenerBlock_q5jeyk, ( + objc.newBlockPort(_1wx624s_wrapListenerBlock_lmc3p5, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_1ebqbq6.fromPointer( + final args = _BlockArgs_1pvrxoh.fromPointer( rawArgs, retain: false, release: false, ); - fn(args.arg0, args.arg1); + fn(args.arg0, args.arg1, args.arg2, args.arg3); }, keepIsolateAlive), retain: false, release: true, @@ -40000,25 +29565,25 @@ abstract final class ObjCBlock_ffiVoid_NSUInteger_bool { /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. static objc.ObjCBlock< - ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) > blocking( - void Function(DartNSUInteger, ffi.Pointer) fn, { + void Function(NSString?, NSRange, NSRange, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { return objc.ObjCBlock< - ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) >( - objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_q5jeyk, ( + objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_lmc3p5, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_1ebqbq6.fromPointer( + final args = _BlockArgs_1pvrxoh.fromPointer( rawArgs, retain: false, release: false, ); - fn(args.arg0, args.arg1); + fn(args.arg0, args.arg1, args.arg2, args.arg3); }, keepIsolateAlive), retain: false, release: true, @@ -40027,77 +29592,113 @@ abstract final class ObjCBlock_ffiVoid_NSUInteger_bool { static void _fnPtrTrampoline( ffi.Pointer block, - int arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3, ) => block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function(NSUInteger arg0, ffi.Pointer arg1) + ffi.Void Function( + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3, + ) > >() - .asFunction)>()(arg0, arg1); + .asFunction< + void Function( + ffi.Pointer, + NSRange, + NSRange, + ffi.Pointer, + ) + >()(arg0, arg1, arg2, arg3); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, - NSUInteger, + ffi.Pointer, + NSRange, + NSRange, ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static void _closureTrampoline( ffi.Pointer block, - int arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3, ) => (objc.getBlockClosure(block) - as void Function(int, ffi.Pointer))(arg0, arg1); + as void Function( + ffi.Pointer, + NSRange, + NSRange, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, - NSUInteger, + ffi.Pointer, + NSRange, + NSRange, ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_ffiVoid_NSUInteger_bool$CallExtension +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool$CallExtension on objc.ObjCBlock< - ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) + ffi.Void Function(NSString?, NSRange, NSRange, ffi.Pointer) > { - void call(DartNSUInteger arg0, ffi.Pointer arg1) { + void call( + NSString? arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3, + ) { + final _$$ref = arg0?.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, - NSUInteger arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3, ) > >() .asFunction< void Function( ffi.Pointer, - int, + ffi.Pointer, + NSRange, + NSRange, ffi.Pointer, ) - >()(ref.pointer, arg0, arg1); + >()(ref.pointer, _$$ref?.pointer ?? ffi.nullptr, arg1, arg2, arg3); } } -/// Construction methods for `objc.ObjCBlock`. -abstract final class ObjCBlock_ffiVoid_NSURL_NSError { +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_NSString_bool { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock fromPointer( + static objc.ObjCBlock)> + fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => objc.ObjCBlock( + }) => objc.ObjCBlock)>( pointer, retain: retain, release: release, @@ -40108,18 +29709,18 @@ abstract final class ObjCBlock_ffiVoid_NSURL_NSError { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock + static objc.ObjCBlock)> fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function( ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg1, ) > > ptr, - ) => objc.ObjCBlock( + ) => objc.ObjCBlock)>( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, release: true, @@ -40133,22 +29734,16 @@ abstract final class ObjCBlock_ffiVoid_NSURL_NSError { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock fromFunction( - void Function(NSURL?, NSError?) fn, { + static objc.ObjCBlock)> + fromFunction( + void Function(NSString, ffi.Pointer) fn, { bool keepIsolateAlive = true, - }) => objc.ObjCBlock( + }) => objc.ObjCBlock)>( objc.newClosureBlock(_closureCallable, ( ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg1, ) { - return fn( - arg0.address == 0 - ? null - : NSURL.fromPointer(arg0, retain: true, release: true), - arg1.address == 0 - ? null - : NSError.fromPointer(arg1, retain: true, release: true), - ); + return fn(NSString.fromPointer(arg0, retain: true, release: true), arg1); }, keepIsolateAlive), retain: false, release: true, @@ -40162,15 +29757,16 @@ abstract final class ObjCBlock_ffiVoid_NSURL_NSError { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock listener( - void Function(NSURL?, NSError?) fn, { + static objc.ObjCBlock)> + listener( + void Function(NSString, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { - return objc.ObjCBlock( - objc.newBlockPort(_1wx624s_wrapListenerBlock_pfv6jd, ( + return objc.ObjCBlock)>( + objc.newBlockPort(_1wx624s_wrapListenerBlock_t8l8el, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_1lk8uv7.fromPointer( + final args = _BlockArgs_ounrb4.fromPointer( rawArgs, retain: false, release: false, @@ -40193,15 +29789,16 @@ abstract final class ObjCBlock_ffiVoid_NSURL_NSError { /// until it is garbage collected by both Dart and ObjC. If the owner isolate /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock blocking( - void Function(NSURL?, NSError?) fn, { + static objc.ObjCBlock)> + blocking( + void Function(NSString, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { - return objc.ObjCBlock( - objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_pfv6jd, ( + return objc.ObjCBlock)>( + objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_t8l8el, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_1lk8uv7.fromPointer( + final args = _BlockArgs_ounrb4.fromPointer( rawArgs, retain: false, release: false, @@ -40217,65 +29814,61 @@ abstract final class ObjCBlock_ffiVoid_NSURL_NSError { static void _fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg1, ) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg1, ) > >() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ) + void Function(ffi.Pointer, ffi.Pointer) >()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static void _closureTrampoline( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg1, ) => (objc.getBlockClosure(block) as void Function( ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSURL_NSError$CallExtension - on objc.ObjCBlock { - void call(NSURL? arg0, NSError? arg1) { - final _$$ref = arg0?.ref; - final _$$ref$1 = arg1?.ref; +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_NSString_bool$CallExtension + on objc.ObjCBlock)> { + void call(NSString arg0, ffi.Pointer arg1) { + final _$$ref = arg0.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg1, ) > >() @@ -40283,25 +29876,20 @@ extension ObjCBlock_ffiVoid_NSURL_NSError$CallExtension void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ) - >()( - ref.pointer, - _$$ref?.pointer ?? ffi.nullptr, - _$$ref$1?.pointer ?? ffi.nullptr, - ); + >()(ref.pointer, _$$ref.pointer, arg1); } } -/// Construction methods for `objc.ObjCBlock`. -abstract final class ObjCBlock_ffiVoid_NSURL_bool_NSError { +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSTimer { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock - fromPointer( + static objc.ObjCBlock fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => objc.ObjCBlock( + }) => objc.ObjCBlock( pointer, retain: retain, release: release, @@ -40312,19 +29900,14 @@ abstract final class ObjCBlock_ffiVoid_NSURL_bool_NSError { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock - fromFunctionPointer( + static objc.ObjCBlock fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2, - ) + ffi.Void Function(ffi.Pointer arg0) > > ptr, - ) => objc.ObjCBlock( + ) => objc.ObjCBlock( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, release: true, @@ -40338,25 +29921,14 @@ abstract final class ObjCBlock_ffiVoid_NSURL_bool_NSError { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock - fromFunction( - void Function(NSURL?, bool, NSError?) fn, { + static objc.ObjCBlock fromFunction( + void Function(NSTimer) fn, { bool keepIsolateAlive = true, - }) => objc.ObjCBlock( + }) => objc.ObjCBlock( objc.newClosureBlock(_closureCallable, ( ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2, ) { - return fn( - arg0.address == 0 - ? null - : NSURL.fromPointer(arg0, retain: true, release: true), - arg1, - arg2.address == 0 - ? null - : NSError.fromPointer(arg2, retain: true, release: true), - ); + return fn(NSTimer.fromPointer(arg0, retain: true, release: true)); }, keepIsolateAlive), retain: false, release: true, @@ -40370,21 +29942,21 @@ abstract final class ObjCBlock_ffiVoid_NSURL_bool_NSError { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock listener( - void Function(NSURL?, bool, NSError?) fn, { + static objc.ObjCBlock listener( + void Function(NSTimer) fn, { bool keepIsolateAlive = true, }) { - return objc.ObjCBlock( - objc.newBlockPort(_1wx624s_wrapListenerBlock_rnu2c5, ( + return objc.ObjCBlock( + objc.newBlockPort(_1wx624s_wrapListenerBlock_xtuoz7, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_18aygyv.fromPointer( + final args = _BlockArgs_kr40r0.fromPointer( rawArgs, retain: false, release: false, ); - fn(args.arg0, args.arg1, args.arg2); + fn(args.arg0); }, keepIsolateAlive), retain: false, release: true, @@ -40401,21 +29973,21 @@ abstract final class ObjCBlock_ffiVoid_NSURL_bool_NSError { /// until it is garbage collected by both Dart and ObjC. If the owner isolate /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock blocking( - void Function(NSURL?, bool, NSError?) fn, { + static objc.ObjCBlock blocking( + void Function(NSTimer) fn, { bool keepIsolateAlive = true, }) { - return objc.ObjCBlock( - objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_rnu2c5, ( + return objc.ObjCBlock( + objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_xtuoz7, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_18aygyv.fromPointer( + final args = _BlockArgs_kr40r0.fromPointer( rawArgs, retain: false, release: false, ); - fn(args.arg0, args.arg1, args.arg2); + fn(args.arg0); }, keepIsolateAlive), retain: false, release: true, @@ -40425,73 +29997,48 @@ abstract final class ObjCBlock_ffiVoid_NSURL_bool_NSError { static void _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, - ) + ffi.Void Function(ffi.Pointer arg0) > >() - .asFunction< - void Function( - ffi.Pointer, - bool, - ffi.Pointer, - ) - >()(arg0, arg1, arg2); + .asFunction)>()(arg0); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Bool, - ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static void _closureTrampoline( ffi.Pointer block, ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2, ) => (objc.getBlockClosure(block) - as void Function( - ffi.Pointer, - bool, - ffi.Pointer, - ))(arg0, arg1, arg2); + as void Function(ffi.Pointer))(arg0); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Bool, - ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSURL_bool_NSError$CallExtension - on objc.ObjCBlock { - void call(NSURL? arg0, bool arg1, NSError? arg2) { - final _$$ref = arg0?.ref; - final _$$ref$1 = arg2?.ref; +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSTimer$CallExtension + on objc.ObjCBlock { + void call(NSTimer arg0) { + final _$$ref = arg0.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2, ) > >() @@ -40499,23 +30046,16 @@ extension ObjCBlock_ffiVoid_NSURL_bool_NSError$CallExtension void Function( ffi.Pointer, ffi.Pointer, - bool, - ffi.Pointer, ) - >()( - ref.pointer, - _$$ref?.pointer ?? ffi.nullptr, - arg1, - _$$ref$1?.pointer ?? ffi.nullptr, - ); + >()(ref.pointer, _$$ref.pointer); } } -/// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. -abstract final class ObjCBlock_ffiVoid_ObjectType_bool { +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_NSUInteger_bool { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.Pointer) + ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) > fromPointer( ffi.Pointer pointer, { @@ -40523,10 +30063,7 @@ abstract final class ObjCBlock_ffiVoid_ObjectType_bool { bool release = false, }) => objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ) + ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. @@ -40535,24 +30072,18 @@ abstract final class ObjCBlock_ffiVoid_ObjectType_bool { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.Pointer) + ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) + ffi.Void Function(NSUInteger arg0, ffi.Pointer arg1) > > ptr, ) => objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ) + ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, @@ -40568,23 +30099,20 @@ abstract final class ObjCBlock_ffiVoid_ObjectType_bool { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.Pointer) + ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) > fromFunction( - void Function(objc.ObjCObject, ffi.Pointer) fn, { + void Function(DartNSUInteger, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ) + ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) >( objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, + int arg0, ffi.Pointer arg1, ) { - return fn(objc.ObjCObject(arg0, retain: true, release: true), arg1); + return fn(arg0, arg1); }, keepIsolateAlive), retain: false, release: true, @@ -40599,19 +30127,19 @@ abstract final class ObjCBlock_ffiVoid_ObjectType_bool { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.Pointer) + ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) > listener( - void Function(objc.ObjCObject, ffi.Pointer) fn, { + void Function(DartNSUInteger, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.Pointer) + ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) >( - objc.newBlockPort(_1wx624s_wrapListenerBlock_t8l8el, ( + objc.newBlockPort(_1wx624s_wrapListenerBlock_q5jeyk, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_wnzfgp.fromPointer( + final args = _BlockArgs_1ebqbq6.fromPointer( rawArgs, retain: false, release: false, @@ -40635,19 +30163,19 @@ abstract final class ObjCBlock_ffiVoid_ObjectType_bool { /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.Pointer) + ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) > blocking( - void Function(objc.ObjCObject, ffi.Pointer) fn, { + void Function(DartNSUInteger, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.Pointer) + ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) >( - objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_t8l8el, ( + objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_q5jeyk, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_wnzfgp.fromPointer( + final args = _BlockArgs_1ebqbq6.fromPointer( rawArgs, retain: false, release: false, @@ -40662,67 +30190,55 @@ abstract final class ObjCBlock_ffiVoid_ObjectType_bool { static void _fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + int arg0, ffi.Pointer arg1, ) => block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) + ffi.Void Function(NSUInteger arg0, ffi.Pointer arg1) > >() - .asFunction< - void Function(ffi.Pointer, ffi.Pointer) - >()(arg0, arg1); + .asFunction)>()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, - ffi.Pointer, + NSUInteger, ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static void _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + int arg0, ffi.Pointer arg1, ) => (objc.getBlockClosure(block) - as void Function( - ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1); + as void Function(int, ffi.Pointer))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, - ffi.Pointer, + NSUInteger, ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. -extension ObjCBlock_ffiVoid_ObjectType_bool$CallExtension +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_NSUInteger_bool$CallExtension on objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ) + ffi.Void Function(ffi.UnsignedLong, ffi.Pointer) > { - void call(objc.ObjCObject arg0, ffi.Pointer arg1) { - final _$$ref = arg0.ref; + void call(DartNSUInteger arg0, ffi.Pointer arg1) { return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, - ffi.Pointer arg0, + NSUInteger arg0, ffi.Pointer arg1, ) > @@ -40730,180 +30246,21 @@ extension ObjCBlock_ffiVoid_ObjectType_bool$CallExtension .asFunction< void Function( ffi.Pointer, - ffi.Pointer, + int, ffi.Pointer, ) - >()(ref.pointer, _$$ref.pointer, arg1); - } -} - -/// Construction methods for `objc.ObjCBlock)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock)> fromPointer( - ffi.Pointer pointer, { - bool retain = false, - bool release = false, - }) => objc.ObjCBlock)>( - pointer, - retain: retain, - release: release, - ); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock)> - fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction arg0)> - > - ptr, - ) => objc.ObjCBlock)>( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - /// - /// If `keepIsolateAlive` is true, this block will keep this isolate alive - /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock)> fromFunction( - void Function(ffi.Pointer) fn, { - bool keepIsolateAlive = true, - }) => objc.ObjCBlock)>( - objc.newClosureBlock(_closureCallable, (ffi.Pointer arg0) { - return fn(arg0); - }, keepIsolateAlive), - retain: false, - release: true, - ); - - /// Creates a listener block from a Dart function. - /// - /// This block can be invoked from any thread, but only supports void - /// functions, and is not run synchronously. Async functions (ie returning - /// Future) are not supported. - /// - /// If `keepIsolateAlive` is true, this block will keep this isolate alive - /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock)> listener( - void Function(ffi.Pointer) fn, { - bool keepIsolateAlive = true, - }) { - return objc.ObjCBlock)>( - objc.newBlockPort(_1wx624s_wrapListenerBlock_ovsamd, ( - ffi.Pointer rawArgs, - ) { - final args = _BlockArgs_awd5mj.fromPointer( - rawArgs, - retain: false, - release: false, - ); - - fn(args.arg0); - }, keepIsolateAlive), - retain: false, - release: true, - ); - } - - /// Creates a blocking block from a Dart function. - /// - /// This callback can be invoked from any native thread, and will block the - /// caller until the callback is handled by the Dart isolate that created - /// the block. Async functions (ie returning Future) are not supported. - /// - /// If `keepIsolateAlive` is true, this block will keep this isolate alive - /// until it is garbage collected by both Dart and ObjC. If the owner isolate - /// has shut down, and the block is invoked by native code, it may block - /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock)> blocking( - void Function(ffi.Pointer) fn, { - bool keepIsolateAlive = true, - }) { - return objc.ObjCBlock)>( - objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_ovsamd, ( - ffi.Pointer rawArgs, - ) { - final args = _BlockArgs_awd5mj.fromPointer( - rawArgs, - retain: false, - release: false, - ); - - fn(args.arg0); - }, keepIsolateAlive), - retain: false, - release: true, - ); - } - - static void _fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ) => block.ref.target - .cast arg0)>>() - .asFunction)>()(arg0); - static ffi.Pointer _fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ) - >(_fnPtrTrampoline) - .cast(); - static void _closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ) => (objc.getBlockClosure(block) as void Function(ffi.Pointer))( - arg0, - ); - static ffi.Pointer _closureCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ) - >(_closureTrampoline) - .cast(); -} - -/// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_ffiVoid_ffiVoid$CallExtension - on objc.ObjCBlock)> { - void call(ffi.Pointer arg0) { - return ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ) - > - >() - .asFunction< - void Function(ffi.Pointer, ffi.Pointer) - >()(ref.pointer, arg0); + >()(ref.pointer, arg0, arg1); } } -/// Construction methods for `objc.ObjCBlock, NSCoder)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSURL_NSError { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock, NSCoder)> - fromPointer( + static objc.ObjCBlock fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => objc.ObjCBlock, NSCoder)>( + }) => objc.ObjCBlock( pointer, retain: retain, release: release, @@ -40914,18 +30271,18 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, NSCoder)> + static objc.ObjCBlock fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, ) > > ptr, - ) => objc.ObjCBlock, NSCoder)>( + ) => objc.ObjCBlock( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, release: true, @@ -40939,16 +30296,22 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock, NSCoder)> - fromFunction( - void Function(ffi.Pointer, NSCoder) fn, { + static objc.ObjCBlock fromFunction( + void Function(NSURL?, NSError?) fn, { bool keepIsolateAlive = true, - }) => objc.ObjCBlock, NSCoder)>( + }) => objc.ObjCBlock( objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, ) { - return fn(arg0, NSCoder.fromPointer(arg1, retain: true, release: true)); + return fn( + arg0.address == 0 + ? null + : NSURL.fromPointer(arg0, retain: true, release: true), + arg1.address == 0 + ? null + : NSError.fromPointer(arg1, retain: true, release: true), + ); }, keepIsolateAlive), retain: false, release: true, @@ -40962,16 +30325,15 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock, NSCoder)> - listener( - void Function(ffi.Pointer, NSCoder) fn, { + static objc.ObjCBlock listener( + void Function(NSURL?, NSError?) fn, { bool keepIsolateAlive = true, }) { - return objc.ObjCBlock, NSCoder)>( - objc.newBlockPort(_1wx624s_wrapListenerBlock_18v1jvf, ( + return objc.ObjCBlock( + objc.newBlockPort(_1wx624s_wrapListenerBlock_pfv6jd, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_1599z35.fromPointer( + final args = _BlockArgs_1lk8uv7.fromPointer( rawArgs, retain: false, release: false, @@ -40994,16 +30356,15 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { /// until it is garbage collected by both Dart and ObjC. If the owner isolate /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock, NSCoder)> - blocking( - void Function(ffi.Pointer, NSCoder) fn, { + static objc.ObjCBlock blocking( + void Function(NSURL?, NSError?) fn, { bool keepIsolateAlive = true, }) { - return objc.ObjCBlock, NSCoder)>( - objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_18v1jvf, ( + return objc.ObjCBlock( + objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_pfv6jd, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_1599z35.fromPointer( + final args = _BlockArgs_1lk8uv7.fromPointer( rawArgs, retain: false, release: false, @@ -41018,61 +30379,65 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { static void _fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, ) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, ) > >() .asFunction< - void Function(ffi.Pointer, ffi.Pointer) + void Function( + ffi.Pointer, + ffi.Pointer, + ) >()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static void _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, ) => (objc.getBlockClosure(block) as void Function( - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock, NSCoder)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSCoder$CallExtension - on objc.ObjCBlock, NSCoder)> { - void call(ffi.Pointer arg0, NSCoder arg1) { - final _$$ref = arg1.ref; +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSURL_NSError$CallExtension + on objc.ObjCBlock { + void call(NSURL? arg0, NSError? arg1) { + final _$$ref = arg0?.ref; + final _$$ref$1 = arg1?.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1, ) > @@ -41080,22 +30445,26 @@ extension ObjCBlock_ffiVoid_ffiVoid_NSCoder$CallExtension .asFunction< void Function( ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ffi.Pointer, ) - >()(ref.pointer, arg0, _$$ref.pointer); + >()( + ref.pointer, + _$$ref?.pointer ?? ffi.nullptr, + _$$ref$1?.pointer ?? ffi.nullptr, + ); } } -/// Construction methods for `objc.ObjCBlock, NSPortMessage)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSPortMessage { +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSURL_bool_NSError { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock, NSPortMessage)> + static objc.ObjCBlock fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => objc.ObjCBlock, NSPortMessage)>( + }) => objc.ObjCBlock( pointer, retain: retain, release: release, @@ -41106,18 +30475,19 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSPortMessage { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, NSPortMessage)> + static objc.ObjCBlock fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2, ) > > ptr, - ) => objc.ObjCBlock, NSPortMessage)>( + ) => objc.ObjCBlock( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, release: true, @@ -41131,18 +30501,24 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSPortMessage { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock, NSPortMessage)> + static objc.ObjCBlock fromFunction( - void Function(ffi.Pointer, NSPortMessage) fn, { + void Function(NSURL?, bool, NSError?) fn, { bool keepIsolateAlive = true, - }) => objc.ObjCBlock, NSPortMessage)>( + }) => objc.ObjCBlock( objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2, ) { return fn( - arg0, - NSPortMessage.fromPointer(arg1, retain: true, release: true), + arg0.address == 0 + ? null + : NSURL.fromPointer(arg0, retain: true, release: true), + arg1, + arg2.address == 0 + ? null + : NSError.fromPointer(arg2, retain: true, release: true), ); }, keepIsolateAlive), retain: false, @@ -41157,24 +30533,21 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSPortMessage { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock, NSPortMessage)> - listener( - void Function(ffi.Pointer, NSPortMessage) fn, { + static objc.ObjCBlock listener( + void Function(NSURL?, bool, NSError?) fn, { bool keepIsolateAlive = true, }) { - return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSPortMessage) - >( - objc.newBlockPort(_1wx624s_wrapListenerBlock_18v1jvf, ( + return objc.ObjCBlock( + objc.newBlockPort(_1wx624s_wrapListenerBlock_rnu2c5, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_1e1kc88.fromPointer( + final args = _BlockArgs_18aygyv.fromPointer( rawArgs, retain: false, release: false, ); - fn(args.arg0, args.arg1); + fn(args.arg0, args.arg1, args.arg2); }, keepIsolateAlive), retain: false, release: true, @@ -41191,24 +30564,21 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSPortMessage { /// until it is garbage collected by both Dart and ObjC. If the owner isolate /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock, NSPortMessage)> - blocking( - void Function(ffi.Pointer, NSPortMessage) fn, { + static objc.ObjCBlock blocking( + void Function(NSURL?, bool, NSError?) fn, { bool keepIsolateAlive = true, }) { - return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSPortMessage) - >( - objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_18v1jvf, ( + return objc.ObjCBlock( + objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_rnu2c5, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_1e1kc88.fromPointer( + final args = _BlockArgs_18aygyv.fromPointer( rawArgs, retain: false, release: false, ); - fn(args.arg0, args.arg1); + fn(args.arg0, args.arg1, args.arg2); }, keepIsolateAlive), retain: false, release: true, @@ -41217,80 +30587,98 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSPortMessage { static void _fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2, ) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2, ) > >() .asFunction< - void Function(ffi.Pointer, ffi.Pointer) - >()(arg0, arg1); + void Function( + ffi.Pointer, + bool, + ffi.Pointer, + ) + >()(arg0, arg1, arg2); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, - ffi.Pointer, + ffi.Pointer, + ffi.Bool, ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static void _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2, ) => (objc.getBlockClosure(block) as void Function( - ffi.Pointer, ffi.Pointer, - ))(arg0, arg1); + bool, + ffi.Pointer, + ))(arg0, arg1, arg2); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, - ffi.Pointer, + ffi.Pointer, + ffi.Bool, ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock, NSPortMessage)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSPortMessage$CallExtension - on objc.ObjCBlock, NSPortMessage)> { - void call(ffi.Pointer arg0, NSPortMessage arg1) { - final _$$ref = arg1.ref; +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSURL_bool_NSError$CallExtension + on objc.ObjCBlock { + void call(NSURL? arg0, bool arg1, NSError? arg2) { + final _$$ref = arg0?.ref; + final _$$ref$1 = arg2?.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2, ) > >() .asFunction< void Function( ffi.Pointer, - ffi.Pointer, + ffi.Pointer, + bool, ffi.Pointer, ) - >()(ref.pointer, arg0, _$$ref.pointer); + >()( + ref.pointer, + _$$ref?.pointer ?? ffi.nullptr, + arg1, + _$$ref$1?.pointer ?? ffi.nullptr, + ); } } -/// Construction methods for `objc.ObjCBlock, NSRange, ffi.Pointer)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool { +/// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. +abstract final class ObjCBlock_ffiVoid_ObjectType_bool { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + ffi.Void Function(ffi.Pointer, ffi.Pointer) > fromPointer( ffi.Pointer pointer, { @@ -41298,7 +30686,10 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool { bool release = false, }) => objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. @@ -41307,22 +30698,24 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + ffi.Void Function(ffi.Pointer, ffi.Pointer) > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2, + ffi.Pointer arg0, + ffi.Pointer arg1, ) > > ptr, ) => objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, @@ -41338,21 +30731,23 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + ffi.Void Function(ffi.Pointer, ffi.Pointer) > fromFunction( - void Function(ffi.Pointer, NSRange, ffi.Pointer) fn, { + void Function(objc.ObjCObject, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) >( objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2, + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return fn(arg0, arg1, arg2); + return fn(objc.ObjCObject(arg0, retain: true, release: true), arg1); }, keepIsolateAlive), retain: false, release: true, @@ -41367,25 +30762,25 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + ffi.Void Function(ffi.Pointer, ffi.Pointer) > listener( - void Function(ffi.Pointer, NSRange, ffi.Pointer) fn, { + void Function(objc.ObjCObject, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + ffi.Void Function(ffi.Pointer, ffi.Pointer) >( - objc.newBlockPort(_1wx624s_wrapListenerBlock_1q8ia8l, ( + objc.newBlockPort(_1wx624s_wrapListenerBlock_t8l8el, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_3djt55.fromPointer( + final args = _BlockArgs_wnzfgp.fromPointer( rawArgs, retain: false, release: false, ); - fn(args.arg0, args.arg1, args.arg2); + fn(args.arg0, args.arg1); }, keepIsolateAlive), retain: false, release: true, @@ -41403,25 +30798,25 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool { /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + ffi.Void Function(ffi.Pointer, ffi.Pointer) > blocking( - void Function(ffi.Pointer, NSRange, ffi.Pointer) fn, { + void Function(objc.ObjCObject, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + ffi.Void Function(ffi.Pointer, ffi.Pointer) >( - objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_1q8ia8l, ( + objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_t8l8el, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_3djt55.fromPointer( + final args = _BlockArgs_wnzfgp.fromPointer( rawArgs, retain: false, release: false, ); - fn(args.arg0, args.arg1, args.arg2); + fn(args.arg0, args.arg1); }, keepIsolateAlive), retain: false, release: true, @@ -41430,135 +30825,110 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool { static void _fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2, + ffi.Pointer arg0, + ffi.Pointer arg1, ) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2, + ffi.Pointer arg0, + ffi.Pointer arg1, ) > >() .asFunction< - void Function(ffi.Pointer, NSRange, ffi.Pointer) - >()(arg0, arg1, arg2); + void Function(ffi.Pointer, ffi.Pointer) + >()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, - ffi.Pointer, - NSRange, + ffi.Pointer, ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static void _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2, + ffi.Pointer arg0, + ffi.Pointer arg1, ) => (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - NSRange, + ffi.Pointer, ffi.Pointer, - ))(arg0, arg1, arg2); + ))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, - ffi.Pointer, - NSRange, + ffi.Pointer, ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock, NSRange, ffi.Pointer)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSRange_bool$CallExtension +/// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. +extension ObjCBlock_ffiVoid_ObjectType_bool$CallExtension on objc.ObjCBlock< ffi.Void Function( - ffi.Pointer, - NSRange, + ffi.Pointer, ffi.Pointer, ) > { - void call( - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2, - ) { + void call(objc.ObjCObject arg0, ffi.Pointer arg1) { + final _$$ref = arg0.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2, + ffi.Pointer arg0, + ffi.Pointer arg1, ) > >() .asFunction< void Function( ffi.Pointer, - ffi.Pointer, - NSRange, + ffi.Pointer, ffi.Pointer, ) - >()(ref.pointer, arg0, arg1, arg2); + >()(ref.pointer, _$$ref.pointer, arg1); } } -/// Construction methods for `objc.ObjCBlock, NSStream, NSUInteger)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSStream, NSUInteger) - > - fromPointer( + static objc.ObjCBlock)> fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSStream, NSUInteger) - >(pointer, retain: retain, release: release); + }) => objc.ObjCBlock)>( + pointer, + retain: retain, + release: release, + ); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSStream, NSUInteger) - > + static objc.ObjCBlock)> fromFunctionPointer( ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - NSUInteger arg2, - ) - > + ffi.NativeFunction arg0)> > ptr, - ) => - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSStream, NSUInteger) - >( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); + ) => objc.ObjCBlock)>( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); /// Creates a block from a Dart function. /// @@ -41568,30 +30938,16 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSStream, NSUInteger) - > - fromFunction( - void Function(ffi.Pointer, NSStream, DartNSUInteger) fn, { + static objc.ObjCBlock)> fromFunction( + void Function(ffi.Pointer) fn, { bool keepIsolateAlive = true, - }) => - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSStream, NSUInteger) - >( - objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, - ) { - return fn( - arg0, - NSStream.fromPointer(arg1, retain: true, release: true), - arg2, - ); - }, keepIsolateAlive), - retain: false, - release: true, - ); + }) => objc.ObjCBlock)>( + objc.newClosureBlock(_closureCallable, (ffi.Pointer arg0) { + return fn(arg0); + }, keepIsolateAlive), + retain: false, + release: true, + ); /// Creates a listener block from a Dart function. /// @@ -41601,26 +30957,21 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSStream, NSUInteger) - > - listener( - void Function(ffi.Pointer, NSStream, DartNSUInteger) fn, { + static objc.ObjCBlock)> listener( + void Function(ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { - return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSStream, NSUInteger) - >( - objc.newBlockPort(_1wx624s_wrapListenerBlock_hoampi, ( + return objc.ObjCBlock)>( + objc.newBlockPort(_1wx624s_wrapListenerBlock_ovsamd, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_64fwqt.fromPointer( + final args = _BlockArgs_awd5mj.fromPointer( rawArgs, retain: false, release: false, ); - fn(args.arg0, args.arg1, args.arg2); + fn(args.arg0); }, keepIsolateAlive), retain: false, release: true, @@ -41637,26 +30988,21 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { /// until it is garbage collected by both Dart and ObjC. If the owner isolate /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSStream, NSUInteger) - > - blocking( - void Function(ffi.Pointer, NSStream, DartNSUInteger) fn, { + static objc.ObjCBlock)> blocking( + void Function(ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { - return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSStream, NSUInteger) - >( - objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_hoampi, ( + return objc.ObjCBlock)>( + objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_ovsamd, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_64fwqt.fromPointer( + final args = _BlockArgs_awd5mj.fromPointer( rawArgs, retain: false, release: false, ); - fn(args.arg0, args.arg1, args.arg2); + fn(args.arg0); }, keepIsolateAlive), retain: false, release: true, @@ -41666,157 +31012,87 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { static void _fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, ) => block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - NSUInteger arg2, - ) - > - >() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ) - >()(arg0, arg1, arg2); + .cast arg0)>>() + .asFunction)>()(arg0); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSUInteger, ) >(_fnPtrTrampoline) .cast(); static void _closureTrampoline( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, - ) => - (objc.getBlockClosure(block) - as void Function( - ffi.Pointer, - ffi.Pointer, - int, - ))(arg0, arg1, arg2); + ) => (objc.getBlockClosure(block) as void Function(ffi.Pointer))( + arg0, + ); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSUInteger, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock, NSStream, NSUInteger)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent$CallExtension - on - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSStream, NSUInteger) - > { - void call(ffi.Pointer arg0, NSStream arg1, DartNSUInteger arg2) { - final _$$ref = arg1.ref; +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid$CallExtension + on objc.ObjCBlock)> { + void call(ffi.Pointer arg0) { return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, - NSUInteger arg2, ) > >() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ) - >()(ref.pointer, arg0, _$$ref.pointer, arg2); + void Function(ffi.Pointer, ffi.Pointer) + >()(ref.pointer, arg0); } } -/// Construction methods for `objc.ObjCBlock, NSString, ffi.Pointer, NSDictionary, ffi.Pointer)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDictionary_ffiVoid { +/// Construction methods for `objc.ObjCBlock, NSCoder)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSString, - ffi.Pointer, - NSDictionary, - ffi.Pointer, - ) - > + static objc.ObjCBlock, NSCoder)> fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSString, - ffi.Pointer, - NSDictionary, - ffi.Pointer, - ) - >(pointer, retain: retain, release: release); + }) => objc.ObjCBlock, NSCoder)>( + pointer, + retain: retain, + release: release, + ); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSString, - ffi.Pointer, - NSDictionary, - ffi.Pointer, - ) - > + static objc.ObjCBlock, NSCoder)> fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function( ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, ) > > ptr, - ) => - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSString, - ffi.Pointer, - NSDictionary, - ffi.Pointer, - ) - >( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); + ) => objc.ObjCBlock, NSCoder)>( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); /// Creates a block from a Dart function. /// @@ -41826,53 +31102,20 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDic /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSString, - ffi.Pointer, - NSDictionary, - ffi.Pointer, - ) - > + static objc.ObjCBlock, NSCoder)> fromFunction( - void Function( - ffi.Pointer, - NSString, - objc.ObjCObject, - NSDictionary, - ffi.Pointer, - ) - fn, { + void Function(ffi.Pointer, NSCoder) fn, { bool keepIsolateAlive = true, - }) => - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSString, - ffi.Pointer, - NSDictionary, - ffi.Pointer, - ) - >( - objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, - ) { - return fn( - arg0, - NSString.fromPointer(arg1, retain: true, release: true), - objc.ObjCObject(arg2, retain: true, release: true), - NSDictionary.fromPointer(arg3, retain: true, release: true), - arg4, - ); - }, keepIsolateAlive), - retain: false, - release: true, - ); + }) => objc.ObjCBlock, NSCoder)>( + objc.newClosureBlock(_closureCallable, ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return fn(arg0, NSCoder.fromPointer(arg1, retain: true, release: true)); + }, keepIsolateAlive), + retain: false, + release: true, + ); /// Creates a listener block from a Dart function. /// @@ -41882,45 +31125,22 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDic /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSString, - ffi.Pointer, - NSDictionary, - ffi.Pointer, - ) - > + static objc.ObjCBlock, NSCoder)> listener( - void Function( - ffi.Pointer, - NSString, - objc.ObjCObject, - NSDictionary, - ffi.Pointer, - ) - fn, { + void Function(ffi.Pointer, NSCoder) fn, { bool keepIsolateAlive = true, }) { - return objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSString, - ffi.Pointer, - NSDictionary, - ffi.Pointer, - ) - >( - objc.newBlockPort(_1wx624s_wrapListenerBlock_1sr3ozv, ( + return objc.ObjCBlock, NSCoder)>( + objc.newBlockPort(_1wx624s_wrapListenerBlock_18v1jvf, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_1mvxr7g.fromPointer( + final args = _BlockArgs_1599z35.fromPointer( rawArgs, retain: false, release: false, ); - fn(args.arg0, args.arg1, args.arg2, args.arg3, args.arg4); + fn(args.arg0, args.arg1); }, keepIsolateAlive), retain: false, release: true, @@ -41937,45 +31157,22 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDic /// until it is garbage collected by both Dart and ObjC. If the owner isolate /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSString, - ffi.Pointer, - NSDictionary, - ffi.Pointer, - ) - > + static objc.ObjCBlock, NSCoder)> blocking( - void Function( - ffi.Pointer, - NSString, - objc.ObjCObject, - NSDictionary, - ffi.Pointer, - ) - fn, { + void Function(ffi.Pointer, NSCoder) fn, { bool keepIsolateAlive = true, }) { - return objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSString, - ffi.Pointer, - NSDictionary, - ffi.Pointer, - ) - >( - objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_1sr3ozv, ( + return objc.ObjCBlock, NSCoder)>( + objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_18v1jvf, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_1mvxr7g.fromPointer( + final args = _BlockArgs_1599z35.fromPointer( rawArgs, retain: false, release: false, ); - fn(args.arg0, args.arg1, args.arg2, args.arg3, args.arg4); + fn(args.arg0, args.arg1); }, keepIsolateAlive), retain: false, release: true, @@ -41986,39 +31183,24 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDic ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, ) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, ) > >() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >()(arg0, arg1, arg2, arg3, arg4); + void Function(ffi.Pointer, ffi.Pointer) + >()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); @@ -42026,54 +31208,28 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDic ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, ) => (objc.getBlockClosure(block) as void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1, arg2, arg3, arg4); + ))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock, NSString, ffi.Pointer, NSDictionary, ffi.Pointer)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDictionary_ffiVoid$CallExtension - on - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSString, - ffi.Pointer, - NSDictionary, - ffi.Pointer, - ) - > { - void call( - ffi.Pointer arg0, - NSString arg1, - objc.ObjCObject arg2, - NSDictionary arg3, - ffi.Pointer arg4, - ) { +/// Call operator for `objc.ObjCBlock, NSCoder)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSCoder$CallExtension + on objc.ObjCBlock, NSCoder)> { + void call(ffi.Pointer arg0, NSCoder arg1) { final _$$ref = arg1.ref; - final _$$ref$1 = arg2.ref; - final _$$ref$2 = arg3.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< @@ -42081,9 +31237,6 @@ extension ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDictionary_ffi ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, ) > >() @@ -42092,59 +31245,46 @@ extension ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDictionary_ffi ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ) - >()( - ref.pointer, - arg0, - _$$ref.pointer, - _$$ref$1.pointer, - _$$ref$2.pointer, - arg4, - ); + >()(ref.pointer, arg0, _$$ref.pointer); } } -/// Construction methods for `objc.ObjCBlock, ffi.UnsignedLong)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSUInteger { +/// Construction methods for `objc.ObjCBlock, NSPortMessage)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSPortMessage { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) - > + static objc.ObjCBlock, NSPortMessage)> fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) - >(pointer, retain: retain, release: release); + }) => objc.ObjCBlock, NSPortMessage)>( + pointer, + retain: retain, + release: release, + ); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) - > + static objc.ObjCBlock, NSPortMessage)> fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1) + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) > > ptr, - ) => - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) - >( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); + ) => objc.ObjCBlock, NSPortMessage)>( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); /// Creates a block from a Dart function. /// @@ -42154,25 +31294,23 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSUInteger { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) - > + static objc.ObjCBlock, NSPortMessage)> fromFunction( - void Function(ffi.Pointer, DartNSUInteger) fn, { + void Function(ffi.Pointer, NSPortMessage) fn, { bool keepIsolateAlive = true, - }) => - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) - >( - objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - int arg1, - ) { - return fn(arg0, arg1); - }, keepIsolateAlive), - retain: false, - release: true, + }) => objc.ObjCBlock, NSPortMessage)>( + objc.newClosureBlock(_closureCallable, ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return fn( + arg0, + NSPortMessage.fromPointer(arg1, retain: true, release: true), ); + }, keepIsolateAlive), + retain: false, + release: true, + ); /// Creates a listener block from a Dart function. /// @@ -42182,20 +31320,18 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSUInteger { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) - > + static objc.ObjCBlock, NSPortMessage)> listener( - void Function(ffi.Pointer, DartNSUInteger) fn, { + void Function(ffi.Pointer, NSPortMessage) fn, { bool keepIsolateAlive = true, }) { return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) + ffi.Void Function(ffi.Pointer, NSPortMessage) >( - objc.newBlockPort(_1wx624s_wrapListenerBlock_zuf90e, ( + objc.newBlockPort(_1wx624s_wrapListenerBlock_18v1jvf, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_1ltqoqj.fromPointer( + final args = _BlockArgs_1e1kc88.fromPointer( rawArgs, retain: false, release: false, @@ -42218,20 +31354,18 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSUInteger { /// until it is garbage collected by both Dart and ObjC. If the owner isolate /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) - > + static objc.ObjCBlock, NSPortMessage)> blocking( - void Function(ffi.Pointer, DartNSUInteger) fn, { + void Function(ffi.Pointer, NSPortMessage) fn, { bool keepIsolateAlive = true, }) { return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) + ffi.Void Function(ffi.Pointer, NSPortMessage) >( - objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_zuf90e, ( + objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_18v1jvf, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_1ltqoqj.fromPointer( + final args = _BlockArgs_1e1kc88.fromPointer( rawArgs, retain: false, release: false, @@ -42247,55 +31381,61 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSUInteger { static void _fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0, - int arg1, + ffi.Pointer arg1, ) => block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1) + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) > >() - .asFunction, int)>()(arg0, arg1); + .asFunction< + void Function(ffi.Pointer, ffi.Pointer) + >()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - NSUInteger, + ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static void _closureTrampoline( ffi.Pointer block, ffi.Pointer arg0, - int arg1, + ffi.Pointer arg1, ) => (objc.getBlockClosure(block) - as void Function(ffi.Pointer, int))(arg0, arg1); + as void Function( + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - NSUInteger, + ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock, ffi.UnsignedLong)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSUInteger$CallExtension - on - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) - > { - void call(ffi.Pointer arg0, DartNSUInteger arg1) { +/// Call operator for `objc.ObjCBlock, NSPortMessage)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSPortMessage$CallExtension + on objc.ObjCBlock, NSPortMessage)> { + void call(ffi.Pointer arg0, NSPortMessage arg1) { + final _$$ref = arg1.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, ffi.Pointer arg0, - NSUInteger arg1, + ffi.Pointer arg1, ) > >() @@ -42303,47 +31443,54 @@ extension ObjCBlock_ffiVoid_ffiVoid_NSUInteger$CallExtension void Function( ffi.Pointer, ffi.Pointer, - int, + ffi.Pointer, ) - >()(ref.pointer, arg0, arg1); + >()(ref.pointer, arg0, _$$ref.pointer); } } -/// Construction methods for `objc.ObjCBlock, NSURLHandle)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle { +/// Construction methods for `objc.ObjCBlock, NSRange, ffi.Pointer)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock, NSURLHandle)> + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + > fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, - }) => objc.ObjCBlock, NSURLHandle)>( - pointer, - retain: retain, - release: release, - ); + }) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, NSURLHandle)> + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function( ffi.Pointer arg0, - ffi.Pointer arg1, + NSRange arg1, + ffi.Pointer arg2, ) > > ptr, - ) => objc.ObjCBlock, NSURLHandle)>( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); + ) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); /// Creates a block from a Dart function. /// @@ -42353,23 +31500,26 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock, NSURLHandle)> + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + > fromFunction( - void Function(ffi.Pointer, NSURLHandle) fn, { + void Function(ffi.Pointer, NSRange, ffi.Pointer) fn, { bool keepIsolateAlive = true, - }) => objc.ObjCBlock, NSURLHandle)>( - objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - return fn( - arg0, - NSURLHandle.fromPointer(arg1, retain: true, release: true), + }) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + >( + objc.newClosureBlock(_closureCallable, ( + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2, + ) { + return fn(arg0, arg1, arg2); + }, keepIsolateAlive), + retain: false, + release: true, ); - }, keepIsolateAlive), - retain: false, - release: true, - ); /// Creates a listener block from a Dart function. /// @@ -42379,24 +31529,26 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle { /// /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. - static objc.ObjCBlock, NSURLHandle)> + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + > listener( - void Function(ffi.Pointer, NSURLHandle) fn, { + void Function(ffi.Pointer, NSRange, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle) + ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) >( - objc.newBlockPort(_1wx624s_wrapListenerBlock_18v1jvf, ( + objc.newBlockPort(_1wx624s_wrapListenerBlock_1q8ia8l, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_xj71gr.fromPointer( + final args = _BlockArgs_3djt55.fromPointer( rawArgs, retain: false, release: false, ); - fn(args.arg0, args.arg1); + fn(args.arg0, args.arg1, args.arg2); }, keepIsolateAlive), retain: false, release: true, @@ -42413,24 +31565,26 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle { /// until it is garbage collected by both Dart and ObjC. If the owner isolate /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. - static objc.ObjCBlock, NSURLHandle)> + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) + > blocking( - void Function(ffi.Pointer, NSURLHandle) fn, { + void Function(ffi.Pointer, NSRange, ffi.Pointer) fn, { bool keepIsolateAlive = true, }) { return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle) + ffi.Void Function(ffi.Pointer, NSRange, ffi.Pointer) >( - objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_18v1jvf, ( + objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_1q8ia8l, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_xj71gr.fromPointer( + final args = _BlockArgs_3djt55.fromPointer( rawArgs, retain: false, release: false, ); - fn(args.arg0, args.arg1); + fn(args.arg0, args.arg1, args.arg2); }, keepIsolateAlive), retain: false, release: true, @@ -42440,61 +31594,78 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle { static void _fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, + NSRange arg1, + ffi.Pointer arg2, ) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer arg0, - ffi.Pointer arg1, + NSRange arg1, + ffi.Pointer arg2, ) > >() .asFunction< - void Function(ffi.Pointer, ffi.Pointer) - >()(arg0, arg1); + void Function(ffi.Pointer, NSRange, ffi.Pointer) + >()(arg0, arg1, arg2); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + NSRange, + ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static void _closureTrampoline( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, + NSRange arg1, + ffi.Pointer arg2, ) => (objc.getBlockClosure(block) as void Function( ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1); + NSRange, + ffi.Pointer, + ))(arg0, arg1, arg2); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + NSRange, + ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock, NSURLHandle)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSURLHandle$CallExtension - on objc.ObjCBlock, NSURLHandle)> { - void call(ffi.Pointer arg0, NSURLHandle arg1) { - final _$$ref = arg1.ref; +/// Call operator for `objc.ObjCBlock, NSRange, ffi.Pointer)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSRange_bool$CallExtension + on + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSRange, + ffi.Pointer, + ) + > { + void call( + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2, + ) { return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, + NSRange arg1, + ffi.Pointer arg2, ) > >() @@ -42502,17 +31673,18 @@ extension ObjCBlock_ffiVoid_ffiVoid_NSURLHandle$CallExtension void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + NSRange, + ffi.Pointer, ) - >()(ref.pointer, arg0, _$$ref.pointer); + >()(ref.pointer, arg0, arg1, arg2); } } -/// Construction methods for `objc.ObjCBlock, NSURLHandle, NSData)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData { +/// Construction methods for `objc.ObjCBlock, NSStream, NSUInteger)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSData) + ffi.Void Function(ffi.Pointer, NSStream, NSUInteger) > fromPointer( ffi.Pointer pointer, { @@ -42520,7 +31692,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData { bool release = false, }) => objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSData) + ffi.Void Function(ffi.Pointer, NSStream, NSUInteger) >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. @@ -42529,7 +31701,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSData) + ffi.Void Function(ffi.Pointer, NSStream, NSUInteger) > fromFunctionPointer( ffi.Pointer< @@ -42537,14 +31709,14 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData { ffi.Void Function( ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, + NSUInteger arg2, ) > > ptr, ) => objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSData) + ffi.Void Function(ffi.Pointer, NSStream, NSUInteger) >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, @@ -42560,24 +31732,24 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSData) + ffi.Void Function(ffi.Pointer, NSStream, NSUInteger) > fromFunction( - void Function(ffi.Pointer, NSURLHandle, NSData) fn, { + void Function(ffi.Pointer, NSStream, DartNSUInteger) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSData) + ffi.Void Function(ffi.Pointer, NSStream, NSUInteger) >( objc.newClosureBlock(_closureCallable, ( ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, + int arg2, ) { return fn( arg0, - NSURLHandle.fromPointer(arg1, retain: true, release: true), - NSData.fromPointer(arg2, retain: true, release: true), + NSStream.fromPointer(arg1, retain: true, release: true), + arg2, ); }, keepIsolateAlive), retain: false, @@ -42593,19 +31765,19 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSData) + ffi.Void Function(ffi.Pointer, NSStream, NSUInteger) > listener( - void Function(ffi.Pointer, NSURLHandle, NSData) fn, { + void Function(ffi.Pointer, NSStream, DartNSUInteger) fn, { bool keepIsolateAlive = true, }) { return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSData) + ffi.Void Function(ffi.Pointer, NSStream, NSUInteger) >( - objc.newBlockPort(_1wx624s_wrapListenerBlock_fjrv01, ( + objc.newBlockPort(_1wx624s_wrapListenerBlock_hoampi, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_136y7ma.fromPointer( + final args = _BlockArgs_64fwqt.fromPointer( rawArgs, retain: false, release: false, @@ -42629,19 +31801,19 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData { /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSData) + ffi.Void Function(ffi.Pointer, NSStream, NSUInteger) > blocking( - void Function(ffi.Pointer, NSURLHandle, NSData) fn, { + void Function(ffi.Pointer, NSStream, DartNSUInteger) fn, { bool keepIsolateAlive = true, }) { return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSData) + ffi.Void Function(ffi.Pointer, NSStream, NSUInteger) >( - objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_fjrv01, ( + objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_hoampi, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_136y7ma.fromPointer( + final args = _BlockArgs_64fwqt.fromPointer( rawArgs, retain: false, release: false, @@ -42658,14 +31830,14 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData { ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, + int arg2, ) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, + NSUInteger arg2, ) > >() @@ -42673,7 +31845,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData { void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + int, ) >()(arg0, arg1, arg2); static ffi.Pointer _fnPtrCallable = @@ -42682,7 +31854,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData { ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, + NSUInteger, ) >(_fnPtrTrampoline) .cast(); @@ -42690,13 +31862,13 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData { ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, + int arg2, ) => (objc.getBlockClosure(block) as void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + int, ))(arg0, arg1, arg2); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< @@ -42704,21 +31876,20 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData { ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, + NSUInteger, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock, NSURLHandle, NSData)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData$CallExtension +/// Call operator for `objc.ObjCBlock, NSStream, NSUInteger)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSStream_NSStreamEvent$CallExtension on objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSData) + ffi.Void Function(ffi.Pointer, NSStream, NSUInteger) > { - void call(ffi.Pointer arg0, NSURLHandle arg1, NSData arg2) { + void call(ffi.Pointer arg0, NSStream arg1, DartNSUInteger arg2) { final _$$ref = arg1.ref; - final _$$ref$1 = arg2.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< @@ -42726,7 +31897,7 @@ extension ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData$CallExtension ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, + NSUInteger arg2, ) > >() @@ -42735,17 +31906,23 @@ extension ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData$CallExtension ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, + int, ) - >()(ref.pointer, arg0, _$$ref.pointer, _$$ref$1.pointer); + >()(ref.pointer, arg0, _$$ref.pointer, arg2); } } -/// Construction methods for `objc.ObjCBlock, NSURLHandle, NSString)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { +/// Construction methods for `objc.ObjCBlock, NSString, ffi.Pointer, NSDictionary, ffi.Pointer)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDictionary_ffiVoid { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + ffi.Void Function( + ffi.Pointer, + NSString, + ffi.Pointer, + NSDictionary, + ffi.Pointer, + ) > fromPointer( ffi.Pointer pointer, { @@ -42753,7 +31930,13 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { bool release = false, }) => objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + ffi.Void Function( + ffi.Pointer, + NSString, + ffi.Pointer, + NSDictionary, + ffi.Pointer, + ) >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. @@ -42762,7 +31945,13 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + ffi.Void Function( + ffi.Pointer, + NSString, + ffi.Pointer, + NSDictionary, + ffi.Pointer, + ) > fromFunctionPointer( ffi.Pointer< @@ -42771,13 +31960,21 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, ) > > ptr, ) => objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + ffi.Void Function( + ffi.Pointer, + NSString, + ffi.Pointer, + NSDictionary, + ffi.Pointer, + ) >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, @@ -42793,24 +31990,47 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + ffi.Void Function( + ffi.Pointer, + NSString, + ffi.Pointer, + NSDictionary, + ffi.Pointer, + ) > fromFunction( - void Function(ffi.Pointer, NSURLHandle, NSString) fn, { + void Function( + ffi.Pointer, + NSString, + objc.ObjCObject, + NSDictionary, + ffi.Pointer, + ) + fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + ffi.Void Function( + ffi.Pointer, + NSString, + ffi.Pointer, + NSDictionary, + ffi.Pointer, + ) >( objc.newClosureBlock(_closureCallable, ( ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, ) { return fn( arg0, - NSURLHandle.fromPointer(arg1, retain: true, release: true), - NSString.fromPointer(arg2, retain: true, release: true), + NSString.fromPointer(arg1, retain: true, release: true), + objc.ObjCObject(arg2, retain: true, release: true), + NSDictionary.fromPointer(arg3, retain: true, release: true), + arg4, ); }, keepIsolateAlive), retain: false, @@ -42826,25 +32046,44 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + ffi.Void Function( + ffi.Pointer, + NSString, + ffi.Pointer, + NSDictionary, + ffi.Pointer, + ) > listener( - void Function(ffi.Pointer, NSURLHandle, NSString) fn, { + void Function( + ffi.Pointer, + NSString, + objc.ObjCObject, + NSDictionary, + ffi.Pointer, + ) + fn, { bool keepIsolateAlive = true, }) { return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + ffi.Void Function( + ffi.Pointer, + NSString, + ffi.Pointer, + NSDictionary, + ffi.Pointer, + ) >( - objc.newBlockPort(_1wx624s_wrapListenerBlock_fjrv01, ( + objc.newBlockPort(_1wx624s_wrapListenerBlock_1sr3ozv, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_teaic5.fromPointer( + final args = _BlockArgs_1mvxr7g.fromPointer( rawArgs, retain: false, release: false, ); - fn(args.arg0, args.arg1, args.arg2); + fn(args.arg0, args.arg1, args.arg2, args.arg3, args.arg4); }, keepIsolateAlive), retain: false, release: true, @@ -42862,25 +32101,44 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + ffi.Void Function( + ffi.Pointer, + NSString, + ffi.Pointer, + NSDictionary, + ffi.Pointer, + ) > blocking( - void Function(ffi.Pointer, NSURLHandle, NSString) fn, { + void Function( + ffi.Pointer, + NSString, + objc.ObjCObject, + NSDictionary, + ffi.Pointer, + ) + fn, { bool keepIsolateAlive = true, }) { return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + ffi.Void Function( + ffi.Pointer, + NSString, + ffi.Pointer, + NSDictionary, + ffi.Pointer, + ) >( - objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_fjrv01, ( + objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_1sr3ozv, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_teaic5.fromPointer( + final args = _BlockArgs_1mvxr7g.fromPointer( rawArgs, retain: false, release: false, ); - fn(args.arg0, args.arg1, args.arg2); + fn(args.arg0, args.arg1, args.arg2, args.arg3, args.arg4); }, keepIsolateAlive), retain: false, release: true, @@ -42892,6 +32150,8 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, ) => block.ref.target .cast< ffi.NativeFunction< @@ -42899,6 +32159,8 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, ) > >() @@ -42907,8 +32169,10 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) - >()(arg0, arg1, arg2); + >()(arg0, arg1, arg2, arg3, arg4); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( @@ -42916,6 +32180,8 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); @@ -42924,13 +32190,17 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, ) => (objc.getBlockClosure(block) as void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ))(arg0, arg1, arg2); + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1, arg2, arg3, arg4); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( @@ -42938,20 +32208,35 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock, NSURLHandle, NSString)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString$CallExtension +/// Call operator for `objc.ObjCBlock, NSString, ffi.Pointer, NSDictionary, ffi.Pointer)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSString_objcObjCObjectImpl_NSDictionary_ffiVoid$CallExtension on objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLHandle, NSString) + ffi.Void Function( + ffi.Pointer, + NSString, + ffi.Pointer, + NSDictionary, + ffi.Pointer, + ) > { - void call(ffi.Pointer arg0, NSURLHandle arg1, NSString arg2) { + void call( + ffi.Pointer arg0, + NSString arg1, + objc.ObjCObject arg2, + NSDictionary arg3, + ffi.Pointer arg4, + ) { final _$$ref = arg1.ref; final _$$ref$1 = arg2.ref; + final _$$ref$2 = arg3.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< @@ -42960,6 +32245,8 @@ extension ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString$CallExtension ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, ) > >() @@ -42969,16 +32256,25 @@ extension ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString$CallExtension ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ) - >()(ref.pointer, arg0, _$$ref.pointer, _$$ref$1.pointer); + >()( + ref.pointer, + arg0, + _$$ref.pointer, + _$$ref$1.pointer, + _$$ref$2.pointer, + arg4, + ); } } -/// Construction methods for `objc.ObjCBlock?, NSError?)>`. -abstract final class ObjCBlock_ffiVoid_idNSItemProviderReading_NSError { +/// Construction methods for `objc.ObjCBlock, ffi.UnsignedLong)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSUInteger { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) > fromPointer( ffi.Pointer pointer, { @@ -42986,7 +32282,7 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderReading_NSError { bool release = false, }) => objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. @@ -42995,21 +32291,18 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderReading_NSError { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) + ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1) > > ptr, ) => objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, @@ -43025,31 +32318,20 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderReading_NSError { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) > fromFunction( - void Function(NSItemProviderReading?, NSError?) fn, { + void Function(ffi.Pointer, DartNSUInteger) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) >( objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + int arg1, ) { - return fn( - arg0.address == 0 - ? null - : NSItemProviderReading.fromPointer( - arg0, - retain: true, - release: true, - ), - arg1.address == 0 - ? null - : NSError.fromPointer(arg1, retain: true, release: true), - ); + return fn(arg0, arg1); }, keepIsolateAlive), retain: false, release: true, @@ -43064,19 +32346,19 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderReading_NSError { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) > listener( - void Function(NSItemProviderReading?, NSError?) fn, { + void Function(ffi.Pointer, DartNSUInteger) fn, { bool keepIsolateAlive = true, }) { return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) >( - objc.newBlockPort(_1wx624s_wrapListenerBlock_pfv6jd, ( + objc.newBlockPort(_1wx624s_wrapListenerBlock_zuf90e, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_1dse6r3.fromPointer( + final args = _BlockArgs_1ltqoqj.fromPointer( rawArgs, retain: false, release: false, @@ -43100,19 +32382,19 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderReading_NSError { /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) > blocking( - void Function(NSItemProviderReading?, NSError?) fn, { + void Function(ffi.Pointer, DartNSUInteger) fn, { bool keepIsolateAlive = true, }) { return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) >( - objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_pfv6jd, ( + objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_zuf90e, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_1dse6r3.fromPointer( + final args = _BlockArgs_1ltqoqj.fromPointer( rawArgs, retain: false, release: false, @@ -43127,88 +32409,71 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderReading_NSError { static void _fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + int arg1, ) => block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) + ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1) > >() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ) - >()(arg0, arg1); + .asFunction, int)>()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, + NSUInteger, ) >(_fnPtrTrampoline) .cast(); static void _closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + int arg1, ) => (objc.getBlockClosure(block) - as void Function( - ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1); + as void Function(ffi.Pointer, int))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, + NSUInteger, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock?, NSError?)>`. -extension ObjCBlock_ffiVoid_idNSItemProviderReading_NSError$CallExtension +/// Call operator for `objc.ObjCBlock, ffi.UnsignedLong)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSUInteger$CallExtension on objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError?) + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong) > { - void call(NSItemProviderReading? arg0, NSError? arg1) { - final _$$ref = arg0?.ref; - final _$$ref$1 = arg1?.ref; + void call(ffi.Pointer arg0, DartNSUInteger arg1) { return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer arg0, + NSUInteger arg1, ) > >() .asFunction< void Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + ffi.Pointer, + int, ) - >()( - ref.pointer, - _$$ref?.pointer ?? ffi.nullptr, - _$$ref$1?.pointer ?? ffi.nullptr, - ); + >()(ref.pointer, arg0, arg1); } } /// Construction methods for `objc.ObjCBlock?, NSError?)>`. -abstract final class ObjCBlock_ffiVoid_idNSItemProviderWriting_NSError { +abstract final class ObjCBlock_ffiVoid_idNSItemProviderReading_NSError { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< ffi.Void Function(ffi.Pointer?, NSError?) @@ -43261,7 +32526,7 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderWriting_NSError { ffi.Void Function(ffi.Pointer?, NSError?) > fromFunction( - void Function(NSItemProviderWriting?, NSError?) fn, { + void Function(NSItemProviderReading?, NSError?) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< @@ -43274,7 +32539,7 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderWriting_NSError { return fn( arg0.address == 0 ? null - : NSItemProviderWriting.fromPointer( + : NSItemProviderReading.fromPointer( arg0, retain: true, release: true, @@ -43300,7 +32565,7 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderWriting_NSError { ffi.Void Function(ffi.Pointer?, NSError?) > listener( - void Function(NSItemProviderWriting?, NSError?) fn, { + void Function(NSItemProviderReading?, NSError?) fn, { bool keepIsolateAlive = true, }) { return objc.ObjCBlock< @@ -43309,7 +32574,7 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderWriting_NSError { objc.newBlockPort(_1wx624s_wrapListenerBlock_pfv6jd, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_1y7l7kf.fromPointer( + final args = _BlockArgs_1dse6r3.fromPointer( rawArgs, retain: false, release: false, @@ -43336,7 +32601,7 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderWriting_NSError { ffi.Void Function(ffi.Pointer?, NSError?) > blocking( - void Function(NSItemProviderWriting?, NSError?) fn, { + void Function(NSItemProviderReading?, NSError?) fn, { bool keepIsolateAlive = true, }) { return objc.ObjCBlock< @@ -43345,7 +32610,7 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderWriting_NSError { objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_pfv6jd, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_1y7l7kf.fromPointer( + final args = _BlockArgs_1dse6r3.fromPointer( rawArgs, retain: false, release: false, @@ -43408,12 +32673,12 @@ abstract final class ObjCBlock_ffiVoid_idNSItemProviderWriting_NSError { } /// Call operator for `objc.ObjCBlock?, NSError?)>`. -extension ObjCBlock_ffiVoid_idNSItemProviderWriting_NSError$CallExtension +extension ObjCBlock_ffiVoid_idNSItemProviderReading_NSError$CallExtension on objc.ObjCBlock< ffi.Void Function(ffi.Pointer?, NSError?) > { - void call(NSItemProviderWriting? arg0, NSError? arg1) { + void call(NSItemProviderReading? arg0, NSError? arg1) { final _$$ref = arg0?.ref; final _$$ref$1 = arg1?.ref; return ref.pointer.ref.invoke @@ -43440,11 +32705,11 @@ extension ObjCBlock_ffiVoid_idNSItemProviderWriting_NSError$CallExtension } } -/// Construction methods for `objc.ObjCBlock?, NSError)>`. -abstract final class ObjCBlock_ffiVoid_idNSSecureCoding_NSError { +/// Construction methods for `objc.ObjCBlock?, NSError?)>`. +abstract final class ObjCBlock_ffiVoid_idNSItemProviderWriting_NSError { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) + ffi.Void Function(ffi.Pointer?, NSError?) > fromPointer( ffi.Pointer pointer, { @@ -43452,7 +32717,7 @@ abstract final class ObjCBlock_ffiVoid_idNSSecureCoding_NSError { bool release = false, }) => objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) + ffi.Void Function(ffi.Pointer?, NSError?) >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. @@ -43461,7 +32726,7 @@ abstract final class ObjCBlock_ffiVoid_idNSSecureCoding_NSError { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) + ffi.Void Function(ffi.Pointer?, NSError?) > fromFunctionPointer( ffi.Pointer< @@ -43475,7 +32740,7 @@ abstract final class ObjCBlock_ffiVoid_idNSSecureCoding_NSError { ptr, ) => objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) + ffi.Void Function(ffi.Pointer?, NSError?) >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, @@ -43491,14 +32756,14 @@ abstract final class ObjCBlock_ffiVoid_idNSSecureCoding_NSError { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) + ffi.Void Function(ffi.Pointer?, NSError?) > fromFunction( - void Function(NSSecureCoding?, NSError) fn, { + void Function(NSItemProviderWriting?, NSError?) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) + ffi.Void Function(ffi.Pointer?, NSError?) >( objc.newClosureBlock(_closureCallable, ( ffi.Pointer arg0, @@ -43507,8 +32772,14 @@ abstract final class ObjCBlock_ffiVoid_idNSSecureCoding_NSError { return fn( arg0.address == 0 ? null - : NSSecureCoding.fromPointer(arg0, retain: true, release: true), - NSError.fromPointer(arg1, retain: true, release: true), + : NSItemProviderWriting.fromPointer( + arg0, + retain: true, + release: true, + ), + arg1.address == 0 + ? null + : NSError.fromPointer(arg1, retain: true, release: true), ); }, keepIsolateAlive), retain: false, @@ -43524,19 +32795,19 @@ abstract final class ObjCBlock_ffiVoid_idNSSecureCoding_NSError { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) + ffi.Void Function(ffi.Pointer?, NSError?) > listener( - void Function(NSSecureCoding?, NSError) fn, { + void Function(NSItemProviderWriting?, NSError?) fn, { bool keepIsolateAlive = true, }) { return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) + ffi.Void Function(ffi.Pointer?, NSError?) >( objc.newBlockPort(_1wx624s_wrapListenerBlock_pfv6jd, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_krrtfh.fromPointer( + final args = _BlockArgs_1y7l7kf.fromPointer( rawArgs, retain: false, release: false, @@ -43560,19 +32831,19 @@ abstract final class ObjCBlock_ffiVoid_idNSSecureCoding_NSError { /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) + ffi.Void Function(ffi.Pointer?, NSError?) > blocking( - void Function(NSSecureCoding?, NSError) fn, { + void Function(NSItemProviderWriting?, NSError?) fn, { bool keepIsolateAlive = true, }) { return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) + ffi.Void Function(ffi.Pointer?, NSError?) >( objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_pfv6jd, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_krrtfh.fromPointer( + final args = _BlockArgs_1y7l7kf.fromPointer( rawArgs, retain: false, release: false, @@ -43634,15 +32905,15 @@ abstract final class ObjCBlock_ffiVoid_idNSSecureCoding_NSError { .cast(); } -/// Call operator for `objc.ObjCBlock?, NSError)>`. -extension ObjCBlock_ffiVoid_idNSSecureCoding_NSError$CallExtension +/// Call operator for `objc.ObjCBlock?, NSError?)>`. +extension ObjCBlock_ffiVoid_idNSItemProviderWriting_NSError$CallExtension on objc.ObjCBlock< - ffi.Void Function(ffi.Pointer?, NSError) + ffi.Void Function(ffi.Pointer?, NSError?) > { - void call(NSSecureCoding? arg0, NSError arg1) { + void call(NSItemProviderWriting? arg0, NSError? arg1) { final _$$ref = arg0?.ref; - final _$$ref$1 = arg1.ref; + final _$$ref$1 = arg1?.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< @@ -43659,19 +32930,19 @@ extension ObjCBlock_ffiVoid_idNSSecureCoding_NSError$CallExtension ffi.Pointer, ffi.Pointer, ) - >()(ref.pointer, _$$ref?.pointer ?? ffi.nullptr, _$$ref$1.pointer); + >()( + ref.pointer, + _$$ref?.pointer ?? ffi.nullptr, + _$$ref$1?.pointer ?? ffi.nullptr, + ); } } -/// Construction methods for `objc.ObjCBlock?, NSRange, ffi.Pointer)>`. -abstract final class ObjCBlock_ffiVoid_objcObjCObjectImpl_NSRange_bool { +/// Construction methods for `objc.ObjCBlock?, NSError)>`. +abstract final class ObjCBlock_ffiVoid_idNSSecureCoding_NSError { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer?, - NSRange, - ffi.Pointer, - ) + ffi.Void Function(ffi.Pointer?, NSError) > fromPointer( ffi.Pointer pointer, { @@ -43679,11 +32950,7 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObjectImpl_NSRange_bool { bool release = false, }) => objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer?, - NSRange, - ffi.Pointer, - ) + ffi.Void Function(ffi.Pointer?, NSError) >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. @@ -43692,30 +32959,21 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObjectImpl_NSRange_bool { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer?, - NSRange, - ffi.Pointer, - ) + ffi.Void Function(ffi.Pointer?, NSError) > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function( ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2, + ffi.Pointer arg1, ) > > ptr, ) => objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer?, - NSRange, - ffi.Pointer, - ) + ffi.Void Function(ffi.Pointer?, NSError) >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, @@ -43731,34 +32989,24 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObjectImpl_NSRange_bool { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer?, - NSRange, - ffi.Pointer, - ) + ffi.Void Function(ffi.Pointer?, NSError) > fromFunction( - void Function(objc.ObjCObject?, NSRange, ffi.Pointer) fn, { + void Function(NSSecureCoding?, NSError) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer?, - NSRange, - ffi.Pointer, - ) + ffi.Void Function(ffi.Pointer?, NSError) >( objc.newClosureBlock(_closureCallable, ( ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2, + ffi.Pointer arg1, ) { return fn( arg0.address == 0 ? null - : objc.ObjCObject(arg0, retain: true, release: true), - arg1, - arg2, + : NSSecureCoding.fromPointer(arg0, retain: true, release: true), + NSError.fromPointer(arg1, retain: true, release: true), ); }, keepIsolateAlive), retain: false, @@ -43774,33 +33022,25 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObjectImpl_NSRange_bool { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer?, - NSRange, - ffi.Pointer, - ) + ffi.Void Function(ffi.Pointer?, NSError) > listener( - void Function(objc.ObjCObject?, NSRange, ffi.Pointer) fn, { + void Function(NSSecureCoding?, NSError) fn, { bool keepIsolateAlive = true, }) { return objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer?, - NSRange, - ffi.Pointer, - ) + ffi.Void Function(ffi.Pointer?, NSError) >( - objc.newBlockPort(_1wx624s_wrapListenerBlock_1a22wz, ( + objc.newBlockPort(_1wx624s_wrapListenerBlock_pfv6jd, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_q6fcam.fromPointer( + final args = _BlockArgs_krrtfh.fromPointer( rawArgs, retain: false, release: false, ); - fn(args.arg0, args.arg1, args.arg2); + fn(args.arg0, args.arg1); }, keepIsolateAlive), retain: false, release: true, @@ -43818,33 +33058,25 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObjectImpl_NSRange_bool { /// has shut down, and the block is invoked by native code, it may block /// indefinitely, or have other undefined behavior. static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer?, - NSRange, - ffi.Pointer, - ) + ffi.Void Function(ffi.Pointer?, NSError) > blocking( - void Function(objc.ObjCObject?, NSRange, ffi.Pointer) fn, { + void Function(NSSecureCoding?, NSError) fn, { bool keepIsolateAlive = true, }) { return objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer?, - NSRange, - ffi.Pointer, - ) + ffi.Void Function(ffi.Pointer?, NSError) >( - objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_1a22wz, ( + objc.newBlockingBlockPort(_1wx624s_wrapBlockingBlock_pfv6jd, ( ffi.Pointer rawArgs, ) { - final args = _BlockArgs_q6fcam.fromPointer( + final args = _BlockArgs_krrtfh.fromPointer( rawArgs, retain: false, release: false, ); - fn(args.arg0, args.arg1, args.arg2); + fn(args.arg0, args.arg1); }, keepIsolateAlive), retain: false, release: true, @@ -43854,79 +33086,68 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObjectImpl_NSRange_bool { static void _fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2, + ffi.Pointer arg1, ) => block.ref.target .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2, + ffi.Pointer arg1, ) > >() .asFunction< void Function( ffi.Pointer, - NSRange, - ffi.Pointer, + ffi.Pointer, ) - >()(arg0, arg1, arg2); + >()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - NSRange, - ffi.Pointer, + ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static void _closureTrampoline( ffi.Pointer block, ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2, + ffi.Pointer arg1, ) => (objc.getBlockClosure(block) as void Function( ffi.Pointer, - NSRange, - ffi.Pointer, - ))(arg0, arg1, arg2); + ffi.Pointer, + ))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - NSRange, - ffi.Pointer, + ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock?, NSRange, ffi.Pointer)>`. -extension ObjCBlock_ffiVoid_objcObjCObjectImpl_NSRange_bool$CallExtension +/// Call operator for `objc.ObjCBlock?, NSError)>`. +extension ObjCBlock_ffiVoid_idNSSecureCoding_NSError$CallExtension on objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer?, - NSRange, - ffi.Pointer, - ) + ffi.Void Function(ffi.Pointer?, NSError) > { - void call(objc.ObjCObject? arg0, NSRange arg1, ffi.Pointer arg2) { + void call(NSSecureCoding? arg0, NSError arg1) { final _$$ref = arg0?.ref; + final _$$ref$1 = arg1.ref; return ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer block, ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2, + ffi.Pointer arg1, ) > >() @@ -43934,10 +33155,9 @@ extension ObjCBlock_ffiVoid_objcObjCObjectImpl_NSRange_bool$CallExtension void Function( ffi.Pointer, ffi.Pointer, - NSRange, - ffi.Pointer, + ffi.Pointer, ) - >()(ref.pointer, _$$ref?.pointer ?? ffi.nullptr, arg1, arg2); + >()(ref.pointer, _$$ref?.pointer ?? ffi.nullptr, _$$ref$1.pointer); } } @@ -46030,51 +35250,6 @@ extension type Protocol._(objc.ObjCObject object$) implements objc.ObjCObject { extension Protocol$Methods on Protocol {} -extension type _BlockArgs_136y7ma._(objc.ObjCObject object$) - implements objc.ObjCObject { - /// Constructs a [_BlockArgs_136y7ma] that points to the same underlying object as [other]. - _BlockArgs_136y7ma.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); - } - - /// Constructs a [_BlockArgs_136y7ma] that wraps the given raw object pointer. - _BlockArgs_136y7ma.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); - } - - /// Returns whether [obj] is an instance of [_BlockArgs_136y7ma]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class__BlockArgs_136y7ma, - ); -} - -extension _BlockArgs_136y7ma$Methods on _BlockArgs_136y7ma { - ffi.Pointer get arg0 { - final _$$ref = object$.ref; - return _objc_msgSend_6ex6p5(_$$ref.pointer, _sel_arg0); - } - - NSURLHandle get arg1 { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_arg1); - return NSURLHandle.fromPointer($ret, retain: true, release: true); - } - - NSData get arg2 { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_arg2); - return NSData.fromPointer($ret, retain: true, release: true); - } -} - extension type _BlockArgs_139usnw._(objc.ObjCObject object$) implements objc.ObjCObject { /// Constructs a [_BlockArgs_139usnw] that points to the same underlying object as [other]. @@ -46982,105 +36157,6 @@ extension _BlockArgs_ounrb4$Methods on _BlockArgs_ounrb4 { } } -extension type _BlockArgs_q6fcam._(objc.ObjCObject object$) - implements objc.ObjCObject { - /// Constructs a [_BlockArgs_q6fcam] that points to the same underlying object as [other]. - _BlockArgs_q6fcam.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); - } - - /// Constructs a [_BlockArgs_q6fcam] that wraps the given raw object pointer. - _BlockArgs_q6fcam.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); - } - - /// Returns whether [obj] is an instance of [_BlockArgs_q6fcam]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class__BlockArgs_q6fcam, - ); -} - -extension _BlockArgs_q6fcam$Methods on _BlockArgs_q6fcam { - objc.ObjCObject? get arg0 { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_arg0); - return $ret.address == 0 - ? null - : objc.ObjCObject($ret, retain: true, release: true); - } - - NSRange get arg1 { - final _$$ref = object$.ref; - final $ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants - ? _objc_msgSend_1u11dbbStret($ptr, _$$ref.pointer, _sel_arg1) - : $ptr.ref = _objc_msgSend_1u11dbb(_$$ref.pointer, _sel_arg1); - final $finalizable = $ptr.cast().asTypedList( - ffi.sizeOf(), - finalizer: pkg_ffi.calloc.nativeFree, - ); - return ffi.Struct.create($finalizable); - } - - ffi.Pointer get arg2 { - final _$$ref = object$.ref; - return _objc_msgSend_1sbro63(_$$ref.pointer, _sel_arg2); - } -} - -extension type _BlockArgs_teaic5._(objc.ObjCObject object$) - implements objc.ObjCObject { - /// Constructs a [_BlockArgs_teaic5] that points to the same underlying object as [other]. - _BlockArgs_teaic5.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); - } - - /// Constructs a [_BlockArgs_teaic5] that wraps the given raw object pointer. - _BlockArgs_teaic5.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); - } - - /// Returns whether [obj] is an instance of [_BlockArgs_teaic5]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class__BlockArgs_teaic5, - ); -} - -extension _BlockArgs_teaic5$Methods on _BlockArgs_teaic5 { - ffi.Pointer get arg0 { - final _$$ref = object$.ref; - return _objc_msgSend_6ex6p5(_$$ref.pointer, _sel_arg0); - } - - NSURLHandle get arg1 { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_arg1); - return NSURLHandle.fromPointer($ret, retain: true, release: true); - } - - NSString get arg2 { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_arg2); - return NSString.fromPointer($ret, retain: true, release: true); - } -} - extension type _BlockArgs_uckb5m._(objc.ObjCObject object$) implements objc.ObjCObject { /// Constructs a [_BlockArgs_uckb5m] that points to the same underlying object as [other]. @@ -47127,58 +36203,6 @@ extension _BlockArgs_uckb5m$Methods on _BlockArgs_uckb5m { } } -extension type _BlockArgs_v8in3._(objc.ObjCObject object$) - implements objc.ObjCObject { - /// Constructs a [_BlockArgs_v8in3] that points to the same underlying object as [other]. - _BlockArgs_v8in3.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); - } - - /// Constructs a [_BlockArgs_v8in3] that wraps the given raw object pointer. - _BlockArgs_v8in3.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); - } - - /// Returns whether [obj] is an instance of [_BlockArgs_v8in3]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class__BlockArgs_v8in3, - ); -} - -extension _BlockArgs_v8in3$Methods on _BlockArgs_v8in3 { - NSDictionary get arg0 { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_arg0); - return NSDictionary.fromPointer($ret, retain: true, release: true); - } - - NSRange get arg1 { - final _$$ref = object$.ref; - final $ptr = pkg_ffi.calloc(); - objc.useMsgSendVariants - ? _objc_msgSend_1u11dbbStret($ptr, _$$ref.pointer, _sel_arg1) - : $ptr.ref = _objc_msgSend_1u11dbb(_$$ref.pointer, _sel_arg1); - final $finalizable = $ptr.cast().asTypedList( - ffi.sizeOf(), - finalizer: pkg_ffi.calloc.nativeFree, - ); - return ffi.Struct.create($finalizable); - } - - ffi.Pointer get arg2 { - final _$$ref = object$.ref; - return _objc_msgSend_1sbro63(_$$ref.pointer, _sel_arg2); - } -} - extension type _BlockArgs_wnzfgp._(objc.ObjCObject object$) implements objc.ObjCObject { /// Constructs a [_BlockArgs_wnzfgp] that points to the same underlying object as [other]. @@ -47262,45 +36286,6 @@ extension _BlockArgs_x5cg0$Methods on _BlockArgs_x5cg0 { } } -extension type _BlockArgs_xj71gr._(objc.ObjCObject object$) - implements objc.ObjCObject { - /// Constructs a [_BlockArgs_xj71gr] that points to the same underlying object as [other]. - _BlockArgs_xj71gr.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); - } - - /// Constructs a [_BlockArgs_xj71gr] that wraps the given raw object pointer. - _BlockArgs_xj71gr.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); - } - - /// Returns whether [obj] is an instance of [_BlockArgs_xj71gr]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class__BlockArgs_xj71gr, - ); -} - -extension _BlockArgs_xj71gr$Methods on _BlockArgs_xj71gr { - ffi.Pointer get arg0 { - final _$$ref = object$.ref; - return _objc_msgSend_6ex6p5(_$$ref.pointer, _sel_arg0); - } - - NSURLHandle get arg1 { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_arg1); - return NSURLHandle.fromPointer($ret, retain: true, release: true); - } -} - @ffi.Native>( symbol: 'OBJC_CLASS_\$_DOBJCDartInputStreamAdapter', ) @@ -47765,16 +36750,6 @@ final _class_Protocol = objc.getClass( _class_Protocol_raw, ).cast(), ); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$__1wx624s_BlockArgs_fjrv01', -) -external ffi.Pointer _class__BlockArgs_136y7ma_raw; -final _class__BlockArgs_136y7ma = objc.getClass( - "_1wx624s_BlockArgs_fjrv01", - () => ffi.Native.addressOf>( - _class__BlockArgs_136y7ma_raw, - ).cast(), -); @ffi.Native>( symbol: 'OBJC_CLASS_\$__1wx624s_BlockArgs_vhbh5h', ) @@ -47985,26 +36960,6 @@ final _class__BlockArgs_ounrb4 = objc.getClass( _class__BlockArgs_ounrb4_raw, ).cast(), ); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$__1wx624s_BlockArgs_1a22wz', -) -external ffi.Pointer _class__BlockArgs_q6fcam_raw; -final _class__BlockArgs_q6fcam = objc.getClass( - "_1wx624s_BlockArgs_1a22wz", - () => ffi.Native.addressOf>( - _class__BlockArgs_q6fcam_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$__1wx624s_BlockArgs_fjrv01', -) -external ffi.Pointer _class__BlockArgs_teaic5_raw; -final _class__BlockArgs_teaic5 = objc.getClass( - "_1wx624s_BlockArgs_fjrv01", - () => ffi.Native.addressOf>( - _class__BlockArgs_teaic5_raw, - ).cast(), -); @ffi.Native>( symbol: 'OBJC_CLASS_\$__1wx624s_BlockArgs_zkjmn1', ) @@ -48015,16 +36970,6 @@ final _class__BlockArgs_uckb5m = objc.getClass( _class__BlockArgs_uckb5m_raw, ).cast(), ); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$__1wx624s_BlockArgs_1a22wz', -) -external ffi.Pointer _class__BlockArgs_v8in3_raw; -final _class__BlockArgs_v8in3 = objc.getClass( - "_1wx624s_BlockArgs_1a22wz", - () => ffi.Native.addressOf>( - _class__BlockArgs_v8in3_raw, - ).cast(), -); @ffi.Native>( symbol: 'OBJC_CLASS_\$__1wx624s_BlockArgs_t8l8el', ) @@ -48045,16 +36990,6 @@ final _class__BlockArgs_x5cg0 = objc.getClass( _class__BlockArgs_x5cg0_raw, ).cast(), ); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$__1wx624s_BlockArgs_18v1jvf', -) -external ffi.Pointer _class__BlockArgs_xj71gr_raw; -final _class__BlockArgs_xj71gr = objc.getClass( - "_1wx624s_BlockArgs_18v1jvf", - () => ffi.Native.addressOf>( - _class__BlockArgs_xj71gr_raw, - ).cast(), -); final _objc_msgSend_102xxo4 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -48112,52 +37047,6 @@ final _objc_msgSend_10mlopr = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_10nfbmq = 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, - ) - >(); -final _objc_msgSend_10txwc9 = 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, - ) - >(); final _objc_msgSend_11cbyu0 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -48196,31 +37085,6 @@ final _objc_msgSend_11e9f5x = objc.msgSendPointer int, ) >(); -final _objc_msgSend_11hj8md = 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, - ) - >(); final _objc_msgSend_11spmsz = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -48242,25 +37106,6 @@ final _objc_msgSend_11spmsz = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_11tcc61 = 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, - ) - >(); final _objc_msgSend_122v0cv = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -48299,25 +37144,6 @@ final _objc_msgSend_12py2ux = objc.msgSendPointer int, ) >(); -final _objc_msgSend_130mcug = 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, - ) - >(); final _objc_msgSend_134vhyh = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -48339,23 +37165,6 @@ final _objc_msgSend_134vhyh = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_13lgpwz = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - CGSize, - ) - > - >() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - CGSize, - ) - >(); final _objc_msgSend_13lsk7w = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -48424,27 +37233,6 @@ final _objc_msgSend_13yqbb6 = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_1415lvo = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - ffi.Pointer, - ) - > - >() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ) - >(); final _objc_msgSend_14ew8zr = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -48601,42 +37389,6 @@ final _objc_msgSend_15qeuct = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_15v716q = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Pointer>, - ) - > - >() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>, - ) - >(); -final _objc_msgSend_15yz4e6 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - CGRect, - ) - > - >() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - CGRect, - ) - >(); final _objc_msgSend_161ne8y = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -48677,23 +37429,6 @@ final _objc_msgSend_1698hqz = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_16bn854 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ) - > - >() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ) - >(); final _objc_msgSend_16f0drb = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -48901,27 +37636,6 @@ final _objc_msgSend_18chyc = objc.msgSendPointer double, ) >(); -final _objc_msgSend_18flwjr = 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, - ) - >(); final _objc_msgSend_18qun1e = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -48943,42 +37657,6 @@ final _objc_msgSend_18qun1e = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_18r320v = 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_18r320vStret = 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, - ) - >(); final _objc_msgSend_194u5n2 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -49139,48 +37817,6 @@ final _objc_msgSend_1bvics1 = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_1c2zpn3 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - CGSize, - ) - > - >() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - CGSize, - ) - >(); -final _objc_msgSend_1cc1buo = 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, - ) - >(); final _objc_msgSend_1ceswyu = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -49301,23 +37937,6 @@ final _objc_msgSend_1d9e4oe = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_1dau4w = 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_1deg8x = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -49335,27 +37954,6 @@ final _objc_msgSend_1deg8x = objc.msgSendPointer int, ) >(); -final _objc_msgSend_1diehjo = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - NSUInteger, - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ) - >(); final _objc_msgSend_1dom33q = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -49470,29 +38068,6 @@ final _objc_msgSend_1eldwyi = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_1fdou4m = 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, - ) - >(); final _objc_msgSend_1ffoev1 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -49640,25 +38215,6 @@ final _objc_msgSend_1h2q612 = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_1h3mito = 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 _objc_msgSend_1hz7y9r = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -49693,27 +38249,6 @@ final _objc_msgSend_1i0cxyc = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_1i17va2 = 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>, - ) - >(); final _objc_msgSend_1i2r70j = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -49829,27 +38364,6 @@ final _objc_msgSend_1j9bhml = objc.msgSendPointer ffi.Pointer>, ) >(); -final _objc_msgSend_1jed5jl = 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, - ) - >(); final _objc_msgSend_1jiinfj = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -49875,29 +38389,6 @@ final _objc_msgSend_1jiinfj = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_1jknn71 = 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>, - ) - >(); final _objc_msgSend_1jtxufi = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -49968,29 +38459,6 @@ final _objc_msgSend_1k101e3 = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_1k1akuq = 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, - ) - >(); final _objc_msgSend_1k1o1s7 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -50046,23 +38514,6 @@ final _objc_msgSend_1k745tv = objc.msgSendPointer int, ) >(); -final _objc_msgSend_1kn7frf = objc.msgSendPointer - .cast< - ffi.NativeFunction< - NSUInteger Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); final _objc_msgSend_1ko4qka = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -50078,71 +38529,6 @@ final _objc_msgSend_1ko4qka = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_1kok4b = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - NSRange, - NSUInteger, - ffi.Pointer, - ) - > - >() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - NSRange, - int, - ffi.Pointer, - ) - >(); -final _objc_msgSend_1kva9v1 = 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, - ) - >(); -final _objc_msgSend_1l09uru = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSRange, - ffi.Pointer, - NSUInteger, - ffi.Pointer, - ffi.Pointer>, - ) - > - >() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSRange, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer>, - ) - >(); final _objc_msgSend_1lbgrac = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -50185,23 +38571,6 @@ final _objc_msgSend_1lhpu4m = objc.msgSendPointer ffi.Pointer>, ) >(); -final _objc_msgSend_1lonves = 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_1lsax7n = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -50242,27 +38611,6 @@ final _objc_msgSend_1lv8yz3 = objc.msgSendPointer int, ) >(); -final _objc_msgSend_1lwwnes = 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, - ) - >(); final _objc_msgSend_1m7prh1 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -50282,59 +38630,6 @@ final _objc_msgSend_1m7prh1 = objc.msgSendPointer int, ) >(); -final _objc_msgSend_1mbt9g9 = 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_1mpyy6y = 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_1mpyy6yStret = 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, - ) - >(); final _objc_msgSend_1n40f6p = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -50438,78 +38733,6 @@ final _objc_msgSend_1nomli1 = objc.msgSendPointer ffi.Pointer>, ) >(); -final _objc_msgSend_1nwix4r = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Uint32 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); -final _objc_msgSend_1oj5o8z = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int64 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); -final _objc_msgSend_1ojrli4 = 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, - ) - >(); -final _objc_msgSend_1okkq16 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - CGRect, - ) - > - >() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - CGRect, - ) - >(); final _objc_msgSend_1oteutl = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -50658,69 +38881,6 @@ final _objc_msgSend_1pnyuds = objc.msgSendPointer ffi.Pointer>, ) >(); -final _objc_msgSend_1pp2gs8 = 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, - ) - >(); -final _objc_msgSend_1pvm3yv = 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_1q2ox4r = 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, - ) - >(); final _objc_msgSend_1q30cs4 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -50793,23 +38953,6 @@ final _objc_msgSend_1r6ymhb = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_1r7ue5f = 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_1s0rfm3 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -51062,61 +39205,6 @@ final _objc_msgSend_1ukqyt8Fpret = objc.msgSendFpretPointer ffi.Pointer, ) >(); -final _objc_msgSend_1upeo1d = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSRange, - ) - > - >() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - NSRange, - ) - >(); -final _objc_msgSend_1uwdhlk = objc.msgSendPointer - .cast< - ffi.NativeFunction< - CGPoint Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - CGPoint Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); -final _objc_msgSend_1uwdhlkStret = objc.msgSendStretPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); final _objc_msgSend_1vd1c5m = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -51134,63 +39222,6 @@ final _objc_msgSend_1vd1c5m = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_1vdfken = objc.msgSendPointer - .cast< - ffi.NativeFunction< - CGSize Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - CGSize Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); -final _objc_msgSend_1vdfkenStret = objc.msgSendStretPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); -final _objc_msgSend_1vfgg7v = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - ffi.Pointer, - ) - > - >() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ) - >(); final _objc_msgSend_1vnlaqg = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -51233,23 +39264,6 @@ final _objc_msgSend_1vxoo9h = objc.msgSendPointer ffi.Pointer>, ) >(); -final _objc_msgSend_1w05pgk = 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_1wdb8ji = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -51269,29 +39283,6 @@ final _objc_msgSend_1wdb8ji = objc.msgSendPointer int, ) >(); -final _objc_msgSend_1whyima = 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, - ) - >(); final _objc_msgSend_1wt9a7r = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -51315,25 +39306,6 @@ final _objc_msgSend_1wt9a7r = objc.msgSendPointer ffi.Pointer>, ) >(); -final _objc_msgSend_1wtpmu7 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - ) - > - >() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ) - >(); final _objc_msgSend_1x2hskc = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -51425,27 +39397,6 @@ final _objc_msgSend_1ya1kjn = objc.msgSendPointer int, ) >(); -final _objc_msgSend_1ygbbzi = 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, - ) - >(); final _objc_msgSend_1ym6zyw = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -51493,23 +39444,6 @@ final _objc_msgSend_2cgrxlFpret = objc.msgSendFpretPointer ffi.Pointer, ) >(); -final _objc_msgSend_2p9qiq = 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_2u4jm6 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -51598,29 +39532,6 @@ final _objc_msgSend_3fn4ca = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_3gpdva = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - NSRange, - ffi.Pointer, - ) - > - >() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - NSRange, - ffi.Pointer, - ) - >(); final _objc_msgSend_3l8zum = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -51674,23 +39585,6 @@ final _objc_msgSend_3pyzne = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_4sp4xj = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ) - > - >() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ) - >(); final _objc_msgSend_553v = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -51782,25 +39676,6 @@ final _objc_msgSend_6jmuyz = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_6p7ndb = 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, - ) - >(); final _objc_msgSend_6peh6o = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -51856,27 +39731,6 @@ final _objc_msgSend_7g3u2y = objc.msgSendPointer int, ) >(); -final _objc_msgSend_7km9vu = 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, - ) - >(); final _objc_msgSend_7kpg7m = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -51896,27 +39750,6 @@ final _objc_msgSend_7kpg7m = objc.msgSendPointer int, ) >(); -final _objc_msgSend_7ql5kn = 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, - ) - >(); final _objc_msgSend_7uautw = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -51934,27 +39767,6 @@ final _objc_msgSend_7uautw = objc.msgSendPointer int, ) >(); -final _objc_msgSend_7w1jp7 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - ffi.Pointer, - ) - > - >() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ) - >(); final _objc_msgSend_8321cp = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -52035,29 +39847,6 @@ final _objc_msgSend_8cymbm = objc.msgSendPointer int, ) >(); -final _objc_msgSend_8mvqcu = 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, - ) - >(); final _objc_msgSend_91o635 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -52172,29 +39961,6 @@ final _objc_msgSend_agmudd = objc.msgSendPointer ffi.Pointer>, ) >(); -final _objc_msgSend_akk2cd = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - ffi.Pointer, - ) - > - >() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ) - >(); final _objc_msgSend_arew0j = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -52235,25 +40001,6 @@ final _objc_msgSend_bfp043 = objc.msgSendPointer int, ) >(); -final _objc_msgSend_bkebbk = 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, - ) - >(); final _objc_msgSend_bstjp9 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -52273,38 +40020,6 @@ final _objc_msgSend_bstjp9 = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_bu1hbw = objc.msgSendPointer - .cast< - ffi.NativeFunction< - CGRect Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - CGRect Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); -final _objc_msgSend_bu1hbwStret = objc.msgSendStretPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); final _objc_msgSend_c0vg4w = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -52404,25 +40119,6 @@ final _objc_msgSend_d3i1uyStret = objc.msgSendStretPointer int, ) >(); -final _objc_msgSend_d8c3m2 = 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, - ) - >(); final _objc_msgSend_dbvvll = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -52459,21 +40155,6 @@ final _objc_msgSend_degb40 = objc.msgSendPointer int, ) >(); -final _objc_msgSend_dgx62p = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); final _objc_msgSend_diypgk = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -52643,93 +40324,6 @@ final _objc_msgSend_f167m6 = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_f227js = 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, - ) - >(); -final _objc_msgSend_fd28sq = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); -final _objc_msgSend_g3kdhc = 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_g4ia9x = 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_g4ia9xFpret = objc.msgSendFpretPointer - .cast< - ffi.NativeFunction< - ffi.Float Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - double Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); final _objc_msgSend_gcjqkl = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -52888,25 +40482,6 @@ final _objc_msgSend_hc8exi = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_hefmm1 = 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>, - ) - >(); final _objc_msgSend_hiwitm = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -52926,25 +40501,6 @@ final _objc_msgSend_hiwitm = objc.msgSendPointer bool, ) >(); -final _objc_msgSend_hk7n97 = 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, - ) - >(); final _objc_msgSend_hwm8nu = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -52962,23 +40518,6 @@ final _objc_msgSend_hwm8nu = objc.msgSendPointer double, ) >(); -final _objc_msgSend_hws22w = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); final _objc_msgSend_i30zh3 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -53008,46 +40547,6 @@ final _objc_msgSend_i30zh3 = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_ipgwfh = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSRange, - NSUInteger, - ffi.Pointer, - ) - > - >() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSRange, - int, - ffi.Pointer, - ) - >(); -final _objc_msgSend_iy8iz6 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - CGPoint, - ) - > - >() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - CGPoint, - ) - >(); final _objc_msgSend_jjgvjt = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -53084,21 +40583,6 @@ final _objc_msgSend_jsclrq = objc.msgSendPointer int, ) >(); -final _objc_msgSend_jtzjjr = objc.msgSendPointer - .cast< - ffi.NativeFunction< - NSUInteger Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); final _objc_msgSend_k1x6mt = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -53206,42 +40690,6 @@ final _objc_msgSend_lh0jh5 = objc.msgSendPointer bool, ) >(); -final _objc_msgSend_lof6g0 = 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, - ) - >(); -final _objc_msgSend_lx7wnn = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Uint32, - ) - > - >() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ) - >(); final _objc_msgSend_lzbvjm = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -53297,25 +40745,6 @@ final _objc_msgSend_mabicuFpret = objc.msgSendFpretPointer ffi.Pointer, ) >(); -final _objc_msgSend_mpxix1 = 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, - ) - >(); final _objc_msgSend_mt0t38 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -53392,25 +40821,6 @@ final _objc_msgSend_nc6uds = objc.msgSendPointer int, ) >(); -final _objc_msgSend_nk32k5 = 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, - ) - >(); final _objc_msgSend_nnxkei = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -53669,42 +41079,6 @@ final _objc_msgSend_qm9f5w = objc.msgSendPointer NSRange, ) >(); -final _objc_msgSend_qrtfce = 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_qrtfceStret = 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, - ) - >(); final _objc_msgSend_qugqlf = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -53722,25 +41096,6 @@ final _objc_msgSend_qugqlf = objc.msgSendPointer int, ) >(); -final _objc_msgSend_quo6mj = 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, - ) - >(); final _objc_msgSend_r0bo0s = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -53781,27 +41136,6 @@ final _objc_msgSend_r49ehc = objc.msgSendPointer bool, ) >(); -final _objc_msgSend_r8gdi7 = 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, - ) - >(); final _objc_msgSend_rc4ypv = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -53823,27 +41157,6 @@ final _objc_msgSend_rc4ypv = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_rutu22 = 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, - ) - >(); final _objc_msgSend_s058d2 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -53886,74 +41199,6 @@ final _objc_msgSend_s92gih = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_sax6zm = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSEdgeInsets, - ) - > - >() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSEdgeInsets, - ) - >(); -final _objc_msgSend_sl0cgw = objc.msgSendPointer - .cast< - ffi.NativeFunction< - NSEdgeInsets Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - NSEdgeInsets Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); -final _objc_msgSend_sl0cgwStret = objc.msgSendStretPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ) - >(); -final _objc_msgSend_swohtd = 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 _objc_msgSend_sz90oi = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -53992,29 +41237,6 @@ final _objc_msgSend_t7arir = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_t8ajot = 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, - ) - >(); final _objc_msgSend_talwei = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -54036,27 +41258,6 @@ final _objc_msgSend_talwei = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_tsocn4 = 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, - ) - >(); final _objc_msgSend_ud8gg = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -54157,25 +41358,6 @@ final _objc_msgSend_uwvaik = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_vbc8p4 = 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, - ) - >(); final _objc_msgSend_vbymrb = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -54197,31 +41379,6 @@ final _objc_msgSend_vbymrb = objc.msgSendPointer int, ) >(); -final _objc_msgSend_vij4rw = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - NSRange, - ffi.Pointer, - NSUInteger, - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - NSRange, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ) - >(); final _objc_msgSend_w9bq5x = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -54243,23 +41400,6 @@ final _objc_msgSend_w9bq5x = objc.msgSendPointer bool, ) >(); -final _objc_msgSend_wgkxx2 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - CGPoint, - ) - > - >() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - CGPoint, - ) - >(); final _objc_msgSend_xe84da = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -54362,23 +41502,6 @@ final _objc_msgSend_xw2lbc = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_ylninc = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSUInteger, - ) - > - >() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ) - >(); final _objc_msgSend_yx8yc6 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -54398,25 +41521,6 @@ final _objc_msgSend_yx8yc6 = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_z7gxsm = 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, - ) - >(); final _objc_msgSend_zmbtbd = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -54474,29 +41578,6 @@ final _objc_msgSend_zug4wi = objc.msgSendPointer NSRange, ) >(); -final _objc_msgSend_zy00wz = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - NSRange, - ffi.Pointer, - ) - > - >() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - NSRange, - ffi.Pointer, - ) - >(); @ffi.Native Function()>( symbol: '_1wx624s_NSCoding', ) @@ -54573,37 +41654,11 @@ final _protocol_NSStreamDelegate = objc.getProtocol( "NSStreamDelegate", _protocol_NSStreamDelegate_raw, ); -@ffi.Native Function()>( - symbol: '_1wx624s_NSURLHandleClient', -) -external ffi.Pointer _protocol_NSURLHandleClient_raw(); -final _protocol_NSURLHandleClient = objc.getProtocol( - "NSURLHandleClient", - _protocol_NSURLHandleClient_raw, -); @ffi.Native Function()>( symbol: '_1wx624s_Observer', ) external ffi.Pointer _protocol_Observer_raw(); final _protocol_Observer = objc.getProtocol("Observer", _protocol_Observer_raw); -late final _sel_ISOCountryCodes = objc.registerName("ISOCountryCodes"); -late final _sel_ISOCurrencyCodes = objc.registerName("ISOCurrencyCodes"); -late final _sel_ISOLanguageCodes = objc.registerName("ISOLanguageCodes"); -late final _sel_URLByAppendingPathComponent_ = objc.registerName( - "URLByAppendingPathComponent:", -); -late final _sel_URLByAppendingPathComponent_isDirectory_ = objc.registerName( - "URLByAppendingPathComponent:isDirectory:", -); -late final _sel_URLByAppendingPathExtension_ = objc.registerName( - "URLByAppendingPathExtension:", -); -late final _sel_URLByDeletingLastPathComponent = objc.registerName( - "URLByDeletingLastPathComponent", -); -late final _sel_URLByDeletingPathExtension = objc.registerName( - "URLByDeletingPathExtension", -); late final _sel_URLByResolvingAliasFileAtURL_options_error_ = objc.registerName( "URLByResolvingAliasFileAtURL:options:error:", ); @@ -54611,12 +41666,6 @@ late final _sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsS objc.registerName( "URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:", ); -late final _sel_URLByResolvingSymlinksInPath = objc.registerName( - "URLByResolvingSymlinksInPath", -); -late final _sel_URLByStandardizingPath = objc.registerName( - "URLByStandardizingPath", -); late final _sel_URLForAuxiliaryExecutable_ = objc.registerName( "URLForAuxiliaryExecutable:", ); @@ -54632,51 +41681,6 @@ late final _sel_URLForResource_withExtension_subdirectory_inBundleWithURL_ = ); late final _sel_URLForResource_withExtension_subdirectory_localization_ = objc .registerName("URLForResource:withExtension:subdirectory:localization:"); -late final _sel_URLFragmentAllowedCharacterSet = objc.registerName( - "URLFragmentAllowedCharacterSet", -); -late final _sel_URLHandleClassForURL_ = objc.registerName( - "URLHandleClassForURL:", -); -late final _sel_URLHandleResourceDidBeginLoading_ = objc.registerName( - "URLHandleResourceDidBeginLoading:", -); -late final _sel_URLHandleResourceDidCancelLoading_ = objc.registerName( - "URLHandleResourceDidCancelLoading:", -); -late final _sel_URLHandleResourceDidFinishLoading_ = objc.registerName( - "URLHandleResourceDidFinishLoading:", -); -late final _sel_URLHandleUsingCache_ = objc.registerName( - "URLHandleUsingCache:", -); -late final _sel_URLHandle_resourceDataDidBecomeAvailable_ = objc.registerName( - "URLHandle:resourceDataDidBecomeAvailable:", -); -late final _sel_URLHandle_resourceDidFailLoadingWithReason_ = objc.registerName( - "URLHandle:resourceDidFailLoadingWithReason:", -); -late final _sel_URLHostAllowedCharacterSet = objc.registerName( - "URLHostAllowedCharacterSet", -); -late final _sel_URLPasswordAllowedCharacterSet = objc.registerName( - "URLPasswordAllowedCharacterSet", -); -late final _sel_URLPathAllowedCharacterSet = objc.registerName( - "URLPathAllowedCharacterSet", -); -late final _sel_URLQueryAllowedCharacterSet = objc.registerName( - "URLQueryAllowedCharacterSet", -); -late final _sel_URLResourceDidCancelLoading_ = objc.registerName( - "URLResourceDidCancelLoading:", -); -late final _sel_URLResourceDidFinishLoading_ = objc.registerName( - "URLResourceDidFinishLoading:", -); -late final _sel_URLUserAllowedCharacterSet = objc.registerName( - "URLUserAllowedCharacterSet", -); late final _sel_URLWithDataRepresentation_relativeToURL_ = objc.registerName( "URLWithDataRepresentation:relativeToURL:", ); @@ -54687,12 +41691,6 @@ late final _sel_URLWithString_encodingInvalidCharacters_ = objc.registerName( late final _sel_URLWithString_relativeToURL_ = objc.registerName( "URLWithString:relativeToURL:", ); -late final _sel_URL_resourceDataDidBecomeAvailable_ = objc.registerName( - "URL:resourceDataDidBecomeAvailable:", -); -late final _sel_URL_resourceDidFailLoadingWithReason_ = objc.registerName( - "URL:resourceDidFailLoadingWithReason:", -); late final _sel_URLsForResourcesWithExtension_subdirectory_ = objc.registerName( "URLsForResourcesWithExtension:subdirectory:", ); @@ -54710,17 +41708,10 @@ late final _sel_absoluteURLWithDataRepresentation_relativeToURL_ = objc late final _sel_acceptInputForMode_beforeDate_ = objc.registerName( "acceptInputForMode:beforeDate:", ); -late final _sel_accessInstanceVariablesDirectly = objc.registerName( - "accessInstanceVariablesDirectly", -); late final _sel_adapter = objc.registerName("adapter"); late final _sel_addChild_withPendingUnitCount_ = objc.registerName( "addChild:withPendingUnitCount:", ); -late final _sel_addClient_ = objc.registerName("addClient:"); -late final _sel_addConnection_toRunLoop_forMode_ = objc.registerName( - "addConnection:toRunLoop:forMode:", -); late final _sel_addData_ = objc.registerName("addData:"); late final _sel_addEntriesFromDictionary_ = objc.registerName( "addEntriesFromDictionary:", @@ -54733,18 +41724,10 @@ late final _sel_addObjectsFromArray_ = objc.registerName( "addObjectsFromArray:", ); late final _sel_addObjects_count_ = objc.registerName("addObjects:count:"); -late final _sel_addObserver_forKeyPath_options_context_ = objc.registerName( - "addObserver:forKeyPath:options:context:", -); -late final _sel_addObserver_toObjectsAtIndexes_forKeyPath_options_context_ = - objc.registerName( - "addObserver:toObjectsAtIndexes:forKeyPath:options:context:", - ); late final _sel_addPort_forMode_ = objc.registerName("addPort:forMode:"); late final _sel_addProtocol_ = objc.registerName("addProtocol:"); late final _sel_addSubscriberForFileURL_withPublishingHandler_ = objc .registerName("addSubscriberForFileURL:withPublishingHandler:"); -late final _sel_addTimeInterval_ = objc.registerName("addTimeInterval:"); late final _sel_addTimer_forMode_ = objc.registerName("addTimer:forMode:"); late final _sel_allBundles = objc.registerName("allBundles"); late final _sel_allFrameworks = objc.registerName("allFrameworks"); @@ -54754,33 +41737,19 @@ late final _sel_allObjects = objc.registerName("allObjects"); late final _sel_allValues = objc.registerName("allValues"); late final _sel_alloc = objc.registerName("alloc"); late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); -late final _sel_allowedClasses = objc.registerName("allowedClasses"); late final _sel_allowsExtendedAttributes = objc.registerName( "allowsExtendedAttributes", ); -late final _sel_allowsKeyedCoding = objc.registerName("allowsKeyedCoding"); late final _sel_alphanumericCharacterSet = objc.registerName( "alphanumericCharacterSet", ); -late final _sel_alternateQuotationBeginDelimiter = objc.registerName( - "alternateQuotationBeginDelimiter", -); -late final _sel_alternateQuotationEndDelimiter = objc.registerName( - "alternateQuotationEndDelimiter", -); late final _sel_anyObject = objc.registerName("anyObject"); late final _sel_appStoreReceiptURL = objc.registerName("appStoreReceiptURL"); late final _sel_appendBytes_length_ = objc.registerName("appendBytes:length:"); late final _sel_appendData_ = objc.registerName("appendData:"); -late final _sel_appendFormat_ = objc.registerName("appendFormat:"); -late final _sel_appendString_ = objc.registerName("appendString:"); late final _sel_appliesSourcePositionAttributes = objc.registerName( "appliesSourcePositionAttributes", ); -late final _sel_applyDifference_ = objc.registerName("applyDifference:"); -late final _sel_applyTransform_reverse_range_updatedRange_ = objc.registerName( - "applyTransform:reverse:range:updatedRange:", -); late final _sel_arg0 = objc.registerName("arg0"); late final _sel_arg1 = objc.registerName("arg1"); late final _sel_arg2 = objc.registerName("arg2"); @@ -54794,89 +41763,25 @@ late final _sel_arrayByAddingObject_ = objc.registerName( late final _sel_arrayByAddingObjectsFromArray_ = objc.registerName( "arrayByAddingObjectsFromArray:", ); -late final _sel_arrayByApplyingDifference_ = objc.registerName( - "arrayByApplyingDifference:", -); late final _sel_arrayWithArray_ = objc.registerName("arrayWithArray:"); late final _sel_arrayWithCapacity_ = objc.registerName("arrayWithCapacity:"); -late final _sel_arrayWithContentsOfFile_ = objc.registerName( - "arrayWithContentsOfFile:", -); -late final _sel_arrayWithContentsOfURL_ = objc.registerName( - "arrayWithContentsOfURL:", -); -late final _sel_arrayWithContentsOfURL_error_ = objc.registerName( - "arrayWithContentsOfURL:error:", -); late final _sel_arrayWithObject_ = objc.registerName("arrayWithObject:"); late final _sel_arrayWithObjects_ = objc.registerName("arrayWithObjects:"); late final _sel_arrayWithObjects_count_ = objc.registerName( "arrayWithObjects:count:", ); late final _sel_associatedIndex = objc.registerName("associatedIndex"); -late final _sel_attemptRecoveryFromError_optionIndex_ = objc.registerName( - "attemptRecoveryFromError:optionIndex:", -); -late final _sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_ = - objc.registerName( - "attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:", - ); -late final _sel_attributeKeys = objc.registerName("attributeKeys"); -late final _sel_attribute_atIndex_effectiveRange_ = objc.registerName( - "attribute:atIndex:effectiveRange:", -); -late final _sel_attribute_atIndex_longestEffectiveRange_inRange_ = objc - .registerName("attribute:atIndex:longestEffectiveRange:inRange:"); -late final _sel_attributedStringByInflectingString = objc.registerName( - "attributedStringByInflectingString", -); -late final _sel_attributedSubstringFromRange_ = objc.registerName( - "attributedSubstringFromRange:", -); late final _sel_attributesAtIndex_effectiveRange_ = objc.registerName( "attributesAtIndex:effectiveRange:", ); -late final _sel_attributesAtIndex_longestEffectiveRange_inRange_ = objc - .registerName("attributesAtIndex:longestEffectiveRange:inRange:"); -late final _sel_autoContentAccessingProxy = objc.registerName( - "autoContentAccessingProxy", -); -late final _sel_automaticallyNotifiesObserversForKey_ = objc.registerName( - "automaticallyNotifiesObserversForKey:", -); late final _sel_autorelease = objc.registerName("autorelease"); -late final _sel_autoupdatingCurrentLocale = objc.registerName( - "autoupdatingCurrentLocale", -); -late final _sel_availableLocaleIdentifiers = objc.registerName( - "availableLocaleIdentifiers", -); -late final _sel_availableResourceData = objc.registerName( - "availableResourceData", -); late final _sel_availableStringEncodings = objc.registerName( "availableStringEncodings", ); -late final _sel_awakeAfterUsingCoder_ = objc.registerName( - "awakeAfterUsingCoder:", -); -late final _sel_backgroundLoadDidFailWithReason_ = objc.registerName( - "backgroundLoadDidFailWithReason:", -); -late final _sel_base64EncodedDataWithOptions_ = objc.registerName( - "base64EncodedDataWithOptions:", -); -late final _sel_base64EncodedStringWithOptions_ = objc.registerName( - "base64EncodedStringWithOptions:", -); -late final _sel_base64Encoding = objc.registerName("base64Encoding"); late final _sel_baseURL = objc.registerName("baseURL"); late final _sel_becomeCurrentWithPendingUnitCount_ = objc.registerName( "becomeCurrentWithPendingUnitCount:", ); -late final _sel_beginLoadInBackground = objc.registerName( - "beginLoadInBackground", -); late final _sel_bitmapRepresentation = objc.registerName( "bitmapRepresentation", ); @@ -54901,13 +41806,9 @@ late final _sel_bundleWithIdentifier_ = objc.registerName( late final _sel_bundleWithPath_ = objc.registerName("bundleWithPath:"); late final _sel_bundleWithURL_ = objc.registerName("bundleWithURL:"); late final _sel_bytes = objc.registerName("bytes"); -late final _sel_cString = objc.registerName("cString"); -late final _sel_cStringLength = objc.registerName("cStringLength"); late final _sel_cStringUsingEncoding_ = objc.registerName( "cStringUsingEncoding:", ); -late final _sel_cachedHandleForURL_ = objc.registerName("cachedHandleForURL:"); -late final _sel_calendarIdentifier = objc.registerName("calendarIdentifier"); late final _sel_callStackReturnAddresses = objc.registerName( "callStackReturnAddresses", ); @@ -54915,32 +41816,11 @@ late final _sel_callStackSymbols = objc.registerName("callStackSymbols"); late final _sel_canBeConvertedToEncoding_ = objc.registerName( "canBeConvertedToEncoding:", ); -late final _sel_canInitWithURL_ = objc.registerName("canInitWithURL:"); late final _sel_canLoadObjectOfClass_ = objc.registerName( "canLoadObjectOfClass:", ); late final _sel_cancel = objc.registerName("cancel"); -late final _sel_cancelLoadInBackground = objc.registerName( - "cancelLoadInBackground", -); -late final _sel_cancelPerformSelector_target_argument_ = objc.registerName( - "cancelPerformSelector:target:argument:", -); -late final _sel_cancelPerformSelectorsWithTarget_ = objc.registerName( - "cancelPerformSelectorsWithTarget:", -); -late final _sel_cancelPreviousPerformRequestsWithTarget_ = objc.registerName( - "cancelPreviousPerformRequestsWithTarget:", -); -late final _sel_cancelPreviousPerformRequestsWithTarget_selector_object_ = objc - .registerName("cancelPreviousPerformRequestsWithTarget:selector:object:"); late final _sel_cancellationHandler = objc.registerName("cancellationHandler"); -late final _sel_canonicalLanguageIdentifierFromString_ = objc.registerName( - "canonicalLanguageIdentifierFromString:", -); -late final _sel_canonicalLocaleIdentifierFromString_ = objc.registerName( - "canonicalLocaleIdentifierFromString:", -); late final _sel_capitalizedLetterCharacterSet = objc.registerName( "capitalizedLetterCharacterSet", ); @@ -54959,9 +41839,6 @@ late final _sel_changeWithObject_type_index_associatedIndex_ = objc .registerName("changeWithObject:type:index:associatedIndex:"); late final _sel_charValue = objc.registerName("charValue"); late final _sel_characterAtIndex_ = objc.registerName("characterAtIndex:"); -late final _sel_characterDirectionForLanguage_ = objc.registerName( - "characterDirectionForLanguage:", -); late final _sel_characterIsMember_ = objc.registerName("characterIsMember:"); late final _sel_characterSetWithBitmapRepresentation_ = objc.registerName( "characterSetWithBitmapRepresentation:", @@ -54975,37 +41852,10 @@ late final _sel_characterSetWithContentsOfFile_ = objc.registerName( late final _sel_characterSetWithRange_ = objc.registerName( "characterSetWithRange:", ); -late final _sel_checkPromisedItemIsReachableAndReturnError_ = objc.registerName( - "checkPromisedItemIsReachableAndReturnError:", -); -late final _sel_checkResourceIsReachableAndReturnError_ = objc.registerName( - "checkResourceIsReachableAndReturnError:", -); late final _sel_class = objc.registerName("class"); -late final _sel_classCode = objc.registerName("classCode"); -late final _sel_classDescription = objc.registerName("classDescription"); -late final _sel_classFallbacksForKeyedArchiver = objc.registerName( - "classFallbacksForKeyedArchiver", -); -late final _sel_classForArchiver = objc.registerName("classForArchiver"); -late final _sel_classForCoder = objc.registerName("classForCoder"); -late final _sel_classForKeyedArchiver = objc.registerName( - "classForKeyedArchiver", -); -late final _sel_classForKeyedUnarchiver = objc.registerName( - "classForKeyedUnarchiver", -); -late final _sel_classForPortCoder = objc.registerName("classForPortCoder"); -late final _sel_className = objc.registerName("className"); late final _sel_classNamed_ = objc.registerName("classNamed:"); late final _sel_close = objc.registerName("close"); late final _sel_code = objc.registerName("code"); -late final _sel_coerceValue_forKey_ = objc.registerName("coerceValue:forKey:"); -late final _sel_collationIdentifier = objc.registerName("collationIdentifier"); -late final _sel_collatorIdentifier = objc.registerName("collatorIdentifier"); -late final _sel_commonISOCurrencyCodes = objc.registerName( - "commonISOCurrencyCodes", -); late final _sel_commonPrefixWithString_options_ = objc.registerName( "commonPrefixWithString:options:", ); @@ -55017,15 +41867,8 @@ late final _sel_compare_options_range_ = objc.registerName( late final _sel_compare_options_range_locale_ = objc.registerName( "compare:options:range:locale:", ); -late final _sel_completePathIntoString_caseSensitive_matchesIntoArray_filterTypes_ = - objc.registerName( - "completePathIntoString:caseSensitive:matchesIntoArray:filterTypes:", - ); late final _sel_completedUnitCount = objc.registerName("completedUnitCount"); late final _sel_components = objc.registerName("components"); -late final _sel_componentsFromLocaleIdentifier_ = objc.registerName( - "componentsFromLocaleIdentifier:", -); late final _sel_componentsJoinedByString_ = objc.registerName( "componentsJoinedByString:", ); @@ -55035,13 +41878,9 @@ late final _sel_componentsSeparatedByCharactersInSet_ = objc.registerName( late final _sel_componentsSeparatedByString_ = objc.registerName( "componentsSeparatedByString:", ); -late final _sel_compressUsingAlgorithm_error_ = objc.registerName( - "compressUsingAlgorithm:error:", -); late final _sel_compressedDataUsingAlgorithm_error_ = objc.registerName( "compressedDataUsingAlgorithm:error:", ); -late final _sel_configureAsServer = objc.registerName("configureAsServer"); late final _sel_conformsToProtocol_ = objc.registerName("conformsToProtocol:"); late final _sel_containsIndex_ = objc.registerName("containsIndex:"); late final _sel_containsIndexesInRange_ = objc.registerName( @@ -55050,14 +41889,8 @@ late final _sel_containsIndexesInRange_ = objc.registerName( late final _sel_containsIndexes_ = objc.registerName("containsIndexes:"); late final _sel_containsObject_ = objc.registerName("containsObject:"); late final _sel_containsString_ = objc.registerName("containsString:"); -late final _sel_containsValueForKey_ = objc.registerName( - "containsValueForKey:", -); late final _sel_controlCharacterSet = objc.registerName("controlCharacterSet"); late final _sel_copy = objc.registerName("copy"); -late final _sel_copyScriptingValue_forKey_withProperties_ = objc.registerName( - "copyScriptingValue:forKey:withProperties:", -); late final _sel_copyWithZone_ = objc.registerName("copyWithZone:"); late final _sel_count = objc.registerName("count"); late final _sel_countByEnumeratingWithState_objects_count_ = objc.registerName( @@ -55066,10 +41899,6 @@ late final _sel_countByEnumeratingWithState_objects_count_ = objc.registerName( late final _sel_countOfIndexesInRange_ = objc.registerName( "countOfIndexesInRange:", ); -late final _sel_countryCode = objc.registerName("countryCode"); -late final _sel_currencyCode = objc.registerName("currencyCode"); -late final _sel_currencySymbol = objc.registerName("currencySymbol"); -late final _sel_currentLocale = objc.registerName("currentLocale"); late final _sel_currentMode = objc.registerName("currentMode"); late final _sel_currentProgress = objc.registerName("currentProgress"); late final _sel_currentRunLoop = objc.registerName("currentRunLoop"); @@ -55096,9 +41925,6 @@ late final _sel_dataWithContentsOfFile_ = objc.registerName( late final _sel_dataWithContentsOfFile_options_error_ = objc.registerName( "dataWithContentsOfFile:options:error:", ); -late final _sel_dataWithContentsOfMappedFile_ = objc.registerName( - "dataWithContentsOfMappedFile:", -); late final _sel_dataWithContentsOfURL_ = objc.registerName( "dataWithContentsOfURL:", ); @@ -55111,16 +41937,6 @@ late final _sel_date = objc.registerName("date"); late final _sel_dateByAddingTimeInterval_ = objc.registerName( "dateByAddingTimeInterval:", ); -late final _sel_dateWithCalendarFormat_timeZone_ = objc.registerName( - "dateWithCalendarFormat:timeZone:", -); -late final _sel_dateWithNaturalLanguageString_ = objc.registerName( - "dateWithNaturalLanguageString:", -); -late final _sel_dateWithNaturalLanguageString_locale_ = objc.registerName( - "dateWithNaturalLanguageString:locale:", -); -late final _sel_dateWithString_ = objc.registerName("dateWithString:"); late final _sel_dateWithTimeIntervalSince1970_ = objc.registerName( "dateWithTimeIntervalSince1970:", ); @@ -55139,87 +41955,10 @@ late final _sel_debugObserver = objc.registerName("debugObserver"); late final _sel_decimalDigitCharacterSet = objc.registerName( "decimalDigitCharacterSet", ); -late final _sel_decimalSeparator = objc.registerName("decimalSeparator"); -late final _sel_decodeArrayOfObjCType_count_at_ = objc.registerName( - "decodeArrayOfObjCType:count:at:", -); -late final _sel_decodeArrayOfObjectsOfClass_forKey_ = objc.registerName( - "decodeArrayOfObjectsOfClass:forKey:", -); -late final _sel_decodeArrayOfObjectsOfClasses_forKey_ = objc.registerName( - "decodeArrayOfObjectsOfClasses:forKey:", -); -late final _sel_decodeBoolForKey_ = objc.registerName("decodeBoolForKey:"); -late final _sel_decodeBytesForKey_minimumLength_ = objc.registerName( - "decodeBytesForKey:minimumLength:", -); -late final _sel_decodeBytesForKey_returnedLength_ = objc.registerName( - "decodeBytesForKey:returnedLength:", -); -late final _sel_decodeBytesWithMinimumLength_ = objc.registerName( - "decodeBytesWithMinimumLength:", -); -late final _sel_decodeBytesWithReturnedLength_ = objc.registerName( - "decodeBytesWithReturnedLength:", -); late final _sel_decodeDataObject = objc.registerName("decodeDataObject"); -late final _sel_decodeDictionaryWithKeysOfClass_objectsOfClass_forKey_ = objc - .registerName("decodeDictionaryWithKeysOfClass:objectsOfClass:forKey:"); -late final _sel_decodeDictionaryWithKeysOfClasses_objectsOfClasses_forKey_ = - objc.registerName( - "decodeDictionaryWithKeysOfClasses:objectsOfClasses:forKey:", - ); -late final _sel_decodeDoubleForKey_ = objc.registerName("decodeDoubleForKey:"); -late final _sel_decodeFloatForKey_ = objc.registerName("decodeFloatForKey:"); -late final _sel_decodeInt32ForKey_ = objc.registerName("decodeInt32ForKey:"); -late final _sel_decodeInt64ForKey_ = objc.registerName("decodeInt64ForKey:"); -late final _sel_decodeIntForKey_ = objc.registerName("decodeIntForKey:"); -late final _sel_decodeIntegerForKey_ = objc.registerName( - "decodeIntegerForKey:", -); -late final _sel_decodeNXObject = objc.registerName("decodeNXObject"); -late final _sel_decodeObject = objc.registerName("decodeObject"); -late final _sel_decodeObjectForKey_ = objc.registerName("decodeObjectForKey:"); -late final _sel_decodeObjectOfClass_forKey_ = objc.registerName( - "decodeObjectOfClass:forKey:", -); -late final _sel_decodeObjectOfClasses_forKey_ = objc.registerName( - "decodeObjectOfClasses:forKey:", -); -late final _sel_decodePoint = objc.registerName("decodePoint"); -late final _sel_decodePointForKey_ = objc.registerName("decodePointForKey:"); -late final _sel_decodePropertyList = objc.registerName("decodePropertyList"); -late final _sel_decodePropertyListForKey_ = objc.registerName( - "decodePropertyListForKey:", -); -late final _sel_decodeRect = objc.registerName("decodeRect"); -late final _sel_decodeRectForKey_ = objc.registerName("decodeRectForKey:"); -late final _sel_decodeSize = objc.registerName("decodeSize"); -late final _sel_decodeSizeForKey_ = objc.registerName("decodeSizeForKey:"); -late final _sel_decodeTopLevelObjectAndReturnError_ = objc.registerName( - "decodeTopLevelObjectAndReturnError:", -); -late final _sel_decodeTopLevelObjectForKey_error_ = objc.registerName( - "decodeTopLevelObjectForKey:error:", -); -late final _sel_decodeTopLevelObjectOfClass_forKey_error_ = objc.registerName( - "decodeTopLevelObjectOfClass:forKey:error:", -); -late final _sel_decodeTopLevelObjectOfClasses_forKey_error_ = objc.registerName( - "decodeTopLevelObjectOfClasses:forKey:error:", -); -late final _sel_decodeValueOfObjCType_at_ = objc.registerName( - "decodeValueOfObjCType:at:", -); late final _sel_decodeValueOfObjCType_at_size_ = objc.registerName( "decodeValueOfObjCType:at:size:", ); -late final _sel_decodeValuesOfObjCTypes_ = objc.registerName( - "decodeValuesOfObjCTypes:", -); -late final _sel_decodingFailurePolicy = objc.registerName( - "decodingFailurePolicy", -); late final _sel_decomposableCharacterSet = objc.registerName( "decomposableCharacterSet", ); @@ -55229,9 +41968,6 @@ late final _sel_decomposedStringWithCanonicalMapping = objc.registerName( late final _sel_decomposedStringWithCompatibilityMapping = objc.registerName( "decomposedStringWithCompatibilityMapping", ); -late final _sel_decompressUsingAlgorithm_error_ = objc.registerName( - "decompressUsingAlgorithm:error:", -); late final _sel_decompressedDataUsingAlgorithm_error_ = objc.registerName( "decompressedDataUsingAlgorithm:error:", ); @@ -55239,15 +41975,10 @@ late final _sel_defaultCStringEncoding = objc.registerName( "defaultCStringEncoding", ); late final _sel_delegate = objc.registerName("delegate"); -late final _sel_deleteCharactersInRange_ = objc.registerName( - "deleteCharactersInRange:", -); late final _sel_description = objc.registerName("description"); late final _sel_descriptionInStringsFileFormat = objc.registerName( "descriptionInStringsFileFormat", ); -late final _sel_descriptionWithCalendarFormat_timeZone_locale_ = objc - .registerName("descriptionWithCalendarFormat:timeZone:locale:"); late final _sel_descriptionWithLocale_ = objc.registerName( "descriptionWithLocale:", ); @@ -55266,15 +41997,6 @@ late final _sel_dictionary = objc.registerName("dictionary"); late final _sel_dictionaryWithCapacity_ = objc.registerName( "dictionaryWithCapacity:", ); -late final _sel_dictionaryWithContentsOfFile_ = objc.registerName( - "dictionaryWithContentsOfFile:", -); -late final _sel_dictionaryWithContentsOfURL_ = objc.registerName( - "dictionaryWithContentsOfURL:", -); -late final _sel_dictionaryWithContentsOfURL_error_ = objc.registerName( - "dictionaryWithContentsOfURL:error:", -); late final _sel_dictionaryWithDictionary_ = objc.registerName( "dictionaryWithDictionary:", ); @@ -55290,112 +42012,26 @@ late final _sel_dictionaryWithObjects_forKeys_ = objc.registerName( late final _sel_dictionaryWithObjects_forKeys_count_ = objc.registerName( "dictionaryWithObjects:forKeys:count:", ); -late final _sel_dictionaryWithSharedKeySet_ = objc.registerName( - "dictionaryWithSharedKeySet:", -); -late final _sel_dictionaryWithValuesForKeys_ = objc.registerName( - "dictionaryWithValuesForKeys:", -); -late final _sel_didChangeValueForKey_ = objc.registerName( - "didChangeValueForKey:", -); -late final _sel_didChangeValueForKey_withSetMutation_usingObjects_ = objc - .registerName("didChangeValueForKey:withSetMutation:usingObjects:"); -late final _sel_didChange_valuesAtIndexes_forKey_ = objc.registerName( - "didChange:valuesAtIndexes:forKey:", -); -late final _sel_didLoadBytes_loadComplete_ = objc.registerName( - "didLoadBytes:loadComplete:", -); late final _sel_differenceByTransformingChangesWithBlock_ = objc.registerName( "differenceByTransformingChangesWithBlock:", ); -late final _sel_differenceFromArray_ = objc.registerName( - "differenceFromArray:", -); -late final _sel_differenceFromArray_withOptions_ = objc.registerName( - "differenceFromArray:withOptions:", -); -late final _sel_differenceFromArray_withOptions_usingEquivalenceTest_ = objc - .registerName("differenceFromArray:withOptions:usingEquivalenceTest:"); -late final _sel_differenceFromOrderedSet_ = objc.registerName( - "differenceFromOrderedSet:", -); -late final _sel_differenceFromOrderedSet_withOptions_ = objc.registerName( - "differenceFromOrderedSet:withOptions:", -); -late final _sel_differenceFromOrderedSet_withOptions_usingEquivalenceTest_ = - objc.registerName( - "differenceFromOrderedSet:withOptions:usingEquivalenceTest:", - ); late final _sel_discreteProgressWithTotalUnitCount_ = objc.registerName( "discreteProgressWithTotalUnitCount:", ); late final _sel_displayNameForKey_value_ = objc.registerName( "displayNameForKey:value:", ); -late final _sel_distantFuture = objc.registerName("distantFuture"); -late final _sel_distantPast = objc.registerName("distantPast"); -late final _sel_doesContain_ = objc.registerName("doesContain:"); late final _sel_doesNotRecognizeSelector_ = objc.registerName( "doesNotRecognizeSelector:", ); late final _sel_domain = objc.registerName("domain"); late final _sel_doubleValue = objc.registerName("doubleValue"); late final _sel_earlierDate_ = objc.registerName("earlierDate:"); -late final _sel_edgeInsetsValue = objc.registerName("edgeInsetsValue"); -late final _sel_encodeArrayOfObjCType_count_at_ = objc.registerName( - "encodeArrayOfObjCType:count:at:", -); -late final _sel_encodeBool_forKey_ = objc.registerName("encodeBool:forKey:"); -late final _sel_encodeBycopyObject_ = objc.registerName("encodeBycopyObject:"); -late final _sel_encodeByrefObject_ = objc.registerName("encodeByrefObject:"); -late final _sel_encodeBytes_length_ = objc.registerName("encodeBytes:length:"); -late final _sel_encodeBytes_length_forKey_ = objc.registerName( - "encodeBytes:length:forKey:", -); -late final _sel_encodeConditionalObject_ = objc.registerName( - "encodeConditionalObject:", -); -late final _sel_encodeConditionalObject_forKey_ = objc.registerName( - "encodeConditionalObject:forKey:", -); late final _sel_encodeDataObject_ = objc.registerName("encodeDataObject:"); -late final _sel_encodeDouble_forKey_ = objc.registerName( - "encodeDouble:forKey:", -); -late final _sel_encodeFloat_forKey_ = objc.registerName("encodeFloat:forKey:"); -late final _sel_encodeInt32_forKey_ = objc.registerName("encodeInt32:forKey:"); -late final _sel_encodeInt64_forKey_ = objc.registerName("encodeInt64:forKey:"); -late final _sel_encodeInt_forKey_ = objc.registerName("encodeInt:forKey:"); -late final _sel_encodeInteger_forKey_ = objc.registerName( - "encodeInteger:forKey:", -); -late final _sel_encodeNXObject_ = objc.registerName("encodeNXObject:"); -late final _sel_encodeObject_ = objc.registerName("encodeObject:"); -late final _sel_encodeObject_forKey_ = objc.registerName( - "encodeObject:forKey:", -); -late final _sel_encodePoint_ = objc.registerName("encodePoint:"); -late final _sel_encodePoint_forKey_ = objc.registerName("encodePoint:forKey:"); -late final _sel_encodePropertyList_ = objc.registerName("encodePropertyList:"); -late final _sel_encodeRect_ = objc.registerName("encodeRect:"); -late final _sel_encodeRect_forKey_ = objc.registerName("encodeRect:forKey:"); -late final _sel_encodeRootObject_ = objc.registerName("encodeRootObject:"); -late final _sel_encodeSize_ = objc.registerName("encodeSize:"); -late final _sel_encodeSize_forKey_ = objc.registerName("encodeSize:forKey:"); late final _sel_encodeValueOfObjCType_at_ = objc.registerName( "encodeValueOfObjCType:at:", ); -late final _sel_encodeValuesOfObjCTypes_ = objc.registerName( - "encodeValuesOfObjCTypes:", -); late final _sel_encodeWithCoder_ = objc.registerName("encodeWithCoder:"); -late final _sel_endLoadInBackground = objc.registerName("endLoadInBackground"); -late final _sel_enumerateAttribute_inRange_options_usingBlock_ = objc - .registerName("enumerateAttribute:inRange:options:usingBlock:"); -late final _sel_enumerateAttributesInRange_options_usingBlock_ = objc - .registerName("enumerateAttributesInRange:options:usingBlock:"); late final _sel_enumerateByteRangesUsingBlock_ = objc.registerName( "enumerateByteRangesUsingBlock:", ); @@ -55416,10 +42052,6 @@ late final _sel_enumerateKeysAndObjectsWithOptions_usingBlock_ = objc late final _sel_enumerateLinesUsingBlock_ = objc.registerName( "enumerateLinesUsingBlock:", ); -late final _sel_enumerateLinguisticTagsInRange_scheme_options_orthography_usingBlock_ = - objc.registerName( - "enumerateLinguisticTagsInRange:scheme:options:orthography:usingBlock:", - ); late final _sel_enumerateObjectsAtIndexes_options_usingBlock_ = objc .registerName("enumerateObjectsAtIndexes:options:usingBlock:"); late final _sel_enumerateObjectsUsingBlock_ = objc.registerName( @@ -55439,7 +42071,6 @@ late final _sel_enumerateRangesWithOptions_usingBlock_ = objc.registerName( ); late final _sel_enumerateSubstringsInRange_options_usingBlock_ = objc .registerName("enumerateSubstringsInRange:options:usingBlock:"); -late final _sel_error = objc.registerName("error"); late final _sel_errorWithDomain_code_userInfo_ = objc.registerName( "errorWithDomain:code:userInfo:", ); @@ -55454,67 +42085,22 @@ late final _sel_executableArchitectures = objc.registerName( ); late final _sel_executablePath = objc.registerName("executablePath"); late final _sel_executableURL = objc.registerName("executableURL"); -late final _sel_exemplarCharacterSet = objc.registerName( - "exemplarCharacterSet", -); late final _sel_exit = objc.registerName("exit"); -late final _sel_expectedResourceDataSize = objc.registerName( - "expectedResourceDataSize", -); -late final _sel_failWithError_ = objc.registerName("failWithError:"); late final _sel_failurePolicy = objc.registerName("failurePolicy"); -late final _sel_failureReason = objc.registerName("failureReason"); late final _sel_fastestEncoding = objc.registerName("fastestEncoding"); late final _sel_fileCompletedCount = objc.registerName("fileCompletedCount"); -late final _sel_fileCreationDate = objc.registerName("fileCreationDate"); -late final _sel_fileExtensionHidden = objc.registerName("fileExtensionHidden"); -late final _sel_fileGroupOwnerAccountID = objc.registerName( - "fileGroupOwnerAccountID", -); -late final _sel_fileGroupOwnerAccountName = objc.registerName( - "fileGroupOwnerAccountName", -); -late final _sel_fileHFSCreatorCode = objc.registerName("fileHFSCreatorCode"); -late final _sel_fileHFSTypeCode = objc.registerName("fileHFSTypeCode"); -late final _sel_fileIsAppendOnly = objc.registerName("fileIsAppendOnly"); -late final _sel_fileIsImmutable = objc.registerName("fileIsImmutable"); -late final _sel_fileManager_shouldProceedAfterError_ = objc.registerName( - "fileManager:shouldProceedAfterError:", -); -late final _sel_fileManager_willProcessPath_ = objc.registerName( - "fileManager:willProcessPath:", -); -late final _sel_fileModificationDate = objc.registerName( - "fileModificationDate", -); late final _sel_fileOperationKind = objc.registerName("fileOperationKind"); -late final _sel_fileOwnerAccountID = objc.registerName("fileOwnerAccountID"); -late final _sel_fileOwnerAccountName = objc.registerName( - "fileOwnerAccountName", -); late final _sel_filePathURL = objc.registerName("filePathURL"); -late final _sel_filePosixPermissions = objc.registerName( - "filePosixPermissions", -); late final _sel_fileReferenceURL = objc.registerName("fileReferenceURL"); -late final _sel_fileSize = objc.registerName("fileSize"); -late final _sel_fileSystemFileNumber = objc.registerName( - "fileSystemFileNumber", -); -late final _sel_fileSystemNumber = objc.registerName("fileSystemNumber"); late final _sel_fileSystemRepresentation = objc.registerName( "fileSystemRepresentation", ); late final _sel_fileTotalCount = objc.registerName("fileTotalCount"); -late final _sel_fileType = objc.registerName("fileType"); late final _sel_fileURL = objc.registerName("fileURL"); late final _sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_ = objc.registerName( "fileURLWithFileSystemRepresentation:isDirectory:relativeToURL:", ); -late final _sel_fileURLWithPathComponents_ = objc.registerName( - "fileURLWithPathComponents:", -); late final _sel_fileURLWithPath_ = objc.registerName("fileURLWithPath:"); late final _sel_fileURLWithPath_isDirectory_ = objc.registerName( "fileURLWithPath:isDirectory:", @@ -55525,19 +42111,6 @@ late final _sel_fileURLWithPath_isDirectory_relativeToURL_ = objc.registerName( late final _sel_fileURLWithPath_relativeToURL_ = objc.registerName( "fileURLWithPath:relativeToURL:", ); -late final _sel_filterUsingPredicate_ = objc.registerName( - "filterUsingPredicate:", -); -late final _sel_filteredArrayUsingPredicate_ = objc.registerName( - "filteredArrayUsingPredicate:", -); -late final _sel_filteredOrderedSetUsingPredicate_ = objc.registerName( - "filteredOrderedSetUsingPredicate:", -); -late final _sel_filteredSetUsingPredicate_ = objc.registerName( - "filteredSetUsingPredicate:", -); -late final _sel_finalize = objc.registerName("finalize"); late final _sel_fire = objc.registerName("fire"); late final _sel_fireDate = objc.registerName("fireDate"); late final _sel_firstIndex = objc.registerName("firstIndex"); @@ -55546,7 +42119,6 @@ late final _sel_firstObjectCommonWithArray_ = objc.registerName( "firstObjectCommonWithArray:", ); late final _sel_floatValue = objc.registerName("floatValue"); -late final _sel_flushCachedData = objc.registerName("flushCachedData"); late final _sel_forwardInvocation_ = objc.registerName("forwardInvocation:"); late final _sel_forwardingTargetForSelector_ = objc.registerName( "forwardingTargetForSelector:", @@ -55560,10 +42132,7 @@ late final _sel_getArgumentTypeAtIndex_ = objc.registerName( late final _sel_getArgument_atIndex_ = objc.registerName( "getArgument:atIndex:", ); -late final _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_ = objc - .registerName("getBoundStreamsWithBufferSize:inputStream:outputStream:"); late final _sel_getBuffer_length_ = objc.registerName("getBuffer:length:"); -late final _sel_getBytes_ = objc.registerName("getBytes:"); late final _sel_getBytes_length_ = objc.registerName("getBytes:length:"); late final _sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_ = objc.registerName( @@ -55571,17 +42140,9 @@ late final _sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRa ); late final _sel_getBytes_range_ = objc.registerName("getBytes:range:"); late final _sel_getCFRunLoop = objc.registerName("getCFRunLoop"); -late final _sel_getCString_ = objc.registerName("getCString:"); -late final _sel_getCString_maxLength_ = objc.registerName( - "getCString:maxLength:", -); late final _sel_getCString_maxLength_encoding_ = objc.registerName( "getCString:maxLength:encoding:", ); -late final _sel_getCString_maxLength_range_remainingRange_ = objc.registerName( - "getCString:maxLength:range:remainingRange:", -); -late final _sel_getCharacters_ = objc.registerName("getCharacters:"); late final _sel_getCharacters_range_ = objc.registerName( "getCharacters:range:", ); @@ -55597,8 +42158,6 @@ late final _sel_getIndexes_maxCount_inIndexRange_ = objc.registerName( late final _sel_getLineStart_end_contentsEnd_forRange_ = objc.registerName( "getLineStart:end:contentsEnd:forRange:", ); -late final _sel_getObjects_ = objc.registerName("getObjects:"); -late final _sel_getObjects_andKeys_ = objc.registerName("getObjects:andKeys:"); late final _sel_getObjects_andKeys_count_ = objc.registerName( "getObjects:andKeys:count:", ); @@ -55606,27 +42165,12 @@ late final _sel_getObjects_range_ = objc.registerName("getObjects:range:"); late final _sel_getParagraphStart_end_contentsEnd_forRange_ = objc.registerName( "getParagraphStart:end:contentsEnd:forRange:", ); -late final _sel_getPromisedItemResourceValue_forKey_error_ = objc.registerName( - "getPromisedItemResourceValue:forKey:error:", -); late final _sel_getResourceValue_forKey_error_ = objc.registerName( "getResourceValue:forKey:error:", ); late final _sel_getReturnValue_ = objc.registerName("getReturnValue:"); -late final _sel_getStreamsToHostWithName_port_inputStream_outputStream_ = objc - .registerName("getStreamsToHostWithName:port:inputStream:outputStream:"); -late final _sel_getStreamsToHost_port_inputStream_outputStream_ = objc - .registerName("getStreamsToHost:port:inputStream:outputStream:"); -late final _sel_getValue_ = objc.registerName("getValue:"); late final _sel_getValue_size_ = objc.registerName("getValue:size:"); -late final _sel_groupingSeparator = objc.registerName("groupingSeparator"); late final _sel_handlePortMessage_ = objc.registerName("handlePortMessage:"); -late final _sel_handleQueryWithUnboundKey_ = objc.registerName( - "handleQueryWithUnboundKey:", -); -late final _sel_handleTakeValue_forUnboundKey_ = objc.registerName( - "handleTakeValue:forUnboundKey:", -); late final _sel_hasBytesAvailable = objc.registerName("hasBytesAvailable"); late final _sel_hasChanges = objc.registerName("hasChanges"); late final _sel_hasDirectoryPath = objc.registerName("hasDirectoryPath"); @@ -55708,8 +42252,6 @@ late final _sel_indexesPassingTest_ = objc.registerName("indexesPassingTest:"); late final _sel_indexesWithOptions_passingTest_ = objc.registerName( "indexesWithOptions:passingTest:", ); -late final _sel_indicesOfObjectsByEvaluatingObjectSpecifier_ = objc - .registerName("indicesOfObjectsByEvaluatingObjectSpecifier:"); late final _sel_infoDictionary = objc.registerName("infoDictionary"); late final _sel_init = objc.registerName("init"); late final _sel_initAbsoluteURLWithDataRepresentation_relativeToURL_ = objc @@ -55762,9 +42304,6 @@ late final _sel_initWithBase64EncodedData_options_ = objc.registerName( late final _sel_initWithBase64EncodedString_options_ = objc.registerName( "initWithBase64EncodedString:options:", ); -late final _sel_initWithBase64Encoding_ = objc.registerName( - "initWithBase64Encoding:", -); late final _sel_initWithBlock_ = objc.registerName("initWithBlock:"); late final _sel_initWithBool_ = objc.registerName("initWithBool:"); late final _sel_initWithBytesNoCopy_length_ = objc.registerName( @@ -55789,16 +42328,9 @@ late final _sel_initWithBytes_length_encoding_ = objc.registerName( late final _sel_initWithBytes_objCType_ = objc.registerName( "initWithBytes:objCType:", ); -late final _sel_initWithCStringNoCopy_length_freeWhenDone_ = objc.registerName( - "initWithCStringNoCopy:length:freeWhenDone:", -); -late final _sel_initWithCString_ = objc.registerName("initWithCString:"); late final _sel_initWithCString_encoding_ = objc.registerName( "initWithCString:encoding:", ); -late final _sel_initWithCString_length_ = objc.registerName( - "initWithCString:length:", -); late final _sel_initWithCapacity_ = objc.registerName("initWithCapacity:"); late final _sel_initWithChanges_ = objc.registerName("initWithChanges:"); late final _sel_initWithChar_ = objc.registerName("initWithChar:"); @@ -55823,9 +42355,6 @@ late final _sel_initWithContentsOfFile_options_error_ = objc.registerName( late final _sel_initWithContentsOfFile_usedEncoding_error_ = objc.registerName( "initWithContentsOfFile:usedEncoding:error:", ); -late final _sel_initWithContentsOfMappedFile_ = objc.registerName( - "initWithContentsOfMappedFile:", -); late final _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_ = objc.registerName( "initWithContentsOfMarkdownFileAtURL:options:baseURL:error:", @@ -55836,9 +42365,6 @@ late final _sel_initWithContentsOfURL_ = objc.registerName( late final _sel_initWithContentsOfURL_encoding_error_ = objc.registerName( "initWithContentsOfURL:encoding:error:", ); -late final _sel_initWithContentsOfURL_error_ = objc.registerName( - "initWithContentsOfURL:error:", -); late final _sel_initWithContentsOfURL_options_error_ = objc.registerName( "initWithContentsOfURL:options:error:", ); @@ -55942,9 +42468,6 @@ late final _sel_initWithParent_userInfo_ = objc.registerName( "initWithParent:userInfo:", ); late final _sel_initWithPath_ = objc.registerName("initWithPath:"); -late final _sel_initWithScheme_host_path_ = objc.registerName( - "initWithScheme:host:path:", -); late final _sel_initWithSendPort_receivePort_components_ = objc.registerName( "initWithSendPort:receivePort:components:", ); @@ -55980,7 +42503,6 @@ late final _sel_initWithTimeInterval_sinceDate_ = objc.registerName( ); late final _sel_initWithURL_ = objc.registerName("initWithURL:"); late final _sel_initWithURL_append_ = objc.registerName("initWithURL:append:"); -late final _sel_initWithURL_cached_ = objc.registerName("initWithURL:cached:"); late final _sel_initWithUTF8String_ = objc.registerName("initWithUTF8String:"); late final _sel_initWithUnsignedChar_ = objc.registerName( "initWithUnsignedChar:", @@ -56023,15 +42545,6 @@ late final _sel_insertObject_atIndex_ = objc.registerName( late final _sel_insertObjects_atIndexes_ = objc.registerName( "insertObjects:atIndexes:", ); -late final _sel_insertString_atIndex_ = objc.registerName( - "insertString:atIndex:", -); -late final _sel_insertValue_atIndex_inPropertyWithKey_ = objc.registerName( - "insertValue:atIndex:inPropertyWithKey:", -); -late final _sel_insertValue_inPropertyWithKey_ = objc.registerName( - "insertValue:inPropertyWithKey:", -); late final _sel_insertions = objc.registerName("insertions"); late final _sel_instanceMethodForSelector_ = objc.registerName( "instanceMethodForSelector:", @@ -56058,9 +42571,6 @@ late final _sel_intersectsOrderedSet_ = objc.registerName( late final _sel_intersectsSet_ = objc.registerName("intersectsSet:"); late final _sel_invalidate = objc.registerName("invalidate"); late final _sel_inverseDifference = objc.registerName("inverseDifference"); -late final _sel_inverseForRelationshipKey_ = objc.registerName( - "inverseForRelationshipKey:", -); late final _sel_invertedSet = objc.registerName("invertedSet"); late final _sel_invocationWithMethodSignature_ = objc.registerName( "invocationWithMethodSignature:", @@ -56068,17 +42578,10 @@ late final _sel_invocationWithMethodSignature_ = objc.registerName( late final _sel_invoke = objc.registerName("invoke"); late final _sel_invokeUsingIMP_ = objc.registerName("invokeUsingIMP:"); late final _sel_invokeWithTarget_ = objc.registerName("invokeWithTarget:"); -late final _sel_isAbsolutePath = objc.registerName("isAbsolutePath"); late final _sel_isBool = objc.registerName("isBool"); late final _sel_isCancellable = objc.registerName("isCancellable"); late final _sel_isCancelled = objc.registerName("isCancelled"); -late final _sel_isCaseInsensitiveLike_ = objc.registerName( - "isCaseInsensitiveLike:", -); late final _sel_isEqualToArray_ = objc.registerName("isEqualToArray:"); -late final _sel_isEqualToAttributedString_ = objc.registerName( - "isEqualToAttributedString:", -); late final _sel_isEqualToData_ = objc.registerName("isEqualToData:"); late final _sel_isEqualToDate_ = objc.registerName("isEqualToDate:"); late final _sel_isEqualToDictionary_ = objc.registerName( @@ -56091,30 +42594,18 @@ late final _sel_isEqualToOrderedSet_ = objc.registerName( ); late final _sel_isEqualToSet_ = objc.registerName("isEqualToSet:"); late final _sel_isEqualToString_ = objc.registerName("isEqualToString:"); -late final _sel_isEqualToValue_ = objc.registerName("isEqualToValue:"); -late final _sel_isEqualTo_ = objc.registerName("isEqualTo:"); late final _sel_isEqual_ = objc.registerName("isEqual:"); late final _sel_isExecuting = objc.registerName("isExecuting"); late final _sel_isFileReferenceURL = objc.registerName("isFileReferenceURL"); late final _sel_isFileURL = objc.registerName("isFileURL"); late final _sel_isFinished = objc.registerName("isFinished"); late final _sel_isFloat = objc.registerName("isFloat"); -late final _sel_isGreaterThanOrEqualTo_ = objc.registerName( - "isGreaterThanOrEqualTo:", -); -late final _sel_isGreaterThan_ = objc.registerName("isGreaterThan:"); late final _sel_isIndeterminate = objc.registerName("isIndeterminate"); late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); -late final _sel_isLessThanOrEqualTo_ = objc.registerName( - "isLessThanOrEqualTo:", -); -late final _sel_isLessThan_ = objc.registerName("isLessThan:"); -late final _sel_isLike_ = objc.registerName("isLike:"); late final _sel_isLoaded = objc.registerName("isLoaded"); late final _sel_isMainThread = objc.registerName("isMainThread"); late final _sel_isMemberOfClass_ = objc.registerName("isMemberOfClass:"); late final _sel_isMultiThreaded = objc.registerName("isMultiThreaded"); -late final _sel_isNotEqualTo_ = objc.registerName("isNotEqualTo:"); late final _sel_isOld = objc.registerName("isOld"); late final _sel_isOneway = objc.registerName("isOneway"); late final _sel_isPausable = objc.registerName("isPausable"); @@ -56132,9 +42623,6 @@ late final _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_ = "itemProviderVisibilityForRepresentationWithTypeIdentifier:", ); late final _sel_keyEnumerator = objc.registerName("keyEnumerator"); -late final _sel_keyPathsForValuesAffectingValueForKey_ = objc.registerName( - "keyPathsForValuesAffectingValueForKey:", -); late final _sel_keysOfEntriesPassingTest_ = objc.registerName( "keysOfEntriesPassingTest:", ); @@ -56151,10 +42639,8 @@ late final _sel_keysSortedByValueWithOptions_usingComparator_ = objc .registerName("keysSortedByValueWithOptions:usingComparator:"); late final _sel_kind = objc.registerName("kind"); late final _sel_languageCode = objc.registerName("languageCode"); -late final _sel_languageIdentifier = objc.registerName("languageIdentifier"); late final _sel_lastIndex = objc.registerName("lastIndex"); late final _sel_lastObject = objc.registerName("lastObject"); -late final _sel_lastPathComponent = objc.registerName("lastPathComponent"); late final _sel_laterDate_ = objc.registerName("laterDate:"); late final _sel_length = objc.registerName("length"); late final _sel_lengthOfBytesUsingEncoding_ = objc.registerName( @@ -56162,14 +42648,7 @@ late final _sel_lengthOfBytesUsingEncoding_ = objc.registerName( ); late final _sel_letterCharacterSet = objc.registerName("letterCharacterSet"); late final _sel_limitDateForMode_ = objc.registerName("limitDateForMode:"); -late final _sel_lineDirectionForLanguage_ = objc.registerName( - "lineDirectionForLanguage:", -); late final _sel_lineRangeForRange_ = objc.registerName("lineRangeForRange:"); -late final _sel_linguisticTagsInRange_scheme_options_orthography_tokenRanges_ = - objc.registerName( - "linguisticTagsInRange:scheme:options:orthography:tokenRanges:", - ); late final _sel_load = objc.registerName("load"); late final _sel_loadAndReturnError_ = objc.registerName("loadAndReturnError:"); late final _sel_loadDataRepresentationForTypeIdentifier_completionHandler_ = @@ -56184,8 +42663,6 @@ late final _sel_loadFileRepresentationForTypeIdentifier_completionHandler_ = objc.registerName( "loadFileRepresentationForTypeIdentifier:completionHandler:", ); -late final _sel_loadInBackground = objc.registerName("loadInBackground"); -late final _sel_loadInForeground = objc.registerName("loadInForeground"); late final _sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_ = objc.registerName( "loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:", @@ -56195,18 +42672,6 @@ late final _sel_loadItemForTypeIdentifier_options_completionHandler_ = objc late final _sel_loadObjectOfClass_completionHandler_ = objc.registerName( "loadObjectOfClass:completionHandler:", ); -late final _sel_loadPreviewImageWithOptions_completionHandler_ = objc - .registerName("loadPreviewImageWithOptions:completionHandler:"); -late final _sel_loadResourceDataNotifyingClient_usingCache_ = objc.registerName( - "loadResourceDataNotifyingClient:usingCache:", -); -late final _sel_localeIdentifier = objc.registerName("localeIdentifier"); -late final _sel_localeIdentifierFromComponents_ = objc.registerName( - "localeIdentifierFromComponents:", -); -late final _sel_localeIdentifierFromWindowsLocaleCode_ = objc.registerName( - "localeIdentifierFromWindowsLocaleCode:", -); late final _sel_localeWithLocaleIdentifier_ = objc.registerName( "localeWithLocaleIdentifier:", ); @@ -56265,36 +42730,9 @@ late final _sel_localizedStandardContainsString_ = objc.registerName( late final _sel_localizedStandardRangeOfString_ = objc.registerName( "localizedStandardRangeOfString:", ); -late final _sel_localizedStringForCalendarIdentifier_ = objc.registerName( - "localizedStringForCalendarIdentifier:", -); -late final _sel_localizedStringForCollationIdentifier_ = objc.registerName( - "localizedStringForCollationIdentifier:", -); -late final _sel_localizedStringForCollatorIdentifier_ = objc.registerName( - "localizedStringForCollatorIdentifier:", -); -late final _sel_localizedStringForCountryCode_ = objc.registerName( - "localizedStringForCountryCode:", -); -late final _sel_localizedStringForCurrencyCode_ = objc.registerName( - "localizedStringForCurrencyCode:", -); late final _sel_localizedStringForKey_value_table_ = objc.registerName( "localizedStringForKey:value:table:", ); -late final _sel_localizedStringForLanguageCode_ = objc.registerName( - "localizedStringForLanguageCode:", -); -late final _sel_localizedStringForLocaleIdentifier_ = objc.registerName( - "localizedStringForLocaleIdentifier:", -); -late final _sel_localizedStringForScriptCode_ = objc.registerName( - "localizedStringForScriptCode:", -); -late final _sel_localizedStringForVariantCode_ = objc.registerName( - "localizedStringForVariantCode:", -); late final _sel_localizedStringWithFormat_ = objc.registerName( "localizedStringWithFormat:", ); @@ -56310,7 +42748,6 @@ late final _sel_longCharacterIsMember_ = objc.registerName( ); late final _sel_longLongValue = objc.registerName("longLongValue"); late final _sel_longValue = objc.registerName("longValue"); -late final _sel_lossyCString = objc.registerName("lossyCString"); late final _sel_lowercaseLetterCharacterSet = objc.registerName( "lowercaseLetterCharacterSet", ); @@ -56345,48 +42782,22 @@ late final _sel_moveObjectsAtIndexes_toIndex_ = objc.registerName( "moveObjectsAtIndexes:toIndex:", ); late final _sel_msgid = objc.registerName("msgid"); -late final _sel_mutableArrayValueForKeyPath_ = objc.registerName( - "mutableArrayValueForKeyPath:", -); -late final _sel_mutableArrayValueForKey_ = objc.registerName( - "mutableArrayValueForKey:", -); late final _sel_mutableBytes = objc.registerName("mutableBytes"); late final _sel_mutableCopy = objc.registerName("mutableCopy"); late final _sel_mutableCopyWithZone_ = objc.registerName( "mutableCopyWithZone:", ); -late final _sel_mutableOrderedSetValueForKeyPath_ = objc.registerName( - "mutableOrderedSetValueForKeyPath:", -); -late final _sel_mutableOrderedSetValueForKey_ = objc.registerName( - "mutableOrderedSetValueForKey:", -); -late final _sel_mutableSetValueForKeyPath_ = objc.registerName( - "mutableSetValueForKeyPath:", -); -late final _sel_mutableSetValueForKey_ = objc.registerName( - "mutableSetValueForKey:", -); late final _sel_name = objc.registerName("name"); late final _sel_new = objc.registerName("new"); -late final _sel_newScriptingObjectOfClass_forValueForKey_withContentsValue_properties_ = - objc.registerName( - "newScriptingObjectOfClass:forValueForKey:withContentsValue:properties:", - ); late final _sel_newlineCharacterSet = objc.registerName("newlineCharacterSet"); late final _sel_nextObject = objc.registerName("nextObject"); late final _sel_nonBaseCharacterSet = objc.registerName("nonBaseCharacterSet"); -late final _sel_nonretainedObjectValue = objc.registerName( - "nonretainedObjectValue", -); late final _sel_notificationWithName_object_ = objc.registerName( "notificationWithName:object:", ); late final _sel_notificationWithName_object_userInfo_ = objc.registerName( "notificationWithName:object:userInfo:", ); -late final _sel_now = objc.registerName("now"); late final _sel_null = objc.registerName("null"); late final _sel_numberOfArguments = objc.registerName("numberOfArguments"); late final _sel_numberWithBool_ = objc.registerName("numberWithBool:"); @@ -56430,8 +42841,6 @@ late final _sel_objectForKey_ = objc.registerName("objectForKey:"); late final _sel_objectForKeyedSubscript_ = objc.registerName( "objectForKeyedSubscript:", ); -late final _sel_objectSpecifier = objc.registerName("objectSpecifier"); -late final _sel_objectZone = objc.registerName("objectZone"); late final _sel_objectsAtIndexes_ = objc.registerName("objectsAtIndexes:"); late final _sel_objectsForKeys_notFoundMarker_ = objc.registerName( "objectsForKeys:notFoundMarker:", @@ -56440,14 +42849,10 @@ late final _sel_objectsPassingTest_ = objc.registerName("objectsPassingTest:"); late final _sel_objectsWithOptions_passingTest_ = objc.registerName( "objectsWithOptions:passingTest:", ); -late final _sel_observationInfo = objc.registerName("observationInfo"); late final _sel_observeValueForKeyPath_ofObject_change_context_ = objc .registerName("observeValueForKeyPath:ofObject:change:context:"); late final _sel_open = objc.registerName("open"); late final _sel_orderedSet = objc.registerName("orderedSet"); -late final _sel_orderedSetByApplyingDifference_ = objc.registerName( - "orderedSetByApplyingDifference:", -); late final _sel_orderedSetWithArray_ = objc.registerName( "orderedSetWithArray:", ); @@ -56494,8 +42899,6 @@ late final _sel_paragraphRangeForRange_ = objc.registerName( late final _sel_parameterString = objc.registerName("parameterString"); late final _sel_password = objc.registerName("password"); late final _sel_path = objc.registerName("path"); -late final _sel_pathComponents = objc.registerName("pathComponents"); -late final _sel_pathExtension = objc.registerName("pathExtension"); late final _sel_pathForAuxiliaryExecutable_ = objc.registerName( "pathForAuxiliaryExecutable:", ); @@ -56507,52 +42910,22 @@ late final _sel_pathForResource_ofType_inDirectory_ = objc.registerName( ); late final _sel_pathForResource_ofType_inDirectory_forLocalization_ = objc .registerName("pathForResource:ofType:inDirectory:forLocalization:"); -late final _sel_pathWithComponents_ = objc.registerName("pathWithComponents:"); late final _sel_pathsForResourcesOfType_inDirectory_ = objc.registerName( "pathsForResourcesOfType:inDirectory:", ); late final _sel_pathsForResourcesOfType_inDirectory_forLocalization_ = objc .registerName("pathsForResourcesOfType:inDirectory:forLocalization:"); -late final _sel_pathsMatchingExtensions_ = objc.registerName( - "pathsMatchingExtensions:", -); late final _sel_pause = objc.registerName("pause"); late final _sel_pausingHandler = objc.registerName("pausingHandler"); late final _sel_performAsCurrentWithPendingUnitCount_usingBlock_ = objc .registerName("performAsCurrentWithPendingUnitCount:usingBlock:"); -late final _sel_performBlock_ = objc.registerName("performBlock:"); -late final _sel_performInModes_block_ = objc.registerName( - "performInModes:block:", -); -late final _sel_performSelectorInBackground_withObject_ = objc.registerName( - "performSelectorInBackground:withObject:", -); -late final _sel_performSelectorOnMainThread_withObject_waitUntilDone_ = objc - .registerName("performSelectorOnMainThread:withObject:waitUntilDone:"); -late final _sel_performSelectorOnMainThread_withObject_waitUntilDone_modes_ = - objc.registerName( - "performSelectorOnMainThread:withObject:waitUntilDone:modes:", - ); late final _sel_performSelector_ = objc.registerName("performSelector:"); -late final _sel_performSelector_onThread_withObject_waitUntilDone_ = objc - .registerName("performSelector:onThread:withObject:waitUntilDone:"); -late final _sel_performSelector_onThread_withObject_waitUntilDone_modes_ = objc - .registerName("performSelector:onThread:withObject:waitUntilDone:modes:"); -late final _sel_performSelector_target_argument_order_modes_ = objc - .registerName("performSelector:target:argument:order:modes:"); late final _sel_performSelector_withObject_ = objc.registerName( "performSelector:withObject:", ); -late final _sel_performSelector_withObject_afterDelay_ = objc.registerName( - "performSelector:withObject:afterDelay:", -); -late final _sel_performSelector_withObject_afterDelay_inModes_ = objc - .registerName("performSelector:withObject:afterDelay:inModes:"); late final _sel_performSelector_withObject_withObject_ = objc.registerName( "performSelector:withObject:withObject:", ); -late final _sel_pointValue = objc.registerName("pointValue"); -late final _sel_pointerValue = objc.registerName("pointerValue"); late final _sel_port = objc.registerName("port"); late final _sel_precomposedStringWithCanonicalMapping = objc.registerName( "precomposedStringWithCanonicalMapping", @@ -56560,7 +42933,6 @@ late final _sel_precomposedStringWithCanonicalMapping = objc.registerName( late final _sel_precomposedStringWithCompatibilityMapping = objc.registerName( "precomposedStringWithCompatibilityMapping", ); -late final _sel_preferredLanguages = objc.registerName("preferredLanguages"); late final _sel_preferredLocalizations = objc.registerName( "preferredLocalizations", ); @@ -56572,10 +42944,6 @@ late final _sel_preferredLocalizationsFromArray_forPreferences_ = objc late final _sel_preflightAndReturnError_ = objc.registerName( "preflightAndReturnError:", ); -late final _sel_preservationPriorityForTag_ = objc.registerName( - "preservationPriorityForTag:", -); -late final _sel_previewImageHandler = objc.registerName("previewImageHandler"); late final _sel_principalClass = objc.registerName("principalClass"); late final _sel_privateFrameworksPath = objc.registerName( "privateFrameworksPath", @@ -56588,29 +42956,13 @@ late final _sel_progressWithTotalUnitCount_ = objc.registerName( ); late final _sel_progressWithTotalUnitCount_parent_pendingUnitCount_ = objc .registerName("progressWithTotalUnitCount:parent:pendingUnitCount:"); -late final _sel_promisedItemResourceValuesForKeys_error_ = objc.registerName( - "promisedItemResourceValuesForKeys:error:", -); -late final _sel_propertyForKeyIfAvailable_ = objc.registerName( - "propertyForKeyIfAvailable:", -); late final _sel_propertyForKey_ = objc.registerName("propertyForKey:"); -late final _sel_propertyList = objc.registerName("propertyList"); -late final _sel_propertyListFromStringsFileFormat = objc.registerName( - "propertyListFromStringsFileFormat", -); late final _sel_publish = objc.registerName("publish"); late final _sel_punctuationCharacterSet = objc.registerName( "punctuationCharacterSet", ); late final _sel_qualityOfService = objc.registerName("qualityOfService"); late final _sel_query = objc.registerName("query"); -late final _sel_quotationBeginDelimiter = objc.registerName( - "quotationBeginDelimiter", -); -late final _sel_quotationEndDelimiter = objc.registerName( - "quotationEndDelimiter", -); late final _sel_rangeOfCharacterFromSet_ = objc.registerName( "rangeOfCharacterFromSet:", ); @@ -56639,15 +42991,9 @@ late final _sel_rangeOfString_options_range_ = objc.registerName( late final _sel_rangeOfString_options_range_locale_ = objc.registerName( "rangeOfString:options:range:locale:", ); -late final _sel_rangeValue = objc.registerName("rangeValue"); late final _sel_read_maxLength_ = objc.registerName("read:maxLength:"); -late final _sel_readableTypeIdentifiersForItemProvider = objc.registerName( - "readableTypeIdentifiersForItemProvider", -); late final _sel_receivePort = objc.registerName("receivePort"); late final _sel_recoveryAttempter = objc.registerName("recoveryAttempter"); -late final _sel_rectValue = objc.registerName("rectValue"); -late final _sel_regionCode = objc.registerName("regionCode"); late final _sel_registerClass = objc.registerName("registerClass"); late final _sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_ = objc.registerName( @@ -56665,9 +43011,6 @@ late final _sel_registerObjectOfClass_visibility_loadHandler_ = objc late final _sel_registerObject_visibility_ = objc.registerName( "registerObject:visibility:", ); -late final _sel_registerURLHandleClass_ = objc.registerName( - "registerURLHandleClass:", -); late final _sel_registeredTypeIdentifiers = objc.registerName( "registeredTypeIdentifiers", ); @@ -56687,10 +43030,6 @@ late final _sel_removeAllObjects = objc.registerName("removeAllObjects"); late final _sel_removeCachedResourceValueForKey_ = objc.registerName( "removeCachedResourceValueForKey:", ); -late final _sel_removeClient_ = objc.registerName("removeClient:"); -late final _sel_removeConnection_fromRunLoop_forMode_ = objc.registerName( - "removeConnection:fromRunLoop:forMode:", -); late final _sel_removeFromRunLoop_forMode_ = objc.registerName( "removeFromRunLoop:forMode:", ); @@ -56720,30 +43059,14 @@ late final _sel_removeObjectsAtIndexes_ = objc.registerName( late final _sel_removeObjectsForKeys_ = objc.registerName( "removeObjectsForKeys:", ); -late final _sel_removeObjectsFromIndices_numIndices_ = objc.registerName( - "removeObjectsFromIndices:numIndices:", -); late final _sel_removeObjectsInArray_ = objc.registerName( "removeObjectsInArray:", ); late final _sel_removeObjectsInRange_ = objc.registerName( "removeObjectsInRange:", ); -late final _sel_removeObserver_forKeyPath_ = objc.registerName( - "removeObserver:forKeyPath:", -); -late final _sel_removeObserver_forKeyPath_context_ = objc.registerName( - "removeObserver:forKeyPath:context:", -); -late final _sel_removeObserver_fromObjectsAtIndexes_forKeyPath_ = objc - .registerName("removeObserver:fromObjectsAtIndexes:forKeyPath:"); -late final _sel_removeObserver_fromObjectsAtIndexes_forKeyPath_context_ = objc - .registerName("removeObserver:fromObjectsAtIndexes:forKeyPath:context:"); late final _sel_removePort_forMode_ = objc.registerName("removePort:forMode:"); late final _sel_removeSubscriber_ = objc.registerName("removeSubscriber:"); -late final _sel_removeValueAtIndex_fromPropertyWithKey_ = objc.registerName( - "removeValueAtIndex:fromPropertyWithKey:", -); late final _sel_replaceBytesInRange_withBytes_ = objc.registerName( "replaceBytesInRange:withBytes:", ); @@ -56767,25 +43090,6 @@ late final _sel_replaceObjectsInRange_withObjectsFromArray_range_ = objc late final _sel_replaceObjectsInRange_withObjects_count_ = objc.registerName( "replaceObjectsInRange:withObjects:count:", ); -late final _sel_replaceOccurrencesOfString_withString_options_range_ = objc - .registerName("replaceOccurrencesOfString:withString:options:range:"); -late final _sel_replaceValueAtIndex_inPropertyWithKey_withValue_ = objc - .registerName("replaceValueAtIndex:inPropertyWithKey:withValue:"); -late final _sel_replacementObjectForArchiver_ = objc.registerName( - "replacementObjectForArchiver:", -); -late final _sel_replacementObjectForCoder_ = objc.registerName( - "replacementObjectForCoder:", -); -late final _sel_replacementObjectForKeyedArchiver_ = objc.registerName( - "replacementObjectForKeyedArchiver:", -); -late final _sel_replacementObjectForPortCoder_ = objc.registerName( - "replacementObjectForPortCoder:", -); -late final _sel_requiresSecureCoding = objc.registerName( - "requiresSecureCoding", -); late final _sel_reservedSpaceLength = objc.registerName("reservedSpaceLength"); late final _sel_resetBytesInRange_ = objc.registerName("resetBytesInRange:"); late final _sel_resignCurrent = objc.registerName("resignCurrent"); @@ -56793,10 +43097,6 @@ late final _sel_resolveClassMethod_ = objc.registerName("resolveClassMethod:"); late final _sel_resolveInstanceMethod_ = objc.registerName( "resolveInstanceMethod:", ); -late final _sel_resourceData = objc.registerName("resourceData"); -late final _sel_resourceDataUsingCache_ = objc.registerName( - "resourceDataUsingCache:", -); late final _sel_resourcePath = objc.registerName("resourcePath"); late final _sel_resourceSpecifier = objc.registerName("resourceSpecifier"); late final _sel_resourceURL = objc.registerName("resourceURL"); @@ -56816,9 +43116,6 @@ late final _sel_reverseObjectEnumerator = objc.registerName( "reverseObjectEnumerator", ); late final _sel_reversedOrderedSet = objc.registerName("reversedOrderedSet"); -late final _sel_run = objc.registerName("run"); -late final _sel_runMode_beforeDate_ = objc.registerName("runMode:beforeDate:"); -late final _sel_runUntilDate_ = objc.registerName("runUntilDate:"); late final _sel_scheduleInRunLoop_forMode_ = objc.registerName( "scheduleInRunLoop:forMode:", ); @@ -56831,29 +43128,6 @@ late final _sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_ "scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:", ); late final _sel_scheme = objc.registerName("scheme"); -late final _sel_scriptCode = objc.registerName("scriptCode"); -late final _sel_scriptingBeginsWith_ = objc.registerName( - "scriptingBeginsWith:", -); -late final _sel_scriptingContains_ = objc.registerName("scriptingContains:"); -late final _sel_scriptingEndsWith_ = objc.registerName("scriptingEndsWith:"); -late final _sel_scriptingIsEqualTo_ = objc.registerName("scriptingIsEqualTo:"); -late final _sel_scriptingIsGreaterThanOrEqualTo_ = objc.registerName( - "scriptingIsGreaterThanOrEqualTo:", -); -late final _sel_scriptingIsGreaterThan_ = objc.registerName( - "scriptingIsGreaterThan:", -); -late final _sel_scriptingIsLessThanOrEqualTo_ = objc.registerName( - "scriptingIsLessThanOrEqualTo:", -); -late final _sel_scriptingIsLessThan_ = objc.registerName( - "scriptingIsLessThan:", -); -late final _sel_scriptingProperties = objc.registerName("scriptingProperties"); -late final _sel_scriptingValueForSpecifier_ = objc.registerName( - "scriptingValueForSpecifier:", -); late final _sel_selector = objc.registerName("selector"); late final _sel_self = objc.registerName("self"); late final _sel_sendBeforeDate_ = objc.registerName("sendBeforeDate:"); @@ -56909,8 +43183,6 @@ late final _sel_setFireDate_ = objc.registerName("setFireDate:"); late final _sel_setInterpretedSyntax_ = objc.registerName( "setInterpretedSyntax:", ); -late final _sel_setKeys_triggerChangeNotificationsForDependentKey_ = objc - .registerName("setKeys:triggerChangeNotificationsForDependentKey:"); late final _sel_setKind_ = objc.registerName("setKind:"); late final _sel_setLanguageCode_ = objc.registerName("setLanguageCode:"); late final _sel_setLength_ = objc.registerName("setLength:"); @@ -56922,8 +43194,6 @@ late final _sel_setLocalizedDescription_ = objc.registerName( ); late final _sel_setMsgid_ = objc.registerName("setMsgid:"); late final _sel_setName_ = objc.registerName("setName:"); -late final _sel_setNilValueForKey_ = objc.registerName("setNilValueForKey:"); -late final _sel_setObjectZone_ = objc.registerName("setObjectZone:"); late final _sel_setObject_atIndex_ = objc.registerName("setObject:atIndex:"); late final _sel_setObject_atIndexedSubscript_ = objc.registerName( "setObject:atIndexedSubscript:", @@ -56932,20 +43202,12 @@ late final _sel_setObject_forKey_ = objc.registerName("setObject:forKey:"); late final _sel_setObject_forKeyedSubscript_ = objc.registerName( "setObject:forKeyedSubscript:", ); -late final _sel_setObservationInfo_ = objc.registerName("setObservationInfo:"); late final _sel_setPausable_ = objc.registerName("setPausable:"); late final _sel_setPausingHandler_ = objc.registerName("setPausingHandler:"); -late final _sel_setPreservationPriority_forTags_ = objc.registerName( - "setPreservationPriority:forTags:", -); -late final _sel_setPreviewImageHandler_ = objc.registerName( - "setPreviewImageHandler:", -); late final _sel_setProperty_forKey_ = objc.registerName("setProperty:forKey:"); late final _sel_setQualityOfService_ = objc.registerName( "setQualityOfService:", ); -late final _sel_setResourceData_ = objc.registerName("setResourceData:"); late final _sel_setResourceValue_forKey_error_ = objc.registerName( "setResourceValue:forKey:error:", ); @@ -56954,14 +43216,9 @@ late final _sel_setResourceValues_error_ = objc.registerName( ); late final _sel_setResumingHandler_ = objc.registerName("setResumingHandler:"); late final _sel_setReturnValue_ = objc.registerName("setReturnValue:"); -late final _sel_setScriptingProperties_ = objc.registerName( - "setScriptingProperties:", -); late final _sel_setSelector_ = objc.registerName("setSelector:"); late final _sel_setSet_ = objc.registerName("setSet:"); -late final _sel_setSharedObservers_ = objc.registerName("setSharedObservers:"); late final _sel_setStackSize_ = objc.registerName("setStackSize:"); -late final _sel_setString_ = objc.registerName("setString:"); late final _sel_setSuggestedName_ = objc.registerName("setSuggestedName:"); late final _sel_setTarget_ = objc.registerName("setTarget:"); late final _sel_setTemporaryResourceValue_forKey_ = objc.registerName( @@ -56977,17 +43234,6 @@ late final _sel_setUserInfoObject_forKey_ = objc.registerName( late final _sel_setUserInfoValueProviderForDomain_provider_ = objc.registerName( "setUserInfoValueProviderForDomain:provider:", ); -late final _sel_setValue_forKeyPath_ = objc.registerName( - "setValue:forKeyPath:", -); -late final _sel_setValue_forKey_ = objc.registerName("setValue:forKey:"); -late final _sel_setValue_forUndefinedKey_ = objc.registerName( - "setValue:forUndefinedKey:", -); -late final _sel_setValuesForKeysWithDictionary_ = objc.registerName( - "setValuesForKeysWithDictionary:", -); -late final _sel_setVersion_ = objc.registerName("setVersion:"); late final _sel_setWithArray_ = objc.registerName("setWithArray:"); late final _sel_setWithCapacity_ = objc.registerName("setWithCapacity:"); late final _sel_setWithObject_ = objc.registerName("setWithObject:"); @@ -57000,9 +43246,6 @@ late final _sel_sharedFrameworksPath = objc.registerName( "sharedFrameworksPath", ); late final _sel_sharedFrameworksURL = objc.registerName("sharedFrameworksURL"); -late final _sel_sharedKeySetForKeys_ = objc.registerName( - "sharedKeySetForKeys:", -); late final _sel_sharedSupportPath = objc.registerName("sharedSupportPath"); late final _sel_sharedSupportURL = objc.registerName("sharedSupportURL"); late final _sel_shiftIndexesStartingAtIndex_by_ = objc.registerName( @@ -57012,7 +43255,6 @@ late final _sel_shortValue = objc.registerName("shortValue"); late final _sel_signatureWithObjCTypes_ = objc.registerName( "signatureWithObjCTypes:", ); -late final _sel_sizeValue = objc.registerName("sizeValue"); late final _sel_sleepForTimeInterval_ = objc.registerName( "sleepForTimeInterval:", ); @@ -57024,9 +43266,6 @@ late final _sel_sortRange_options_usingComparator_ = objc.registerName( late final _sel_sortUsingComparator_ = objc.registerName( "sortUsingComparator:", ); -late final _sel_sortUsingDescriptors_ = objc.registerName( - "sortUsingDescriptors:", -); late final _sel_sortUsingFunction_context_ = objc.registerName( "sortUsingFunction:context:", ); @@ -57038,9 +43277,6 @@ late final _sel_sortedArrayHint = objc.registerName("sortedArrayHint"); late final _sel_sortedArrayUsingComparator_ = objc.registerName( "sortedArrayUsingComparator:", ); -late final _sel_sortedArrayUsingDescriptors_ = objc.registerName( - "sortedArrayUsingDescriptors:", -); late final _sel_sortedArrayUsingFunction_context_ = objc.registerName( "sortedArrayUsingFunction:context:", ); @@ -57059,55 +43295,27 @@ late final _sel_start = objc.registerName("start"); late final _sel_startAccessingSecurityScopedResource = objc.registerName( "startAccessingSecurityScopedResource", ); -late final _sel_status = objc.registerName("status"); late final _sel_stopAccessingSecurityScopedResource = objc.registerName( "stopAccessingSecurityScopedResource", ); -late final _sel_storedValueForKey_ = objc.registerName("storedValueForKey:"); late final _sel_streamError = objc.registerName("streamError"); late final _sel_streamStatus = objc.registerName("streamStatus"); late final _sel_stream_handleEvent_ = objc.registerName("stream:handleEvent:"); late final _sel_string = objc.registerName("string"); -late final _sel_stringByAbbreviatingWithTildeInPath = objc.registerName( - "stringByAbbreviatingWithTildeInPath", -); -late final _sel_stringByAddingPercentEncodingWithAllowedCharacters_ = objc - .registerName("stringByAddingPercentEncodingWithAllowedCharacters:"); -late final _sel_stringByAddingPercentEscapesUsingEncoding_ = objc.registerName( - "stringByAddingPercentEscapesUsingEncoding:", -); late final _sel_stringByAppendingFormat_ = objc.registerName( "stringByAppendingFormat:", ); -late final _sel_stringByAppendingPathComponent_ = objc.registerName( - "stringByAppendingPathComponent:", -); -late final _sel_stringByAppendingPathExtension_ = objc.registerName( - "stringByAppendingPathExtension:", -); late final _sel_stringByAppendingString_ = objc.registerName( "stringByAppendingString:", ); late final _sel_stringByApplyingTransform_reverse_ = objc.registerName( "stringByApplyingTransform:reverse:", ); -late final _sel_stringByDeletingLastPathComponent = objc.registerName( - "stringByDeletingLastPathComponent", -); -late final _sel_stringByDeletingPathExtension = objc.registerName( - "stringByDeletingPathExtension", -); -late final _sel_stringByExpandingTildeInPath = objc.registerName( - "stringByExpandingTildeInPath", -); late final _sel_stringByFoldingWithOptions_locale_ = objc.registerName( "stringByFoldingWithOptions:locale:", ); late final _sel_stringByPaddingToLength_withString_startingAtIndex_ = objc .registerName("stringByPaddingToLength:withString:startingAtIndex:"); -late final _sel_stringByRemovingPercentEncoding = objc.registerName( - "stringByRemovingPercentEncoding", -); late final _sel_stringByReplacingCharactersInRange_withString_ = objc .registerName("stringByReplacingCharactersInRange:withString:"); late final _sel_stringByReplacingOccurrencesOfString_withString_ = objc @@ -57116,44 +43324,21 @@ late final _sel_stringByReplacingOccurrencesOfString_withString_options_range_ = objc.registerName( "stringByReplacingOccurrencesOfString:withString:options:range:", ); -late final _sel_stringByReplacingPercentEscapesUsingEncoding_ = objc - .registerName("stringByReplacingPercentEscapesUsingEncoding:"); -late final _sel_stringByResolvingSymlinksInPath = objc.registerName( - "stringByResolvingSymlinksInPath", -); -late final _sel_stringByStandardizingPath = objc.registerName( - "stringByStandardizingPath", -); late final _sel_stringByTrimmingCharactersInSet_ = objc.registerName( "stringByTrimmingCharactersInSet:", ); -late final _sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_ = - objc.registerName( - "stringEncodingForData:encodingOptions:convertedString:usedLossyConversion:", - ); late final _sel_stringValue = objc.registerName("stringValue"); -late final _sel_stringWithCString_ = objc.registerName("stringWithCString:"); late final _sel_stringWithCString_encoding_ = objc.registerName( "stringWithCString:encoding:", ); -late final _sel_stringWithCString_length_ = objc.registerName( - "stringWithCString:length:", -); -late final _sel_stringWithCapacity_ = objc.registerName("stringWithCapacity:"); late final _sel_stringWithCharacters_length_ = objc.registerName( "stringWithCharacters:length:", ); -late final _sel_stringWithContentsOfFile_ = objc.registerName( - "stringWithContentsOfFile:", -); late final _sel_stringWithContentsOfFile_encoding_error_ = objc.registerName( "stringWithContentsOfFile:encoding:error:", ); late final _sel_stringWithContentsOfFile_usedEncoding_error_ = objc .registerName("stringWithContentsOfFile:usedEncoding:error:"); -late final _sel_stringWithContentsOfURL_ = objc.registerName( - "stringWithContentsOfURL:", -); late final _sel_stringWithContentsOfURL_encoding_error_ = objc.registerName( "stringWithContentsOfURL:encoding:error:", ); @@ -57167,9 +43352,6 @@ late final _sel_stringWithUTF8String_ = objc.registerName( ); late final _sel_stringWithValidatedFormat_validFormatSpecifiers_error_ = objc .registerName("stringWithValidatedFormat:validFormatSpecifiers:error:"); -late final _sel_stringsByAppendingPaths_ = objc.registerName( - "stringsByAppendingPaths:", -); late final _sel_subarrayWithRange_ = objc.registerName("subarrayWithRange:"); late final _sel_subdataWithRange_ = objc.registerName("subdataWithRange:"); late final _sel_substringFromIndex_ = objc.registerName("substringFromIndex:"); @@ -57181,18 +43363,6 @@ late final _sel_supportsSecureCoding = objc.registerName( "supportsSecureCoding", ); late final _sel_symbolCharacterSet = objc.registerName("symbolCharacterSet"); -late final _sel_systemLocale = objc.registerName("systemLocale"); -late final _sel_systemVersion = objc.registerName("systemVersion"); -late final _sel_takeStoredValue_forKey_ = objc.registerName( - "takeStoredValue:forKey:", -); -late final _sel_takeValue_forKeyPath_ = objc.registerName( - "takeValue:forKeyPath:", -); -late final _sel_takeValue_forKey_ = objc.registerName("takeValue:forKey:"); -late final _sel_takeValuesFromDictionary_ = objc.registerName( - "takeValuesFromDictionary:", -); late final _sel_target = objc.registerName("target"); late final _sel_threadDictionary = objc.registerName("threadDictionary"); late final _sel_threadPriority = objc.registerName("threadPriority"); @@ -57218,17 +43388,8 @@ late final _sel_timerWithTimeInterval_repeats_block_ = objc.registerName( ); late final _sel_timerWithTimeInterval_target_selector_userInfo_repeats_ = objc .registerName("timerWithTimeInterval:target:selector:userInfo:repeats:"); -late final _sel_toManyRelationshipKeys = objc.registerName( - "toManyRelationshipKeys", -); -late final _sel_toOneRelationshipKeys = objc.registerName( - "toOneRelationshipKeys", -); late final _sel_tolerance = objc.registerName("tolerance"); late final _sel_totalUnitCount = objc.registerName("totalUnitCount"); -late final _sel_unableToSetNilForKey_ = objc.registerName( - "unableToSetNilForKey:", -); late final _sel_underlyingErrors = objc.registerName("underlyingErrors"); late final _sel_unionOrderedSet_ = objc.registerName("unionOrderedSet:"); late final _sel_unionSet_ = objc.registerName("unionSet:"); @@ -57251,54 +43412,11 @@ late final _sel_uppercaseString = objc.registerName("uppercaseString"); late final _sel_uppercaseStringWithLocale_ = objc.registerName( "uppercaseStringWithLocale:", ); -late final _sel_useStoredAccessor = objc.registerName("useStoredAccessor"); late final _sel_user = objc.registerName("user"); late final _sel_userInfo = objc.registerName("userInfo"); late final _sel_userInfoValueProviderForDomain_ = objc.registerName( "userInfoValueProviderForDomain:", ); -late final _sel_usesMetricSystem = objc.registerName("usesMetricSystem"); -late final _sel_validateValue_forKeyPath_error_ = objc.registerName( - "validateValue:forKeyPath:error:", -); -late final _sel_validateValue_forKey_error_ = objc.registerName( - "validateValue:forKey:error:", -); -late final _sel_valueAtIndex_inPropertyWithKey_ = objc.registerName( - "valueAtIndex:inPropertyWithKey:", -); -late final _sel_valueForKeyPath_ = objc.registerName("valueForKeyPath:"); -late final _sel_valueForKey_ = objc.registerName("valueForKey:"); -late final _sel_valueForUndefinedKey_ = objc.registerName( - "valueForUndefinedKey:", -); -late final _sel_valueWithBytes_objCType_ = objc.registerName( - "valueWithBytes:objCType:", -); -late final _sel_valueWithEdgeInsets_ = objc.registerName( - "valueWithEdgeInsets:", -); -late final _sel_valueWithName_inPropertyWithKey_ = objc.registerName( - "valueWithName:inPropertyWithKey:", -); -late final _sel_valueWithNonretainedObject_ = objc.registerName( - "valueWithNonretainedObject:", -); -late final _sel_valueWithPoint_ = objc.registerName("valueWithPoint:"); -late final _sel_valueWithPointer_ = objc.registerName("valueWithPointer:"); -late final _sel_valueWithRange_ = objc.registerName("valueWithRange:"); -late final _sel_valueWithRect_ = objc.registerName("valueWithRect:"); -late final _sel_valueWithSize_ = objc.registerName("valueWithSize:"); -late final _sel_valueWithUniqueID_inPropertyWithKey_ = objc.registerName( - "valueWithUniqueID:inPropertyWithKey:", -); -late final _sel_value_withObjCType_ = objc.registerName("value:withObjCType:"); -late final _sel_valuesForKeys_ = objc.registerName("valuesForKeys:"); -late final _sel_variantCode = objc.registerName("variantCode"); -late final _sel_variantFittingPresentationWidth_ = objc.registerName( - "variantFittingPresentationWidth:", -); -late final _sel_version = objc.registerName("version"); late final _sel_versionForClassName_ = objc.registerName( "versionForClassName:", ); @@ -57308,27 +43426,12 @@ late final _sel_whitespaceAndNewlineCharacterSet = objc.registerName( late final _sel_whitespaceCharacterSet = objc.registerName( "whitespaceCharacterSet", ); -late final _sel_willChangeValueForKey_ = objc.registerName( - "willChangeValueForKey:", -); -late final _sel_willChangeValueForKey_withSetMutation_usingObjects_ = objc - .registerName("willChangeValueForKey:withSetMutation:usingObjects:"); -late final _sel_willChange_valuesAtIndexes_forKey_ = objc.registerName( - "willChange:valuesAtIndexes:forKey:", -); -late final _sel_windowsLocaleCodeFromLocaleIdentifier_ = objc.registerName( - "windowsLocaleCodeFromLocaleIdentifier:", -); late final _sel_writableTypeIdentifiersForItemProvider = objc.registerName( "writableTypeIdentifiersForItemProvider", ); late final _sel_writeBookmarkData_toURL_options_error_ = objc.registerName( "writeBookmarkData:toURL:options:error:", ); -late final _sel_writeData_ = objc.registerName("writeData:"); -late final _sel_writeProperty_forKey_ = objc.registerName( - "writeProperty:forKey:", -); late final _sel_writeToFile_atomically_ = objc.registerName( "writeToFile:atomically:", ); diff --git a/pkgs/objective_c/src/objective_c_bindings_generated.m b/pkgs/objective_c/src/objective_c_bindings_generated.m index fb04d1a47d..346384e903 100644 --- a/pkgs/objective_c/src/objective_c_bindings_generated.m +++ b/pkgs/objective_c/src/objective_c_bindings_generated.m @@ -90,9 +90,6 @@ __attribute__((visibility("default"))) __attribute__((used)) Protocol* _1wx624s_NSStreamDelegate(void) { return @protocol(NSStreamDelegate); } -__attribute__((visibility("default"))) __attribute__((used)) -Protocol* _1wx624s_NSURLHandleClient(void) { return @protocol(NSURLHandleClient); } - typedef id (^_ProtocolTrampoline)(void * sel); __attribute__((visibility("default"))) __attribute__((used)) id _1wx624s_protocolTrampoline_1mbt9g9(id target, void * sel) { @@ -297,60 +294,6 @@ _ListenerTrampoline_2 _1wx624s_wrapBlockingBlock_pfv6jd(int64_t port, DOBJC_Cont }); } -__attribute__((visibility("default"))) -@interface _1wx624s_BlockArgs_1a22wz : NSObject -@property (copy) id block; -@property (strong) id arg0; -@property struct _NSRange arg1; -@property BOOL * arg2; -@end -@implementation _1wx624s_BlockArgs_1a22wz -@end - -typedef void (^_ListenerTrampoline_3)(id arg0, struct _NSRange arg1, BOOL * arg2); -__attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_3 _1wx624s_wrapListenerBlock_1a22wz( - int64_t port, DOBJC_Context* ctx) NS_RETURNS_RETAINED { - __block __weak _ListenerTrampoline_3 weakSelfBlock = nil; - _ListenerTrampoline_3 strongSelfBlock = [^void(id arg0, struct _NSRange arg1, BOOL * arg2) { - @autoreleasepool { - _1wx624s_BlockArgs_1a22wz* args = [[_1wx624s_BlockArgs_1a22wz alloc] init]; - args.block = weakSelfBlock; - args.arg0 = arg0; - args.arg1 = arg1; - args.arg2 = arg2; - ctx->invokeListenerPortBlock(port, (__bridge_retained void*)args); - } - } copy]; - weakSelfBlock = strongSelfBlock; - return strongSelfBlock; -} - -typedef void (^_BlockingTrampoline_3)(void * waiter, id arg0, struct _NSRange arg1, BOOL * arg2); -__attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_3 _1wx624s_wrapBlockingBlock_1a22wz(int64_t port, DOBJC_Context* ctx, - void (*directInvoke)(void*)) NS_RETURNS_RETAINED { - BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_3, ^void(id arg0, struct _NSRange arg1, BOOL * arg2), { - @autoreleasepool { - _1wx624s_BlockArgs_1a22wz* args = [[_1wx624s_BlockArgs_1a22wz alloc] init]; - args.block = weakSelfBlock; - args.arg0 = arg0; - args.arg1 = arg1; - args.arg2 = arg2; - directInvoke((__bridge_retained void*)args); - } - }, { - @autoreleasepool { - _1wx624s_BlockArgs_1a22wz* args = [[_1wx624s_BlockArgs_1a22wz alloc] init]; - args.block = weakSelfBlock; - args.arg0 = arg0; - args.arg1 = arg1; - args.arg2 = arg2; - ctx->invokeBlockingPortBlock(port, (__bridge_retained void*)args, waiter); - } - }); -} - __attribute__((visibility("default"))) @interface _1wx624s_BlockArgs_1b3bb6a : NSObject @property (copy) id block; @@ -361,12 +304,12 @@ @interface _1wx624s_BlockArgs_1b3bb6a : NSObject @implementation _1wx624s_BlockArgs_1b3bb6a @end -typedef void (^_ListenerTrampoline_4)(id arg0, id arg1, id arg2); +typedef void (^_ListenerTrampoline_3)(id arg0, id arg1, id arg2); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_4 _1wx624s_wrapListenerBlock_1b3bb6a( +_ListenerTrampoline_3 _1wx624s_wrapListenerBlock_1b3bb6a( int64_t port, DOBJC_Context* ctx) NS_RETURNS_RETAINED { - __block __weak _ListenerTrampoline_4 weakSelfBlock = nil; - _ListenerTrampoline_4 strongSelfBlock = [^void(id arg0, id arg1, id arg2) { + __block __weak _ListenerTrampoline_3 weakSelfBlock = nil; + _ListenerTrampoline_3 strongSelfBlock = [^void(id arg0, id arg1, id arg2) { @autoreleasepool { _1wx624s_BlockArgs_1b3bb6a* args = [[_1wx624s_BlockArgs_1b3bb6a alloc] init]; args.block = weakSelfBlock; @@ -380,11 +323,11 @@ _ListenerTrampoline_4 _1wx624s_wrapListenerBlock_1b3bb6a( return strongSelfBlock; } -typedef void (^_BlockingTrampoline_4)(void * waiter, id arg0, id arg1, id arg2); +typedef void (^_BlockingTrampoline_3)(void * waiter, id arg0, id arg1, id arg2); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_4 _1wx624s_wrapBlockingBlock_1b3bb6a(int64_t port, DOBJC_Context* ctx, +_ListenerTrampoline_3 _1wx624s_wrapBlockingBlock_1b3bb6a(int64_t port, DOBJC_Context* ctx, void (*directInvoke)(void*)) NS_RETURNS_RETAINED { - BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_4, ^void(id arg0, id arg1, id arg2), { + BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_3, ^void(id arg0, id arg1, id arg2), { @autoreleasepool { _1wx624s_BlockArgs_1b3bb6a* args = [[_1wx624s_BlockArgs_1b3bb6a alloc] init]; args.block = weakSelfBlock; @@ -414,12 +357,12 @@ @interface _1wx624s_BlockArgs_zkjmn1 : NSObject @implementation _1wx624s_BlockArgs_zkjmn1 @end -typedef void (^_ListenerTrampoline_5)(struct _NSRange arg0, BOOL * arg1); +typedef void (^_ListenerTrampoline_4)(struct _NSRange arg0, BOOL * arg1); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_5 _1wx624s_wrapListenerBlock_zkjmn1( +_ListenerTrampoline_4 _1wx624s_wrapListenerBlock_zkjmn1( int64_t port, DOBJC_Context* ctx) NS_RETURNS_RETAINED { - __block __weak _ListenerTrampoline_5 weakSelfBlock = nil; - _ListenerTrampoline_5 strongSelfBlock = [^void(struct _NSRange arg0, BOOL * arg1) { + __block __weak _ListenerTrampoline_4 weakSelfBlock = nil; + _ListenerTrampoline_4 strongSelfBlock = [^void(struct _NSRange arg0, BOOL * arg1) { @autoreleasepool { _1wx624s_BlockArgs_zkjmn1* args = [[_1wx624s_BlockArgs_zkjmn1 alloc] init]; args.block = weakSelfBlock; @@ -432,11 +375,11 @@ _ListenerTrampoline_5 _1wx624s_wrapListenerBlock_zkjmn1( return strongSelfBlock; } -typedef void (^_BlockingTrampoline_5)(void * waiter, struct _NSRange arg0, BOOL * arg1); +typedef void (^_BlockingTrampoline_4)(void * waiter, struct _NSRange arg0, BOOL * arg1); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_5 _1wx624s_wrapBlockingBlock_zkjmn1(int64_t port, DOBJC_Context* ctx, +_ListenerTrampoline_4 _1wx624s_wrapBlockingBlock_zkjmn1(int64_t port, DOBJC_Context* ctx, void (*directInvoke)(void*)) NS_RETURNS_RETAINED { - BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_5, ^void(struct _NSRange arg0, BOOL * arg1), { + BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_4, ^void(struct _NSRange arg0, BOOL * arg1), { @autoreleasepool { _1wx624s_BlockArgs_zkjmn1* args = [[_1wx624s_BlockArgs_zkjmn1 alloc] init]; args.block = weakSelfBlock; @@ -466,12 +409,12 @@ @interface _1wx624s_BlockArgs_lmc3p5 : NSObject @implementation _1wx624s_BlockArgs_lmc3p5 @end -typedef void (^_ListenerTrampoline_6)(id arg0, struct _NSRange arg1, struct _NSRange arg2, BOOL * arg3); +typedef void (^_ListenerTrampoline_5)(id arg0, struct _NSRange arg1, struct _NSRange arg2, BOOL * arg3); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_6 _1wx624s_wrapListenerBlock_lmc3p5( +_ListenerTrampoline_5 _1wx624s_wrapListenerBlock_lmc3p5( int64_t port, DOBJC_Context* ctx) NS_RETURNS_RETAINED { - __block __weak _ListenerTrampoline_6 weakSelfBlock = nil; - _ListenerTrampoline_6 strongSelfBlock = [^void(id arg0, struct _NSRange arg1, struct _NSRange arg2, BOOL * arg3) { + __block __weak _ListenerTrampoline_5 weakSelfBlock = nil; + _ListenerTrampoline_5 strongSelfBlock = [^void(id arg0, struct _NSRange arg1, struct _NSRange arg2, BOOL * arg3) { @autoreleasepool { _1wx624s_BlockArgs_lmc3p5* args = [[_1wx624s_BlockArgs_lmc3p5 alloc] init]; args.block = weakSelfBlock; @@ -486,11 +429,11 @@ _ListenerTrampoline_6 _1wx624s_wrapListenerBlock_lmc3p5( return strongSelfBlock; } -typedef void (^_BlockingTrampoline_6)(void * waiter, id arg0, struct _NSRange arg1, struct _NSRange arg2, BOOL * arg3); +typedef void (^_BlockingTrampoline_5)(void * waiter, id arg0, struct _NSRange arg1, struct _NSRange arg2, BOOL * arg3); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_6 _1wx624s_wrapBlockingBlock_lmc3p5(int64_t port, DOBJC_Context* ctx, +_ListenerTrampoline_5 _1wx624s_wrapBlockingBlock_lmc3p5(int64_t port, DOBJC_Context* ctx, void (*directInvoke)(void*)) NS_RETURNS_RETAINED { - BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_6, ^void(id arg0, struct _NSRange arg1, struct _NSRange arg2, BOOL * arg3), { + BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_5, ^void(id arg0, struct _NSRange arg1, struct _NSRange arg2, BOOL * arg3), { @autoreleasepool { _1wx624s_BlockArgs_lmc3p5* args = [[_1wx624s_BlockArgs_lmc3p5 alloc] init]; args.block = weakSelfBlock; @@ -522,12 +465,12 @@ @interface _1wx624s_BlockArgs_t8l8el : NSObject @implementation _1wx624s_BlockArgs_t8l8el @end -typedef void (^_ListenerTrampoline_7)(id arg0, BOOL * arg1); +typedef void (^_ListenerTrampoline_6)(id arg0, BOOL * arg1); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_7 _1wx624s_wrapListenerBlock_t8l8el( +_ListenerTrampoline_6 _1wx624s_wrapListenerBlock_t8l8el( int64_t port, DOBJC_Context* ctx) NS_RETURNS_RETAINED { - __block __weak _ListenerTrampoline_7 weakSelfBlock = nil; - _ListenerTrampoline_7 strongSelfBlock = [^void(id arg0, BOOL * arg1) { + __block __weak _ListenerTrampoline_6 weakSelfBlock = nil; + _ListenerTrampoline_6 strongSelfBlock = [^void(id arg0, BOOL * arg1) { @autoreleasepool { _1wx624s_BlockArgs_t8l8el* args = [[_1wx624s_BlockArgs_t8l8el alloc] init]; args.block = weakSelfBlock; @@ -540,11 +483,11 @@ _ListenerTrampoline_7 _1wx624s_wrapListenerBlock_t8l8el( return strongSelfBlock; } -typedef void (^_BlockingTrampoline_7)(void * waiter, id arg0, BOOL * arg1); +typedef void (^_BlockingTrampoline_6)(void * waiter, id arg0, BOOL * arg1); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_7 _1wx624s_wrapBlockingBlock_t8l8el(int64_t port, DOBJC_Context* ctx, +_ListenerTrampoline_6 _1wx624s_wrapBlockingBlock_t8l8el(int64_t port, DOBJC_Context* ctx, void (*directInvoke)(void*)) NS_RETURNS_RETAINED { - BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_7, ^void(id arg0, BOOL * arg1), { + BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_6, ^void(id arg0, BOOL * arg1), { @autoreleasepool { _1wx624s_BlockArgs_t8l8el* args = [[_1wx624s_BlockArgs_t8l8el alloc] init]; args.block = weakSelfBlock; @@ -571,12 +514,12 @@ @interface _1wx624s_BlockArgs_xtuoz7 : NSObject @implementation _1wx624s_BlockArgs_xtuoz7 @end -typedef void (^_ListenerTrampoline_8)(id arg0); +typedef void (^_ListenerTrampoline_7)(id arg0); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_8 _1wx624s_wrapListenerBlock_xtuoz7( +_ListenerTrampoline_7 _1wx624s_wrapListenerBlock_xtuoz7( int64_t port, DOBJC_Context* ctx) NS_RETURNS_RETAINED { - __block __weak _ListenerTrampoline_8 weakSelfBlock = nil; - _ListenerTrampoline_8 strongSelfBlock = [^void(id arg0) { + __block __weak _ListenerTrampoline_7 weakSelfBlock = nil; + _ListenerTrampoline_7 strongSelfBlock = [^void(id arg0) { @autoreleasepool { _1wx624s_BlockArgs_xtuoz7* args = [[_1wx624s_BlockArgs_xtuoz7 alloc] init]; args.block = weakSelfBlock; @@ -588,11 +531,11 @@ _ListenerTrampoline_8 _1wx624s_wrapListenerBlock_xtuoz7( return strongSelfBlock; } -typedef void (^_BlockingTrampoline_8)(void * waiter, id arg0); +typedef void (^_BlockingTrampoline_7)(void * waiter, id arg0); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_8 _1wx624s_wrapBlockingBlock_xtuoz7(int64_t port, DOBJC_Context* ctx, +_ListenerTrampoline_7 _1wx624s_wrapBlockingBlock_xtuoz7(int64_t port, DOBJC_Context* ctx, void (*directInvoke)(void*)) NS_RETURNS_RETAINED { - BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_8, ^void(id arg0), { + BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_7, ^void(id arg0), { @autoreleasepool { _1wx624s_BlockArgs_xtuoz7* args = [[_1wx624s_BlockArgs_xtuoz7 alloc] init]; args.block = weakSelfBlock; @@ -618,12 +561,12 @@ @interface _1wx624s_BlockArgs_q5jeyk : NSObject @implementation _1wx624s_BlockArgs_q5jeyk @end -typedef void (^_ListenerTrampoline_9)(unsigned long arg0, BOOL * arg1); +typedef void (^_ListenerTrampoline_8)(unsigned long arg0, BOOL * arg1); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_9 _1wx624s_wrapListenerBlock_q5jeyk( +_ListenerTrampoline_8 _1wx624s_wrapListenerBlock_q5jeyk( int64_t port, DOBJC_Context* ctx) NS_RETURNS_RETAINED { - __block __weak _ListenerTrampoline_9 weakSelfBlock = nil; - _ListenerTrampoline_9 strongSelfBlock = [^void(unsigned long arg0, BOOL * arg1) { + __block __weak _ListenerTrampoline_8 weakSelfBlock = nil; + _ListenerTrampoline_8 strongSelfBlock = [^void(unsigned long arg0, BOOL * arg1) { @autoreleasepool { _1wx624s_BlockArgs_q5jeyk* args = [[_1wx624s_BlockArgs_q5jeyk alloc] init]; args.block = weakSelfBlock; @@ -636,11 +579,11 @@ _ListenerTrampoline_9 _1wx624s_wrapListenerBlock_q5jeyk( return strongSelfBlock; } -typedef void (^_BlockingTrampoline_9)(void * waiter, unsigned long arg0, BOOL * arg1); +typedef void (^_BlockingTrampoline_8)(void * waiter, unsigned long arg0, BOOL * arg1); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_9 _1wx624s_wrapBlockingBlock_q5jeyk(int64_t port, DOBJC_Context* ctx, +_ListenerTrampoline_8 _1wx624s_wrapBlockingBlock_q5jeyk(int64_t port, DOBJC_Context* ctx, void (*directInvoke)(void*)) NS_RETURNS_RETAINED { - BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_9, ^void(unsigned long arg0, BOOL * arg1), { + BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_8, ^void(unsigned long arg0, BOOL * arg1), { @autoreleasepool { _1wx624s_BlockArgs_q5jeyk* args = [[_1wx624s_BlockArgs_q5jeyk alloc] init]; args.block = weakSelfBlock; @@ -669,12 +612,12 @@ @interface _1wx624s_BlockArgs_rnu2c5 : NSObject @implementation _1wx624s_BlockArgs_rnu2c5 @end -typedef void (^_ListenerTrampoline_10)(id arg0, BOOL arg1, id arg2); +typedef void (^_ListenerTrampoline_9)(id arg0, BOOL arg1, id arg2); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_10 _1wx624s_wrapListenerBlock_rnu2c5( +_ListenerTrampoline_9 _1wx624s_wrapListenerBlock_rnu2c5( int64_t port, DOBJC_Context* ctx) NS_RETURNS_RETAINED { - __block __weak _ListenerTrampoline_10 weakSelfBlock = nil; - _ListenerTrampoline_10 strongSelfBlock = [^void(id arg0, BOOL arg1, id arg2) { + __block __weak _ListenerTrampoline_9 weakSelfBlock = nil; + _ListenerTrampoline_9 strongSelfBlock = [^void(id arg0, BOOL arg1, id arg2) { @autoreleasepool { _1wx624s_BlockArgs_rnu2c5* args = [[_1wx624s_BlockArgs_rnu2c5 alloc] init]; args.block = weakSelfBlock; @@ -688,11 +631,11 @@ _ListenerTrampoline_10 _1wx624s_wrapListenerBlock_rnu2c5( return strongSelfBlock; } -typedef void (^_BlockingTrampoline_10)(void * waiter, id arg0, BOOL arg1, id arg2); +typedef void (^_BlockingTrampoline_9)(void * waiter, id arg0, BOOL arg1, id arg2); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_10 _1wx624s_wrapBlockingBlock_rnu2c5(int64_t port, DOBJC_Context* ctx, +_ListenerTrampoline_9 _1wx624s_wrapBlockingBlock_rnu2c5(int64_t port, DOBJC_Context* ctx, void (*directInvoke)(void*)) NS_RETURNS_RETAINED { - BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_10, ^void(id arg0, BOOL arg1, id arg2), { + BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_9, ^void(id arg0, BOOL arg1, id arg2), { @autoreleasepool { _1wx624s_BlockArgs_rnu2c5* args = [[_1wx624s_BlockArgs_rnu2c5 alloc] init]; args.block = weakSelfBlock; @@ -721,12 +664,12 @@ @interface _1wx624s_BlockArgs_ovsamd : NSObject @implementation _1wx624s_BlockArgs_ovsamd @end -typedef void (^_ListenerTrampoline_11)(void * arg0); +typedef void (^_ListenerTrampoline_10)(void * arg0); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_11 _1wx624s_wrapListenerBlock_ovsamd( +_ListenerTrampoline_10 _1wx624s_wrapListenerBlock_ovsamd( int64_t port, DOBJC_Context* ctx) NS_RETURNS_RETAINED { - __block __weak _ListenerTrampoline_11 weakSelfBlock = nil; - _ListenerTrampoline_11 strongSelfBlock = [^void(void * arg0) { + __block __weak _ListenerTrampoline_10 weakSelfBlock = nil; + _ListenerTrampoline_10 strongSelfBlock = [^void(void * arg0) { @autoreleasepool { _1wx624s_BlockArgs_ovsamd* args = [[_1wx624s_BlockArgs_ovsamd alloc] init]; args.block = weakSelfBlock; @@ -738,11 +681,11 @@ _ListenerTrampoline_11 _1wx624s_wrapListenerBlock_ovsamd( return strongSelfBlock; } -typedef void (^_BlockingTrampoline_11)(void * waiter, void * arg0); +typedef void (^_BlockingTrampoline_10)(void * waiter, void * arg0); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_11 _1wx624s_wrapBlockingBlock_ovsamd(int64_t port, DOBJC_Context* ctx, +_ListenerTrampoline_10 _1wx624s_wrapBlockingBlock_ovsamd(int64_t port, DOBJC_Context* ctx, void (*directInvoke)(void*)) NS_RETURNS_RETAINED { - BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_11, ^void(void * arg0), { + BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_10, ^void(void * arg0), { @autoreleasepool { _1wx624s_BlockArgs_ovsamd* args = [[_1wx624s_BlockArgs_ovsamd alloc] init]; args.block = weakSelfBlock; @@ -774,12 +717,12 @@ @interface _1wx624s_BlockArgs_18v1jvf : NSObject @implementation _1wx624s_BlockArgs_18v1jvf @end -typedef void (^_ListenerTrampoline_12)(void * arg0, id arg1); +typedef void (^_ListenerTrampoline_11)(void * arg0, id arg1); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_12 _1wx624s_wrapListenerBlock_18v1jvf( +_ListenerTrampoline_11 _1wx624s_wrapListenerBlock_18v1jvf( int64_t port, DOBJC_Context* ctx) NS_RETURNS_RETAINED { - __block __weak _ListenerTrampoline_12 weakSelfBlock = nil; - _ListenerTrampoline_12 strongSelfBlock = [^void(void * arg0, id arg1) { + __block __weak _ListenerTrampoline_11 weakSelfBlock = nil; + _ListenerTrampoline_11 strongSelfBlock = [^void(void * arg0, id arg1) { @autoreleasepool { _1wx624s_BlockArgs_18v1jvf* args = [[_1wx624s_BlockArgs_18v1jvf alloc] init]; args.block = weakSelfBlock; @@ -792,11 +735,11 @@ _ListenerTrampoline_12 _1wx624s_wrapListenerBlock_18v1jvf( return strongSelfBlock; } -typedef void (^_BlockingTrampoline_12)(void * waiter, void * arg0, id arg1); +typedef void (^_BlockingTrampoline_11)(void * waiter, void * arg0, id arg1); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_12 _1wx624s_wrapBlockingBlock_18v1jvf(int64_t port, DOBJC_Context* ctx, +_ListenerTrampoline_11 _1wx624s_wrapBlockingBlock_18v1jvf(int64_t port, DOBJC_Context* ctx, void (*directInvoke)(void*)) NS_RETURNS_RETAINED { - BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_12, ^void(void * arg0, id arg1), { + BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_11, ^void(void * arg0, id arg1), { @autoreleasepool { _1wx624s_BlockArgs_18v1jvf* args = [[_1wx624s_BlockArgs_18v1jvf alloc] init]; args.block = weakSelfBlock; @@ -831,12 +774,12 @@ @interface _1wx624s_BlockArgs_1q8ia8l : NSObject @implementation _1wx624s_BlockArgs_1q8ia8l @end -typedef void (^_ListenerTrampoline_13)(void * arg0, struct _NSRange arg1, BOOL * arg2); +typedef void (^_ListenerTrampoline_12)(void * arg0, struct _NSRange arg1, BOOL * arg2); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_13 _1wx624s_wrapListenerBlock_1q8ia8l( +_ListenerTrampoline_12 _1wx624s_wrapListenerBlock_1q8ia8l( int64_t port, DOBJC_Context* ctx) NS_RETURNS_RETAINED { - __block __weak _ListenerTrampoline_13 weakSelfBlock = nil; - _ListenerTrampoline_13 strongSelfBlock = [^void(void * arg0, struct _NSRange arg1, BOOL * arg2) { + __block __weak _ListenerTrampoline_12 weakSelfBlock = nil; + _ListenerTrampoline_12 strongSelfBlock = [^void(void * arg0, struct _NSRange arg1, BOOL * arg2) { @autoreleasepool { _1wx624s_BlockArgs_1q8ia8l* args = [[_1wx624s_BlockArgs_1q8ia8l alloc] init]; args.block = weakSelfBlock; @@ -850,11 +793,11 @@ _ListenerTrampoline_13 _1wx624s_wrapListenerBlock_1q8ia8l( return strongSelfBlock; } -typedef void (^_BlockingTrampoline_13)(void * waiter, void * arg0, struct _NSRange arg1, BOOL * arg2); +typedef void (^_BlockingTrampoline_12)(void * waiter, void * arg0, struct _NSRange arg1, BOOL * arg2); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_13 _1wx624s_wrapBlockingBlock_1q8ia8l(int64_t port, DOBJC_Context* ctx, +_ListenerTrampoline_12 _1wx624s_wrapBlockingBlock_1q8ia8l(int64_t port, DOBJC_Context* ctx, void (*directInvoke)(void*)) NS_RETURNS_RETAINED { - BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_13, ^void(void * arg0, struct _NSRange arg1, BOOL * arg2), { + BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_12, ^void(void * arg0, struct _NSRange arg1, BOOL * arg2), { @autoreleasepool { _1wx624s_BlockArgs_1q8ia8l* args = [[_1wx624s_BlockArgs_1q8ia8l alloc] init]; args.block = weakSelfBlock; @@ -885,12 +828,12 @@ @interface _1wx624s_BlockArgs_hoampi : NSObject @implementation _1wx624s_BlockArgs_hoampi @end -typedef void (^_ListenerTrampoline_14)(void * arg0, id arg1, NSStreamEvent arg2); +typedef void (^_ListenerTrampoline_13)(void * arg0, id arg1, NSStreamEvent arg2); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_14 _1wx624s_wrapListenerBlock_hoampi( +_ListenerTrampoline_13 _1wx624s_wrapListenerBlock_hoampi( int64_t port, DOBJC_Context* ctx) NS_RETURNS_RETAINED { - __block __weak _ListenerTrampoline_14 weakSelfBlock = nil; - _ListenerTrampoline_14 strongSelfBlock = [^void(void * arg0, id arg1, NSStreamEvent arg2) { + __block __weak _ListenerTrampoline_13 weakSelfBlock = nil; + _ListenerTrampoline_13 strongSelfBlock = [^void(void * arg0, id arg1, NSStreamEvent arg2) { @autoreleasepool { _1wx624s_BlockArgs_hoampi* args = [[_1wx624s_BlockArgs_hoampi alloc] init]; args.block = weakSelfBlock; @@ -904,11 +847,11 @@ _ListenerTrampoline_14 _1wx624s_wrapListenerBlock_hoampi( return strongSelfBlock; } -typedef void (^_BlockingTrampoline_14)(void * waiter, void * arg0, id arg1, NSStreamEvent arg2); +typedef void (^_BlockingTrampoline_13)(void * waiter, void * arg0, id arg1, NSStreamEvent arg2); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_14 _1wx624s_wrapBlockingBlock_hoampi(int64_t port, DOBJC_Context* ctx, +_ListenerTrampoline_13 _1wx624s_wrapBlockingBlock_hoampi(int64_t port, DOBJC_Context* ctx, void (*directInvoke)(void*)) NS_RETURNS_RETAINED { - BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_14, ^void(void * arg0, id arg1, NSStreamEvent arg2), { + BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_13, ^void(void * arg0, id arg1, NSStreamEvent arg2), { @autoreleasepool { _1wx624s_BlockArgs_hoampi* args = [[_1wx624s_BlockArgs_hoampi alloc] init]; args.block = weakSelfBlock; @@ -947,12 +890,12 @@ @interface _1wx624s_BlockArgs_1sr3ozv : NSObject @implementation _1wx624s_BlockArgs_1sr3ozv @end -typedef void (^_ListenerTrampoline_15)(void * arg0, id arg1, id arg2, id arg3, void * arg4); +typedef void (^_ListenerTrampoline_14)(void * arg0, id arg1, id arg2, id arg3, void * arg4); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_15 _1wx624s_wrapListenerBlock_1sr3ozv( +_ListenerTrampoline_14 _1wx624s_wrapListenerBlock_1sr3ozv( int64_t port, DOBJC_Context* ctx) NS_RETURNS_RETAINED { - __block __weak _ListenerTrampoline_15 weakSelfBlock = nil; - _ListenerTrampoline_15 strongSelfBlock = [^void(void * arg0, id arg1, id arg2, id arg3, void * arg4) { + __block __weak _ListenerTrampoline_14 weakSelfBlock = nil; + _ListenerTrampoline_14 strongSelfBlock = [^void(void * arg0, id arg1, id arg2, id arg3, void * arg4) { @autoreleasepool { _1wx624s_BlockArgs_1sr3ozv* args = [[_1wx624s_BlockArgs_1sr3ozv alloc] init]; args.block = weakSelfBlock; @@ -968,11 +911,11 @@ _ListenerTrampoline_15 _1wx624s_wrapListenerBlock_1sr3ozv( return strongSelfBlock; } -typedef void (^_BlockingTrampoline_15)(void * waiter, void * arg0, id arg1, id arg2, id arg3, void * arg4); +typedef void (^_BlockingTrampoline_14)(void * waiter, void * arg0, id arg1, id arg2, id arg3, void * arg4); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_15 _1wx624s_wrapBlockingBlock_1sr3ozv(int64_t port, DOBJC_Context* ctx, +_ListenerTrampoline_14 _1wx624s_wrapBlockingBlock_1sr3ozv(int64_t port, DOBJC_Context* ctx, void (*directInvoke)(void*)) NS_RETURNS_RETAINED { - BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_15, ^void(void * arg0, id arg1, id arg2, id arg3, void * arg4), { + BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_14, ^void(void * arg0, id arg1, id arg2, id arg3, void * arg4), { @autoreleasepool { _1wx624s_BlockArgs_1sr3ozv* args = [[_1wx624s_BlockArgs_1sr3ozv alloc] init]; args.block = weakSelfBlock; @@ -1012,12 +955,12 @@ @interface _1wx624s_BlockArgs_zuf90e : NSObject @implementation _1wx624s_BlockArgs_zuf90e @end -typedef void (^_ListenerTrampoline_16)(void * arg0, unsigned long arg1); +typedef void (^_ListenerTrampoline_15)(void * arg0, unsigned long arg1); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_16 _1wx624s_wrapListenerBlock_zuf90e( +_ListenerTrampoline_15 _1wx624s_wrapListenerBlock_zuf90e( int64_t port, DOBJC_Context* ctx) NS_RETURNS_RETAINED { - __block __weak _ListenerTrampoline_16 weakSelfBlock = nil; - _ListenerTrampoline_16 strongSelfBlock = [^void(void * arg0, unsigned long arg1) { + __block __weak _ListenerTrampoline_15 weakSelfBlock = nil; + _ListenerTrampoline_15 strongSelfBlock = [^void(void * arg0, unsigned long arg1) { @autoreleasepool { _1wx624s_BlockArgs_zuf90e* args = [[_1wx624s_BlockArgs_zuf90e alloc] init]; args.block = weakSelfBlock; @@ -1030,11 +973,11 @@ _ListenerTrampoline_16 _1wx624s_wrapListenerBlock_zuf90e( return strongSelfBlock; } -typedef void (^_BlockingTrampoline_16)(void * waiter, void * arg0, unsigned long arg1); +typedef void (^_BlockingTrampoline_15)(void * waiter, void * arg0, unsigned long arg1); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_16 _1wx624s_wrapBlockingBlock_zuf90e(int64_t port, DOBJC_Context* ctx, +_ListenerTrampoline_15 _1wx624s_wrapBlockingBlock_zuf90e(int64_t port, DOBJC_Context* ctx, void (*directInvoke)(void*)) NS_RETURNS_RETAINED { - BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_16, ^void(void * arg0, unsigned long arg1), { + BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_15, ^void(void * arg0, unsigned long arg1), { @autoreleasepool { _1wx624s_BlockArgs_zuf90e* args = [[_1wx624s_BlockArgs_zuf90e alloc] init]; args.block = weakSelfBlock; @@ -1053,66 +996,6 @@ _ListenerTrampoline_16 _1wx624s_wrapBlockingBlock_zuf90e(int64_t port, DOBJC_Con }); } -__attribute__((visibility("default"))) -@interface _1wx624s_BlockArgs_fjrv01 : NSObject -@property (copy) id block; -@property void * arg0; -@property (strong) id arg1; -@property (strong) id arg2; -@end -@implementation _1wx624s_BlockArgs_fjrv01 -@end - -typedef void (^_ListenerTrampoline_17)(void * arg0, id arg1, id arg2); -__attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_17 _1wx624s_wrapListenerBlock_fjrv01( - int64_t port, DOBJC_Context* ctx) NS_RETURNS_RETAINED { - __block __weak _ListenerTrampoline_17 weakSelfBlock = nil; - _ListenerTrampoline_17 strongSelfBlock = [^void(void * arg0, id arg1, id arg2) { - @autoreleasepool { - _1wx624s_BlockArgs_fjrv01* args = [[_1wx624s_BlockArgs_fjrv01 alloc] init]; - args.block = weakSelfBlock; - args.arg0 = arg0; - args.arg1 = arg1; - args.arg2 = arg2; - ctx->invokeListenerPortBlock(port, (__bridge_retained void*)args); - } - } copy]; - weakSelfBlock = strongSelfBlock; - return strongSelfBlock; -} - -typedef void (^_BlockingTrampoline_17)(void * waiter, void * arg0, id arg1, id arg2); -__attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_17 _1wx624s_wrapBlockingBlock_fjrv01(int64_t port, DOBJC_Context* ctx, - void (*directInvoke)(void*)) NS_RETURNS_RETAINED { - BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_17, ^void(void * arg0, id arg1, id arg2), { - @autoreleasepool { - _1wx624s_BlockArgs_fjrv01* args = [[_1wx624s_BlockArgs_fjrv01 alloc] init]; - args.block = weakSelfBlock; - args.arg0 = arg0; - args.arg1 = arg1; - args.arg2 = arg2; - directInvoke((__bridge_retained void*)args); - } - }, { - @autoreleasepool { - _1wx624s_BlockArgs_fjrv01* args = [[_1wx624s_BlockArgs_fjrv01 alloc] init]; - args.block = weakSelfBlock; - args.arg0 = arg0; - args.arg1 = arg1; - args.arg2 = arg2; - ctx->invokeBlockingPortBlock(port, (__bridge_retained void*)args, waiter); - } - }); -} - -typedef void (^_ProtocolTrampoline_13)(void * sel, id arg1, id arg2); -__attribute__((visibility("default"))) __attribute__((used)) -void _1wx624s_protocolTrampoline_fjrv01(id target, void * sel, id arg1, id arg2) { - return ((_ProtocolTrampoline_13)((id (*)(id, SEL, SEL))objc_msgSend)(target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1, arg2); -} - __attribute__((visibility("default"))) @interface _1wx624s_BlockArgs_1p9ui4q : NSObject @property (copy) id block; @@ -1123,12 +1006,12 @@ @interface _1wx624s_BlockArgs_1p9ui4q : NSObject @implementation _1wx624s_BlockArgs_1p9ui4q @end -typedef void (^_ListenerTrampoline_18)(id arg0, unsigned long arg1, BOOL * arg2); +typedef void (^_ListenerTrampoline_16)(id arg0, unsigned long arg1, BOOL * arg2); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_18 _1wx624s_wrapListenerBlock_1p9ui4q( +_ListenerTrampoline_16 _1wx624s_wrapListenerBlock_1p9ui4q( int64_t port, DOBJC_Context* ctx) NS_RETURNS_RETAINED { - __block __weak _ListenerTrampoline_18 weakSelfBlock = nil; - _ListenerTrampoline_18 strongSelfBlock = [^void(id arg0, unsigned long arg1, BOOL * arg2) { + __block __weak _ListenerTrampoline_16 weakSelfBlock = nil; + _ListenerTrampoline_16 strongSelfBlock = [^void(id arg0, unsigned long arg1, BOOL * arg2) { @autoreleasepool { _1wx624s_BlockArgs_1p9ui4q* args = [[_1wx624s_BlockArgs_1p9ui4q alloc] init]; args.block = weakSelfBlock; @@ -1142,11 +1025,11 @@ _ListenerTrampoline_18 _1wx624s_wrapListenerBlock_1p9ui4q( return strongSelfBlock; } -typedef void (^_BlockingTrampoline_18)(void * waiter, id arg0, unsigned long arg1, BOOL * arg2); +typedef void (^_BlockingTrampoline_16)(void * waiter, id arg0, unsigned long arg1, BOOL * arg2); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_18 _1wx624s_wrapBlockingBlock_1p9ui4q(int64_t port, DOBJC_Context* ctx, +_ListenerTrampoline_16 _1wx624s_wrapBlockingBlock_1p9ui4q(int64_t port, DOBJC_Context* ctx, void (*directInvoke)(void*)) NS_RETURNS_RETAINED { - BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_18, ^void(id arg0, unsigned long arg1, BOOL * arg2), { + BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_16, ^void(id arg0, unsigned long arg1, BOOL * arg2), { @autoreleasepool { _1wx624s_BlockArgs_1p9ui4q* args = [[_1wx624s_BlockArgs_1p9ui4q alloc] init]; args.block = weakSelfBlock; @@ -1176,12 +1059,12 @@ @interface _1wx624s_BlockArgs_vhbh5h : NSObject @implementation _1wx624s_BlockArgs_vhbh5h @end -typedef void (^_ListenerTrampoline_19)(unsigned short * arg0, unsigned long arg1); +typedef void (^_ListenerTrampoline_17)(unsigned short * arg0, unsigned long arg1); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_19 _1wx624s_wrapListenerBlock_vhbh5h( +_ListenerTrampoline_17 _1wx624s_wrapListenerBlock_vhbh5h( int64_t port, DOBJC_Context* ctx) NS_RETURNS_RETAINED { - __block __weak _ListenerTrampoline_19 weakSelfBlock = nil; - _ListenerTrampoline_19 strongSelfBlock = [^void(unsigned short * arg0, unsigned long arg1) { + __block __weak _ListenerTrampoline_17 weakSelfBlock = nil; + _ListenerTrampoline_17 strongSelfBlock = [^void(unsigned short * arg0, unsigned long arg1) { @autoreleasepool { _1wx624s_BlockArgs_vhbh5h* args = [[_1wx624s_BlockArgs_vhbh5h alloc] init]; args.block = weakSelfBlock; @@ -1194,11 +1077,11 @@ _ListenerTrampoline_19 _1wx624s_wrapListenerBlock_vhbh5h( return strongSelfBlock; } -typedef void (^_BlockingTrampoline_19)(void * waiter, unsigned short * arg0, unsigned long arg1); +typedef void (^_BlockingTrampoline_17)(void * waiter, unsigned short * arg0, unsigned long arg1); __attribute__((visibility("default"))) __attribute__((used)) -_ListenerTrampoline_19 _1wx624s_wrapBlockingBlock_vhbh5h(int64_t port, DOBJC_Context* ctx, +_ListenerTrampoline_17 _1wx624s_wrapBlockingBlock_vhbh5h(int64_t port, DOBJC_Context* ctx, void (*directInvoke)(void*)) NS_RETURNS_RETAINED { - BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_19, ^void(unsigned short * arg0, unsigned long arg1), { + BLOCKING_BLOCK_IMPL(ctx, _ListenerTrampoline_17, ^void(unsigned short * arg0, unsigned long arg1), { @autoreleasepool { _1wx624s_BlockArgs_vhbh5h* args = [[_1wx624s_BlockArgs_vhbh5h alloc] init]; args.block = weakSelfBlock; @@ -1217,34 +1100,34 @@ _ListenerTrampoline_19 _1wx624s_wrapBlockingBlock_vhbh5h(int64_t port, DOBJC_Con }); } -typedef id (^_ProtocolTrampoline_14)(void * sel, id arg1); +typedef id (^_ProtocolTrampoline_13)(void * sel, id arg1); __attribute__((visibility("default"))) __attribute__((used)) id _1wx624s_protocolTrampoline_xr62hr(id target, void * sel, id arg1) { - return ((_ProtocolTrampoline_14)((id (*)(id, SEL, SEL))objc_msgSend)(target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1); + return ((_ProtocolTrampoline_13)((id (*)(id, SEL, SEL))objc_msgSend)(target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1); } -typedef id (^_ProtocolTrampoline_15)(void * sel, struct _NSZone * arg1); +typedef id (^_ProtocolTrampoline_14)(void * sel, struct _NSZone * arg1); __attribute__((visibility("default"))) __attribute__((used)) id _1wx624s_protocolTrampoline_18nsem0(id target, void * sel, struct _NSZone * arg1) { - return ((_ProtocolTrampoline_15)((id (*)(id, SEL, SEL))objc_msgSend)(target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1); + return ((_ProtocolTrampoline_14)((id (*)(id, SEL, SEL))objc_msgSend)(target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1); } -typedef id (^_ProtocolTrampoline_16)(void * sel, struct objc_selector * arg1); +typedef id (^_ProtocolTrampoline_15)(void * sel, struct objc_selector * arg1); __attribute__((visibility("default"))) __attribute__((used)) id _1wx624s_protocolTrampoline_50as9u(id target, void * sel, struct objc_selector * arg1) { - return ((_ProtocolTrampoline_16)((id (*)(id, SEL, SEL))objc_msgSend)(target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1); + return ((_ProtocolTrampoline_15)((id (*)(id, SEL, SEL))objc_msgSend)(target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1); } -typedef id (^_ProtocolTrampoline_17)(void * sel, struct objc_selector * arg1, id arg2); +typedef id (^_ProtocolTrampoline_16)(void * sel, struct objc_selector * arg1, id arg2); __attribute__((visibility("default"))) __attribute__((used)) id _1wx624s_protocolTrampoline_1mllhpc(id target, void * sel, struct objc_selector * arg1, id arg2) { - return ((_ProtocolTrampoline_17)((id (*)(id, SEL, SEL))objc_msgSend)(target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1, arg2); + return ((_ProtocolTrampoline_16)((id (*)(id, SEL, SEL))objc_msgSend)(target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1, arg2); } -typedef id (^_ProtocolTrampoline_18)(void * sel, struct objc_selector * arg1, id arg2, id arg3); +typedef id (^_ProtocolTrampoline_17)(void * sel, struct objc_selector * arg1, id arg2, id arg3); __attribute__((visibility("default"))) __attribute__((used)) id _1wx624s_protocolTrampoline_c7gk2u(id target, void * sel, struct objc_selector * arg1, id arg2, id arg3) { - return ((_ProtocolTrampoline_18)((id (*)(id, SEL, SEL))objc_msgSend)(target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1, arg2, arg3); + return ((_ProtocolTrampoline_17)((id (*)(id, SEL, SEL))objc_msgSend)(target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1, arg2, arg3); } __attribute__((visibility("default"))) __attribute__((used)) diff --git a/pkgs/objective_c/tool/generate_code.dart b/pkgs/objective_c/tool/generate_code.dart index 744402715c..611fd10013 100644 --- a/pkgs/objective_c/tool/generate_code.dart +++ b/pkgs/objective_c/tool/generate_code.dart @@ -336,8 +336,8 @@ void generateObjCBindings(Uri root) { 'NSSet', 'NSStream', 'NSString', - 'NSTimer', 'NSThread', + 'NSTimer', 'NSURL', 'NSURLHandle', 'NSValue', @@ -449,11 +449,18 @@ void generateObjCBindings(Uri root) { ], ), // ignore: deprecated_member_use - objectiveC: const ObjectiveC(generateForPackageObjectiveC: true), + objectiveC: ObjectiveC( + generateForPackageObjectiveC: true, + externalVersions: ExternalVersions( + ios: Versions(min: Version(12, 0, 0)), + macos: Versions(min: Version(10, 14, 0)), + ), + ), visitors: [ Visitor.callback( visitFunc: (node) => node.isIncluded = false, visitObjCInterface: (node) { + node.includeCategories = false; if (interfaces.contains(node.originalName)) { node.isIncluded = true; node.name = renameInterface(node.originalName); @@ -496,6 +503,8 @@ void generateObjCBindings(Uri root) { visitTypealias: (node) { if (node.originalName == 'CFStringRef') { node.isIncluded = true; + } else { + node.isIncluded = false; } }, visitGlobal: (node) => node.isIncluded = false, From 4f3aaccd437bb12a00a9843f781c51f9393a9079 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Mon, 3 Aug 2026 15:20:30 +1000 Subject: [PATCH 26/37] fixes --- .../lib/src/code_generator/func_type.dart | 3 +- pkgs/ffigen/tool/diff_bindings_with_main.sh | 2 +- .../src/objective_c_bindings_generated.dart | 74 +++++++++---------- 3 files changed, 39 insertions(+), 40 deletions(-) diff --git a/pkgs/ffigen/lib/src/code_generator/func_type.dart b/pkgs/ffigen/lib/src/code_generator/func_type.dart index ba2e603671..e21ba874fc 100644 --- a/pkgs/ffigen/lib/src/code_generator/func_type.dart +++ b/pkgs/ffigen/lib/src/code_generator/func_type.dart @@ -82,8 +82,7 @@ class FunctionType extends Type with HasLocalScope { (p) => p.type.getNativeType(context), ); final returnTypeStr = returnType.getNativeType(context); - final argStr = arg.isEmpty ? 'void' : arg.join(', '); - return '$returnTypeStr (*$varName)($argStr)'; + return '$returnTypeStr (*$varName)(${arg.join(', ')})'; } @override diff --git a/pkgs/ffigen/tool/diff_bindings_with_main.sh b/pkgs/ffigen/tool/diff_bindings_with_main.sh index 98663a8697..ce90a093f5 100755 --- a/pkgs/ffigen/tool/diff_bindings_with_main.sh +++ b/pkgs/ffigen/tool/diff_bindings_with_main.sh @@ -63,7 +63,7 @@ else fi DIFF_OUTPUT=$("${DIFF_CMD[@]}" \ - <("${DART_CMD[@]}" <(git show "$MAIN_REF:$REPO_RELATIVE_PATH")) \ + <(git show "$MAIN_REF:$REPO_RELATIVE_PATH" | "${DART_CMD[@]}" -) \ <("${DART_CMD[@]}" "$FILE_PATH") || true) if [ -z "$DIFF_OUTPUT" ]; then 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 c4902c8b6b..899b71b37a 100644 --- a/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart +++ b/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart @@ -10061,7 +10061,7 @@ extension NSInvocation$Methods on NSInvocation { ffi.Pointer> imp, ) { final _$$ref = object$.ref; - _objc_msgSend_agmudd(_$$ref.pointer, _sel_invokeUsingIMP_, imp); + _objc_msgSend_hk6irj(_$$ref.pointer, _sel_invokeUsingIMP_, imp); } /// invokeWithTarget: @@ -15367,7 +15367,7 @@ extension type NSObject._(objc.ObjCObject object$) iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); - return _objc_msgSend_13lsk7w( + return _objc_msgSend_1pa9f4m( _class_NSObject, _sel_instanceMethodForSelector_, aSelector, @@ -15618,7 +15618,7 @@ extension NSObject$Methods on NSObject { iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); - return _objc_msgSend_13lsk7w( + return _objc_msgSend_1pa9f4m( _$$ref.pointer, _sel_methodForSelector_, aSelector, @@ -37165,23 +37165,6 @@ final _objc_msgSend_134vhyh = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_13lsk7w = 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_13mclwd = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -38801,6 +38784,23 @@ final _objc_msgSend_1p4gbjy = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_1pa9f4m = 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_1pl40xc = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -39944,23 +39944,6 @@ final _objc_msgSend_a3wp08 = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_agmudd = 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_arew0j = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -40501,6 +40484,23 @@ final _objc_msgSend_hiwitm = objc.msgSendPointer bool, ) >(); +final _objc_msgSend_hk6irj = 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_hwm8nu = objc.msgSendPointer .cast< ffi.NativeFunction< From e60f0c887c0efd9e62c6360d1040b3dabc93727a Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Mon, 3 Aug 2026 15:28:19 +1000 Subject: [PATCH 27/37] clean up --- .../lib/src/code_generator/objc_category.dart | 5 ++-- .../src/code_generator/objc_interface.dart | 15 +++-------- .../lib/src/code_generator/objc_methods.dart | 2 +- .../lib/src/code_generator/objc_protocol.dart | 27 ++++++------------- .../src/visitor/fill_method_dependencies.dart | 12 +++++++++ 5 files changed, 27 insertions(+), 34 deletions(-) diff --git a/pkgs/ffigen/lib/src/code_generator/objc_category.dart b/pkgs/ffigen/lib/src/code_generator/objc_category.dart index 17e2683724..85b967aec0 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_category.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_category.dart @@ -15,7 +15,7 @@ class ObjCCategory extends NoLookUpBinding with ObjCMethods, HasLocalScope { @override final Context context; final ObjCInterface parent; - final NoLookUpBinding classObject; + ObjCClassGlobal? get classObject => parent.classObject; final protocols = []; @@ -29,8 +29,7 @@ class ObjCCategory extends NoLookUpBinding with ObjCMethods, HasLocalScope { super.dartDoc, required this.context, required this.apiAvailability, - }) : classObject = parent.classObject, - super(symbol: Symbol(name ?? originalName, SymbolKind.klass)); + }) : super(symbol: Symbol(name ?? originalName, SymbolKind.klass)); void addProtocol(ObjCProtocol? proto) { if (proto != null) protocols.add(proto); diff --git a/pkgs/ffigen/lib/src/code_generator/objc_interface.dart b/pkgs/ffigen/lib/src/code_generator/objc_interface.dart index cb0b047a76..fc5d95da4d 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_interface.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_interface.dart @@ -19,14 +19,9 @@ class ObjCInterface extends BindingType with ObjCMethods, HasLocalScope { bool filled = false; bool includeCategories = true; - String? _module; - String? get module => _module; - set module(String? value) { - _module = value; - classObject = ObjCClassGlobal('_class_$originalName', originalName, value); - } + String? module; - late NoLookUpBinding classObject; + ObjCClassGlobal? classObject; late final ObjCInternalGlobal _isKindOfClass; late final ObjCMsgSendFunc _isKindOfClassMsgSend; final protocols = []; @@ -41,7 +36,7 @@ class ObjCInterface extends BindingType with ObjCMethods, HasLocalScope { super.usr, required String super.originalName, String? name, - String? module, + this.module, super.dartDoc, required this.apiAvailability, required this.context, @@ -54,8 +49,6 @@ class ObjCInterface extends BindingType with ObjCMethods, HasLocalScope { name ?? originalName, ) { - this.module = module; - classObject = ObjCClassGlobal('_class_$name', originalName, module); _isKindOfClass = context.objCBuiltInFunctions.getSelObject( 'isKindOfClass:', ); @@ -194,7 +187,7 @@ ${generateInstanceMethodBindings(w, this)} context, 'obj.ref.pointer', _isKindOfClass.name, - [classObject.name], + [classObject!.name], ); s.write(''' diff --git a/pkgs/ffigen/lib/src/code_generator/objc_methods.dart b/pkgs/ffigen/lib/src/code_generator/objc_methods.dart index 521882e53f..57a03988d1 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_methods.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_methods.dart @@ -457,7 +457,7 @@ class ObjCMethod extends AstNode with HasLocalScope { // Evaluate targetStr and msgSendParams first to populate localVars. late String targetStr; if (isClassMethod) { - targetStr = (target as ObjCInterface).classObject.name; + targetStr = (target as ObjCInterface).classObject!.name; } else { targetStr = target.convertDartTypeToFfiDartType( context, diff --git a/pkgs/ffigen/lib/src/code_generator/objc_protocol.dart b/pkgs/ffigen/lib/src/code_generator/objc_protocol.dart index 4a88596533..37b197a09e 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_protocol.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_protocol.dart @@ -17,19 +17,9 @@ class ObjCProtocol extends BindingType with ObjCMethods, HasLocalScope { final Context context; final superProtocols = []; final Symbol loaderSymbol; - String? _module; - String? get module => _module; - set module(String? value) { - _module = value; - _protocolPointer = ObjCProtocolGlobal( - '_protocol_$originalName', - originalName, - value, - loaderSymbol, - ); - } + String? module; - late ObjCProtocolGlobal _protocolPointer; + ObjCProtocolGlobal? protocolPointer; late final ObjCInternalGlobal _conformsTo; late final ObjCMsgSendFunc _conformsToMsgSend; final ApiAvailability apiAvailability; @@ -41,7 +31,7 @@ class ObjCProtocol extends BindingType with ObjCMethods, HasLocalScope { super.usr, required String super.originalName, String? name, - String? module, + this.module, super.dartDoc, required this.apiAvailability, required this.context, @@ -57,7 +47,6 @@ class ObjCProtocol extends BindingType with ObjCMethods, HasLocalScope { name ?? originalName, ) { - this.module = module; _conformsTo = context.objCBuiltInFunctions.getSelObject( 'conformsToProtocol:', ); @@ -130,7 +119,7 @@ extension type $name._($protocolBase object\$) implements ${sp.join(', ')} { context, 'obj.ref.pointer', _conformsTo.name, - [_protocolPointer.name], + [protocolPointer!.name], ); s.write(''' @@ -223,11 +212,11 @@ ${generateInstanceMethodBindings(w, this)} methodFields.write(makeDartDoc(method.dartDoc ?? method.originalName)); methodFields.write('''static final $fieldName = $methodClass<$funcType>( - ${_protocolPointer.name}, + ${protocolPointer!.name}, ${method.selObject.name}, ${_trampolineAddress(block)}, $getSignature( - ${_protocolPointer.name}, + ${protocolPointer!.name}, ${method.selObject.name}, isRequired: ${method.isRequired}, isInstanceMethod: ${method.isInstanceMethod}, @@ -244,7 +233,7 @@ ${generateInstanceMethodBindings(w, this)} ''' /// Returns the [$protocolClass] object for this protocol. static $protocolClass get \$protocol => - $protocolClass.fromPointer(${_protocolPointer.name}.cast()); + $protocolClass.fromPointer(${protocolPointer!.name}.cast()); /// Builds an object that implements the $originalName protocol. To implement /// multiple protocols, use [addToBuilder] or [$protocolBuilder] directly. @@ -461,7 +450,7 @@ Protocol* ${loaderSymbol.name}(void) { return @protocol($originalName); } super.visitChildren(visitor); if (!generateAsStub) { visitor.visit(loaderSymbol); - visitor.visit(_protocolPointer); + visitor.visit(protocolPointer); visitor.visit(_conformsTo); visitor.visit(_conformsToMsgSend); visitMethods(visitor); diff --git a/pkgs/ffigen/lib/src/visitor/fill_method_dependencies.dart b/pkgs/ffigen/lib/src/visitor/fill_method_dependencies.dart index 19458d36ce..14b82d6054 100644 --- a/pkgs/ffigen/lib/src/visitor/fill_method_dependencies.dart +++ b/pkgs/ffigen/lib/src/visitor/fill_method_dependencies.dart @@ -30,6 +30,11 @@ class FillMethodDependenciesVisitation extends Visitation { if (!finalBindings.contains(node)) return; if (!node.generateAsStub) { + node.classObject ??= ObjCClassGlobal( + '_class_${node.symbol.oldName}', + node.originalName, + node.module, + ); node.visitChildren(visitor); _adder.visit(node.classObject); for (final method in node.methods) { @@ -53,7 +58,14 @@ class FillMethodDependenciesVisitation extends Visitation { if (!finalBindings.contains(node)) return; if (!node.generateAsStub) { + node.protocolPointer ??= ObjCProtocolGlobal( + '_protocol_${node.originalName}', + node.originalName, + node.module, + node.loaderSymbol, + ); node.visitChildren(visitor); + _adder.visit(node.protocolPointer); for (final method in node.methods) { final blk = method.fillProtocolBlock(); _adder.visit(blk); From ac6d86f59df38f3975fe3d27db6b55da687bcde0 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Mon, 3 Aug 2026 15:44:43 +1000 Subject: [PATCH 28/37] clean up --- .../lib/src/code_generator/objc_block.dart | 18 +- .../code_generator/objc_built_in_types.dart | 1 - .../block_annotation_test_bindings.dart | 224 +++--- .../runtime_version_test_bindings.dart | 8 - .../src/objective_c_bindings_exported.dart | 2 - .../src/objective_c_bindings_generated.dart | 678 ++---------------- pkgs/objective_c/tool/generate_code.dart | 1 - 7 files changed, 175 insertions(+), 757 deletions(-) diff --git a/pkgs/ffigen/lib/src/code_generator/objc_block.dart b/pkgs/ffigen/lib/src/code_generator/objc_block.dart index 586ae693bb..6be081159c 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_block.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_block.dart @@ -47,7 +47,6 @@ class ObjCBlock extends BindingType with HasLocalScope { returnType, renamedParams.map((a) => a.type), reduced: false, - returnsRetained: returnsRetained, ); final oldBlock = context.bindingsIndex.getSeenObjCBlock(usr); if (oldBlock != null) { @@ -59,7 +58,6 @@ class ObjCBlock extends BindingType with HasLocalScope { returnType, renamedParams.map((a) => a.type), reduced: true, - returnsRetained: returnsRetained, ); } return oldBlock; @@ -127,11 +125,9 @@ class ObjCBlock extends BindingType with HasLocalScope { Type returnType, Iterable argTypes, { required bool reduced, - bool returnsRetained = false, }) { final types = [returnType, ...argTypes].map((t) => _typeName(t, reduced)); - final name = 'ObjCBlock_${types.join('_')}'; - return returnsRetained ? '${name}_retained' : name; + return 'ObjCBlock_${types.join('_')}'; } static String _typeName(Type type, bool reduced) => @@ -141,12 +137,7 @@ class ObjCBlock extends BindingType with HasLocalScope { ); static final _illegalNameChar = RegExp(r'[^0-9a-zA-Z]'); static Type _reducedType(Type type) { - if (type is ObjCNullable) { - final reducedChild = _reducedType(type.child); - return reducedChild is ObjCNullable - ? reducedChild - : ObjCNullable(reducedChild); - } + if (type.baseType != type) return _reducedType(type.baseType); if (type.typealiasType != type) return _reducedType(type.typealiasType); return type; } @@ -159,10 +150,9 @@ class ObjCBlock extends BindingType with HasLocalScope { bool returnsRetained, ) => [ '${strings.synthUsrChar} objcBlock:', - '${_reducedType(returnType).cacheKey()} ${returnsRetained ? 'R' : ''}', + '${returnType.cacheKey()} ${returnsRetained ? 'R' : ''}', for (final param in params) - '${_reducedType(param.type).cacheKey()} ' - '${param.objCConsumed ? 'C' : ''}', + '${param.type.cacheKey()} ${param.objCConsumed ? 'C' : ''}', ].join(' '); // Similar to _getBlockUsr, but not 100% garunteed to be unique, since it diff --git a/pkgs/ffigen/lib/src/code_generator/objc_built_in_types.dart b/pkgs/ffigen/lib/src/code_generator/objc_built_in_types.dart index b8d7d04382..ae94004c73 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_built_in_types.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_built_in_types.dart @@ -50,7 +50,6 @@ const objCBuiltInInterfaces = { 'NSSet': 'NSSet', 'NSStream': 'NSStream', 'NSString': 'NSString', - 'NSThread': 'NSThread', 'NSTimer': 'NSTimer', 'NSURL': 'NSURL', 'NSURLHandle': 'NSURLHandle', diff --git a/pkgs/ffigen/test/native_objc_test/block_annotation_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/block_annotation_test_bindings.dart index 49db86b603..1185383986 100644 --- a/pkgs/ffigen/test/native_objc_test/block_annotation_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/block_annotation_test_bindings.dart @@ -1044,7 +1044,7 @@ interface class BlockAnnotationTestProtocol$Builder { isInstanceMethod: true, ), (DartEmptyBlock Function() func) => - ObjCBlock_EmptyBlock_ffiVoid_retained.fromFunction( + ObjCBlock_EmptyBlock_ffiVoid$1.fromFunction( (ffi.Pointer _) => func(), ), ); @@ -1070,7 +1070,7 @@ interface class BlockAnnotationTestProtocol$Builder { isInstanceMethod: true, ), (EmptyObject Function() func) => - ObjCBlock_EmptyObject_ffiVoid_retained.fromFunction( + ObjCBlock_EmptyObject_ffiVoid$1.fromFunction( (ffi.Pointer _) => func(), ), ); @@ -1327,7 +1327,7 @@ extension ObjCBlock_EmptyBlock_ffiVoid$CallExtension } /// Construction methods for `objc.ObjCBlock> Function(ffi.Pointer)>`. -abstract final class ObjCBlock_EmptyBlock_ffiVoid_retained { +abstract final class ObjCBlock_EmptyBlock_ffiVoid$1 { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< objc.Retained> Function( @@ -1434,7 +1434,7 @@ abstract final class ObjCBlock_EmptyBlock_ffiVoid_retained { } /// Call operator for `objc.ObjCBlock> Function(ffi.Pointer)>`. -extension ObjCBlock_EmptyBlock_ffiVoid_retained$CallExtension +extension ObjCBlock_EmptyBlock_ffiVoid$1$CallExtension on objc.ObjCBlock< objc.Retained> Function( @@ -1582,22 +1582,20 @@ extension ObjCBlock_EmptyObject_ffiVoid$CallExtension } } -/// Construction methods for `objc.ObjCBlock, EmptyObject)>`. -abstract final class ObjCBlock_EmptyObject_ffiVoid_EmptyObject { +/// Construction methods for `objc.ObjCBlock Function(ffi.Pointer)>`. +abstract final class ObjCBlock_EmptyObject_ffiVoid$1 { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - EmptyObject Function(ffi.Pointer, EmptyObject) + objc.Retained Function(ffi.Pointer) > fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, }) => - objc.ObjCBlock, EmptyObject)>( - pointer, - retain: retain, - release: release, - ); + objc.ObjCBlock< + objc.Retained Function(ffi.Pointer) + >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. /// @@ -1605,23 +1603,23 @@ abstract final class ObjCBlock_EmptyObject_ffiVoid_EmptyObject { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - EmptyObject Function(ffi.Pointer, EmptyObject) + objc.Retained Function(ffi.Pointer) > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) + ffi.Pointer Function(ffi.Pointer arg0) > > ptr, - ) => objc.ObjCBlock, EmptyObject)>( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); + ) => + objc.ObjCBlock< + objc.Retained Function(ffi.Pointer) + >( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); /// Creates a block from a Dart function. /// @@ -1632,22 +1630,18 @@ abstract final class ObjCBlock_EmptyObject_ffiVoid_EmptyObject { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - EmptyObject Function(ffi.Pointer, EmptyObject) + objc.Retained Function(ffi.Pointer) > fromFunction( - EmptyObject Function(ffi.Pointer, EmptyObject) fn, { + EmptyObject Function(ffi.Pointer) fn, { bool keepIsolateAlive = true, }) => - objc.ObjCBlock, EmptyObject)>( - objc.newClosureBlock(_closureCallable, ( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - final _$$ref = fn( - arg0, - EmptyObject.fromPointer(arg1, retain: true, release: true), - ).ref; - return _$$ref.retainAndAutorelease(); + objc.ObjCBlock< + objc.Retained Function(ffi.Pointer) + >( + objc.newClosureBlock(_closureCallable, (ffi.Pointer arg0) { + final _$$ref = fn(arg0).ref; + return _$$ref.retainAndReturnPointer(); }, keepIsolateAlive), retain: false, release: true, @@ -1656,60 +1650,48 @@ abstract final class ObjCBlock_EmptyObject_ffiVoid_EmptyObject { static ffi.Pointer _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, - ) + ffi.Pointer Function(ffi.Pointer arg0) > >() .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ) - >()(arg0, arg1); + ffi.Pointer Function(ffi.Pointer) + >()(arg0); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static ffi.Pointer _closureTrampoline( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, ) => (objc.getBlockClosure(block) - as ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ))(arg0, arg1); + as ffi.Pointer Function(ffi.Pointer))( + arg0, + ); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock, EmptyObject)>`. -extension ObjCBlock_EmptyObject_ffiVoid_EmptyObject$CallExtension +/// Call operator for `objc.ObjCBlock Function(ffi.Pointer)>`. +extension ObjCBlock_EmptyObject_ffiVoid$1$CallExtension on objc.ObjCBlock< - EmptyObject Function(ffi.Pointer, EmptyObject) + objc.Retained Function(ffi.Pointer) > { - EmptyObject call(ffi.Pointer arg0, EmptyObject arg1) { - final _$$ref$1 = arg1.ref; + EmptyObject call(ffi.Pointer arg0) { return EmptyObject.fromPointer( ref.pointer.ref.invoke .cast< @@ -1717,7 +1699,6 @@ extension ObjCBlock_EmptyObject_ffiVoid_EmptyObject$CallExtension ffi.Pointer Function( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1, ) > >() @@ -1725,29 +1706,30 @@ extension ObjCBlock_EmptyObject_ffiVoid_EmptyObject$CallExtension ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, ) - >()(ref.pointer, arg0, _$$ref$1.pointer), - retain: true, + >()(ref.pointer, arg0), + retain: false, release: true, ); } } -/// Construction methods for `objc.ObjCBlock, objc.Consumed)>`. -abstract final class ObjCBlock_EmptyObject_ffiVoid_EmptyObject$1 { +/// Construction methods for `objc.ObjCBlock, EmptyObject)>`. +abstract final class ObjCBlock_EmptyObject_ffiVoid_EmptyObject { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - EmptyObject Function(ffi.Pointer, objc.Consumed) + EmptyObject Function(ffi.Pointer, EmptyObject) > fromPointer( ffi.Pointer pointer, { bool retain = false, bool release = false, }) => - objc.ObjCBlock< - EmptyObject Function(ffi.Pointer, objc.Consumed) - >(pointer, retain: retain, release: release); + objc.ObjCBlock, EmptyObject)>( + pointer, + retain: retain, + release: release, + ); /// Creates a block from a C function pointer. /// @@ -1755,7 +1737,7 @@ abstract final class ObjCBlock_EmptyObject_ffiVoid_EmptyObject$1 { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - EmptyObject Function(ffi.Pointer, objc.Consumed) + EmptyObject Function(ffi.Pointer, EmptyObject) > fromFunctionPointer( ffi.Pointer< @@ -1767,14 +1749,11 @@ abstract final class ObjCBlock_EmptyObject_ffiVoid_EmptyObject$1 { > > ptr, - ) => - objc.ObjCBlock< - EmptyObject Function(ffi.Pointer, objc.Consumed) - >( - objc.newPointerBlock(_fnPtrCallable, ptr.cast()), - retain: false, - release: true, - ); + ) => objc.ObjCBlock, EmptyObject)>( + objc.newPointerBlock(_fnPtrCallable, ptr.cast()), + retain: false, + release: true, + ); /// Creates a block from a Dart function. /// @@ -1785,22 +1764,20 @@ abstract final class ObjCBlock_EmptyObject_ffiVoid_EmptyObject$1 { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - EmptyObject Function(ffi.Pointer, objc.Consumed) + EmptyObject Function(ffi.Pointer, EmptyObject) > fromFunction( EmptyObject Function(ffi.Pointer, EmptyObject) fn, { bool keepIsolateAlive = true, }) => - objc.ObjCBlock< - EmptyObject Function(ffi.Pointer, objc.Consumed) - >( + objc.ObjCBlock, EmptyObject)>( objc.newClosureBlock(_closureCallable, ( ffi.Pointer arg0, ffi.Pointer arg1, ) { final _$$ref = fn( arg0, - EmptyObject.fromPointer(arg1, retain: false, release: true), + EmptyObject.fromPointer(arg1, retain: true, release: true), ).ref; return _$$ref.retainAndAutorelease(); }, keepIsolateAlive), @@ -1857,14 +1834,11 @@ abstract final class ObjCBlock_EmptyObject_ffiVoid_EmptyObject$1 { .cast(); } -/// Call operator for `objc.ObjCBlock, objc.Consumed)>`. -extension ObjCBlock_EmptyObject_ffiVoid_EmptyObject$1$CallExtension +/// Call operator for `objc.ObjCBlock, EmptyObject)>`. +extension ObjCBlock_EmptyObject_ffiVoid_EmptyObject$CallExtension on objc.ObjCBlock< - EmptyObject Function( - ffi.Pointer, - objc.Consumed, - ) + EmptyObject Function(ffi.Pointer, EmptyObject) > { EmptyObject call(ffi.Pointer arg0, EmptyObject arg1) { final _$$ref$1 = arg1.ref; @@ -1885,18 +1859,18 @@ extension ObjCBlock_EmptyObject_ffiVoid_EmptyObject$1$CallExtension ffi.Pointer, ffi.Pointer, ) - >()(ref.pointer, arg0, _$$ref$1.retainAndReturnPointer()), + >()(ref.pointer, arg0, _$$ref$1.pointer), retain: true, release: true, ); } } -/// Construction methods for `objc.ObjCBlock Function(ffi.Pointer)>`. -abstract final class ObjCBlock_EmptyObject_ffiVoid_retained { +/// Construction methods for `objc.ObjCBlock, objc.Consumed)>`. +abstract final class ObjCBlock_EmptyObject_ffiVoid_EmptyObject$1 { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - objc.Retained Function(ffi.Pointer) + EmptyObject Function(ffi.Pointer, objc.Consumed) > fromPointer( ffi.Pointer pointer, { @@ -1904,7 +1878,7 @@ abstract final class ObjCBlock_EmptyObject_ffiVoid_retained { bool release = false, }) => objc.ObjCBlock< - objc.Retained Function(ffi.Pointer) + EmptyObject Function(ffi.Pointer, objc.Consumed) >(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. @@ -1913,18 +1887,21 @@ abstract final class ObjCBlock_EmptyObject_ffiVoid_retained { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - objc.Retained Function(ffi.Pointer) + EmptyObject Function(ffi.Pointer, objc.Consumed) > fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer arg0) + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) > > ptr, ) => objc.ObjCBlock< - objc.Retained Function(ffi.Pointer) + EmptyObject Function(ffi.Pointer, objc.Consumed) >( objc.newPointerBlock(_fnPtrCallable, ptr.cast()), retain: false, @@ -1940,18 +1917,24 @@ abstract final class ObjCBlock_EmptyObject_ffiVoid_retained { /// If `keepIsolateAlive` is true, this block will keep this isolate alive /// until it is garbage collected by both Dart and ObjC. static objc.ObjCBlock< - objc.Retained Function(ffi.Pointer) + EmptyObject Function(ffi.Pointer, objc.Consumed) > fromFunction( - EmptyObject Function(ffi.Pointer) fn, { + EmptyObject Function(ffi.Pointer, EmptyObject) fn, { bool keepIsolateAlive = true, }) => objc.ObjCBlock< - objc.Retained Function(ffi.Pointer) + EmptyObject Function(ffi.Pointer, objc.Consumed) >( - objc.newClosureBlock(_closureCallable, (ffi.Pointer arg0) { - final _$$ref = fn(arg0).ref; - return _$$ref.retainAndReturnPointer(); + objc.newClosureBlock(_closureCallable, ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + final _$$ref = fn( + arg0, + EmptyObject.fromPointer(arg1, retain: false, release: true), + ).ref; + return _$$ref.retainAndAutorelease(); }, keepIsolateAlive), retain: false, release: true, @@ -1960,48 +1943,63 @@ abstract final class ObjCBlock_EmptyObject_ffiVoid_retained { static ffi.Pointer _fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0, + ffi.Pointer arg1, ) => block.ref.target .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer arg0) + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) > >() .asFunction< - ffi.Pointer Function(ffi.Pointer) - >()(arg0); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + >()(arg0, arg1); static ffi.Pointer _fnPtrCallable = ffi.Pointer.fromFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) >(_fnPtrTrampoline) .cast(); static ffi.Pointer _closureTrampoline( ffi.Pointer block, ffi.Pointer arg0, + ffi.Pointer arg1, ) => (objc.getBlockClosure(block) - as ffi.Pointer Function(ffi.Pointer))( - arg0, - ); + as ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ))(arg0, arg1); static ffi.Pointer _closureCallable = ffi.Pointer.fromFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) >(_closureTrampoline) .cast(); } -/// Call operator for `objc.ObjCBlock Function(ffi.Pointer)>`. -extension ObjCBlock_EmptyObject_ffiVoid_retained$CallExtension +/// Call operator for `objc.ObjCBlock, objc.Consumed)>`. +extension ObjCBlock_EmptyObject_ffiVoid_EmptyObject$1$CallExtension on objc.ObjCBlock< - objc.Retained Function(ffi.Pointer) + EmptyObject Function( + ffi.Pointer, + objc.Consumed, + ) > { - EmptyObject call(ffi.Pointer arg0) { + EmptyObject call(ffi.Pointer arg0, EmptyObject arg1) { + final _$$ref$1 = arg1.ref; return EmptyObject.fromPointer( ref.pointer.ref.invoke .cast< @@ -2009,6 +2007,7 @@ extension ObjCBlock_EmptyObject_ffiVoid_retained$CallExtension ffi.Pointer Function( ffi.Pointer block, ffi.Pointer arg0, + ffi.Pointer arg1, ) > >() @@ -2016,9 +2015,10 @@ extension ObjCBlock_EmptyObject_ffiVoid_retained$CallExtension ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, ) - >()(ref.pointer, arg0), - retain: false, + >()(ref.pointer, arg0, _$$ref$1.retainAndReturnPointer()), + retain: true, release: true, ); } diff --git a/pkgs/ffigen/test/native_objc_test/runtime_version_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/runtime_version_test_bindings.dart index 5cc9833581..d40b182bd3 100644 --- a/pkgs/ffigen/test/native_objc_test/runtime_version_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/runtime_version_test_bindings.dart @@ -315,14 +315,6 @@ final _class_FutureAPIMethods = objc.getClass( _class_FutureAPIMethods_raw, ).cast(), ); -@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSObject') -external ffi.Pointer _class_NSObject_raw; -final _class_NSObject = objc.getClass( - "NSObject", - () => ffi.Native.addressOf>( - _class_NSObject_raw, - ).cast(), -); final _objc_msgSend_13yqbb6 = objc.msgSendPointer .cast< ffi.NativeFunction< diff --git a/pkgs/objective_c/lib/src/objective_c_bindings_exported.dart b/pkgs/objective_c/lib/src/objective_c_bindings_exported.dart index a08de457c3..5e3700d8b4 100644 --- a/pkgs/objective_c/lib/src/objective_c_bindings_exported.dart +++ b/pkgs/objective_c/lib/src/objective_c_bindings_exported.dart @@ -182,8 +182,6 @@ export 'objective_c_bindings_generated.dart' NSStringEncodingConversionOptions, NSStringEnumerationOptions, NSStringExtensionMethods, - NSThread, - NSThread$Methods, NSTimer, NSTimer$Methods, NSURL, 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 899b71b37a..0d49bca8ec 100644 --- a/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart +++ b/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart @@ -1007,13 +1007,13 @@ extension type DartInputStreamAdapter._(objc.ObjCObject object$) : _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, - _class_DOBJCDartInputStreamAdapter, + _class_DartInputStreamAdapter, ); /// alloc static DartInputStreamAdapter alloc() { final $ret = _objc_msgSend_151sglz( - _class_DOBJCDartInputStreamAdapter, + _class_DartInputStreamAdapter, _sel_alloc, ); return DartInputStreamAdapter.fromPointer( @@ -1026,7 +1026,7 @@ extension type DartInputStreamAdapter._(objc.ObjCObject object$) /// allocWithZone: static DartInputStreamAdapter allocWithZone(ffi.Pointer zone) { final $ret = _objc_msgSend_1cwp428( - _class_DOBJCDartInputStreamAdapter, + _class_DartInputStreamAdapter, _sel_allocWithZone_, zone, ); @@ -1041,7 +1041,7 @@ extension type DartInputStreamAdapter._(objc.ObjCObject object$) static DartInputStreamAdapter? inputStreamWithData(NSData data) { final _$$ref = data.ref; final $ret = _objc_msgSend_1sotr3r( - _class_DOBJCDartInputStreamAdapter, + _class_DartInputStreamAdapter, _sel_inputStreamWithData_, _$$ref.pointer, ); @@ -1054,7 +1054,7 @@ extension type DartInputStreamAdapter._(objc.ObjCObject object$) static DartInputStreamAdapter? inputStreamWithFileAtPath(NSString path) { final _$$ref = path.ref; final $ret = _objc_msgSend_1sotr3r( - _class_DOBJCDartInputStreamAdapter, + _class_DartInputStreamAdapter, _sel_inputStreamWithFileAtPath_, _$$ref.pointer, ); @@ -1069,7 +1069,7 @@ extension type DartInputStreamAdapter._(objc.ObjCObject object$) /// _ => The number of types being required in a `read:maxLength` call. static DartInputStreamAdapter inputStreamWithPort(int sendPort) { final $ret = _objc_msgSend_1ya1kjn( - _class_DOBJCDartInputStreamAdapter, + _class_DartInputStreamAdapter, _sel_inputStreamWithPort_, sendPort, ); @@ -1089,7 +1089,7 @@ extension type DartInputStreamAdapter._(objc.ObjCObject object$) macOS: (false, (10, 6, 0)), ); final $ret = _objc_msgSend_1sotr3r( - _class_DOBJCDartInputStreamAdapter, + _class_DartInputStreamAdapter, _sel_inputStreamWithURL_, _$$ref.pointer, ); @@ -1100,10 +1100,7 @@ extension type DartInputStreamAdapter._(objc.ObjCObject object$) /// new static DartInputStreamAdapter new$() { - final $ret = _objc_msgSend_151sglz( - _class_DOBJCDartInputStreamAdapter, - _sel_new, - ); + final $ret = _objc_msgSend_151sglz(_class_DartInputStreamAdapter, _sel_new); return DartInputStreamAdapter.fromPointer( $ret, retain: false, @@ -1258,13 +1255,13 @@ extension type DartInputStreamAdapterWeakHolder._(objc.ObjCObject object$) : _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, - _class_DOBJCDartInputStreamAdapterWeakHolder, + _class_DartInputStreamAdapterWeakHolder, ); /// alloc static DartInputStreamAdapterWeakHolder alloc() { final $ret = _objc_msgSend_151sglz( - _class_DOBJCDartInputStreamAdapterWeakHolder, + _class_DartInputStreamAdapterWeakHolder, _sel_alloc, ); return DartInputStreamAdapterWeakHolder.fromPointer( @@ -1279,7 +1276,7 @@ extension type DartInputStreamAdapterWeakHolder._(objc.ObjCObject object$) ffi.Pointer zone, ) { final $ret = _objc_msgSend_1cwp428( - _class_DOBJCDartInputStreamAdapterWeakHolder, + _class_DartInputStreamAdapterWeakHolder, _sel_allocWithZone_, zone, ); @@ -1296,7 +1293,7 @@ extension type DartInputStreamAdapterWeakHolder._(objc.ObjCObject object$) ) { final _$$ref = adapter.ref; final $ret = _objc_msgSend_1sotr3r( - _class_DOBJCDartInputStreamAdapterWeakHolder, + _class_DartInputStreamAdapterWeakHolder, _sel_holderWithInputStreamAdapter_, _$$ref.pointer, ); @@ -1310,7 +1307,7 @@ extension type DartInputStreamAdapterWeakHolder._(objc.ObjCObject object$) /// new static DartInputStreamAdapterWeakHolder new$() { final $ret = _objc_msgSend_151sglz( - _class_DOBJCDartInputStreamAdapterWeakHolder, + _class_DartInputStreamAdapterWeakHolder, _sel_new, ); return DartInputStreamAdapterWeakHolder.fromPointer( @@ -1380,19 +1377,19 @@ extension type DartProtocol._(objc.ObjCObject object$) : _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, - _class_DOBJCDartProtocol, + _class_DartProtocol, ); /// alloc static DartProtocol alloc() { - final $ret = _objc_msgSend_151sglz(_class_DOBJCDartProtocol, _sel_alloc); + final $ret = _objc_msgSend_151sglz(_class_DartProtocol, _sel_alloc); return DartProtocol.fromPointer($ret, retain: false, release: true); } /// allocWithZone: static DartProtocol allocWithZone(ffi.Pointer zone) { final $ret = _objc_msgSend_1cwp428( - _class_DOBJCDartProtocol, + _class_DartProtocol, _sel_allocWithZone_, zone, ); @@ -1401,7 +1398,7 @@ extension type DartProtocol._(objc.ObjCObject object$) /// new static DartProtocol new$() { - final $ret = _objc_msgSend_151sglz(_class_DOBJCDartProtocol, _sel_new); + final $ret = _objc_msgSend_151sglz(_class_DartProtocol, _sel_new); return DartProtocol.fromPointer($ret, retain: false, release: true); } @@ -1485,22 +1482,19 @@ extension type DartProtocolBuilder._(objc.ObjCObject object$) : _objc_msgSend_19nvye5( obj.ref.pointer, _sel_isKindOfClass_, - _class_DOBJCDartProtocolBuilder, + _class_DartProtocolBuilder, ); /// alloc static DartProtocolBuilder alloc() { - final $ret = _objc_msgSend_151sglz( - _class_DOBJCDartProtocolBuilder, - _sel_alloc, - ); + final $ret = _objc_msgSend_151sglz(_class_DartProtocolBuilder, _sel_alloc); return DartProtocolBuilder.fromPointer($ret, retain: false, release: true); } /// allocWithZone: static DartProtocolBuilder allocWithZone(ffi.Pointer zone) { final $ret = _objc_msgSend_1cwp428( - _class_DOBJCDartProtocolBuilder, + _class_DartProtocolBuilder, _sel_allocWithZone_, zone, ); @@ -1509,10 +1503,7 @@ extension type DartProtocolBuilder._(objc.ObjCObject object$) /// new static DartProtocolBuilder new$() { - final $ret = _objc_msgSend_151sglz( - _class_DOBJCDartProtocolBuilder, - _sel_new, - ); + final $ret = _objc_msgSend_151sglz(_class_DartProtocolBuilder, _sel_new); return DartProtocolBuilder.fromPointer($ret, retain: false, release: true); } @@ -4310,7 +4301,7 @@ interface class NSCoding$Builder { isInstanceMethod: true, ), (Dartinstancetype? Function(NSCoder) func) => - ObjCBlock_instancetype_ffiVoid_NSCoder_retained.fromFunction( + ObjCBlock_instancetype_ffiVoid_NSCoder.fromFunction( (ffi.Pointer _, NSCoder arg1) => func(arg1), ), ); @@ -4441,7 +4432,7 @@ interface class NSCopying$Builder { isInstanceMethod: true, ), (objc.ObjCObject Function(ffi.Pointer) func) => - ObjCBlock_objcObjCObjectImpl_ffiVoid_NSZone_retained.fromFunction( + ObjCBlock_objcObjCObjectImpl_ffiVoid_NSZone.fromFunction( (ffi.Pointer _, ffi.Pointer arg1) => func(arg1), ), ); @@ -11746,7 +11737,7 @@ interface class NSMutableCopying$Builder { isInstanceMethod: true, ), (objc.ObjCObject Function(ffi.Pointer) func) => - ObjCBlock_objcObjCObjectImpl_ffiVoid_NSZone_retained.fromFunction( + ObjCBlock_objcObjCObjectImpl_ffiVoid_NSZone.fromFunction( (ffi.Pointer _, ffi.Pointer arg1) => func(arg1), ), ); @@ -20197,7 +20188,7 @@ interface class NSSecureCoding$Builder { isInstanceMethod: true, ), (Dartinstancetype? Function(NSCoder) func) => - ObjCBlock_instancetype_ffiVoid_NSCoder_retained.fromFunction( + ObjCBlock_instancetype_ffiVoid_NSCoder.fromFunction( (ffi.Pointer _, NSCoder arg1) => func(arg1), ), ); @@ -22957,422 +22948,6 @@ extension NSStringExtensionMethods on NSString { } } -/// NSThread -extension type NSThread._(objc.ObjCObject object$) - implements objc.ObjCObject, NSObject { - /// Constructs a [NSThread] that points to the same underlying object as [other]. - NSThread.as(objc.ObjCObject other) : object$ = other { - assert(isA(object$)); - } - - /// Constructs a [NSThread] that wraps the given raw object pointer. - NSThread.fromPointer( - ffi.Pointer other, { - bool retain = false, - bool release = false, - }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { - assert(isA(object$)); - } - - /// Returns whether [obj] is an instance of [NSThread]. - static bool isA(objc.ObjCObject? obj) => obj == null - ? false - : _objc_msgSend_19nvye5( - obj.ref.pointer, - _sel_isKindOfClass_, - _class_NSThread, - ); - - /// alloc - static NSThread alloc() { - final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_alloc); - return NSThread.fromPointer($ret, retain: false, release: true); - } - - /// allocWithZone: - static NSThread allocWithZone(ffi.Pointer zone) { - final $ret = _objc_msgSend_1cwp428( - _class_NSThread, - _sel_allocWithZone_, - zone, - ); - return NSThread.fromPointer($ret, retain: false, release: true); - } - - /// callStackReturnAddresses - static NSArray getCallStackReturnAddresses() { - objc.checkOsVersionInternal( - 'NSThread.callStackReturnAddresses', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _class_NSThread, - _sel_callStackReturnAddresses, - ); - return NSArray.fromPointer($ret, retain: true, release: true); - } - - /// callStackSymbols - static NSArray getCallStackSymbols() { - objc.checkOsVersionInternal( - 'NSThread.callStackSymbols', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_callStackSymbols); - return NSArray.fromPointer($ret, retain: true, release: true); - } - - /// currentThread - static NSThread getCurrentThread() { - final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_currentThread); - return NSThread.fromPointer($ret, retain: true, release: true); - } - - /// detachNewThreadSelector:toTarget:withObject: - static void detachNewThreadSelector( - ffi.Pointer selector, { - required objc.ObjCObject toTarget, - objc.ObjCObject? withObject, - }) { - final _$$ref = toTarget.ref; - final _$$ref$1 = withObject?.ref; - _objc_msgSend_lzbvjm( - _class_NSThread, - _sel_detachNewThreadSelector_toTarget_withObject_, - selector, - _$$ref.pointer, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - } - - /// detachNewThreadWithBlock: - static void detachNewThreadWithBlock( - objc.ObjCBlock block, - ) { - final _$$ref = block.ref; - objc.checkOsVersionInternal( - 'NSThread.detachNewThreadWithBlock:', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), - ); - _objc_msgSend_f167m6( - _class_NSThread, - _sel_detachNewThreadWithBlock_, - _$$ref.pointer, - ); - } - - /// exit - static void exit() { - _objc_msgSend_1pl9qdv(_class_NSThread, _sel_exit); - } - - /// isMainThread - static bool getIsMainThread$1() { - objc.checkOsVersionInternal( - 'NSThread.isMainThread', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - return _objc_msgSend_91o635(_class_NSThread, _sel_isMainThread); - } - - /// isMultiThreaded - static bool isMultiThreaded() { - return _objc_msgSend_91o635(_class_NSThread, _sel_isMultiThreaded); - } - - /// mainThread - static NSThread getMainThread() { - objc.checkOsVersionInternal( - 'NSThread.mainThread', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_mainThread); - return NSThread.fromPointer($ret, retain: true, release: true); - } - - /// new - static NSThread new$() { - final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_new); - return NSThread.fromPointer($ret, retain: false, release: true); - } - - /// setThreadPriority: - static bool setThreadPriority(double p) { - return _objc_msgSend_18chyc(_class_NSThread, _sel_setThreadPriority_, p); - } - - /// sleepForTimeInterval: - static void sleepForTimeInterval(double ti) { - _objc_msgSend_hwm8nu(_class_NSThread, _sel_sleepForTimeInterval_, ti); - } - - /// sleepUntilDate: - static void sleepUntilDate(NSDate date) { - final _$$ref = date.ref; - _objc_msgSend_xtuoz7(_class_NSThread, _sel_sleepUntilDate_, _$$ref.pointer); - } - - /// threadPriority - static double threadPriority$1() { - return objc.useMsgSendVariants - ? _objc_msgSend_1ukqyt8Fpret(_class_NSThread, _sel_threadPriority) - : _objc_msgSend_1ukqyt8(_class_NSThread, _sel_threadPriority); - } - - /// Returns a new instance of NSThread constructed with the default `new` method. - NSThread() : this.as(new$().object$); -} - -extension NSThread$Methods on NSThread { - /// cancel - void cancel() { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.cancel', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_cancel); - } - - /// init - NSThread init() { - final _$$ref$42 = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.init', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 0, 0)), - ); - final $ret = _objc_msgSend_151sglz( - _$$ref$42.retainAndReturnPointer(), - _sel_init, - ); - return NSThread.fromPointer($ret, retain: false, release: true); - } - - /// initWithBlock: - NSThread initWithBlock(objc.ObjCBlock block) { - final _$$ref = object$.ref; - final _$$ref$1 = block.ref; - objc.checkOsVersionInternal( - 'NSThread.initWithBlock:', - iOS: (false, (10, 0, 0)), - macOS: (false, (10, 12, 0)), - ); - final $ret = _objc_msgSend_nnxkei( - _$$ref.retainAndReturnPointer(), - _sel_initWithBlock_, - _$$ref$1.pointer, - ); - return NSThread.fromPointer($ret, retain: false, release: true); - } - - /// initWithTarget:selector:object: - NSThread initWithTarget( - objc.ObjCObject target, { - required ffi.Pointer selector, - objc.ObjCObject? object, - }) { - final _$$ref = object$.ref; - final _$$ref$1 = target.ref; - final _$$ref$2 = object?.ref; - objc.checkOsVersionInternal( - 'NSThread.initWithTarget:selector:object:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - final $ret = _objc_msgSend_1eldwyi( - _$$ref.retainAndReturnPointer(), - _sel_initWithTarget_selector_object_, - _$$ref$1.pointer, - selector, - _$$ref$2?.pointer ?? ffi.nullptr, - ); - return NSThread.fromPointer($ret, retain: false, release: true); - } - - /// isCancelled - bool get isCancelled { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.isCancelled', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isCancelled); - } - - /// isExecuting - bool get isExecuting { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.isExecuting', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isExecuting); - } - - /// isFinished - bool get isFinished { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.isFinished', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isFinished); - } - - /// isMainThread - bool get isMainThread { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.isMainThread', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - return _objc_msgSend_91o635(_$$ref.pointer, _sel_isMainThread); - } - - /// main - void main() { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.main', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_main); - } - - /// name - NSString? get name { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.name', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_name); - return $ret.address == 0 - ? null - : NSString.fromPointer($ret, retain: true, release: true); - } - - /// qualityOfService - NSQualityOfService get qualityOfService { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.qualityOfService', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), - ); - final $ret = _objc_msgSend_oi8iq9(_$$ref.pointer, _sel_qualityOfService); - return NSQualityOfService.fromValue($ret); - } - - /// setName: - set name(NSString? value) { - final _$$ref = object$.ref; - final _$$ref$1 = value?.ref; - objc.checkOsVersionInternal( - 'NSThread.setName:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - _objc_msgSend_xtuoz7( - _$$ref.pointer, - _sel_setName_, - _$$ref$1?.pointer ?? ffi.nullptr, - ); - } - - /// setQualityOfService: - set qualityOfService(NSQualityOfService value) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.setQualityOfService:', - iOS: (false, (8, 0, 0)), - macOS: (false, (10, 10, 0)), - ); - _objc_msgSend_n2da1l( - _$$ref.pointer, - _sel_setQualityOfService_, - value.value, - ); - } - - /// setStackSize: - set stackSize(DartNSUInteger value) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.setStackSize:', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - _objc_msgSend_1i9r4xy(_$$ref.pointer, _sel_setStackSize_, value); - } - - /// setThreadPriority: - set threadPriority(double value) { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.setThreadPriority:', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - _objc_msgSend_hwm8nu(_$$ref.pointer, _sel_setThreadPriority_, value); - } - - /// stackSize - DartNSUInteger get stackSize { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.stackSize', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_stackSize); - } - - /// start - void start() { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.start', - iOS: (false, (2, 0, 0)), - macOS: (false, (10, 5, 0)), - ); - _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_start); - } - - /// threadDictionary - NSMutableDictionary get threadDictionary { - final _$$ref = object$.ref; - final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_threadDictionary); - return NSMutableDictionary.fromPointer($ret, retain: true, release: true); - } - - /// threadPriority - double get threadPriority { - final _$$ref = object$.ref; - objc.checkOsVersionInternal( - 'NSThread.threadPriority', - iOS: (false, (4, 0, 0)), - macOS: (false, (10, 6, 0)), - ); - return objc.useMsgSendVariants - ? _objc_msgSend_1ukqyt8Fpret(_$$ref.pointer, _sel_threadPriority) - : _objc_msgSend_1ukqyt8(_$$ref.pointer, _sel_threadPriority); - } -} - /// NSTimer extension type NSTimer._(objc.ObjCObject object$) implements objc.ObjCObject, NSObject { @@ -23563,14 +23138,14 @@ extension NSTimer$Methods on NSTimer { /// init NSTimer init() { - final _$$ref$43 = object$.ref; + final _$$ref$42 = object$.ref; objc.checkOsVersionInternal( 'NSTimer.init', iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); final $ret = _objc_msgSend_151sglz( - _$$ref$43.retainAndReturnPointer(), + _$$ref$42.retainAndReturnPointer(), _sel_init, ); return NSTimer.fromPointer($ret, retain: false, release: true); @@ -24270,14 +23845,14 @@ extension NSURL$Methods on NSURL { /// init NSURL init() { - final _$$ref$44 = object$.ref; + final _$$ref$43 = object$.ref; objc.checkOsVersionInternal( 'NSURL.init', iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); final $ret = _objc_msgSend_151sglz( - _$$ref$44.retainAndReturnPointer(), + _$$ref$43.retainAndReturnPointer(), _sel_init, ); return NSURL.fromPointer($ret, retain: false, release: true); @@ -24872,14 +24447,14 @@ extension type NSURLHandle._(objc.ObjCObject object$) extension NSURLHandle$Methods on NSURLHandle { /// init NSURLHandle init() { - final _$$ref$45 = object$.ref; + final _$$ref$44 = object$.ref; objc.checkOsVersionInternal( 'NSURLHandle.init', iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); final $ret = _objc_msgSend_151sglz( - _$$ref$45.retainAndReturnPointer(), + _$$ref$44.retainAndReturnPointer(), _sel_init, ); return NSURLHandle.fromPointer($ret, retain: false, release: true); @@ -24986,14 +24561,14 @@ extension NSValue$Methods on NSValue { /// init NSValue init() { - final _$$ref$46 = object$.ref; + final _$$ref$45 = object$.ref; objc.checkOsVersionInternal( 'NSValue.init', iOS: (false, (2, 0, 0)), macOS: (false, (10, 0, 0)), ); final $ret = _objc_msgSend_151sglz( - _$$ref$46.retainAndReturnPointer(), + _$$ref$45.retainAndReturnPointer(), _sel_init, ); return NSValue.fromPointer($ret, retain: false, release: true); @@ -33651,7 +33226,7 @@ extension ObjCBlock_ffiVoid_unichar_NSUInteger$CallExtension } /// Construction methods for `objc.ObjCBlock?> Function(ffi.Pointer, NSCoder)>`. -abstract final class ObjCBlock_instancetype_ffiVoid_NSCoder_retained { +abstract final class ObjCBlock_instancetype_ffiVoid_NSCoder { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< objc.Retained?> Function( @@ -33792,7 +33367,7 @@ abstract final class ObjCBlock_instancetype_ffiVoid_NSCoder_retained { } /// Call operator for `objc.ObjCBlock?> Function(ffi.Pointer, NSCoder)>`. -extension ObjCBlock_instancetype_ffiVoid_NSCoder_retained$CallExtension +extension ObjCBlock_instancetype_ffiVoid_NSCoder$CallExtension on objc.ObjCBlock< objc.Retained?> Function( @@ -34155,7 +33730,7 @@ extension ObjCBlock_objcObjCObjectImpl_ffiVoid$CallExtension } /// Construction methods for `objc.ObjCBlock> Function(ffi.Pointer, ffi.Pointer)>`. -abstract final class ObjCBlock_objcObjCObjectImpl_ffiVoid_NSZone_retained { +abstract final class ObjCBlock_objcObjCObjectImpl_ffiVoid_NSZone { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< objc.Retained> Function( @@ -34293,7 +33868,7 @@ abstract final class ObjCBlock_objcObjCObjectImpl_ffiVoid_NSZone_retained { } /// Call operator for `objc.ObjCBlock> Function(ffi.Pointer, ffi.Pointer)>`. -extension ObjCBlock_objcObjCObjectImpl_ffiVoid_NSZone_retained$CallExtension +extension ObjCBlock_objcObjCObjectImpl_ffiVoid_NSZone$CallExtension on objc.ObjCBlock< objc.Retained> Function( @@ -36286,56 +35861,55 @@ extension _BlockArgs_x5cg0$Methods on _BlockArgs_x5cg0 { } } +@ffi.Native>( + symbol: 'OBJC_CLASS_\$_DOBJCObservation', +) +external ffi.Pointer _class_DOBJCObservation_raw; +final _class_DOBJCObservation = objc.getClass( + "DOBJCObservation", + () => ffi.Native.addressOf>( + _class_DOBJCObservation_raw, + ).cast(), +); @ffi.Native>( symbol: 'OBJC_CLASS_\$_DOBJCDartInputStreamAdapter', ) -external ffi.Pointer -_class_DOBJCDartInputStreamAdapter_raw; -final _class_DOBJCDartInputStreamAdapter = objc.getClass( +external ffi.Pointer _class_DartInputStreamAdapter_raw; +final _class_DartInputStreamAdapter = objc.getClass( "DOBJCDartInputStreamAdapter", () => ffi.Native.addressOf>( - _class_DOBJCDartInputStreamAdapter_raw, + _class_DartInputStreamAdapter_raw, ).cast(), ); @ffi.Native>( symbol: 'OBJC_CLASS_\$_DOBJCDartInputStreamAdapterWeakHolder', ) external ffi.Pointer -_class_DOBJCDartInputStreamAdapterWeakHolder_raw; -final _class_DOBJCDartInputStreamAdapterWeakHolder = objc.getClass( +_class_DartInputStreamAdapterWeakHolder_raw; +final _class_DartInputStreamAdapterWeakHolder = objc.getClass( "DOBJCDartInputStreamAdapterWeakHolder", () => ffi.Native.addressOf>( - _class_DOBJCDartInputStreamAdapterWeakHolder_raw, + _class_DartInputStreamAdapterWeakHolder_raw, ).cast(), ); @ffi.Native>( symbol: 'OBJC_CLASS_\$_DOBJCDartProtocol', ) -external ffi.Pointer _class_DOBJCDartProtocol_raw; -final _class_DOBJCDartProtocol = objc.getClass( +external ffi.Pointer _class_DartProtocol_raw; +final _class_DartProtocol = objc.getClass( "DOBJCDartProtocol", () => ffi.Native.addressOf>( - _class_DOBJCDartProtocol_raw, + _class_DartProtocol_raw, ).cast(), ); @ffi.Native>( symbol: 'OBJC_CLASS_\$_DOBJCDartProtocolBuilder', ) -external ffi.Pointer _class_DOBJCDartProtocolBuilder_raw; -final _class_DOBJCDartProtocolBuilder = objc.getClass( +external ffi.Pointer _class_DartProtocolBuilder_raw; +final _class_DartProtocolBuilder = objc.getClass( "DOBJCDartProtocolBuilder", () => ffi.Native.addressOf>( - _class_DOBJCDartProtocolBuilder_raw, - ).cast(), -); -@ffi.Native>( - symbol: 'OBJC_CLASS_\$_DOBJCObservation', -) -external ffi.Pointer _class_DOBJCObservation_raw; -final _class_DOBJCObservation = objc.getClass( - "DOBJCObservation", - () => ffi.Native.addressOf>( - _class_DOBJCObservation_raw, + _class_DartProtocolBuilder_raw, ).cast(), ); @ffi.Native>(symbol: 'OBJC_CLASS_\$_NSArray') @@ -36700,14 +36274,6 @@ final _class_NSString = objc.getClass( _class_NSString_raw, ).cast(), ); -@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSThread') -external ffi.Pointer _class_NSThread_raw; -final _class_NSThread = objc.getClass( - "NSThread", - () => ffi.Native.addressOf>( - _class_NSThread_raw, - ).cast(), -); @ffi.Native>(symbol: 'OBJC_CLASS_\$_NSTimer') external ffi.Pointer _class_NSTimer_raw; final _class_NSTimer = objc.getClass( @@ -37602,23 +37168,6 @@ final _objc_msgSend_1895u4n = objc.msgSendPointer ffi.Pointer, ) >(); -final _objc_msgSend_18chyc = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Double, - ) - > - >() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - double, - ) - >(); final _objc_msgSend_18qun1e = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -38030,27 +37579,6 @@ final _objc_msgSend_1egc1c = objc.msgSendPointer int, ) >(); -final _objc_msgSend_1eldwyi = 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, - ) - >(); final _objc_msgSend_1ffoev1 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -40690,27 +40218,6 @@ final _objc_msgSend_lh0jh5 = objc.msgSendPointer bool, ) >(); -final _objc_msgSend_lzbvjm = 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, - ) - >(); final _objc_msgSend_mabicu = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -40762,23 +40269,6 @@ final _objc_msgSend_mt0t38 = objc.msgSendPointer int, ) >(); -final _objc_msgSend_n2da1l = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ) - > - >() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ) - >(); final _objc_msgSend_n2svg2 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -40893,21 +40383,6 @@ final _objc_msgSend_oa8mke = objc.msgSendPointer double, ) >(); -final _objc_msgSend_oi8iq9 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ) - > - >() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ) - >(); final _objc_msgSend_ot6jdx = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -41809,10 +41284,6 @@ late final _sel_bytes = objc.registerName("bytes"); late final _sel_cStringUsingEncoding_ = objc.registerName( "cStringUsingEncoding:", ); -late final _sel_callStackReturnAddresses = objc.registerName( - "callStackReturnAddresses", -); -late final _sel_callStackSymbols = objc.registerName("callStackSymbols"); late final _sel_canBeConvertedToEncoding_ = objc.registerName( "canBeConvertedToEncoding:", ); @@ -41902,7 +41373,6 @@ late final _sel_countOfIndexesInRange_ = objc.registerName( late final _sel_currentMode = objc.registerName("currentMode"); late final _sel_currentProgress = objc.registerName("currentProgress"); late final _sel_currentRunLoop = objc.registerName("currentRunLoop"); -late final _sel_currentThread = objc.registerName("currentThread"); late final _sel_data = objc.registerName("data"); late final _sel_dataRepresentation = objc.registerName("dataRepresentation"); late final _sel_dataUsingEncoding_ = objc.registerName("dataUsingEncoding:"); @@ -41985,11 +41455,6 @@ late final _sel_descriptionWithLocale_ = objc.registerName( late final _sel_descriptionWithLocale_indent_ = objc.registerName( "descriptionWithLocale:indent:", ); -late final _sel_detachNewThreadSelector_toTarget_withObject_ = objc - .registerName("detachNewThreadSelector:toTarget:withObject:"); -late final _sel_detachNewThreadWithBlock_ = objc.registerName( - "detachNewThreadWithBlock:", -); late final _sel_developmentLocalization = objc.registerName( "developmentLocalization", ); @@ -42085,7 +41550,6 @@ late final _sel_executableArchitectures = objc.registerName( ); late final _sel_executablePath = objc.registerName("executablePath"); late final _sel_executableURL = objc.registerName("executableURL"); -late final _sel_exit = objc.registerName("exit"); late final _sel_failurePolicy = objc.registerName("failurePolicy"); late final _sel_fastestEncoding = objc.registerName("fastestEncoding"); late final _sel_fileCompletedCount = objc.registerName("fileCompletedCount"); @@ -42304,7 +41768,6 @@ late final _sel_initWithBase64EncodedData_options_ = objc.registerName( late final _sel_initWithBase64EncodedString_options_ = objc.registerName( "initWithBase64EncodedString:options:", ); -late final _sel_initWithBlock_ = objc.registerName("initWithBlock:"); late final _sel_initWithBool_ = objc.registerName("initWithBool:"); late final _sel_initWithBytesNoCopy_length_ = objc.registerName( "initWithBytesNoCopy:length:", @@ -42486,9 +41949,6 @@ late final _sel_initWithString_encodingInvalidCharacters_ = objc.registerName( late final _sel_initWithString_relativeToURL_ = objc.registerName( "initWithString:relativeToURL:", ); -late final _sel_initWithTarget_selector_object_ = objc.registerName( - "initWithTarget:selector:object:", -); late final _sel_initWithTimeIntervalSince1970_ = objc.registerName( "initWithTimeIntervalSince1970:", ); @@ -42595,7 +42055,6 @@ late final _sel_isEqualToOrderedSet_ = objc.registerName( late final _sel_isEqualToSet_ = objc.registerName("isEqualToSet:"); late final _sel_isEqualToString_ = objc.registerName("isEqualToString:"); late final _sel_isEqual_ = objc.registerName("isEqual:"); -late final _sel_isExecuting = objc.registerName("isExecuting"); late final _sel_isFileReferenceURL = objc.registerName("isFileReferenceURL"); late final _sel_isFileURL = objc.registerName("isFileURL"); late final _sel_isFinished = objc.registerName("isFinished"); @@ -42603,9 +42062,7 @@ late final _sel_isFloat = objc.registerName("isFloat"); late final _sel_isIndeterminate = objc.registerName("isIndeterminate"); late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); late final _sel_isLoaded = objc.registerName("isLoaded"); -late final _sel_isMainThread = objc.registerName("isMainThread"); late final _sel_isMemberOfClass_ = objc.registerName("isMemberOfClass:"); -late final _sel_isMultiThreaded = objc.registerName("isMultiThreaded"); late final _sel_isOld = objc.registerName("isOld"); late final _sel_isOneway = objc.registerName("isOneway"); late final _sel_isPausable = objc.registerName("isPausable"); @@ -42755,10 +42212,8 @@ late final _sel_lowercaseString = objc.registerName("lowercaseString"); late final _sel_lowercaseStringWithLocale_ = objc.registerName( "lowercaseStringWithLocale:", ); -late final _sel_main = objc.registerName("main"); late final _sel_mainBundle = objc.registerName("mainBundle"); late final _sel_mainRunLoop = objc.registerName("mainRunLoop"); -late final _sel_mainThread = objc.registerName("mainThread"); late final _sel_makeObjectsPerformSelector_ = objc.registerName( "makeObjectsPerformSelector:", ); @@ -42961,7 +42416,6 @@ late final _sel_publish = objc.registerName("publish"); late final _sel_punctuationCharacterSet = objc.registerName( "punctuationCharacterSet", ); -late final _sel_qualityOfService = objc.registerName("qualityOfService"); late final _sel_query = objc.registerName("query"); late final _sel_rangeOfCharacterFromSet_ = objc.registerName( "rangeOfCharacterFromSet:", @@ -43193,7 +42647,6 @@ late final _sel_setLocalizedDescription_ = objc.registerName( "setLocalizedDescription:", ); late final _sel_setMsgid_ = objc.registerName("setMsgid:"); -late final _sel_setName_ = objc.registerName("setName:"); late final _sel_setObject_atIndex_ = objc.registerName("setObject:atIndex:"); late final _sel_setObject_atIndexedSubscript_ = objc.registerName( "setObject:atIndexedSubscript:", @@ -43205,9 +42658,6 @@ late final _sel_setObject_forKeyedSubscript_ = objc.registerName( late final _sel_setPausable_ = objc.registerName("setPausable:"); late final _sel_setPausingHandler_ = objc.registerName("setPausingHandler:"); late final _sel_setProperty_forKey_ = objc.registerName("setProperty:forKey:"); -late final _sel_setQualityOfService_ = objc.registerName( - "setQualityOfService:", -); late final _sel_setResourceValue_forKey_error_ = objc.registerName( "setResourceValue:forKey:error:", ); @@ -43218,13 +42668,11 @@ late final _sel_setResumingHandler_ = objc.registerName("setResumingHandler:"); late final _sel_setReturnValue_ = objc.registerName("setReturnValue:"); late final _sel_setSelector_ = objc.registerName("setSelector:"); late final _sel_setSet_ = objc.registerName("setSet:"); -late final _sel_setStackSize_ = objc.registerName("setStackSize:"); late final _sel_setSuggestedName_ = objc.registerName("setSuggestedName:"); late final _sel_setTarget_ = objc.registerName("setTarget:"); late final _sel_setTemporaryResourceValue_forKey_ = objc.registerName( "setTemporaryResourceValue:forKey:", ); -late final _sel_setThreadPriority_ = objc.registerName("setThreadPriority:"); late final _sel_setThroughput_ = objc.registerName("setThroughput:"); late final _sel_setTolerance_ = objc.registerName("setTolerance:"); late final _sel_setTotalUnitCount_ = objc.registerName("setTotalUnitCount:"); @@ -43255,10 +42703,6 @@ late final _sel_shortValue = objc.registerName("shortValue"); late final _sel_signatureWithObjCTypes_ = objc.registerName( "signatureWithObjCTypes:", ); -late final _sel_sleepForTimeInterval_ = objc.registerName( - "sleepForTimeInterval:", -); -late final _sel_sleepUntilDate_ = objc.registerName("sleepUntilDate:"); late final _sel_smallestEncoding = objc.registerName("smallestEncoding"); late final _sel_sortRange_options_usingComparator_ = objc.registerName( "sortRange:options:usingComparator:", @@ -43289,9 +42733,7 @@ late final _sel_sortedArrayUsingSelector_ = objc.registerName( late final _sel_sortedArrayWithOptions_usingComparator_ = objc.registerName( "sortedArrayWithOptions:usingComparator:", ); -late final _sel_stackSize = objc.registerName("stackSize"); late final _sel_standardizedURL = objc.registerName("standardizedURL"); -late final _sel_start = objc.registerName("start"); late final _sel_startAccessingSecurityScopedResource = objc.registerName( "startAccessingSecurityScopedResource", ); @@ -43364,8 +42806,6 @@ late final _sel_supportsSecureCoding = objc.registerName( ); late final _sel_symbolCharacterSet = objc.registerName("symbolCharacterSet"); late final _sel_target = objc.registerName("target"); -late final _sel_threadDictionary = objc.registerName("threadDictionary"); -late final _sel_threadPriority = objc.registerName("threadPriority"); late final _sel_throughput = objc.registerName("throughput"); late final _sel_timeInterval = objc.registerName("timeInterval"); late final _sel_timeIntervalSince1970 = objc.registerName( diff --git a/pkgs/objective_c/tool/generate_code.dart b/pkgs/objective_c/tool/generate_code.dart index 611fd10013..1ff9bf8a11 100644 --- a/pkgs/objective_c/tool/generate_code.dart +++ b/pkgs/objective_c/tool/generate_code.dart @@ -336,7 +336,6 @@ void generateObjCBindings(Uri root) { 'NSSet', 'NSStream', 'NSString', - 'NSThread', 'NSTimer', 'NSURL', 'NSURLHandle', From 3df1a178fa878d32402ece8903c45dc18aca75ad Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Mon, 3 Aug 2026 15:49:30 +1000 Subject: [PATCH 29/37] clean up --- pkgs/ffigen/lib/src/code_generator/objc_category.dart | 7 ------- pkgs/ffigen/lib/src/code_generator/objc_interface.dart | 3 ++- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/pkgs/ffigen/lib/src/code_generator/objc_category.dart b/pkgs/ffigen/lib/src/code_generator/objc_category.dart index 85b967aec0..18e85f17f2 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_category.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_category.dart @@ -43,17 +43,10 @@ class ObjCCategory extends NoLookUpBinding with ObjCMethods, HasLocalScope { @override bool get isObjCImport => - !(context.config.objectiveC?.generateForPackageObjectiveC ?? false) && context.objCBuiltInFunctions.isBuiltInCategory(originalName); @override BindingString toBindingString(Writer w) { - if (isObjCImport) { - return const BindingString( - type: BindingStringType.objcCategory, - string: '', - ); - } final s = StringBuffer(); s.write('\n'); s.write(makeDartDoc(dartDoc)); diff --git a/pkgs/ffigen/lib/src/code_generator/objc_interface.dart b/pkgs/ffigen/lib/src/code_generator/objc_interface.dart index fc5d95da4d..51b5fc66fd 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_interface.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_interface.dart @@ -117,7 +117,8 @@ class ObjCInterface extends BindingType with ObjCMethods, HasLocalScope { s.write('\n'); if (generateAsStub) { s.write(''' -/// $name +/// WARNING: $name is a stub. To generate bindings for this class, include +/// $originalName in your config's objc-interfaces list. /// '''); } From a2006b25fa6ddbd2acff746e332bd64ed05ce37e Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Mon, 3 Aug 2026 15:54:19 +1000 Subject: [PATCH 30/37] cleaning --- .../lib/src/code_generator/objc_interface.dart | 5 +---- .../lib/src/code_generator/objc_protocol.dart | 16 +++------------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/pkgs/ffigen/lib/src/code_generator/objc_interface.dart b/pkgs/ffigen/lib/src/code_generator/objc_interface.dart index 51b5fc66fd..3c219245a5 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_interface.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_interface.dart @@ -140,10 +140,7 @@ class ObjCInterface extends BindingType with ObjCMethods, HasLocalScope { final wrapObjType = ObjCBuiltInFunctions.objectBase.gen(context); final protos = [ wrapObjType, - if (superType != null) superType!.getDartType(context), - ...protocols - .where((p) => p.generateBindings || p.isObjCImport) - .map((p) => p.getDartType(context)), + ...[superType, ...protocols].nonNulls.map((p) => p.getDartType(context)), ]; s.write(''' diff --git a/pkgs/ffigen/lib/src/code_generator/objc_protocol.dart b/pkgs/ffigen/lib/src/code_generator/objc_protocol.dart index 37b197a09e..71bebbe782 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_protocol.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_protocol.dart @@ -99,9 +99,7 @@ class ObjCProtocol extends BindingType with ObjCMethods, HasLocalScope { final sp = [ protocolBase, - ...superProtocols - .where((p) => p.generateBindings || p.isObjCImport) - .map((p) => p.getDartType(context)), + ...superProtocols.map((p) => p.getDartType(context)), ]; s.write(''' extension type $name._($protocolBase object\$) implements ${sp.join(', ')} { @@ -355,16 +353,8 @@ Protocol* ${loaderSymbol.name}(void) { return @protocol($originalName); } PointerType(objCObjectType).getCType(context); @override - String getDartType(Context context) { - if (isObjCImport) { - context.libs.markUsed(objcPkgImport); - final builtinName = - context.objCBuiltInFunctions.getBuiltInProtocolName(originalName) ?? - originalName; - return '${context.libs.prefix(objcPkgImport)}.$builtinName'; - } - return name; - } + String getDartType(Context context) => + isObjCImport ? '${context.libs.prefix(objcPkgImport)}.$name' : name; @override String getNativeType(Context context, {String varName = ''}) => 'id $varName'; From eaad4dacf13d6fb71595dcdc2dc7d71bf8c54d0b Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Tue, 4 Aug 2026 10:02:32 +1000 Subject: [PATCH 31/37] more cleanup --- .../objective_c/avf_audio_bindings.dart | 6 +- .../src/visitor/fill_method_dependencies.dart | 8 + .../block_annotation_test.dart | 8 +- .../block_annotation_test_bindings.dart | 675 +++++++++++++++++- .../native_objc_test/block_test_bindings.dart | 661 ++++++++++++++++- .../property_test_bindings.dart | 3 +- .../sdk_variable_test_bindings.dart | 21 +- pkgs/ffigen/tool/diff_bindings_with_main.dart | 9 +- pkgs/objective_c/tool/generate_code.dart | 2 +- 9 files changed, 1365 insertions(+), 28 deletions(-) diff --git a/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart b/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart index f9de946d43..a5c0bfe631 100644 --- a/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart +++ b/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart @@ -12,7 +12,8 @@ import 'package:ffi/ffi.dart' as pkg_ffi; const _$objcVersionCheck = objc.ObjCVersionCheck(9, 5); -/// AVAudioFormat +/// WARNING: AVAudioFormat is a stub. To generate bindings for this class, include +/// AVAudioFormat in your config's objc-interfaces list. /// /// AVAudioFormat extension type AVAudioFormat._(objc.ObjCObject object$) @@ -761,7 +762,8 @@ extension type AVAudioPlayerDelegate._(objc.ObjCProtocol object$) }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); } -/// CASpatialAudioExperience +/// WARNING: CASpatialAudioExperience is a stub. To generate bindings for this class, include +/// CASpatialAudioExperience in your config's objc-interfaces list. /// /// CASpatialAudioExperience extension type CASpatialAudioExperience._(objc.ObjCObject object$) diff --git a/pkgs/ffigen/lib/src/visitor/fill_method_dependencies.dart b/pkgs/ffigen/lib/src/visitor/fill_method_dependencies.dart index 14b82d6054..34e237ad6e 100644 --- a/pkgs/ffigen/lib/src/visitor/fill_method_dependencies.dart +++ b/pkgs/ffigen/lib/src/visitor/fill_method_dependencies.dart @@ -48,6 +48,14 @@ class FillMethodDependenciesVisitation extends Visitation { if (!finalBindings.contains(node)) return; node.visitChildren(visitor); + if (node.methods.any((m) => m.isClassMethod)) { + node.parent.classObject ??= ObjCClassGlobal( + '_class_${node.parent.symbol.oldName}', + node.parent.originalName, + node.parent.module, + ); + _adder.visit(node.parent.classObject); + } for (final method in node.methods) { _adder.visit(method.fillMsgSend()); } diff --git a/pkgs/ffigen/test/native_objc_test/block_annotation_test.dart b/pkgs/ffigen/test/native_objc_test/block_annotation_test.dart index bf5efebf2f..81e869e4f4 100644 --- a/pkgs/ffigen/test/native_objc_test/block_annotation_test.dart +++ b/pkgs/ffigen/test/native_objc_test/block_annotation_test.dart @@ -92,7 +92,7 @@ void main() { test('RetainedObjectProducer, defined dart, invoked dart', () { objectProducerTest(() { ObjCBlock Function(Pointer)> blk = - ObjCBlock_EmptyObject_ffiVoid_retained.fromFunction( + ObjCBlock_EmptyObject_ffiVoid$1.fromFunction( (Pointer _) => EmptyObject.alloc().init(), ); return blk(nullptr); @@ -102,7 +102,7 @@ void main() { test('RetainedObjectProducer, defined dart, invoked objC', () { objectProducerTest(() { ObjCBlock Function(Pointer)> blk = - ObjCBlock_EmptyObject_ffiVoid_retained.fromFunction( + ObjCBlock_EmptyObject_ffiVoid$1.fromFunction( (Pointer _) => EmptyObject.alloc().init(), ); return BlockAnnotationTest.invokeRetainedObjectProducer( @@ -345,7 +345,7 @@ void main() { test('RetainedBlockProducer, defined dart, invoked dart', () { blockProducerTest(() { ObjCBlock Function(Pointer)> blk = - ObjCBlock_EmptyBlock_ffiVoid_retained.fromFunction( + ObjCBlock_EmptyBlock_ffiVoid$1.fromFunction( (Pointer _) => ObjCBlock_ffiVoid.fromFunction(() {}), ); return blk(nullptr); @@ -355,7 +355,7 @@ void main() { test('RetainedBlockProducer, defined dart, invoked objC', () { blockProducerTest(() { ObjCBlock Function(Pointer)> blk = - ObjCBlock_EmptyBlock_ffiVoid_retained.fromFunction( + ObjCBlock_EmptyBlock_ffiVoid$1.fromFunction( (Pointer _) => ObjCBlock_ffiVoid.fromFunction(() {}), ); return BlockAnnotationTest.invokeRetainedBlockProducer( diff --git a/pkgs/ffigen/test/native_objc_test/block_annotation_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/block_annotation_test_bindings.dart index 1185383986..34b799bd94 100644 --- a/pkgs/ffigen/test/native_objc_test/block_annotation_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/block_annotation_test_bindings.dart @@ -239,7 +239,7 @@ extension type BlockAnnotationTest._(objc.ObjCObject object$) } /// invokeConsumedObjectListenerAsync: - static objc.NSThread invokeConsumedObjectListenerAsync( + static NSThread invokeConsumedObjectListenerAsync( objc.ObjCBlock, EmptyObject)> block, ) { final _$$ref = block.ref; @@ -248,7 +248,7 @@ extension type BlockAnnotationTest._(objc.ObjCObject object$) _sel_invokeConsumedObjectListenerAsync_, _$$ref.pointer, ); - return objc.NSThread.fromPointer($ret, retain: true, release: true); + return NSThread.fromPointer($ret, retain: true, release: true); } /// invokeConsumedObjectListenerSync: @@ -278,7 +278,7 @@ extension type BlockAnnotationTest._(objc.ObjCObject object$) } /// invokeObjectListenerAsync: - static objc.NSThread invokeObjectListenerAsync( + static NSThread invokeObjectListenerAsync( objc.ObjCBlock, EmptyObject)> block, ) { final _$$ref = block.ref; @@ -287,7 +287,7 @@ extension type BlockAnnotationTest._(objc.ObjCObject object$) _sel_invokeObjectListenerAsync_, _$$ref.pointer, ); - return objc.NSThread.fromPointer($ret, retain: true, release: true); + return NSThread.fromPointer($ret, retain: true, release: true); } /// invokeObjectListenerSync: @@ -1202,6 +1202,426 @@ extension EmptyObject$Methods on EmptyObject { } } +/// NSThread +extension type NSThread._(objc.ObjCObject object$) + implements objc.ObjCObject, objc.NSObject { + /// Constructs a [NSThread] that points to the same underlying object as [other]. + NSThread.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NSThread] that wraps the given raw object pointer. + NSThread.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + assert(isA(object$)); + } + + /// Returns whether [obj] is an instance of [NSThread]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSThread, + ); + + /// alloc + static NSThread alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_alloc); + return NSThread.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NSThread allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSThread, + _sel_allocWithZone_, + zone, + ); + return NSThread.fromPointer($ret, retain: false, release: true); + } + + /// callStackReturnAddresses + static objc.NSArray getCallStackReturnAddresses() { + objc.checkOsVersionInternal( + 'NSThread.callStackReturnAddresses', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _class_NSThread, + _sel_callStackReturnAddresses, + ); + return objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// callStackSymbols + static objc.NSArray getCallStackSymbols() { + objc.checkOsVersionInternal( + 'NSThread.callStackSymbols', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_callStackSymbols); + return objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// currentThread + static NSThread getCurrentThread() { + final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_currentThread); + return NSThread.fromPointer($ret, retain: true, release: true); + } + + /// detachNewThreadSelector:toTarget:withObject: + static void detachNewThreadSelector( + ffi.Pointer selector, { + required objc.ObjCObject toTarget, + objc.ObjCObject? withObject, + }) { + final _$$ref = toTarget.ref; + final _$$ref$1 = withObject?.ref; + _objc_msgSend_lzbvjm( + _class_NSThread, + _sel_detachNewThreadSelector_toTarget_withObject_, + selector, + _$$ref.pointer, + _$$ref$1?.pointer ?? ffi.nullptr, + ); + } + + /// detachNewThreadWithBlock: + static void detachNewThreadWithBlock( + objc.ObjCBlock block, + ) { + final _$$ref = block.ref; + objc.checkOsVersionInternal( + 'NSThread.detachNewThreadWithBlock:', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), + ); + _objc_msgSend_f167m6( + _class_NSThread, + _sel_detachNewThreadWithBlock_, + _$$ref.pointer, + ); + } + + /// exit + static void exit() { + _objc_msgSend_1pl9qdv(_class_NSThread, _sel_exit); + } + + /// isMainThread + static bool getIsMainThread$1() { + objc.checkOsVersionInternal( + 'NSThread.isMainThread', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + return _objc_msgSend_91o635(_class_NSThread, _sel_isMainThread); + } + + /// isMultiThreaded + static bool isMultiThreaded() { + return _objc_msgSend_91o635(_class_NSThread, _sel_isMultiThreaded); + } + + /// mainThread + static NSThread getMainThread() { + objc.checkOsVersionInternal( + 'NSThread.mainThread', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_mainThread); + return NSThread.fromPointer($ret, retain: true, release: true); + } + + /// new + static NSThread new$() { + final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_new); + return NSThread.fromPointer($ret, retain: false, release: true); + } + + /// setThreadPriority: + static bool setThreadPriority(double p) { + return _objc_msgSend_18chyc(_class_NSThread, _sel_setThreadPriority_, p); + } + + /// sleepForTimeInterval: + static void sleepForTimeInterval(double ti) { + _objc_msgSend_hwm8nu(_class_NSThread, _sel_sleepForTimeInterval_, ti); + } + + /// sleepUntilDate: + static void sleepUntilDate(objc.NSDate date) { + final _$$ref = date.ref; + _objc_msgSend_xtuoz7(_class_NSThread, _sel_sleepUntilDate_, _$$ref.pointer); + } + + /// threadPriority + static double threadPriority$1() { + return objc.useMsgSendVariants + ? _objc_msgSend_1ukqyt8Fpret(_class_NSThread, _sel_threadPriority) + : _objc_msgSend_1ukqyt8(_class_NSThread, _sel_threadPriority); + } + + /// Returns a new instance of NSThread constructed with the default `new` method. + NSThread() : this.as(new$().object$); +} + +extension NSThread$Methods on NSThread { + /// cancel + void cancel() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSThread.cancel', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_cancel); + } + + /// init + NSThread init() { + final _$$ref$2 = object$.ref; + objc.checkOsVersionInternal( + 'NSThread.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref$2.retainAndReturnPointer(), + _sel_init, + ); + return NSThread.fromPointer($ret, retain: false, release: true); + } + + /// initWithBlock: + NSThread initWithBlock(objc.ObjCBlock block) { + final _$$ref = object$.ref; + final _$$ref$1 = block.ref; + objc.checkOsVersionInternal( + 'NSThread.initWithBlock:', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), + ); + final $ret = _objc_msgSend_nnxkei( + _$$ref.retainAndReturnPointer(), + _sel_initWithBlock_, + _$$ref$1.pointer, + ); + return NSThread.fromPointer($ret, retain: false, release: true); + } + + /// initWithTarget:selector:object: + NSThread initWithTarget( + objc.ObjCObject target, { + required ffi.Pointer selector, + objc.ObjCObject? object, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = target.ref; + final _$$ref$2 = object?.ref; + objc.checkOsVersionInternal( + 'NSThread.initWithTarget:selector:object:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + final $ret = _objc_msgSend_1eldwyi( + _$$ref.retainAndReturnPointer(), + _sel_initWithTarget_selector_object_, + _$$ref$1.pointer, + selector, + _$$ref$2?.pointer ?? ffi.nullptr, + ); + return NSThread.fromPointer($ret, retain: false, release: true); + } + + /// isCancelled + bool get isCancelled { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSThread.isCancelled', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + return _objc_msgSend_91o635(_$$ref.pointer, _sel_isCancelled); + } + + /// isExecuting + bool get isExecuting { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSThread.isExecuting', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + return _objc_msgSend_91o635(_$$ref.pointer, _sel_isExecuting); + } + + /// isFinished + bool get isFinished { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSThread.isFinished', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + return _objc_msgSend_91o635(_$$ref.pointer, _sel_isFinished); + } + + /// isMainThread + bool get isMainThread { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSThread.isMainThread', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + return _objc_msgSend_91o635(_$$ref.pointer, _sel_isMainThread); + } + + /// main + void main() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSThread.main', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_main); + } + + /// name + objc.NSString? get name { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSThread.name', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_name); + return $ret.address == 0 + ? null + : objc.NSString.fromPointer($ret, retain: true, release: true); + } + + /// qualityOfService + objc.NSQualityOfService get qualityOfService { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSThread.qualityOfService', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + final $ret = _objc_msgSend_oi8iq9(_$$ref.pointer, _sel_qualityOfService); + return objc.NSQualityOfService.fromValue($ret); + } + + /// setName: + set name(objc.NSString? value) { + final _$$ref = object$.ref; + final _$$ref$1 = value?.ref; + objc.checkOsVersionInternal( + 'NSThread.setName:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_setName_, + _$$ref$1?.pointer ?? ffi.nullptr, + ); + } + + /// setQualityOfService: + set qualityOfService(objc.NSQualityOfService value) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSThread.setQualityOfService:', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + _objc_msgSend_n2da1l( + _$$ref.pointer, + _sel_setQualityOfService_, + value.value, + ); + } + + /// setStackSize: + set stackSize(int value) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSThread.setStackSize:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + _objc_msgSend_1i9r4xy(_$$ref.pointer, _sel_setStackSize_, value); + } + + /// setThreadPriority: + set threadPriority(double value) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSThread.setThreadPriority:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + _objc_msgSend_hwm8nu(_$$ref.pointer, _sel_setThreadPriority_, value); + } + + /// stackSize + int get stackSize { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSThread.stackSize', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_stackSize); + } + + /// start + void start() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSThread.start', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_start); + } + + /// threadDictionary + objc.NSMutableDictionary get threadDictionary { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_threadDictionary); + return objc.NSMutableDictionary.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// threadPriority + double get threadPriority { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSThread.threadPriority', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + return objc.useMsgSendVariants + ? _objc_msgSend_1ukqyt8Fpret(_$$ref.pointer, _sel_threadPriority) + : _objc_msgSend_1ukqyt8(_$$ref.pointer, _sel_threadPriority); + } +} + /// Construction methods for `objc.ObjCBlock Function(ffi.Pointer)>`. abstract final class ObjCBlock_EmptyBlock_ffiVoid { /// Returns a block that wraps the given raw block pointer. @@ -2694,6 +3114,14 @@ final _class_EmptyObject = objc.getClass( _class_EmptyObject_raw, ).cast(), ); +@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSThread') +external ffi.Pointer _class_NSThread_raw; +final _class_NSThread = objc.getClass( + "NSThread", + () => ffi.Native.addressOf>( + _class_NSThread_raw, + ).cast(), +); @ffi.Native>( symbol: 'OBJC_CLASS_\$__z0xonr_BlockArgs_18v1jvf', ) @@ -2739,6 +3167,23 @@ final _objc_msgSend_151sglz = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_18chyc = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ) + > + >() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + double, + ) + >(); final _objc_msgSend_19nvye5 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -2773,6 +3218,59 @@ final _objc_msgSend_1cwp428 = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_1eldwyi = 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, + ) + >(); +final _objc_msgSend_1i9r4xy = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ) + >(); +final _objc_msgSend_1pl9qdv = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); final _objc_msgSend_1ploomx = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -2807,6 +3305,36 @@ final _objc_msgSend_1sotr3r = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_1ukqyt8 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Double Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + double Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_1ukqyt8Fpret = objc.msgSendFpretPointer + .cast< + ffi.NativeFunction< + ffi.Double Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + double Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); final _objc_msgSend_4js6t = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -2839,6 +3367,21 @@ final _objc_msgSend_6ex6p5 = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_91o635 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); final _objc_msgSend_e3qsqz = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -2873,6 +3416,61 @@ final _objc_msgSend_f167m6 = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_hwm8nu = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + double, + ) + >(); +final _objc_msgSend_lzbvjm = 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, + ) + >(); +final _objc_msgSend_n2da1l = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ) + >(); final _objc_msgSend_nnxkei = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -2890,6 +3488,21 @@ final _objc_msgSend_nnxkei = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_oi8iq9 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); final _objc_msgSend_uwvaik = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -2939,6 +3552,21 @@ final _objc_msgSend_xtuoz7 = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_xw2lbc = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); @ffi.Native Function()>( symbol: '_z0xonr_BlockAnnotationTestProtocol', ) @@ -2952,8 +3580,24 @@ late final _sel_alloc = objc.registerName("alloc"); late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); late final _sel_arg0 = objc.registerName("arg0"); late final _sel_arg1 = objc.registerName("arg1"); +late final _sel_callStackReturnAddresses = objc.registerName( + "callStackReturnAddresses", +); +late final _sel_callStackSymbols = objc.registerName("callStackSymbols"); +late final _sel_cancel = objc.registerName("cancel"); late final _sel_conformsToProtocol_ = objc.registerName("conformsToProtocol:"); +late final _sel_currentThread = objc.registerName("currentThread"); +late final _sel_detachNewThreadSelector_toTarget_withObject_ = objc + .registerName("detachNewThreadSelector:toTarget:withObject:"); +late final _sel_detachNewThreadWithBlock_ = objc.registerName( + "detachNewThreadWithBlock:", +); +late final _sel_exit = objc.registerName("exit"); late final _sel_init = objc.registerName("init"); +late final _sel_initWithBlock_ = objc.registerName("initWithBlock:"); +late final _sel_initWithTarget_selector_object_ = objc.registerName( + "initWithTarget:selector:object:", +); late final _sel_invokeBlockProducer_ = objc.registerName( "invokeBlockProducer:", ); @@ -2984,11 +3628,19 @@ late final _sel_invokeRetainedBlockProducer_ = objc.registerName( late final _sel_invokeRetainedObjectProducer_ = objc.registerName( "invokeRetainedObjectProducer:", ); +late final _sel_isCancelled = objc.registerName("isCancelled"); +late final _sel_isExecuting = objc.registerName("isExecuting"); +late final _sel_isFinished = objc.registerName("isFinished"); late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); +late final _sel_isMainThread = objc.registerName("isMainThread"); +late final _sel_isMultiThreaded = objc.registerName("isMultiThreaded"); late final _sel_listenConsumedObject_ = objc.registerName( "listenConsumedObject:", ); late final _sel_listenObject_ = objc.registerName("listenObject:"); +late final _sel_main = objc.registerName("main"); +late final _sel_mainThread = objc.registerName("mainThread"); +late final _sel_name = objc.registerName("name"); late final _sel_new = objc.registerName("new"); late final _sel_newBlockProducer = objc.registerName("newBlockProducer"); late final _sel_newConsumedObjectReceiver = objc.registerName( @@ -3010,9 +3662,24 @@ late final _sel_produceRetainedBlock = objc.registerName( late final _sel_produceRetainedObject = objc.registerName( "produceRetainedObject", ); +late final _sel_qualityOfService = objc.registerName("qualityOfService"); late final _sel_receiveConsumedObject_ = objc.registerName( "receiveConsumedObject:", ); late final _sel_receiveObject_ = objc.registerName("receiveObject:"); +late final _sel_setName_ = objc.registerName("setName:"); +late final _sel_setQualityOfService_ = objc.registerName( + "setQualityOfService:", +); +late final _sel_setStackSize_ = objc.registerName("setStackSize:"); +late final _sel_setThreadPriority_ = objc.registerName("setThreadPriority:"); +late final _sel_sleepForTimeInterval_ = objc.registerName( + "sleepForTimeInterval:", +); +late final _sel_sleepUntilDate_ = objc.registerName("sleepUntilDate:"); +late final _sel_stackSize = objc.registerName("stackSize"); +late final _sel_start = objc.registerName("start"); +late final _sel_threadDictionary = objc.registerName("threadDictionary"); +late final _sel_threadPriority = objc.registerName("threadPriority"); typedef instancetype = ffi.Pointer; typedef Dartinstancetype = objc.ObjCObject; diff --git a/pkgs/ffigen/test/native_objc_test/block_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/block_test_bindings.dart index 9ea6523b04..009e61c6b8 100644 --- a/pkgs/ffigen/test/native_objc_test/block_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/block_test_bindings.dart @@ -455,14 +455,14 @@ extension type BlockTester._(objc.ObjCObject object$) } /// callOnNewThread: - static objc.NSThread callOnNewThread(DartVoidBlock block) { + static NSThread callOnNewThread(DartVoidBlock block) { final _$$ref = block.ref; final $ret = _objc_msgSend_nnxkei( _class_BlockTester, _sel_callOnNewThread_, _$$ref.pointer, ); - return objc.NSThread.fromPointer($ret, retain: false, release: true); + return NSThread.fromPointer($ret, retain: false, release: true); } /// callOnSameThread: @@ -529,14 +529,14 @@ extension type BlockTester._(objc.ObjCObject object$) } /// callWithBlockOnNewThread: - static objc.NSThread callWithBlockOnNewThread(DartListenerBlock block) { + static NSThread callWithBlockOnNewThread(DartListenerBlock block) { final _$$ref = block.ref; final $ret = _objc_msgSend_nnxkei( _class_BlockTester, _sel_callWithBlockOnNewThread_, _$$ref.pointer, ); - return objc.NSThread.fromPointer($ret, retain: false, release: true); + return NSThread.fromPointer($ret, retain: false, release: true); } /// new @@ -793,6 +793,427 @@ typedef DartListenerBlock = typedef NSStringListenerBlock = ffi.Pointer; typedef DartNSStringListenerBlock = objc.ObjCBlock; + +/// NSThread +extension type NSThread._(objc.ObjCObject object$) + implements objc.ObjCObject, objc.NSObject { + /// Constructs a [NSThread] that points to the same underlying object as [other]. + NSThread.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NSThread] that wraps the given raw object pointer. + NSThread.fromPointer( + ffi.Pointer other, { + bool retain = false, + bool release = false, + }) : object$ = objc.ObjCObject(other, retain: retain, release: release) { + assert(isA(object$)); + } + + /// Returns whether [obj] is an instance of [NSThread]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NSThread, + ); + + /// alloc + static NSThread alloc() { + final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_alloc); + return NSThread.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NSThread allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NSThread, + _sel_allocWithZone_, + zone, + ); + return NSThread.fromPointer($ret, retain: false, release: true); + } + + /// callStackReturnAddresses + static objc.NSArray getCallStackReturnAddresses() { + objc.checkOsVersionInternal( + 'NSThread.callStackReturnAddresses', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _class_NSThread, + _sel_callStackReturnAddresses, + ); + return objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// callStackSymbols + static objc.NSArray getCallStackSymbols() { + objc.checkOsVersionInternal( + 'NSThread.callStackSymbols', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_callStackSymbols); + return objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// currentThread + static NSThread getCurrentThread() { + final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_currentThread); + return NSThread.fromPointer($ret, retain: true, release: true); + } + + /// detachNewThreadSelector:toTarget:withObject: + static void detachNewThreadSelector( + ffi.Pointer selector, { + required objc.ObjCObject toTarget, + objc.ObjCObject? withObject, + }) { + final _$$ref = toTarget.ref; + final _$$ref$1 = withObject?.ref; + _objc_msgSend_lzbvjm( + _class_NSThread, + _sel_detachNewThreadSelector_toTarget_withObject_, + selector, + _$$ref.pointer, + _$$ref$1?.pointer ?? ffi.nullptr, + ); + } + + /// detachNewThreadWithBlock: + static void detachNewThreadWithBlock( + objc.ObjCBlock block, + ) { + final _$$ref = block.ref; + objc.checkOsVersionInternal( + 'NSThread.detachNewThreadWithBlock:', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), + ); + _objc_msgSend_f167m6( + _class_NSThread, + _sel_detachNewThreadWithBlock_, + _$$ref.pointer, + ); + } + + /// exit + static void exit() { + _objc_msgSend_1pl9qdv(_class_NSThread, _sel_exit); + } + + /// isMainThread + static bool getIsMainThread$1() { + objc.checkOsVersionInternal( + 'NSThread.isMainThread', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + return _objc_msgSend_91o635(_class_NSThread, _sel_isMainThread); + } + + /// isMultiThreaded + static bool isMultiThreaded() { + return _objc_msgSend_91o635(_class_NSThread, _sel_isMultiThreaded); + } + + /// mainThread + static NSThread getMainThread() { + objc.checkOsVersionInternal( + 'NSThread.mainThread', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_mainThread); + return NSThread.fromPointer($ret, retain: true, release: true); + } + + /// new + static NSThread new$() { + final $ret = _objc_msgSend_151sglz(_class_NSThread, _sel_new); + return NSThread.fromPointer($ret, retain: false, release: true); + } + + /// setThreadPriority: + static bool setThreadPriority(double p) { + return _objc_msgSend_18chyc(_class_NSThread, _sel_setThreadPriority_, p); + } + + /// sleepForTimeInterval: + static void sleepForTimeInterval(double ti) { + _objc_msgSend_hwm8nu(_class_NSThread, _sel_sleepForTimeInterval_, ti); + } + + /// sleepUntilDate: + static void sleepUntilDate(objc.NSDate date) { + final _$$ref = date.ref; + _objc_msgSend_xtuoz7(_class_NSThread, _sel_sleepUntilDate_, _$$ref.pointer); + } + + /// threadPriority + static double threadPriority$1() { + return objc.useMsgSendVariants + ? _objc_msgSend_1ukqyt8Fpret(_class_NSThread, _sel_threadPriority) + : _objc_msgSend_1ukqyt8(_class_NSThread, _sel_threadPriority); + } + + /// Returns a new instance of NSThread constructed with the default `new` method. + NSThread() : this.as(new$().object$); +} + +extension NSThread$Methods on NSThread { + /// cancel + void cancel() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSThread.cancel', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_cancel); + } + + /// init + NSThread init() { + final _$$ref$2 = object$.ref; + objc.checkOsVersionInternal( + 'NSThread.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz( + _$$ref$2.retainAndReturnPointer(), + _sel_init, + ); + return NSThread.fromPointer($ret, retain: false, release: true); + } + + /// initWithBlock: + NSThread initWithBlock(objc.ObjCBlock block) { + final _$$ref = object$.ref; + final _$$ref$1 = block.ref; + objc.checkOsVersionInternal( + 'NSThread.initWithBlock:', + iOS: (false, (10, 0, 0)), + macOS: (false, (10, 12, 0)), + ); + final $ret = _objc_msgSend_nnxkei( + _$$ref.retainAndReturnPointer(), + _sel_initWithBlock_, + _$$ref$1.pointer, + ); + return NSThread.fromPointer($ret, retain: false, release: true); + } + + /// initWithTarget:selector:object: + NSThread initWithTarget( + objc.ObjCObject target, { + required ffi.Pointer selector, + objc.ObjCObject? object, + }) { + final _$$ref = object$.ref; + final _$$ref$1 = target.ref; + final _$$ref$2 = object?.ref; + objc.checkOsVersionInternal( + 'NSThread.initWithTarget:selector:object:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + final $ret = _objc_msgSend_1eldwyi( + _$$ref.retainAndReturnPointer(), + _sel_initWithTarget_selector_object_, + _$$ref$1.pointer, + selector, + _$$ref$2?.pointer ?? ffi.nullptr, + ); + return NSThread.fromPointer($ret, retain: false, release: true); + } + + /// isCancelled + bool get isCancelled { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSThread.isCancelled', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + return _objc_msgSend_91o635(_$$ref.pointer, _sel_isCancelled); + } + + /// isExecuting + bool get isExecuting { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSThread.isExecuting', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + return _objc_msgSend_91o635(_$$ref.pointer, _sel_isExecuting); + } + + /// isFinished + bool get isFinished { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSThread.isFinished', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + return _objc_msgSend_91o635(_$$ref.pointer, _sel_isFinished); + } + + /// isMainThread + bool get isMainThread { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSThread.isMainThread', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + return _objc_msgSend_91o635(_$$ref.pointer, _sel_isMainThread); + } + + /// main + void main() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSThread.main', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_main); + } + + /// name + objc.NSString? get name { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSThread.name', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_name); + return $ret.address == 0 + ? null + : objc.NSString.fromPointer($ret, retain: true, release: true); + } + + /// qualityOfService + objc.NSQualityOfService get qualityOfService { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSThread.qualityOfService', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + final $ret = _objc_msgSend_oi8iq9(_$$ref.pointer, _sel_qualityOfService); + return objc.NSQualityOfService.fromValue($ret); + } + + /// setName: + set name(objc.NSString? value) { + final _$$ref = object$.ref; + final _$$ref$1 = value?.ref; + objc.checkOsVersionInternal( + 'NSThread.setName:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + _objc_msgSend_xtuoz7( + _$$ref.pointer, + _sel_setName_, + _$$ref$1?.pointer ?? ffi.nullptr, + ); + } + + /// setQualityOfService: + set qualityOfService(objc.NSQualityOfService value) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSThread.setQualityOfService:', + iOS: (false, (8, 0, 0)), + macOS: (false, (10, 10, 0)), + ); + _objc_msgSend_n2da1l( + _$$ref.pointer, + _sel_setQualityOfService_, + value.value, + ); + } + + /// setStackSize: + set stackSize(int value) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSThread.setStackSize:', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + _objc_msgSend_1i9r4xy(_$$ref.pointer, _sel_setStackSize_, value); + } + + /// setThreadPriority: + set threadPriority(double value) { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSThread.setThreadPriority:', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + _objc_msgSend_hwm8nu(_$$ref.pointer, _sel_setThreadPriority_, value); + } + + /// stackSize + int get stackSize { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSThread.stackSize', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + return _objc_msgSend_xw2lbc(_$$ref.pointer, _sel_stackSize); + } + + /// start + void start() { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSThread.start', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 5, 0)), + ); + _objc_msgSend_1pl9qdv(_$$ref.pointer, _sel_start); + } + + /// threadDictionary + objc.NSMutableDictionary get threadDictionary { + final _$$ref = object$.ref; + final $ret = _objc_msgSend_151sglz(_$$ref.pointer, _sel_threadDictionary); + return objc.NSMutableDictionary.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// threadPriority + double get threadPriority { + final _$$ref = object$.ref; + objc.checkOsVersionInternal( + 'NSThread.threadPriority', + iOS: (false, (4, 0, 0)), + macOS: (false, (10, 6, 0)), + ); + return objc.useMsgSendVariants + ? _objc_msgSend_1ukqyt8Fpret(_$$ref.pointer, _sel_threadPriority) + : _objc_msgSend_1ukqyt8(_$$ref.pointer, _sel_threadPriority); + } +} + typedef NoTrampolineListenerBlock = ffi.Pointer; typedef DartNoTrampolineListenerBlock = objc.ObjCBlock)>; @@ -3864,6 +4285,14 @@ final _class_DummyObject = objc.getClass( _class_DummyObject_raw, ).cast(), ); +@ffi.Native>(symbol: 'OBJC_CLASS_\$_NSThread') +external ffi.Pointer _class_NSThread_raw; +final _class_NSThread = objc.getClass( + "NSThread", + () => ffi.Native.addressOf>( + _class_NSThread_raw, + ).cast(), +); @ffi.Native>( symbol: 'OBJC_CLASS_\$__18tji2r_BlockArgs_1d9e4oe', ) @@ -3996,6 +4425,23 @@ final _objc_msgSend_151sglz = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_18chyc = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ) + > + >() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + double, + ) + >(); final _objc_msgSend_18yul99 = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -4049,6 +4495,27 @@ final _objc_msgSend_1cwp428 = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_1eldwyi = 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, + ) + >(); final _objc_msgSend_1fuqfwb = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -4115,6 +4582,23 @@ final _objc_msgSend_1gew1vmStret = objc.msgSendStretPointer ffi.Pointer, ) >(); +final _objc_msgSend_1i9r4xy = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ) + >(); final _objc_msgSend_1ovaulg = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -4177,6 +4661,36 @@ final _objc_msgSend_1pl9qdv = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_1ukqyt8 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Double Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + double Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); +final _objc_msgSend_1ukqyt8Fpret = objc.msgSendFpretPointer + .cast< + ffi.NativeFunction< + ffi.Double Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + double Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); final _objc_msgSend_8mj2fv = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -4211,6 +4725,21 @@ final _objc_msgSend_8mj2fvFpret = objc.msgSendFpretPointer ffi.Pointer, ) >(); +final _objc_msgSend_91o635 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); final _objc_msgSend_aclumu = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -4245,6 +4774,23 @@ final _objc_msgSend_f167m6 = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_hwm8nu = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + double, + ) + >(); final _objc_msgSend_jevgay = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -4264,6 +4810,44 @@ final _objc_msgSend_jevgay = objc.msgSendPointer int, ) >(); +final _objc_msgSend_lzbvjm = 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, + ) + >(); +final _objc_msgSend_n2da1l = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ) + > + >() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ) + >(); final _objc_msgSend_nnxkei = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -4362,6 +4946,21 @@ final _objc_msgSend_obqqme = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_oi8iq9 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); final _objc_msgSend_ovsamd = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -4447,6 +5046,21 @@ final _objc_msgSend_xtuoz7 = objc.msgSendPointer ffi.Pointer, ) >(); +final _objc_msgSend_xw2lbc = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ) + >(); final _objc_msgSend_yhkuco = objc.msgSendPointer .cast< ffi.NativeFunction< @@ -4515,23 +5129,47 @@ late final _sel_callOnSameThreadOutsideIsolate_ = objc.registerName( ); late final _sel_callOnSameThread_ = objc.registerName("callOnSameThread:"); late final _sel_callSelectorBlock_ = objc.registerName("callSelectorBlock:"); +late final _sel_callStackReturnAddresses = objc.registerName( + "callStackReturnAddresses", +); +late final _sel_callStackSymbols = objc.registerName("callStackSymbols"); late final _sel_callStructListener_ = objc.registerName("callStructListener:"); late final _sel_callVec4Block_ = objc.registerName("callVec4Block:"); late final _sel_callWithBlockOnNewThread_ = objc.registerName( "callWithBlockOnNewThread:", ); late final _sel_call_ = objc.registerName("call:"); +late final _sel_cancel = objc.registerName("cancel"); +late final _sel_currentThread = objc.registerName("currentThread"); late final _sel_dealloc = objc.registerName("dealloc"); +late final _sel_detachNewThreadSelector_toTarget_withObject_ = objc + .registerName("detachNewThreadSelector:toTarget:withObject:"); +late final _sel_detachNewThreadWithBlock_ = objc.registerName( + "detachNewThreadWithBlock:", +); +late final _sel_exit = objc.registerName("exit"); late final _sel_getBlock = objc.registerName("getBlock"); late final _sel_init = objc.registerName("init"); +late final _sel_initWithBlock_ = objc.registerName("initWithBlock:"); late final _sel_initWithCounter_ = objc.registerName("initWithCounter:"); +late final _sel_initWithTarget_selector_object_ = objc.registerName( + "initWithTarget:selector:object:", +); late final _sel_invokeAndReleaseListenerOnNewThread = objc.registerName( "invokeAndReleaseListenerOnNewThread", ); late final _sel_invokeAndReleaseListener_ = objc.registerName( "invokeAndReleaseListener:", ); +late final _sel_isCancelled = objc.registerName("isCancelled"); +late final _sel_isExecuting = objc.registerName("isExecuting"); +late final _sel_isFinished = objc.registerName("isFinished"); late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); +late final _sel_isMainThread = objc.registerName("isMainThread"); +late final _sel_isMultiThreaded = objc.registerName("isMultiThreaded"); +late final _sel_main = objc.registerName("main"); +late final _sel_mainThread = objc.registerName("mainThread"); +late final _sel_name = objc.registerName("name"); late final _sel_new = objc.registerName("new"); late final _sel_newBlockBlock_ = objc.registerName("newBlockBlock:"); late final _sel_newBlock_withMult_ = objc.registerName("newBlock:withMult:"); @@ -4540,7 +5178,22 @@ late final _sel_newFromListener_ = objc.registerName("newFromListener:"); late final _sel_newFromMultiplier_ = objc.registerName("newFromMultiplier:"); late final _sel_newWithCounter_ = objc.registerName("newWithCounter:"); late final _sel_pokeBlock = objc.registerName("pokeBlock"); +late final _sel_qualityOfService = objc.registerName("qualityOfService"); late final _sel_setCounter_ = objc.registerName("setCounter:"); +late final _sel_setName_ = objc.registerName("setName:"); +late final _sel_setQualityOfService_ = objc.registerName( + "setQualityOfService:", +); +late final _sel_setStackSize_ = objc.registerName("setStackSize:"); +late final _sel_setThreadPriority_ = objc.registerName("setThreadPriority:"); late final _sel_setup_ = objc.registerName("setup:"); +late final _sel_sleepForTimeInterval_ = objc.registerName( + "sleepForTimeInterval:", +); +late final _sel_sleepUntilDate_ = objc.registerName("sleepUntilDate:"); +late final _sel_stackSize = objc.registerName("stackSize"); +late final _sel_start = objc.registerName("start"); +late final _sel_threadDictionary = objc.registerName("threadDictionary"); +late final _sel_threadPriority = objc.registerName("threadPriority"); typedef instancetype = ffi.Pointer; typedef Dartinstancetype = objc.ObjCObject; diff --git a/pkgs/ffigen/test/native_objc_test/property_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/property_test_bindings.dart index b7e1242e94..c153f673a9 100644 --- a/pkgs/ffigen/test/native_objc_test/property_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/property_test_bindings.dart @@ -203,7 +203,8 @@ extension PropertyInterface$Methods on PropertyInterface { } } -/// UndefinedTemplate +/// WARNING: UndefinedTemplate is a stub. To generate bindings for this class, include +/// UndefinedTemplate in your config's objc-interfaces list. /// /// UndefinedTemplate extension type UndefinedTemplate._(objc.ObjCObject object$) diff --git a/pkgs/ffigen/test/native_objc_test/sdk_variable_test_bindings.dart b/pkgs/ffigen/test/native_objc_test/sdk_variable_test_bindings.dart index a848a10147..9b8d26aea5 100644 --- a/pkgs/ffigen/test/native_objc_test/sdk_variable_test_bindings.dart +++ b/pkgs/ffigen/test/native_objc_test/sdk_variable_test_bindings.dart @@ -79,7 +79,8 @@ extension type NSAppearanceCustomization._(objc.ObjCProtocol object$) }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); } -/// NSButtonCell +/// WARNING: NSButtonCell is a stub. To generate bindings for this class, include +/// NSButtonCell in your config's objc-interfaces list. /// /// NSButtonCell extension type NSButtonCell._(objc.ObjCObject object$) @@ -95,7 +96,8 @@ extension type NSButtonCell._(objc.ObjCObject object$) }) : object$ = objc.ObjCObject(other, retain: retain, release: release) {} } -/// NSColorList +/// WARNING: NSColorList is a stub. To generate bindings for this class, include +/// NSColorList in your config's objc-interfaces list. /// /// NSColorList extension type NSColorList._(objc.ObjCObject object$) @@ -111,7 +113,8 @@ extension type NSColorList._(objc.ObjCObject object$) }) : object$ = objc.ObjCObject(other, retain: retain, release: release) {} } -/// NSColorPanel +/// WARNING: NSColorPanel is a stub. To generate bindings for this class, include +/// NSColorPanel in your config's objc-interfaces list. /// /// NSColorPanel extension type NSColorPanel._(objc.ObjCObject object$) @@ -407,7 +410,8 @@ extension type NSColorPickingDefault._(objc.ObjCProtocol object$) }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); } -/// NSImage +/// WARNING: NSImage is a stub. To generate bindings for this class, include +/// NSImage in your config's objc-interfaces list. /// /// NSImage extension type NSImage._(objc.ObjCObject object$) implements objc.ObjCObject { @@ -439,7 +443,8 @@ extension type NSMenuItemValidation._(objc.ObjCProtocol object$) }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); } -/// NSPanel +/// WARNING: NSPanel is a stub. To generate bindings for this class, include +/// NSPanel in your config's objc-interfaces list. /// /// NSPanel extension type NSPanel._(objc.ObjCObject object$) @@ -459,7 +464,8 @@ extension type NSPanel._(objc.ObjCObject object$) } } -/// NSResponder +/// WARNING: NSResponder is a stub. To generate bindings for this class, include +/// NSResponder in your config's objc-interfaces list. /// /// NSResponder extension type NSResponder._(objc.ObjCObject object$) @@ -746,7 +752,8 @@ extension type NSUserInterfaceValidations._(objc.ObjCProtocol object$) }) : object$ = objc.ObjCProtocol(other, retain: retain, release: release); } -/// NSWindow +/// WARNING: NSWindow is a stub. To generate bindings for this class, include +/// NSWindow in your config's objc-interfaces list. /// /// NSWindow extension type NSWindow._(objc.ObjCObject object$) diff --git a/pkgs/ffigen/tool/diff_bindings_with_main.dart b/pkgs/ffigen/tool/diff_bindings_with_main.dart index 028601e21f..7b63e506d5 100644 --- a/pkgs/ffigen/tool/diff_bindings_with_main.dart +++ b/pkgs/ffigen/tool/diff_bindings_with_main.dart @@ -12,11 +12,10 @@ Future main(List args) async { ? ['../objective_c/lib/src/objective_c_bindings_generated.dart'] : args; - final result = await Process.run( - '/bin/bash', - [shScript, ...targetArgs], - workingDirectory: path.dirname(scriptDir), - ); + final result = await Process.run('/bin/bash', [ + shScript, + ...targetArgs, + ], workingDirectory: path.dirname(scriptDir)); if (result.stdout.toString().isNotEmpty) { stdout.write(result.stdout); diff --git a/pkgs/objective_c/tool/generate_code.dart b/pkgs/objective_c/tool/generate_code.dart index 1ff9bf8a11..ae6c0866f6 100644 --- a/pkgs/objective_c/tool/generate_code.dart +++ b/pkgs/objective_c/tool/generate_code.dart @@ -447,8 +447,8 @@ void generateObjCBindings(Uri root) { root.resolve('src/protocol.h'), ], ), - // ignore: deprecated_member_use objectiveC: ObjectiveC( + // ignore: deprecated_member_use, deprecated_member_use_from_same_package generateForPackageObjectiveC: true, externalVersions: ExternalVersions( ios: Versions(min: Version(12, 0, 0)), From c4b1e14d641ca0f9b29b3f535444536cfb95259c Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Tue, 4 Aug 2026 10:59:00 +1000 Subject: [PATCH 32/37] clean up --- .../src/code_generator/objc_interface.dart | 5 + .../lib/src/code_generator/objc_protocol.dart | 7 ++ .../src/visitor/fill_method_dependencies.dart | 19 +--- .../src/objective_c_bindings_generated.dart | 91 ++++++++++--------- 4 files changed, 62 insertions(+), 60 deletions(-) diff --git a/pkgs/ffigen/lib/src/code_generator/objc_interface.dart b/pkgs/ffigen/lib/src/code_generator/objc_interface.dart index 3c219245a5..b683e979e6 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_interface.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_interface.dart @@ -22,6 +22,11 @@ class ObjCInterface extends BindingType with ObjCMethods, HasLocalScope { String? module; ObjCClassGlobal? classObject; + ObjCClassGlobal fillClassObject() => classObject ??= ObjCClassGlobal( + '_class_${symbol.oldName}', + originalName, + module, + ); late final ObjCInternalGlobal _isKindOfClass; late final ObjCMsgSendFunc _isKindOfClassMsgSend; final protocols = []; diff --git a/pkgs/ffigen/lib/src/code_generator/objc_protocol.dart b/pkgs/ffigen/lib/src/code_generator/objc_protocol.dart index 71bebbe782..f3627db88d 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_protocol.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_protocol.dart @@ -20,6 +20,13 @@ class ObjCProtocol extends BindingType with ObjCMethods, HasLocalScope { String? module; ObjCProtocolGlobal? protocolPointer; + ObjCProtocolGlobal fillProtocolObject() => + protocolPointer ??= ObjCProtocolGlobal( + '_protocol_${symbol.oldName}', + originalName, + module, + loaderSymbol, + ); late final ObjCInternalGlobal _conformsTo; late final ObjCMsgSendFunc _conformsToMsgSend; final ApiAvailability apiAvailability; diff --git a/pkgs/ffigen/lib/src/visitor/fill_method_dependencies.dart b/pkgs/ffigen/lib/src/visitor/fill_method_dependencies.dart index 34e237ad6e..127e592399 100644 --- a/pkgs/ffigen/lib/src/visitor/fill_method_dependencies.dart +++ b/pkgs/ffigen/lib/src/visitor/fill_method_dependencies.dart @@ -30,11 +30,7 @@ class FillMethodDependenciesVisitation extends Visitation { if (!finalBindings.contains(node)) return; if (!node.generateAsStub) { - node.classObject ??= ObjCClassGlobal( - '_class_${node.symbol.oldName}', - node.originalName, - node.module, - ); + node.fillClassObject(); node.visitChildren(visitor); _adder.visit(node.classObject); for (final method in node.methods) { @@ -49,11 +45,7 @@ class FillMethodDependenciesVisitation extends Visitation { node.visitChildren(visitor); if (node.methods.any((m) => m.isClassMethod)) { - node.parent.classObject ??= ObjCClassGlobal( - '_class_${node.parent.symbol.oldName}', - node.parent.originalName, - node.parent.module, - ); + node.parent.fillClassObject(); _adder.visit(node.parent.classObject); } for (final method in node.methods) { @@ -66,12 +58,7 @@ class FillMethodDependenciesVisitation extends Visitation { if (!finalBindings.contains(node)) return; if (!node.generateAsStub) { - node.protocolPointer ??= ObjCProtocolGlobal( - '_protocol_${node.originalName}', - node.originalName, - node.module, - node.loaderSymbol, - ); + node.fillProtocolObject(); node.visitChildren(visitor); _adder.visit(node.protocolPointer); for (final method in node.methods) { 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 0d49bca8ec..d22ac6b7ec 100644 --- a/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart +++ b/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart @@ -15712,7 +15712,7 @@ extension type NSObjectProtocol._(objc.ObjCProtocol object$) return _objc_msgSend_e3qsqz( obj.ref.pointer, _sel_conformsToProtocol_, - _protocol_NSObject, + _protocol_NSObjectProtocol, ); } } @@ -15907,7 +15907,7 @@ extension NSObjectProtocol$Methods on NSObjectProtocol { interface class NSObjectProtocol$Builder { /// Returns the [objc.Protocol] object for this protocol. static objc.Protocol get $protocol => - objc.Protocol.fromPointer(_protocol_NSObject.cast()); + objc.Protocol.fromPointer(_protocol_NSObjectProtocol.cast()); /// Builds an object that implements the NSObject protocol. To implement /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. @@ -16420,7 +16420,7 @@ interface class NSObjectProtocol$Builder { /// autorelease static final autorelease = objc.ObjCProtocolMethod( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_autorelease, ffi.Native.addressOf< ffi.NativeFunction< @@ -16432,7 +16432,7 @@ interface class NSObjectProtocol$Builder { >(_1wx624s_protocolTrampoline_1mbt9g9) .cast(), objc.getProtocolMethodSignature( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_autorelease, isRequired: true, isInstanceMethod: true, @@ -16445,7 +16445,7 @@ interface class NSObjectProtocol$Builder { /// class static final class$ = objc.ObjCProtocolMethod( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_class, ffi.Native.addressOf< ffi.NativeFunction< @@ -16457,7 +16457,7 @@ interface class NSObjectProtocol$Builder { >(_1wx624s_protocolTrampoline_1mbt9g9) .cast(), objc.getProtocolMethodSignature( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_class, isRequired: true, isInstanceMethod: true, @@ -16471,7 +16471,7 @@ interface class NSObjectProtocol$Builder { /// conformsToProtocol: static final conformsToProtocol_ = objc.ObjCProtocolMethod( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_conformsToProtocol_, ffi.Native.addressOf< ffi.NativeFunction< @@ -16484,7 +16484,7 @@ interface class NSObjectProtocol$Builder { >(_1wx624s_protocolTrampoline_3su7tt) .cast(), objc.getProtocolMethodSignature( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_conformsToProtocol_, isRequired: true, isInstanceMethod: true, @@ -16497,7 +16497,7 @@ interface class NSObjectProtocol$Builder { /// debugDescription static final debugDescription = objc.ObjCProtocolMethod( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_debugDescription, ffi.Native.addressOf< ffi.NativeFunction< @@ -16509,7 +16509,7 @@ interface class NSObjectProtocol$Builder { >(_1wx624s_protocolTrampoline_1mbt9g9) .cast(), objc.getProtocolMethodSignature( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_debugDescription, isRequired: false, isInstanceMethod: true, @@ -16521,7 +16521,7 @@ interface class NSObjectProtocol$Builder { /// description static final description = objc.ObjCProtocolMethod( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_description, ffi.Native.addressOf< ffi.NativeFunction< @@ -16533,7 +16533,7 @@ interface class NSObjectProtocol$Builder { >(_1wx624s_protocolTrampoline_1mbt9g9) .cast(), objc.getProtocolMethodSignature( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_description, isRequired: true, isInstanceMethod: true, @@ -16545,7 +16545,7 @@ interface class NSObjectProtocol$Builder { /// hash static final hash = objc.ObjCProtocolMethod( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_hash, ffi.Native.addressOf< ffi.NativeFunction< @@ -16557,7 +16557,7 @@ interface class NSObjectProtocol$Builder { >(_1wx624s_protocolTrampoline_1ckyi24) .cast(), objc.getProtocolMethodSignature( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_hash, isRequired: true, isInstanceMethod: true, @@ -16571,7 +16571,7 @@ interface class NSObjectProtocol$Builder { /// isEqual: static final isEqual_ = objc.ObjCProtocolMethod( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_isEqual_, ffi.Native.addressOf< ffi.NativeFunction< @@ -16584,7 +16584,7 @@ interface class NSObjectProtocol$Builder { >(_1wx624s_protocolTrampoline_3su7tt) .cast(), objc.getProtocolMethodSignature( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_isEqual_, isRequired: true, isInstanceMethod: true, @@ -16598,7 +16598,7 @@ interface class NSObjectProtocol$Builder { /// isKindOfClass: static final isKindOfClass_ = objc.ObjCProtocolMethod( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_isKindOfClass_, ffi.Native.addressOf< ffi.NativeFunction< @@ -16611,7 +16611,7 @@ interface class NSObjectProtocol$Builder { >(_1wx624s_protocolTrampoline_3su7tt) .cast(), objc.getProtocolMethodSignature( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_isKindOfClass_, isRequired: true, isInstanceMethod: true, @@ -16625,7 +16625,7 @@ interface class NSObjectProtocol$Builder { /// isMemberOfClass: static final isMemberOfClass_ = objc.ObjCProtocolMethod( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_isMemberOfClass_, ffi.Native.addressOf< ffi.NativeFunction< @@ -16638,7 +16638,7 @@ interface class NSObjectProtocol$Builder { >(_1wx624s_protocolTrampoline_3su7tt) .cast(), objc.getProtocolMethodSignature( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_isMemberOfClass_, isRequired: true, isInstanceMethod: true, @@ -16651,7 +16651,7 @@ interface class NSObjectProtocol$Builder { /// isProxy static final isProxy = objc.ObjCProtocolMethod( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_isProxy, ffi.Native.addressOf< ffi.NativeFunction< @@ -16663,7 +16663,7 @@ interface class NSObjectProtocol$Builder { >(_1wx624s_protocolTrampoline_e3qsqz) .cast(), objc.getProtocolMethodSignature( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_isProxy, isRequired: true, isInstanceMethod: true, @@ -16678,7 +16678,7 @@ interface class NSObjectProtocol$Builder { objc.ObjCProtocolMethod< objc.ObjCObject Function(ffi.Pointer) >( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_performSelector_, ffi.Native.addressOf< ffi.NativeFunction< @@ -16691,7 +16691,7 @@ interface class NSObjectProtocol$Builder { >(_1wx624s_protocolTrampoline_50as9u) .cast(), objc.getProtocolMethodSignature( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_performSelector_, isRequired: true, isInstanceMethod: true, @@ -16711,7 +16711,7 @@ interface class NSObjectProtocol$Builder { objc.ObjCObject, ) >( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_performSelector_withObject_, ffi.Native.addressOf< ffi.NativeFunction< @@ -16725,7 +16725,7 @@ interface class NSObjectProtocol$Builder { >(_1wx624s_protocolTrampoline_1mllhpc) .cast(), objc.getProtocolMethodSignature( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_performSelector_withObject_, isRequired: true, isInstanceMethod: true, @@ -16755,7 +16755,7 @@ interface class NSObjectProtocol$Builder { objc.ObjCObject, ) >( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_performSelector_withObject_withObject_, ffi.Native.addressOf< ffi.NativeFunction< @@ -16770,7 +16770,7 @@ interface class NSObjectProtocol$Builder { >(_1wx624s_protocolTrampoline_c7gk2u) .cast(), objc.getProtocolMethodSignature( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_performSelector_withObject_withObject_, isRequired: true, isInstanceMethod: true, @@ -16795,7 +16795,7 @@ interface class NSObjectProtocol$Builder { /// release static final release = objc.ObjCProtocolListenableMethod( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_release, ffi.Native.addressOf< ffi.NativeFunction< @@ -16807,7 +16807,7 @@ interface class NSObjectProtocol$Builder { >(_1wx624s_protocolTrampoline_ovsamd) .cast(), objc.getProtocolMethodSignature( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_release, isRequired: true, isInstanceMethod: true, @@ -16824,7 +16824,7 @@ interface class NSObjectProtocol$Builder { /// respondsToSelector: static final respondsToSelector_ = objc.ObjCProtocolMethod)>( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_respondsToSelector_, ffi.Native.addressOf< ffi.NativeFunction< @@ -16837,7 +16837,7 @@ interface class NSObjectProtocol$Builder { >(_1wx624s_protocolTrampoline_w1e3k0) .cast(), objc.getProtocolMethodSignature( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_respondsToSelector_, isRequired: true, isInstanceMethod: true, @@ -16851,7 +16851,7 @@ interface class NSObjectProtocol$Builder { /// retain static final retain = objc.ObjCProtocolMethod( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_retain, ffi.Native.addressOf< ffi.NativeFunction< @@ -16863,7 +16863,7 @@ interface class NSObjectProtocol$Builder { >(_1wx624s_protocolTrampoline_1mbt9g9) .cast(), objc.getProtocolMethodSignature( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_retain, isRequired: true, isInstanceMethod: true, @@ -16876,7 +16876,7 @@ interface class NSObjectProtocol$Builder { /// retainCount static final retainCount = objc.ObjCProtocolMethod( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_retainCount, ffi.Native.addressOf< ffi.NativeFunction< @@ -16888,7 +16888,7 @@ interface class NSObjectProtocol$Builder { >(_1wx624s_protocolTrampoline_1ckyi24) .cast(), objc.getProtocolMethodSignature( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_retainCount, isRequired: true, isInstanceMethod: true, @@ -16901,7 +16901,7 @@ interface class NSObjectProtocol$Builder { /// self static final self = objc.ObjCProtocolMethod( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_self, ffi.Native.addressOf< ffi.NativeFunction< @@ -16913,7 +16913,7 @@ interface class NSObjectProtocol$Builder { >(_1wx624s_protocolTrampoline_1mbt9g9) .cast(), objc.getProtocolMethodSignature( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_self, isRequired: true, isInstanceMethod: true, @@ -16926,7 +16926,7 @@ interface class NSObjectProtocol$Builder { /// superclass static final superclass = objc.ObjCProtocolMethod( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_superclass, ffi.Native.addressOf< ffi.NativeFunction< @@ -16938,7 +16938,7 @@ interface class NSObjectProtocol$Builder { >(_1wx624s_protocolTrampoline_1mbt9g9) .cast(), objc.getProtocolMethodSignature( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_superclass, isRequired: true, isInstanceMethod: true, @@ -16951,7 +16951,7 @@ interface class NSObjectProtocol$Builder { /// zone static final zone = objc.ObjCProtocolMethod Function()>( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_zone, ffi.Native.addressOf< ffi.NativeFunction< @@ -16963,7 +16963,7 @@ interface class NSObjectProtocol$Builder { >(_1wx624s_protocolTrampoline_1a8cl66) .cast(), objc.getProtocolMethodSignature( - _protocol_NSObject, + _protocol_NSObjectProtocol, _sel_zone, isRequired: true, isInstanceMethod: true, @@ -41103,8 +41103,11 @@ final _protocol_NSMutableCopying = objc.getProtocol( @ffi.Native Function()>( symbol: '_1wx624s_NSObject', ) -external ffi.Pointer _protocol_NSObject_raw(); -final _protocol_NSObject = objc.getProtocol("NSObject", _protocol_NSObject_raw); +external ffi.Pointer _protocol_NSObjectProtocol_raw(); +final _protocol_NSObjectProtocol = objc.getProtocol( + "NSObject", + _protocol_NSObjectProtocol_raw, +); @ffi.Native Function()>( symbol: '_1wx624s_NSPortDelegate', ) From 98c09b98d790da99b1423ebd725e6af663c17cc1 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Tue, 4 Aug 2026 11:37:17 +1000 Subject: [PATCH 33/37] fix enum recommendation behavior --- .../lib/src/code_generator/compound.dart | 6 ++--- .../lib/src/code_generator/enum_class.dart | 12 +++++---- .../lib/src/config_provider/public_ast.dart | 4 +-- .../sub_parsers/enumdecl_parser.dart | 4 ++- pkgs/ffigen/test/public_ast_visitor_test.dart | 26 +++++++++++++++++++ 5 files changed, 41 insertions(+), 11 deletions(-) diff --git a/pkgs/ffigen/lib/src/code_generator/compound.dart b/pkgs/ffigen/lib/src/code_generator/compound.dart index d61760f781..a6d2c39c96 100644 --- a/pkgs/ffigen/lib/src/code_generator/compound.dart +++ b/pkgs/ffigen/lib/src/code_generator/compound.dart @@ -83,7 +83,7 @@ abstract class Compound extends BindingType with HasLocalScope { bool _isEnumDartStyleMember(CompoundMember member) { final type = member.type; - return type is EnumClass && type.style == EnumStyle.dartEnum; + return type is EnumClass && type.resolvedStyle == EnumStyle.dartEnum; } String _memberStorageName(CompoundMember member) { @@ -194,8 +194,8 @@ abstract class Compound extends BindingType with HasLocalScope { ); } if (m.type case EnumClass( - :final style, - ) when style == EnumStyle.dartEnum) { + :final resolvedStyle, + ) when resolvedStyle == EnumStyle.dartEnum) { final enumName = m.type.getDartType(context); final memberName = m.name; s.write( diff --git a/pkgs/ffigen/lib/src/code_generator/enum_class.dart b/pkgs/ffigen/lib/src/code_generator/enum_class.dart index 60b5907275..5744851946 100644 --- a/pkgs/ffigen/lib/src/code_generator/enum_class.dart +++ b/pkgs/ffigen/lib/src/code_generator/enum_class.dart @@ -51,7 +51,7 @@ class EnumClass extends BindingType with HasLocalScope { Context context; /// Whether this enum should be generated as a collection of integers. - EnumStyle style; + EnumStyle? style; /// Don't code gen this alias at all, just use the [nativeType] directly. bool isAnonymous; @@ -69,13 +69,15 @@ class EnumClass extends BindingType with HasLocalScope { Type? nativeType, List? enumConstants, required this.context, - this.style = EnumStyle.dartEnum, + this.style, this.isAnonymous = false, this.apiAvailability, this.silenceWarning = false, }) : nativeType = nativeType ?? intType, enumConstants = enumConstants ?? []; + EnumStyle get resolvedStyle => style ?? EnumStyle.dartEnum; + /// Returns a string to declare the enum member and any documentation it may /// have had. String _formatValue(EnumConstant ec, {bool asInt = false}) { @@ -217,7 +219,7 @@ class EnumClass extends BindingType with HasLocalScope { _writeDartDoc(s); if (enumConstants.isEmpty) { _writeEmptyEnum(s); - } else if (style == EnumStyle.intConstants) { + } else if (resolvedStyle == EnumStyle.intConstants) { s.write('sealed class $name {\n'); _writeIntegerConstants(s); s.write('}\n\n'); @@ -246,7 +248,7 @@ class EnumClass extends BindingType with HasLocalScope { @override String getDartType(Context context) { - if (style == EnumStyle.intConstants) { + if (resolvedStyle == EnumStyle.intConstants) { return nativeType.getDartType(context); } else if (isObjCImport) { return '${context.libs.prefix(objcPkgImport)}.$name'; @@ -263,7 +265,7 @@ class EnumClass extends BindingType with HasLocalScope { bool get sameFfiDartAndCType => nativeType.sameFfiDartAndCType; @override - bool get sameDartAndFfiDartType => style == EnumStyle.intConstants; + bool get sameDartAndFfiDartType => resolvedStyle == EnumStyle.intConstants; @override String? getDefaultValue(Context context) => '0'; diff --git a/pkgs/ffigen/lib/src/config_provider/public_ast.dart b/pkgs/ffigen/lib/src/config_provider/public_ast.dart index 9ff98b867f..aa93d741c7 100644 --- a/pkgs/ffigen/lib/src/config_provider/public_ast.dart +++ b/pkgs/ffigen/lib/src/config_provider/public_ast.dart @@ -440,8 +440,8 @@ class EnumClass implements Decl { @override set isIncluded(bool value) => _binding.userDefinedIsIncluded = value; - EnumStyle get style => _binding.style; - set style(EnumStyle value) => _binding.style = value; + EnumStyle? get style => _binding.style; + set style(EnumStyle? value) => _binding.style = value; bool get silenceWarning => _binding.silenceWarning; set silenceWarning(bool value) => _binding.silenceWarning = value; diff --git a/pkgs/ffigen/lib/src/header_parser/sub_parsers/enumdecl_parser.dart b/pkgs/ffigen/lib/src/header_parser/sub_parsers/enumdecl_parser.dart index e8e0f7955e..dc8a2a2fc6 100644 --- a/pkgs/ffigen/lib/src/header_parser/sub_parsers/enumdecl_parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/sub_parsers/enumdecl_parser.dart @@ -104,7 +104,9 @@ EnumClass parseEnumDeclaration(clang_types.CXCursor cursor, Context context) { rethrow; } }); - enumClass.style = isNSOptions ? EnumStyle.intConstants : EnumStyle.dartEnum; + if (isNSOptions) { + enumClass.style = EnumStyle.intConstants; + } context.bindingsIndex.addEnumToSeen(usr, enumClass); } diff --git a/pkgs/ffigen/test/public_ast_visitor_test.dart b/pkgs/ffigen/test/public_ast_visitor_test.dart index 14c51e6b36..5c6d7ce012 100644 --- a/pkgs/ffigen/test/public_ast_visitor_test.dart +++ b/pkgs/ffigen/test/public_ast_visitor_test.dart @@ -194,6 +194,32 @@ void main() { expect(enumClass.silenceWarning, isTrue); }); + test('EnumClass.style nullability on public AST', () { + final headerUri = Uri.file( + absPath('test/header_parser_tests/enum_int_mimic.h'), + ); + EnumStyle? initialStyle; + final generator = FfiGenerator( + input: Input(entryPoints: [headerUri]), + output: Output(dartFile: Uri.file('unused.dart')), + visitors: [ + const IncludeAllVisitor(), + Visitor.callback( + visitEnum: (node) { + initialStyle = node.style; + node.style = EnumStyle.intConstants; + }, + ), + ], + ); + + final library = parser.parse(testContext(generator)); + final enumClass = library.getBinding('Simple') as code_gen.EnumClass; + expect(initialStyle, isNull); + expect(enumClass.style, EnumStyle.intConstants); + expect(enumClass.resolvedStyle, EnumStyle.intConstants); + }); + test( 'ObjCInterface.includeCategories option on public AST', () { From c425c0072447c1ddb10670b108e17f22119821aa Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Tue, 4 Aug 2026 11:57:29 +1000 Subject: [PATCH 34/37] clean --- pkgs/ffigen/lib/src/header_parser/parser.dart | 10 +-- ...rs.dart => collect_included_bindings.dart} | 72 ++++++------------- 2 files changed, 27 insertions(+), 55 deletions(-) rename pkgs/ffigen/lib/src/visitor/{apply_config_filters.dart => collect_included_bindings.dart} (54%) diff --git a/pkgs/ffigen/lib/src/header_parser/parser.dart b/pkgs/ffigen/lib/src/header_parser/parser.dart index 14227a2c6b..8fc0c5bff9 100644 --- a/pkgs/ffigen/lib/src/header_parser/parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/parser.dart @@ -16,8 +16,8 @@ import '../config_provider/public_ast.dart' as public_ast; import '../config_provider/utils.dart'; import '../context.dart'; import '../strings.dart' as strings; -import '../visitor/apply_config_filters.dart'; import '../visitor/ast.dart'; +import '../visitor/collect_included_bindings.dart'; import '../visitor/copy_methods_from_super_type.dart'; import '../visitor/create_scopes.dart'; import '../visitor/fill_method_dependencies.dart'; @@ -201,10 +201,10 @@ List transformBindings(List rawBindings, Context context) { allBindings.clear(); allBindings.addAll(expandedBindings.where((b) => !b.isObjCImport)); - final applyConfigFiltersVisitation = ApplyConfigFiltersVisitation(config); - visit(context, applyConfigFiltersVisitation, allBindingsWithImports); - final directlyIncluded = applyConfigFiltersVisitation.directlyIncluded; - final indirectlyIncluded = applyConfigFiltersVisitation.indirectlyIncluded; + final collectIncludedBindings = CollectIncludedBindingsVisitation(config); + visit(context, collectIncludedBindings, allBindingsWithImports); + final directlyIncluded = collectIncludedBindings.directlyIncluded; + final indirectlyIncluded = collectIncludedBindings.indirectlyIncluded; final included = directlyIncluded.union(indirectlyIncluded); final byValueCompounds = visit( diff --git a/pkgs/ffigen/lib/src/visitor/apply_config_filters.dart b/pkgs/ffigen/lib/src/visitor/collect_included_bindings.dart similarity index 54% rename from pkgs/ffigen/lib/src/visitor/apply_config_filters.dart rename to pkgs/ffigen/lib/src/visitor/collect_included_bindings.dart index 1109cd5d9f..7b3e776328 100644 --- a/pkgs/ffigen/lib/src/visitor/apply_config_filters.dart +++ b/pkgs/ffigen/lib/src/visitor/collect_included_bindings.dart @@ -7,14 +7,15 @@ import '../config_provider/config.dart' show Config; import 'ast.dart'; -class ApplyConfigFiltersVisitation extends Visitation { +class CollectIncludedBindingsVisitation extends Visitation { final Config config; final directlyIncluded = {}; final indirectlyIncluded = {}; - ApplyConfigFiltersVisitation(this.config); + CollectIncludedBindingsVisitation(this.config); - void _visitImpl(Binding node) { - if (node.originalName == '') return; + @override + void visitBinding(Binding node) { + if (node.originalName.isEmpty) return; if (node.userDefinedIsIncluded == false) return; if (node.userDefinedIsIncluded == true) { directlyIncluded.add(node); @@ -26,29 +27,12 @@ class ApplyConfigFiltersVisitation extends Visitation { node.visitChildren(visitor); } - @override - void visitStruct(Struct node) => _visitImpl(node); - - @override - void visitUnion(Union node) => _visitImpl(node); - @override void visitEnumClass(EnumClass node) { if (node.isAnonymous) return; - _visitImpl(node); + visitBinding(node); } - @override - void visitCppClass(CppClass node) { - _visitImpl(node); - } - - @override - void visitFunc(Func node) => _visitImpl(node); - - @override - void visitMacroConstant(MacroConstant node) => _visitImpl(node); - @override void visitObjCInterface(ObjCInterface node) { if (node.unavailable) return; @@ -58,7 +42,7 @@ class ApplyConfigFiltersVisitation extends Visitation { (m) => m.userDefinedIsIncluded != false && !m.unavailable, ); } - _visitImpl(node); + visitBinding(node); // If this node is included, include all its super types. if (directlyIncluded.contains(node)) { @@ -71,43 +55,31 @@ class ApplyConfigFiltersVisitation extends Visitation { @override void visitObjCCategory(ObjCCategory node) { - node.filterMethods((m) { - if (m.userDefinedIsIncluded == false) return false; - if (m.unavailable) return false; - if (node.shouldCopyMethodToInterface(m)) return false; - return m.userDefinedIsIncluded != false; - }); - _visitImpl(node); + node.filterMethods( + (m) => + m.userDefinedIsIncluded != false && + !m.unavailable && + !node.shouldCopyMethodToInterface(m), + ); + visitBinding(node); } @override void visitObjCProtocol(ObjCProtocol node) { if (node.unavailable) return; - node.filterMethods((m) { - if (m.userDefinedIsIncluded == false) return false; - if (m.unavailable) return false; - if (m.isClassMethod) return false; - - return m.userDefinedIsIncluded != false; - }); - _visitImpl(node); - } - - @override - void visitUnnamedEnumConstant(UnnamedEnumConstant node) => _visitImpl(node); - - @override - void visitGlobal(Global node) => _visitImpl(node); - - @override - void visitConstant(Constant node) { - _visitImpl(node); + node.filterMethods( + (m) => + m.userDefinedIsIncluded != false && + !m.unavailable && + !m.isClassMethod, + ); + visitBinding(node); } @override void visitTypealias(Typealias node) { if (node.isAnonymous) return; - _visitImpl(node); + visitBinding(node); } } From eb0f393ded7b6a8d283d372f560d16dbdf647dd4 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Tue, 4 Aug 2026 12:36:47 +1000 Subject: [PATCH 35/37] clean up --- pkgs/ffigen/lib/src/visitor/opaque_compounds.dart | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/pkgs/ffigen/lib/src/visitor/opaque_compounds.dart b/pkgs/ffigen/lib/src/visitor/opaque_compounds.dart index 0fe407dbae..262597a262 100644 --- a/pkgs/ffigen/lib/src/visitor/opaque_compounds.dart +++ b/pkgs/ffigen/lib/src/visitor/opaque_compounds.dart @@ -40,20 +40,15 @@ class ClearOpaqueCompoundMembersVisitation extends Visitation { ClearOpaqueCompoundMembersVisitation(this.byValueCompounds, this.included); - void _visitImpl(Compound node) { + @override + void visitCompound(Compound node) { // If a compound isn't referred to by value, isn't explicitly included by // the config filters, and the config is using opaque deps, convert the // compound to be opaque by deleting its members. if (!byValueCompounds.contains(node) && - (node.originalName.isEmpty || !included.contains(node)) && + !included.contains(node) && node.dependencies == CompoundDependencies.opaque) { node.members.clear(); } } - - @override - void visitStruct(Struct node) => _visitImpl(node); - - @override - void visitUnion(Union node) => _visitImpl(node); } From aa9fb00a8701eb7a869a5fd84ec883b8d066a5cd Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Tue, 4 Aug 2026 14:21:21 +1000 Subject: [PATCH 36/37] clean up --- .../src/visitor/fill_method_dependencies.dart | 26 +++++++------------ 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/pkgs/ffigen/lib/src/visitor/fill_method_dependencies.dart b/pkgs/ffigen/lib/src/visitor/fill_method_dependencies.dart index 127e592399..c4dcf0cb15 100644 --- a/pkgs/ffigen/lib/src/visitor/fill_method_dependencies.dart +++ b/pkgs/ffigen/lib/src/visitor/fill_method_dependencies.dart @@ -93,10 +93,6 @@ class _MethodDepAdderVisitation extends Visitation { void visitObjCMsgSendFunc(ObjCMsgSendFunc node) => node.visitChildren(visitor); - @override - void visitObjCMsgSendVariantFunc(ObjCMsgSendVariantFunc node) => - finalBindings.add(node); - @override void visitNoLookUpBinding(NoLookUpBinding node) => finalBindings.add(node); @@ -106,6 +102,15 @@ class _MethodDepAdderVisitation extends Visitation { finalBindings.add(node); } + @override + void visitObjCInterface(ObjCInterface node) { + if (node.isInternal) { + finalBindings.add(node); + node.visitChildren(visitor); + } + if (!node.isObjCImport) finalBindings.add(node); + } + @override void visitFunc(Func node) => finalBindings.add(node); @@ -116,17 +121,4 @@ class _MethodDepAdderVisitation extends Visitation { @override void visitObjCBlockWrapperFuncs(ObjCBlockWrapperFuncs node) => node.visitChildren(visitor); - - @override - void visitObjCInterface(ObjCInterface node) { - if (node.isInternal) { - finalBindings.add(node); - node.visitChildren(visitor); - } - if (node.isObjCImport) return; - if (!finalBindings.contains(node)) { - node.generateAsStub = true; - finalBindings.add(node); - } - } } From a68ad13f3105df477165d0347efb3b00d1046239 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Tue, 4 Aug 2026 14:23:23 +1000 Subject: [PATCH 37/37] clean up --- pkgs/ffigen/lib/src/visitor/fill_method_dependencies.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/ffigen/lib/src/visitor/fill_method_dependencies.dart b/pkgs/ffigen/lib/src/visitor/fill_method_dependencies.dart index c4dcf0cb15..e71936dad5 100644 --- a/pkgs/ffigen/lib/src/visitor/fill_method_dependencies.dart +++ b/pkgs/ffigen/lib/src/visitor/fill_method_dependencies.dart @@ -93,6 +93,10 @@ class _MethodDepAdderVisitation extends Visitation { void visitObjCMsgSendFunc(ObjCMsgSendFunc node) => node.visitChildren(visitor); + @override + void visitObjCMsgSendVariantFunc(ObjCMsgSendVariantFunc node) => + finalBindings.add(node); + @override void visitNoLookUpBinding(NoLookUpBinding node) => finalBindings.add(node);