87 lines
4.1 KiB
Swift
87 lines
4.1 KiB
Swift
// 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
|
|
|
|
public enum __IMPL_Microsoft_Windows_ApplicationModel_Resources {
|
|
public enum IResourceContextBridge : AbiInterfaceBridge {
|
|
public typealias CABI = __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceContext
|
|
public typealias SwiftABI = __ABI_Microsoft_Windows_ApplicationModel_Resources.IResourceContext
|
|
public typealias SwiftProjection = AnyIResourceContext
|
|
public static func from(abi: ComPtr<CABI>?) -> SwiftProjection? {
|
|
guard let abi = abi else { return nil }
|
|
return IResourceContextImpl(abi)
|
|
}
|
|
|
|
public static func makeAbi() -> CABI {
|
|
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Microsoft_Windows_ApplicationModel_Resources.IResourceContextVTable) { $0 }
|
|
return .init(lpVtbl: vtblPtr)
|
|
}
|
|
}
|
|
|
|
fileprivate class IResourceContextImpl: IResourceContext, WinRTAbiImpl {
|
|
fileprivate typealias Bridge = IResourceContextBridge
|
|
fileprivate let _default: Bridge.SwiftABI
|
|
fileprivate var thisPtr: WindowsFoundation.IInspectable { _default }
|
|
fileprivate init(_ fromAbi: ComPtr<Bridge.CABI>) {
|
|
_default = Bridge.SwiftABI(fromAbi)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.iresourcecontext.qualifiervalues)
|
|
fileprivate var qualifierValues : WindowsFoundation.AnyIMap<String, String>! {
|
|
get { try! _default.get_QualifierValuesImpl() }
|
|
}
|
|
|
|
}
|
|
|
|
public enum IResourceManagerBridge : AbiInterfaceBridge {
|
|
public typealias CABI = __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceManager
|
|
public typealias SwiftABI = __ABI_Microsoft_Windows_ApplicationModel_Resources.IResourceManager
|
|
public typealias SwiftProjection = AnyIResourceManager
|
|
public static func from(abi: ComPtr<CABI>?) -> SwiftProjection? {
|
|
guard let abi = abi else { return nil }
|
|
return IResourceManagerImpl(abi)
|
|
}
|
|
|
|
public static func makeAbi() -> CABI {
|
|
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Microsoft_Windows_ApplicationModel_Resources.IResourceManagerVTable) { $0 }
|
|
return .init(lpVtbl: vtblPtr)
|
|
}
|
|
}
|
|
|
|
fileprivate class IResourceManagerImpl: IResourceManager, WinRTAbiImpl {
|
|
fileprivate typealias Bridge = IResourceManagerBridge
|
|
fileprivate let _default: Bridge.SwiftABI
|
|
fileprivate var thisPtr: WindowsFoundation.IInspectable { _default }
|
|
fileprivate init(_ fromAbi: ComPtr<Bridge.CABI>) {
|
|
_default = Bridge.SwiftABI(fromAbi)
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.iresourcemanager.createresourcecontext)
|
|
fileprivate func createResourceContext() throws -> ResourceContext! {
|
|
try _default.CreateResourceContextImpl()
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.iresourcemanager.mainresourcemap)
|
|
fileprivate var mainResourceMap : ResourceMap! {
|
|
get { try! _default.get_MainResourceMapImpl() }
|
|
}
|
|
|
|
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.iresourcemanager.resourcenotfound)
|
|
fileprivate lazy var resourceNotFound : Event<TypedEventHandler<ResourceManager?, ResourceNotFoundEventArgs?>> = {
|
|
.init(
|
|
add: { [weak self] in
|
|
guard let this = self?._default else { return .init() }
|
|
return try! this.add_ResourceNotFoundImpl($0)
|
|
},
|
|
remove: { [weak self] in
|
|
try? self?._default.remove_ResourceNotFoundImpl($0)
|
|
}
|
|
)
|
|
}()
|
|
|
|
}
|
|
|
|
}
|