// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1 // swiftlint:disable all import Foundation import CWinRT private var IID___x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable: WindowsFoundation.IID { .init(Data1: 0xfe2f3d47, Data2: 0x5d47, Data3: 0x5499, Data4: ( 0x83,0x74,0x43,0x0c,0x7c,0xda,0x02,0x04 ))// fe2f3d47-5d47-5499-8374-430c7cda0204 } internal var __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableVTable: __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableVtbl = .init( QueryInterface: { __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.queryInterface($0, $1, $2) }, AddRef: { __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.addRef($0) }, Release: { __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.release($0) }, GetIids: { let size = MemoryLayout.size let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: WindowsFoundation.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID iids[2] = WindowsFoundation.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.IID $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 let hstring = try! HString("Windows.Foundation.Collections.IIterable`1>").detach() $1!.pointee = hstring return S_OK }, GetTrustLevel: { _ = $0 $1!.pointee = TrustLevel(rawValue: 0) return S_OK }, First: { guard let __unwrapped__instance = __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let result = __unwrapped__instance.first() let resultWrapper = WindowsFoundation.__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper(result) resultWrapper?.copyTo($1) return S_OK } ) typealias __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper = InterfaceWrapperBase internal class IIterableIKeyValuePairString_Any: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable } internal func FirstImpl() throws -> WindowsFoundation.AnyIIterator?>? { let (result) = try ComPtrs.initialize { resultAbi in _ = try perform(as: __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.First(pThis, &resultAbi)) } } return WindowsFoundation.__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.unwrapFrom(abi: result) } } internal enum __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableBridge : AbiInterfaceBridge { internal typealias CABI = __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable internal typealias SwiftABI = IIterableIKeyValuePairString_Any internal typealias SwiftProjection = WindowsFoundation.AnyIIterable?> internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } return __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableImpl(abi) } internal static func makeAbi() -> CABI { let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableVTable) { $0 } return .init(lpVtbl: vtblPtr) } } fileprivate class __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableImpl : IIterable, AbiInterfaceImpl { typealias T = WindowsFoundation.AnyIKeyValuePair? typealias Bridge = __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterable-1.first) fileprivate func first() -> WindowsFoundation.AnyIIterator?>? { try! _default.FirstImpl() } public func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? { nil } } private var IID___x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING: WindowsFoundation.IID { .init(Data1: 0xe9bdaaf0, Data2: 0xcbf6, Data3: 0x5c72, Data4: ( 0xbe,0x90,0x29,0xcb,0xf3,0xa1,0x31,0x9b ))// e9bdaaf0-cbf6-5c72-be90-29cbf3a1319b } internal var __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGVTable: __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGVtbl = .init( QueryInterface: { __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.queryInterface($0, $1, $2) }, AddRef: { __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.addRef($0) }, Release: { __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.release($0) }, GetIids: { let size = MemoryLayout.size let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: WindowsFoundation.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID iids[2] = WindowsFoundation.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.IID $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 let hstring = try! HString("Windows.Foundation.Collections.IIterable`1>").detach() $1!.pointee = hstring return S_OK }, GetTrustLevel: { _ = $0 $1!.pointee = TrustLevel(rawValue: 0) return S_OK }, First: { guard let __unwrapped__instance = __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let result = __unwrapped__instance.first() let resultWrapper = WindowsFoundation.__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper(result) resultWrapper?.copyTo($1) return S_OK } ) typealias __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper = InterfaceWrapperBase internal class IIterableIKeyValuePairString_String: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING } internal func FirstImpl() throws -> WindowsFoundation.AnyIIterator?>? { let (result) = try ComPtrs.initialize { resultAbi in _ = try perform(as: __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.First(pThis, &resultAbi)) } } return WindowsFoundation.__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.unwrapFrom(abi: result) } } internal enum __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGBridge : AbiInterfaceBridge { internal typealias CABI = __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING internal typealias SwiftABI = IIterableIKeyValuePairString_String internal typealias SwiftProjection = WindowsFoundation.AnyIIterable?> internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } return __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGImpl(abi) } internal static func makeAbi() -> CABI { let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGVTable) { $0 } return .init(lpVtbl: vtblPtr) } } fileprivate class __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGImpl : IIterable, AbiInterfaceImpl { typealias T = WindowsFoundation.AnyIKeyValuePair? typealias Bridge = __x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterable-1.first) fileprivate func first() -> WindowsFoundation.AnyIIterator?>? { try! _default.FirstImpl() } public func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? { nil } } private var IID___x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry: WindowsFoundation.IID { .init(Data1: 0x876be83b, Data2: 0x7218, Data3: 0x5bfb, Data4: ( 0xa1,0x69,0x83,0x15,0x2e,0xf7,0xe1,0x46 ))// 876be83b-7218-5bfb-a169-83152ef7e146 } internal var __x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryVTable: __x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryVtbl = .init( QueryInterface: { __x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.queryInterface($0, $1, $2) }, AddRef: { __x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.addRef($0) }, Release: { __x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.release($0) }, GetIids: { let size = MemoryLayout.size let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: WindowsFoundation.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID iids[2] = WindowsFoundation.__x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.IID $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 let hstring = try! HString("Windows.Foundation.Collections.IIterable`1").detach() $1!.pointee = hstring return S_OK }, GetTrustLevel: { _ = $0 $1!.pointee = TrustLevel(rawValue: 0) return S_OK }, First: { guard let __unwrapped__instance = __x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let result = __unwrapped__instance.first() let resultWrapper = WindowsFoundation.__x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper(result) resultWrapper?.copyTo($1) return S_OK } ) typealias __x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper = InterfaceWrapperBase internal class IIterableIWwwFormUrlDecoderEntry: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry } internal func FirstImpl() throws -> WindowsFoundation.AnyIIterator? { let (result) = try ComPtrs.initialize { resultAbi in _ = try perform(as: __x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.First(pThis, &resultAbi)) } } return WindowsFoundation.__x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.unwrapFrom(abi: result) } } internal enum __x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryBridge : AbiInterfaceBridge { internal typealias CABI = __x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry internal typealias SwiftABI = IIterableIWwwFormUrlDecoderEntry internal typealias SwiftProjection = WindowsFoundation.AnyIIterable internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } return __x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryImpl(abi) } internal static func makeAbi() -> CABI { let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryVTable) { $0 } return .init(lpVtbl: vtblPtr) } } fileprivate class __x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryImpl : IIterable, AbiInterfaceImpl { typealias T = WindowsFoundation.AnyIWwwFormUrlDecoderEntry? typealias Bridge = __x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterable-1.first) fileprivate func first() -> WindowsFoundation.AnyIIterator? { try! _default.FirstImpl() } public func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? { nil } } private var IID___x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable: WindowsFoundation.IID { .init(Data1: 0x5db5fa32, Data2: 0x707c, Data3: 0x5849, Data4: ( 0xa0,0x6b,0x91,0xc8,0xeb,0x9d,0x10,0xe8 ))// 5db5fa32-707c-5849-a06b-91c8eb9d10e8 } internal var __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableVTable: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableVtbl = .init( QueryInterface: { __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.queryInterface($0, $1, $2) }, AddRef: { __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.addRef($0) }, Release: { __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.release($0) }, GetIids: { let size = MemoryLayout.size let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: WindowsFoundation.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID iids[2] = WindowsFoundation.__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.IID $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 let hstring = try! HString("Windows.Foundation.Collections.IIterator`1>").detach() $1!.pointee = hstring return S_OK }, GetTrustLevel: { _ = $0 $1!.pointee = TrustLevel(rawValue: 0) return S_OK }, get_Current: { guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let result = __unwrapped__instance.current let resultWrapper = WindowsFoundation.__x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper(result) resultWrapper?.copyTo($1) return S_OK }, get_HasCurrent: { guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let result = __unwrapped__instance.hasCurrent $1?.initialize(to: .init(from: result)) return S_OK }, MoveNext: { guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let result = __unwrapped__instance.moveNext() $1?.initialize(to: .init(from: result)) return S_OK }, GetMany: { _, _, _, _ in return failWith(err: E_NOTIMPL) } ) typealias __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper = InterfaceWrapperBase internal class IIteratorIKeyValuePairString_Any: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable } internal func get_CurrentImpl() throws -> WindowsFoundation.AnyIKeyValuePair? { let (result) = try ComPtrs.initialize { resultAbi in _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Current(pThis, &resultAbi)) } } return WindowsFoundation.__x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.unwrapFrom(abi: result) } internal func get_HasCurrentImpl() throws -> Bool { var result: boolean = 0 _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_HasCurrent(pThis, &result)) } return .init(from: result) } internal func MoveNextImpl() throws -> Bool { var result: boolean = 0 _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.MoveNext(pThis, &result)) } return .init(from: result) } } internal enum __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableBridge : AbiInterfaceBridge { internal typealias CABI = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable internal typealias SwiftABI = IIteratorIKeyValuePairString_Any internal typealias SwiftProjection = WindowsFoundation.AnyIIterator?> internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } return __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableImpl(abi) } internal static func makeAbi() -> CABI { let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableVTable) { $0 } return .init(lpVtbl: vtblPtr) } } fileprivate class __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableImpl : IIterator, AbiInterfaceImpl { typealias T = WindowsFoundation.AnyIKeyValuePair? typealias Bridge = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.movenext) fileprivate func moveNext() -> Bool { try! _default.MoveNextImpl() } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.current) fileprivate var current : WindowsFoundation.AnyIKeyValuePair? { get { try! _default.get_CurrentImpl() } } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.hascurrent) fileprivate var hasCurrent : Bool { get { try! _default.get_HasCurrentImpl() } } public func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? { nil } } private var IID___x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING: WindowsFoundation.IID { .init(Data1: 0x05eb86f1, Data2: 0x7140, Data3: 0x5517, Data4: ( 0xb8,0x8d,0xcb,0xae,0xbe,0x57,0xe6,0xb1 ))// 05eb86f1-7140-5517-b88d-cbaebe57e6b1 } internal var __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGVTable: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGVtbl = .init( QueryInterface: { __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.queryInterface($0, $1, $2) }, AddRef: { __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.addRef($0) }, Release: { __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.release($0) }, GetIids: { let size = MemoryLayout.size let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: WindowsFoundation.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID iids[2] = WindowsFoundation.__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.IID $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 let hstring = try! HString("Windows.Foundation.Collections.IIterator`1>").detach() $1!.pointee = hstring return S_OK }, GetTrustLevel: { _ = $0 $1!.pointee = TrustLevel(rawValue: 0) return S_OK }, get_Current: { guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let result = __unwrapped__instance.current let resultWrapper = WindowsFoundation.__x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper(result) resultWrapper?.copyTo($1) return S_OK }, get_HasCurrent: { guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let result = __unwrapped__instance.hasCurrent $1?.initialize(to: .init(from: result)) return S_OK }, MoveNext: { guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let result = __unwrapped__instance.moveNext() $1?.initialize(to: .init(from: result)) return S_OK }, GetMany: { _, _, _, _ in return failWith(err: E_NOTIMPL) } ) typealias __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper = InterfaceWrapperBase internal class IIteratorIKeyValuePairString_String: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING } internal func get_CurrentImpl() throws -> WindowsFoundation.AnyIKeyValuePair? { let (result) = try ComPtrs.initialize { resultAbi in _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Current(pThis, &resultAbi)) } } return WindowsFoundation.__x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.unwrapFrom(abi: result) } internal func get_HasCurrentImpl() throws -> Bool { var result: boolean = 0 _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_HasCurrent(pThis, &result)) } return .init(from: result) } internal func MoveNextImpl() throws -> Bool { var result: boolean = 0 _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.MoveNext(pThis, &result)) } return .init(from: result) } } internal enum __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGBridge : AbiInterfaceBridge { internal typealias CABI = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING internal typealias SwiftABI = IIteratorIKeyValuePairString_String internal typealias SwiftProjection = WindowsFoundation.AnyIIterator?> internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } return __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGImpl(abi) } internal static func makeAbi() -> CABI { let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGVTable) { $0 } return .init(lpVtbl: vtblPtr) } } fileprivate class __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGImpl : IIterator, AbiInterfaceImpl { typealias T = WindowsFoundation.AnyIKeyValuePair? typealias Bridge = __x_ABI_C__FIIterator_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.movenext) fileprivate func moveNext() -> Bool { try! _default.MoveNextImpl() } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.current) fileprivate var current : WindowsFoundation.AnyIKeyValuePair? { get { try! _default.get_CurrentImpl() } } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.hascurrent) fileprivate var hasCurrent : Bool { get { try! _default.get_HasCurrentImpl() } } public func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? { nil } } private var IID___x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry: WindowsFoundation.IID { .init(Data1: 0x32e54295, Data2: 0x373c, Data3: 0x50cb, Data4: ( 0x80,0xa1,0x46,0x8a,0x99,0x0c,0xa7,0x80 ))// 32e54295-373c-50cb-80a1-468a990ca780 } internal var __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryVTable: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryVtbl = .init( QueryInterface: { __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.queryInterface($0, $1, $2) }, AddRef: { __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.addRef($0) }, Release: { __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.release($0) }, GetIids: { let size = MemoryLayout.size let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: WindowsFoundation.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID iids[2] = WindowsFoundation.__x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.IID $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 let hstring = try! HString("Windows.Foundation.Collections.IIterator`1").detach() $1!.pointee = hstring return S_OK }, GetTrustLevel: { _ = $0 $1!.pointee = TrustLevel(rawValue: 0) return S_OK }, get_Current: { guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let result = __unwrapped__instance.current let resultWrapper = __ABI_Windows_Foundation.IWwwFormUrlDecoderEntryWrapper(result) resultWrapper?.copyTo($1) return S_OK }, get_HasCurrent: { guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let result = __unwrapped__instance.hasCurrent $1?.initialize(to: .init(from: result)) return S_OK }, MoveNext: { guard let __unwrapped__instance = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let result = __unwrapped__instance.moveNext() $1?.initialize(to: .init(from: result)) return S_OK }, GetMany: { _, _, _, _ in return failWith(err: E_NOTIMPL) } ) typealias __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper = InterfaceWrapperBase internal class IIteratorIWwwFormUrlDecoderEntry: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry } internal func get_CurrentImpl() throws -> WindowsFoundation.AnyIWwwFormUrlDecoderEntry? { let (result) = try ComPtrs.initialize { resultAbi in _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Current(pThis, &resultAbi)) } } return __ABI_Windows_Foundation.IWwwFormUrlDecoderEntryWrapper.unwrapFrom(abi: result) } internal func get_HasCurrentImpl() throws -> Bool { var result: boolean = 0 _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_HasCurrent(pThis, &result)) } return .init(from: result) } internal func MoveNextImpl() throws -> Bool { var result: boolean = 0 _ = try perform(as: __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.MoveNext(pThis, &result)) } return .init(from: result) } } internal enum __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryBridge : AbiInterfaceBridge { internal typealias CABI = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry internal typealias SwiftABI = IIteratorIWwwFormUrlDecoderEntry internal typealias SwiftProjection = WindowsFoundation.AnyIIterator internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } return __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryImpl(abi) } internal static func makeAbi() -> CABI { let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryVTable) { $0 } return .init(lpVtbl: vtblPtr) } } fileprivate class __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryImpl : IIterator, AbiInterfaceImpl { typealias T = WindowsFoundation.AnyIWwwFormUrlDecoderEntry? typealias Bridge = __x_ABI_C__FIIterator_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.movenext) fileprivate func moveNext() -> Bool { try! _default.MoveNextImpl() } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.current) fileprivate var current : WindowsFoundation.AnyIWwwFormUrlDecoderEntry? { get { try! _default.get_CurrentImpl() } } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iiterator-1.hascurrent) fileprivate var hasCurrent : Bool { get { try! _default.get_HasCurrentImpl() } } public func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? { nil } } private var IID___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable: WindowsFoundation.IID { .init(Data1: 0x09335560, Data2: 0x6c6b, Data3: 0x5a26, Data4: ( 0x93,0x48,0x97,0xb7,0x81,0x13,0x2b,0x20 ))// 09335560-6c6b-5a26-9348-97b781132b20 } internal var __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableVTable: __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableVtbl = .init( QueryInterface: { __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.queryInterface($0, $1, $2) }, AddRef: { __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.addRef($0) }, Release: { __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.release($0) }, GetIids: { let size = MemoryLayout.size let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: WindowsFoundation.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID iids[2] = WindowsFoundation.__x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.IID $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 let hstring = try! HString("Windows.Foundation.Collections.IKeyValuePair`2").detach() $1!.pointee = hstring return S_OK }, GetTrustLevel: { _ = $0 $1!.pointee = TrustLevel(rawValue: 0) return S_OK }, get_Key: { guard let __unwrapped__instance = __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let result = __unwrapped__instance.key $1?.initialize(to: try! HString(result).detach()) return S_OK }, get_Value: { guard let __unwrapped__instance = __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let result = __unwrapped__instance.value let resultWrapper = __ABI_.AnyWrapper(result) resultWrapper?.copyTo($1) return S_OK } ) typealias __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper = InterfaceWrapperBase internal class IKeyValuePairString_Any: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable } internal func get_KeyImpl() throws -> String { var result: HSTRING? _ = try perform(as: __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Key(pThis, &result)) } return .init(from: result) } internal func get_ValueImpl() throws -> Any? { let (result) = try ComPtrs.initialize { resultAbi in _ = try perform(as: __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Value(pThis, &resultAbi)) } } return __ABI_.AnyWrapper.unwrapFrom(abi: result) } } internal enum __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableBridge : AbiInterfaceBridge { internal typealias CABI = __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectable internal typealias SwiftABI = IKeyValuePairString_Any internal typealias SwiftProjection = WindowsFoundation.AnyIKeyValuePair internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } return __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableImpl(abi) } internal static func makeAbi() -> CABI { let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableVTable) { $0 } return .init(lpVtbl: vtblPtr) } } fileprivate class __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableImpl : IKeyValuePair, AbiInterfaceImpl { typealias K = String typealias V = Any? typealias Bridge = __x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ikeyvaluepair-2.key) fileprivate var key : String { get { try! _default.get_KeyImpl() } } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ikeyvaluepair-2.value) fileprivate var value : Any? { get { try! _default.get_ValueImpl() } } public func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? { nil } } private var IID___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING: WindowsFoundation.IID { .init(Data1: 0x60310303, Data2: 0x49c5, Data3: 0x52e6, Data4: ( 0xab,0xc6,0xa9,0xb3,0x6e,0xcc,0xc7,0x16 ))// 60310303-49c5-52e6-abc6-a9b36eccc716 } internal var __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGVTable: __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGVtbl = .init( QueryInterface: { __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.queryInterface($0, $1, $2) }, AddRef: { __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.addRef($0) }, Release: { __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.release($0) }, GetIids: { let size = MemoryLayout.size let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: WindowsFoundation.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID iids[2] = WindowsFoundation.__x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.IID $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 let hstring = try! HString("Windows.Foundation.Collections.IKeyValuePair`2").detach() $1!.pointee = hstring return S_OK }, GetTrustLevel: { _ = $0 $1!.pointee = TrustLevel(rawValue: 0) return S_OK }, get_Key: { guard let __unwrapped__instance = __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let result = __unwrapped__instance.key $1?.initialize(to: try! HString(result).detach()) return S_OK }, get_Value: { guard let __unwrapped__instance = __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let result = __unwrapped__instance.value $1?.initialize(to: try! HString(result).detach()) return S_OK } ) typealias __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper = InterfaceWrapperBase internal class IKeyValuePairString_String: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING } internal func get_KeyImpl() throws -> String { var result: HSTRING? _ = try perform(as: __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Key(pThis, &result)) } return .init(from: result) } internal func get_ValueImpl() throws -> String { var result: HSTRING? _ = try perform(as: __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Value(pThis, &result)) } return .init(from: result) } } internal enum __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGBridge : AbiInterfaceBridge { internal typealias CABI = __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRING internal typealias SwiftABI = IKeyValuePairString_String internal typealias SwiftProjection = WindowsFoundation.AnyIKeyValuePair internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } return __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGImpl(abi) } internal static func makeAbi() -> CABI { let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGVTable) { $0 } return .init(lpVtbl: vtblPtr) } } fileprivate class __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGImpl : IKeyValuePair, AbiInterfaceImpl { typealias K = String typealias V = String typealias Bridge = __x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ikeyvaluepair-2.key) fileprivate var key : String { get { try! _default.get_KeyImpl() } } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ikeyvaluepair-2.value) fileprivate var value : String { get { try! _default.get_ValueImpl() } } public func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? { nil } } private var IID___x_ABI_C__FIMapChangedEventArgs_1_HSTRING: WindowsFoundation.IID { .init(Data1: 0x60141efb, Data2: 0xf2f9, Data3: 0x5377, Data4: ( 0x96,0xfd,0xf8,0xc6,0x0d,0x95,0x58,0xb5 ))// 60141efb-f2f9-5377-96fd-f8c60d9558b5 } internal var __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGVTable: __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGVtbl = .init( QueryInterface: { __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper.queryInterface($0, $1, $2) }, AddRef: { __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper.addRef($0) }, Release: { __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper.release($0) }, GetIids: { let size = MemoryLayout.size let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: WindowsFoundation.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID iids[2] = WindowsFoundation.__x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper.IID $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 let hstring = try! HString("Windows.Foundation.Collections.IMapChangedEventArgs`1").detach() $1!.pointee = hstring return S_OK }, GetTrustLevel: { _ = $0 $1!.pointee = TrustLevel(rawValue: 0) return S_OK }, get_CollectionChange: { guard let __unwrapped__instance = __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let result = __unwrapped__instance.collectionChange $1?.initialize(to: result) return S_OK }, get_Key: { guard let __unwrapped__instance = __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let result = __unwrapped__instance.key $1?.initialize(to: try! HString(result).detach()) return S_OK } ) typealias __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper = InterfaceWrapperBase internal class IMapChangedEventArgsString: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_C__FIMapChangedEventArgs_1_HSTRING } internal func get_CollectionChangeImpl() throws -> WindowsFoundation.CollectionChange { var result: __x_ABI_CWindows_CFoundation_CCollections_CCollectionChange = .init(0) _ = try perform(as: __x_ABI_C__FIMapChangedEventArgs_1_HSTRING.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_CollectionChange(pThis, &result)) } return result } internal func get_KeyImpl() throws -> String { var result: HSTRING? _ = try perform(as: __x_ABI_C__FIMapChangedEventArgs_1_HSTRING.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Key(pThis, &result)) } return .init(from: result) } } internal enum __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGBridge : AbiInterfaceBridge { internal typealias CABI = __x_ABI_C__FIMapChangedEventArgs_1_HSTRING internal typealias SwiftABI = IMapChangedEventArgsString internal typealias SwiftProjection = WindowsFoundation.AnyIMapChangedEventArgs internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } return __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGImpl(abi) } internal static func makeAbi() -> CABI { let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIMapChangedEventArgs_1_HSTRINGVTable) { $0 } return .init(lpVtbl: vtblPtr) } } fileprivate class __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGImpl : IMapChangedEventArgs, AbiInterfaceImpl { typealias K = String typealias Bridge = __x_ABI_C__FIMapChangedEventArgs_1_HSTRINGBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapchangedeventargs-1.collectionchange) fileprivate var collectionChange : WindowsFoundation.CollectionChange { get { try! _default.get_CollectionChangeImpl() } } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapchangedeventargs-1.key) fileprivate var key : String { get { try! _default.get_KeyImpl() } } public func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? { nil } } private var IID___x_ABI_C__FIMapView_2_HSTRING_IInspectable: WindowsFoundation.IID { .init(Data1: 0xbb78502a, Data2: 0xf79d, Data3: 0x54fa, Data4: ( 0x92,0xc9,0x90,0xc5,0x03,0x9f,0xdf,0x7e ))// bb78502a-f79d-54fa-92c9-90c5039fdf7e } internal var __x_ABI_C__FIMapView_2_HSTRING_IInspectableVTable: __x_ABI_C__FIMapView_2_HSTRING_IInspectableVtbl = .init( QueryInterface: { __x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.queryInterface($0, $1, $2) }, AddRef: { __x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.addRef($0) }, Release: { __x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.release($0) }, GetIids: { let size = MemoryLayout.size let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: WindowsFoundation.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID iids[2] = WindowsFoundation.__x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.IID iids[3] = WindowsFoundation.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.IID $1!.pointee = 4 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 let hstring = try! HString("Windows.Foundation.Collections.IMapView`2").detach() $1!.pointee = hstring return S_OK }, GetTrustLevel: { _ = $0 $1!.pointee = TrustLevel(rawValue: 0) return S_OK }, Lookup: { guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let key: String = .init(from: $1) let result = __unwrapped__instance.lookup(key) let resultWrapper = __ABI_.AnyWrapper(result) resultWrapper?.copyTo($2) return S_OK }, get_Size: { guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let result = __unwrapped__instance.size $1?.initialize(to: result) return S_OK }, HasKey: { guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let key: String = .init(from: $1) let result = __unwrapped__instance.hasKey(key) $2?.initialize(to: .init(from: result)) return S_OK }, Split: { guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } var first: WindowsFoundation.AnyIMapView? var second: WindowsFoundation.AnyIMapView? __unwrapped__instance.split(&first, &second) let firstWrapper = WindowsFoundation.__x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper(first) firstWrapper?.copyTo($1) let secondWrapper = WindowsFoundation.__x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper(second) secondWrapper?.copyTo($2) return S_OK } ) typealias __x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper = InterfaceWrapperBase internal class IMapViewString_Any: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_C__FIMapView_2_HSTRING_IInspectable } internal func LookupImpl(_ key: String) throws -> Any? { let (result) = try ComPtrs.initialize { resultAbi in let _key = try! HString(key) _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING_IInspectable.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.Lookup(pThis, _key.get(), &resultAbi)) } } return __ABI_.AnyWrapper.unwrapFrom(abi: result) } internal func get_SizeImpl() throws -> UInt32 { var result: UINT32 = 0 _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING_IInspectable.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) } return result } internal func HasKeyImpl(_ key: String) throws -> Bool { var result: boolean = 0 let _key = try! HString(key) _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING_IInspectable.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.HasKey(pThis, _key.get(), &result)) } return .init(from: result) } internal func SplitImpl(_ first: inout WindowsFoundation.AnyIMapView?, _ second: inout WindowsFoundation.AnyIMapView?) throws { let (_first, _second) = try ComPtrs.initialize { (_firstAbi, _secondAbi) in _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING_IInspectable.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.Split(pThis, &_firstAbi, &_secondAbi)) } } first = WindowsFoundation.__x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.unwrapFrom(abi: _first) second = WindowsFoundation.__x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.unwrapFrom(abi: _second) } } internal enum __x_ABI_C__FIMapView_2_HSTRING_IInspectableBridge : AbiInterfaceBridge { internal typealias CABI = __x_ABI_C__FIMapView_2_HSTRING_IInspectable internal typealias SwiftABI = IMapViewString_Any internal typealias SwiftProjection = WindowsFoundation.AnyIMapView internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } return __x_ABI_C__FIMapView_2_HSTRING_IInspectableImpl(abi) } internal static func makeAbi() -> CABI { let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIMapView_2_HSTRING_IInspectableVTable) { $0 } return .init(lpVtbl: vtblPtr) } } fileprivate class __x_ABI_C__FIMapView_2_HSTRING_IInspectableImpl : IMapView, AbiInterfaceImpl { typealias T = WindowsFoundation.AnyIKeyValuePair? typealias K = String typealias V = Any? typealias Bridge = __x_ABI_C__FIMapView_2_HSTRING_IInspectableBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.lookup) fileprivate func lookup(_ key: String) -> Any? { try! _default.LookupImpl(key) } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.haskey) fileprivate func hasKey(_ key: String) -> Bool { try! _default.HasKeyImpl(key) } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.split) fileprivate func split(_ first: inout WindowsFoundation.AnyIMapView?, _ second: inout WindowsFoundation.AnyIMapView?) { try! _default.SplitImpl(&first, &second) } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.size) fileprivate var size : UInt32 { get { try! _default.get_SizeImpl() } } private lazy var _IIterable: IIterableIKeyValuePairString_Any! = getInterfaceForCaching() /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.first) fileprivate func first() -> WindowsFoundation.AnyIIterator?>? { try! _IIterable.FirstImpl() } public func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? { nil } } private var IID___x_ABI_C__FIMapView_2_HSTRING_HSTRING: WindowsFoundation.IID { .init(Data1: 0xac7f26f2, Data2: 0xfeb7, Data3: 0x5b2a, Data4: ( 0x8a,0xc4,0x34,0x5b,0xc6,0x2c,0xae,0xde ))// ac7f26f2-feb7-5b2a-8ac4-345bc62caede } internal var __x_ABI_C__FIMapView_2_HSTRING_HSTRINGVTable: __x_ABI_C__FIMapView_2_HSTRING_HSTRINGVtbl = .init( QueryInterface: { __x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.queryInterface($0, $1, $2) }, AddRef: { __x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.addRef($0) }, Release: { __x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.release($0) }, GetIids: { let size = MemoryLayout.size let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: WindowsFoundation.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID iids[2] = WindowsFoundation.__x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.IID iids[3] = WindowsFoundation.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.IID $1!.pointee = 4 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 let hstring = try! HString("Windows.Foundation.Collections.IMapView`2").detach() $1!.pointee = hstring return S_OK }, GetTrustLevel: { _ = $0 $1!.pointee = TrustLevel(rawValue: 0) return S_OK }, Lookup: { guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let key: String = .init(from: $1) let result = __unwrapped__instance.lookup(key) $2?.initialize(to: try! HString(result).detach()) return S_OK }, get_Size: { guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let result = __unwrapped__instance.size $1?.initialize(to: result) return S_OK }, HasKey: { guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let key: String = .init(from: $1) let result = __unwrapped__instance.hasKey(key) $2?.initialize(to: .init(from: result)) return S_OK }, Split: { guard let __unwrapped__instance = __x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } var first: WindowsFoundation.AnyIMapView? var second: WindowsFoundation.AnyIMapView? __unwrapped__instance.split(&first, &second) let firstWrapper = WindowsFoundation.__x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper(first) firstWrapper?.copyTo($1) let secondWrapper = WindowsFoundation.__x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper(second) secondWrapper?.copyTo($2) return S_OK } ) typealias __x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper = InterfaceWrapperBase internal class IMapViewString_String: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_C__FIMapView_2_HSTRING_HSTRING } internal func LookupImpl(_ key: String) throws -> String { var result: HSTRING? let _key = try! HString(key) _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING_HSTRING.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.Lookup(pThis, _key.get(), &result)) } return .init(from: result) } internal func get_SizeImpl() throws -> UInt32 { var result: UINT32 = 0 _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING_HSTRING.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) } return result } internal func HasKeyImpl(_ key: String) throws -> Bool { var result: boolean = 0 let _key = try! HString(key) _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING_HSTRING.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.HasKey(pThis, _key.get(), &result)) } return .init(from: result) } internal func SplitImpl(_ first: inout WindowsFoundation.AnyIMapView?, _ second: inout WindowsFoundation.AnyIMapView?) throws { let (_first, _second) = try ComPtrs.initialize { (_firstAbi, _secondAbi) in _ = try perform(as: __x_ABI_C__FIMapView_2_HSTRING_HSTRING.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.Split(pThis, &_firstAbi, &_secondAbi)) } } first = WindowsFoundation.__x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.unwrapFrom(abi: _first) second = WindowsFoundation.__x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.unwrapFrom(abi: _second) } } internal enum __x_ABI_C__FIMapView_2_HSTRING_HSTRINGBridge : AbiInterfaceBridge { internal typealias CABI = __x_ABI_C__FIMapView_2_HSTRING_HSTRING internal typealias SwiftABI = IMapViewString_String internal typealias SwiftProjection = WindowsFoundation.AnyIMapView internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } return __x_ABI_C__FIMapView_2_HSTRING_HSTRINGImpl(abi) } internal static func makeAbi() -> CABI { let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIMapView_2_HSTRING_HSTRINGVTable) { $0 } return .init(lpVtbl: vtblPtr) } } fileprivate class __x_ABI_C__FIMapView_2_HSTRING_HSTRINGImpl : IMapView, AbiInterfaceImpl { typealias T = WindowsFoundation.AnyIKeyValuePair? typealias K = String typealias V = String typealias Bridge = __x_ABI_C__FIMapView_2_HSTRING_HSTRINGBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.lookup) fileprivate func lookup(_ key: String) -> String { try! _default.LookupImpl(key) } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.haskey) fileprivate func hasKey(_ key: String) -> Bool { try! _default.HasKeyImpl(key) } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.split) fileprivate func split(_ first: inout WindowsFoundation.AnyIMapView?, _ second: inout WindowsFoundation.AnyIMapView?) { try! _default.SplitImpl(&first, &second) } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.size) fileprivate var size : UInt32 { get { try! _default.get_SizeImpl() } } private lazy var _IIterable: IIterableIKeyValuePairString_String! = getInterfaceForCaching() /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imapview-2.first) fileprivate func first() -> WindowsFoundation.AnyIIterator?>? { try! _IIterable.FirstImpl() } public func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? { nil } } private var IID___x_ABI_C__FIMap_2_HSTRING_IInspectable: WindowsFoundation.IID { .init(Data1: 0x1b0d3570, Data2: 0x0877, Data3: 0x5ec2, Data4: ( 0x8a,0x2c,0x3b,0x95,0x39,0x50,0x6a,0xca ))// 1b0d3570-0877-5ec2-8a2c-3b9539506aca } internal var __x_ABI_C__FIMap_2_HSTRING_IInspectableVTable: __x_ABI_C__FIMap_2_HSTRING_IInspectableVtbl = .init( QueryInterface: { __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.queryInterface($0, $1, $2) }, AddRef: { __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.addRef($0) }, Release: { __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.release($0) }, GetIids: { let size = MemoryLayout.size let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: WindowsFoundation.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID iids[2] = WindowsFoundation.__x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.IID iids[3] = WindowsFoundation.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.IID $1!.pointee = 4 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 let hstring = try! HString("Windows.Foundation.Collections.IMap`2").detach() $1!.pointee = hstring return S_OK }, GetTrustLevel: { _ = $0 $1!.pointee = TrustLevel(rawValue: 0) return S_OK }, Lookup: { guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let key: String = .init(from: $1) let result = __unwrapped__instance.lookup(key) let resultWrapper = __ABI_.AnyWrapper(result) resultWrapper?.copyTo($2) return S_OK }, get_Size: { guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let result = __unwrapped__instance.size $1?.initialize(to: result) return S_OK }, HasKey: { guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let key: String = .init(from: $1) let result = __unwrapped__instance.hasKey(key) $2?.initialize(to: .init(from: result)) return S_OK }, GetView: { guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let result = __unwrapped__instance.getView() let resultWrapper = WindowsFoundation.__x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper(result) resultWrapper?.copyTo($1) return S_OK }, Insert: { guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let key: String = .init(from: $1) let value: Any? = __ABI_.AnyWrapper.unwrapFrom(abi: ComPtr($2)) let result = __unwrapped__instance.insert(key, value) $3?.initialize(to: .init(from: result)) return S_OK }, Remove: { guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let key: String = .init(from: $1) __unwrapped__instance.remove(key) return S_OK }, Clear: { guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } __unwrapped__instance.clear() return S_OK } ) typealias __x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper = InterfaceWrapperBase internal class IMapString_Any: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_C__FIMap_2_HSTRING_IInspectable } internal func LookupImpl(_ key: String) throws -> Any? { let (result) = try ComPtrs.initialize { resultAbi in let _key = try! HString(key) _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_IInspectable.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.Lookup(pThis, _key.get(), &resultAbi)) } } return __ABI_.AnyWrapper.unwrapFrom(abi: result) } internal func get_SizeImpl() throws -> UInt32 { var result: UINT32 = 0 _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_IInspectable.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) } return result } internal func HasKeyImpl(_ key: String) throws -> Bool { var result: boolean = 0 let _key = try! HString(key) _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_IInspectable.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.HasKey(pThis, _key.get(), &result)) } return .init(from: result) } internal func GetViewImpl() throws -> WindowsFoundation.AnyIMapView? { let (result) = try ComPtrs.initialize { resultAbi in _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_IInspectable.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.GetView(pThis, &resultAbi)) } } return WindowsFoundation.__x_ABI_C__FIMapView_2_HSTRING_IInspectableWrapper.unwrapFrom(abi: result) } internal func InsertImpl(_ key: String, _ value: Any?) throws -> Bool { var result: boolean = 0 let _key = try! HString(key) let valueWrapper = __ABI_.AnyWrapper(value) let _value = try! valueWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_IInspectable.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.Insert(pThis, _key.get(), _value, &result)) } return .init(from: result) } internal func RemoveImpl(_ key: String) throws { let _key = try! HString(key) _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_IInspectable.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.Remove(pThis, _key.get())) } } internal func ClearImpl() throws { _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_IInspectable.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.Clear(pThis)) } } } internal enum __x_ABI_C__FIMap_2_HSTRING_IInspectableBridge : AbiInterfaceBridge { internal typealias CABI = __x_ABI_C__FIMap_2_HSTRING_IInspectable internal typealias SwiftABI = IMapString_Any internal typealias SwiftProjection = WindowsFoundation.AnyIMap internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } return __x_ABI_C__FIMap_2_HSTRING_IInspectableImpl(abi) } internal static func makeAbi() -> CABI { let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIMap_2_HSTRING_IInspectableVTable) { $0 } return .init(lpVtbl: vtblPtr) } } fileprivate class __x_ABI_C__FIMap_2_HSTRING_IInspectableImpl : IMap, AbiInterfaceImpl { typealias T = WindowsFoundation.AnyIKeyValuePair? typealias K = String typealias V = Any? typealias Bridge = __x_ABI_C__FIMap_2_HSTRING_IInspectableBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.lookup) fileprivate func lookup(_ key: String) -> Any? { try! _default.LookupImpl(key) } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.haskey) fileprivate func hasKey(_ key: String) -> Bool { try! _default.HasKeyImpl(key) } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.getview) fileprivate func getView() -> WindowsFoundation.AnyIMapView? { try! _default.GetViewImpl() } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.insert) fileprivate func insert(_ key: String, _ value: Any?) -> Bool { try! _default.InsertImpl(key, value) } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.remove) fileprivate func remove(_ key: String) { try! _default.RemoveImpl(key) } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.clear) fileprivate func clear() { try! _default.ClearImpl() } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.size) fileprivate var size : UInt32 { get { try! _default.get_SizeImpl() } } private lazy var _IIterable: IIterableIKeyValuePairString_Any! = getInterfaceForCaching() /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.first) fileprivate func first() -> WindowsFoundation.AnyIIterator?>? { try! _IIterable.FirstImpl() } public func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? { nil } } private var IID___x_ABI_C__FIMap_2_HSTRING_HSTRING: WindowsFoundation.IID { .init(Data1: 0xf6d1f700, Data2: 0x49c2, Data3: 0x52ae, Data4: ( 0x81,0x54,0x82,0x6f,0x99,0x08,0x77,0x3c ))// f6d1f700-49c2-52ae-8154-826f9908773c } internal var __x_ABI_C__FIMap_2_HSTRING_HSTRINGVTable: __x_ABI_C__FIMap_2_HSTRING_HSTRINGVtbl = .init( QueryInterface: { __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.queryInterface($0, $1, $2) }, AddRef: { __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.addRef($0) }, Release: { __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.release($0) }, GetIids: { let size = MemoryLayout.size let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: WindowsFoundation.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID iids[2] = WindowsFoundation.__x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.IID iids[3] = WindowsFoundation.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.IID $1!.pointee = 4 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 let hstring = try! HString("Windows.Foundation.Collections.IMap`2").detach() $1!.pointee = hstring return S_OK }, GetTrustLevel: { _ = $0 $1!.pointee = TrustLevel(rawValue: 0) return S_OK }, Lookup: { guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let key: String = .init(from: $1) let result = __unwrapped__instance.lookup(key) $2?.initialize(to: try! HString(result).detach()) return S_OK }, get_Size: { guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let result = __unwrapped__instance.size $1?.initialize(to: result) return S_OK }, HasKey: { guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let key: String = .init(from: $1) let result = __unwrapped__instance.hasKey(key) $2?.initialize(to: .init(from: result)) return S_OK }, GetView: { guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let result = __unwrapped__instance.getView() let resultWrapper = WindowsFoundation.__x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper(result) resultWrapper?.copyTo($1) return S_OK }, Insert: { guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let key: String = .init(from: $1) let value: String = .init(from: $2) let result = __unwrapped__instance.insert(key, value) $3?.initialize(to: .init(from: result)) return S_OK }, Remove: { guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let key: String = .init(from: $1) __unwrapped__instance.remove(key) return S_OK }, Clear: { guard let __unwrapped__instance = __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } __unwrapped__instance.clear() return S_OK } ) typealias __x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper = InterfaceWrapperBase internal class IMapString_String: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_C__FIMap_2_HSTRING_HSTRING } internal func LookupImpl(_ key: String) throws -> String { var result: HSTRING? let _key = try! HString(key) _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_HSTRING.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.Lookup(pThis, _key.get(), &result)) } return .init(from: result) } internal func get_SizeImpl() throws -> UInt32 { var result: UINT32 = 0 _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_HSTRING.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) } return result } internal func HasKeyImpl(_ key: String) throws -> Bool { var result: boolean = 0 let _key = try! HString(key) _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_HSTRING.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.HasKey(pThis, _key.get(), &result)) } return .init(from: result) } internal func GetViewImpl() throws -> WindowsFoundation.AnyIMapView? { let (result) = try ComPtrs.initialize { resultAbi in _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_HSTRING.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.GetView(pThis, &resultAbi)) } } return WindowsFoundation.__x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.unwrapFrom(abi: result) } internal func InsertImpl(_ key: String, _ value: String) throws -> Bool { var result: boolean = 0 let _key = try! HString(key) let _value = try! HString(value) _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_HSTRING.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.Insert(pThis, _key.get(), _value.get(), &result)) } return .init(from: result) } internal func RemoveImpl(_ key: String) throws { let _key = try! HString(key) _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_HSTRING.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.Remove(pThis, _key.get())) } } internal func ClearImpl() throws { _ = try perform(as: __x_ABI_C__FIMap_2_HSTRING_HSTRING.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.Clear(pThis)) } } } internal enum __x_ABI_C__FIMap_2_HSTRING_HSTRINGBridge : AbiInterfaceBridge { internal typealias CABI = __x_ABI_C__FIMap_2_HSTRING_HSTRING internal typealias SwiftABI = IMapString_String internal typealias SwiftProjection = WindowsFoundation.AnyIMap internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } return __x_ABI_C__FIMap_2_HSTRING_HSTRINGImpl(abi) } internal static func makeAbi() -> CABI { let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIMap_2_HSTRING_HSTRINGVTable) { $0 } return .init(lpVtbl: vtblPtr) } } fileprivate class __x_ABI_C__FIMap_2_HSTRING_HSTRINGImpl : IMap, AbiInterfaceImpl { typealias T = WindowsFoundation.AnyIKeyValuePair? typealias K = String typealias V = String typealias Bridge = __x_ABI_C__FIMap_2_HSTRING_HSTRINGBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.lookup) fileprivate func lookup(_ key: String) -> String { try! _default.LookupImpl(key) } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.haskey) fileprivate func hasKey(_ key: String) -> Bool { try! _default.HasKeyImpl(key) } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.getview) fileprivate func getView() -> WindowsFoundation.AnyIMapView? { try! _default.GetViewImpl() } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.insert) fileprivate func insert(_ key: String, _ value: String) -> Bool { try! _default.InsertImpl(key, value) } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.remove) fileprivate func remove(_ key: String) { try! _default.RemoveImpl(key) } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.clear) fileprivate func clear() { try! _default.ClearImpl() } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.size) fileprivate var size : UInt32 { get { try! _default.get_SizeImpl() } } private lazy var _IIterable: IIterableIKeyValuePairString_String! = getInterfaceForCaching() /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.imap-2.first) fileprivate func first() -> WindowsFoundation.AnyIIterator?>? { try! _IIterable.FirstImpl() } public func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? { nil } } private var IID___x_ABI_C__FIObservableMap_2_HSTRING_IInspectable: WindowsFoundation.IID { .init(Data1: 0x236aac9d, Data2: 0xfb12, Data3: 0x5c4d, Data4: ( 0xa4,0x1c,0x9e,0x44,0x5f,0xb4,0xd7,0xec ))// 236aac9d-fb12-5c4d-a41c-9e445fb4d7ec } internal var __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableVTable: __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableVtbl = .init( QueryInterface: { __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableWrapper.queryInterface($0, $1, $2) }, AddRef: { __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableWrapper.addRef($0) }, Release: { __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableWrapper.release($0) }, GetIids: { let size = MemoryLayout.size let iids = CoTaskMemAlloc(UInt64(size) * 5).assumingMemoryBound(to: WindowsFoundation.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID iids[2] = WindowsFoundation.__x_ABI_C__FIObservableMap_2_HSTRING_IInspectableWrapper.IID iids[3] = WindowsFoundation.__x_ABI_C__FIMap_2_HSTRING_IInspectableWrapper.IID iids[4] = WindowsFoundation.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_IInspectableWrapper.IID $1!.pointee = 5 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 let hstring = try! HString("Windows.Foundation.Collections.IObservableMap`2").detach() $1!.pointee = hstring return S_OK }, GetTrustLevel: { _ = $0 $1!.pointee = TrustLevel(rawValue: 0) return S_OK }, add_MapChanged: { guard let __unwrapped__instance = __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } guard let vhnd = WindowsFoundation.__x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } let result = __unwrapped__instance.mapChanged.addHandler(vhnd) $2?.initialize(to: .from(swift: result)) return S_OK }, remove_MapChanged: { guard let __unwrapped__instance = __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let token: EventRegistrationToken = $1 __unwrapped__instance.mapChanged.removeHandler(token) return S_OK } ) typealias __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableWrapper = InterfaceWrapperBase internal class IObservableMapString_Any: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_C__FIObservableMap_2_HSTRING_IInspectable } internal func add_MapChangedImpl(_ vhnd: MapChangedEventHandler?) throws -> EventRegistrationToken { var result: EventRegistrationToken = .init() let vhndWrapper = WindowsFoundation.__x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableWrapper(vhnd) let _vhnd = try! vhndWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_C__FIObservableMap_2_HSTRING_IInspectable.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.add_MapChanged(pThis, _vhnd, &result)) } return result } internal func remove_MapChangedImpl(_ token: EventRegistrationToken) throws { _ = try perform(as: __x_ABI_C__FIObservableMap_2_HSTRING_IInspectable.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.remove_MapChanged(pThis, token)) } } } internal enum __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableBridge : AbiInterfaceBridge { internal typealias CABI = __x_ABI_C__FIObservableMap_2_HSTRING_IInspectable internal typealias SwiftABI = IObservableMapString_Any internal typealias SwiftProjection = WindowsFoundation.AnyIObservableMap internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } return __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableImpl(abi) } internal static func makeAbi() -> CABI { let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIObservableMap_2_HSTRING_IInspectableVTable) { $0 } return .init(lpVtbl: vtblPtr) } } fileprivate class __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableImpl : IObservableMap, AbiInterfaceImpl { typealias K = String typealias V = Any? typealias T = WindowsFoundation.AnyIKeyValuePair? typealias Bridge = __x_ABI_C__FIObservableMap_2_HSTRING_IInspectableBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.mapchanged) fileprivate lazy var mapChanged : Event> = { .init( add: { [weak self] in guard let this = self?._default else { return .init() } return try! this.add_MapChangedImpl($0) }, remove: { [weak self] in try? self?._default.remove_MapChangedImpl($0) } ) }() private lazy var _IMap: IMapString_Any! = getInterfaceForCaching() /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.lookup) fileprivate func lookup(_ key: String) -> Any? { try! _IMap.LookupImpl(key) } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.haskey) fileprivate func hasKey(_ key: String) -> Bool { try! _IMap.HasKeyImpl(key) } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.getview) fileprivate func getView() -> WindowsFoundation.AnyIMapView? { try! _IMap.GetViewImpl() } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.insert) fileprivate func insert(_ key: String, _ value: Any?) -> Bool { try! _IMap.InsertImpl(key, value) } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.remove) fileprivate func remove(_ key: String) { try! _IMap.RemoveImpl(key) } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.clear) fileprivate func clear() { try! _IMap.ClearImpl() } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.size) fileprivate var size : UInt32 { get { try! _IMap.get_SizeImpl() } } private lazy var _IIterable: IIterableIKeyValuePairString_Any! = getInterfaceForCaching() /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.first) fileprivate func first() -> WindowsFoundation.AnyIIterator?>? { try! _IIterable.FirstImpl() } public func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? { nil } } private var IID___x_ABI_C__FIObservableMap_2_HSTRING_HSTRING: WindowsFoundation.IID { .init(Data1: 0x1e036276, Data2: 0x2f60, Data3: 0x55f6, Data4: ( 0xb7,0xf3,0xf8,0x60,0x79,0xe6,0x90,0x0b ))// 1e036276-2f60-55f6-b7f3-f86079e6900b } internal var __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGVTable: __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGVtbl = .init( QueryInterface: { __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGWrapper.queryInterface($0, $1, $2) }, AddRef: { __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGWrapper.addRef($0) }, Release: { __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGWrapper.release($0) }, GetIids: { let size = MemoryLayout.size let iids = CoTaskMemAlloc(UInt64(size) * 5).assumingMemoryBound(to: WindowsFoundation.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID iids[2] = WindowsFoundation.__x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGWrapper.IID iids[3] = WindowsFoundation.__x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.IID iids[4] = WindowsFoundation.__x_ABI_C__FIIterable_1___x_ABI_C__FIKeyValuePair_2_HSTRING_HSTRINGWrapper.IID $1!.pointee = 5 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 let hstring = try! HString("Windows.Foundation.Collections.IObservableMap`2").detach() $1!.pointee = hstring return S_OK }, GetTrustLevel: { _ = $0 $1!.pointee = TrustLevel(rawValue: 0) return S_OK }, add_MapChanged: { guard let __unwrapped__instance = __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } guard let vhnd = WindowsFoundation.__x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } let result = __unwrapped__instance.mapChanged.addHandler(vhnd) $2?.initialize(to: .from(swift: result)) return S_OK }, remove_MapChanged: { guard let __unwrapped__instance = __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let token: EventRegistrationToken = $1 __unwrapped__instance.mapChanged.removeHandler(token) return S_OK } ) typealias __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGWrapper = InterfaceWrapperBase internal class IObservableMapString_String: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_C__FIObservableMap_2_HSTRING_HSTRING } internal func add_MapChangedImpl(_ vhnd: MapChangedEventHandler?) throws -> EventRegistrationToken { var result: EventRegistrationToken = .init() let vhndWrapper = WindowsFoundation.__x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGWrapper(vhnd) let _vhnd = try! vhndWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_C__FIObservableMap_2_HSTRING_HSTRING.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.add_MapChanged(pThis, _vhnd, &result)) } return result } internal func remove_MapChangedImpl(_ token: EventRegistrationToken) throws { _ = try perform(as: __x_ABI_C__FIObservableMap_2_HSTRING_HSTRING.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.remove_MapChanged(pThis, token)) } } } internal enum __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGBridge : AbiInterfaceBridge { internal typealias CABI = __x_ABI_C__FIObservableMap_2_HSTRING_HSTRING internal typealias SwiftABI = IObservableMapString_String internal typealias SwiftProjection = WindowsFoundation.AnyIObservableMap internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } return __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGImpl(abi) } internal static func makeAbi() -> CABI { let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGVTable) { $0 } return .init(lpVtbl: vtblPtr) } } fileprivate class __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGImpl : IObservableMap, AbiInterfaceImpl { typealias K = String typealias V = String typealias T = WindowsFoundation.AnyIKeyValuePair? typealias Bridge = __x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: WinRT /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.mapchanged) fileprivate lazy var mapChanged : Event> = { .init( add: { [weak self] in guard let this = self?._default else { return .init() } return try! this.add_MapChangedImpl($0) }, remove: { [weak self] in try? self?._default.remove_MapChangedImpl($0) } ) }() private lazy var _IMap: IMapString_String! = getInterfaceForCaching() /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.lookup) fileprivate func lookup(_ key: String) -> String { try! _IMap.LookupImpl(key) } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.haskey) fileprivate func hasKey(_ key: String) -> Bool { try! _IMap.HasKeyImpl(key) } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.getview) fileprivate func getView() -> WindowsFoundation.AnyIMapView? { try! _IMap.GetViewImpl() } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.insert) fileprivate func insert(_ key: String, _ value: String) -> Bool { try! _IMap.InsertImpl(key, value) } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.remove) fileprivate func remove(_ key: String) { try! _IMap.RemoveImpl(key) } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.clear) fileprivate func clear() { try! _IMap.ClearImpl() } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.size) fileprivate var size : UInt32 { get { try! _IMap.get_SizeImpl() } } private lazy var _IIterable: IIterableIKeyValuePairString_String! = getInterfaceForCaching() /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.iobservablemap-2.first) fileprivate func first() -> WindowsFoundation.AnyIIterator?>? { try! _IIterable.FirstImpl() } public func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? { nil } } private var IID___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry: WindowsFoundation.IID { .init(Data1: 0xb1f00d3b, Data2: 0x1f06, Data3: 0x5117, Data4: ( 0x93,0xea,0x2a,0x0d,0x79,0x11,0x67,0x01 ))// b1f00d3b-1f06-5117-93ea-2a0d79116701 } internal var __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryVTable: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryVtbl = .init( QueryInterface: { __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.queryInterface($0, $1, $2) }, AddRef: { __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.addRef($0) }, Release: { __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.release($0) }, GetIids: { let size = MemoryLayout.size let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: WindowsFoundation.IID.self) iids[0] = IUnknown.IID iids[1] = IInspectable.IID iids[2] = WindowsFoundation.__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.IID iids[3] = WindowsFoundation.__x_ABI_C__FIIterable_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.IID $1!.pointee = 4 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 let hstring = try! HString("Windows.Foundation.Collections.IVectorView`1").detach() $1!.pointee = hstring return S_OK }, GetTrustLevel: { _ = $0 $1!.pointee = TrustLevel(rawValue: 0) return S_OK }, GetAt: { guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let index: UInt32 = $1 let result = __unwrapped__instance.getAt(index) let resultWrapper = __ABI_Windows_Foundation.IWwwFormUrlDecoderEntryWrapper(result) resultWrapper?.copyTo($2) return S_OK }, get_Size: { guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let result = __unwrapped__instance.size $1?.initialize(to: result) return S_OK }, IndexOf: { guard let __unwrapped__instance = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let value: WindowsFoundation.AnyIWwwFormUrlDecoderEntry? = __ABI_Windows_Foundation.IWwwFormUrlDecoderEntryWrapper.unwrapFrom(abi: ComPtr($1)) var index: UInt32 = 0 let result = __unwrapped__instance.indexOf(value, &index) $2?.initialize(to: index) $3?.initialize(to: .init(from: result)) return S_OK }, GetMany: { _, _, _, _, _ in return failWith(err: E_NOTIMPL) } ) typealias __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryWrapper = InterfaceWrapperBase internal class IVectorViewIWwwFormUrlDecoderEntry: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry } internal func GetAtImpl(_ index: UInt32) throws -> WindowsFoundation.AnyIWwwFormUrlDecoderEntry? { let (result) = try ComPtrs.initialize { resultAbi in _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.GetAt(pThis, index, &resultAbi)) } } return __ABI_Windows_Foundation.IWwwFormUrlDecoderEntryWrapper.unwrapFrom(abi: result) } internal func get_SizeImpl() throws -> UInt32 { var result: UINT32 = 0 _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Size(pThis, &result)) } return result } internal func IndexOfImpl(_ value: WindowsFoundation.AnyIWwwFormUrlDecoderEntry?, _ index: inout UInt32) throws -> Bool { var result: boolean = 0 let valueWrapper = __ABI_Windows_Foundation.IWwwFormUrlDecoderEntryWrapper(value) let _value = try! valueWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.IndexOf(pThis, _value, &index, &result)) } return .init(from: result) } } internal enum __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryBridge : AbiInterfaceBridge { internal typealias CABI = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntry internal typealias SwiftABI = IVectorViewIWwwFormUrlDecoderEntry internal typealias SwiftProjection = WindowsFoundation.AnyIVectorView internal static func from(abi: ComPtr?) -> SwiftProjection? { guard let abi = abi else { return nil } return __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryImpl(abi) } internal static func makeAbi() -> CABI { let vtblPtr = withUnsafeMutablePointer(to: &__x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryVTable) { $0 } return .init(lpVtbl: vtblPtr) } } fileprivate class __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryImpl : IVectorView, AbiInterfaceImpl { typealias T = WindowsFoundation.AnyIWwwFormUrlDecoderEntry? typealias Bridge = __x_ABI_C__FIVectorView_1___x_ABI_CWindows__CFoundation__CIWwwFormUrlDecoderEntryBridge let _default: Bridge.SwiftABI init(_ fromAbi: ComPtr) { _default = Bridge.SwiftABI(fromAbi) } // MARK: Collection typealias Element = T var startIndex: Int { 0 } var endIndex: Int { Int(size) } func index(after i: Int) -> Int { i+1 } func index(of: Element) -> Int? { var index: UInt32 = 0 let result = indexOf(of, &index) guard result else { return nil } return Int(index) } var count: Int { Int(size) } subscript(position: Int) -> Element { get { getAt(UInt32(position)) } } // MARK: WinRT /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.getat) fileprivate func getAt(_ index: UInt32) -> WindowsFoundation.AnyIWwwFormUrlDecoderEntry? { try! _default.GetAtImpl(index) } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.indexof) fileprivate func indexOf(_ value: WindowsFoundation.AnyIWwwFormUrlDecoderEntry?, _ index: inout UInt32) -> Bool { try! _default.IndexOfImpl(value, &index) } /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.size) fileprivate var size : UInt32 { get { try! _default.get_SizeImpl() } } private lazy var _IIterable: IIterableIWwwFormUrlDecoderEntry! = getInterfaceForCaching() /// [Open Microsoft documentation](https://learn.microsoft.com/uwp/api/windows.foundation.collections.ivectorview-1.first) fileprivate func first() -> WindowsFoundation.AnyIIterator? { try! _IIterable.FirstImpl() } public func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? { nil } } private var IID___x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectable: WindowsFoundation.IID { .init(Data1: 0x24f981e5, Data2: 0xddca, Data3: 0x538d, Data4: ( 0xaa,0xda,0xa5,0x99,0x06,0x08,0x4c,0xf1 ))// 24f981e5-ddca-538d-aada-a59906084cf1 } internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectable { static func makeAbi() -> CABI { let vtblPtr = withUnsafeMutablePointer(to: &WindowsFoundation.__x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableVTable) { $0 } return .init(lpVtbl:vtblPtr) } } internal var __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableVTable: __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableVtbl = .init( QueryInterface: { __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableWrapper.queryInterface($0, $1, $2) }, AddRef: { __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableWrapper.addRef($0) }, Release: { __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableWrapper.release($0) }, Invoke: { guard let __unwrapped__instance = __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let sender: WindowsFoundation.AnyIObservableMap? = WindowsFoundation.__x_ABI_C__FIObservableMap_2_HSTRING_IInspectableWrapper.unwrapFrom(abi: ComPtr($1)) let event: WindowsFoundation.AnyIMapChangedEventArgs? = WindowsFoundation.__x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper.unwrapFrom(abi: ComPtr($2)) __unwrapped__instance(sender, event) return S_OK } ) typealias __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableWrapper = InterfaceWrapperBase internal class MapChangedEventHandlerString_Any: WindowsFoundation.IUnknown { override public class var IID: WindowsFoundation.IID { IID___x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectable } internal func InvokeImpl(_ sender: WindowsFoundation.AnyIObservableMap?, _ event: WindowsFoundation.AnyIMapChangedEventArgs?) throws { let senderWrapper = WindowsFoundation.__x_ABI_C__FIObservableMap_2_HSTRING_IInspectableWrapper(sender) let _sender = try! senderWrapper?.toABI { $0 } let eventWrapper = WindowsFoundation.__x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper(event) let _event = try! eventWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectable.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _sender, _event)) } } } internal class __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectableBridge : WinRTDelegateBridge { internal typealias Handler = WindowsFoundation.MapChangedEventHandler internal typealias CABI = __x_ABI_C__FMapChangedEventHandler_2_HSTRING_IInspectable internal typealias SwiftABI = WindowsFoundation.MapChangedEventHandlerString_Any internal static func from(abi: ComPtr?) -> Handler? { guard let abi = abi else { return nil } let _default = SwiftABI(abi) let handler: Handler = { (sender, event) in try! _default.InvokeImpl(sender, event) } return handler } } private var IID___x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRING: WindowsFoundation.IID { .init(Data1: 0xe2663f37, Data2: 0x2e1b, Data3: 0x500c, Data4: ( 0xad,0x68,0xc3,0xed,0x7a,0x8f,0x74,0xc8 ))// e2663f37-2e1b-500c-ad68-c3ed7a8f74c8 } internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRING { static func makeAbi() -> CABI { let vtblPtr = withUnsafeMutablePointer(to: &WindowsFoundation.__x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGVTable) { $0 } return .init(lpVtbl:vtblPtr) } } internal var __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGVTable: __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGVtbl = .init( QueryInterface: { __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGWrapper.queryInterface($0, $1, $2) }, AddRef: { __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGWrapper.addRef($0) }, Release: { __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGWrapper.release($0) }, Invoke: { guard let __unwrapped__instance = __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let sender: WindowsFoundation.AnyIObservableMap? = WindowsFoundation.__x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGWrapper.unwrapFrom(abi: ComPtr($1)) let event: WindowsFoundation.AnyIMapChangedEventArgs? = WindowsFoundation.__x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper.unwrapFrom(abi: ComPtr($2)) __unwrapped__instance(sender, event) return S_OK } ) typealias __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGWrapper = InterfaceWrapperBase internal class MapChangedEventHandlerString_String: WindowsFoundation.IUnknown { override public class var IID: WindowsFoundation.IID { IID___x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRING } internal func InvokeImpl(_ sender: WindowsFoundation.AnyIObservableMap?, _ event: WindowsFoundation.AnyIMapChangedEventArgs?) throws { let senderWrapper = WindowsFoundation.__x_ABI_C__FIObservableMap_2_HSTRING_HSTRINGWrapper(sender) let _sender = try! senderWrapper?.toABI { $0 } let eventWrapper = WindowsFoundation.__x_ABI_C__FIMapChangedEventArgs_1_HSTRINGWrapper(event) let _event = try! eventWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRING.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _sender, _event)) } } } internal class __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRINGBridge : WinRTDelegateBridge { internal typealias Handler = WindowsFoundation.MapChangedEventHandler internal typealias CABI = __x_ABI_C__FMapChangedEventHandler_2_HSTRING_HSTRING internal typealias SwiftABI = WindowsFoundation.MapChangedEventHandlerString_String internal static func from(abi: ComPtr?) -> Handler? { guard let abi = abi else { return nil } let _default = SwiftABI(abi) let handler: Handler = { (sender, event) in try! _default.InvokeImpl(sender, event) } return handler } } private var IID___x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CFoundation__CIMemoryBufferReference_IInspectable: WindowsFoundation.IID { .init(Data1: 0xf4637d4a, Data2: 0x0760, Data3: 0x5431, Data4: ( 0xbf,0xc0,0x24,0xeb,0x1d,0x4f,0x6c,0x4f ))// f4637d4a-0760-5431-bfc0-24eb1d4f6c4f } internal extension WinRTDelegateBridge where CABI == __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CFoundation__CIMemoryBufferReference_IInspectable { static func makeAbi() -> CABI { let vtblPtr = withUnsafeMutablePointer(to: &WindowsFoundation.__x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CFoundation__CIMemoryBufferReference_IInspectableVTable) { $0 } return .init(lpVtbl:vtblPtr) } } internal var __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CFoundation__CIMemoryBufferReference_IInspectableVTable: __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CFoundation__CIMemoryBufferReference_IInspectableVtbl = .init( QueryInterface: { __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CFoundation__CIMemoryBufferReference_IInspectableWrapper.queryInterface($0, $1, $2) }, AddRef: { __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CFoundation__CIMemoryBufferReference_IInspectableWrapper.addRef($0) }, Release: { __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CFoundation__CIMemoryBufferReference_IInspectableWrapper.release($0) }, Invoke: { guard let __unwrapped__instance = __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CFoundation__CIMemoryBufferReference_IInspectableWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let sender: WindowsFoundation.AnyIMemoryBufferReference? = __ABI_Windows_Foundation.IMemoryBufferReferenceWrapper.unwrapFrom(abi: ComPtr($1)) let args: Any? = __ABI_.AnyWrapper.unwrapFrom(abi: ComPtr($2)) __unwrapped__instance(sender, args) return S_OK } ) typealias __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CFoundation__CIMemoryBufferReference_IInspectableWrapper = InterfaceWrapperBase internal class TypedEventHandlerIMemoryBufferReference_Any: WindowsFoundation.IUnknown { override public class var IID: WindowsFoundation.IID { IID___x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CFoundation__CIMemoryBufferReference_IInspectable } internal func InvokeImpl(_ sender: WindowsFoundation.AnyIMemoryBufferReference?, _ args: Any?) throws { let senderWrapper = __ABI_Windows_Foundation.IMemoryBufferReferenceWrapper(sender) let _sender = try! senderWrapper?.toABI { $0 } let argsWrapper = __ABI_.AnyWrapper(args) let _args = try! argsWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CFoundation__CIMemoryBufferReference_IInspectable.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis, _sender, _args)) } } } internal class __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CFoundation__CIMemoryBufferReference_IInspectableBridge : WinRTDelegateBridge { internal typealias Handler = WindowsFoundation.TypedEventHandler internal typealias CABI = __x_ABI_C__FITypedEventHandler_2___x_ABI_CWindows__CFoundation__CIMemoryBufferReference_IInspectable internal typealias SwiftABI = WindowsFoundation.TypedEventHandlerIMemoryBufferReference_Any internal static func from(abi: ComPtr?) -> Handler? { guard let abi = abi else { return nil } let _default = SwiftABI(abi) let handler: Handler = { (sender, args) in try! _default.InvokeImpl(sender, args) } return handler } } public extension EventSource where Handler == TypedEventHandler { func invoke(_ sender: WindowsFoundation.AnyIMemoryBufferReference!, _ args: Any!) { for handler in getInvocationList() { handler(sender, args) } } }