Documentation
Language: Swift
Documentation
gir2swift
Articles
gir2swift
libgir2swift
Command and configuration
S
Gir2Swift
Initializers
M
init()
M
init(from: any Decoder) throws
Instance Methods
M
func run() throws
Default Implementations
ParsableArguments Implementations
Instance Methods
M
func validate() throws
Type Methods
M
static func completionScript(for: CompletionShell) -> String
M
static func exit(withError: (any Error)?) -> Never
M
static func exitCode(for: any Error) -> ExitCode
M
static func fullMessage(for: any Error, columns: Int?) -> String
M
static func helpMessage(columns: Int?) -> String
M
static func helpMessage(includeHidden: Bool, columns: Int?) -> String
M
static func message(for: any Error) -> String
M
static func parse([String]?) throws -> Self
M
static func parseOrExit([String]?) -> Self
M
static func usageString(includeHidden: Bool) -> String
ParsableCommand Implementations
Instance Methods
M
func run() throws
Type Properties
P
static var configuration: CommandConfiguration
Type Methods
M
static func helpMessage(for: any ParsableCommand.Type, columns: Int?) -> String
M
static func helpMessage(for: any ParsableCommand.Type, includeHidden: Bool, columns: Int?) -> String
M
static func main()
M
static func main([String]?)
M
static func parseAsRoot([String]?) throws -> any ParsableCommand
M
static func usageString(for: any ParsableCommand.Type, includeHidden: Bool) -> String
GIR document
C
GIR
Classes
C
GIR.Alias
Instance Properties
P
var kind: String
C
GIR.Argument
Initializers
M
init(name: String, cname: String, type: TypeReference, instance: Bool, comment: String, introspectable: Bool, deprecated: String?, varargs: Bool, isNullable: Bool, allowNone: Bool, isOptional: Bool, callerAllocates: Bool, ownershipTransfer: OwnershipTransfer, direction: ParameterDirection)
M
init(node: XMLElement, at: Int, defaultDirection: ParameterDirection)
M
init(node: XMLElement, at: Int, varargs: Bool, defaultDirection: ParameterDirection)
Instance Properties
P
let allowNone: Bool
P
var argumentTypeName: String
P
var callbackArgumentTypeName: String
P
let callerAllocates: Bool
P
var defaultRefTemplateTypeName: String
P
let direction: ParameterDirection
P
let instance: Bool
P
let isNullable: Bool
P
let isOptional: Bool
P
var kind: String
P
var nonNullableTemplateDecl: String?
P
let ownershipTransfer: OwnershipTransfer
P
var templateTypeName: String
P
var varargs: Bool
Instance Methods
M
func optionalIfNullable(String) -> String
M
func optionalIfNullableOrOptional(String) -> String
M
func templateName(for: GIR.Record) -> String
C
GIR.Bitfield
Instance Properties
P
var kind: String
Instance Methods
M
func registerKnownType()
C
GIR.CType
Initializers
M
init(fromChildrenOf: XMLElement, at: Int, nameAttr: String, privateAttr: String, readableAttr: String, writableAttr: String, scopeAttr: String)
M
init(name: String, cname: String, type: TypeReference, comment: String, introspectable: Bool, deprecated: String?, isPrivate: Bool, isReadable: Bool, isWritable: Bool, contains: [CType], tupleSize: Int?, scope: String?)
M
init(node: XMLElement, at: Int, nameAttr: String, privateAttr: String, readableAttr: String, writableAttr: String, scopeAttr: String)
Instance Properties
P
var argumentName: String
P
var camelQuoted: String
P
let cname: String
P
let containedTypes: [CType]
P
var containsGPointer: Bool
P
var idiomaticClassRef: TypeReference
P
var idiomaticClassTypeName: String
P
var idiomaticWrappedRef: TypeReference
P
var idiomaticWrappedTypeName: String
P
var isAnyKindOfPointer: Bool
P
var isArray: Bool
P
var isGPointer: Bool
P
var isKnownBitfield: Bool
P
var isKnownRecord: Bool
P
var isKnownRecordReference: Bool
P
var isKnownType: Bool
P
let isPrivate: Bool
P
let isReadable: Bool
P
var isScalarArray: Bool
P
var isVoid: Bool
P
let isWritable: Bool
P
var kind: String
P
var knownBitfield: GIR.Bitfield?
P
var knownNameRecord: GIR.Record?
P
var knownRecord: GIR.Record?
P
var knownRecordReference: GIR.Record?
P
var knownType: GIR.Datatype?
P
var nonClashingName: String
P
var prefixedArgumentName: String
P
var prefixedIdiomaticClassRef: TypeReference
P
var prefixedIdiomaticClassTypeName: String
P
var prefixedIdiomaticWrappedRef: TypeReference
P
var prefixedIdiomaticWrappedTypeName: String
P
var returnTypeName: String
P
let scope: String?
P
var swiftParamRef: TypeReference
P
var swiftReturnRef: TypeReference
P
var swiftSignalRef: TypeReference
P
var swiftType: String
P
var templateDecl: String?
P
let tupleSize: Int?
Instance Methods
M
func isInstanceOf(GIR.Record?) -> Bool
M
func isInstanceOfHierarchy(GIR.Record) -> Bool
M
func maybeOptional(for: GIR.Record?) -> Bool
M
func prefixed(ref: TypeReference) -> TypeReference
M
func returnTypeName(for: GIR.Record?, beingIdiomatic: Bool, useStruct: Bool) -> String
C
GIR.Callback
Instance Properties
P
var kind: String
C
GIR.Class
Instance Properties
P
var kind: String
P
let parent: String
P
var parentType: Record?
P
var rootType: Record
C
GIR.Constant
Initializers
M
init(name: String, cname: String, type: TypeReference, value: Int, comment: String, introspectable: Bool, deprecated: String?)
M
init(node: XMLElement, at: Int, nameAttr: String)
Instance Properties
P
var kind: String
P
let value: Int
C
GIR.Datatype
Initializers
M
init(name: String, type: TypeReference, comment: String, introspectable: Bool, deprecated: String?)
M
init(node: XMLElement, at: Int, with: TypeReference?, nameAttr: String)
Instance Properties
P
var identifier: String?
P
var isVoid: Bool
P
var kind: String
P
var typeRef: TypeReference
P
var underlyingCRef: TypeReference
Instance Methods
M
func registerKnownType()
C
GIR.Enumeration
Initializers
M
init(name: String, type: TypeReference, members: [Member], comment: String, introspectable: Bool, deprecated: String?)
M
init(node: XMLElement, at: Int)
Instance Properties
P
var kind: String
P
let members: [Member]
Instance Methods
M
func registerKnownType()
Type Aliases
T
GIR.Enumeration.Member
C
GIR.Field
Initializers
M
init(node: XMLElement, at: Int)
Instance Properties
P
var containedCallback: GIR.Callback?
P
var kind: String
C
GIR.Function
Instance Properties
P
var kind: String
C
GIR.Interface
Instance Properties
P
var kind: String
C
GIR.Method
Initializers
M
init(name: String, cname: String, returns: Argument, args: [Argument], comment: String, introspectable: Bool, deprecated: String?, throwsAnError: Bool)
M
init(node: XMLElement, at: Int)
Instance Properties
P
let args: [Argument]
P
var isBareFactory: Bool
P
var isDesignatedConstructor: Bool
P
var isGetter: Bool
P
var isRef: Bool
P
var isSetter: Bool
P
var isUnref: Bool
P
var kind: String
P
let returns: Argument
P
let throwsError: Bool
Instance Methods
M
func isConstructorOf(GIR.Record?) -> Bool
M
func isFactoryOf(GIR.Record?) -> Bool
M
func isGetterFor(setter: String) -> Bool
M
func isSetterFor(getter: String) -> Bool
C
GIR.Property
Instance Properties
P
var kind: String
C
GIR.Record
Initializers
M
init(name: String, cname: String, type: TypeReference, cprefix: String, correspondingCType: String?, typegetter: String?, isGTypeStructForType: String?, methods: [Method], functions: [Function], constructors: [Method], properties: [Property], fields: [Field], signals: [Signal], interfaces: [String], comment: String, introspectable: Bool, deprecated: String?)
M
init(node: XMLElement, at: Int)
Instance Properties
P
var allMethods: [Method]
P
var allProperties: [Property]
P
var allSignals: [Signal]
P
var className: String
P
var classRef: TypeReference
P
var classType: GIRRecordType
P
let constructors: [Method]
P
let correspondingCType: String?
P
let cprefix: String
P
let fields: [Field]
P
var functions: [GIR.Function]
P
var implements: [String]
P
var inheritedMethods: [Method]
P
var isGTypeStructForType: String?
P
var kind: String
P
let methods: [Method]
P
var nonDerivedProperties: [Property]
P
var parentType: Record?
P
let properties: [Property]
P
var protocolName: String
P
var protocolRef: TypeReference
P
var protocolType: GIRType
P
var ptrName: String
P
var records: [Record]
P
var ref: Method?
P
var rootType: Record
P
let signals: [Signal]
P
var structName: String
P
var structNamePrefixedIfNecessary: String
P
var structRef: TypeReference
P
var structType: GIRRecordType
P
var swift: String
P
var typeStruct: String?
P
let typegetter: String?
P
var unref: Method?
Instance Methods
M
func anyMethodMatching((Method) -> Bool) -> Method?
M
func has(property: String) -> Bool
M
func inheritedMethodMatching((Method) -> Bool) -> Method?
M
func methodMatching((Method) -> Bool) -> Method?
M
func registerKnownType()
C
GIR.Signal
Instance Properties
P
var kind: String
C
GIR.Thing
Operators
static func == (GIR.Thing, GIR.Thing) -> Bool
static func < (GIR.Thing, GIR.Thing) -> Bool
Initializers
M
init(name: String, comment: String, introspectable: Bool, disguised: Bool, deprecated: String?, markedAsDeprecated: Bool, version: String?)
M
init(node: XMLElement, at: Int, nameAttr: String)
Instance Properties
P
let comment: String
P
let deprecated: String?
P
let disguised: Bool
P
var escapedName: String
P
let introspectable: Bool
P
var kind: String
P
let markedAsDeprecated: Bool
P
let name: String
P
var swiftCamelCASEName: String
P
var swiftCamelCaseName: String
P
let version: String?
Instance Methods
M
func hash(into: inout Hasher)
Default Implementations
Comparable Implementations
Operators
static func ... (Self) -> PartialRangeFrom<Self>
static func ... (Self) -> PartialRangeThrough<Self>
static func ... (Self, Self) -> ClosedRange<Self>
static func ..< (Self) -> PartialRangeUpTo<Self>
static func ..< (Self, Self) -> Range<Self>
static func > (Self, Self) -> Bool
static func >= (Self, Self) -> Bool
static func <= (Self, Self) -> Bool
Equatable Implementations
Operators
static func != (Self, Self) -> Bool
C
GIR.Union
Instance Properties
P
var kind: String
Initializers
M
init?(buffer: UnsafeBufferPointer<CChar>, quiet: Bool)
M
init?(fromFile: String)
M
init(xmlDocument: XMLDocument, quiet: Bool)
Instance Properties
P
var aliases: [Alias]
P
var bitfields: [Bitfield]
P
var boilerPlate: String
P
var callbacks: [Callback]
P
var classes: [Class]
P
var constants: [Constant]
P
var enumerations: [Enumeration]
P
var functions: [Function]
P
var identifierPrefixes: [String]
P
var interfaces: [Interface]
P
var namespaces: AnySequence<XMLNameSpace>
P
var preamble: String
P
var prefix: String
P
var records: [Record]
P
var symbolPrefixes: [String]
P
var unions: [Union]
P
let xml: XMLDocument
Instance Methods
M
func buildClassHierarchy()
M
func buildConformanceGraph()
M
func dumpSwift() -> String
M
func recordImplementedInterfaces(for: Record) -> Set<TypeReference>
Type Properties
P
static let Bool: String
P
static let CChar: String
P
static var KnownFunctions: [String : Function]
P
static var aliases: Set<GIRType>
P
static var bitfields: Set<GIRType>
P
static let bool: String
P
static let boolRef: TypeReference
P
static var boolType: GIRType
P
static let cNumericTypes: Set<GIRType>
P
static var callbackSuffixes: [String]
P
static let cboolType: GIRType
P
static let ccharType: GIRType
P
static let cdoubleType: GIRType
P
static let cfloatType: GIRType
P
static let char: String
P
static let charPtr: TypeReference
P
static let cintType: GIRType
P
static let cldoubleType: GIRType
P
static let clongType: GIRType
P
static let constCharPtr: TypeReference
P
static let constErrorPointer: TypeReference
P
static let constFileRef: TypeReference
P
static let constGCharPtr: TypeReference
P
static let constGStringType: GIRStringType
P
static let constGUCharPtr: TypeReference
P
static let constGUStringType: GIRStringType
P
static let constPointerTypes: Set<GIRType>
P
static let constStringRef: TypeReference
P
static let constStringType: GIRStringType
P
static let constUTF8Ref: TypeReference
P
static let cscharType: GIRType
P
static let cshortType: GIRType
P
static let cucharType: GIRType
P
static let cuintType: GIRType
P
static let culongType: GIRType
P
static let cushortType: GIRType
P
static var docCHostingBasePath: String
P
static var dottedPrefix: String
P
static let doubleRef: TypeReference
P
static let doubleType: GIRType
P
static var enums: Set<GIRType>
P
static let error: String
P
static let errorPointer: TypeReference
P
static let errorProtocol: GIRType
P
static let errorReference: TypeReference
P
static let errorT: String
P
static let errorType: GIRType
P
static var errorTypes: Set<GIRType>
P
static var excludeList: Set<String>
P
static let fileRef: TypeReference
P
static let fileType: GIRType
P
static let filename: String
P
static let float80Type: GIRType
P
static let floatType: GIRType
P
static var forceUnwrapped: Set<String>
P
static let forceUnwrappedGConstPointerRef: TypeReference
P
static let forceUnwrappedGConstPointerType: GIRRawPointerType
P
static let forceUnwrappedGPointerRef: TypeReference
P
static let forceUnwrappedGPointerType: GIRRawPointerType
P
static var fundamentalTypes: Set<GIRType>
P
static let gErrorStruct: GIRType
P
static let gbooleanType: GIRType
P
static let gchar: String
P
static let gcharPtr: TypeReference
P
static let gcharType: GIRType
P
static let gconstpointer: String
P
static let gconstpointerB: String
P
static let gconstpointerMutablePointerRef: TypeReference
P
static let gconstpointerPointerRef: TypeReference
P
static let gconstpointerQ: String
P
static let gconstpointerRef: TypeReference
P
static let gconstpointerType: GIRRawPointerType
P
static let gdoubleType: GIRType
P
static let gerror: String
P
static let gerrorType: GIRType
P
static let gfloatType: GIRType
P
static let gint16Type: GIRType
P
static let gint32Type: GIRType
P
static let gint64Type: GIRType
P
static let gint8Type: GIRType
P
static let gintAlias: GIRType
P
static let gintRef: TypeReference
P
static let gintType: GIRType
P
static let glibNumericTypes: Set<GIRType>
P
static var glibPointerWrapper: String
P
static let glist: String
P
static let glongAlias: GIRType
P
static let glongRef: TypeReference
P
static let glongType: GIRType
P
static let goffsetType: GIRType
P
static let gpointer: String
P
static let gpointerB: String
P
static let gpointerConstPointerRef: TypeReference
P
static let gpointerConstPointerType: GIRRawPointerType
P
static let gpointerMutablePointerRef: TypeReference
P
static let gpointerPointerRef: TypeReference
P
static let gpointerQ: String
P
static let gpointerRef: TypeReference
P
static let gpointerType: GIRRawPointerType
P
static let gshortAlias: GIRType
P
static let gshortRef: TypeReference
P
static let gshortType: GIRType
P
static let gsizeType: GIRType
P
static let gstringType: GIRStringType
P
static let guchar: String
P
static let gucharPtr: TypeReference
P
static let gucharType: GIRType
P
static let guint16Type: GIRType
P
static let guint32Type: GIRType
P
static let guint64Type: GIRType
P
static let guint8Type: GIRType
P
static let guintAlias: GIRType
P
static let guintRef: TypeReference
P
static let guintType: GIRType
P
static let gulongAlias: GIRType
P
static let gulongRef: TypeReference
P
static let gulongType: GIRType
P
static let gushortAlias: GIRType
P
static let gushortRef: TypeReference
P
static let gushortType: GIRType
P
static let gustringType: GIRStringType
P
static var implements: [GIRType : Set<TypeReference>]
P
static let int16Type: GIRType
P
static let int32Type: GIRType
P
static let int64Type: GIRType
P
static let int8Type: GIRType
P
static let intRef: TypeReference
P
static let intType: GIRType
P
static var knownBitfields: [String : Bitfield]
P
static var knownCIdentifiers: [String : Datatype]
P
static var knownDataTypes: [String : Datatype]
P
static var knownRecords: [String : Record]
P
static var knownTypes: Set<GIRType>
P
static let mutablePointerTypes: Set<GIRType>
P
static let mutableRawPointerRef: TypeReference
P
static let mutableRawPointerType: GIRRawPointerType
P
static let mutableVoidPointer: TypeReference
P
static var namedTypes: [String : Set<GIRType>]
P
static var namespaceReplacements: [Substring : Substring]
P
static let noneType: GIRType
P
static var numericConversions: [TypeConversion]
P
static let numericTypes: Set<GIRType>
P
static let opaquePointer: String
P
static let opaquePointerType: GIROpaquePointerType
P
static var optionSets: [GIRType : TypeReference]
P
static let optionalGConstPointerRef: TypeReference
P
static let optionalGConstPointerType: GIRRawPointerType
P
static let optionalGConstpointerMutablePointerRef: TypeReference
P
static let optionalGConstpointerPointerRef: TypeReference
P
static let optionalGPointerMutablePointerRef: TypeReference
P
static let optionalGPointerPointerRef: TypeReference
P
static let optionalGPointerRef: TypeReference
P
static let optionalGPointerType: GIRRawPointerType
P
static var overrides: Set<String>
P
static let pointerTypes: Set<GIRType>
P
static var prefix: String
P
static var protocols: [GIRType : TypeReference]
P
static let rawPointerRef: TypeReference
P
static let rawPointerType: GIRRawPointerType
P
static let rawPointerTypes: Set<GIRType>
P
static var recordRefs: [GIRType : TypeReference]
P
static var recordTypes: Set<GIRType>
P
static var refRecords: [GIRType : TypeReference]
P
static let string: String
P
static let stringRef: TypeReference
P
static let stringType: GIRStringType
P
static let stringTypes: Set<GIRType>
P
static let swiftFundamentalReplacements: [TypeReference : TypeReference]
P
static let swiftNumericTypes: Set<GIRType>
P
static let swiftParameterTypeReplacements: [TypeReference : TypeReference]
P
static let swiftReturnTypeReplacements: [TypeReference : TypeReference]
P
static let swiftSignalTypeReplacements: [TypeReference : TypeReference]
P
static var typedCollections: Set<String>
P
static let uint16Type: GIRType
P
static let uint32Type: GIRType
P
static let uint64Type: GIRType
P
static let uint8Type: GIRType
P
static let uintRef: TypeReference
P
static let uintType: GIRType
P
static let underlyingPrimitiveSwiftTypes: [String : String]
P
static let utf8: String
P
static let utf8Ref: TypeReference
P
static let utf8Type: GIRType
P
static var verbatimConstants: Set<String>
P
static let voidPointer: TypeReference
P
static let voidRef: TypeReference
P
static let voidType: GIRType
Type Methods
M
class func args(children: LazySequence<AnySequence<XMLElement>>) -> [Argument]
M
class func deprecatedDocumentation(children: LazySequence<AnySequence<XMLElement>>) -> String?
M
class func docs(children: LazySequence<AnySequence<XMLElement>>) -> String
M
class func documentation(name: String, children: LazySequence<AnySequence<XMLElement>>) -> String
Enumerations
E
GIR.OwnershipTransfer
Enumeration Cases
E
case container
E
case floating
E
case full
E
case none
Initializers
M
init?(rawValue: String)
Default Implementations
Equatable Implementations
Operators
static func != (Self, Self) -> Bool
RawRepresentable Implementations
Instance Properties
P
var hashValue: Int
Instance Methods
M
func hash(into: inout Hasher)
E
GIR.ParameterDirection
Enumeration Cases
E
case `in`
E
case `inout`
E
case out
Initializers
M
init?(rawValue: String)
Default Implementations
Equatable Implementations
Operators
static func != (Self, Self) -> Bool
RawRepresentable Implementations
Instance Properties
P
var hashValue: Int
Instance Methods
M
func hash(into: inout Hasher)
GIR element models
C
GIR.Thing
Operators
static func == (GIR.Thing, GIR.Thing) -> Bool
static func < (GIR.Thing, GIR.Thing) -> Bool
Initializers
M
init(name: String, comment: String, introspectable: Bool, disguised: Bool, deprecated: String?, markedAsDeprecated: Bool, version: String?)
M
init(node: XMLElement, at: Int, nameAttr: String)
Instance Properties
P
let comment: String
P
let deprecated: String?
P
let disguised: Bool
P
var escapedName: String
P
let introspectable: Bool
P
var kind: String
P
let markedAsDeprecated: Bool
P
let name: String
P
var swiftCamelCASEName: String
P
var swiftCamelCaseName: String
P
let version: String?
Instance Methods
M
func hash(into: inout Hasher)
Default Implementations
Comparable Implementations
Operators
static func ... (Self) -> PartialRangeFrom<Self>
static func ... (Self) -> PartialRangeThrough<Self>
static func ... (Self, Self) -> ClosedRange<Self>
static func ..< (Self) -> PartialRangeUpTo<Self>
static func ..< (Self, Self) -> Range<Self>
static func > (Self, Self) -> Bool
static func >= (Self, Self) -> Bool
static func <= (Self, Self) -> Bool
Equatable Implementations
Operators
static func != (Self, Self) -> Bool
C
GIR.Datatype
Initializers
M
init(name: String, type: TypeReference, comment: String, introspectable: Bool, deprecated: String?)
M
init(node: XMLElement, at: Int, with: TypeReference?, nameAttr: String)
Instance Properties
P
var identifier: String?
P
var isVoid: Bool
P
var kind: String
P
var typeRef: TypeReference
P
var underlyingCRef: TypeReference
Instance Methods
M
func registerKnownType()
C
GIR.CType
Initializers
M
init(fromChildrenOf: XMLElement, at: Int, nameAttr: String, privateAttr: String, readableAttr: String, writableAttr: String, scopeAttr: String)
M
init(name: String, cname: String, type: TypeReference, comment: String, introspectable: Bool, deprecated: String?, isPrivate: Bool, isReadable: Bool, isWritable: Bool, contains: [CType], tupleSize: Int?, scope: String?)
M
init(node: XMLElement, at: Int, nameAttr: String, privateAttr: String, readableAttr: String, writableAttr: String, scopeAttr: String)
Instance Properties
P
var argumentName: String
P
var camelQuoted: String
P
let cname: String
P
let containedTypes: [CType]
P
var containsGPointer: Bool
P
var idiomaticClassRef: TypeReference
P
var idiomaticClassTypeName: String
P
var idiomaticWrappedRef: TypeReference
P
var idiomaticWrappedTypeName: String
P
var isAnyKindOfPointer: Bool
P
var isArray: Bool
P
var isGPointer: Bool
P
var isKnownBitfield: Bool
P
var isKnownRecord: Bool
P
var isKnownRecordReference: Bool
P
var isKnownType: Bool
P
let isPrivate: Bool
P
let isReadable: Bool
P
var isScalarArray: Bool
P
var isVoid: Bool
P
let isWritable: Bool
P
var kind: String
P
var knownBitfield: GIR.Bitfield?
P
var knownNameRecord: GIR.Record?
P
var knownRecord: GIR.Record?
P
var knownRecordReference: GIR.Record?
P
var knownType: GIR.Datatype?
P
var nonClashingName: String
P
var prefixedArgumentName: String
P
var prefixedIdiomaticClassRef: TypeReference
P
var prefixedIdiomaticClassTypeName: String
P
var prefixedIdiomaticWrappedRef: TypeReference
P
var prefixedIdiomaticWrappedTypeName: String
P
var returnTypeName: String
P
let scope: String?
P
var swiftParamRef: TypeReference
P
var swiftReturnRef: TypeReference
P
var swiftSignalRef: TypeReference
P
var swiftType: String
P
var templateDecl: String?
P
let tupleSize: Int?
Instance Methods
M
func isInstanceOf(GIR.Record?) -> Bool
M
func isInstanceOfHierarchy(GIR.Record) -> Bool
M
func maybeOptional(for: GIR.Record?) -> Bool
M
func prefixed(ref: TypeReference) -> TypeReference
M
func returnTypeName(for: GIR.Record?, beingIdiomatic: Bool, useStruct: Bool) -> String
C
GIR.Alias
Instance Properties
P
var kind: String
C
GIR.Argument
Initializers
M
init(name: String, cname: String, type: TypeReference, instance: Bool, comment: String, introspectable: Bool, deprecated: String?, varargs: Bool, isNullable: Bool, allowNone: Bool, isOptional: Bool, callerAllocates: Bool, ownershipTransfer: OwnershipTransfer, direction: ParameterDirection)
M
init(node: XMLElement, at: Int, defaultDirection: ParameterDirection)
M
init(node: XMLElement, at: Int, varargs: Bool, defaultDirection: ParameterDirection)
Instance Properties
P
let allowNone: Bool
P
var argumentTypeName: String
P
var callbackArgumentTypeName: String
P
let callerAllocates: Bool
P
var defaultRefTemplateTypeName: String
P
let direction: ParameterDirection
P
let instance: Bool
P
let isNullable: Bool
P
let isOptional: Bool
P
var kind: String
P
var nonNullableTemplateDecl: String?
P
let ownershipTransfer: OwnershipTransfer
P
var templateTypeName: String
P
var varargs: Bool
Instance Methods
M
func optionalIfNullable(String) -> String
M
func optionalIfNullableOrOptional(String) -> String
M
func templateName(for: GIR.Record) -> String
C
GIR.Bitfield
Instance Properties
P
var kind: String
Instance Methods
M
func registerKnownType()
C
GIR.Callback
Instance Properties
P
var kind: String
C
GIR.Class
Instance Properties
P
var kind: String
P
let parent: String
P
var parentType: Record?
P
var rootType: Record
C
GIR.Constant
Initializers
M
init(name: String, cname: String, type: TypeReference, value: Int, comment: String, introspectable: Bool, deprecated: String?)
M
init(node: XMLElement, at: Int, nameAttr: String)
Instance Properties
P
var kind: String
P
let value: Int
C
GIR.Enumeration
Initializers
M
init(name: String, type: TypeReference, members: [Member], comment: String, introspectable: Bool, deprecated: String?)
M
init(node: XMLElement, at: Int)
Instance Properties
P
var kind: String
P
let members: [Member]
Instance Methods
M
func registerKnownType()
Type Aliases
T
GIR.Enumeration.Member
C
GIR.Field
Initializers
M
init(node: XMLElement, at: Int)
Instance Properties
P
var containedCallback: GIR.Callback?
P
var kind: String
C
GIR.Function
Instance Properties
P
var kind: String
C
GIR.Interface
Instance Properties
P
var kind: String
C
GIR.Method
Initializers
M
init(name: String, cname: String, returns: Argument, args: [Argument], comment: String, introspectable: Bool, deprecated: String?, throwsAnError: Bool)
M
init(node: XMLElement, at: Int)
Instance Properties
P
let args: [Argument]
P
var isBareFactory: Bool
P
var isDesignatedConstructor: Bool
P
var isGetter: Bool
P
var isRef: Bool
P
var isSetter: Bool
P
var isUnref: Bool
P
var kind: String
P
let returns: Argument
P
let throwsError: Bool
Instance Methods
M
func isConstructorOf(GIR.Record?) -> Bool
M
func isFactoryOf(GIR.Record?) -> Bool
M
func isGetterFor(setter: String) -> Bool
M
func isSetterFor(getter: String) -> Bool
C
GIR.Property
Instance Properties
P
var kind: String
C
GIR.Record
Initializers
M
init(name: String, cname: String, type: TypeReference, cprefix: String, correspondingCType: String?, typegetter: String?, isGTypeStructForType: String?, methods: [Method], functions: [Function], constructors: [Method], properties: [Property], fields: [Field], signals: [Signal], interfaces: [String], comment: String, introspectable: Bool, deprecated: String?)
M
init(node: XMLElement, at: Int)
Instance Properties
P
var allMethods: [Method]
P
var allProperties: [Property]
P
var allSignals: [Signal]
P
var className: String
P
var classRef: TypeReference
P
var classType: GIRRecordType
P
let constructors: [Method]
P
let correspondingCType: String?
P
let cprefix: String
P
let fields: [Field]
P
var functions: [GIR.Function]
P
var implements: [String]
P
var inheritedMethods: [Method]
P
var isGTypeStructForType: String?
P
var kind: String
P
let methods: [Method]
P
var nonDerivedProperties: [Property]
P
var parentType: Record?
P
let properties: [Property]
P
var protocolName: String
P
var protocolRef: TypeReference
P
var protocolType: GIRType
P
var ptrName: String
P
var records: [Record]
P
var ref: Method?
P
var rootType: Record
P
let signals: [Signal]
P
var structName: String
P
var structNamePrefixedIfNecessary: String
P
var structRef: TypeReference
P
var structType: GIRRecordType
P
var swift: String
P
var typeStruct: String?
P
let typegetter: String?
P
var unref: Method?
Instance Methods
M
func anyMethodMatching((Method) -> Bool) -> Method?
M
func has(property: String) -> Bool
M
func inheritedMethodMatching((Method) -> Bool) -> Method?
M
func methodMatching((Method) -> Bool) -> Method?
M
func registerKnownType()
C
GIR.Signal
Instance Properties
P
var kind: String
C
GIR.Union
Instance Properties
P
var kind: String
Type system
C
GIRType
Operators
static func == (GIRType, GIRType) -> Bool
Initializers
M
init(String, swiftName: String?, typeName: String?, ctype: String, superType: TypeReference?, isAlias: Bool, conversions: [GIRType : [TypeConversion]])
M
init(aliasOf: GIRType, name: String?, in: String?, swiftName: String?, ctype: String?)
M
init(aliasOf: TypeReference, name: String?, in: String?, swiftName: String?, ctype: String?)
M
init(name: String, in: String, swiftName: String?, typeName: String?, ctype: String, superType: TypeReference?, isAlias: Bool, conversions: [GIRType : [TypeConversion]])
M
init(name: String, swiftName: String?, typeName: String?, ctype: String, superType: TypeReference?, isAlias: Bool, conversions: [GIRType : [TypeConversion]])
Instance Properties
P
var castName: String
P
var castTypeName: String
P
var conversions: [GIRType : [TypeConversion]]
P
let ctype: String
P
var dottedPrefix: String
P
let isAlias: Bool
P
var isGPointer: Bool
P
let name: String
P
var namePrefixedWhereNecessary: String
P
let namespace: String
P
var normalisedDottedPrefix: String
P
var parent: TypeReference?
P
var prefixedName: String
P
var swiftName: String
P
var swiftNamePrefixedWhereNecessary: String
P
let typeName: String
P
var typeNamePrefixedWhereNecessary: String
Instance Methods
M
func cast(expression: String, from: GIRType, pointerLevel: Int, const: Bool, isConstSource: Bool) -> String
M
func cast(expression: String, pointerLevel: Int, const: Bool, isConstSource: Bool) -> String
M
func cast(expression: String, to: GIRType, pointerLevel: Int, const: Bool, isConstSource: Bool) -> String
M
func hash(into: inout Hasher)
M
func knownCast(expression: String, from: GIRType, pointerLevel: Int, const: Bool) -> String?
M
func knownCast(expression: String, to: GIRType, pointerLevel: Int, const: Bool) -> String?
M
func prefixedWhereNecessary(String) -> String
Default Implementations
Equatable Implementations
Operators
static func != (Self, Self) -> Bool
C
GIRStringType
Instance Methods
M
func cast(expression: String, pointerLevel: Int, const: Bool, isConstSource: Bool) -> String
C
GIRRawPointerType
Instance Methods
M
func cast(expression: String, pointerLevel: Int, const: Bool, isConstSource: Bool) -> String
C
GIRRecordType
Instance Methods
M
func cast(expression: String, pointerLevel: Int, const: Bool, isConstSource: Bool) -> String
C
GIRGenericType
Initializers
M
init(name: String, containedType: GIRType, in: String, swiftName: String?, typeName: String?, ctype: String, superType: TypeReference?, isAlias: Bool, conversions: [GIRType : [TypeConversion]])
Instance Properties
P
var castName: String
P
var containedType: GIRType
P
var genericSuffix: String
Instance Methods
M
func cast(expression: String, pointerLevel: Int, const: Bool, isConstSource: Bool) -> String
C
GIROpaquePointerType
Instance Methods
M
func cast(expression: String, pointerLevel: Int, const: Bool, isConstSource: Bool) -> String
C
TypeConversion
Operators
static func == (TypeConversion, TypeConversion) -> Bool
Initializers
M
init(source: GIRType, target: GIRType)
Instance Properties
P
let source: GIRType
P
let target: GIRType
Instance Methods
M
func castFromTarget(expression: String) -> String
M
func castToTarget(from: String) -> String
M
func hash(into: inout Hasher)
Default Implementations
Equatable Implementations
Operators
static func != (Self, Self) -> Bool
C
CastConversion
Instance Methods
M
func castFromTarget(expression: String) -> String
M
func castToTarget(from: String) -> String
C
StringConversion
Instance Methods
M
func castFromTarget(expression: String) -> String
M
func castToTarget(from: String) -> String
C
SubClassConversion
Instance Methods
M
func castFromTarget(expression: String) -> String
M
func castToTarget(from: String) -> String
C
OptionalSubClassConversion
Instance Methods
M
func castFromTarget(expression: String) -> String
C
CustomConversion
Initializers
M
init(source: GIRType, target: GIRType, downPrefix: String, downSuffix: String, upPrefix: String, upSuffix: String)
Instance Properties
P
let downcastPrefix: String
P
let downcastSuffix: String
P
let upcastPrefix: String
P
let upcastSuffix: String
Instance Methods
M
func castFromTarget(expression: String) -> String
M
func castToTarget(from: String) -> String
C
NestedConversion
Initializers
M
init(source: GIRType, target: GIRType, downPrefix: String, downSuffix: String, upPrefix: String, upSuffix: String, embedding: TypeConversion)
Instance Properties
P
var innerConversion: TypeConversion
C
EnumTypeConversion
Instance Methods
M
func castToTarget(from: String) -> String
C
BitfieldTypeConversion
C
RawPointerConversion
Instance Methods
M
func castFromTarget(expression: String) -> String
S
TypeReference
Initializers
M
init(type: GIRType, in: String?, identifier: String?, isConst: Bool, isOptional: Bool, isArray: Bool, constPointers: [Bool])
Instance Properties
P
var constPointers: [Bool]
P
var forceUnwrappedName: String
P
var fullCType: String
P
var fullSwiftTypeName: String
P
var fullTypeName: String
P
var fullUnderlyingCName: String
P
let identifier: String?
P
var idiomaticType: TypeReference
P
var indirectionLevel: Int
P
var isArray: Bool
P
var isConst: Bool
P
var isOptional: Bool
P
var isVoid: Bool
P
var knownIndirectionLevel: Int
P
var knownPointerOffset: Int
P
let namespace: String
P
let type: GIRType
P
var underlyingType: TypeReference
Instance Methods
M
func cast(expression: String, from: TypeReference) -> String
M
func embeddedType(named: String) -> String
M
func fullUnderlyingTypeName(asOptional: Bool?) -> String
M
func isAlias(of: GIRType) -> Bool
M
func isAlias(of: TypeReference) -> Bool
M
func isDirectPointer(to: TypeReference) -> Bool
M
func isDirectPointer(to: GIRType) -> Bool
M
func isSomePointer(to: GIRType) -> Bool
M
func isSomePointer(to: TypeReference) -> Bool
M
func references(GIRType) -> Bool
M
func references(TypeReference) -> Bool
Type Properties
P
static var void: TypeReference
Type Methods
M
static func pointer(to: GIRType, in: String?, isConst: Bool, pointerIsConst: Bool) -> TypeReference
Default Implementations
Equatable Implementations
Operators
static func != (Self, Self) -> Bool
Structures
S
GetterSetterPair
Functions
M
func bitfieldTypeHead(GIR.Bitfield, enumRawType: String, indentation: String) -> String
M
func bitfieldValueCode(GIR.Bitfield, String) -> (GIR.Bitfield.Member) -> String
M
func callSetter(String, GIR.Record?, ptr: String) -> (GIR.Method) -> String
M
func callbackDecl(for: GIR.Callback) -> String
M
func callbackParameterCode(for: GIR.Argument) -> String
M
func commentCode(GIR.Thing, indentation: String) -> String
M
func computedPropertyCode(String, record: GIR.Record, avoiding: Set<String>, publicDesignation: String, ptr: String) -> (GetterSetterPair) -> String
M
func constantSwiftCode(indentedBy: String, scopePrefix: String) -> (GIR.Constant) -> String
M
func constructorParam(GIR.Method, prefix: String?) -> String
M
func constructorPrefix(GIR.Method) -> String?
M
func convenienceConstructorCode(TypeReference, indentation: String, convenience: String, override: String, publicDesignation: String, factory: Bool, hasParent: Bool, shouldSink: Bool, convertName: (String) -> String) -> (GIR.Record) -> (GIR.Method) -> String
M
func convertSetterArgumentToSwiftFor(GIR.Record?, ptr: String) -> (GIR.Argument) -> String
M
func deprecatedCode(GIR.Thing, indentation: String) -> String?
M
func fieldCode(String, record: GIR.Record, avoiding: Set<String>, publicDesignation: String, ptr: String) -> (GIR.Field) -> String
M
func forceUnwrappedDecl(for: GIR.Callback) -> String
M
func functionCallCode(String, GIR.Record?, constructedRecord: GIR.Record?, ptr: String, rvVar: String, doThrow: Bool, isConstructor: Bool, useStruct: Bool) -> (GIR.Method) -> String
M
func functionCode(GIR.Function, indentation: String, initialIndentation: String) -> String
M
func getterSetterPairs(for: [GIR.Method]) -> [GetterSetterPair]
M
func gtkDoc2SwiftDoc(for: GIR.Thing, String, linePrefix: String) -> String
M
func instanceReturnCode(String, (typeRef: TypeReference, record: GIR.Record, isConstructor: Bool, isConvenience: Bool)?, ptr: String, castVar: String, hasParent: Bool, forceCast: Bool, noCast: Bool, convertToSwiftTypes: Bool, useIdiomaticSwift: Bool) -> (GIR.CType) -> String
M
func methodCode(String, initialIndentation: String?, record: GIR.Record?, allowConstructor: Bool, functionPrefix: String, avoiding: Set<String>, publicDesignation: String, convertName: (String) -> String, ptr: String) -> (GIR.Method) -> String
M
func namespacedAliasCode(for: GIR.Datatype, prefix: String, indentation: String) -> String
M
func namespacedAliasSwiftCode(prefixedWith: String, indentation: String) -> (GIR.Datatype) -> String
M
func nullableRefParameterCode(for: GIR.Argument) -> String
M
func prefixedNullableRefParameterCode(for: GIR.Argument, prefix: String) -> String
M
func prefixedTemplatedParameterCode(for: GIR.Argument, prefix: String) -> String
M
func recordClassCode(GIR.Record, parent: String, indentation: String, ptr: String) -> String
M
func recordProtocolCode(GIR.Record, parent: String, indentation: String, ptr: String) -> String
M
func recordProtocolExtensionCode([GIR.Function], GIR.Record, indentation: String, ptr: String) -> String
M
func recordStructCode(GIR.Record, indentation: String, ptr: String) -> String
M
func returnCode(String, (typeRef: TypeReference, record: GIR.Record, isConstructor: Bool, isConvenience: Bool)?, ptr: String, hasParent: Bool, useIdiomaticSwift: Bool, noCast: Bool) -> (GIR.Method) -> String
M
func returnCode<T>(String, (typeRef: TypeReference, record: GIR.Record, isConstructor: Bool, isConvenience: Bool)?, ptr: String, rv: String, hasParent: Bool, forceCast: Bool, convertToSwiftTypes: Bool, useIdiomaticSwift: Bool, noCast: Bool, extract: (T) -> GIR.CType) -> (T) -> String
M
func returnCode(for: GIR.Argument) -> String
M
func returnCode(for: GIR.Argument, prefix: String) -> String
M
func returnDeclarationCode((typeRef: TypeReference, record: GIR.Record, isConstructor: Bool)?, useStruct: Bool) -> (GIR.Method) -> String
M
func returnTypeCode(for: GIR.Method, (typeRef: TypeReference, record: GIR.Record, isConstructor: Bool)?, useIdiomaticSwift: Bool, useStruct: Bool) -> String?
M
func signalNameCode(indentation: String, convertName: (String) -> String) -> (GIR.CType) -> String
M
func signalNameCode(indentation: String, prefixes: (String, String), convertName: (String) -> String) -> (GIR.CType) -> String
M
func subRecordProperty(GIR.Record, ptr: String, GIR.Record, indentation: String, publicDesignation: String) -> String
M
func subTypeAlias(GIR.Record, GIR.Record, publicDesignation: String) -> String
M
func swiftCallbackAliasCode(callback: GIR.Callback) -> String
M
func swiftCode(GIR.Function) -> String
M
func swiftCode(GIR.Bitfield) -> String
M
func swiftCode(GIR.Enumeration) -> String
M
func swiftCode([GIR.Function]) -> (String) -> (GIR.Record) -> String
M
func swiftCode(GIR.Thing, String, indentation: String) -> String
M
func swiftCode(alias: GIR.Alias) -> String
M
func swiftCode(constant: GIR.Constant) -> String
M
func swiftUnionsConversion([GIR.Function]) -> (GIR.Union) -> String
M
func templatedParameterCode(for: GIR.Argument) -> String
M
func toSwift(GIR.Argument, ptr: String) -> String
M
func typeAlias(GIR.Enumeration) -> String
M
func typeAliasCode(for: GIR.Datatype, prefix: String) -> String
M
func typeAliasSwiftCode(prefixedWith: String) -> (GIR.Datatype) -> String
M
func typedCollection(for: String, containedTypes: [GIR.CType], unwrappedName: String, typeRef: TypeReference) -> TypeReference?
M
func valueCode(String) -> (GIR.Enumeration.Member) -> String
Type Aliases
T
EmptyConversion
gir2swift-plugin
/
libgir2swift
/
GIR
/
GIR.Argument
Property
varargs
indicate whether the given parameter is varargs
var
varargs
:
Bool
{
get
}