// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1 // swiftlint:disable all import Foundation @_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation import CWinRT private var IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceCandidate: WindowsFoundation.IID { .init(Data1: 0x6C54BC0C, Data2: 0xEF1E, Data3: 0x57B8, Data4: ( 0xB4,0x78,0x34,0xFE,0xCE,0x73,0x73,0x56 ))// 6C54BC0C-EF1E-57B8-B478-34FECE737356 } private var IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceCandidateFactory: WindowsFoundation.IID { .init(Data1: 0xBB2B30F8, Data2: 0xC19B, Data3: 0x5F43, Data4: ( 0x88,0xD9,0x69,0xAD,0x72,0x8A,0x32,0xF4 ))// BB2B30F8-C19B-5F43-88D9-69AD728A32F4 } private var IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceContext: WindowsFoundation.IID { .init(Data1: 0x96FB48DC, Data2: 0xF77D, Data3: 0x55FF, Data4: ( 0xAF,0x12,0x34,0x86,0x1E,0x3D,0x49,0x39 ))// 96FB48DC-F77D-55FF-AF12-34861E3D4939 } private var IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceContext2: WindowsFoundation.IID { .init(Data1: 0x7A3B1158, Data2: 0x798C, Data3: 0x5949, Data4: ( 0x96,0x9D,0x03,0x51,0x0B,0x9C,0xE6,0xCA ))// 7A3B1158-798C-5949-969D-03510B9CE6CA } private var IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceManager: WindowsFoundation.IID { .init(Data1: 0xAC2291EF, Data2: 0x81BE, Data3: 0x5C99, Data4: ( 0xA0,0xAE,0xBC,0xEE,0x01,0x80,0xB8,0xA8 ))// AC2291EF-81BE-5C99-A0AE-BCEE0180B8A8 } private var IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceManager2: WindowsFoundation.IID { .init(Data1: 0x7EC10160, Data2: 0xA154, Data3: 0x5C42, Data4: ( 0x82,0x68,0x30,0xE3,0x06,0xB1,0xF5,0x85 ))// 7EC10160-A154-5C42-8268-30E306B1F585 } private var IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceManagerFactory: WindowsFoundation.IID { .init(Data1: 0xD6ACF18F, Data2: 0x458A, Data3: 0x535B, Data4: ( 0xA5,0xC4,0xAC,0x2D,0xC4,0xE4,0x90,0x99 ))// D6ACF18F-458A-535B-A5C4-AC2DC4E49099 } private var IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceMap: WindowsFoundation.IID { .init(Data1: 0x4ABBD9BC, Data2: 0xDF4E, Data3: 0x5C7B, Data4: ( 0x81,0x2C,0x7E,0x7B,0xB0,0xC2,0x23,0x77 ))// 4ABBD9BC-DF4E-5C7B-812C-7E7BB0C22377 } private var IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceNotFoundEventArgs: WindowsFoundation.IID { .init(Data1: 0x64ABB08B, Data2: 0xE77D, Data3: 0x5B26, Data4: ( 0x83,0x0F,0x15,0x94,0x1E,0x0E,0x82,0x00 ))// 64ABB08B-E77D-5B26-830F-15941E0E8200 } public enum __ABI_Microsoft_Windows_ApplicationModel_Resources { public class IResourceCandidate: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceCandidate } internal func get_ValueAsStringImpl() throws -> String { var value: HSTRING? _ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceCandidate.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_ValueAsString(pThis, &value)) } return .init(from: value) } internal func get_KindImpl() throws -> WinAppSDK.ResourceCandidateKind { var value: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CResourceCandidateKind = .init(0) _ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceCandidate.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Kind(pThis, &value)) } return value } internal func get_QualifierValuesImpl() throws -> WindowsFoundation.AnyIMapView? { let (value) = try ComPtrs.initialize { valueAbi in _ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceCandidate.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_QualifierValues(pThis, &valueAbi)) } } return WinAppSDK.__x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.unwrapFrom(abi: value) } } public class IResourceCandidateFactory: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceCandidateFactory } internal func CreateInstanceImpl(_ kind: WinAppSDK.ResourceCandidateKind, _ data: String) throws -> IResourceCandidate { let (value) = try ComPtrs.initialize { valueAbi in let _data = try! HString(data) _ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceCandidateFactory.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.CreateInstance(pThis, kind, _data.get(), &valueAbi)) } } return IResourceCandidate(value!) } } public class IResourceContext: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceContext } open func get_QualifierValuesImpl() throws -> WindowsFoundation.AnyIMap? { let (value) = try ComPtrs.initialize { valueAbi in _ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceContext.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_QualifierValues(pThis, &valueAbi)) } } return WinAppSDK.__x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.unwrapFrom(abi: value) } } internal static var IResourceContextVTable: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceContextVtbl = .init( QueryInterface: { IResourceContextWrapper.queryInterface($0, $1, $2) }, AddRef: { IResourceContextWrapper.addRef($0) }, Release: { IResourceContextWrapper.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] = __ABI_Microsoft_Windows_ApplicationModel_Resources.IResourceContextWrapper.IID $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 let hstring = try! HString("Microsoft.Windows.ApplicationModel.Resources.IResourceContext").detach() $1!.pointee = hstring return S_OK }, GetTrustLevel: { _ = $0 $1!.pointee = TrustLevel(rawValue: 0) return S_OK }, get_QualifierValues: { guard let __unwrapped__instance = IResourceContextWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let value = __unwrapped__instance.qualifierValues let valueWrapper = WinAppSDK.__x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper(value) valueWrapper?.copyTo($1) return S_OK } ) public typealias IResourceContextWrapper = InterfaceWrapperBase<__IMPL_Microsoft_Windows_ApplicationModel_Resources.IResourceContextBridge> public class IResourceContext2: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceContext2 } } public class IResourceManager: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceManager } open func get_MainResourceMapImpl() throws -> WinAppSDK.ResourceMap? { let (value) = try ComPtrs.initialize { valueAbi in _ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceManager.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_MainResourceMap(pThis, &valueAbi)) } } return .from(abi: value) } open func CreateResourceContextImpl() throws -> WinAppSDK.ResourceContext? { let (result) = try ComPtrs.initialize { resultAbi in _ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceManager.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.CreateResourceContext(pThis, &resultAbi)) } } return .from(abi: result) } open func add_ResourceNotFoundImpl(_ handler: TypedEventHandler?) throws -> EventRegistrationToken { var token: EventRegistrationToken = .init() let handlerWrapper = WinAppSDK.__x_ABI_C__FITypedEventHandler_2___x_ABI_CMicrosoft__CWindows__CApplicationModel__CResources__CResourceManager___x_ABI_CMicrosoft__CWindows__CApplicationModel__CResources__CResourceNotFoundEventArgsWrapper(handler) let _handler = try! handlerWrapper?.toABI { $0 } _ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceManager.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.add_ResourceNotFound(pThis, _handler, &token)) } return token } open func remove_ResourceNotFoundImpl(_ token: EventRegistrationToken) throws { _ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceManager.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.remove_ResourceNotFound(pThis, token)) } } } internal static var IResourceManagerVTable: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceManagerVtbl = .init( QueryInterface: { IResourceManagerWrapper.queryInterface($0, $1, $2) }, AddRef: { IResourceManagerWrapper.addRef($0) }, Release: { IResourceManagerWrapper.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] = __ABI_Microsoft_Windows_ApplicationModel_Resources.IResourceManagerWrapper.IID $1!.pointee = 3 $2!.pointee = iids return S_OK }, GetRuntimeClassName: { _ = $0 let hstring = try! HString("Microsoft.Windows.ApplicationModel.Resources.IResourceManager").detach() $1!.pointee = hstring return S_OK }, GetTrustLevel: { _ = $0 $1!.pointee = TrustLevel(rawValue: 0) return S_OK }, get_MainResourceMap: { guard let __unwrapped__instance = IResourceManagerWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let value = __unwrapped__instance.mainResourceMap value?.copyTo($1) return S_OK }, CreateResourceContext: { do { guard let __unwrapped__instance = IResourceManagerWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let result = try __unwrapped__instance.createResourceContext() result?.copyTo($1) return S_OK } catch { return failWith(err: E_FAIL) } }, add_ResourceNotFound: { guard let __unwrapped__instance = IResourceManagerWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } guard let handler = WinAppSDK.__x_ABI_C__FITypedEventHandler_2___x_ABI_CMicrosoft__CWindows__CApplicationModel__CResources__CResourceManager___x_ABI_CMicrosoft__CWindows__CApplicationModel__CResources__CResourceNotFoundEventArgsWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG } let token = __unwrapped__instance.resourceNotFound.addHandler(handler) $2?.initialize(to: .from(swift: token)) return S_OK }, remove_ResourceNotFound: { guard let __unwrapped__instance = IResourceManagerWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG } let token: EventRegistrationToken = $1 __unwrapped__instance.resourceNotFound.removeHandler(token) return S_OK } ) public typealias IResourceManagerWrapper = InterfaceWrapperBase<__IMPL_Microsoft_Windows_ApplicationModel_Resources.IResourceManagerBridge> public class IResourceManager2: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceManager2 } } public class IResourceManagerFactory: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceManagerFactory } internal func CreateInstanceImpl(_ fileName: String) throws -> IResourceManager { let (value) = try ComPtrs.initialize { valueAbi in let _fileName = try! HString(fileName) _ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceManagerFactory.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.CreateInstance(pThis, _fileName.get(), &valueAbi)) } } return IResourceManager(value!) } } public class IResourceMap: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceMap } internal func get_ResourceCountImpl() throws -> UInt32 { var value: UINT32 = 0 _ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceMap.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_ResourceCount(pThis, &value)) } return value } internal func GetSubtreeImpl(_ reference: String) throws -> WinAppSDK.ResourceMap? { let (result) = try ComPtrs.initialize { resultAbi in let _reference = try! HString(reference) _ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceMap.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.GetSubtree(pThis, _reference.get(), &resultAbi)) } } return .from(abi: result) } internal func TryGetSubtreeImpl(_ reference: String) throws -> WinAppSDK.ResourceMap? { let (result) = try ComPtrs.initialize { resultAbi in let _reference = try! HString(reference) _ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceMap.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.TryGetSubtree(pThis, _reference.get(), &resultAbi)) } } return .from(abi: result) } internal func GetValueImpl(_ resource: String) throws -> WinAppSDK.ResourceCandidate? { let (result) = try ComPtrs.initialize { resultAbi in let _resource = try! HString(resource) _ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceMap.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.GetValue(pThis, _resource.get(), &resultAbi)) } } return .from(abi: result) } internal func GetValueWithContextImpl(_ resource: String, _ context: WinAppSDK.ResourceContext?) throws -> WinAppSDK.ResourceCandidate? { let (result) = try ComPtrs.initialize { resultAbi in let _resource = try! HString(resource) _ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceMap.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.GetValueWithContext(pThis, _resource.get(), RawPointer(context), &resultAbi)) } } return .from(abi: result) } internal func GetValueByIndexImpl(_ index: UInt32) throws -> WindowsFoundation.AnyIKeyValuePair? { let (result) = try ComPtrs.initialize { resultAbi in _ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceMap.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.GetValueByIndex(pThis, index, &resultAbi)) } } return WinAppSDK.__x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_CMicrosoft__CWindows__CApplicationModel__CResources__CResourceCandidateWrapper.unwrapFrom(abi: result) } internal func GetValueByIndexWithContextImpl(_ index: UInt32, _ context: WinAppSDK.ResourceContext?) throws -> WindowsFoundation.AnyIKeyValuePair? { let (result) = try ComPtrs.initialize { resultAbi in _ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceMap.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.GetValueByIndexWithContext(pThis, index, RawPointer(context), &resultAbi)) } } return WinAppSDK.__x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_CMicrosoft__CWindows__CApplicationModel__CResources__CResourceCandidateWrapper.unwrapFrom(abi: result) } internal func TryGetValueImpl(_ resource: String) throws -> WinAppSDK.ResourceCandidate? { let (result) = try ComPtrs.initialize { resultAbi in let _resource = try! HString(resource) _ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceMap.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.TryGetValue(pThis, _resource.get(), &resultAbi)) } } return .from(abi: result) } internal func TryGetValueWithContextImpl(_ resource: String, _ context: WinAppSDK.ResourceContext?) throws -> WinAppSDK.ResourceCandidate? { let (result) = try ComPtrs.initialize { resultAbi in let _resource = try! HString(resource) _ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceMap.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.TryGetValueWithContext(pThis, _resource.get(), RawPointer(context), &resultAbi)) } } return .from(abi: result) } } public class IResourceNotFoundEventArgs: WindowsFoundation.IInspectable { override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceNotFoundEventArgs } internal func get_ContextImpl() throws -> WinAppSDK.ResourceContext? { let (value) = try ComPtrs.initialize { valueAbi in _ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceNotFoundEventArgs.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Context(pThis, &valueAbi)) } } return .from(abi: value) } internal func get_NameImpl() throws -> String { var value: HSTRING? _ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceNotFoundEventArgs.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.get_Name(pThis, &value)) } return .init(from: value) } internal func SetResolvedCandidateImpl(_ candidate: WinAppSDK.ResourceCandidate?) throws { _ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceNotFoundEventArgs.self) { pThis in try CHECKED(pThis.pointee.lpVtbl.pointee.SetResolvedCandidate(pThis, RawPointer(candidate))) } } } }